diff --git a/sdk/agricultureplatform/Azure.ResourceManager.AgriculturePlatform/tsp-location.yaml b/sdk/agricultureplatform/Azure.ResourceManager.AgriculturePlatform/tsp-location.yaml index d42f5de7a940..b07ab5bb8d05 100644 --- a/sdk/agricultureplatform/Azure.ResourceManager.AgriculturePlatform/tsp-location.yaml +++ b/sdk/agricultureplatform/Azure.ResourceManager.AgriculturePlatform/tsp-location.yaml @@ -1,3 +1,4 @@ -directory: specification/agricultureplatform -commit: eeb0e92b55f6c56827df9e7d57f5e08bc633e077 -repo: Azure/azure-rest-api-specs \ No newline at end of file +directory: specification/agricultureplatform/AgriculturePlatform.Management +commit: 1a8dcbc31c561409f253e5f7a924ff577b583da7 +repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/chaos/Azure.ResourceManager.Chaos/Configuration.json b/sdk/chaos/Azure.ResourceManager.Chaos/Configuration.json new file mode 100644 index 000000000000..8d7b168e40df --- /dev/null +++ b/sdk/chaos/Azure.ResourceManager.Chaos/Configuration.json @@ -0,0 +1,13 @@ +{ + "output-folder": ".", + "namespace": "Azure.ResourceManager.Chaos", + "library-name": "Azure.ResourceManager.Chaos", + "flavor": "azure", + "use-model-reader-writer": true, + "shared-source-folders": [ + "../../TempTypeSpecFiles/node_modules/@autorest/csharp/Generator.Shared", + "../../TempTypeSpecFiles/node_modules/@autorest/csharp/Azure.Core.Shared" + ], + "model-namespace": false, + "azure-arm": true +} diff --git a/sdk/chaos/Azure.ResourceManager.Chaos/src/autorest.md b/sdk/chaos/Azure.ResourceManager.Chaos/src/autorest.md deleted file mode 100644 index 433ca7df8c96..000000000000 --- a/sdk/chaos/Azure.ResourceManager.Chaos/src/autorest.md +++ /dev/null @@ -1,81 +0,0 @@ -# Generated code configuration - -Run `dotnet build /t:GenerateCode` to generate code. - -```yaml -azure-arm: true -csharp: true -library-name: Chaos -namespace: Azure.ResourceManager.Chaos -#tag: package-2024-01 -require: https://github.com/Azure/azure-rest-api-specs/blob/f3cd6922dbe117d78b4f719bbf8b03db46b30808/specification/chaos/resource-manager/readme.md -output-folder: $(this-folder)/Generated -clear-output-folder: true -sample-gen: - output-folder: $(this-folder)/../samples/Generated - clear-output-folder: true -skip-csproj: true -modelerfour: - flatten-payloads: false -use-model-reader-writer: true - -#mgmt-debug: -# show-serialized-names: true - -rename-mapping: - ActionStatus: ChaosExperimentRunActionStatus - BranchStatus: ChaosExperimentRunBranchStatus - StepStatus: ChaosExperimentRunStepStatus - TargetReference.id: -|arm-id - CapabilityTypePropertiesRuntimeProperties: ChaosCapabilityTypeRuntimeProperties - ExperimentExecutionDetailsPropertiesRunInformation: ChaosExperimentRunInformation - -prepend-rp-prefix: - - Capability - - CapabilityType - - Experiment - - ExperimentExecution - - Target - - TargetType - - ProvisioningState - - ContinuousAction - - DelayAction - - DiscreteAction - - KeyValuePair - - TargetReference - - TargetReferenceType - -format-by-name-rules: - 'tenantId': 'uuid' - 'ETag': 'etag' - 'location': 'azure-location' - '*Uri': 'Uri' - '*Uris': 'Uri' - -acronym-mapping: - CPU: Cpu - CPUs: Cpus - Os: OS - Ip: IP - Ips: IPs|ips - ID: Id - IDs: Ids - VM: Vm - VMs: Vms - Vmos: VmOS - VMScaleSet: VmScaleSet - DNS: Dns - VPN: Vpn - NAT: Nat - WAN: Wan - Ipv4: IPv4|ipv4 - Ipv6: IPv6|ipv6 - Ipsec: IPsec|ipsec - SSO: Sso - URI: Uri - Etag: ETag|etag - -directive: - - remove-operation: 'OperationStatuses_Get' - -``` diff --git a/sdk/chaos/Azure.ResourceManager.Chaos/tsp-location.yaml b/sdk/chaos/Azure.ResourceManager.Chaos/tsp-location.yaml new file mode 100644 index 000000000000..f16ff8c93d35 --- /dev/null +++ b/sdk/chaos/Azure.ResourceManager.Chaos/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/chaos/Chaos.Management +commit: 1a8dcbc31c561409f253e5f7a924ff577b583da7 +repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/chaos/Azure.ResourceManager.Chaos/tspCodeModel.json b/sdk/chaos/Azure.ResourceManager.Chaos/tspCodeModel.json new file mode 100644 index 000000000000..adf99c82054e --- /dev/null +++ b/sdk/chaos/Azure.ResourceManager.Chaos/tspCodeModel.json @@ -0,0 +1,22469 @@ +{ + "$id": "1", + "name": "Microsoft.Chaos", + "apiVersions": [ + "2025-01-01" + ], + "enums": [ + { + "$id": "2", + "kind": "enum", + "name": "createdByType", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.createdByType", + "valueType": { + "$id": "3", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "4", + "kind": "enumvalue", + "name": "User", + "value": "User", + "valueType": { + "$id": "5", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "doc": "The entity was created by a user.", + "decorators": [] + }, + { + "$id": "6", + "kind": "enumvalue", + "name": "Application", + "value": "Application", + "valueType": { + "$id": "7", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "doc": "The entity was created by an application.", + "decorators": [] + }, + { + "$id": "8", + "kind": "enumvalue", + "name": "ManagedIdentity", + "value": "ManagedIdentity", + "valueType": { + "$id": "9", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "doc": "The entity was created by a managed identity.", + "decorators": [] + }, + { + "$id": "10", + "kind": "enumvalue", + "name": "Key", + "value": "Key", + "valueType": { + "$id": "11", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "doc": "The entity was created by a key.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.Chaos", + "doc": "The kind of entity that created the resource.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "12", + "kind": "enum", + "name": "Origin", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Origin", + "valueType": { + "$id": "13", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "14", + "kind": "enumvalue", + "name": "user", + "value": "user", + "valueType": { + "$id": "15", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "12" + }, + "doc": "Indicates the operation is initiated by a user.", + "decorators": [] + }, + { + "$id": "16", + "kind": "enumvalue", + "name": "system", + "value": "system", + "valueType": { + "$id": "17", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "12" + }, + "doc": "Indicates the operation is initiated by a system.", + "decorators": [] + }, + { + "$id": "18", + "kind": "enumvalue", + "name": "user,system", + "value": "user,system", + "valueType": { + "$id": "19", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "12" + }, + "doc": "Indicates the operation is initiated by a user or system.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.Chaos", + "doc": "The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\"", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "20", + "kind": "enum", + "name": "ActionType", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ActionType", + "valueType": { + "$id": "21", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "22", + "kind": "enumvalue", + "name": "Internal", + "value": "Internal", + "valueType": { + "$id": "23", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "20" + }, + "doc": "Actions are for internal-only APIs.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.Chaos", + "doc": "Extensible enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "24", + "kind": "enum", + "name": "ManagedServiceIdentityType", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentityType", + "valueType": { + "$id": "25", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "26", + "kind": "enumvalue", + "name": "None", + "value": "None", + "valueType": { + "$id": "27", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "24" + }, + "doc": "No managed identity.", + "decorators": [] + }, + { + "$id": "28", + "kind": "enumvalue", + "name": "SystemAssigned", + "value": "SystemAssigned", + "valueType": { + "$id": "29", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "24" + }, + "doc": "System assigned managed identity.", + "decorators": [] + }, + { + "$id": "30", + "kind": "enumvalue", + "name": "UserAssigned", + "value": "UserAssigned", + "valueType": { + "$id": "31", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "24" + }, + "doc": "User assigned managed identity.", + "decorators": [] + }, + { + "$id": "32", + "kind": "enumvalue", + "name": "SystemAssigned,UserAssigned", + "value": "SystemAssigned,UserAssigned", + "valueType": { + "$id": "33", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "24" + }, + "doc": "System and user assigned managed identity.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.Chaos", + "doc": "Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "34", + "kind": "enum", + "name": "ChaosProvisioningState", + "crossLanguageDefinitionId": "Microsoft.Chaos.ProvisioningState", + "valueType": { + "$id": "35", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "36", + "kind": "enumvalue", + "name": "Succeeded", + "value": "Succeeded", + "valueType": { + "$id": "37", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "34" + }, + "doc": "Resource has been created.", + "decorators": [] + }, + { + "$id": "38", + "kind": "enumvalue", + "name": "Failed", + "value": "Failed", + "valueType": { + "$id": "39", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "34" + }, + "doc": "Resource creation failed.", + "decorators": [] + }, + { + "$id": "40", + "kind": "enumvalue", + "name": "Canceled", + "value": "Canceled", + "valueType": { + "$id": "41", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "34" + }, + "doc": "Resource creation was canceled.", + "decorators": [] + }, + { + "$id": "42", + "kind": "enumvalue", + "name": "Creating", + "value": "Creating", + "valueType": { + "$id": "43", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "34" + }, + "doc": "Initial creation in progress.", + "decorators": [] + }, + { + "$id": "44", + "kind": "enumvalue", + "name": "Updating", + "value": "Updating", + "valueType": { + "$id": "45", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "34" + }, + "doc": "Update in progress.", + "decorators": [] + }, + { + "$id": "46", + "kind": "enumvalue", + "name": "Deleting", + "value": "Deleting", + "valueType": { + "$id": "47", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "34" + }, + "doc": "Deletion in progress.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.Chaos", + "doc": "Current provisioning state for a given Azure Chaos resource.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "48", + "kind": "enum", + "name": "ExperimentActionType", + "crossLanguageDefinitionId": "Microsoft.Chaos.ExperimentActionType", + "valueType": { + "$id": "49", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "50", + "kind": "enumvalue", + "name": "delay", + "value": "delay", + "valueType": { + "$id": "51", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "48" + }, + "decorators": [] + }, + { + "$id": "52", + "kind": "enumvalue", + "name": "discrete", + "value": "discrete", + "valueType": { + "$id": "53", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "48" + }, + "decorators": [] + }, + { + "$id": "54", + "kind": "enumvalue", + "name": "continuous", + "value": "continuous", + "valueType": { + "$id": "55", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "48" + }, + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.Chaos", + "doc": "Enum union of Chaos experiment action types.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "56", + "kind": "enum", + "name": "SelectorType", + "crossLanguageDefinitionId": "Microsoft.Chaos.SelectorType", + "valueType": { + "$id": "57", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "58", + "kind": "enumvalue", + "name": "List", + "value": "List", + "valueType": { + "$id": "59", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "56" + }, + "doc": "List selector type.", + "decorators": [] + }, + { + "$id": "60", + "kind": "enumvalue", + "name": "Query", + "value": "Query", + "valueType": { + "$id": "61", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "56" + }, + "doc": "Query selector type.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.Chaos", + "doc": "Enum of the selector type.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "62", + "kind": "enum", + "name": "FilterType", + "crossLanguageDefinitionId": "Microsoft.Chaos.FilterType", + "valueType": { + "$id": "63", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "64", + "kind": "enumvalue", + "name": "Simple", + "value": "Simple", + "valueType": { + "$id": "65", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "62" + }, + "doc": "Simple filter type.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.Chaos", + "doc": "Enum that discriminates between filter types. Currently only `Simple` type is supported.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "66", + "kind": "enum", + "name": "ChaosTargetReferenceType", + "crossLanguageDefinitionId": "Microsoft.Chaos.TargetReferenceType", + "valueType": { + "$id": "67", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "68", + "kind": "enumvalue", + "name": "ChaosTarget", + "value": "ChaosTarget", + "valueType": { + "$id": "69", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "66" + }, + "doc": "Chaos target reference type.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.Chaos", + "doc": "Enum of the Target reference type.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "70", + "kind": "enum", + "name": "ResourceProvisioningState", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceProvisioningState", + "valueType": { + "$id": "71", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "72", + "kind": "enumvalue", + "name": "Succeeded", + "value": "Succeeded", + "valueType": { + "$id": "73", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "70" + }, + "doc": "Resource has been created.", + "decorators": [] + }, + { + "$id": "74", + "kind": "enumvalue", + "name": "Failed", + "value": "Failed", + "valueType": { + "$id": "75", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "70" + }, + "doc": "Resource creation failed.", + "decorators": [] + }, + { + "$id": "76", + "kind": "enumvalue", + "name": "Canceled", + "value": "Canceled", + "valueType": { + "$id": "77", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "70" + }, + "doc": "Resource creation was canceled.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.Chaos", + "doc": "The provisioning state of a resource type.", + "isFixed": false, + "isFlags": false, + "usage": "LroPolling", + "decorators": [] + }, + { + "$id": "78", + "kind": "enum", + "name": "Versions", + "crossLanguageDefinitionId": "Microsoft.Chaos.Versions", + "valueType": { + "$id": "79", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "80", + "kind": "enumvalue", + "name": "v2025_01_01", + "value": "2025-01-01", + "valueType": { + "$id": "81", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "78" + }, + "doc": "The 2025-01-01 API version.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.Chaos", + "doc": "The available API versions.", + "isFixed": true, + "isFlags": false, + "usage": "ApiVersionEnum", + "decorators": [] + } + ], + "models": [ + { + "$id": "82", + "kind": "model", + "name": "ChaosCapability", + "namespace": "Azure.ResourceManager.Chaos", + "crossLanguageDefinitionId": "Microsoft.Chaos.Capability", + "usage": "Input,Output,Json", + "doc": "Model that represents a Capability resource.", + "decorators": [], + "baseModel": { + "$id": "83", + "kind": "model", + "name": "ProxyResource", + "namespace": "Azure.ResourceManager.Chaos", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ProxyResource", + "usage": "Input,Output,Json", + "doc": "The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location", + "decorators": [], + "baseModel": { + "$id": "84", + "kind": "model", + "name": "Resource", + "namespace": "Azure.ResourceManager.Chaos", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Common fields that are returned in the response for all Azure Resource Manager resources", + "decorators": [], + "properties": [ + { + "$id": "85", + "kind": "property", + "name": "id", + "serializedName": "id", + "doc": "Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}", + "type": { + "$id": "86", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "87", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource.id", + "serializationOptions": { + "$id": "88", + "json": { + "$id": "89", + "name": "id" + } + } + }, + { + "$id": "90", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the resource", + "type": { + "$id": "91", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource.name", + "serializationOptions": { + "$id": "92", + "json": { + "$id": "93", + "name": "name" + } + } + }, + { + "$id": "94", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"", + "type": { + "$id": "95", + "kind": "string", + "name": "armResourceType", + "crossLanguageDefinitionId": "Azure.Core.armResourceType", + "baseType": { + "$id": "96", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource.type", + "serializationOptions": { + "$id": "97", + "json": { + "$id": "98", + "name": "type" + } + } + }, + { + "$id": "99", + "kind": "property", + "name": "systemData", + "serializedName": "systemData", + "doc": "Azure Resource Manager metadata containing createdBy and modifiedBy information.", + "type": { + "$id": "100", + "kind": "model", + "name": "SystemData", + "namespace": "Azure.ResourceManager.Chaos", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData", + "usage": "Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Metadata pertaining to creation and last modification of the resource.", + "decorators": [], + "properties": [ + { + "$id": "101", + "kind": "property", + "name": "createdBy", + "serializedName": "createdBy", + "doc": "The identity that created the resource.", + "type": { + "$id": "102", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.createdBy", + "serializationOptions": { + "$id": "103", + "json": { + "$id": "104", + "name": "createdBy" + } + } + }, + { + "$id": "105", + "kind": "property", + "name": "createdByType", + "serializedName": "createdByType", + "doc": "The type of identity that created the resource.", + "type": { + "$ref": "2" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.createdByType", + "serializationOptions": { + "$id": "106", + "json": { + "$id": "107", + "name": "createdByType" + } + } + }, + { + "$id": "108", + "kind": "property", + "name": "createdAt", + "serializedName": "createdAt", + "doc": "The timestamp of resource creation (UTC).", + "type": { + "$id": "109", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "110", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.createdAt", + "serializationOptions": { + "$id": "111", + "json": { + "$id": "112", + "name": "createdAt" + } + } + }, + { + "$id": "113", + "kind": "property", + "name": "lastModifiedBy", + "serializedName": "lastModifiedBy", + "doc": "The identity that last modified the resource.", + "type": { + "$id": "114", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.lastModifiedBy", + "serializationOptions": { + "$id": "115", + "json": { + "$id": "116", + "name": "lastModifiedBy" + } + } + }, + { + "$id": "117", + "kind": "property", + "name": "lastModifiedByType", + "serializedName": "lastModifiedByType", + "doc": "The type of identity that last modified the resource.", + "type": { + "$ref": "2" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.lastModifiedByType", + "serializationOptions": { + "$id": "118", + "json": { + "$id": "119", + "name": "lastModifiedByType" + } + } + }, + { + "$id": "120", + "kind": "property", + "name": "lastModifiedAt", + "serializedName": "lastModifiedAt", + "doc": "The timestamp of resource last modification (UTC)", + "type": { + "$id": "121", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "122", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.lastModifiedAt", + "serializationOptions": { + "$id": "123", + "json": { + "$id": "124", + "name": "lastModifiedAt" + } + } + } + ] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource.systemData", + "serializationOptions": { + "$id": "125", + "json": { + "$id": "126", + "name": "systemData" + } + } + } + ] + }, + "properties": [] + }, + "properties": [ + { + "$id": "127", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The properties of a capability resource.", + "type": { + "$id": "128", + "kind": "model", + "name": "CapabilityProperties", + "namespace": "Azure.ResourceManager.Chaos", + "crossLanguageDefinitionId": "Microsoft.Chaos.CapabilityProperties", + "usage": "Input,Output,Json", + "doc": "Model that represents the Capability properties model.", + "decorators": [], + "properties": [ + { + "$id": "129", + "kind": "property", + "name": "publisher", + "serializedName": "publisher", + "doc": "String of the Publisher that this Capability extends.", + "type": { + "$id": "130", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.CapabilityProperties.publisher", + "serializationOptions": { + "$id": "131", + "json": { + "$id": "132", + "name": "publisher" + } + } + }, + { + "$id": "133", + "kind": "property", + "name": "targetType", + "serializedName": "targetType", + "doc": "String of the Target Type that this Capability extends.", + "type": { + "$id": "134", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.CapabilityProperties.targetType", + "serializationOptions": { + "$id": "135", + "json": { + "$id": "136", + "name": "targetType" + } + } + }, + { + "$id": "137", + "kind": "property", + "name": "description", + "serializedName": "description", + "doc": "Localized string of the description.", + "type": { + "$id": "138", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.CapabilityProperties.description", + "serializationOptions": { + "$id": "139", + "json": { + "$id": "140", + "name": "description" + } + } + }, + { + "$id": "141", + "kind": "property", + "name": "parametersSchema", + "serializedName": "parametersSchema", + "doc": "URL to retrieve JSON schema of the Capability parameters.", + "type": { + "$id": "142", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.CapabilityProperties.parametersSchema", + "serializationOptions": { + "$id": "143", + "json": { + "$id": "144", + "name": "parametersSchema" + } + } + }, + { + "$id": "145", + "kind": "property", + "name": "urn", + "serializedName": "urn", + "doc": "String of the URN for this Capability Type.", + "type": { + "$id": "146", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.CapabilityProperties.urn", + "serializationOptions": { + "$id": "147", + "json": { + "$id": "148", + "name": "urn" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": true, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.Capability.properties", + "serializationOptions": { + "$id": "149", + "json": { + "$id": "150", + "name": "properties" + } + } + }, + { + "$id": "151", + "kind": "path", + "name": "name", + "serializedName": "name", + "doc": "String that represents a Capability resource name.", + "type": { + "$id": "152", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.Capability.name", + "discriminator": false, + "flatten": false + } + ] + }, + { + "$ref": "128" + }, + { + "$ref": "83" + }, + { + "$ref": "84" + }, + { + "$ref": "100" + }, + { + "$id": "153", + "kind": "model", + "name": "ErrorResponse", + "namespace": "Azure.ResourceManager.Chaos", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorResponse", + "usage": "Json,Exception", + "doc": "Common error response for all Azure Resource Manager APIs to return error details for failed operations.", + "decorators": [], + "properties": [ + { + "$id": "154", + "kind": "property", + "name": "error", + "serializedName": "error", + "doc": "The error object.", + "type": { + "$id": "155", + "kind": "model", + "name": "ErrorDetail", + "namespace": "Azure.ResourceManager.Chaos", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail", + "usage": "Output,Json,Exception,LroPolling", + "doc": "The error detail.", + "decorators": [], + "properties": [ + { + "$id": "156", + "kind": "property", + "name": "code", + "serializedName": "code", + "doc": "The error code.", + "type": { + "$id": "157", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.code", + "serializationOptions": { + "$id": "158", + "json": { + "$id": "159", + "name": "code" + } + } + }, + { + "$id": "160", + "kind": "property", + "name": "message", + "serializedName": "message", + "doc": "The error message.", + "type": { + "$id": "161", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.message", + "serializationOptions": { + "$id": "162", + "json": { + "$id": "163", + "name": "message" + } + } + }, + { + "$id": "164", + "kind": "property", + "name": "target", + "serializedName": "target", + "doc": "The error target.", + "type": { + "$id": "165", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.target", + "serializationOptions": { + "$id": "166", + "json": { + "$id": "167", + "name": "target" + } + } + }, + { + "$id": "168", + "kind": "property", + "name": "details", + "serializedName": "details", + "doc": "The error details.", + "type": { + "$id": "169", + "kind": "array", + "name": "ArrayErrorDetail", + "valueType": { + "$ref": "155" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.details", + "serializationOptions": { + "$id": "170", + "json": { + "$id": "171", + "name": "details" + } + } + }, + { + "$id": "172", + "kind": "property", + "name": "additionalInfo", + "serializedName": "additionalInfo", + "doc": "The error additional info.", + "type": { + "$id": "173", + "kind": "array", + "name": "ArrayErrorAdditionalInfo", + "valueType": { + "$id": "174", + "kind": "model", + "name": "ErrorAdditionalInfo", + "namespace": "Azure.ResourceManager.Chaos", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo", + "usage": "Output,Json,Exception,LroPolling", + "doc": "The resource management error additional info.", + "decorators": [], + "properties": [ + { + "$id": "175", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The additional info type.", + "type": { + "$id": "176", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo.type", + "serializationOptions": { + "$id": "177", + "json": { + "$id": "178", + "name": "type" + } + } + }, + { + "$id": "179", + "kind": "property", + "name": "info", + "serializedName": "info", + "doc": "The additional info.", + "type": { + "$id": "180", + "kind": "model", + "name": "ErrorAdditionalInfoInfo", + "namespace": "Azure.ResourceManager.Chaos", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo.info.anonymous", + "usage": "Output,Json,Exception,LroPolling", + "decorators": [], + "properties": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo.info", + "serializationOptions": { + "$id": "181", + "json": { + "$id": "182", + "name": "info" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.additionalInfo", + "serializationOptions": { + "$id": "183", + "json": { + "$id": "184", + "name": "additionalInfo" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorResponse.error", + "serializationOptions": { + "$id": "185", + "json": { + "$id": "186", + "name": "error" + } + } + } + ] + }, + { + "$ref": "155" + }, + { + "$ref": "174" + }, + { + "$ref": "180" + }, + { + "$id": "187", + "kind": "model", + "name": "CapabilityListResult", + "namespace": "Azure.ResourceManager.Chaos", + "crossLanguageDefinitionId": "Microsoft.Chaos.CapabilityListResult", + "usage": "Output,Json", + "doc": "Model that represents a list of Capability resources and a link for pagination.", + "decorators": [], + "properties": [ + { + "$id": "188", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The Capability items on this page", + "type": { + "$id": "189", + "kind": "array", + "name": "ArrayCapability", + "valueType": { + "$ref": "82" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.CapabilityListResult.value", + "serializationOptions": { + "$id": "190", + "json": { + "$id": "191", + "name": "value" + } + } + }, + { + "$id": "192", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "193", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "194", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.CapabilityListResult.nextLink", + "serializationOptions": { + "$id": "195", + "json": { + "$id": "196", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "197", + "kind": "model", + "name": "OperationListResult", + "namespace": "Azure.ResourceManager.Chaos", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationListResult", + "usage": "Output,Json", + "doc": "A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.", + "decorators": [], + "properties": [ + { + "$id": "198", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The Operation items on this page", + "type": { + "$id": "199", + "kind": "array", + "name": "ArrayOperation", + "valueType": { + "$id": "200", + "kind": "model", + "name": "Operation", + "namespace": "Azure.ResourceManager.Chaos", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation", + "usage": "Output,Json", + "doc": "Details of a REST API operation, returned from the Resource Provider Operations API", + "decorators": [], + "properties": [ + { + "$id": "201", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the operation, as per Resource-Based Access Control (RBAC). Examples: \"Microsoft.Compute/virtualMachines/write\", \"Microsoft.Compute/virtualMachines/capture/action\"", + "type": { + "$id": "202", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.name", + "serializationOptions": { + "$id": "203", + "json": { + "$id": "204", + "name": "name" + } + } + }, + { + "$id": "205", + "kind": "property", + "name": "isDataAction", + "serializedName": "isDataAction", + "doc": "Whether the operation applies to data-plane. This is \"true\" for data-plane operations and \"false\" for Azure Resource Manager/control-plane operations.", + "type": { + "$id": "206", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.isDataAction", + "serializationOptions": { + "$id": "207", + "json": { + "$id": "208", + "name": "isDataAction" + } + } + }, + { + "$id": "209", + "kind": "property", + "name": "display", + "serializedName": "display", + "doc": "Localized display information for this particular operation.", + "type": { + "$id": "210", + "kind": "model", + "name": "OperationDisplay", + "namespace": "Azure.ResourceManager.Chaos", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay", + "usage": "Output,Json", + "doc": "Localized display information for and operation.", + "decorators": [], + "properties": [ + { + "$id": "211", + "kind": "property", + "name": "provider", + "serializedName": "provider", + "doc": "The localized friendly form of the resource provider name, e.g. \"Microsoft Monitoring Insights\" or \"Microsoft Compute\".", + "type": { + "$id": "212", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay.provider", + "serializationOptions": { + "$id": "213", + "json": { + "$id": "214", + "name": "provider" + } + } + }, + { + "$id": "215", + "kind": "property", + "name": "resource", + "serializedName": "resource", + "doc": "The localized friendly name of the resource type related to this operation. E.g. \"Virtual Machines\" or \"Job Schedule Collections\".", + "type": { + "$id": "216", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay.resource", + "serializationOptions": { + "$id": "217", + "json": { + "$id": "218", + "name": "resource" + } + } + }, + { + "$id": "219", + "kind": "property", + "name": "operation", + "serializedName": "operation", + "doc": "The concise, localized friendly name for the operation; suitable for dropdowns. E.g. \"Create or Update Virtual Machine\", \"Restart Virtual Machine\".", + "type": { + "$id": "220", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay.operation", + "serializationOptions": { + "$id": "221", + "json": { + "$id": "222", + "name": "operation" + } + } + }, + { + "$id": "223", + "kind": "property", + "name": "description", + "serializedName": "description", + "doc": "The short, localized friendly description of the operation; suitable for tool tips and detailed views.", + "type": { + "$id": "224", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay.description", + "serializationOptions": { + "$id": "225", + "json": { + "$id": "226", + "name": "description" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.display", + "serializationOptions": { + "$id": "227", + "json": { + "$id": "228", + "name": "display" + } + } + }, + { + "$id": "229", + "kind": "property", + "name": "origin", + "serializedName": "origin", + "doc": "The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\"", + "type": { + "$ref": "12" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.origin", + "serializationOptions": { + "$id": "230", + "json": { + "$id": "231", + "name": "origin" + } + } + }, + { + "$id": "232", + "kind": "property", + "name": "actionType", + "serializedName": "actionType", + "doc": "Extensible enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs.", + "type": { + "$ref": "20" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.actionType", + "serializationOptions": { + "$id": "233", + "json": { + "$id": "234", + "name": "actionType" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationListResult.value", + "serializationOptions": { + "$id": "235", + "json": { + "$id": "236", + "name": "value" + } + } + }, + { + "$id": "237", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "238", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "239", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationListResult.nextLink", + "serializationOptions": { + "$id": "240", + "json": { + "$id": "241", + "name": "nextLink" + } + } + } + ] + }, + { + "$ref": "200" + }, + { + "$ref": "210" + }, + { + "$id": "242", + "kind": "model", + "name": "ChaosTarget", + "namespace": "Azure.ResourceManager.Chaos", + "crossLanguageDefinitionId": "Microsoft.Chaos.Target", + "usage": "Input,Output,Json", + "doc": "Model that represents a Target resource.", + "decorators": [], + "baseModel": { + "$ref": "83" + }, + "properties": [ + { + "$id": "243", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The properties of the target resource.", + "type": { + "$id": "244", + "kind": "dict", + "keyType": { + "$id": "245", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "246", + "kind": "unknown", + "name": "unknown", + "crossLanguageDefinitionId": "", + "decorators": [] + }, + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.Target.properties", + "serializationOptions": { + "$id": "247", + "json": { + "$id": "248", + "name": "properties" + } + } + }, + { + "$id": "249", + "kind": "path", + "name": "name", + "serializedName": "name", + "doc": "String that represents a Target resource name.", + "type": { + "$id": "250", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.Target.name", + "discriminator": false, + "flatten": false + }, + { + "$id": "251", + "kind": "property", + "name": "location", + "serializedName": "location", + "doc": "Azure resource location.", + "type": { + "$id": "252", + "kind": "string", + "name": "azureLocation", + "crossLanguageDefinitionId": "Azure.Core.azureLocation", + "baseType": { + "$id": "253", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.Target.location", + "serializationOptions": { + "$id": "254", + "json": { + "$id": "255", + "name": "location" + } + } + } + ] + }, + { + "$id": "256", + "kind": "model", + "name": "TargetListResult", + "namespace": "Azure.ResourceManager.Chaos", + "crossLanguageDefinitionId": "Microsoft.Chaos.TargetListResult", + "usage": "Output,Json", + "doc": "Model that represents a list of Target resources and a link for pagination.", + "decorators": [], + "properties": [ + { + "$id": "257", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The Target items on this page", + "type": { + "$id": "258", + "kind": "array", + "name": "ArrayTarget", + "valueType": { + "$ref": "242" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.TargetListResult.value", + "serializationOptions": { + "$id": "259", + "json": { + "$id": "260", + "name": "value" + } + } + }, + { + "$id": "261", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "262", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "263", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.TargetListResult.nextLink", + "serializationOptions": { + "$id": "264", + "json": { + "$id": "265", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "266", + "kind": "model", + "name": "ChaosCapabilityMetadata", + "namespace": "Azure.ResourceManager.Chaos", + "crossLanguageDefinitionId": "Microsoft.Chaos.CapabilityType", + "usage": "Output,Json", + "doc": "Model that represents a Capability Type resource.", + "decorators": [], + "baseModel": { + "$ref": "83" + }, + "properties": [ + { + "$id": "267", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The properties of the capability type resource.", + "type": { + "$id": "268", + "kind": "model", + "name": "CapabilityTypeProperties", + "namespace": "Azure.ResourceManager.Chaos", + "crossLanguageDefinitionId": "Microsoft.Chaos.CapabilityTypeProperties", + "usage": "Output,Json", + "doc": "Model that represents the Capability Type properties model.", + "decorators": [], + "properties": [ + { + "$id": "269", + "kind": "property", + "name": "publisher", + "serializedName": "publisher", + "doc": "String of the Publisher that this Capability Type extends.", + "type": { + "$id": "270", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.CapabilityTypeProperties.publisher", + "serializationOptions": { + "$id": "271", + "json": { + "$id": "272", + "name": "publisher" + } + } + }, + { + "$id": "273", + "kind": "property", + "name": "targetType", + "serializedName": "targetType", + "doc": "String of the Target Type that this Capability Type extends.", + "type": { + "$id": "274", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.CapabilityTypeProperties.targetType", + "serializationOptions": { + "$id": "275", + "json": { + "$id": "276", + "name": "targetType" + } + } + }, + { + "$id": "277", + "kind": "property", + "name": "displayName", + "serializedName": "displayName", + "doc": "Localized string of the display name.", + "type": { + "$id": "278", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.CapabilityTypeProperties.displayName", + "serializationOptions": { + "$id": "279", + "json": { + "$id": "280", + "name": "displayName" + } + } + }, + { + "$id": "281", + "kind": "property", + "name": "description", + "serializedName": "description", + "doc": "Localized string of the description.", + "type": { + "$id": "282", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.CapabilityTypeProperties.description", + "serializationOptions": { + "$id": "283", + "json": { + "$id": "284", + "name": "description" + } + } + }, + { + "$id": "285", + "kind": "property", + "name": "parametersSchema", + "serializedName": "parametersSchema", + "doc": "URL to retrieve JSON schema of the Capability Type parameters.", + "type": { + "$id": "286", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.CapabilityTypeProperties.parametersSchema", + "serializationOptions": { + "$id": "287", + "json": { + "$id": "288", + "name": "parametersSchema" + } + } + }, + { + "$id": "289", + "kind": "property", + "name": "urn", + "serializedName": "urn", + "doc": "String of the URN for this Capability Type.", + "type": { + "$id": "290", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.CapabilityTypeProperties.urn", + "serializationOptions": { + "$id": "291", + "json": { + "$id": "292", + "name": "urn" + } + } + }, + { + "$id": "293", + "kind": "property", + "name": "kind", + "serializedName": "kind", + "doc": "String of the kind of this Capability Type.", + "type": { + "$id": "294", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.CapabilityTypeProperties.kind", + "serializationOptions": { + "$id": "295", + "json": { + "$id": "296", + "name": "kind" + } + } + }, + { + "$id": "297", + "kind": "property", + "name": "azureRbacActions", + "serializedName": "azureRbacActions", + "doc": "Control plane actions necessary to execute capability type.", + "type": { + "$id": "298", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "299", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.CapabilityTypeProperties.azureRbacActions", + "serializationOptions": { + "$id": "300", + "json": { + "$id": "301", + "name": "azureRbacActions" + } + } + }, + { + "$id": "302", + "kind": "property", + "name": "azureRbacDataActions", + "serializedName": "azureRbacDataActions", + "doc": "Data plane actions necessary to execute capability type.", + "type": { + "$id": "303", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "304", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.CapabilityTypeProperties.azureRbacDataActions", + "serializationOptions": { + "$id": "305", + "json": { + "$id": "306", + "name": "azureRbacDataActions" + } + } + }, + { + "$id": "307", + "kind": "property", + "name": "requiredAzureRoleDefinitionIds", + "serializedName": "requiredAzureRoleDefinitionIds", + "doc": "Required Azure Role Definition Ids to execute capability type.", + "type": { + "$id": "308", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "309", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.CapabilityTypeProperties.requiredAzureRoleDefinitionIds", + "serializationOptions": { + "$id": "310", + "json": { + "$id": "311", + "name": "requiredAzureRoleDefinitionIds" + } + } + }, + { + "$id": "312", + "kind": "property", + "name": "runtimeProperties", + "serializedName": "runtimeProperties", + "doc": "Runtime properties of this Capability Type.", + "type": { + "$id": "313", + "kind": "model", + "name": "ChaosCapabilityMetadataRuntimeProperties", + "namespace": "Azure.ResourceManager.Chaos", + "crossLanguageDefinitionId": "Microsoft.Chaos.CapabilityTypePropertiesRuntimeProperties", + "usage": "Output,Json", + "doc": "Runtime properties of this Capability Type.", + "decorators": [], + "properties": [ + { + "$id": "314", + "kind": "property", + "name": "kind", + "serializedName": "kind", + "doc": "String of the kind of the resource's action type (continuous or discrete).", + "type": { + "$id": "315", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.CapabilityTypePropertiesRuntimeProperties.kind", + "serializationOptions": { + "$id": "316", + "json": { + "$id": "317", + "name": "kind" + } + } + } + ] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.CapabilityTypeProperties.runtimeProperties", + "serializationOptions": { + "$id": "318", + "json": { + "$id": "319", + "name": "runtimeProperties" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": true, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.CapabilityType.properties", + "serializationOptions": { + "$id": "320", + "json": { + "$id": "321", + "name": "properties" + } + } + }, + { + "$id": "322", + "kind": "path", + "name": "name", + "serializedName": "name", + "doc": "String that represents a Capability Type resource name.", + "type": { + "$id": "323", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.CapabilityType.name", + "discriminator": false, + "flatten": false + } + ] + }, + { + "$ref": "268" + }, + { + "$ref": "313" + }, + { + "$id": "324", + "kind": "model", + "name": "CapabilityTypeListResult", + "namespace": "Azure.ResourceManager.Chaos", + "crossLanguageDefinitionId": "Microsoft.Chaos.CapabilityTypeListResult", + "usage": "Output,Json", + "doc": "Model that represents a list of Capability Type resources and a link for pagination.", + "decorators": [], + "properties": [ + { + "$id": "325", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The CapabilityType items on this page", + "type": { + "$id": "326", + "kind": "array", + "name": "ArrayCapabilityType", + "valueType": { + "$ref": "266" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.CapabilityTypeListResult.value", + "serializationOptions": { + "$id": "327", + "json": { + "$id": "328", + "name": "value" + } + } + }, + { + "$id": "329", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "330", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "331", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.CapabilityTypeListResult.nextLink", + "serializationOptions": { + "$id": "332", + "json": { + "$id": "333", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "334", + "kind": "model", + "name": "ChaosExperiment", + "namespace": "Azure.ResourceManager.Chaos", + "crossLanguageDefinitionId": "Microsoft.Chaos.Experiment", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Model that represents a Experiment resource.", + "decorators": [], + "baseModel": { + "$id": "335", + "kind": "model", + "name": "TrackedResource", + "namespace": "Azure.ResourceManager.Chaos", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.TrackedResource", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'", + "decorators": [], + "baseModel": { + "$ref": "84" + }, + "properties": [ + { + "$id": "336", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Resource tags.", + "type": { + "$id": "337", + "kind": "dict", + "keyType": { + "$id": "338", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "339", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.TrackedResource.tags", + "serializationOptions": { + "$id": "340", + "json": { + "$id": "341", + "name": "tags" + } + } + }, + { + "$id": "342", + "kind": "property", + "name": "location", + "serializedName": "location", + "doc": "The geo-location where the resource lives", + "type": { + "$id": "343", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.TrackedResource.location", + "serializationOptions": { + "$id": "344", + "json": { + "$id": "345", + "name": "location" + } + } + } + ] + }, + "properties": [ + { + "$id": "346", + "kind": "path", + "name": "name", + "serializedName": "name", + "doc": "String that represents a Experiment resource name.", + "type": { + "$id": "347", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.Experiment.name", + "discriminator": false, + "flatten": false + }, + { + "$id": "348", + "kind": "property", + "name": "identity", + "serializedName": "identity", + "doc": "The managed service identities assigned to this resource.", + "type": { + "$id": "349", + "kind": "model", + "name": "ManagedServiceIdentity", + "namespace": "Azure.ResourceManager.Chaos", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Managed service identity (system assigned and/or user assigned identities)", + "decorators": [], + "properties": [ + { + "$id": "350", + "kind": "property", + "name": "principalId", + "serializedName": "principalId", + "doc": "The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity.", + "type": { + "$id": "351", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "352", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity.principalId", + "serializationOptions": { + "$id": "353", + "json": { + "$id": "354", + "name": "principalId" + } + } + }, + { + "$id": "355", + "kind": "property", + "name": "tenantId", + "serializedName": "tenantId", + "doc": "The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity.", + "type": { + "$id": "356", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "357", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity.tenantId", + "serializationOptions": { + "$id": "358", + "json": { + "$id": "359", + "name": "tenantId" + } + } + }, + { + "$id": "360", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The type of managed identity assigned to this resource.", + "type": { + "$ref": "24" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity.type", + "serializationOptions": { + "$id": "361", + "json": { + "$id": "362", + "name": "type" + } + } + }, + { + "$id": "363", + "kind": "property", + "name": "userAssignedIdentities", + "serializedName": "userAssignedIdentities", + "doc": "The identities assigned to this resource by the user.", + "type": { + "$id": "364", + "kind": "dict", + "keyType": { + "$id": "365", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "366", + "kind": "nullable", + "type": { + "$id": "367", + "kind": "model", + "name": "UserAssignedIdentity", + "namespace": "Azure.ResourceManager.Chaos", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.UserAssignedIdentity", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "User assigned identity properties", + "decorators": [], + "properties": [ + { + "$id": "368", + "kind": "property", + "name": "clientId", + "serializedName": "clientId", + "doc": "The client ID of the assigned identity.", + "type": { + "$id": "369", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "370", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.UserAssignedIdentity.clientId", + "serializationOptions": { + "$id": "371", + "json": { + "$id": "372", + "name": "clientId" + } + } + }, + { + "$id": "373", + "kind": "property", + "name": "principalId", + "serializedName": "principalId", + "doc": "The principal ID of the assigned identity.", + "type": { + "$id": "374", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "375", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.UserAssignedIdentity.principalId", + "serializationOptions": { + "$id": "376", + "json": { + "$id": "377", + "name": "principalId" + } + } + } + ] + }, + "namespace": "Azure.ResourceManager.Chaos" + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity.userAssignedIdentities", + "serializationOptions": { + "$id": "378", + "json": { + "$id": "379", + "name": "userAssignedIdentities" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.Experiment.identity", + "serializationOptions": { + "$id": "380", + "json": { + "$id": "381", + "name": "identity" + } + } + }, + { + "$id": "382", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The properties of the experiment resource.", + "type": { + "$id": "383", + "kind": "model", + "name": "ExperimentProperties", + "namespace": "Azure.ResourceManager.Chaos", + "crossLanguageDefinitionId": "Microsoft.Chaos.ExperimentProperties", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Model that represents the Experiment properties model.", + "decorators": [], + "properties": [ + { + "$id": "384", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "Most recent provisioning state for the given experiment resource.", + "type": { + "$ref": "34" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ExperimentProperties.provisioningState", + "serializationOptions": { + "$id": "385", + "json": { + "$id": "386", + "name": "provisioningState" + } + } + }, + { + "$id": "387", + "kind": "property", + "name": "steps", + "serializedName": "steps", + "doc": "List of steps.", + "type": { + "$id": "388", + "kind": "array", + "name": "ArrayChaosExperimentStep", + "valueType": { + "$id": "389", + "kind": "model", + "name": "ChaosExperimentStep", + "namespace": "Azure.ResourceManager.Chaos", + "crossLanguageDefinitionId": "Microsoft.Chaos.ChaosExperimentStep", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Model that represents a step in the Experiment resource.", + "decorators": [], + "properties": [ + { + "$id": "390", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "String of the step name.", + "type": { + "$id": "391", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ChaosExperimentStep.name", + "serializationOptions": { + "$id": "392", + "json": { + "$id": "393", + "name": "name" + } + } + }, + { + "$id": "394", + "kind": "property", + "name": "branches", + "serializedName": "branches", + "doc": "List of branches.", + "type": { + "$id": "395", + "kind": "array", + "name": "ArrayChaosExperimentBranch", + "valueType": { + "$id": "396", + "kind": "model", + "name": "ChaosExperimentBranch", + "namespace": "Azure.ResourceManager.Chaos", + "crossLanguageDefinitionId": "Microsoft.Chaos.ChaosExperimentBranch", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Model that represents a branch in the step. 9 total per experiment.", + "decorators": [], + "properties": [ + { + "$id": "397", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "String of the branch name.", + "type": { + "$id": "398", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ChaosExperimentBranch.name", + "serializationOptions": { + "$id": "399", + "json": { + "$id": "400", + "name": "name" + } + } + }, + { + "$id": "401", + "kind": "property", + "name": "actions", + "serializedName": "actions", + "doc": "List of actions.", + "type": { + "$id": "402", + "kind": "array", + "name": "ArrayChaosExperimentAction", + "valueType": { + "$id": "403", + "kind": "model", + "name": "ChaosExperimentAction", + "namespace": "Azure.ResourceManager.Chaos", + "crossLanguageDefinitionId": "Microsoft.Chaos.ChaosExperimentAction", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Model that represents the base action model. 9 total per experiment.", + "decorators": [], + "discriminatorProperty": { + "$id": "404", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "Chaos experiment action discriminator type", + "type": { + "$ref": "48" + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ChaosExperimentAction.type", + "serializationOptions": { + "$id": "405", + "json": { + "$id": "406", + "name": "type" + } + } + }, + "properties": [ + { + "$id": "407", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "String that represents a Capability URN.", + "type": { + "$id": "408", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ChaosExperimentAction.name", + "serializationOptions": { + "$id": "409", + "json": { + "$id": "410", + "name": "name" + } + } + }, + { + "$ref": "404" + } + ], + "discriminatedSubtypes": { + "$id": "411", + "continuous": { + "$id": "412", + "kind": "model", + "name": "ChaosContinuousAction", + "namespace": "Azure.ResourceManager.Chaos", + "crossLanguageDefinitionId": "Microsoft.Chaos.ContinuousAction", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Model that represents a continuous action.", + "discriminatorValue": "continuous", + "decorators": [], + "baseModel": { + "$ref": "403" + }, + "properties": [ + { + "$id": "413", + "kind": "property", + "name": "duration", + "serializedName": "duration", + "doc": "ISO8601 formatted string that represents a duration.", + "type": { + "$id": "414", + "kind": "duration", + "name": "duration", + "encode": "ISO8601", + "wireType": { + "$id": "415", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.duration", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ContinuousAction.duration", + "serializationOptions": { + "$id": "416", + "json": { + "$id": "417", + "name": "duration" + } + } + }, + { + "$id": "418", + "kind": "property", + "name": "parameters", + "serializedName": "parameters", + "doc": "List of key value pairs.", + "type": { + "$id": "419", + "kind": "array", + "name": "ArrayKeyValuePair", + "valueType": { + "$id": "420", + "kind": "model", + "name": "ChaosKeyValuePair", + "namespace": "Azure.ResourceManager.Chaos", + "crossLanguageDefinitionId": "Microsoft.Chaos.KeyValuePair", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "A map to describe the settings of an action.", + "decorators": [], + "properties": [ + { + "$id": "421", + "kind": "property", + "name": "key", + "serializedName": "key", + "doc": "The name of the setting for the action.", + "type": { + "$id": "422", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.KeyValuePair.key", + "serializationOptions": { + "$id": "423", + "json": { + "$id": "424", + "name": "key" + } + } + }, + { + "$id": "425", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The value of the setting for the action.", + "type": { + "$id": "426", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.KeyValuePair.value", + "serializationOptions": { + "$id": "427", + "json": { + "$id": "428", + "name": "value" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ContinuousAction.parameters", + "serializationOptions": { + "$id": "429", + "json": { + "$id": "430", + "name": "parameters" + } + } + }, + { + "$id": "431", + "kind": "property", + "name": "selectorId", + "serializedName": "selectorId", + "doc": "String that represents a selector.", + "type": { + "$id": "432", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ContinuousAction.selectorId", + "serializationOptions": { + "$id": "433", + "json": { + "$id": "434", + "name": "selectorId" + } + } + }, + { + "$id": "435", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "Enum that discriminates between action models.", + "type": { + "$id": "436", + "kind": "constant", + "valueType": { + "$id": "437", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "continuous", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ContinuousAction.type", + "serializationOptions": { + "$id": "438", + "json": { + "$id": "439", + "name": "type" + } + } + } + ] + }, + "delay": { + "$id": "440", + "kind": "model", + "name": "ChaosDelayAction", + "namespace": "Azure.ResourceManager.Chaos", + "crossLanguageDefinitionId": "Microsoft.Chaos.DelayAction", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Model that represents a delay action.", + "discriminatorValue": "delay", + "decorators": [], + "baseModel": { + "$ref": "403" + }, + "properties": [ + { + "$id": "441", + "kind": "property", + "name": "duration", + "serializedName": "duration", + "doc": "ISO8601 formatted string that represents a duration.", + "type": { + "$id": "442", + "kind": "duration", + "name": "duration", + "encode": "ISO8601", + "wireType": { + "$id": "443", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.duration", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.DelayAction.duration", + "serializationOptions": { + "$id": "444", + "json": { + "$id": "445", + "name": "duration" + } + } + }, + { + "$id": "446", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "Enum that discriminates between action models.", + "type": { + "$id": "447", + "kind": "constant", + "valueType": { + "$id": "448", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "delay", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.DelayAction.type", + "serializationOptions": { + "$id": "449", + "json": { + "$id": "450", + "name": "type" + } + } + } + ] + }, + "discrete": { + "$id": "451", + "kind": "model", + "name": "ChaosDiscreteAction", + "namespace": "Azure.ResourceManager.Chaos", + "crossLanguageDefinitionId": "Microsoft.Chaos.DiscreteAction", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Model that represents a discrete action.", + "discriminatorValue": "discrete", + "decorators": [], + "baseModel": { + "$ref": "403" + }, + "properties": [ + { + "$id": "452", + "kind": "property", + "name": "parameters", + "serializedName": "parameters", + "doc": "List of key value pairs.", + "type": { + "$id": "453", + "kind": "array", + "name": "ArrayKeyValuePair", + "valueType": { + "$ref": "420" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.DiscreteAction.parameters", + "serializationOptions": { + "$id": "454", + "json": { + "$id": "455", + "name": "parameters" + } + } + }, + { + "$id": "456", + "kind": "property", + "name": "selectorId", + "serializedName": "selectorId", + "doc": "String that represents a selector.", + "type": { + "$id": "457", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.DiscreteAction.selectorId", + "serializationOptions": { + "$id": "458", + "json": { + "$id": "459", + "name": "selectorId" + } + } + }, + { + "$id": "460", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "Enum that discriminates between action models.", + "type": { + "$id": "461", + "kind": "constant", + "valueType": { + "$id": "462", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "discrete", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.DiscreteAction.type", + "serializationOptions": { + "$id": "463", + "json": { + "$id": "464", + "name": "type" + } + } + } + ] + } + } + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ChaosExperimentBranch.actions", + "serializationOptions": { + "$id": "465", + "json": { + "$id": "466", + "name": "actions" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ChaosExperimentStep.branches", + "serializationOptions": { + "$id": "467", + "json": { + "$id": "468", + "name": "branches" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ExperimentProperties.steps", + "serializationOptions": { + "$id": "469", + "json": { + "$id": "470", + "name": "steps" + } + } + }, + { + "$id": "471", + "kind": "property", + "name": "selectors", + "serializedName": "selectors", + "doc": "List of selectors.", + "type": { + "$id": "472", + "kind": "array", + "name": "ArrayChaosTargetSelector", + "valueType": { + "$id": "473", + "kind": "model", + "name": "ChaosTargetSelector", + "namespace": "Azure.ResourceManager.Chaos", + "crossLanguageDefinitionId": "Microsoft.Chaos.ChaosTargetSelector", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Model that represents a selector in the Experiment resource.", + "decorators": [], + "discriminatorProperty": { + "$id": "474", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "Chaos target selector discriminator type", + "type": { + "$ref": "56" + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ChaosTargetSelector.type", + "serializationOptions": { + "$id": "475", + "json": { + "$id": "476", + "name": "type" + } + } + }, + "properties": [ + { + "$id": "477", + "kind": "property", + "name": "id", + "serializedName": "id", + "doc": "String of the selector ID.", + "type": { + "$id": "478", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ChaosTargetSelector.id", + "serializationOptions": { + "$id": "479", + "json": { + "$id": "480", + "name": "id" + } + } + }, + { + "$ref": "474" + }, + { + "$id": "481", + "kind": "property", + "name": "filter", + "serializedName": "filter", + "doc": "Model that represents available filter types that can be applied to a targets list.", + "type": { + "$id": "482", + "kind": "model", + "name": "ChaosTargetFilter", + "namespace": "Azure.ResourceManager.Chaos", + "crossLanguageDefinitionId": "Microsoft.Chaos.ChaosTargetFilter", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Model that represents available filter types that can be applied to a targets list.", + "decorators": [], + "discriminatorProperty": { + "$id": "483", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "Chaos target filter discriminator type", + "type": { + "$ref": "62" + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ChaosTargetFilter.type", + "serializationOptions": { + "$id": "484", + "json": { + "$id": "485", + "name": "type" + } + } + }, + "properties": [ + { + "$ref": "483" + } + ], + "discriminatedSubtypes": { + "$id": "486", + "Simple": { + "$id": "487", + "kind": "model", + "name": "ChaosTargetSimpleFilter", + "namespace": "Azure.ResourceManager.Chaos", + "crossLanguageDefinitionId": "Microsoft.Chaos.ChaosTargetSimpleFilter", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Model that represents a simple target filter.", + "discriminatorValue": "Simple", + "decorators": [], + "baseModel": { + "$ref": "482" + }, + "properties": [ + { + "$id": "488", + "kind": "property", + "name": "parameters", + "serializedName": "parameters", + "doc": "Model that represents the Simple filter parameters.", + "type": { + "$id": "489", + "kind": "model", + "name": "ChaosTargetSimpleFilterParameters", + "namespace": "Azure.ResourceManager.Chaos", + "crossLanguageDefinitionId": "Microsoft.Chaos.ChaosTargetSimpleFilterParameters", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Model that represents the Simple filter parameters.", + "decorators": [], + "properties": [ + { + "$id": "490", + "kind": "property", + "name": "zones", + "serializedName": "zones", + "doc": "List of Azure availability zones to filter targets by.", + "type": { + "$id": "491", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "492", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ChaosTargetSimpleFilterParameters.zones", + "serializationOptions": { + "$id": "493", + "json": { + "$id": "494", + "name": "zones" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ChaosTargetSimpleFilter.parameters", + "serializationOptions": { + "$id": "495", + "json": { + "$id": "496", + "name": "parameters" + } + } + }, + { + "$id": "497", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "Enum that discriminates between filter types. Currently only `Simple` type is supported.", + "type": { + "$id": "498", + "kind": "constant", + "valueType": { + "$id": "499", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "Simple", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ChaosTargetSimpleFilter.type", + "serializationOptions": { + "$id": "500", + "json": { + "$id": "501", + "name": "type" + } + } + } + ] + } + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ChaosTargetSelector.filter", + "serializationOptions": { + "$id": "502", + "json": { + "$id": "503", + "name": "filter" + } + } + } + ], + "discriminatedSubtypes": { + "$id": "504", + "List": { + "$id": "505", + "kind": "model", + "name": "ChaosTargetListSelector", + "namespace": "Azure.ResourceManager.Chaos", + "crossLanguageDefinitionId": "Microsoft.Chaos.ChaosTargetListSelector", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Model that represents a list selector.", + "discriminatorValue": "List", + "decorators": [], + "baseModel": { + "$ref": "473" + }, + "properties": [ + { + "$id": "506", + "kind": "property", + "name": "targets", + "serializedName": "targets", + "doc": "List of Target references.", + "type": { + "$id": "507", + "kind": "array", + "name": "ArrayTargetReference", + "valueType": { + "$id": "508", + "kind": "model", + "name": "ChaosTargetReference", + "namespace": "Azure.ResourceManager.Chaos", + "crossLanguageDefinitionId": "Microsoft.Chaos.TargetReference", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Model that represents a reference to a Target in the selector.", + "decorators": [], + "properties": [ + { + "$id": "509", + "kind": "property", + "name": "ReferenceType", + "serializedName": "type", + "doc": "Enum of the Target reference type.", + "type": { + "$ref": "66" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.TargetReference.type", + "serializationOptions": { + "$id": "510", + "json": { + "$id": "511", + "name": "type" + } + } + }, + { + "$id": "512", + "kind": "property", + "name": "id", + "serializedName": "id", + "doc": "String of the resource ID of a Target resource.", + "type": { + "$id": "513", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "514", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.TargetReference.id", + "serializationOptions": { + "$id": "515", + "json": { + "$id": "516", + "name": "id" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ChaosTargetListSelector.targets", + "serializationOptions": { + "$id": "517", + "json": { + "$id": "518", + "name": "targets" + } + } + }, + { + "$id": "519", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "Enum of the selector type.", + "type": { + "$id": "520", + "kind": "constant", + "valueType": { + "$id": "521", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "List", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ChaosTargetListSelector.type", + "serializationOptions": { + "$id": "522", + "json": { + "$id": "523", + "name": "type" + } + } + } + ] + }, + "Query": { + "$id": "524", + "kind": "model", + "name": "ChaosTargetQuerySelector", + "namespace": "Azure.ResourceManager.Chaos", + "crossLanguageDefinitionId": "Microsoft.Chaos.ChaosTargetQuerySelector", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Model that represents a query selector.", + "discriminatorValue": "Query", + "decorators": [], + "baseModel": { + "$ref": "473" + }, + "properties": [ + { + "$id": "525", + "kind": "property", + "name": "queryString", + "serializedName": "queryString", + "doc": "Azure Resource Graph (ARG) Query Language query for target resources.", + "type": { + "$id": "526", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ChaosTargetQuerySelector.queryString", + "serializationOptions": { + "$id": "527", + "json": { + "$id": "528", + "name": "queryString" + } + } + }, + { + "$id": "529", + "kind": "property", + "name": "subscriptionIds", + "serializedName": "subscriptionIds", + "doc": "Subscription id list to scope resource query.", + "type": { + "$id": "530", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "531", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ChaosTargetQuerySelector.subscriptionIds", + "serializationOptions": { + "$id": "532", + "json": { + "$id": "533", + "name": "subscriptionIds" + } + } + }, + { + "$id": "534", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "Enum of the selector type.", + "type": { + "$id": "535", + "kind": "constant", + "valueType": { + "$id": "536", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "Query", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ChaosTargetQuerySelector.type", + "serializationOptions": { + "$id": "537", + "json": { + "$id": "538", + "name": "type" + } + } + } + ] + } + } + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ExperimentProperties.selectors", + "serializationOptions": { + "$id": "539", + "json": { + "$id": "540", + "name": "selectors" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": true, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.Experiment.properties", + "serializationOptions": { + "$id": "541", + "json": { + "$id": "542", + "name": "properties" + } + } + } + ] + }, + { + "$ref": "349" + }, + { + "$ref": "367" + }, + { + "$ref": "383" + }, + { + "$ref": "389" + }, + { + "$ref": "396" + }, + { + "$ref": "403" + }, + { + "$ref": "412" + }, + { + "$ref": "420" + }, + { + "$ref": "440" + }, + { + "$ref": "451" + }, + { + "$ref": "473" + }, + { + "$ref": "482" + }, + { + "$ref": "487" + }, + { + "$ref": "489" + }, + { + "$ref": "505" + }, + { + "$ref": "508" + }, + { + "$ref": "524" + }, + { + "$ref": "335" + }, + { + "$id": "543", + "kind": "model", + "name": "ArmOperationStatusResourceProvisioningState", + "namespace": "Azure.ResourceManager.Chaos", + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus", + "usage": "LroPolling", + "doc": "Standard Azure Resource Manager operation status response", + "decorators": [], + "properties": [ + { + "$id": "544", + "kind": "property", + "name": "status", + "serializedName": "status", + "doc": "The operation status", + "type": { + "$ref": "70" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.status", + "serializationOptions": { + "$id": "545", + "json": { + "$id": "546", + "name": "status" + } + } + }, + { + "$id": "547", + "kind": "path", + "name": "id", + "serializedName": "id", + "doc": "The unique identifier for the operationStatus resource", + "type": { + "$id": "548", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.id", + "discriminator": false, + "flatten": false + }, + { + "$id": "549", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the operationStatus resource", + "type": { + "$id": "550", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.name", + "serializationOptions": { + "$id": "551", + "json": { + "$id": "552", + "name": "name" + } + } + }, + { + "$id": "553", + "kind": "property", + "name": "startTime", + "serializedName": "startTime", + "doc": "Operation start time", + "type": { + "$id": "554", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "555", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.startTime", + "serializationOptions": { + "$id": "556", + "json": { + "$id": "557", + "name": "startTime" + } + } + }, + { + "$id": "558", + "kind": "property", + "name": "endTime", + "serializedName": "endTime", + "doc": "Operation complete time", + "type": { + "$id": "559", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "560", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.endTime", + "serializationOptions": { + "$id": "561", + "json": { + "$id": "562", + "name": "endTime" + } + } + }, + { + "$id": "563", + "kind": "property", + "name": "percentComplete", + "serializedName": "percentComplete", + "doc": "The progress made toward completing the operation", + "type": { + "$id": "564", + "kind": "float64", + "name": "float64", + "crossLanguageDefinitionId": "TypeSpec.float64", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.percentComplete", + "serializationOptions": { + "$id": "565", + "json": { + "$id": "566", + "name": "percentComplete" + } + } + }, + { + "$id": "567", + "kind": "property", + "name": "error", + "serializedName": "error", + "doc": "Errors that occurred if the operation ended with Canceled or Failed status", + "type": { + "$ref": "155" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.error", + "serializationOptions": { + "$id": "568", + "json": { + "$id": "569", + "name": "error" + } + } + } + ] + }, + { + "$id": "570", + "kind": "model", + "name": "ExperimentUpdate", + "namespace": "Azure.ResourceManager.Chaos", + "crossLanguageDefinitionId": "Microsoft.Chaos.ExperimentUpdate", + "usage": "Input,Json", + "doc": "Describes an experiment update.", + "decorators": [], + "properties": [ + { + "$id": "571", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Resource tags.", + "type": { + "$id": "572", + "kind": "dict", + "keyType": { + "$id": "573", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "574", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ExperimentUpdate.tags", + "serializationOptions": { + "$id": "575", + "json": { + "$id": "576", + "name": "tags" + } + } + }, + { + "$id": "577", + "kind": "property", + "name": "identity", + "serializedName": "identity", + "doc": "The managed service identities assigned to this resource.", + "type": { + "$ref": "349" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ExperimentUpdate.identity", + "serializationOptions": { + "$id": "578", + "json": { + "$id": "579", + "name": "identity" + } + } + } + ] + }, + { + "$id": "580", + "kind": "model", + "name": "ExperimentListResult", + "namespace": "Azure.ResourceManager.Chaos", + "crossLanguageDefinitionId": "Microsoft.Chaos.ExperimentListResult", + "usage": "Output,Json", + "doc": "Model that represents a list of Experiment resources and a link for pagination.", + "decorators": [], + "properties": [ + { + "$id": "581", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The Experiment items on this page", + "type": { + "$id": "582", + "kind": "array", + "name": "ArrayExperiment", + "valueType": { + "$ref": "334" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ExperimentListResult.value", + "serializationOptions": { + "$id": "583", + "json": { + "$id": "584", + "name": "value" + } + } + }, + { + "$id": "585", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "586", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "587", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ExperimentListResult.nextLink", + "serializationOptions": { + "$id": "588", + "json": { + "$id": "589", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "590", + "kind": "model", + "name": "ChaosExperimentExecution", + "namespace": "Azure.ResourceManager.Chaos", + "crossLanguageDefinitionId": "Microsoft.Chaos.ExperimentExecution", + "usage": "Output,Json", + "doc": "Model that represents the execution of a Experiment.", + "decorators": [], + "baseModel": { + "$ref": "83" + }, + "properties": [ + { + "$id": "591", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The properties of experiment execution status.", + "type": { + "$id": "592", + "kind": "model", + "name": "ExperimentExecutionProperties", + "namespace": "Azure.ResourceManager.Chaos", + "crossLanguageDefinitionId": "Microsoft.Chaos.ExperimentExecutionProperties", + "usage": "Output,Json", + "doc": "Model that represents the execution properties of an Experiment.", + "decorators": [], + "properties": [ + { + "$id": "593", + "kind": "property", + "name": "status", + "serializedName": "status", + "doc": "The status of the execution.", + "type": { + "$id": "594", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ExperimentExecutionProperties.status", + "serializationOptions": { + "$id": "595", + "json": { + "$id": "596", + "name": "status" + } + } + }, + { + "$id": "597", + "kind": "property", + "name": "startedAt", + "serializedName": "startedAt", + "doc": "String that represents the start date time.", + "type": { + "$id": "598", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "599", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ExperimentExecutionProperties.startedAt", + "serializationOptions": { + "$id": "600", + "json": { + "$id": "601", + "name": "startedAt" + } + } + }, + { + "$id": "602", + "kind": "property", + "name": "stoppedAt", + "serializedName": "stoppedAt", + "doc": "String that represents the stop date time.", + "type": { + "$id": "603", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "604", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ExperimentExecutionProperties.stoppedAt", + "serializationOptions": { + "$id": "605", + "json": { + "$id": "606", + "name": "stoppedAt" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": true, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ExperimentExecution.properties", + "serializationOptions": { + "$id": "607", + "json": { + "$id": "608", + "name": "properties" + } + } + }, + { + "$id": "609", + "kind": "path", + "name": "name", + "serializedName": "name", + "doc": "GUID that represents a Experiment execution detail.", + "type": { + "$id": "610", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ExperimentExecution.name", + "discriminator": false, + "flatten": false + } + ] + }, + { + "$ref": "592" + }, + { + "$id": "611", + "kind": "model", + "name": "ExperimentExecutionListResult", + "namespace": "Azure.ResourceManager.Chaos", + "crossLanguageDefinitionId": "Microsoft.Chaos.ExperimentExecutionListResult", + "usage": "Output,Json", + "doc": "Model that represents a list of Experiment executions and a link for pagination.", + "decorators": [], + "properties": [ + { + "$id": "612", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The ExperimentExecution items on this page", + "type": { + "$id": "613", + "kind": "array", + "name": "ArrayExperimentExecution", + "valueType": { + "$ref": "590" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ExperimentExecutionListResult.value", + "serializationOptions": { + "$id": "614", + "json": { + "$id": "615", + "name": "value" + } + } + }, + { + "$id": "616", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "617", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "618", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ExperimentExecutionListResult.nextLink", + "serializationOptions": { + "$id": "619", + "json": { + "$id": "620", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "621", + "kind": "model", + "name": "ExperimentExecutionDetails", + "namespace": "Azure.ResourceManager.Chaos", + "crossLanguageDefinitionId": "Microsoft.Chaos.ExperimentExecutionDetails", + "usage": "Output,Json", + "doc": "Model that represents the execution details of an Experiment.", + "decorators": [], + "properties": [ + { + "$id": "622", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "String of the resource type.", + "type": { + "$id": "623", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ExperimentExecutionDetails.type", + "serializationOptions": { + "$id": "624", + "json": { + "$id": "625", + "name": "type" + } + } + }, + { + "$id": "626", + "kind": "property", + "name": "id", + "serializedName": "id", + "doc": "String of the fully qualified resource ID.", + "type": { + "$id": "627", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ExperimentExecutionDetails.id", + "serializationOptions": { + "$id": "628", + "json": { + "$id": "629", + "name": "id" + } + } + }, + { + "$id": "630", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "String of the resource name.", + "type": { + "$id": "631", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ExperimentExecutionDetails.name", + "serializationOptions": { + "$id": "632", + "json": { + "$id": "633", + "name": "name" + } + } + }, + { + "$id": "634", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The properties of the experiment execution details.", + "type": { + "$id": "635", + "kind": "model", + "name": "ExperimentExecutionDetailsProperties", + "namespace": "Azure.ResourceManager.Chaos", + "crossLanguageDefinitionId": "Microsoft.Chaos.ExperimentExecutionDetailsProperties", + "usage": "Output,Json", + "doc": "Model that represents the extended properties of an experiment execution.", + "decorators": [], + "properties": [ + { + "$id": "636", + "kind": "property", + "name": "status", + "serializedName": "status", + "doc": "The status of the execution.", + "type": { + "$id": "637", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ExperimentExecutionDetailsProperties.status", + "serializationOptions": { + "$id": "638", + "json": { + "$id": "639", + "name": "status" + } + } + }, + { + "$id": "640", + "kind": "property", + "name": "startedAt", + "serializedName": "startedAt", + "doc": "String that represents the start date time.", + "type": { + "$id": "641", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "642", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ExperimentExecutionDetailsProperties.startedAt", + "serializationOptions": { + "$id": "643", + "json": { + "$id": "644", + "name": "startedAt" + } + } + }, + { + "$id": "645", + "kind": "property", + "name": "stoppedAt", + "serializedName": "stoppedAt", + "doc": "String that represents the stop date time.", + "type": { + "$id": "646", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "647", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ExperimentExecutionDetailsProperties.stoppedAt", + "serializationOptions": { + "$id": "648", + "json": { + "$id": "649", + "name": "stoppedAt" + } + } + }, + { + "$id": "650", + "kind": "property", + "name": "failureReason", + "serializedName": "failureReason", + "doc": "The reason why the execution failed.", + "type": { + "$id": "651", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ExperimentExecutionDetailsProperties.failureReason", + "serializationOptions": { + "$id": "652", + "json": { + "$id": "653", + "name": "failureReason" + } + } + }, + { + "$id": "654", + "kind": "property", + "name": "lastActionAt", + "serializedName": "lastActionAt", + "doc": "String that represents the last action date time.", + "type": { + "$id": "655", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "656", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ExperimentExecutionDetailsProperties.lastActionAt", + "serializationOptions": { + "$id": "657", + "json": { + "$id": "658", + "name": "lastActionAt" + } + } + }, + { + "$id": "659", + "kind": "property", + "name": "runInformation", + "serializedName": "runInformation", + "doc": "The information of the experiment run.", + "type": { + "$id": "660", + "kind": "model", + "name": "ExperimentExecutionDetailsPropertiesRunInformation", + "namespace": "Azure.ResourceManager.Chaos", + "crossLanguageDefinitionId": "Microsoft.Chaos.ExperimentExecutionDetailsPropertiesRunInformation", + "usage": "Output,Json", + "doc": "The information of the experiment run.", + "decorators": [], + "properties": [ + { + "$id": "661", + "kind": "property", + "name": "steps", + "serializedName": "steps", + "doc": "The steps of the experiment run.", + "type": { + "$id": "662", + "kind": "array", + "name": "ArrayStepStatus", + "valueType": { + "$id": "663", + "kind": "model", + "name": "ChaosExperimentRunStepStatus", + "namespace": "Azure.ResourceManager.Chaos", + "crossLanguageDefinitionId": "Microsoft.Chaos.StepStatus", + "usage": "Output,Json", + "doc": "Model that represents the a list of branches and branch statuses.", + "decorators": [], + "properties": [ + { + "$id": "664", + "kind": "property", + "name": "stepName", + "serializedName": "stepName", + "doc": "The name of the step.", + "type": { + "$id": "665", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.StepStatus.stepName", + "serializationOptions": { + "$id": "666", + "json": { + "$id": "667", + "name": "stepName" + } + } + }, + { + "$id": "668", + "kind": "property", + "name": "stepId", + "serializedName": "stepId", + "doc": "The id of the step.", + "type": { + "$id": "669", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.StepStatus.stepId", + "serializationOptions": { + "$id": "670", + "json": { + "$id": "671", + "name": "stepId" + } + } + }, + { + "$id": "672", + "kind": "property", + "name": "status", + "serializedName": "status", + "doc": "The value of the status of the step.", + "type": { + "$id": "673", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.StepStatus.status", + "serializationOptions": { + "$id": "674", + "json": { + "$id": "675", + "name": "status" + } + } + }, + { + "$id": "676", + "kind": "property", + "name": "branches", + "serializedName": "branches", + "doc": "The array of branches.", + "type": { + "$id": "677", + "kind": "array", + "name": "ArrayBranchStatus", + "valueType": { + "$id": "678", + "kind": "model", + "name": "ChaosExperimentRunBranchStatus", + "namespace": "Azure.ResourceManager.Chaos", + "crossLanguageDefinitionId": "Microsoft.Chaos.BranchStatus", + "usage": "Output,Json", + "doc": "Model that represents the a list of actions and action statuses.", + "decorators": [], + "properties": [ + { + "$id": "679", + "kind": "property", + "name": "branchName", + "serializedName": "branchName", + "doc": "The name of the branch status.", + "type": { + "$id": "680", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.BranchStatus.branchName", + "serializationOptions": { + "$id": "681", + "json": { + "$id": "682", + "name": "branchName" + } + } + }, + { + "$id": "683", + "kind": "property", + "name": "branchId", + "serializedName": "branchId", + "doc": "The id of the branch status.", + "type": { + "$id": "684", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.BranchStatus.branchId", + "serializationOptions": { + "$id": "685", + "json": { + "$id": "686", + "name": "branchId" + } + } + }, + { + "$id": "687", + "kind": "property", + "name": "status", + "serializedName": "status", + "doc": "The status of the branch.", + "type": { + "$id": "688", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.BranchStatus.status", + "serializationOptions": { + "$id": "689", + "json": { + "$id": "690", + "name": "status" + } + } + }, + { + "$id": "691", + "kind": "property", + "name": "actions", + "serializedName": "actions", + "doc": "The array of actions.", + "type": { + "$id": "692", + "kind": "array", + "name": "ArrayActionStatus", + "valueType": { + "$id": "693", + "kind": "model", + "name": "ChaosExperimentRunActionStatus", + "namespace": "Azure.ResourceManager.Chaos", + "crossLanguageDefinitionId": "Microsoft.Chaos.ActionStatus", + "usage": "Output,Json", + "doc": "Model that represents the an action and its status.", + "decorators": [], + "properties": [ + { + "$id": "694", + "kind": "property", + "name": "actionName", + "serializedName": "actionName", + "doc": "The name of the action status.", + "type": { + "$id": "695", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ActionStatus.actionName", + "serializationOptions": { + "$id": "696", + "json": { + "$id": "697", + "name": "actionName" + } + } + }, + { + "$id": "698", + "kind": "property", + "name": "actionId", + "serializedName": "actionId", + "doc": "The id of the action status.", + "type": { + "$id": "699", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ActionStatus.actionId", + "serializationOptions": { + "$id": "700", + "json": { + "$id": "701", + "name": "actionId" + } + } + }, + { + "$id": "702", + "kind": "property", + "name": "status", + "serializedName": "status", + "doc": "The status of the action.", + "type": { + "$id": "703", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ActionStatus.status", + "serializationOptions": { + "$id": "704", + "json": { + "$id": "705", + "name": "status" + } + } + }, + { + "$id": "706", + "kind": "property", + "name": "startTime", + "serializedName": "startTime", + "doc": "String that represents the start time of the action.", + "type": { + "$id": "707", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "708", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ActionStatus.startTime", + "serializationOptions": { + "$id": "709", + "json": { + "$id": "710", + "name": "startTime" + } + } + }, + { + "$id": "711", + "kind": "property", + "name": "endTime", + "serializedName": "endTime", + "doc": "String that represents the end time of the action.", + "type": { + "$id": "712", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "713", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ActionStatus.endTime", + "serializationOptions": { + "$id": "714", + "json": { + "$id": "715", + "name": "endTime" + } + } + }, + { + "$id": "716", + "kind": "property", + "name": "targets", + "serializedName": "targets", + "doc": "The array of targets.", + "type": { + "$id": "717", + "kind": "array", + "name": "ArrayExperimentExecutionActionTargetDetailsProperties", + "valueType": { + "$id": "718", + "kind": "model", + "name": "ExperimentExecutionActionTargetDetailsProperties", + "namespace": "Azure.ResourceManager.Chaos", + "crossLanguageDefinitionId": "Microsoft.Chaos.ExperimentExecutionActionTargetDetailsProperties", + "usage": "Output,Json", + "doc": "Model that represents the Experiment action target details properties model.", + "decorators": [], + "properties": [ + { + "$id": "719", + "kind": "property", + "name": "status", + "serializedName": "status", + "doc": "The status of the execution.", + "type": { + "$id": "720", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ExperimentExecutionActionTargetDetailsProperties.status", + "serializationOptions": { + "$id": "721", + "json": { + "$id": "722", + "name": "status" + } + } + }, + { + "$id": "723", + "kind": "property", + "name": "target", + "serializedName": "target", + "doc": "The target for the action.", + "type": { + "$id": "724", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ExperimentExecutionActionTargetDetailsProperties.target", + "serializationOptions": { + "$id": "725", + "json": { + "$id": "726", + "name": "target" + } + } + }, + { + "$id": "727", + "kind": "property", + "name": "targetFailedTime", + "serializedName": "targetFailedTime", + "doc": "String that represents the failed date time.", + "type": { + "$id": "728", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "729", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ExperimentExecutionActionTargetDetailsProperties.targetFailedTime", + "serializationOptions": { + "$id": "730", + "json": { + "$id": "731", + "name": "targetFailedTime" + } + } + }, + { + "$id": "732", + "kind": "property", + "name": "targetCompletedTime", + "serializedName": "targetCompletedTime", + "doc": "String that represents the completed date time.", + "type": { + "$id": "733", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "734", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ExperimentExecutionActionTargetDetailsProperties.targetCompletedTime", + "serializationOptions": { + "$id": "735", + "json": { + "$id": "736", + "name": "targetCompletedTime" + } + } + }, + { + "$id": "737", + "kind": "property", + "name": "error", + "serializedName": "error", + "doc": "The error of the action.", + "type": { + "$id": "738", + "kind": "model", + "name": "ExperimentExecutionActionTargetDetailsError", + "namespace": "Azure.ResourceManager.Chaos", + "crossLanguageDefinitionId": "Microsoft.Chaos.ExperimentExecutionActionTargetDetailsError", + "usage": "Output,Json", + "doc": "Model that represents the Experiment action target details error model.", + "decorators": [], + "properties": [ + { + "$id": "739", + "kind": "property", + "name": "code", + "serializedName": "code", + "doc": "The error code.", + "type": { + "$id": "740", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ExperimentExecutionActionTargetDetailsError.code", + "serializationOptions": { + "$id": "741", + "json": { + "$id": "742", + "name": "code" + } + } + }, + { + "$id": "743", + "kind": "property", + "name": "message", + "serializedName": "message", + "doc": "The error message", + "type": { + "$id": "744", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ExperimentExecutionActionTargetDetailsError.message", + "serializationOptions": { + "$id": "745", + "json": { + "$id": "746", + "name": "message" + } + } + } + ] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ExperimentExecutionActionTargetDetailsProperties.error", + "serializationOptions": { + "$id": "747", + "json": { + "$id": "748", + "name": "error" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ActionStatus.targets", + "serializationOptions": { + "$id": "749", + "json": { + "$id": "750", + "name": "targets" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.BranchStatus.actions", + "serializationOptions": { + "$id": "751", + "json": { + "$id": "752", + "name": "actions" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.StepStatus.branches", + "serializationOptions": { + "$id": "753", + "json": { + "$id": "754", + "name": "branches" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ExperimentExecutionDetailsPropertiesRunInformation.steps", + "serializationOptions": { + "$id": "755", + "json": { + "$id": "756", + "name": "steps" + } + } + } + ] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ExperimentExecutionDetailsProperties.runInformation", + "serializationOptions": { + "$id": "757", + "json": { + "$id": "758", + "name": "runInformation" + } + } + } + ] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": true, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.ExperimentExecutionDetails.properties", + "serializationOptions": { + "$id": "759", + "json": { + "$id": "760", + "name": "properties" + } + } + } + ] + }, + { + "$ref": "635" + }, + { + "$ref": "660" + }, + { + "$ref": "663" + }, + { + "$ref": "678" + }, + { + "$ref": "693" + }, + { + "$ref": "718" + }, + { + "$ref": "738" + }, + { + "$id": "761", + "kind": "model", + "name": "ChaosTargetMetadata", + "namespace": "Azure.ResourceManager.Chaos", + "crossLanguageDefinitionId": "Microsoft.Chaos.TargetType", + "usage": "Output,Json", + "doc": "Model that represents a Target Type resource.", + "decorators": [], + "baseModel": { + "$ref": "83" + }, + "properties": [ + { + "$id": "762", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The properties of the target type resource.", + "type": { + "$id": "763", + "kind": "model", + "name": "TargetTypeProperties", + "namespace": "Azure.ResourceManager.Chaos", + "crossLanguageDefinitionId": "Microsoft.Chaos.TargetTypeProperties", + "usage": "Output,Json", + "doc": "Model that represents the base Target Type properties model.", + "decorators": [], + "properties": [ + { + "$id": "764", + "kind": "property", + "name": "displayName", + "serializedName": "displayName", + "doc": "Localized string of the display name.", + "type": { + "$id": "765", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.TargetTypeProperties.displayName", + "serializationOptions": { + "$id": "766", + "json": { + "$id": "767", + "name": "displayName" + } + } + }, + { + "$id": "768", + "kind": "property", + "name": "description", + "serializedName": "description", + "doc": "Localized string of the description.", + "type": { + "$id": "769", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.TargetTypeProperties.description", + "serializationOptions": { + "$id": "770", + "json": { + "$id": "771", + "name": "description" + } + } + }, + { + "$id": "772", + "kind": "property", + "name": "propertiesSchema", + "serializedName": "propertiesSchema", + "doc": "URL to retrieve JSON schema of the Target Type properties.", + "type": { + "$id": "773", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.TargetTypeProperties.propertiesSchema", + "serializationOptions": { + "$id": "774", + "json": { + "$id": "775", + "name": "propertiesSchema" + } + } + }, + { + "$id": "776", + "kind": "property", + "name": "resourceTypes", + "serializedName": "resourceTypes", + "doc": "List of resource types this Target Type can extend.", + "type": { + "$id": "777", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "778", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.TargetTypeProperties.resourceTypes", + "serializationOptions": { + "$id": "779", + "json": { + "$id": "780", + "name": "resourceTypes" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": true, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.TargetType.properties", + "serializationOptions": { + "$id": "781", + "json": { + "$id": "782", + "name": "properties" + } + } + }, + { + "$id": "783", + "kind": "path", + "name": "name", + "serializedName": "name", + "doc": "String that represents a Target Type resource name.", + "type": { + "$id": "784", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.TargetType.name", + "discriminator": false, + "flatten": false + } + ] + }, + { + "$ref": "763" + }, + { + "$id": "785", + "kind": "model", + "name": "TargetTypeListResult", + "namespace": "Azure.ResourceManager.Chaos", + "crossLanguageDefinitionId": "Microsoft.Chaos.TargetTypeListResult", + "usage": "Output,Json", + "doc": "Model that represents a list of Target Type resources and a link for pagination.", + "decorators": [], + "properties": [ + { + "$id": "786", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The TargetType items on this page", + "type": { + "$id": "787", + "kind": "array", + "name": "ArrayTargetType", + "valueType": { + "$ref": "761" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.TargetTypeListResult.value", + "serializationOptions": { + "$id": "788", + "json": { + "$id": "789", + "name": "value" + } + } + }, + { + "$id": "790", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "791", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "792", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.TargetTypeListResult.nextLink", + "serializationOptions": { + "$id": "793", + "json": { + "$id": "794", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "795", + "kind": "model", + "name": "OperationStatusResult", + "namespace": "Azure.ResourceManager.Chaos", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationStatusResult", + "usage": "Output,Json", + "doc": "The current status of an async operation.", + "decorators": [], + "properties": [ + { + "$id": "796", + "kind": "property", + "name": "id", + "serializedName": "id", + "doc": "Fully qualified ID for the async operation.", + "type": { + "$id": "797", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "798", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationStatusResult.id", + "serializationOptions": { + "$id": "799", + "json": { + "$id": "800", + "name": "id" + } + } + }, + { + "$id": "801", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "Name of the async operation.", + "type": { + "$id": "802", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationStatusResult.name", + "serializationOptions": { + "$id": "803", + "json": { + "$id": "804", + "name": "name" + } + } + }, + { + "$id": "805", + "kind": "property", + "name": "status", + "serializedName": "status", + "doc": "Operation status.", + "type": { + "$id": "806", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationStatusResult.status", + "serializationOptions": { + "$id": "807", + "json": { + "$id": "808", + "name": "status" + } + } + }, + { + "$id": "809", + "kind": "property", + "name": "percentComplete", + "serializedName": "percentComplete", + "doc": "Percent of the operation that is complete.", + "type": { + "$id": "810", + "kind": "float64", + "name": "float64", + "crossLanguageDefinitionId": "TypeSpec.float64", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationStatusResult.percentComplete", + "serializationOptions": { + "$id": "811", + "json": { + "$id": "812", + "name": "percentComplete" + } + } + }, + { + "$id": "813", + "kind": "property", + "name": "startTime", + "serializedName": "startTime", + "doc": "The start time of the operation.", + "type": { + "$id": "814", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "815", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationStatusResult.startTime", + "serializationOptions": { + "$id": "816", + "json": { + "$id": "817", + "name": "startTime" + } + } + }, + { + "$id": "818", + "kind": "property", + "name": "endTime", + "serializedName": "endTime", + "doc": "The end time of the operation.", + "type": { + "$id": "819", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "820", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationStatusResult.endTime", + "serializationOptions": { + "$id": "821", + "json": { + "$id": "822", + "name": "endTime" + } + } + }, + { + "$id": "823", + "kind": "property", + "name": "operations", + "serializedName": "operations", + "doc": "The operations list.", + "type": { + "$id": "824", + "kind": "array", + "name": "ArrayOperationStatusResult", + "valueType": { + "$ref": "795" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationStatusResult.operations", + "serializationOptions": { + "$id": "825", + "json": { + "$id": "826", + "name": "operations" + } + } + }, + { + "$id": "827", + "kind": "property", + "name": "error", + "serializedName": "error", + "doc": "If present, details of the operation error.", + "type": { + "$ref": "155" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationStatusResult.error", + "serializationOptions": { + "$id": "828", + "json": { + "$id": "829", + "name": "error" + } + } + }, + { + "$id": "830", + "kind": "property", + "name": "resourceId", + "serializedName": "resourceId", + "doc": "Fully qualified ID of the resource against which the original async operation was started.", + "type": { + "$id": "831", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationStatusResult.resourceId", + "serializationOptions": { + "$id": "832", + "json": { + "$id": "833", + "name": "resourceId" + } + } + } + ] + } + ], + "clients": [ + { + "$id": "834", + "kind": "client", + "name": "ChaosClient", + "namespace": "Azure.ResourceManager.Chaos", + "doc": "Chaos Management Client", + "methods": [], + "parameters": [ + { + "$id": "835", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "836", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "location": "Uri", + "isApiVersion": false, + "isContentType": false, + "isRequired": true, + "isEndpoint": true, + "skipUrlEncoding": false, + "explode": false, + "kind": "Client", + "defaultValue": { + "$id": "837", + "type": { + "$id": "838", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "839", + "name": "TypeSpec.@service", + "arguments": { + "$id": "840", + "options": { + "$id": "841", + "title": "ChaosManagementClient" + } + } + } + ], + "crossLanguageDefinitionId": "Microsoft.Chaos", + "apiVersions": [ + "2024-11-01-preview", + "2025-01-01" + ], + "children": [ + { + "$id": "842", + "kind": "client", + "name": "Capabilities", + "namespace": "Azure.ResourceManager.Chaos", + "methods": [ + { + "$id": "843", + "kind": "basic", + "name": "get", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-01-01" + ], + "doc": "Get a Capability resource that extends a Target resource.", + "operation": { + "$id": "844", + "name": "get", + "resourceName": "Capability", + "doc": "Get a Capability resource that extends a Target resource.", + "accessibility": "public", + "parameters": [ + { + "$id": "845", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "846", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "847", + "type": { + "$id": "848", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-01-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "849", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "850", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "851", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "852", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "853", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "854", + "name": "parentProviderNamespace", + "nameInRequest": "parentProviderNamespace", + "doc": "The parent resource provider namespace.", + "type": { + "$id": "855", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "856", + "name": "parentResourceType", + "nameInRequest": "parentResourceType", + "doc": "The parent resource type.", + "type": { + "$id": "857", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "858", + "name": "parentResourceName", + "nameInRequest": "parentResourceName", + "doc": "The parent resource name.", + "type": { + "$id": "859", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "860", + "name": "targetName", + "nameInRequest": "targetName", + "doc": "String that represents a Target resource name.", + "type": { + "$id": "861", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "862", + "name": "capabilityName", + "nameInRequest": "capabilityName", + "doc": "String that represents a Capability resource name.", + "type": { + "$id": "863", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "864", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "865", + "kind": "constant", + "valueType": { + "$id": "866", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "867", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "82" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName}/capabilities/{capabilityName}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.Chaos.Capabilities.get", + "decorators": [], + "examples": [ + { + "$id": "868", + "kind": "http", + "name": "Get a Capability that extends a virtual machine Target resource.", + "description": "Get a Capability that extends a virtual machine Target resource.", + "filePath": "2025-01-01/Capabilities_Get.json", + "parameters": [ + { + "$id": "869", + "parameter": { + "$ref": "845" + }, + "value": { + "$id": "870", + "kind": "string", + "type": { + "$ref": "846" + }, + "value": "2025-01-01" + } + }, + { + "$id": "871", + "parameter": { + "$ref": "862" + }, + "value": { + "$id": "872", + "kind": "string", + "type": { + "$ref": "863" + }, + "value": "Shutdown-1.0" + } + }, + { + "$id": "873", + "parameter": { + "$ref": "854" + }, + "value": { + "$id": "874", + "kind": "string", + "type": { + "$ref": "855" + }, + "value": "Microsoft.Compute" + } + }, + { + "$id": "875", + "parameter": { + "$ref": "858" + }, + "value": { + "$id": "876", + "kind": "string", + "type": { + "$ref": "859" + }, + "value": "exampleVM" + } + }, + { + "$id": "877", + "parameter": { + "$ref": "856" + }, + "value": { + "$id": "878", + "kind": "string", + "type": { + "$ref": "857" + }, + "value": "virtualMachines" + } + }, + { + "$id": "879", + "parameter": { + "$ref": "852" + }, + "value": { + "$id": "880", + "kind": "string", + "type": { + "$ref": "853" + }, + "value": "exampleRG" + } + }, + { + "$id": "881", + "parameter": { + "$ref": "849" + }, + "value": { + "$id": "882", + "kind": "string", + "type": { + "$ref": "850" + }, + "value": "6b052e15-03d3-4f17-b2e1-be7f07588291" + } + }, + { + "$id": "883", + "parameter": { + "$ref": "860" + }, + "value": { + "$id": "884", + "kind": "string", + "type": { + "$ref": "861" + }, + "value": "Microsoft-VirtualMachine" + } + } + ], + "responses": [ + { + "$id": "885", + "response": { + "$ref": "867" + }, + "statusCode": 200, + "bodyValue": { + "$id": "886", + "kind": "model", + "type": { + "$ref": "82" + }, + "value": { + "$id": "887", + "name": { + "$id": "888", + "kind": "string", + "type": { + "$ref": "91" + }, + "value": "Shutdown-1.0" + }, + "type": { + "$id": "889", + "kind": "string", + "type": { + "$ref": "95" + }, + "value": "Microsoft.Chaos/targets/capabilities" + }, + "id": { + "$id": "890", + "kind": "string", + "type": { + "$ref": "86" + }, + "value": "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Compute/virtualMachines/exampleVM/providers/Microsoft.Chaos/targets/Microsoft-VirtualMachine/capabilities/Shutdown-1.0" + }, + "properties": { + "$id": "891", + "kind": "model", + "type": { + "$ref": "128" + }, + "value": { + "$id": "892", + "description": { + "$id": "893", + "kind": "string", + "type": { + "$ref": "138" + }, + "value": "Shutdown an Azure Virtual Machine for a defined period of time." + }, + "parametersSchema": { + "$id": "894", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "https://schema.centralus.chaos-prod.azure.com/targets/Microsoft-VirtualMachine/capabilities/Shutdown-1.0.json" + }, + "publisher": { + "$id": "895", + "kind": "string", + "type": { + "$ref": "130" + }, + "value": "Microsoft" + }, + "targetType": { + "$id": "896", + "kind": "string", + "type": { + "$ref": "134" + }, + "value": "VirtualMachine" + }, + "urn": { + "$id": "897", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "urn:csci:microsoft:virtualMachine:shutdown/1.0" + } + } + }, + "systemData": { + "$id": "898", + "kind": "model", + "type": { + "$ref": "100" + }, + "value": { + "$id": "899", + "createdAt": { + "$id": "900", + "kind": "string", + "type": { + "$ref": "109" + }, + "value": "2020-05-14T05:08:38.4662189Z" + }, + "lastModifiedAt": { + "$id": "901", + "kind": "string", + "type": { + "$ref": "121" + }, + "value": "2020-05-14T05:08:38.4662189Z" + } + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "902", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "903", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "904", + "name": "parentProviderNamespace", + "nameInRequest": "parentProviderNamespace", + "doc": "The parent resource provider namespace.", + "type": { + "$id": "905", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "906", + "name": "parentResourceType", + "nameInRequest": "parentResourceType", + "doc": "The parent resource type.", + "type": { + "$id": "907", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "908", + "name": "parentResourceName", + "nameInRequest": "parentResourceName", + "doc": "The parent resource name.", + "type": { + "$id": "909", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "910", + "name": "targetName", + "nameInRequest": "targetName", + "doc": "String that represents a Target resource name.", + "type": { + "$id": "911", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "912", + "name": "capabilityName", + "nameInRequest": "capabilityName", + "doc": "String that represents a Capability resource name.", + "type": { + "$id": "913", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "914", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "865" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "915", + "type": { + "$ref": "82" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.Chaos.Capabilities.get" + }, + { + "$id": "916", + "kind": "basic", + "name": "createOrUpdate", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-01-01" + ], + "doc": "Create or update a Capability resource that extends a Target resource.", + "operation": { + "$id": "917", + "name": "createOrUpdate", + "resourceName": "Capability", + "doc": "Create or update a Capability resource that extends a Target resource.", + "accessibility": "public", + "parameters": [ + { + "$id": "918", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "919", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "920", + "type": { + "$id": "921", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-01-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "922", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "923", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "924", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "925", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "926", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "927", + "name": "parentProviderNamespace", + "nameInRequest": "parentProviderNamespace", + "doc": "The parent resource provider namespace.", + "type": { + "$id": "928", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "929", + "name": "parentResourceType", + "nameInRequest": "parentResourceType", + "doc": "The parent resource type.", + "type": { + "$id": "930", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "931", + "name": "parentResourceName", + "nameInRequest": "parentResourceName", + "doc": "The parent resource name.", + "type": { + "$id": "932", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "933", + "name": "targetName", + "nameInRequest": "targetName", + "doc": "String that represents a Target resource name.", + "type": { + "$id": "934", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "935", + "name": "capabilityName", + "nameInRequest": "capabilityName", + "doc": "String that represents a Capability resource name.", + "type": { + "$id": "936", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "937", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "938", + "kind": "constant", + "valueType": { + "$id": "939", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "940", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "941", + "kind": "constant", + "valueType": { + "$id": "942", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "943", + "name": "resource", + "nameInRequest": "resource", + "doc": "Capability resource to be created or updated.", + "type": { + "$ref": "82" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "944", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "82" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + { + "$id": "945", + "statusCodes": [ + 201 + ], + "bodyType": { + "$ref": "82" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "PUT", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName}/capabilities/{capabilityName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.Chaos.Capabilities.createOrUpdate", + "decorators": [], + "examples": [ + { + "$id": "946", + "kind": "http", + "name": "Create/update a Capability that extends a virtual machine Target resource.", + "description": "Create/update a Capability that extends a virtual machine Target resource.", + "filePath": "2025-01-01/Capabilities_CreateOrUpdate.json", + "parameters": [ + { + "$id": "947", + "parameter": { + "$ref": "918" + }, + "value": { + "$id": "948", + "kind": "string", + "type": { + "$ref": "919" + }, + "value": "2025-01-01" + } + }, + { + "$id": "949", + "parameter": { + "$ref": "943" + }, + "value": { + "$id": "950", + "kind": "model", + "type": { + "$ref": "82" + }, + "value": { + "$id": "951", + "properties": { + "$id": "952", + "kind": "model", + "type": { + "$ref": "128" + }, + "value": { + "$id": "953" + } + } + } + } + }, + { + "$id": "954", + "parameter": { + "$ref": "935" + }, + "value": { + "$id": "955", + "kind": "string", + "type": { + "$ref": "936" + }, + "value": "Shutdown-1.0" + } + }, + { + "$id": "956", + "parameter": { + "$ref": "927" + }, + "value": { + "$id": "957", + "kind": "string", + "type": { + "$ref": "928" + }, + "value": "Microsoft.Compute" + } + }, + { + "$id": "958", + "parameter": { + "$ref": "931" + }, + "value": { + "$id": "959", + "kind": "string", + "type": { + "$ref": "932" + }, + "value": "exampleVM" + } + }, + { + "$id": "960", + "parameter": { + "$ref": "929" + }, + "value": { + "$id": "961", + "kind": "string", + "type": { + "$ref": "930" + }, + "value": "virtualMachines" + } + }, + { + "$id": "962", + "parameter": { + "$ref": "925" + }, + "value": { + "$id": "963", + "kind": "string", + "type": { + "$ref": "926" + }, + "value": "exampleRG" + } + }, + { + "$id": "964", + "parameter": { + "$ref": "922" + }, + "value": { + "$id": "965", + "kind": "string", + "type": { + "$ref": "923" + }, + "value": "6b052e15-03d3-4f17-b2e1-be7f07588291" + } + }, + { + "$id": "966", + "parameter": { + "$ref": "933" + }, + "value": { + "$id": "967", + "kind": "string", + "type": { + "$ref": "934" + }, + "value": "Microsoft-VirtualMachine" + } + } + ], + "responses": [ + { + "$id": "968", + "response": { + "$ref": "944" + }, + "statusCode": 200, + "bodyValue": { + "$id": "969", + "kind": "model", + "type": { + "$ref": "82" + }, + "value": { + "$id": "970", + "name": { + "$id": "971", + "kind": "string", + "type": { + "$ref": "91" + }, + "value": "Shutdown-1.0" + }, + "type": { + "$id": "972", + "kind": "string", + "type": { + "$ref": "95" + }, + "value": "Microsoft.Chaos/targets/capabilities" + }, + "id": { + "$id": "973", + "kind": "string", + "type": { + "$ref": "86" + }, + "value": "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Compute/virtualMachines/exampleVM/providers/Microsoft.Chaos/targets/Microsoft-VirtualMachine/capabilities/Shutdown-1.0" + }, + "properties": { + "$id": "974", + "kind": "model", + "type": { + "$ref": "128" + }, + "value": { + "$id": "975", + "description": { + "$id": "976", + "kind": "string", + "type": { + "$ref": "138" + }, + "value": "Shutdown an Azure Virtual Machine for a defined period of time." + }, + "parametersSchema": { + "$id": "977", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "https://schema.centralus.chaos-prod.azure.com/targets/Microsoft-VirtualMachine/capabilities/Shutdown-1.0.json" + }, + "publisher": { + "$id": "978", + "kind": "string", + "type": { + "$ref": "130" + }, + "value": "Microsoft" + }, + "targetType": { + "$id": "979", + "kind": "string", + "type": { + "$ref": "134" + }, + "value": "VirtualMachine" + }, + "urn": { + "$id": "980", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "urn:csci:microsoft:virtualMachine:shutdown/1.0" + } + } + }, + "systemData": { + "$id": "981", + "kind": "model", + "type": { + "$ref": "100" + }, + "value": { + "$id": "982", + "createdAt": { + "$id": "983", + "kind": "string", + "type": { + "$ref": "109" + }, + "value": "2020-05-14T05:08:38.4662189Z" + }, + "lastModifiedAt": { + "$id": "984", + "kind": "string", + "type": { + "$ref": "121" + }, + "value": "2020-05-14T05:08:38.4662189Z" + } + } + } + } + } + }, + { + "$id": "985", + "response": { + "$ref": "945" + }, + "statusCode": 201, + "bodyValue": { + "$id": "986", + "kind": "model", + "type": { + "$ref": "82" + }, + "value": { + "$id": "987", + "name": { + "$id": "988", + "kind": "string", + "type": { + "$ref": "91" + }, + "value": "Shutdown-1.0" + }, + "type": { + "$id": "989", + "kind": "string", + "type": { + "$ref": "95" + }, + "value": "Microsoft.Chaos/targets/capabilities" + }, + "id": { + "$id": "990", + "kind": "string", + "type": { + "$ref": "86" + }, + "value": "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Compute/virtualMachines/exampleVM/providers/Microsoft.Chaos/targets/Microsoft-VirtualMachine/capabilities/Shutdown-1.0" + }, + "properties": { + "$id": "991", + "kind": "model", + "type": { + "$ref": "128" + }, + "value": { + "$id": "992", + "description": { + "$id": "993", + "kind": "string", + "type": { + "$ref": "138" + }, + "value": "Shutdown an Azure Virtual Machine for a defined period of time." + }, + "parametersSchema": { + "$id": "994", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "https://schema.centralus.chaos-prod.azure.com/targets/Microsoft-VirtualMachine/capabilities/Shutdown-1.0.json" + }, + "publisher": { + "$id": "995", + "kind": "string", + "type": { + "$ref": "130" + }, + "value": "Microsoft" + }, + "targetType": { + "$id": "996", + "kind": "string", + "type": { + "$ref": "134" + }, + "value": "VirtualMachine" + }, + "urn": { + "$id": "997", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "urn:csci:microsoft:virtualMachine:shutdown/1.0" + } + } + }, + "systemData": { + "$id": "998", + "kind": "model", + "type": { + "$ref": "100" + }, + "value": { + "$id": "999", + "createdAt": { + "$id": "1000", + "kind": "string", + "type": { + "$ref": "109" + }, + "value": "2020-05-14T05:08:38.4662189Z" + }, + "lastModifiedAt": { + "$id": "1001", + "kind": "string", + "type": { + "$ref": "121" + }, + "value": "2020-05-14T05:08:38.4662189Z" + } + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "1002", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1003", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1004", + "name": "parentProviderNamespace", + "nameInRequest": "parentProviderNamespace", + "doc": "The parent resource provider namespace.", + "type": { + "$id": "1005", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1006", + "name": "parentResourceType", + "nameInRequest": "parentResourceType", + "doc": "The parent resource type.", + "type": { + "$id": "1007", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1008", + "name": "parentResourceName", + "nameInRequest": "parentResourceName", + "doc": "The parent resource name.", + "type": { + "$id": "1009", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1010", + "name": "targetName", + "nameInRequest": "targetName", + "doc": "String that represents a Target resource name.", + "type": { + "$id": "1011", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1012", + "name": "capabilityName", + "nameInRequest": "capabilityName", + "doc": "String that represents a Capability resource name.", + "type": { + "$id": "1013", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1014", + "name": "resource", + "nameInRequest": "resource", + "doc": "Capability resource to be created or updated.", + "type": { + "$ref": "82" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1015", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$ref": "938" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1016", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "941" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "1017", + "type": { + "$ref": "82" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.Chaos.Capabilities.createOrUpdate" + }, + { + "$id": "1018", + "kind": "basic", + "name": "delete", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-01-01" + ], + "doc": "Delete a Capability that extends a Target resource.", + "operation": { + "$id": "1019", + "name": "delete", + "resourceName": "Capability", + "doc": "Delete a Capability that extends a Target resource.", + "accessibility": "public", + "parameters": [ + { + "$id": "1020", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1021", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1022", + "type": { + "$id": "1023", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-01-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1024", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1025", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1026", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1027", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1028", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1029", + "name": "parentProviderNamespace", + "nameInRequest": "parentProviderNamespace", + "doc": "The parent resource provider namespace.", + "type": { + "$id": "1030", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1031", + "name": "parentResourceType", + "nameInRequest": "parentResourceType", + "doc": "The parent resource type.", + "type": { + "$id": "1032", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1033", + "name": "parentResourceName", + "nameInRequest": "parentResourceName", + "doc": "The parent resource name.", + "type": { + "$id": "1034", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1035", + "name": "targetName", + "nameInRequest": "targetName", + "doc": "String that represents a Target resource name.", + "type": { + "$id": "1036", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1037", + "name": "capabilityName", + "nameInRequest": "capabilityName", + "doc": "String that represents a Capability resource name.", + "type": { + "$id": "1038", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1039", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1040", + "kind": "constant", + "valueType": { + "$id": "1041", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "1042", + "statusCodes": [ + 200 + ], + "headers": [], + "isErrorResponse": false + }, + { + "$id": "1043", + "statusCodes": [ + 204 + ], + "headers": [], + "isErrorResponse": false + } + ], + "httpMethod": "DELETE", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName}/capabilities/{capabilityName}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.Chaos.Capabilities.delete", + "decorators": [], + "examples": [ + { + "$id": "1044", + "kind": "http", + "name": "Delete a Capability that extends a virtual machine Target resource.", + "description": "Delete a Capability that extends a virtual machine Target resource.", + "filePath": "2025-01-01/Capabilities_Delete.json", + "parameters": [ + { + "$id": "1045", + "parameter": { + "$ref": "1020" + }, + "value": { + "$id": "1046", + "kind": "string", + "type": { + "$ref": "1021" + }, + "value": "2025-01-01" + } + }, + { + "$id": "1047", + "parameter": { + "$ref": "1037" + }, + "value": { + "$id": "1048", + "kind": "string", + "type": { + "$ref": "1038" + }, + "value": "Shutdown-1.0" + } + }, + { + "$id": "1049", + "parameter": { + "$ref": "1029" + }, + "value": { + "$id": "1050", + "kind": "string", + "type": { + "$ref": "1030" + }, + "value": "Microsoft.Compute" + } + }, + { + "$id": "1051", + "parameter": { + "$ref": "1033" + }, + "value": { + "$id": "1052", + "kind": "string", + "type": { + "$ref": "1034" + }, + "value": "exampleVM" + } + }, + { + "$id": "1053", + "parameter": { + "$ref": "1031" + }, + "value": { + "$id": "1054", + "kind": "string", + "type": { + "$ref": "1032" + }, + "value": "virtualMachines" + } + }, + { + "$id": "1055", + "parameter": { + "$ref": "1027" + }, + "value": { + "$id": "1056", + "kind": "string", + "type": { + "$ref": "1028" + }, + "value": "exampleRG" + } + }, + { + "$id": "1057", + "parameter": { + "$ref": "1024" + }, + "value": { + "$id": "1058", + "kind": "string", + "type": { + "$ref": "1025" + }, + "value": "6b052e15-03d3-4f17-b2e1-be7f07588291" + } + }, + { + "$id": "1059", + "parameter": { + "$ref": "1035" + }, + "value": { + "$id": "1060", + "kind": "string", + "type": { + "$ref": "1036" + }, + "value": "Microsoft-VirtualMachine" + } + } + ], + "responses": [ + { + "$id": "1061", + "response": { + "$ref": "1042" + }, + "statusCode": 200 + }, + { + "$id": "1062", + "response": { + "$ref": "1043" + }, + "statusCode": 204 + } + ] + } + ] + }, + "parameters": [ + { + "$id": "1063", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1064", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1065", + "name": "parentProviderNamespace", + "nameInRequest": "parentProviderNamespace", + "doc": "The parent resource provider namespace.", + "type": { + "$id": "1066", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1067", + "name": "parentResourceType", + "nameInRequest": "parentResourceType", + "doc": "The parent resource type.", + "type": { + "$id": "1068", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1069", + "name": "parentResourceName", + "nameInRequest": "parentResourceName", + "doc": "The parent resource name.", + "type": { + "$id": "1070", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1071", + "name": "targetName", + "nameInRequest": "targetName", + "doc": "String that represents a Target resource name.", + "type": { + "$id": "1072", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1073", + "name": "capabilityName", + "nameInRequest": "capabilityName", + "doc": "String that represents a Capability resource name.", + "type": { + "$id": "1074", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1075", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "1040" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "1076" + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.Chaos.Capabilities.delete" + }, + { + "$id": "1077", + "kind": "paging", + "name": "list", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-01-01" + ], + "doc": "Get a list of Capability resources that extend a Target resource.", + "operation": { + "$id": "1078", + "name": "list", + "resourceName": "Capability", + "doc": "Get a list of Capability resources that extend a Target resource.", + "accessibility": "public", + "parameters": [ + { + "$id": "1079", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1080", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1081", + "type": { + "$id": "1082", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-01-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1083", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1084", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1085", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1086", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1087", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1088", + "name": "parentProviderNamespace", + "nameInRequest": "parentProviderNamespace", + "doc": "The parent resource provider namespace.", + "type": { + "$id": "1089", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1090", + "name": "parentResourceType", + "nameInRequest": "parentResourceType", + "doc": "The parent resource type.", + "type": { + "$id": "1091", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1092", + "name": "parentResourceName", + "nameInRequest": "parentResourceName", + "doc": "The parent resource name.", + "type": { + "$id": "1093", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1094", + "name": "continuationToken", + "nameInRequest": "continuationToken", + "doc": "String that sets the continuation token.", + "type": { + "$id": "1095", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": false, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1096", + "name": "targetName", + "nameInRequest": "targetName", + "doc": "String that represents a Target resource name.", + "type": { + "$id": "1097", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1098", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1099", + "kind": "constant", + "valueType": { + "$id": "1100", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "1101", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "187" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName}/capabilities", + "bufferResponse": true, + "paging": { + "$id": "1102", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "1103", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.Chaos.Capabilities.list", + "decorators": [], + "examples": [ + { + "$id": "1104", + "kind": "http", + "name": "List all Capabilities that extend a virtual machine Target resource.", + "description": "List all Capabilities that extend a virtual machine Target resource.", + "filePath": "2025-01-01/Capabilities_List.json", + "parameters": [ + { + "$id": "1105", + "parameter": { + "$ref": "1079" + }, + "value": { + "$id": "1106", + "kind": "string", + "type": { + "$ref": "1080" + }, + "value": "2025-01-01" + } + }, + { + "$id": "1107", + "parameter": { + "$ref": "1088" + }, + "value": { + "$id": "1108", + "kind": "string", + "type": { + "$ref": "1089" + }, + "value": "Microsoft.Compute" + } + }, + { + "$id": "1109", + "parameter": { + "$ref": "1092" + }, + "value": { + "$id": "1110", + "kind": "string", + "type": { + "$ref": "1093" + }, + "value": "exampleVM" + } + }, + { + "$id": "1111", + "parameter": { + "$ref": "1090" + }, + "value": { + "$id": "1112", + "kind": "string", + "type": { + "$ref": "1091" + }, + "value": "virtualMachines" + } + }, + { + "$id": "1113", + "parameter": { + "$ref": "1086" + }, + "value": { + "$id": "1114", + "kind": "string", + "type": { + "$ref": "1087" + }, + "value": "exampleRG" + } + }, + { + "$id": "1115", + "parameter": { + "$ref": "1083" + }, + "value": { + "$id": "1116", + "kind": "string", + "type": { + "$ref": "1084" + }, + "value": "6b052e15-03d3-4f17-b2e1-be7f07588291" + } + }, + { + "$id": "1117", + "parameter": { + "$ref": "1096" + }, + "value": { + "$id": "1118", + "kind": "string", + "type": { + "$ref": "1097" + }, + "value": "Microsoft-VirtualMachine" + } + } + ], + "responses": [ + { + "$id": "1119", + "response": { + "$ref": "1101" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1120", + "kind": "model", + "type": { + "$ref": "187" + }, + "value": { + "$id": "1121", + "nextLink": { + "$id": "1122", + "kind": "string", + "type": { + "$ref": "193" + }, + "value": "https://management.azure.com/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Compute/virtualMachines/exampleVM/providers/Microsoft.Chaos/targets/Microsoft-VirtualMachine/capabilities?continuationToken=&api-version=2024-11-01-preview" + }, + "value": { + "$id": "1123", + "kind": "array", + "type": { + "$ref": "189" + }, + "value": [ + { + "$id": "1124", + "kind": "model", + "type": { + "$ref": "82" + }, + "value": { + "$id": "1125", + "name": { + "$id": "1126", + "kind": "string", + "type": { + "$ref": "91" + }, + "value": "Shutdown-1.0" + }, + "type": { + "$id": "1127", + "kind": "string", + "type": { + "$ref": "95" + }, + "value": "Microsoft.Chaos/targets/capabilities" + }, + "id": { + "$id": "1128", + "kind": "string", + "type": { + "$ref": "86" + }, + "value": "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Compute/virtualMachines/exampleVM/providers/Microsoft.Chaos/targets/Microsoft-VirtualMachine/capabilities/Shutdown-1.0" + }, + "properties": { + "$id": "1129", + "kind": "model", + "type": { + "$ref": "128" + }, + "value": { + "$id": "1130", + "description": { + "$id": "1131", + "kind": "string", + "type": { + "$ref": "138" + }, + "value": "Shutdown an Azure Virtual Machine for a defined period of time." + }, + "parametersSchema": { + "$id": "1132", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "https://schema.centralus.chaos-prod.azure.com/targets/Microsoft-VirtualMachine/capabilities/Shutdown-1.0.json" + }, + "publisher": { + "$id": "1133", + "kind": "string", + "type": { + "$ref": "130" + }, + "value": "Microsoft" + }, + "targetType": { + "$id": "1134", + "kind": "string", + "type": { + "$ref": "134" + }, + "value": "VirtualMachine" + }, + "urn": { + "$id": "1135", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "urn:csci:microsoft:virtualMachine:shutdown/1.0" + } + } + }, + "systemData": { + "$id": "1136", + "kind": "model", + "type": { + "$ref": "100" + }, + "value": { + "$id": "1137", + "createdAt": { + "$id": "1138", + "kind": "string", + "type": { + "$ref": "109" + }, + "value": "2020-05-14T05:08:38.4662189Z" + }, + "lastModifiedAt": { + "$id": "1139", + "kind": "string", + "type": { + "$ref": "121" + }, + "value": "2020-05-14T05:08:38.4662189Z" + } + } + } + } + } + ] + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "1140", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1141", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1142", + "name": "parentProviderNamespace", + "nameInRequest": "parentProviderNamespace", + "doc": "The parent resource provider namespace.", + "type": { + "$id": "1143", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1144", + "name": "parentResourceType", + "nameInRequest": "parentResourceType", + "doc": "The parent resource type.", + "type": { + "$id": "1145", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1146", + "name": "parentResourceName", + "nameInRequest": "parentResourceName", + "doc": "The parent resource name.", + "type": { + "$id": "1147", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1148", + "name": "continuationToken", + "nameInRequest": "continuationToken", + "doc": "String that sets the continuation token.", + "type": { + "$id": "1149", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": false, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1150", + "name": "targetName", + "nameInRequest": "targetName", + "doc": "String that represents a Target resource name.", + "type": { + "$id": "1151", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1152", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "1099" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "1153", + "type": { + "$id": "1154", + "kind": "array", + "name": "ArrayCapability", + "valueType": { + "$ref": "82" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "resultSegments": [ + "value" + ] + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.Chaos.Capabilities.list" + } + ], + "parameters": [ + { + "$id": "1155", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "1156", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "location": "Uri", + "isApiVersion": false, + "isContentType": false, + "isRequired": true, + "isEndpoint": true, + "skipUrlEncoding": false, + "explode": false, + "kind": "Client", + "defaultValue": { + "$id": "1157", + "type": { + "$id": "1158", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "1159", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "1160" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.Chaos.Capabilities", + "apiVersions": [ + "2024-11-01-preview", + "2025-01-01" + ], + "parent": { + "$ref": "834" + } + }, + { + "$id": "1161", + "kind": "client", + "name": "Operations", + "namespace": "Azure.ResourceManager.Chaos", + "methods": [ + { + "$id": "1162", + "kind": "paging", + "name": "list", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-01-01" + ], + "doc": "List the operations for the provider", + "operation": { + "$id": "1163", + "name": "list", + "resourceName": "Operations", + "doc": "List the operations for the provider", + "accessibility": "public", + "parameters": [ + { + "$id": "1164", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1165", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1166", + "type": { + "$id": "1167", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-01-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1168", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1169", + "kind": "constant", + "valueType": { + "$id": "1170", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "1171", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "197" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/providers/Microsoft.Chaos/operations", + "bufferResponse": true, + "paging": { + "$id": "1172", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "1173", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Azure.ResourceManager.Operations.list", + "decorators": [], + "examples": [ + { + "$id": "1174", + "kind": "http", + "name": "Lists all Chaos Studio operations.", + "description": "Lists all Chaos Studio operations.", + "filePath": "2025-01-01/Operations_List.json", + "parameters": [ + { + "$id": "1175", + "parameter": { + "$ref": "1164" + }, + "value": { + "$id": "1176", + "kind": "string", + "type": { + "$ref": "1165" + }, + "value": "2025-01-01" + } + } + ], + "responses": [ + { + "$id": "1177", + "response": { + "$ref": "1171" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1178", + "kind": "model", + "type": { + "$ref": "197" + }, + "value": { + "$id": "1179", + "nextLink": { + "$id": "1180", + "kind": "string", + "type": { + "$ref": "238" + }, + "value": "https://management.azure.com/providers/Microsoft.Chaos/operations?continuationToken=myContinuationToken&api-version=2024-11-01-preview" + }, + "value": { + "$id": "1181", + "kind": "array", + "type": { + "$ref": "199" + }, + "value": [ + { + "$id": "1182", + "kind": "model", + "type": { + "$ref": "200" + }, + "value": { + "$id": "1183", + "name": { + "$id": "1184", + "kind": "string", + "type": { + "$ref": "202" + }, + "value": "Microsoft.Chaos/experiments/read" + }, + "display": { + "$id": "1185", + "kind": "model", + "type": { + "$ref": "210" + }, + "value": { + "$id": "1186", + "provider": { + "$id": "1187", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "Microsoft Chaos" + }, + "resource": { + "$id": "1188", + "kind": "string", + "type": { + "$ref": "216" + }, + "value": "Chaos Experiment" + }, + "operation": { + "$id": "1189", + "kind": "string", + "type": { + "$ref": "220" + }, + "value": "Gets all Chaos Experiments." + }, + "description": { + "$id": "1190", + "kind": "string", + "type": { + "$ref": "224" + }, + "value": "Gets all Chaos Experiments in a resource group." + } + } + }, + "isDataAction": { + "$id": "1191", + "kind": "boolean", + "type": { + "$ref": "206" + }, + "value": false + }, + "origin": { + "$id": "1192", + "kind": "string", + "type": { + "$ref": "12" + }, + "value": "user,system" + } + } + } + ] + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "1193", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "1169" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "1194", + "type": { + "$id": "1195", + "kind": "array", + "name": "ArrayOperation", + "valueType": { + "$ref": "200" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "resultSegments": [ + "value" + ] + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Azure.ResourceManager.Operations.list" + } + ], + "parameters": [ + { + "$id": "1196", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "1197", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "location": "Uri", + "isApiVersion": false, + "isContentType": false, + "isRequired": true, + "isEndpoint": true, + "skipUrlEncoding": false, + "explode": false, + "kind": "Client", + "defaultValue": { + "$id": "1198", + "type": { + "$id": "1199", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.Chaos.Operations", + "apiVersions": [ + "2024-11-01-preview", + "2025-01-01" + ], + "parent": { + "$ref": "834" + } + }, + { + "$id": "1200", + "kind": "client", + "name": "Targets", + "namespace": "Azure.ResourceManager.Chaos", + "methods": [ + { + "$id": "1201", + "kind": "basic", + "name": "get", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-01-01" + ], + "doc": "Get a Target resource that extends a tracked regional resource.", + "operation": { + "$id": "1202", + "name": "get", + "resourceName": "Target", + "doc": "Get a Target resource that extends a tracked regional resource.", + "accessibility": "public", + "parameters": [ + { + "$id": "1203", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1204", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1205", + "type": { + "$id": "1206", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-01-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1207", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1208", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1209", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1210", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1211", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1212", + "name": "parentProviderNamespace", + "nameInRequest": "parentProviderNamespace", + "doc": "The parent resource provider namespace.", + "type": { + "$id": "1213", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1214", + "name": "parentResourceType", + "nameInRequest": "parentResourceType", + "doc": "The parent resource type.", + "type": { + "$id": "1215", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1216", + "name": "parentResourceName", + "nameInRequest": "parentResourceName", + "doc": "The parent resource name.", + "type": { + "$id": "1217", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1218", + "name": "targetName", + "nameInRequest": "targetName", + "doc": "String that represents a Target resource name.", + "type": { + "$id": "1219", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1220", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1221", + "kind": "constant", + "valueType": { + "$id": "1222", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "1223", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "242" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.Chaos.Targets.get", + "decorators": [], + "examples": [ + { + "$id": "1224", + "kind": "http", + "name": "Get a Target that extends a virtual machine resource.", + "description": "Get a Target that extends a virtual machine resource.", + "filePath": "2025-01-01/Targets_Get.json", + "parameters": [ + { + "$id": "1225", + "parameter": { + "$ref": "1203" + }, + "value": { + "$id": "1226", + "kind": "string", + "type": { + "$ref": "1204" + }, + "value": "2025-01-01" + } + }, + { + "$id": "1227", + "parameter": { + "$ref": "1212" + }, + "value": { + "$id": "1228", + "kind": "string", + "type": { + "$ref": "1213" + }, + "value": "Microsoft.Compute" + } + }, + { + "$id": "1229", + "parameter": { + "$ref": "1216" + }, + "value": { + "$id": "1230", + "kind": "string", + "type": { + "$ref": "1217" + }, + "value": "exampleVM" + } + }, + { + "$id": "1231", + "parameter": { + "$ref": "1214" + }, + "value": { + "$id": "1232", + "kind": "string", + "type": { + "$ref": "1215" + }, + "value": "virtualMachines" + } + }, + { + "$id": "1233", + "parameter": { + "$ref": "1210" + }, + "value": { + "$id": "1234", + "kind": "string", + "type": { + "$ref": "1211" + }, + "value": "exampleRG" + } + }, + { + "$id": "1235", + "parameter": { + "$ref": "1207" + }, + "value": { + "$id": "1236", + "kind": "string", + "type": { + "$ref": "1208" + }, + "value": "6b052e15-03d3-4f17-b2e1-be7f07588291" + } + }, + { + "$id": "1237", + "parameter": { + "$ref": "1218" + }, + "value": { + "$id": "1238", + "kind": "string", + "type": { + "$ref": "1219" + }, + "value": "Microsoft-Agent" + } + } + ], + "responses": [ + { + "$id": "1239", + "response": { + "$ref": "1223" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1240", + "kind": "model", + "type": { + "$ref": "242" + }, + "value": { + "$id": "1241", + "name": { + "$id": "1242", + "kind": "string", + "type": { + "$ref": "91" + }, + "value": "Microsoft-Agent" + }, + "type": { + "$id": "1243", + "kind": "string", + "type": { + "$ref": "95" + }, + "value": "Microsoft.Chaos/targets" + }, + "id": { + "$id": "1244", + "kind": "string", + "type": { + "$ref": "86" + }, + "value": "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Compute/virtualMachines/exampleVM/providers/Microsoft.Chaos/targets/Microsoft-Agent" + }, + "location": { + "$id": "1245", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "centraluseuap" + }, + "properties": { + "$id": "1246", + "kind": "dict", + "type": { + "$ref": "244" + }, + "value": { + "$id": "1247", + "agentProfileId": { + "$id": "1248", + "kind": "unknown", + "type": { + "$ref": "246" + }, + "value": "ac4e8251-fdc9-4277-8e87-dc57fe5794cf" + }, + "identities": { + "$id": "1249", + "kind": "unknown", + "type": { + "$ref": "246" + }, + "value": [ + { + "$id": "1250", + "type": "CertificateSubjectIssuer", + "subject": "CN=example.subject" + } + ] + } + } + }, + "systemData": { + "$id": "1251", + "kind": "model", + "type": { + "$ref": "100" + }, + "value": { + "$id": "1252", + "createdAt": { + "$id": "1253", + "kind": "string", + "type": { + "$ref": "109" + }, + "value": "2021-07-01T00:00:00.0Z" + }, + "lastModifiedAt": { + "$id": "1254", + "kind": "string", + "type": { + "$ref": "121" + }, + "value": "2021-07-01T00:00:00.0Z" + } + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "1255", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1256", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1257", + "name": "parentProviderNamespace", + "nameInRequest": "parentProviderNamespace", + "doc": "The parent resource provider namespace.", + "type": { + "$id": "1258", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1259", + "name": "parentResourceType", + "nameInRequest": "parentResourceType", + "doc": "The parent resource type.", + "type": { + "$id": "1260", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1261", + "name": "parentResourceName", + "nameInRequest": "parentResourceName", + "doc": "The parent resource name.", + "type": { + "$id": "1262", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1263", + "name": "targetName", + "nameInRequest": "targetName", + "doc": "String that represents a Target resource name.", + "type": { + "$id": "1264", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1265", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "1221" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "1266", + "type": { + "$ref": "242" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.Chaos.Targets.get" + }, + { + "$id": "1267", + "kind": "basic", + "name": "createOrUpdate", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-01-01" + ], + "doc": "Create or update a Target resource that extends a tracked regional resource.", + "operation": { + "$id": "1268", + "name": "createOrUpdate", + "resourceName": "Target", + "doc": "Create or update a Target resource that extends a tracked regional resource.", + "accessibility": "public", + "parameters": [ + { + "$id": "1269", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1270", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1271", + "type": { + "$id": "1272", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-01-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1273", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1274", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1275", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1276", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1277", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1278", + "name": "parentProviderNamespace", + "nameInRequest": "parentProviderNamespace", + "doc": "The parent resource provider namespace.", + "type": { + "$id": "1279", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1280", + "name": "parentResourceType", + "nameInRequest": "parentResourceType", + "doc": "The parent resource type.", + "type": { + "$id": "1281", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1282", + "name": "parentResourceName", + "nameInRequest": "parentResourceName", + "doc": "The parent resource name.", + "type": { + "$id": "1283", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1284", + "name": "targetName", + "nameInRequest": "targetName", + "doc": "String that represents a Target resource name.", + "type": { + "$id": "1285", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1286", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "1287", + "kind": "constant", + "valueType": { + "$id": "1288", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1289", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1290", + "kind": "constant", + "valueType": { + "$id": "1291", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1292", + "name": "resource", + "nameInRequest": "resource", + "doc": "Target resource to be created or updated.", + "type": { + "$ref": "242" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "1293", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "242" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + { + "$id": "1294", + "statusCodes": [ + 201 + ], + "bodyType": { + "$ref": "242" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "PUT", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.Chaos.Targets.createOrUpdate", + "decorators": [], + "examples": [ + { + "$id": "1295", + "kind": "http", + "name": "Create/update a Target that extends a virtual machine resource.", + "description": "Create/update a Target that extends a virtual machine resource.", + "filePath": "2025-01-01/Targets_CreateOrUpdate.json", + "parameters": [ + { + "$id": "1296", + "parameter": { + "$ref": "1269" + }, + "value": { + "$id": "1297", + "kind": "string", + "type": { + "$ref": "1270" + }, + "value": "2025-01-01" + } + }, + { + "$id": "1298", + "parameter": { + "$ref": "1278" + }, + "value": { + "$id": "1299", + "kind": "string", + "type": { + "$ref": "1279" + }, + "value": "Microsoft.Compute" + } + }, + { + "$id": "1300", + "parameter": { + "$ref": "1282" + }, + "value": { + "$id": "1301", + "kind": "string", + "type": { + "$ref": "1283" + }, + "value": "exampleVM" + } + }, + { + "$id": "1302", + "parameter": { + "$ref": "1280" + }, + "value": { + "$id": "1303", + "kind": "string", + "type": { + "$ref": "1281" + }, + "value": "virtualMachines" + } + }, + { + "$id": "1304", + "parameter": { + "$ref": "1276" + }, + "value": { + "$id": "1305", + "kind": "string", + "type": { + "$ref": "1277" + }, + "value": "exampleRG" + } + }, + { + "$id": "1306", + "parameter": { + "$ref": "1273" + }, + "value": { + "$id": "1307", + "kind": "string", + "type": { + "$ref": "1274" + }, + "value": "6b052e15-03d3-4f17-b2e1-be7f07588291" + } + }, + { + "$id": "1308", + "parameter": { + "$ref": "1292" + }, + "value": { + "$id": "1309", + "kind": "model", + "type": { + "$ref": "242" + }, + "value": { + "$id": "1310", + "properties": { + "$id": "1311", + "kind": "dict", + "type": { + "$ref": "244" + }, + "value": { + "$id": "1312" + } + } + } + } + }, + { + "$id": "1313", + "parameter": { + "$ref": "1284" + }, + "value": { + "$id": "1314", + "kind": "string", + "type": { + "$ref": "1285" + }, + "value": "Microsoft-VirtualMachine" + } + } + ], + "responses": [ + { + "$id": "1315", + "response": { + "$ref": "1293" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1316", + "kind": "model", + "type": { + "$ref": "242" + }, + "value": { + "$id": "1317", + "name": { + "$id": "1318", + "kind": "string", + "type": { + "$ref": "91" + }, + "value": "Microsoft-VirtualMachine" + }, + "type": { + "$id": "1319", + "kind": "string", + "type": { + "$ref": "95" + }, + "value": "Microsoft.Chaos/targets" + }, + "id": { + "$id": "1320", + "kind": "string", + "type": { + "$ref": "86" + }, + "value": "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Compute/virtualMachines/exampleVM/providers/Microsoft.Chaos/targets/Microsoft-VirtualMachine" + }, + "properties": { + "$id": "1321", + "kind": "dict", + "type": { + "$ref": "244" + }, + "value": { + "$id": "1322" + } + }, + "systemData": { + "$id": "1323", + "kind": "model", + "type": { + "$ref": "100" + }, + "value": { + "$id": "1324", + "createdAt": { + "$id": "1325", + "kind": "string", + "type": { + "$ref": "109" + }, + "value": "2021-07-01T00:00:00.0Z" + }, + "lastModifiedAt": { + "$id": "1326", + "kind": "string", + "type": { + "$ref": "121" + }, + "value": "2021-07-01T00:00:00.0Z" + } + } + } + } + } + }, + { + "$id": "1327", + "response": { + "$ref": "1294" + }, + "statusCode": 201, + "bodyValue": { + "$id": "1328", + "kind": "model", + "type": { + "$ref": "242" + }, + "value": { + "$id": "1329", + "name": { + "$id": "1330", + "kind": "string", + "type": { + "$ref": "91" + }, + "value": "Microsoft-VirtualMachine" + }, + "type": { + "$id": "1331", + "kind": "string", + "type": { + "$ref": "95" + }, + "value": "Microsoft.Chaos/targets" + }, + "id": { + "$id": "1332", + "kind": "string", + "type": { + "$ref": "86" + }, + "value": "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Compute/virtualMachines/exampleVM/providers/Microsoft.Chaos/targets/Microsoft-VirtualMachine" + }, + "properties": { + "$id": "1333", + "kind": "dict", + "type": { + "$ref": "244" + }, + "value": { + "$id": "1334" + } + }, + "systemData": { + "$id": "1335", + "kind": "model", + "type": { + "$ref": "100" + }, + "value": { + "$id": "1336", + "createdAt": { + "$id": "1337", + "kind": "string", + "type": { + "$ref": "109" + }, + "value": "2021-07-01T00:00:00.0Z" + }, + "lastModifiedAt": { + "$id": "1338", + "kind": "string", + "type": { + "$ref": "121" + }, + "value": "2021-07-01T00:00:00.0Z" + } + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "1339", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1340", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1341", + "name": "parentProviderNamespace", + "nameInRequest": "parentProviderNamespace", + "doc": "The parent resource provider namespace.", + "type": { + "$id": "1342", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1343", + "name": "parentResourceType", + "nameInRequest": "parentResourceType", + "doc": "The parent resource type.", + "type": { + "$id": "1344", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1345", + "name": "parentResourceName", + "nameInRequest": "parentResourceName", + "doc": "The parent resource name.", + "type": { + "$id": "1346", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1347", + "name": "targetName", + "nameInRequest": "targetName", + "doc": "String that represents a Target resource name.", + "type": { + "$id": "1348", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1349", + "name": "resource", + "nameInRequest": "resource", + "doc": "Target resource to be created or updated.", + "type": { + "$ref": "242" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1350", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$ref": "1287" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1351", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "1290" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "1352", + "type": { + "$ref": "242" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.Chaos.Targets.createOrUpdate" + }, + { + "$id": "1353", + "kind": "basic", + "name": "delete", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-01-01" + ], + "doc": "Delete a Target resource that extends a tracked regional resource.", + "operation": { + "$id": "1354", + "name": "delete", + "resourceName": "Target", + "doc": "Delete a Target resource that extends a tracked regional resource.", + "accessibility": "public", + "parameters": [ + { + "$id": "1355", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1356", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1357", + "type": { + "$id": "1358", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-01-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1359", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1360", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1361", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1362", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1363", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1364", + "name": "parentProviderNamespace", + "nameInRequest": "parentProviderNamespace", + "doc": "The parent resource provider namespace.", + "type": { + "$id": "1365", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1366", + "name": "parentResourceType", + "nameInRequest": "parentResourceType", + "doc": "The parent resource type.", + "type": { + "$id": "1367", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1368", + "name": "parentResourceName", + "nameInRequest": "parentResourceName", + "doc": "The parent resource name.", + "type": { + "$id": "1369", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1370", + "name": "targetName", + "nameInRequest": "targetName", + "doc": "String that represents a Target resource name.", + "type": { + "$id": "1371", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1372", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1373", + "kind": "constant", + "valueType": { + "$id": "1374", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "1375", + "statusCodes": [ + 200 + ], + "headers": [], + "isErrorResponse": false + }, + { + "$id": "1376", + "statusCodes": [ + 204 + ], + "headers": [], + "isErrorResponse": false + } + ], + "httpMethod": "DELETE", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.Chaos.Targets.delete", + "decorators": [], + "examples": [ + { + "$id": "1377", + "kind": "http", + "name": "Delete a Target that extends a virtual machine resource.", + "description": "Delete a Target that extends a virtual machine resource.", + "filePath": "2025-01-01/Targets_Delete.json", + "parameters": [ + { + "$id": "1378", + "parameter": { + "$ref": "1355" + }, + "value": { + "$id": "1379", + "kind": "string", + "type": { + "$ref": "1356" + }, + "value": "2025-01-01" + } + }, + { + "$id": "1380", + "parameter": { + "$ref": "1364" + }, + "value": { + "$id": "1381", + "kind": "string", + "type": { + "$ref": "1365" + }, + "value": "Microsoft.Compute" + } + }, + { + "$id": "1382", + "parameter": { + "$ref": "1368" + }, + "value": { + "$id": "1383", + "kind": "string", + "type": { + "$ref": "1369" + }, + "value": "exampleVM" + } + }, + { + "$id": "1384", + "parameter": { + "$ref": "1366" + }, + "value": { + "$id": "1385", + "kind": "string", + "type": { + "$ref": "1367" + }, + "value": "virtualMachines" + } + }, + { + "$id": "1386", + "parameter": { + "$ref": "1362" + }, + "value": { + "$id": "1387", + "kind": "string", + "type": { + "$ref": "1363" + }, + "value": "exampleRG" + } + }, + { + "$id": "1388", + "parameter": { + "$ref": "1359" + }, + "value": { + "$id": "1389", + "kind": "string", + "type": { + "$ref": "1360" + }, + "value": "6b052e15-03d3-4f17-b2e1-be7f07588291" + } + }, + { + "$id": "1390", + "parameter": { + "$ref": "1370" + }, + "value": { + "$id": "1391", + "kind": "string", + "type": { + "$ref": "1371" + }, + "value": "Microsoft-Agent" + } + } + ], + "responses": [ + { + "$id": "1392", + "response": { + "$ref": "1375" + }, + "statusCode": 200 + }, + { + "$id": "1393", + "response": { + "$ref": "1376" + }, + "statusCode": 204 + } + ] + } + ] + }, + "parameters": [ + { + "$id": "1394", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1395", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1396", + "name": "parentProviderNamespace", + "nameInRequest": "parentProviderNamespace", + "doc": "The parent resource provider namespace.", + "type": { + "$id": "1397", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1398", + "name": "parentResourceType", + "nameInRequest": "parentResourceType", + "doc": "The parent resource type.", + "type": { + "$id": "1399", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1400", + "name": "parentResourceName", + "nameInRequest": "parentResourceName", + "doc": "The parent resource name.", + "type": { + "$id": "1401", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1402", + "name": "targetName", + "nameInRequest": "targetName", + "doc": "String that represents a Target resource name.", + "type": { + "$id": "1403", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1404", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "1373" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "1405" + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.Chaos.Targets.delete" + }, + { + "$id": "1406", + "kind": "paging", + "name": "list", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-01-01" + ], + "doc": "Get a list of Target resources that extend a tracked regional resource.", + "operation": { + "$id": "1407", + "name": "list", + "resourceName": "Target", + "doc": "Get a list of Target resources that extend a tracked regional resource.", + "accessibility": "public", + "parameters": [ + { + "$id": "1408", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1409", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1410", + "type": { + "$id": "1411", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-01-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1412", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1413", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1414", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1415", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1416", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1417", + "name": "parentProviderNamespace", + "nameInRequest": "parentProviderNamespace", + "doc": "The parent resource provider namespace.", + "type": { + "$id": "1418", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1419", + "name": "parentResourceType", + "nameInRequest": "parentResourceType", + "doc": "The parent resource type.", + "type": { + "$id": "1420", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1421", + "name": "parentResourceName", + "nameInRequest": "parentResourceName", + "doc": "The parent resource name.", + "type": { + "$id": "1422", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1423", + "name": "continuationToken", + "nameInRequest": "continuationToken", + "doc": "String that sets the continuation token.", + "type": { + "$id": "1424", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": false, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1425", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1426", + "kind": "constant", + "valueType": { + "$id": "1427", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "1428", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "256" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets", + "bufferResponse": true, + "paging": { + "$id": "1429", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "1430", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.Chaos.Targets.list", + "decorators": [], + "examples": [ + { + "$id": "1431", + "kind": "http", + "name": "List all Targets that extend a virtual machine resource.", + "description": "List all Targets that extend a virtual machine resource.", + "filePath": "2025-01-01/Targets_List.json", + "parameters": [ + { + "$id": "1432", + "parameter": { + "$ref": "1408" + }, + "value": { + "$id": "1433", + "kind": "string", + "type": { + "$ref": "1409" + }, + "value": "2025-01-01" + } + }, + { + "$id": "1434", + "parameter": { + "$ref": "1417" + }, + "value": { + "$id": "1435", + "kind": "string", + "type": { + "$ref": "1418" + }, + "value": "Microsoft.Compute" + } + }, + { + "$id": "1436", + "parameter": { + "$ref": "1421" + }, + "value": { + "$id": "1437", + "kind": "string", + "type": { + "$ref": "1422" + }, + "value": "exampleVM" + } + }, + { + "$id": "1438", + "parameter": { + "$ref": "1419" + }, + "value": { + "$id": "1439", + "kind": "string", + "type": { + "$ref": "1420" + }, + "value": "virtualMachines" + } + }, + { + "$id": "1440", + "parameter": { + "$ref": "1415" + }, + "value": { + "$id": "1441", + "kind": "string", + "type": { + "$ref": "1416" + }, + "value": "exampleRG" + } + }, + { + "$id": "1442", + "parameter": { + "$ref": "1412" + }, + "value": { + "$id": "1443", + "kind": "string", + "type": { + "$ref": "1413" + }, + "value": "6b052e15-03d3-4f17-b2e1-be7f07588291" + } + } + ], + "responses": [ + { + "$id": "1444", + "response": { + "$ref": "1428" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1445", + "kind": "model", + "type": { + "$ref": "256" + }, + "value": { + "$id": "1446", + "nextLink": { + "$id": "1447", + "kind": "string", + "type": { + "$ref": "262" + }, + "value": "https://management.azure.com/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Compute/virtualMachines/exampleVM/providers/Microsoft.Chaos/targets?continuationToken=&api-version=2024-11-01-preview" + }, + "value": { + "$id": "1448", + "kind": "array", + "type": { + "$ref": "258" + }, + "value": [ + { + "$id": "1449", + "kind": "model", + "type": { + "$ref": "242" + }, + "value": { + "$id": "1450", + "name": { + "$id": "1451", + "kind": "string", + "type": { + "$ref": "91" + }, + "value": "Microsoft-Agent" + }, + "type": { + "$id": "1452", + "kind": "string", + "type": { + "$ref": "95" + }, + "value": "Microsoft.Chaos/targets" + }, + "id": { + "$id": "1453", + "kind": "string", + "type": { + "$ref": "86" + }, + "value": "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Compute/virtualMachines/exampleVM/providers/Microsoft.Chaos/targets/Microsoft-Agent" + }, + "location": { + "$id": "1454", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "centraluseuap" + }, + "properties": { + "$id": "1455", + "kind": "dict", + "type": { + "$ref": "244" + }, + "value": { + "$id": "1456", + "agentProfileId": { + "$id": "1457", + "kind": "unknown", + "type": { + "$ref": "246" + }, + "value": "ac4e8251-fdc9-4277-8e87-dc57fe5794cf" + }, + "identities": { + "$id": "1458", + "kind": "unknown", + "type": { + "$ref": "246" + }, + "value": [ + { + "$id": "1459", + "type": "CertificateSubjectIssuer", + "subject": "CN=example.subject" + } + ] + } + } + }, + "systemData": { + "$id": "1460", + "kind": "model", + "type": { + "$ref": "100" + }, + "value": { + "$id": "1461", + "createdAt": { + "$id": "1462", + "kind": "string", + "type": { + "$ref": "109" + }, + "value": "2021-07-01T00:00:00.0Z" + }, + "lastModifiedAt": { + "$id": "1463", + "kind": "string", + "type": { + "$ref": "121" + }, + "value": "2021-07-01T00:00:00.0Z" + } + } + } + } + } + ] + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "1464", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1465", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1466", + "name": "parentProviderNamespace", + "nameInRequest": "parentProviderNamespace", + "doc": "The parent resource provider namespace.", + "type": { + "$id": "1467", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1468", + "name": "parentResourceType", + "nameInRequest": "parentResourceType", + "doc": "The parent resource type.", + "type": { + "$id": "1469", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1470", + "name": "parentResourceName", + "nameInRequest": "parentResourceName", + "doc": "The parent resource name.", + "type": { + "$id": "1471", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1472", + "name": "continuationToken", + "nameInRequest": "continuationToken", + "doc": "String that sets the continuation token.", + "type": { + "$id": "1473", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": false, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1474", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "1426" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "1475", + "type": { + "$id": "1476", + "kind": "array", + "name": "ArrayTarget", + "valueType": { + "$ref": "242" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "resultSegments": [ + "value" + ] + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.Chaos.Targets.list" + } + ], + "parameters": [ + { + "$id": "1477", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "1478", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "location": "Uri", + "isApiVersion": false, + "isContentType": false, + "isRequired": true, + "isEndpoint": true, + "skipUrlEncoding": false, + "explode": false, + "kind": "Client", + "defaultValue": { + "$id": "1479", + "type": { + "$id": "1480", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "1481", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "1482" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.Chaos.Targets", + "apiVersions": [ + "2024-11-01-preview", + "2025-01-01" + ], + "parent": { + "$ref": "834" + } + }, + { + "$id": "1483", + "kind": "client", + "name": "CapabilityTypes", + "namespace": "Azure.ResourceManager.Chaos", + "methods": [ + { + "$id": "1484", + "kind": "basic", + "name": "get", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-01-01" + ], + "doc": "Get a Capability Type resource for given Target Type and location.", + "operation": { + "$id": "1485", + "name": "get", + "resourceName": "CapabilityType", + "doc": "Get a Capability Type resource for given Target Type and location.", + "accessibility": "public", + "parameters": [ + { + "$id": "1486", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1487", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1488", + "type": { + "$id": "1489", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-01-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1490", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1491", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1492", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1493", + "name": "location", + "nameInRequest": "location", + "doc": "The name of the Azure region.", + "type": { + "$id": "1494", + "kind": "string", + "name": "azureLocation", + "crossLanguageDefinitionId": "Azure.Core.azureLocation", + "baseType": { + "$id": "1495", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1496", + "name": "targetTypeName", + "nameInRequest": "targetTypeName", + "doc": "String that represents a Target Type resource name.", + "type": { + "$id": "1497", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1498", + "name": "capabilityTypeName", + "nameInRequest": "capabilityTypeName", + "doc": "String that represents a Capability Type resource name.", + "type": { + "$id": "1499", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1500", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1501", + "kind": "constant", + "valueType": { + "$id": "1502", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "1503", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "266" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/locations/{location}/targetTypes/{targetTypeName}/capabilityTypes/{capabilityTypeName}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.Chaos.CapabilityTypes.get", + "decorators": [], + "examples": [ + { + "$id": "1504", + "kind": "http", + "name": "Get a Capability Type for a virtual machine Target resource on westus2 location.", + "description": "Get a Capability Type for a virtual machine Target resource on westus2 location.", + "filePath": "2025-01-01/CapabilityTypes_Get.json", + "parameters": [ + { + "$id": "1505", + "parameter": { + "$ref": "1486" + }, + "value": { + "$id": "1506", + "kind": "string", + "type": { + "$ref": "1487" + }, + "value": "2025-01-01" + } + }, + { + "$id": "1507", + "parameter": { + "$ref": "1498" + }, + "value": { + "$id": "1508", + "kind": "string", + "type": { + "$ref": "1499" + }, + "value": "Shutdown-1.0" + } + }, + { + "$id": "1509", + "parameter": { + "$ref": "1493" + }, + "value": { + "$id": "1510", + "kind": "string", + "type": { + "$ref": "1494" + }, + "value": "westus2" + } + }, + { + "$id": "1511", + "parameter": { + "$ref": "1490" + }, + "value": { + "$id": "1512", + "kind": "string", + "type": { + "$ref": "1491" + }, + "value": "6b052e15-03d3-4f17-b2e1-be7f07588291" + } + }, + { + "$id": "1513", + "parameter": { + "$ref": "1496" + }, + "value": { + "$id": "1514", + "kind": "string", + "type": { + "$ref": "1497" + }, + "value": "Microsoft-VirtualMachine" + } + } + ], + "responses": [ + { + "$id": "1515", + "response": { + "$ref": "1503" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1516", + "kind": "model", + "type": { + "$ref": "266" + }, + "value": { + "$id": "1517", + "name": { + "$id": "1518", + "kind": "string", + "type": { + "$ref": "91" + }, + "value": "Shutdown-1.0" + }, + "type": { + "$id": "1519", + "kind": "string", + "type": { + "$ref": "95" + }, + "value": "Microsoft.Chaos/locations/targetTypes/capabilityTypes" + }, + "id": { + "$id": "1520", + "kind": "string", + "type": { + "$ref": "86" + }, + "value": "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/providers/Microsoft.Chaos/locations/westus2/targetTypes/Microsoft-VirtualMachine/capabilityTypes/Shutdown-1.0" + }, + "properties": { + "$id": "1521", + "kind": "model", + "type": { + "$ref": "268" + }, + "value": { + "$id": "1522", + "description": { + "$id": "1523", + "kind": "string", + "type": { + "$ref": "282" + }, + "value": "Shutdown an Azure Virtual Machine for a defined period of time." + }, + "displayName": { + "$id": "1524", + "kind": "string", + "type": { + "$ref": "278" + }, + "value": "Shutdown VM" + }, + "kind": { + "$id": "1525", + "kind": "string", + "type": { + "$ref": "294" + }, + "value": "fault" + }, + "parametersSchema": { + "$id": "1526", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "https://schema.centralus.chaos-prod.azure.com/targets/Microsoft-VirtualMachine/capabilities/Shutdown-1.0.json" + }, + "publisher": { + "$id": "1527", + "kind": "string", + "type": { + "$ref": "270" + }, + "value": "Microsoft" + }, + "runtimeProperties": { + "$id": "1528", + "kind": "model", + "type": { + "$ref": "313" + }, + "value": { + "$id": "1529", + "kind": { + "$id": "1530", + "kind": "string", + "type": { + "$ref": "315" + }, + "value": "continuous" + } + } + }, + "targetType": { + "$id": "1531", + "kind": "string", + "type": { + "$ref": "274" + }, + "value": "VirtualMachine" + }, + "urn": { + "$id": "1532", + "kind": "string", + "type": { + "$ref": "290" + }, + "value": "urn:csci:microsoft:virtualMachine:shutdown/1.0" + }, + "azureRbacActions": { + "$id": "1533", + "kind": "array", + "type": { + "$ref": "298" + }, + "value": [ + { + "$id": "1534", + "kind": "string", + "type": { + "$ref": "299" + }, + "value": "Microsoft.Compute/virtualMachines/poweroff/action" + }, + { + "$id": "1535", + "kind": "string", + "type": { + "$ref": "299" + }, + "value": "Microsoft.Compute/virtualMachines/start/action" + }, + { + "$id": "1536", + "kind": "string", + "type": { + "$ref": "299" + }, + "value": "Microsoft.Compute/virtualMachines/instanceView/read" + }, + { + "$id": "1537", + "kind": "string", + "type": { + "$ref": "299" + }, + "value": "Microsoft.Compute/virtualMachines/read" + }, + { + "$id": "1538", + "kind": "string", + "type": { + "$ref": "299" + }, + "value": "Microsoft.Compute/locations/operations/read" + } + ] + }, + "requiredAzureRoleDefinitionIds": { + "$id": "1539", + "kind": "array", + "type": { + "$ref": "308" + }, + "value": [ + { + "$id": "1540", + "kind": "string", + "type": { + "$ref": "309" + }, + "value": "acdd72a7-3385-48ef-bd42-f606fba81ae0" + } + ] + } + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "1541", + "name": "location", + "nameInRequest": "location", + "doc": "The name of the Azure region.", + "type": { + "$id": "1542", + "kind": "string", + "name": "azureLocation", + "crossLanguageDefinitionId": "Azure.Core.azureLocation", + "baseType": { + "$id": "1543", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1544", + "name": "targetTypeName", + "nameInRequest": "targetTypeName", + "doc": "String that represents a Target Type resource name.", + "type": { + "$id": "1545", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1546", + "name": "capabilityTypeName", + "nameInRequest": "capabilityTypeName", + "doc": "String that represents a Capability Type resource name.", + "type": { + "$id": "1547", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1548", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "1501" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "1549", + "type": { + "$ref": "266" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.Chaos.CapabilityTypes.get" + }, + { + "$id": "1550", + "kind": "paging", + "name": "list", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-01-01" + ], + "doc": "Get a list of Capability Type resources for given Target Type and location.", + "operation": { + "$id": "1551", + "name": "list", + "resourceName": "CapabilityType", + "doc": "Get a list of Capability Type resources for given Target Type and location.", + "accessibility": "public", + "parameters": [ + { + "$id": "1552", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1553", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1554", + "type": { + "$id": "1555", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-01-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1556", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1557", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1558", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1559", + "name": "location", + "nameInRequest": "location", + "doc": "The name of the Azure region.", + "type": { + "$id": "1560", + "kind": "string", + "name": "azureLocation", + "crossLanguageDefinitionId": "Azure.Core.azureLocation", + "baseType": { + "$id": "1561", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1562", + "name": "targetTypeName", + "nameInRequest": "targetTypeName", + "doc": "String that represents a Target Type resource name.", + "type": { + "$id": "1563", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1564", + "name": "continuationToken", + "nameInRequest": "continuationToken", + "doc": "String that sets the continuation token.", + "type": { + "$id": "1565", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": false, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1566", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1567", + "kind": "constant", + "valueType": { + "$id": "1568", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "1569", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "324" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/locations/{location}/targetTypes/{targetTypeName}/capabilityTypes", + "bufferResponse": true, + "paging": { + "$id": "1570", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "1571", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.Chaos.CapabilityTypes.list", + "decorators": [], + "examples": [ + { + "$id": "1572", + "kind": "http", + "name": "List all Capability Types for a virtual machine Target resource on westus2 location.", + "description": "List all Capability Types for a virtual machine Target resource on westus2 location.", + "filePath": "2025-01-01/CapabilityTypes_List.json", + "parameters": [ + { + "$id": "1573", + "parameter": { + "$ref": "1552" + }, + "value": { + "$id": "1574", + "kind": "string", + "type": { + "$ref": "1553" + }, + "value": "2025-01-01" + } + }, + { + "$id": "1575", + "parameter": { + "$ref": "1559" + }, + "value": { + "$id": "1576", + "kind": "string", + "type": { + "$ref": "1560" + }, + "value": "westus2" + } + }, + { + "$id": "1577", + "parameter": { + "$ref": "1556" + }, + "value": { + "$id": "1578", + "kind": "string", + "type": { + "$ref": "1557" + }, + "value": "6b052e15-03d3-4f17-b2e1-be7f07588291" + } + }, + { + "$id": "1579", + "parameter": { + "$ref": "1562" + }, + "value": { + "$id": "1580", + "kind": "string", + "type": { + "$ref": "1563" + }, + "value": "Microsoft-VirtualMachine" + } + } + ], + "responses": [ + { + "$id": "1581", + "response": { + "$ref": "1569" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1582", + "kind": "model", + "type": { + "$ref": "324" + }, + "value": { + "$id": "1583", + "nextLink": { + "$id": "1584", + "kind": "string", + "type": { + "$ref": "330" + }, + "value": "https://management.azure.com/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/providers/Microsoft.Chaos/locations/westus2/targetTypes/Microsoft-VirtualMachine/capabilityTypes?continuationToken=&api-version=2024-11-01-preview" + }, + "value": { + "$id": "1585", + "kind": "array", + "type": { + "$ref": "326" + }, + "value": [ + { + "$id": "1586", + "kind": "model", + "type": { + "$ref": "266" + }, + "value": { + "$id": "1587", + "name": { + "$id": "1588", + "kind": "string", + "type": { + "$ref": "91" + }, + "value": "Shutdown-1.0" + }, + "type": { + "$id": "1589", + "kind": "string", + "type": { + "$ref": "95" + }, + "value": "Microsoft.Chaos/locations/targetTypes/capabilityTypes" + }, + "id": { + "$id": "1590", + "kind": "string", + "type": { + "$ref": "86" + }, + "value": "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/providers/Microsoft.Chaos/locations/westus2/targetTypes/Microsoft-VirtualMachine/capabilityTypes/Shutdown-1.0" + }, + "properties": { + "$id": "1591", + "kind": "model", + "type": { + "$ref": "268" + }, + "value": { + "$id": "1592", + "description": { + "$id": "1593", + "kind": "string", + "type": { + "$ref": "282" + }, + "value": "Shutdown an Azure Virtual Machine for a defined period of time." + }, + "displayName": { + "$id": "1594", + "kind": "string", + "type": { + "$ref": "278" + }, + "value": "Shutdown VM" + }, + "kind": { + "$id": "1595", + "kind": "string", + "type": { + "$ref": "294" + }, + "value": "fault" + }, + "parametersSchema": { + "$id": "1596", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "https://schema.centralus.chaos-prod.azure.com/targets/Microsoft-VirtualMachine/capabilities/Shutdown-1.0.json" + }, + "publisher": { + "$id": "1597", + "kind": "string", + "type": { + "$ref": "270" + }, + "value": "Microsoft" + }, + "runtimeProperties": { + "$id": "1598", + "kind": "model", + "type": { + "$ref": "313" + }, + "value": { + "$id": "1599", + "kind": { + "$id": "1600", + "kind": "string", + "type": { + "$ref": "315" + }, + "value": "continuous" + } + } + }, + "targetType": { + "$id": "1601", + "kind": "string", + "type": { + "$ref": "274" + }, + "value": "VirtualMachine" + }, + "urn": { + "$id": "1602", + "kind": "string", + "type": { + "$ref": "290" + }, + "value": "urn:csci:microsoft:virtualMachine:shutdown/1.0" + }, + "azureRbacActions": { + "$id": "1603", + "kind": "array", + "type": { + "$ref": "298" + }, + "value": [ + { + "$id": "1604", + "kind": "string", + "type": { + "$ref": "299" + }, + "value": "Microsoft.Compute/virtualMachines/poweroff/action" + }, + { + "$id": "1605", + "kind": "string", + "type": { + "$ref": "299" + }, + "value": "Microsoft.Compute/virtualMachines/start/action" + }, + { + "$id": "1606", + "kind": "string", + "type": { + "$ref": "299" + }, + "value": "Microsoft.Compute/virtualMachines/instanceView/read" + }, + { + "$id": "1607", + "kind": "string", + "type": { + "$ref": "299" + }, + "value": "Microsoft.Compute/virtualMachines/read" + }, + { + "$id": "1608", + "kind": "string", + "type": { + "$ref": "299" + }, + "value": "Microsoft.Compute/locations/operations/read" + } + ] + }, + "requiredAzureRoleDefinitionIds": { + "$id": "1609", + "kind": "array", + "type": { + "$ref": "308" + }, + "value": [ + { + "$id": "1610", + "kind": "string", + "type": { + "$ref": "309" + }, + "value": "acdd72a7-3385-48ef-bd42-f606fba81ae0" + } + ] + } + } + } + } + } + ] + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "1611", + "name": "location", + "nameInRequest": "location", + "doc": "The name of the Azure region.", + "type": { + "$id": "1612", + "kind": "string", + "name": "azureLocation", + "crossLanguageDefinitionId": "Azure.Core.azureLocation", + "baseType": { + "$id": "1613", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1614", + "name": "targetTypeName", + "nameInRequest": "targetTypeName", + "doc": "String that represents a Target Type resource name.", + "type": { + "$id": "1615", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1616", + "name": "continuationToken", + "nameInRequest": "continuationToken", + "doc": "String that sets the continuation token.", + "type": { + "$id": "1617", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": false, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1618", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "1567" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "1619", + "type": { + "$id": "1620", + "kind": "array", + "name": "ArrayCapabilityType", + "valueType": { + "$ref": "266" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "resultSegments": [ + "value" + ] + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.Chaos.CapabilityTypes.list" + } + ], + "parameters": [ + { + "$id": "1621", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "1622", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "location": "Uri", + "isApiVersion": false, + "isContentType": false, + "isRequired": true, + "isEndpoint": true, + "skipUrlEncoding": false, + "explode": false, + "kind": "Client", + "defaultValue": { + "$id": "1623", + "type": { + "$id": "1624", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "1625", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "1626" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.Chaos.CapabilityTypes", + "apiVersions": [ + "2024-11-01-preview", + "2025-01-01" + ], + "parent": { + "$ref": "834" + } + }, + { + "$id": "1627", + "kind": "client", + "name": "Experiments", + "namespace": "Azure.ResourceManager.Chaos", + "methods": [ + { + "$id": "1628", + "kind": "basic", + "name": "get", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-01-01" + ], + "doc": "Get a Experiment resource.", + "operation": { + "$id": "1629", + "name": "get", + "resourceName": "Experiment", + "doc": "Get a Experiment resource.", + "accessibility": "public", + "parameters": [ + { + "$id": "1630", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1631", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1632", + "type": { + "$id": "1633", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-01-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1634", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1635", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1636", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1637", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1638", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1639", + "name": "experimentName", + "nameInRequest": "experimentName", + "doc": "String that represents a Experiment resource name.", + "type": { + "$id": "1640", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1641", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1642", + "kind": "constant", + "valueType": { + "$id": "1643", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "1644", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "334" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.Chaos.Experiments.get", + "decorators": [], + "examples": [ + { + "$id": "1645", + "kind": "http", + "name": "Get a Experiment in a resource group.", + "description": "Get a Experiment in a resource group.", + "filePath": "2025-01-01/Experiments_Get.json", + "parameters": [ + { + "$id": "1646", + "parameter": { + "$ref": "1630" + }, + "value": { + "$id": "1647", + "kind": "string", + "type": { + "$ref": "1631" + }, + "value": "2025-01-01" + } + }, + { + "$id": "1648", + "parameter": { + "$ref": "1639" + }, + "value": { + "$id": "1649", + "kind": "string", + "type": { + "$ref": "1640" + }, + "value": "exampleExperiment" + } + }, + { + "$id": "1650", + "parameter": { + "$ref": "1637" + }, + "value": { + "$id": "1651", + "kind": "string", + "type": { + "$ref": "1638" + }, + "value": "exampleRG" + } + }, + { + "$id": "1652", + "parameter": { + "$ref": "1634" + }, + "value": { + "$id": "1653", + "kind": "string", + "type": { + "$ref": "1635" + }, + "value": "6b052e15-03d3-4f17-b2e1-be7f07588291" + } + } + ], + "responses": [ + { + "$id": "1654", + "response": { + "$ref": "1644" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1655", + "kind": "model", + "type": { + "$ref": "334" + }, + "value": { + "$id": "1656", + "name": { + "$id": "1657", + "kind": "string", + "type": { + "$ref": "91" + }, + "value": "exampleExperiment" + }, + "type": { + "$id": "1658", + "kind": "string", + "type": { + "$ref": "95" + }, + "value": "Microsoft.Chaos/experiments" + }, + "id": { + "$id": "1659", + "kind": "string", + "type": { + "$ref": "86" + }, + "value": "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Chaos/experiments/exampleExperiment" + }, + "identity": { + "$id": "1660", + "kind": "model", + "type": { + "$ref": "349" + }, + "value": { + "$id": "1661", + "type": { + "$id": "1662", + "kind": "string", + "type": { + "$ref": "24" + }, + "value": "SystemAssigned" + }, + "principalId": { + "$id": "1663", + "kind": "string", + "type": { + "$ref": "351" + }, + "value": "d04ab567-2c07-43ef-a7f4-4527626b7f56" + }, + "tenantId": { + "$id": "1664", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "8c3e2fb2-fe7a-4bf1-b779-d73990782fe6" + } + } + }, + "location": { + "$id": "1665", + "kind": "string", + "type": { + "$ref": "343" + }, + "value": "centraluseuap" + }, + "properties": { + "$id": "1666", + "kind": "model", + "type": { + "$ref": "383" + }, + "value": { + "$id": "1667", + "selectors": { + "$id": "1668", + "kind": "array", + "type": { + "$ref": "472" + }, + "value": [ + { + "$id": "1669", + "kind": "model", + "type": { + "$ref": "505" + }, + "value": { + "$id": "1670", + "type": { + "$id": "1671", + "kind": "string", + "type": { + "$ref": "520" + }, + "value": "List" + }, + "id": { + "$id": "1672", + "kind": "string", + "type": { + "$ref": "478" + }, + "value": "selector1" + }, + "targets": { + "$id": "1673", + "kind": "array", + "type": { + "$ref": "507" + }, + "value": [ + { + "$id": "1674", + "kind": "model", + "type": { + "$ref": "508" + }, + "value": { + "$id": "1675", + "type": { + "$id": "1676", + "kind": "string", + "type": { + "$ref": "66" + }, + "value": "ChaosTarget" + }, + "id": { + "$id": "1677", + "kind": "string", + "type": { + "$ref": "513" + }, + "value": "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Compute/virtualMachines/exampleVM/providers/Microsoft.Chaos/targets/Microsoft-VirtualMachine" + } + } + } + ] + } + } + } + ] + }, + "steps": { + "$id": "1678", + "kind": "array", + "type": { + "$ref": "388" + }, + "value": [ + { + "$id": "1679", + "kind": "model", + "type": { + "$ref": "389" + }, + "value": { + "$id": "1680", + "name": { + "$id": "1681", + "kind": "string", + "type": { + "$ref": "391" + }, + "value": "step1" + }, + "branches": { + "$id": "1682", + "kind": "array", + "type": { + "$ref": "395" + }, + "value": [ + { + "$id": "1683", + "kind": "model", + "type": { + "$ref": "396" + }, + "value": { + "$id": "1684", + "name": { + "$id": "1685", + "kind": "string", + "type": { + "$ref": "398" + }, + "value": "branch1" + }, + "actions": { + "$id": "1686", + "kind": "array", + "type": { + "$ref": "402" + }, + "value": [ + { + "$id": "1687", + "kind": "model", + "type": { + "$ref": "412" + }, + "value": { + "$id": "1688", + "name": { + "$id": "1689", + "kind": "string", + "type": { + "$ref": "408" + }, + "value": "urn:csci:provider:providername:Shutdown/1.0" + }, + "type": { + "$id": "1690", + "kind": "string", + "type": { + "$ref": "436" + }, + "value": "continuous" + }, + "duration": { + "$id": "1691", + "kind": "string", + "type": { + "$ref": "414" + }, + "value": "PT10M" + }, + "parameters": { + "$id": "1692", + "kind": "array", + "type": { + "$ref": "419" + }, + "value": [ + { + "$id": "1693", + "kind": "model", + "type": { + "$ref": "420" + }, + "value": { + "$id": "1694", + "key": { + "$id": "1695", + "kind": "string", + "type": { + "$ref": "422" + }, + "value": "abruptShutdown" + }, + "value": { + "$id": "1696", + "kind": "string", + "type": { + "$ref": "426" + }, + "value": "false" + } + } + } + ] + }, + "selectorId": { + "$id": "1697", + "kind": "string", + "type": { + "$ref": "432" + }, + "value": "selector1" + } + } + } + ] + } + } + } + ] + } + } + } + ] + } + } + }, + "systemData": { + "$id": "1698", + "kind": "model", + "type": { + "$ref": "100" + }, + "value": { + "$id": "1699", + "createdAt": { + "$id": "1700", + "kind": "string", + "type": { + "$ref": "109" + }, + "value": "2021-07-01T00:00:00.0Z" + }, + "createdBy": { + "$id": "1701", + "kind": "string", + "type": { + "$ref": "102" + }, + "value": "User" + }, + "createdByType": { + "$id": "1702", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "b3a41dba-4415-4d36-9ee8-e5eaa86db976" + }, + "lastModifiedAt": { + "$id": "1703", + "kind": "string", + "type": { + "$ref": "121" + }, + "value": "2021-07-01T00:00:00.0Z" + }, + "lastModifiedBy": { + "$id": "1704", + "kind": "string", + "type": { + "$ref": "114" + }, + "value": "User" + }, + "lastModifiedByType": { + "$id": "1705", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "b3a41dba-4415-4d36-9ee8-e5eaa86db976" + } + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "1706", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1707", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1708", + "name": "experimentName", + "nameInRequest": "experimentName", + "doc": "String that represents a Experiment resource name.", + "type": { + "$id": "1709", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1710", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "1642" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "1711", + "type": { + "$ref": "334" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.Chaos.Experiments.get" + }, + { + "$id": "1712", + "kind": "lro", + "name": "createOrUpdate", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-01-01" + ], + "doc": "Create or update a Experiment resource.", + "operation": { + "$id": "1713", + "name": "createOrUpdate", + "resourceName": "Experiment", + "doc": "Create or update a Experiment resource.", + "accessibility": "public", + "parameters": [ + { + "$id": "1714", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1715", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1716", + "type": { + "$id": "1717", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-01-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1718", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1719", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1720", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1721", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1722", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1723", + "name": "experimentName", + "nameInRequest": "experimentName", + "doc": "String that represents a Experiment resource name.", + "type": { + "$id": "1724", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1725", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "1726", + "kind": "constant", + "valueType": { + "$id": "1727", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1728", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1729", + "kind": "constant", + "valueType": { + "$id": "1730", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1731", + "name": "resource", + "nameInRequest": "resource", + "doc": "Experiment resource to be created or updated.", + "type": { + "$ref": "334" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "1732", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "334" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + { + "$id": "1733", + "statusCodes": [ + 201 + ], + "bodyType": { + "$ref": "334" + }, + "headers": [ + { + "$id": "1734", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "1735", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "1736", + "name": "retryAfter", + "nameInResponse": "Retry-After", + "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "type": { + "$id": "1737", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "PUT", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "longRunning": { + "$id": "1738", + "finalStateVia": 0, + "finalResponse": { + "$id": "1739", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "334" + } + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.Chaos.Experiments.createOrUpdate", + "decorators": [], + "examples": [ + { + "$id": "1740", + "kind": "http", + "name": "Create/update a Experiment in a resource group.", + "description": "Create/update a Experiment in a resource group.", + "filePath": "2025-01-01/Experiments_CreateOrUpdate.json", + "parameters": [ + { + "$id": "1741", + "parameter": { + "$ref": "1714" + }, + "value": { + "$id": "1742", + "kind": "string", + "type": { + "$ref": "1715" + }, + "value": "2025-01-01" + } + }, + { + "$id": "1743", + "parameter": { + "$ref": "1731" + }, + "value": { + "$id": "1744", + "kind": "model", + "type": { + "$ref": "334" + }, + "value": { + "$id": "1745", + "identity": { + "$id": "1746", + "kind": "model", + "type": { + "$ref": "349" + }, + "value": { + "$id": "1747", + "type": { + "$id": "1748", + "kind": "string", + "type": { + "$ref": "24" + }, + "value": "SystemAssigned" + } + } + }, + "tags": { + "$id": "1749", + "kind": "dict", + "type": { + "$ref": "337" + }, + "value": { + "$id": "1750", + "key7131": { + "$id": "1751", + "kind": "string", + "type": { + "$ref": "339" + }, + "value": "ryohwcoiccwsnewjigfmijz" + }, + "key2138": { + "$id": "1752", + "kind": "string", + "type": { + "$ref": "339" + }, + "value": "fjaeecgnvqd" + } + } + }, + "location": { + "$id": "1753", + "kind": "string", + "type": { + "$ref": "343" + }, + "value": "eastus2euap" + }, + "properties": { + "$id": "1754", + "kind": "model", + "type": { + "$ref": "383" + }, + "value": { + "$id": "1755", + "selectors": { + "$id": "1756", + "kind": "array", + "type": { + "$ref": "472" + }, + "value": [ + { + "$id": "1757", + "kind": "model", + "type": { + "$ref": "505" + }, + "value": { + "$id": "1758", + "type": { + "$id": "1759", + "kind": "string", + "type": { + "$ref": "520" + }, + "value": "List" + }, + "id": { + "$id": "1760", + "kind": "string", + "type": { + "$ref": "478" + }, + "value": "selector1" + }, + "targets": { + "$id": "1761", + "kind": "array", + "type": { + "$ref": "507" + }, + "value": [ + { + "$id": "1762", + "kind": "model", + "type": { + "$ref": "508" + }, + "value": { + "$id": "1763", + "type": { + "$id": "1764", + "kind": "string", + "type": { + "$ref": "66" + }, + "value": "ChaosTarget" + }, + "id": { + "$id": "1765", + "kind": "string", + "type": { + "$ref": "513" + }, + "value": "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Compute/virtualMachines/exampleVM/providers/Microsoft.Chaos/targets/Microsoft-VirtualMachine" + } + } + } + ] + } + } + } + ] + }, + "steps": { + "$id": "1766", + "kind": "array", + "type": { + "$ref": "388" + }, + "value": [ + { + "$id": "1767", + "kind": "model", + "type": { + "$ref": "389" + }, + "value": { + "$id": "1768", + "name": { + "$id": "1769", + "kind": "string", + "type": { + "$ref": "391" + }, + "value": "step1" + }, + "branches": { + "$id": "1770", + "kind": "array", + "type": { + "$ref": "395" + }, + "value": [ + { + "$id": "1771", + "kind": "model", + "type": { + "$ref": "396" + }, + "value": { + "$id": "1772", + "name": { + "$id": "1773", + "kind": "string", + "type": { + "$ref": "398" + }, + "value": "branch1" + }, + "actions": { + "$id": "1774", + "kind": "array", + "type": { + "$ref": "402" + }, + "value": [ + { + "$id": "1775", + "kind": "model", + "type": { + "$ref": "412" + }, + "value": { + "$id": "1776", + "name": { + "$id": "1777", + "kind": "string", + "type": { + "$ref": "408" + }, + "value": "urn:csci:microsoft:virtualMachine:shutdown/1.0" + }, + "type": { + "$id": "1778", + "kind": "string", + "type": { + "$ref": "436" + }, + "value": "continuous" + }, + "duration": { + "$id": "1779", + "kind": "string", + "type": { + "$ref": "414" + }, + "value": "PT10M" + }, + "parameters": { + "$id": "1780", + "kind": "array", + "type": { + "$ref": "419" + }, + "value": [ + { + "$id": "1781", + "kind": "model", + "type": { + "$ref": "420" + }, + "value": { + "$id": "1782", + "key": { + "$id": "1783", + "kind": "string", + "type": { + "$ref": "422" + }, + "value": "abruptShutdown" + }, + "value": { + "$id": "1784", + "kind": "string", + "type": { + "$ref": "426" + }, + "value": "false" + } + } + } + ] + }, + "selectorId": { + "$id": "1785", + "kind": "string", + "type": { + "$ref": "432" + }, + "value": "selector1" + } + } + } + ] + } + } + } + ] + } + } + } + ] + } + } + } + } + } + }, + { + "$id": "1786", + "parameter": { + "$ref": "1723" + }, + "value": { + "$id": "1787", + "kind": "string", + "type": { + "$ref": "1724" + }, + "value": "exampleExperiment" + } + }, + { + "$id": "1788", + "parameter": { + "$ref": "1721" + }, + "value": { + "$id": "1789", + "kind": "string", + "type": { + "$ref": "1722" + }, + "value": "exampleRG" + } + }, + { + "$id": "1790", + "parameter": { + "$ref": "1718" + }, + "value": { + "$id": "1791", + "kind": "string", + "type": { + "$ref": "1719" + }, + "value": "6b052e15-03d3-4f17-b2e1-be7f07588291" + } + } + ], + "responses": [ + { + "$id": "1792", + "response": { + "$ref": "1732" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1793", + "kind": "model", + "type": { + "$ref": "334" + }, + "value": { + "$id": "1794", + "name": { + "$id": "1795", + "kind": "string", + "type": { + "$ref": "91" + }, + "value": "exampleExperiment" + }, + "type": { + "$id": "1796", + "kind": "string", + "type": { + "$ref": "95" + }, + "value": "Microsoft.Chaos/experiments" + }, + "id": { + "$id": "1797", + "kind": "string", + "type": { + "$ref": "86" + }, + "value": "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Chaos/experiments/exampleExperiment" + }, + "identity": { + "$id": "1798", + "kind": "model", + "type": { + "$ref": "349" + }, + "value": { + "$id": "1799", + "type": { + "$id": "1800", + "kind": "string", + "type": { + "$ref": "24" + }, + "value": "SystemAssigned" + }, + "principalId": { + "$id": "1801", + "kind": "string", + "type": { + "$ref": "351" + }, + "value": "d04ab567-2c07-43ef-a7f4-4527626b7f56" + }, + "tenantId": { + "$id": "1802", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "8c3e2fb2-fe7a-4bf1-b779-d73990782fe6" + } + } + }, + "tags": { + "$id": "1803", + "kind": "dict", + "type": { + "$ref": "337" + }, + "value": { + "$id": "1804", + "key7131": { + "$id": "1805", + "kind": "string", + "type": { + "$ref": "339" + }, + "value": "ryohwcoiccwsnewjigfmijz" + }, + "key2138": { + "$id": "1806", + "kind": "string", + "type": { + "$ref": "339" + }, + "value": "fjaeecgnvqd" + } + } + }, + "location": { + "$id": "1807", + "kind": "string", + "type": { + "$ref": "343" + }, + "value": "eastus2euap" + }, + "properties": { + "$id": "1808", + "kind": "model", + "type": { + "$ref": "383" + }, + "value": { + "$id": "1809", + "provisioningState": { + "$id": "1810", + "kind": "string", + "type": { + "$ref": "34" + }, + "value": "Updating" + }, + "selectors": { + "$id": "1811", + "kind": "array", + "type": { + "$ref": "472" + }, + "value": [ + { + "$id": "1812", + "kind": "model", + "type": { + "$ref": "505" + }, + "value": { + "$id": "1813", + "type": { + "$id": "1814", + "kind": "string", + "type": { + "$ref": "520" + }, + "value": "List" + }, + "id": { + "$id": "1815", + "kind": "string", + "type": { + "$ref": "478" + }, + "value": "selector1" + }, + "targets": { + "$id": "1816", + "kind": "array", + "type": { + "$ref": "507" + }, + "value": [ + { + "$id": "1817", + "kind": "model", + "type": { + "$ref": "508" + }, + "value": { + "$id": "1818", + "type": { + "$id": "1819", + "kind": "string", + "type": { + "$ref": "66" + }, + "value": "ChaosTarget" + }, + "id": { + "$id": "1820", + "kind": "string", + "type": { + "$ref": "513" + }, + "value": "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Compute/virtualMachines/exampleVM/providers/Microsoft.Chaos/targets/Microsoft-VirtualMachine" + } + } + } + ] + } + } + } + ] + }, + "steps": { + "$id": "1821", + "kind": "array", + "type": { + "$ref": "388" + }, + "value": [ + { + "$id": "1822", + "kind": "model", + "type": { + "$ref": "389" + }, + "value": { + "$id": "1823", + "name": { + "$id": "1824", + "kind": "string", + "type": { + "$ref": "391" + }, + "value": "step1" + }, + "branches": { + "$id": "1825", + "kind": "array", + "type": { + "$ref": "395" + }, + "value": [ + { + "$id": "1826", + "kind": "model", + "type": { + "$ref": "396" + }, + "value": { + "$id": "1827", + "name": { + "$id": "1828", + "kind": "string", + "type": { + "$ref": "398" + }, + "value": "branch1" + }, + "actions": { + "$id": "1829", + "kind": "array", + "type": { + "$ref": "402" + }, + "value": [ + { + "$id": "1830", + "kind": "model", + "type": { + "$ref": "412" + }, + "value": { + "$id": "1831", + "name": { + "$id": "1832", + "kind": "string", + "type": { + "$ref": "408" + }, + "value": "urn:csci:microsoft:virtualMachine:shutdown/1.0" + }, + "type": { + "$id": "1833", + "kind": "string", + "type": { + "$ref": "436" + }, + "value": "continuous" + }, + "duration": { + "$id": "1834", + "kind": "string", + "type": { + "$ref": "414" + }, + "value": "PT10M" + }, + "parameters": { + "$id": "1835", + "kind": "array", + "type": { + "$ref": "419" + }, + "value": [ + { + "$id": "1836", + "kind": "model", + "type": { + "$ref": "420" + }, + "value": { + "$id": "1837", + "key": { + "$id": "1838", + "kind": "string", + "type": { + "$ref": "422" + }, + "value": "abruptShutdown" + }, + "value": { + "$id": "1839", + "kind": "string", + "type": { + "$ref": "426" + }, + "value": "false" + } + } + } + ] + }, + "selectorId": { + "$id": "1840", + "kind": "string", + "type": { + "$ref": "432" + }, + "value": "selector1" + } + } + } + ] + } + } + } + ] + } + } + } + ] + } + } + }, + "systemData": { + "$id": "1841", + "kind": "model", + "type": { + "$ref": "100" + }, + "value": { + "$id": "1842", + "createdAt": { + "$id": "1843", + "kind": "string", + "type": { + "$ref": "109" + }, + "value": "2021-07-01T00:00:00.0Z" + }, + "createdBy": { + "$id": "1844", + "kind": "string", + "type": { + "$ref": "102" + }, + "value": "User" + }, + "createdByType": { + "$id": "1845", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "b3a41dba-4415-4d36-9ee8-e5eaa86db976" + }, + "lastModifiedAt": { + "$id": "1846", + "kind": "string", + "type": { + "$ref": "121" + }, + "value": "2021-07-01T00:00:00.0Z" + }, + "lastModifiedBy": { + "$id": "1847", + "kind": "string", + "type": { + "$ref": "114" + }, + "value": "User" + }, + "lastModifiedByType": { + "$id": "1848", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "b3a41dba-4415-4d36-9ee8-e5eaa86db976" + } + } + } + } + } + }, + { + "$id": "1849", + "response": { + "$ref": "1733" + }, + "statusCode": 201, + "bodyValue": { + "$id": "1850", + "kind": "model", + "type": { + "$ref": "334" + }, + "value": { + "$id": "1851", + "name": { + "$id": "1852", + "kind": "string", + "type": { + "$ref": "91" + }, + "value": "exampleExperiment" + }, + "type": { + "$id": "1853", + "kind": "string", + "type": { + "$ref": "95" + }, + "value": "Microsoft.Chaos/experiments" + }, + "id": { + "$id": "1854", + "kind": "string", + "type": { + "$ref": "86" + }, + "value": "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Chaos/experiments/exampleExperiment" + }, + "identity": { + "$id": "1855", + "kind": "model", + "type": { + "$ref": "349" + }, + "value": { + "$id": "1856", + "type": { + "$id": "1857", + "kind": "string", + "type": { + "$ref": "24" + }, + "value": "SystemAssigned" + }, + "principalId": { + "$id": "1858", + "kind": "string", + "type": { + "$ref": "351" + }, + "value": "d04ab567-2c07-43ef-a7f4-4527626b7f56" + }, + "tenantId": { + "$id": "1859", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "8c3e2fb2-fe7a-4bf1-b779-d73990782fe6" + } + } + }, + "tags": { + "$id": "1860", + "kind": "dict", + "type": { + "$ref": "337" + }, + "value": { + "$id": "1861", + "key7131": { + "$id": "1862", + "kind": "string", + "type": { + "$ref": "339" + }, + "value": "ryohwcoiccwsnewjigfmijz" + }, + "key2138": { + "$id": "1863", + "kind": "string", + "type": { + "$ref": "339" + }, + "value": "fjaeecgnvqd" + } + } + }, + "location": { + "$id": "1864", + "kind": "string", + "type": { + "$ref": "343" + }, + "value": "eastus2euap" + }, + "properties": { + "$id": "1865", + "kind": "model", + "type": { + "$ref": "383" + }, + "value": { + "$id": "1866", + "provisioningState": { + "$id": "1867", + "kind": "string", + "type": { + "$ref": "34" + }, + "value": "Creating" + }, + "selectors": { + "$id": "1868", + "kind": "array", + "type": { + "$ref": "472" + }, + "value": [ + { + "$id": "1869", + "kind": "model", + "type": { + "$ref": "505" + }, + "value": { + "$id": "1870", + "type": { + "$id": "1871", + "kind": "string", + "type": { + "$ref": "520" + }, + "value": "List" + }, + "id": { + "$id": "1872", + "kind": "string", + "type": { + "$ref": "478" + }, + "value": "selector1" + }, + "targets": { + "$id": "1873", + "kind": "array", + "type": { + "$ref": "507" + }, + "value": [ + { + "$id": "1874", + "kind": "model", + "type": { + "$ref": "508" + }, + "value": { + "$id": "1875", + "type": { + "$id": "1876", + "kind": "string", + "type": { + "$ref": "66" + }, + "value": "ChaosTarget" + }, + "id": { + "$id": "1877", + "kind": "string", + "type": { + "$ref": "513" + }, + "value": "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Compute/virtualMachines/exampleVM/providers/Microsoft.Chaos/targets/Microsoft-VirtualMachine" + } + } + } + ] + } + } + } + ] + }, + "steps": { + "$id": "1878", + "kind": "array", + "type": { + "$ref": "388" + }, + "value": [ + { + "$id": "1879", + "kind": "model", + "type": { + "$ref": "389" + }, + "value": { + "$id": "1880", + "name": { + "$id": "1881", + "kind": "string", + "type": { + "$ref": "391" + }, + "value": "step1" + }, + "branches": { + "$id": "1882", + "kind": "array", + "type": { + "$ref": "395" + }, + "value": [ + { + "$id": "1883", + "kind": "model", + "type": { + "$ref": "396" + }, + "value": { + "$id": "1884", + "name": { + "$id": "1885", + "kind": "string", + "type": { + "$ref": "398" + }, + "value": "branch1" + }, + "actions": { + "$id": "1886", + "kind": "array", + "type": { + "$ref": "402" + }, + "value": [ + { + "$id": "1887", + "kind": "model", + "type": { + "$ref": "412" + }, + "value": { + "$id": "1888", + "name": { + "$id": "1889", + "kind": "string", + "type": { + "$ref": "408" + }, + "value": "urn:csci:microsoft:virtualMachine:shutdown/1.0" + }, + "type": { + "$id": "1890", + "kind": "string", + "type": { + "$ref": "436" + }, + "value": "continuous" + }, + "duration": { + "$id": "1891", + "kind": "string", + "type": { + "$ref": "414" + }, + "value": "PT10M" + }, + "parameters": { + "$id": "1892", + "kind": "array", + "type": { + "$ref": "419" + }, + "value": [ + { + "$id": "1893", + "kind": "model", + "type": { + "$ref": "420" + }, + "value": { + "$id": "1894", + "key": { + "$id": "1895", + "kind": "string", + "type": { + "$ref": "422" + }, + "value": "abruptShutdown" + }, + "value": { + "$id": "1896", + "kind": "string", + "type": { + "$ref": "426" + }, + "value": "false" + } + } + } + ] + }, + "selectorId": { + "$id": "1897", + "kind": "string", + "type": { + "$ref": "432" + }, + "value": "selector1" + } + } + } + ] + } + } + } + ] + } + } + } + ] + } + } + }, + "systemData": { + "$id": "1898", + "kind": "model", + "type": { + "$ref": "100" + }, + "value": { + "$id": "1899", + "createdAt": { + "$id": "1900", + "kind": "string", + "type": { + "$ref": "109" + }, + "value": "2021-07-01T00:00:00.0Z" + }, + "createdBy": { + "$id": "1901", + "kind": "string", + "type": { + "$ref": "102" + }, + "value": "User" + }, + "createdByType": { + "$id": "1902", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "b3a41dba-4415-4d36-9ee8-e5eaa86db976" + }, + "lastModifiedAt": { + "$id": "1903", + "kind": "string", + "type": { + "$ref": "121" + }, + "value": "2021-07-01T00:00:00.0Z" + }, + "lastModifiedBy": { + "$id": "1904", + "kind": "string", + "type": { + "$ref": "114" + }, + "value": "User" + }, + "lastModifiedByType": { + "$id": "1905", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "b3a41dba-4415-4d36-9ee8-e5eaa86db976" + } + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "1906", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1907", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1908", + "name": "experimentName", + "nameInRequest": "experimentName", + "doc": "String that represents a Experiment resource name.", + "type": { + "$id": "1909", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1910", + "name": "resource", + "nameInRequest": "resource", + "doc": "Experiment resource to be created or updated.", + "type": { + "$ref": "334" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1911", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "1912", + "kind": "constant", + "valueType": { + "$id": "1913", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1914", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "1915", + "kind": "constant", + "valueType": { + "$id": "1916", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "1917", + "type": { + "$ref": "334" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.Chaos.Experiments.createOrUpdate" + }, + { + "$id": "1918", + "kind": "lro", + "name": "update", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-01-01" + ], + "doc": "The operation to update an experiment.", + "operation": { + "$id": "1919", + "name": "update", + "resourceName": "Experiment", + "doc": "The operation to update an experiment.", + "accessibility": "public", + "parameters": [ + { + "$id": "1920", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1921", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1922", + "type": { + "$id": "1923", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-01-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1924", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1925", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1926", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1927", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1928", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1929", + "name": "experimentName", + "nameInRequest": "experimentName", + "doc": "String that represents a Experiment resource name.", + "type": { + "$id": "1930", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1931", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "1932", + "kind": "constant", + "valueType": { + "$id": "1933", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1934", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1935", + "kind": "constant", + "valueType": { + "$id": "1936", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1937", + "name": "properties", + "nameInRequest": "properties", + "doc": "Parameters supplied to the Update experiment operation.", + "type": { + "$ref": "570" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "1938", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "334" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + { + "$id": "1939", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "1940", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "1941", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "1942", + "name": "retryAfter", + "nameInResponse": "Retry-After", + "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "type": { + "$id": "1943", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false + } + ], + "httpMethod": "PATCH", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "longRunning": { + "$id": "1944", + "finalStateVia": 1, + "finalResponse": { + "$id": "1945", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "334" + } + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": false, + "crossLanguageDefinitionId": "Microsoft.Chaos.Experiments.update", + "decorators": [], + "examples": [ + { + "$id": "1946", + "kind": "http", + "name": "Update an Experiment in a resource group.", + "description": "Update an Experiment in a resource group.", + "filePath": "2025-01-01/Experiments_Update.json", + "parameters": [ + { + "$id": "1947", + "parameter": { + "$ref": "1920" + }, + "value": { + "$id": "1948", + "kind": "string", + "type": { + "$ref": "1921" + }, + "value": "2025-01-01" + } + }, + { + "$id": "1949", + "parameter": { + "$ref": "1937" + }, + "value": { + "$id": "1950", + "kind": "model", + "type": { + "$ref": "570" + }, + "value": { + "$id": "1951", + "identity": { + "$id": "1952", + "kind": "model", + "type": { + "$ref": "349" + }, + "value": { + "$id": "1953", + "type": { + "$id": "1954", + "kind": "string", + "type": { + "$ref": "24" + }, + "value": "UserAssigned" + }, + "userAssignedIdentities": { + "$id": "1955", + "kind": "dict", + "type": { + "$ref": "364" + }, + "value": { + "$id": "1956", + "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.ManagedIdentity/userAssignedIdentity/exampleUMI": { + "$id": "1957", + "kind": "model", + "type": { + "$ref": "367" + }, + "value": { + "$id": "1958" + } + } + } + } + } + }, + "tags": { + "$id": "1959", + "kind": "dict", + "type": { + "$ref": "572" + }, + "value": { + "$id": "1960", + "key1": { + "$id": "1961", + "kind": "string", + "type": { + "$ref": "574" + }, + "value": "value1" + }, + "key2": { + "$id": "1962", + "kind": "string", + "type": { + "$ref": "574" + }, + "value": "value2" + } + } + } + } + } + }, + { + "$id": "1963", + "parameter": { + "$ref": "1929" + }, + "value": { + "$id": "1964", + "kind": "string", + "type": { + "$ref": "1930" + }, + "value": "exampleExperiment" + } + }, + { + "$id": "1965", + "parameter": { + "$ref": "1927" + }, + "value": { + "$id": "1966", + "kind": "string", + "type": { + "$ref": "1928" + }, + "value": "exampleRG" + } + }, + { + "$id": "1967", + "parameter": { + "$ref": "1924" + }, + "value": { + "$id": "1968", + "kind": "string", + "type": { + "$ref": "1925" + }, + "value": "6b052e15-03d3-4f17-b2e1-be7f07588291" + } + } + ], + "responses": [ + { + "$id": "1969", + "response": { + "$ref": "1938" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1970", + "kind": "model", + "type": { + "$ref": "334" + }, + "value": { + "$id": "1971", + "name": { + "$id": "1972", + "kind": "string", + "type": { + "$ref": "91" + }, + "value": "exampleExperiment" + }, + "type": { + "$id": "1973", + "kind": "string", + "type": { + "$ref": "95" + }, + "value": "Microsoft.Chaos/experiments" + }, + "id": { + "$id": "1974", + "kind": "string", + "type": { + "$ref": "86" + }, + "value": "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Chaos/experiments/exampleExperiment" + }, + "identity": { + "$id": "1975", + "kind": "model", + "type": { + "$ref": "349" + }, + "value": { + "$id": "1976", + "type": { + "$id": "1977", + "kind": "string", + "type": { + "$ref": "24" + }, + "value": "UserAssigned" + }, + "principalId": { + "$id": "1978", + "kind": "string", + "type": { + "$ref": "351" + }, + "value": "d04ab567-2c07-43ef-a7f4-4527626b7f56" + }, + "tenantId": { + "$id": "1979", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "8c3e2fb2-fe7a-4bf1-b779-d73990782fe6" + }, + "userAssignedIdentities": { + "$id": "1980", + "kind": "dict", + "type": { + "$ref": "364" + }, + "value": { + "$id": "1981", + "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.ManagedIdentity/userAssignedIdentity/exampleUMI": { + "$id": "1982", + "kind": "model", + "type": { + "$ref": "367" + }, + "value": { + "$id": "1983" + } + } + } + } + } + }, + "location": { + "$id": "1984", + "kind": "string", + "type": { + "$ref": "343" + }, + "value": "centraluseuap" + }, + "properties": { + "$id": "1985", + "kind": "model", + "type": { + "$ref": "383" + }, + "value": { + "$id": "1986", + "selectors": { + "$id": "1987", + "kind": "array", + "type": { + "$ref": "472" + }, + "value": [ + { + "$id": "1988", + "kind": "model", + "type": { + "$ref": "505" + }, + "value": { + "$id": "1989", + "type": { + "$id": "1990", + "kind": "string", + "type": { + "$ref": "520" + }, + "value": "List" + }, + "id": { + "$id": "1991", + "kind": "string", + "type": { + "$ref": "478" + }, + "value": "selector1" + }, + "targets": { + "$id": "1992", + "kind": "array", + "type": { + "$ref": "507" + }, + "value": [ + { + "$id": "1993", + "kind": "model", + "type": { + "$ref": "508" + }, + "value": { + "$id": "1994", + "type": { + "$id": "1995", + "kind": "string", + "type": { + "$ref": "66" + }, + "value": "ChaosTarget" + }, + "id": { + "$id": "1996", + "kind": "string", + "type": { + "$ref": "513" + }, + "value": "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Compute/virtualMachines/exampleVM/providers/Microsoft.Chaos/targets/Microsoft-VirtualMachine" + } + } + } + ] + } + } + } + ] + }, + "steps": { + "$id": "1997", + "kind": "array", + "type": { + "$ref": "388" + }, + "value": [ + { + "$id": "1998", + "kind": "model", + "type": { + "$ref": "389" + }, + "value": { + "$id": "1999", + "name": { + "$id": "2000", + "kind": "string", + "type": { + "$ref": "391" + }, + "value": "step1" + }, + "branches": { + "$id": "2001", + "kind": "array", + "type": { + "$ref": "395" + }, + "value": [ + { + "$id": "2002", + "kind": "model", + "type": { + "$ref": "396" + }, + "value": { + "$id": "2003", + "name": { + "$id": "2004", + "kind": "string", + "type": { + "$ref": "398" + }, + "value": "branch1" + }, + "actions": { + "$id": "2005", + "kind": "array", + "type": { + "$ref": "402" + }, + "value": [ + { + "$id": "2006", + "kind": "model", + "type": { + "$ref": "412" + }, + "value": { + "$id": "2007", + "name": { + "$id": "2008", + "kind": "string", + "type": { + "$ref": "408" + }, + "value": "urn:csci:provider:providername:Shutdown/1.0" + }, + "type": { + "$id": "2009", + "kind": "string", + "type": { + "$ref": "436" + }, + "value": "continuous" + }, + "duration": { + "$id": "2010", + "kind": "string", + "type": { + "$ref": "414" + }, + "value": "PT10M" + }, + "parameters": { + "$id": "2011", + "kind": "array", + "type": { + "$ref": "419" + }, + "value": [ + { + "$id": "2012", + "kind": "model", + "type": { + "$ref": "420" + }, + "value": { + "$id": "2013", + "key": { + "$id": "2014", + "kind": "string", + "type": { + "$ref": "422" + }, + "value": "abruptShutdown" + }, + "value": { + "$id": "2015", + "kind": "string", + "type": { + "$ref": "426" + }, + "value": "false" + } + } + } + ] + }, + "selectorId": { + "$id": "2016", + "kind": "string", + "type": { + "$ref": "432" + }, + "value": "selector1" + } + } + } + ] + } + } + } + ] + } + } + } + ] + } + } + }, + "systemData": { + "$id": "2017", + "kind": "model", + "type": { + "$ref": "100" + }, + "value": { + "$id": "2018", + "createdAt": { + "$id": "2019", + "kind": "string", + "type": { + "$ref": "109" + }, + "value": "2021-07-01T00:00:00.0Z" + }, + "createdBy": { + "$id": "2020", + "kind": "string", + "type": { + "$ref": "102" + }, + "value": "User" + }, + "createdByType": { + "$id": "2021", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "b3a41dba-4415-4d36-9ee8-e5eaa86db976" + }, + "lastModifiedAt": { + "$id": "2022", + "kind": "string", + "type": { + "$ref": "121" + }, + "value": "2021-07-01T00:00:00.0Z" + }, + "lastModifiedBy": { + "$id": "2023", + "kind": "string", + "type": { + "$ref": "114" + }, + "value": "User" + }, + "lastModifiedByType": { + "$id": "2024", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "b3a41dba-4415-4d36-9ee8-e5eaa86db976" + } + } + }, + "tags": { + "$id": "2025", + "kind": "dict", + "type": { + "$ref": "337" + }, + "value": { + "$id": "2026", + "key1": { + "$id": "2027", + "kind": "string", + "type": { + "$ref": "339" + }, + "value": "value1" + }, + "key2": { + "$id": "2028", + "kind": "string", + "type": { + "$ref": "339" + }, + "value": "value2" + } + } + } + } + } + }, + { + "$id": "2029", + "response": { + "$ref": "1939" + }, + "statusCode": 202 + } + ] + } + ] + }, + "parameters": [ + { + "$id": "2030", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2031", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2032", + "name": "experimentName", + "nameInRequest": "experimentName", + "doc": "String that represents a Experiment resource name.", + "type": { + "$id": "2033", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2034", + "name": "properties", + "nameInRequest": "properties", + "doc": "Parameters supplied to the Update experiment operation.", + "type": { + "$ref": "570" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2035", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "2036", + "kind": "constant", + "valueType": { + "$id": "2037", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2038", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "2039", + "kind": "constant", + "valueType": { + "$id": "2040", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "2041", + "type": { + "$ref": "334" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.Chaos.Experiments.update" + }, + { + "$id": "2042", + "kind": "lro", + "name": "delete", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-01-01" + ], + "doc": "Delete a Experiment resource.", + "operation": { + "$id": "2043", + "name": "delete", + "resourceName": "Experiment", + "doc": "Delete a Experiment resource.", + "accessibility": "public", + "parameters": [ + { + "$id": "2044", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "2045", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "2046", + "type": { + "$id": "2047", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-01-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2048", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "2049", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "2050", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2051", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2052", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2053", + "name": "experimentName", + "nameInRequest": "experimentName", + "doc": "String that represents a Experiment resource name.", + "type": { + "$id": "2054", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2055", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "2056", + "kind": "constant", + "valueType": { + "$id": "2057", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "2058", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "2059", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "2060", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "2061", + "name": "retryAfter", + "nameInResponse": "Retry-After", + "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "type": { + "$id": "2062", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false + }, + { + "$id": "2063", + "statusCodes": [ + 204 + ], + "headers": [], + "isErrorResponse": false + } + ], + "httpMethod": "DELETE", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}", + "bufferResponse": true, + "longRunning": { + "$id": "2064", + "finalStateVia": 1, + "finalResponse": { + "$id": "2065", + "statusCodes": [ + 204 + ] + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.Chaos.Experiments.delete", + "decorators": [], + "examples": [ + { + "$id": "2066", + "kind": "http", + "name": "Delete a Experiment in a resource group.", + "description": "Delete a Experiment in a resource group.", + "filePath": "2025-01-01/Experiments_Delete.json", + "parameters": [ + { + "$id": "2067", + "parameter": { + "$ref": "2044" + }, + "value": { + "$id": "2068", + "kind": "string", + "type": { + "$ref": "2045" + }, + "value": "2025-01-01" + } + }, + { + "$id": "2069", + "parameter": { + "$ref": "2053" + }, + "value": { + "$id": "2070", + "kind": "string", + "type": { + "$ref": "2054" + }, + "value": "exampleExperiment" + } + }, + { + "$id": "2071", + "parameter": { + "$ref": "2051" + }, + "value": { + "$id": "2072", + "kind": "string", + "type": { + "$ref": "2052" + }, + "value": "exampleRG" + } + }, + { + "$id": "2073", + "parameter": { + "$ref": "2048" + }, + "value": { + "$id": "2074", + "kind": "string", + "type": { + "$ref": "2049" + }, + "value": "6b052e15-03d3-4f17-b2e1-be7f07588291" + } + } + ], + "responses": [ + { + "$id": "2075", + "response": { + "$ref": "2058" + }, + "statusCode": 202 + }, + { + "$id": "2076", + "response": { + "$ref": "2063" + }, + "statusCode": 204 + } + ] + } + ] + }, + "parameters": [ + { + "$id": "2077", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2078", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2079", + "name": "experimentName", + "nameInRequest": "experimentName", + "doc": "String that represents a Experiment resource name.", + "type": { + "$id": "2080", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2081", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "2082", + "kind": "constant", + "valueType": { + "$id": "2083", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "2084" + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.Chaos.Experiments.delete" + }, + { + "$id": "2085", + "kind": "paging", + "name": "list", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-01-01" + ], + "doc": "Get a list of Experiment resources in a resource group.", + "operation": { + "$id": "2086", + "name": "list", + "resourceName": "Experiment", + "doc": "Get a list of Experiment resources in a resource group.", + "accessibility": "public", + "parameters": [ + { + "$id": "2087", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "2088", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "2089", + "type": { + "$id": "2090", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-01-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2091", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "2092", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "2093", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2094", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2095", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2096", + "name": "running", + "nameInRequest": "running", + "doc": "Optional value that indicates whether to filter results based on if the Experiment is currently running. If null, then the results will not be filtered.", + "type": { + "$id": "2097", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "location": "Query", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": false, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2098", + "name": "continuationToken", + "nameInRequest": "continuationToken", + "doc": "String that sets the continuation token.", + "type": { + "$id": "2099", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": false, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2100", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "2101", + "kind": "constant", + "valueType": { + "$id": "2102", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "2103", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "580" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments", + "bufferResponse": true, + "paging": { + "$id": "2104", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "2105", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.Chaos.Experiments.list", + "decorators": [], + "examples": [ + { + "$id": "2106", + "kind": "http", + "name": "List all Experiments in a resource group.", + "description": "List all Experiments in a resource group.", + "filePath": "2025-01-01/Experiments_List.json", + "parameters": [ + { + "$id": "2107", + "parameter": { + "$ref": "2087" + }, + "value": { + "$id": "2108", + "kind": "string", + "type": { + "$ref": "2088" + }, + "value": "2025-01-01" + } + }, + { + "$id": "2109", + "parameter": { + "$ref": "2094" + }, + "value": { + "$id": "2110", + "kind": "string", + "type": { + "$ref": "2095" + }, + "value": "exampleRG" + } + }, + { + "$id": "2111", + "parameter": { + "$ref": "2091" + }, + "value": { + "$id": "2112", + "kind": "string", + "type": { + "$ref": "2092" + }, + "value": "6b052e15-03d3-4f17-b2e1-be7f07588291" + } + } + ], + "responses": [ + { + "$id": "2113", + "response": { + "$ref": "2103" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2114", + "kind": "model", + "type": { + "$ref": "580" + }, + "value": { + "$id": "2115", + "nextLink": { + "$id": "2116", + "kind": "string", + "type": { + "$ref": "586" + }, + "value": "https://management.azure.com/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Chaos/experiments?continuationToken=&api-version=2024-11-01-preview" + }, + "value": { + "$id": "2117", + "kind": "array", + "type": { + "$ref": "582" + }, + "value": [ + { + "$id": "2118", + "kind": "model", + "type": { + "$ref": "334" + }, + "value": { + "$id": "2119", + "name": { + "$id": "2120", + "kind": "string", + "type": { + "$ref": "91" + }, + "value": "exampleExperiment" + }, + "type": { + "$id": "2121", + "kind": "string", + "type": { + "$ref": "95" + }, + "value": "Microsoft.Chaos/experiments" + }, + "id": { + "$id": "2122", + "kind": "string", + "type": { + "$ref": "86" + }, + "value": "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Chaos/experiments/exampleExperiment" + }, + "identity": { + "$id": "2123", + "kind": "model", + "type": { + "$ref": "349" + }, + "value": { + "$id": "2124", + "type": { + "$id": "2125", + "kind": "string", + "type": { + "$ref": "24" + }, + "value": "SystemAssigned" + }, + "principalId": { + "$id": "2126", + "kind": "string", + "type": { + "$ref": "351" + }, + "value": "d04ab567-2c07-43ef-a7f4-4527626b7f56" + }, + "tenantId": { + "$id": "2127", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "8c3e2fb2-fe7a-4bf1-b779-d73990782fe6" + } + } + }, + "location": { + "$id": "2128", + "kind": "string", + "type": { + "$ref": "343" + }, + "value": "centraluseuap" + }, + "properties": { + "$id": "2129", + "kind": "model", + "type": { + "$ref": "383" + }, + "value": { + "$id": "2130", + "selectors": { + "$id": "2131", + "kind": "array", + "type": { + "$ref": "472" + }, + "value": [ + { + "$id": "2132", + "kind": "model", + "type": { + "$ref": "505" + }, + "value": { + "$id": "2133", + "type": { + "$id": "2134", + "kind": "string", + "type": { + "$ref": "520" + }, + "value": "List" + }, + "id": { + "$id": "2135", + "kind": "string", + "type": { + "$ref": "478" + }, + "value": "selector1" + }, + "targets": { + "$id": "2136", + "kind": "array", + "type": { + "$ref": "507" + }, + "value": [ + { + "$id": "2137", + "kind": "model", + "type": { + "$ref": "508" + }, + "value": { + "$id": "2138", + "type": { + "$id": "2139", + "kind": "string", + "type": { + "$ref": "66" + }, + "value": "ChaosTarget" + }, + "id": { + "$id": "2140", + "kind": "string", + "type": { + "$ref": "513" + }, + "value": "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Compute/virtualMachines/exampleVM/providers/Microsoft.Chaos/targets/Microsoft-VirtualMachine" + } + } + } + ] + } + } + } + ] + }, + "steps": { + "$id": "2141", + "kind": "array", + "type": { + "$ref": "388" + }, + "value": [ + { + "$id": "2142", + "kind": "model", + "type": { + "$ref": "389" + }, + "value": { + "$id": "2143", + "name": { + "$id": "2144", + "kind": "string", + "type": { + "$ref": "391" + }, + "value": "step1" + }, + "branches": { + "$id": "2145", + "kind": "array", + "type": { + "$ref": "395" + }, + "value": [ + { + "$id": "2146", + "kind": "model", + "type": { + "$ref": "396" + }, + "value": { + "$id": "2147", + "name": { + "$id": "2148", + "kind": "string", + "type": { + "$ref": "398" + }, + "value": "branch1" + }, + "actions": { + "$id": "2149", + "kind": "array", + "type": { + "$ref": "402" + }, + "value": [ + { + "$id": "2150", + "kind": "model", + "type": { + "$ref": "412" + }, + "value": { + "$id": "2151", + "name": { + "$id": "2152", + "kind": "string", + "type": { + "$ref": "408" + }, + "value": "urn:csci:provider:providername:Shutdown/1.0" + }, + "type": { + "$id": "2153", + "kind": "string", + "type": { + "$ref": "436" + }, + "value": "continuous" + }, + "duration": { + "$id": "2154", + "kind": "string", + "type": { + "$ref": "414" + }, + "value": "PT10M" + }, + "parameters": { + "$id": "2155", + "kind": "array", + "type": { + "$ref": "419" + }, + "value": [ + { + "$id": "2156", + "kind": "model", + "type": { + "$ref": "420" + }, + "value": { + "$id": "2157", + "key": { + "$id": "2158", + "kind": "string", + "type": { + "$ref": "422" + }, + "value": "abruptShutdown" + }, + "value": { + "$id": "2159", + "kind": "string", + "type": { + "$ref": "426" + }, + "value": "false" + } + } + } + ] + }, + "selectorId": { + "$id": "2160", + "kind": "string", + "type": { + "$ref": "432" + }, + "value": "selector1" + } + } + } + ] + } + } + } + ] + } + } + } + ] + } + } + }, + "systemData": { + "$id": "2161", + "kind": "model", + "type": { + "$ref": "100" + }, + "value": { + "$id": "2162", + "createdAt": { + "$id": "2163", + "kind": "string", + "type": { + "$ref": "109" + }, + "value": "2021-07-01T00:00:00.0Z" + }, + "createdBy": { + "$id": "2164", + "kind": "string", + "type": { + "$ref": "102" + }, + "value": "User" + }, + "createdByType": { + "$id": "2165", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "b3a41dba-4415-4d36-9ee8-e5eaa86db976" + }, + "lastModifiedAt": { + "$id": "2166", + "kind": "string", + "type": { + "$ref": "121" + }, + "value": "2021-07-01T00:00:00.0Z" + }, + "lastModifiedBy": { + "$id": "2167", + "kind": "string", + "type": { + "$ref": "114" + }, + "value": "User" + }, + "lastModifiedByType": { + "$id": "2168", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "b3a41dba-4415-4d36-9ee8-e5eaa86db976" + } + } + } + } + } + ] + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "2169", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2170", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2171", + "name": "running", + "nameInRequest": "running", + "doc": "Optional value that indicates whether to filter results based on if the Experiment is currently running. If null, then the results will not be filtered.", + "type": { + "$id": "2172", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "location": "Query", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": false, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2173", + "name": "continuationToken", + "nameInRequest": "continuationToken", + "doc": "String that sets the continuation token.", + "type": { + "$id": "2174", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": false, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2175", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "2101" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "2176", + "type": { + "$id": "2177", + "kind": "array", + "name": "ArrayExperiment", + "valueType": { + "$ref": "334" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "resultSegments": [ + "value" + ] + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.Chaos.Experiments.list" + }, + { + "$id": "2178", + "kind": "paging", + "name": "listAll", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-01-01" + ], + "doc": "Get a list of Experiment resources in a subscription.", + "operation": { + "$id": "2179", + "name": "listAll", + "resourceName": "Experiment", + "doc": "Get a list of Experiment resources in a subscription.", + "accessibility": "public", + "parameters": [ + { + "$id": "2180", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "2181", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "2182", + "type": { + "$id": "2183", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-01-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2184", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "2185", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "2186", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2187", + "name": "running", + "nameInRequest": "running", + "doc": "Optional value that indicates whether to filter results based on if the Experiment is currently running. If null, then the results will not be filtered.", + "type": { + "$id": "2188", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "location": "Query", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": false, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2189", + "name": "continuationToken", + "nameInRequest": "continuationToken", + "doc": "String that sets the continuation token.", + "type": { + "$id": "2190", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": false, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2191", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "2192", + "kind": "constant", + "valueType": { + "$id": "2193", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "2194", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "580" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/experiments", + "bufferResponse": true, + "paging": { + "$id": "2195", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "2196", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.Chaos.Experiments.listAll", + "decorators": [], + "examples": [ + { + "$id": "2197", + "kind": "http", + "name": "List all Experiments in a subscription.", + "description": "List all Experiments in a subscription.", + "filePath": "2025-01-01/Experiments_ListAll.json", + "parameters": [ + { + "$id": "2198", + "parameter": { + "$ref": "2180" + }, + "value": { + "$id": "2199", + "kind": "string", + "type": { + "$ref": "2181" + }, + "value": "2025-01-01" + } + }, + { + "$id": "2200", + "parameter": { + "$ref": "2184" + }, + "value": { + "$id": "2201", + "kind": "string", + "type": { + "$ref": "2185" + }, + "value": "6b052e15-03d3-4f17-b2e1-be7f07588291" + } + } + ], + "responses": [ + { + "$id": "2202", + "response": { + "$ref": "2194" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2203", + "kind": "model", + "type": { + "$ref": "580" + }, + "value": { + "$id": "2204", + "nextLink": { + "$id": "2205", + "kind": "string", + "type": { + "$ref": "586" + }, + "value": "https://management.azure.com/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/providers/Microsoft.Chaos/experiments?continuationToken=&api-version=2024-11-01-preview" + }, + "value": { + "$id": "2206", + "kind": "array", + "type": { + "$ref": "582" + }, + "value": [ + { + "$id": "2207", + "kind": "model", + "type": { + "$ref": "334" + }, + "value": { + "$id": "2208", + "name": { + "$id": "2209", + "kind": "string", + "type": { + "$ref": "91" + }, + "value": "exampleExperiment" + }, + "type": { + "$id": "2210", + "kind": "string", + "type": { + "$ref": "95" + }, + "value": "Microsoft.Chaos/experiments" + }, + "id": { + "$id": "2211", + "kind": "string", + "type": { + "$ref": "86" + }, + "value": "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Chaos/experiments/exampleExperiment" + }, + "identity": { + "$id": "2212", + "kind": "model", + "type": { + "$ref": "349" + }, + "value": { + "$id": "2213", + "type": { + "$id": "2214", + "kind": "string", + "type": { + "$ref": "24" + }, + "value": "SystemAssigned" + }, + "principalId": { + "$id": "2215", + "kind": "string", + "type": { + "$ref": "351" + }, + "value": "d04ab567-2c07-43ef-a7f4-4527626b7f56" + }, + "tenantId": { + "$id": "2216", + "kind": "string", + "type": { + "$ref": "356" + }, + "value": "8c3e2fb2-fe7a-4bf1-b779-d73990782fe6" + } + } + }, + "location": { + "$id": "2217", + "kind": "string", + "type": { + "$ref": "343" + }, + "value": "centraluseuap" + }, + "properties": { + "$id": "2218", + "kind": "model", + "type": { + "$ref": "383" + }, + "value": { + "$id": "2219", + "selectors": { + "$id": "2220", + "kind": "array", + "type": { + "$ref": "472" + }, + "value": [ + { + "$id": "2221", + "kind": "model", + "type": { + "$ref": "505" + }, + "value": { + "$id": "2222", + "type": { + "$id": "2223", + "kind": "string", + "type": { + "$ref": "520" + }, + "value": "List" + }, + "id": { + "$id": "2224", + "kind": "string", + "type": { + "$ref": "478" + }, + "value": "selector1" + }, + "targets": { + "$id": "2225", + "kind": "array", + "type": { + "$ref": "507" + }, + "value": [ + { + "$id": "2226", + "kind": "model", + "type": { + "$ref": "508" + }, + "value": { + "$id": "2227", + "type": { + "$id": "2228", + "kind": "string", + "type": { + "$ref": "66" + }, + "value": "ChaosTarget" + }, + "id": { + "$id": "2229", + "kind": "string", + "type": { + "$ref": "513" + }, + "value": "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Compute/virtualMachines/exampleVM/providers/Microsoft.Chaos/targets/Microsoft-VirtualMachine" + } + } + } + ] + } + } + } + ] + }, + "steps": { + "$id": "2230", + "kind": "array", + "type": { + "$ref": "388" + }, + "value": [ + { + "$id": "2231", + "kind": "model", + "type": { + "$ref": "389" + }, + "value": { + "$id": "2232", + "name": { + "$id": "2233", + "kind": "string", + "type": { + "$ref": "391" + }, + "value": "step1" + }, + "branches": { + "$id": "2234", + "kind": "array", + "type": { + "$ref": "395" + }, + "value": [ + { + "$id": "2235", + "kind": "model", + "type": { + "$ref": "396" + }, + "value": { + "$id": "2236", + "name": { + "$id": "2237", + "kind": "string", + "type": { + "$ref": "398" + }, + "value": "branch1" + }, + "actions": { + "$id": "2238", + "kind": "array", + "type": { + "$ref": "402" + }, + "value": [ + { + "$id": "2239", + "kind": "model", + "type": { + "$ref": "412" + }, + "value": { + "$id": "2240", + "name": { + "$id": "2241", + "kind": "string", + "type": { + "$ref": "408" + }, + "value": "urn:csci:provider:providername:Shutdown/1.0" + }, + "type": { + "$id": "2242", + "kind": "string", + "type": { + "$ref": "436" + }, + "value": "continuous" + }, + "duration": { + "$id": "2243", + "kind": "string", + "type": { + "$ref": "414" + }, + "value": "PT10M" + }, + "parameters": { + "$id": "2244", + "kind": "array", + "type": { + "$ref": "419" + }, + "value": [ + { + "$id": "2245", + "kind": "model", + "type": { + "$ref": "420" + }, + "value": { + "$id": "2246", + "key": { + "$id": "2247", + "kind": "string", + "type": { + "$ref": "422" + }, + "value": "abruptShutdown" + }, + "value": { + "$id": "2248", + "kind": "string", + "type": { + "$ref": "426" + }, + "value": "false" + } + } + } + ] + }, + "selectorId": { + "$id": "2249", + "kind": "string", + "type": { + "$ref": "432" + }, + "value": "selector1" + } + } + } + ] + } + } + } + ] + } + } + } + ] + } + } + }, + "systemData": { + "$id": "2250", + "kind": "model", + "type": { + "$ref": "100" + }, + "value": { + "$id": "2251", + "createdAt": { + "$id": "2252", + "kind": "string", + "type": { + "$ref": "109" + }, + "value": "2021-07-01T00:00:00.0Z" + }, + "createdBy": { + "$id": "2253", + "kind": "string", + "type": { + "$ref": "102" + }, + "value": "User" + }, + "createdByType": { + "$id": "2254", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "b3a41dba-4415-4d36-9ee8-e5eaa86db976" + }, + "lastModifiedAt": { + "$id": "2255", + "kind": "string", + "type": { + "$ref": "121" + }, + "value": "2021-07-01T00:00:00.0Z" + }, + "lastModifiedBy": { + "$id": "2256", + "kind": "string", + "type": { + "$ref": "114" + }, + "value": "User" + }, + "lastModifiedByType": { + "$id": "2257", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "b3a41dba-4415-4d36-9ee8-e5eaa86db976" + } + } + } + } + } + ] + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "2258", + "name": "running", + "nameInRequest": "running", + "doc": "Optional value that indicates whether to filter results based on if the Experiment is currently running. If null, then the results will not be filtered.", + "type": { + "$id": "2259", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "location": "Query", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": false, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2260", + "name": "continuationToken", + "nameInRequest": "continuationToken", + "doc": "String that sets the continuation token.", + "type": { + "$id": "2261", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": false, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2262", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "2192" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "2263", + "type": { + "$id": "2264", + "kind": "array", + "name": "ArrayExperiment", + "valueType": { + "$ref": "334" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "resultSegments": [ + "value" + ] + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.Chaos.Experiments.listAll" + }, + { + "$id": "2265", + "kind": "lro", + "name": "cancel", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-01-01" + ], + "doc": "Cancel a running Experiment resource.", + "operation": { + "$id": "2266", + "name": "cancel", + "resourceName": "Experiments", + "doc": "Cancel a running Experiment resource.", + "accessibility": "public", + "parameters": [ + { + "$id": "2267", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "2268", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "2269", + "type": { + "$id": "2270", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-01-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2271", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "2272", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "2273", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2274", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2275", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2276", + "name": "experimentName", + "nameInRequest": "experimentName", + "doc": "String that represents a Experiment resource name.", + "type": { + "$id": "2277", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2278", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "2279", + "kind": "constant", + "valueType": { + "$id": "2280", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "2281", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "2282", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "2283", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "2284", + "name": "retryAfter", + "nameInResponse": "Retry-After", + "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "type": { + "$id": "2285", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}/cancel", + "bufferResponse": true, + "longRunning": { + "$id": "2286", + "finalStateVia": 1, + "finalResponse": { + "$id": "2287", + "statusCodes": [ + 200 + ] + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.Chaos.Experiments.cancel", + "decorators": [], + "examples": [ + { + "$id": "2288", + "kind": "http", + "name": "Cancel a running Experiment.", + "description": "Cancel a running Experiment.", + "filePath": "2025-01-01/Experiments_Cancel.json", + "parameters": [ + { + "$id": "2289", + "parameter": { + "$ref": "2267" + }, + "value": { + "$id": "2290", + "kind": "string", + "type": { + "$ref": "2268" + }, + "value": "2025-01-01" + } + }, + { + "$id": "2291", + "parameter": { + "$ref": "2276" + }, + "value": { + "$id": "2292", + "kind": "string", + "type": { + "$ref": "2277" + }, + "value": "exampleExperiment" + } + }, + { + "$id": "2293", + "parameter": { + "$ref": "2274" + }, + "value": { + "$id": "2294", + "kind": "string", + "type": { + "$ref": "2275" + }, + "value": "exampleRG" + } + }, + { + "$id": "2295", + "parameter": { + "$ref": "2271" + }, + "value": { + "$id": "2296", + "kind": "string", + "type": { + "$ref": "2272" + }, + "value": "6b052e15-03d3-4f17-b2e1-be7f07588291" + } + } + ], + "responses": [ + { + "$id": "2297", + "response": { + "$ref": "2281" + }, + "statusCode": 202 + } + ] + } + ] + }, + "parameters": [ + { + "$id": "2298", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2299", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2300", + "name": "experimentName", + "nameInRequest": "experimentName", + "doc": "String that represents a Experiment resource name.", + "type": { + "$id": "2301", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2302", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "2303", + "kind": "constant", + "valueType": { + "$id": "2304", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "2305" + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.Chaos.Experiments.cancel" + }, + { + "$id": "2306", + "kind": "lro", + "name": "start", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-01-01" + ], + "doc": "Start a Experiment resource.", + "operation": { + "$id": "2307", + "name": "start", + "resourceName": "Experiments", + "doc": "Start a Experiment resource.", + "accessibility": "public", + "parameters": [ + { + "$id": "2308", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "2309", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "2310", + "type": { + "$id": "2311", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-01-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2312", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "2313", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "2314", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2315", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2316", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2317", + "name": "experimentName", + "nameInRequest": "experimentName", + "doc": "String that represents a Experiment resource name.", + "type": { + "$id": "2318", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2319", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "2320", + "kind": "constant", + "valueType": { + "$id": "2321", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "2322", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "2323", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "2324", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "2325", + "name": "retryAfter", + "nameInResponse": "Retry-After", + "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "type": { + "$id": "2326", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}/start", + "bufferResponse": true, + "longRunning": { + "$id": "2327", + "finalStateVia": 1, + "finalResponse": { + "$id": "2328", + "statusCodes": [ + 200 + ] + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.Chaos.Experiments.start", + "decorators": [], + "examples": [ + { + "$id": "2329", + "kind": "http", + "name": "Start a Experiment.", + "description": "Start a Experiment.", + "filePath": "2025-01-01/Experiments_Start.json", + "parameters": [ + { + "$id": "2330", + "parameter": { + "$ref": "2308" + }, + "value": { + "$id": "2331", + "kind": "string", + "type": { + "$ref": "2309" + }, + "value": "2025-01-01" + } + }, + { + "$id": "2332", + "parameter": { + "$ref": "2317" + }, + "value": { + "$id": "2333", + "kind": "string", + "type": { + "$ref": "2318" + }, + "value": "exampleExperiment" + } + }, + { + "$id": "2334", + "parameter": { + "$ref": "2315" + }, + "value": { + "$id": "2335", + "kind": "string", + "type": { + "$ref": "2316" + }, + "value": "exampleRG" + } + }, + { + "$id": "2336", + "parameter": { + "$ref": "2312" + }, + "value": { + "$id": "2337", + "kind": "string", + "type": { + "$ref": "2313" + }, + "value": "6b052e15-03d3-4f17-b2e1-be7f07588291" + } + } + ], + "responses": [ + { + "$id": "2338", + "response": { + "$ref": "2322" + }, + "statusCode": 202 + } + ] + } + ] + }, + "parameters": [ + { + "$id": "2339", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2340", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2341", + "name": "experimentName", + "nameInRequest": "experimentName", + "doc": "String that represents a Experiment resource name.", + "type": { + "$id": "2342", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2343", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "2344", + "kind": "constant", + "valueType": { + "$id": "2345", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "2346" + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.Chaos.Experiments.start" + } + ], + "parameters": [ + { + "$id": "2347", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "2348", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "location": "Uri", + "isApiVersion": false, + "isContentType": false, + "isRequired": true, + "isEndpoint": true, + "skipUrlEncoding": false, + "explode": false, + "kind": "Client", + "defaultValue": { + "$id": "2349", + "type": { + "$id": "2350", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "2351", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "2352" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.Chaos.Experiments", + "apiVersions": [ + "2024-11-01-preview", + "2025-01-01" + ], + "parent": { + "$ref": "834" + } + }, + { + "$id": "2353", + "kind": "client", + "name": "ExperimentExecutions", + "namespace": "Azure.ResourceManager.Chaos", + "methods": [ + { + "$id": "2354", + "kind": "basic", + "name": "getExecution", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-01-01" + ], + "doc": "Get an execution of an Experiment resource.", + "operation": { + "$id": "2355", + "name": "getExecution", + "resourceName": "ExperimentExecution", + "doc": "Get an execution of an Experiment resource.", + "accessibility": "public", + "parameters": [ + { + "$id": "2356", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "2357", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "2358", + "type": { + "$id": "2359", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-01-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2360", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "2361", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "2362", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2363", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2364", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2365", + "name": "experimentName", + "nameInRequest": "experimentName", + "doc": "String that represents a Experiment resource name.", + "type": { + "$id": "2366", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2367", + "name": "executionId", + "nameInRequest": "executionId", + "doc": "GUID that represents a Experiment execution detail.", + "type": { + "$id": "2368", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2369", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "2370", + "kind": "constant", + "valueType": { + "$id": "2371", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "2372", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "590" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}/executions/{executionId}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.Chaos.ExperimentExecutions.getExecution", + "decorators": [], + "examples": [ + { + "$id": "2373", + "kind": "http", + "name": "Get the execution of a Experiment.", + "description": "Get the execution of a Experiment.", + "filePath": "2025-01-01/Experiments_GetExecution.json", + "parameters": [ + { + "$id": "2374", + "parameter": { + "$ref": "2356" + }, + "value": { + "$id": "2375", + "kind": "string", + "type": { + "$ref": "2357" + }, + "value": "2025-01-01" + } + }, + { + "$id": "2376", + "parameter": { + "$ref": "2367" + }, + "value": { + "$id": "2377", + "kind": "string", + "type": { + "$ref": "2368" + }, + "value": "f24500ad-744e-4a26-864b-b76199eac333" + } + }, + { + "$id": "2378", + "parameter": { + "$ref": "2365" + }, + "value": { + "$id": "2379", + "kind": "string", + "type": { + "$ref": "2366" + }, + "value": "exampleExperiment" + } + }, + { + "$id": "2380", + "parameter": { + "$ref": "2363" + }, + "value": { + "$id": "2381", + "kind": "string", + "type": { + "$ref": "2364" + }, + "value": "exampleRG" + } + }, + { + "$id": "2382", + "parameter": { + "$ref": "2360" + }, + "value": { + "$id": "2383", + "kind": "string", + "type": { + "$ref": "2361" + }, + "value": "6b052e15-03d3-4f17-b2e1-be7f07588291" + } + } + ], + "responses": [ + { + "$id": "2384", + "response": { + "$ref": "2372" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2385", + "kind": "model", + "type": { + "$ref": "590" + }, + "value": { + "$id": "2386", + "name": { + "$id": "2387", + "kind": "string", + "type": { + "$ref": "91" + }, + "value": "f24500ad-744e-4a26-864b-b76199eac333" + }, + "type": { + "$id": "2388", + "kind": "string", + "type": { + "$ref": "95" + }, + "value": "Microsoft.Chaos/experiments/executions" + }, + "id": { + "$id": "2389", + "kind": "string", + "type": { + "$ref": "86" + }, + "value": "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Chaos/experiments/exampleExperiment/executions/f24500ad-744e-4a26-864b-b76199eac333" + }, + "properties": { + "$id": "2390", + "kind": "model", + "type": { + "$ref": "592" + }, + "value": { + "$id": "2391", + "startedAt": { + "$id": "2392", + "kind": "string", + "type": { + "$ref": "598" + }, + "value": "2020-12-14T21:52:52.2552574Z" + }, + "status": { + "$id": "2393", + "kind": "string", + "type": { + "$ref": "594" + }, + "value": "failed" + }, + "stoppedAt": { + "$id": "2394", + "kind": "string", + "type": { + "$ref": "603" + }, + "value": "2020-12-14T21:56:18.9281956Z" + } + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "2395", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2396", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2397", + "name": "experimentName", + "nameInRequest": "experimentName", + "doc": "String that represents a Experiment resource name.", + "type": { + "$id": "2398", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2399", + "name": "executionId", + "nameInRequest": "executionId", + "doc": "GUID that represents a Experiment execution detail.", + "type": { + "$id": "2400", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2401", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "2370" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "2402", + "type": { + "$ref": "590" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.Chaos.ExperimentExecutions.getExecution" + }, + { + "$id": "2403", + "kind": "paging", + "name": "listAllExecutions", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-01-01" + ], + "doc": "Get a list of executions of an Experiment resource.", + "operation": { + "$id": "2404", + "name": "listAllExecutions", + "resourceName": "ExperimentExecution", + "doc": "Get a list of executions of an Experiment resource.", + "accessibility": "public", + "parameters": [ + { + "$id": "2405", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "2406", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "2407", + "type": { + "$id": "2408", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-01-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2409", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "2410", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "2411", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2412", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2413", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2414", + "name": "experimentName", + "nameInRequest": "experimentName", + "doc": "String that represents a Experiment resource name.", + "type": { + "$id": "2415", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2416", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "2417", + "kind": "constant", + "valueType": { + "$id": "2418", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "2419", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "611" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}/executions", + "bufferResponse": true, + "paging": { + "$id": "2420", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "2421", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.Chaos.ExperimentExecutions.listAllExecutions", + "decorators": [], + "examples": [ + { + "$id": "2422", + "kind": "http", + "name": "List all executions of an Experiment.", + "description": "List all executions of an Experiment.", + "filePath": "2025-01-01/Experiments_ListAllExecutions.json", + "parameters": [ + { + "$id": "2423", + "parameter": { + "$ref": "2405" + }, + "value": { + "$id": "2424", + "kind": "string", + "type": { + "$ref": "2406" + }, + "value": "2025-01-01" + } + }, + { + "$id": "2425", + "parameter": { + "$ref": "2414" + }, + "value": { + "$id": "2426", + "kind": "string", + "type": { + "$ref": "2415" + }, + "value": "exampleExperiment" + } + }, + { + "$id": "2427", + "parameter": { + "$ref": "2412" + }, + "value": { + "$id": "2428", + "kind": "string", + "type": { + "$ref": "2413" + }, + "value": "exampleRG" + } + }, + { + "$id": "2429", + "parameter": { + "$ref": "2409" + }, + "value": { + "$id": "2430", + "kind": "string", + "type": { + "$ref": "2410" + }, + "value": "6b052e15-03d3-4f17-b2e1-be7f07588291" + } + } + ], + "responses": [ + { + "$id": "2431", + "response": { + "$ref": "2419" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2432", + "kind": "model", + "type": { + "$ref": "611" + }, + "value": { + "$id": "2433", + "nextLink": { + "$id": "2434", + "kind": "string", + "type": { + "$ref": "617" + }, + "value": "https://management.azure.com/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Chaos/experiments/exampleExperiment/executionDetails?continuationToken=&api-version=2025-01-01" + }, + "value": { + "$id": "2435", + "kind": "array", + "type": { + "$ref": "613" + }, + "value": [ + { + "$id": "2436", + "kind": "model", + "type": { + "$ref": "590" + }, + "value": { + "$id": "2437", + "name": { + "$id": "2438", + "kind": "string", + "type": { + "$ref": "91" + }, + "value": "f24500ad-744e-4a26-864b-b76199eac333" + }, + "type": { + "$id": "2439", + "kind": "string", + "type": { + "$ref": "95" + }, + "value": "Microsoft.Chaos/experiments/executions" + }, + "id": { + "$id": "2440", + "kind": "string", + "type": { + "$ref": "86" + }, + "value": "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Chaos/experiments/exampleExperiment/executions/f24500ad-744e-4a26-864b-b76199eac333" + }, + "properties": { + "$id": "2441", + "kind": "model", + "type": { + "$ref": "592" + }, + "value": { + "$id": "2442", + "startedAt": { + "$id": "2443", + "kind": "string", + "type": { + "$ref": "598" + }, + "value": "2020-12-14T21:52:52.2552574Z" + }, + "status": { + "$id": "2444", + "kind": "string", + "type": { + "$ref": "594" + }, + "value": "failed" + }, + "stoppedAt": { + "$id": "2445", + "kind": "string", + "type": { + "$ref": "603" + }, + "value": "2020-12-14T21:56:18.9281956Z" + } + } + } + } + }, + { + "$id": "2446", + "kind": "model", + "type": { + "$ref": "590" + }, + "value": { + "$id": "2447", + "name": { + "$id": "2448", + "kind": "string", + "type": { + "$ref": "91" + }, + "value": "14d98367-52ef-4596-be4f-53fc81bbfc33" + }, + "type": { + "$id": "2449", + "kind": "string", + "type": { + "$ref": "95" + }, + "value": "Microsoft.Chaos/experiments/executions" + }, + "id": { + "$id": "2450", + "kind": "string", + "type": { + "$ref": "86" + }, + "value": "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Chaos/experiments/exampleExperiment/executions/14d98367-52ef-4596-be4f-53fc81bbfc33" + }, + "properties": { + "$id": "2451", + "kind": "model", + "type": { + "$ref": "592" + }, + "value": { + "$id": "2452", + "startedAt": { + "$id": "2453", + "kind": "string", + "type": { + "$ref": "598" + }, + "value": "2020-12-14T21:52:52.2552574Z" + }, + "status": { + "$id": "2454", + "kind": "string", + "type": { + "$ref": "594" + }, + "value": "success" + }, + "stoppedAt": { + "$id": "2455", + "kind": "string", + "type": { + "$ref": "603" + }, + "value": "2020-12-14T21:56:18.9281956Z" + } + } + } + } + } + ] + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "2456", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2457", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2458", + "name": "experimentName", + "nameInRequest": "experimentName", + "doc": "String that represents a Experiment resource name.", + "type": { + "$id": "2459", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2460", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "2417" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "2461", + "type": { + "$id": "2462", + "kind": "array", + "name": "ArrayExperimentExecution", + "valueType": { + "$ref": "590" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "resultSegments": [ + "value" + ] + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.Chaos.ExperimentExecutions.listAllExecutions" + }, + { + "$id": "2463", + "kind": "basic", + "name": "ExecutionDetails", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-01-01" + ], + "doc": "Execution details of an experiment resource.", + "operation": { + "$id": "2464", + "name": "ExecutionDetails", + "resourceName": "ExperimentExecutions", + "doc": "Execution details of an experiment resource.", + "accessibility": "public", + "parameters": [ + { + "$id": "2465", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "2466", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "2467", + "type": { + "$id": "2468", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-01-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2469", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "2470", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "2471", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2472", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2473", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2474", + "name": "experimentName", + "nameInRequest": "experimentName", + "doc": "String that represents a Experiment resource name.", + "type": { + "$id": "2475", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2476", + "name": "executionId", + "nameInRequest": "executionId", + "doc": "GUID that represents a Experiment execution detail.", + "type": { + "$id": "2477", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2478", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "2479", + "kind": "constant", + "valueType": { + "$id": "2480", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "2481", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "621" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}/executions/{executionId}/getExecutionDetails", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.Chaos.ExperimentExecutions.getExecutionDetails", + "decorators": [], + "examples": [ + { + "$id": "2482", + "kind": "http", + "name": "Get experiment execution details.", + "description": "Get experiment execution details.", + "filePath": "2025-01-01/Experiments_ExecutionDetails.json", + "parameters": [ + { + "$id": "2483", + "parameter": { + "$ref": "2465" + }, + "value": { + "$id": "2484", + "kind": "string", + "type": { + "$ref": "2466" + }, + "value": "2025-01-01" + } + }, + { + "$id": "2485", + "parameter": { + "$ref": "2476" + }, + "value": { + "$id": "2486", + "kind": "string", + "type": { + "$ref": "2477" + }, + "value": "f24500ad-744e-4a26-864b-b76199eac333" + } + }, + { + "$id": "2487", + "parameter": { + "$ref": "2474" + }, + "value": { + "$id": "2488", + "kind": "string", + "type": { + "$ref": "2475" + }, + "value": "exampleExperiment" + } + }, + { + "$id": "2489", + "parameter": { + "$ref": "2472" + }, + "value": { + "$id": "2490", + "kind": "string", + "type": { + "$ref": "2473" + }, + "value": "exampleRG" + } + }, + { + "$id": "2491", + "parameter": { + "$ref": "2469" + }, + "value": { + "$id": "2492", + "kind": "string", + "type": { + "$ref": "2470" + }, + "value": "6b052e15-03d3-4f17-b2e1-be7f07588291" + } + } + ], + "responses": [ + { + "$id": "2493", + "response": { + "$ref": "2481" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2494", + "kind": "model", + "type": { + "$ref": "621" + }, + "value": { + "$id": "2495", + "name": { + "$id": "2496", + "kind": "string", + "type": { + "$ref": "631" + }, + "value": "f24500ad-744e-4a26-864b-b76199eac333" + }, + "type": { + "$id": "2497", + "kind": "string", + "type": { + "$ref": "623" + }, + "value": "Microsoft.Chaos/experiments/executions/getExecutionDetails" + }, + "id": { + "$id": "2498", + "kind": "string", + "type": { + "$ref": "627" + }, + "value": "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Chaos/experiments/exampleExperiment/executions/f24500ad-744e-4a26-864b-b76199eac333/getExecutionDetails" + }, + "properties": { + "$id": "2499", + "kind": "model", + "type": { + "$ref": "635" + }, + "value": { + "$id": "2500", + "failureReason": { + "$id": "2501", + "kind": "string", + "type": { + "$ref": "651" + }, + "value": "Dependency failure" + }, + "lastActionAt": { + "$id": "2502", + "kind": "string", + "type": { + "$ref": "655" + }, + "value": "2020-12-14T21:52:52.2552574Z" + }, + "runInformation": { + "$id": "2503", + "kind": "model", + "type": { + "$ref": "660" + }, + "value": { + "$id": "2504", + "steps": { + "$id": "2505", + "kind": "array", + "type": { + "$ref": "662" + }, + "value": [ + { + "$id": "2506", + "kind": "model", + "type": { + "$ref": "663" + }, + "value": { + "$id": "2507", + "branches": { + "$id": "2508", + "kind": "array", + "type": { + "$ref": "677" + }, + "value": [ + { + "$id": "2509", + "kind": "model", + "type": { + "$ref": "678" + }, + "value": { + "$id": "2510", + "actions": { + "$id": "2511", + "kind": "array", + "type": { + "$ref": "692" + }, + "value": [ + { + "$id": "2512", + "kind": "model", + "type": { + "$ref": "693" + }, + "value": { + "$id": "2513", + "actionId": { + "$id": "2514", + "kind": "string", + "type": { + "$ref": "699" + }, + "value": "59499d33-6751-4b6e-a1f6-58f4d56a040a" + }, + "actionName": { + "$id": "2515", + "kind": "string", + "type": { + "$ref": "695" + }, + "value": "urn:provider:agent-v2:Microsoft.Azure.Chaos.Fault.CPUPressureAllProcessors" + }, + "endTime": { + "$id": "2516", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "2020-12-14T13:56:13.6270153-08:00" + }, + "startTime": { + "$id": "2517", + "kind": "string", + "type": { + "$ref": "707" + }, + "value": "2020-12-14T13:56:13.6270153-08:00" + }, + "status": { + "$id": "2518", + "kind": "string", + "type": { + "$ref": "703" + }, + "value": "failed" + }, + "targets": { + "$id": "2519", + "kind": "array", + "type": { + "$ref": "717" + }, + "value": [ + { + "$id": "2520", + "kind": "model", + "type": { + "$ref": "718" + }, + "value": { + "$id": "2521", + "status": { + "$id": "2522", + "kind": "string", + "type": { + "$ref": "720" + }, + "value": "succeeded" + }, + "target": { + "$id": "2523", + "kind": "string", + "type": { + "$ref": "724" + }, + "value": "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Compute/virtualMachines/VM1" + }, + "targetCompletedTime": { + "$id": "2524", + "kind": "string", + "type": { + "$ref": "733" + }, + "value": "2021-04-02T17:30:55+00:00" + }, + "targetFailedTime": { + "$id": "2525", + "kind": "string", + "type": { + "$ref": "728" + }, + "value": "2021-04-02T16:30:55+00:00" + } + } + }, + { + "$id": "2526", + "kind": "model", + "type": { + "$ref": "718" + }, + "value": { + "$id": "2527", + "status": { + "$id": "2528", + "kind": "string", + "type": { + "$ref": "720" + }, + "value": "failed" + }, + "target": { + "$id": "2529", + "kind": "string", + "type": { + "$ref": "724" + }, + "value": "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Compute/virtualMachines/VM1" + }, + "targetCompletedTime": { + "$id": "2530", + "kind": "string", + "type": { + "$ref": "733" + }, + "value": "2021-04-02T17:30:55+00:00" + }, + "targetFailedTime": { + "$id": "2531", + "kind": "string", + "type": { + "$ref": "728" + }, + "value": "2021-04-02T16:30:55+00:00" + } + } + } + ] + } + } + } + ] + }, + "branchId": { + "$id": "2532", + "kind": "string", + "type": { + "$ref": "684" + }, + "value": "FirstBranch" + }, + "branchName": { + "$id": "2533", + "kind": "string", + "type": { + "$ref": "680" + }, + "value": "FirstBranch" + }, + "status": { + "$id": "2534", + "kind": "string", + "type": { + "$ref": "688" + }, + "value": "failed" + } + } + } + ] + }, + "status": { + "$id": "2535", + "kind": "string", + "type": { + "$ref": "673" + }, + "value": "failed" + }, + "stepId": { + "$id": "2536", + "kind": "string", + "type": { + "$ref": "669" + }, + "value": "FirstStep" + }, + "stepName": { + "$id": "2537", + "kind": "string", + "type": { + "$ref": "665" + }, + "value": "FirstStep" + } + } + } + ] + } + } + }, + "startedAt": { + "$id": "2538", + "kind": "string", + "type": { + "$ref": "641" + }, + "value": "2020-12-14T21:52:52.2552574Z" + }, + "status": { + "$id": "2539", + "kind": "string", + "type": { + "$ref": "637" + }, + "value": "failed" + }, + "stoppedAt": { + "$id": "2540", + "kind": "string", + "type": { + "$ref": "646" + }, + "value": "2020-12-14T21:56:18.9281956Z" + } + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "2541", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2542", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2543", + "name": "experimentName", + "nameInRequest": "experimentName", + "doc": "String that represents a Experiment resource name.", + "type": { + "$id": "2544", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2545", + "name": "executionId", + "nameInRequest": "executionId", + "doc": "GUID that represents a Experiment execution detail.", + "type": { + "$id": "2546", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2547", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "2479" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "2548", + "type": { + "$ref": "621" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.Chaos.ExperimentExecutions.getExecutionDetails" + } + ], + "parameters": [ + { + "$id": "2549", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "2550", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "location": "Uri", + "isApiVersion": false, + "isContentType": false, + "isRequired": true, + "isEndpoint": true, + "skipUrlEncoding": false, + "explode": false, + "kind": "Client", + "defaultValue": { + "$id": "2551", + "type": { + "$id": "2552", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "2553", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "2554" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.Chaos.ExperimentExecutions", + "apiVersions": [ + "2024-11-01-preview", + "2025-01-01" + ], + "parent": { + "$ref": "834" + } + }, + { + "$id": "2555", + "kind": "client", + "name": "TargetTypes", + "namespace": "Azure.ResourceManager.Chaos", + "methods": [ + { + "$id": "2556", + "kind": "basic", + "name": "get", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-01-01" + ], + "doc": "Get a Target Type resources for given location.", + "operation": { + "$id": "2557", + "name": "get", + "resourceName": "TargetType", + "doc": "Get a Target Type resources for given location.", + "accessibility": "public", + "parameters": [ + { + "$id": "2558", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "2559", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "2560", + "type": { + "$id": "2561", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-01-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2562", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "2563", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "2564", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2565", + "name": "location", + "nameInRequest": "location", + "doc": "The name of the Azure region.", + "type": { + "$id": "2566", + "kind": "string", + "name": "azureLocation", + "crossLanguageDefinitionId": "Azure.Core.azureLocation", + "baseType": { + "$id": "2567", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2568", + "name": "targetTypeName", + "nameInRequest": "targetTypeName", + "doc": "String that represents a Target Type resource name.", + "type": { + "$id": "2569", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2570", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "2571", + "kind": "constant", + "valueType": { + "$id": "2572", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "2573", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "761" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/locations/{location}/targetTypes/{targetTypeName}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.Chaos.TargetTypes.get", + "decorators": [], + "examples": [ + { + "$id": "2574", + "kind": "http", + "name": "Get a Target Type for westus2 location", + "description": "Get a Target Type for westus2 location", + "filePath": "2025-01-01/TargetTypes_Get.json", + "parameters": [ + { + "$id": "2575", + "parameter": { + "$ref": "2558" + }, + "value": { + "$id": "2576", + "kind": "string", + "type": { + "$ref": "2559" + }, + "value": "2025-01-01" + } + }, + { + "$id": "2577", + "parameter": { + "$ref": "2565" + }, + "value": { + "$id": "2578", + "kind": "string", + "type": { + "$ref": "2566" + }, + "value": "westus2" + } + }, + { + "$id": "2579", + "parameter": { + "$ref": "2562" + }, + "value": { + "$id": "2580", + "kind": "string", + "type": { + "$ref": "2563" + }, + "value": "6b052e15-03d3-4f17-b2e1-be7f07588291" + } + }, + { + "$id": "2581", + "parameter": { + "$ref": "2568" + }, + "value": { + "$id": "2582", + "kind": "string", + "type": { + "$ref": "2569" + }, + "value": "Microsoft-Agent" + } + } + ], + "responses": [ + { + "$id": "2583", + "response": { + "$ref": "2573" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2584", + "kind": "model", + "type": { + "$ref": "761" + }, + "value": { + "$id": "2585", + "name": { + "$id": "2586", + "kind": "string", + "type": { + "$ref": "91" + }, + "value": "Microsoft-Agent" + }, + "type": { + "$id": "2587", + "kind": "string", + "type": { + "$ref": "95" + }, + "value": "Microsoft.Chaos/locations/targetTypes" + }, + "id": { + "$id": "2588", + "kind": "string", + "type": { + "$ref": "86" + }, + "value": "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/providers/Microsoft.Chaos/locations/westus2/targetTypes/Microsoft-Agent" + }, + "properties": { + "$id": "2589", + "kind": "model", + "type": { + "$ref": "763" + }, + "value": { + "$id": "2590", + "description": { + "$id": "2591", + "kind": "string", + "type": { + "$ref": "769" + }, + "value": "A target represents Chaos Agent." + }, + "displayName": { + "$id": "2592", + "kind": "string", + "type": { + "$ref": "765" + }, + "value": "Chaos Agent" + }, + "propertiesSchema": { + "$id": "2593", + "kind": "string", + "type": { + "$ref": "773" + }, + "value": "https://schema.centralus.chaos-prod.azure.com/targets/Microsoft-VirtualMachine.json" + }, + "resourceTypes": { + "$id": "2594", + "kind": "array", + "type": { + "$ref": "777" + }, + "value": [ + { + "$id": "2595", + "kind": "string", + "type": { + "$ref": "778" + }, + "value": "Microsoft.Compute/virtualMachines" + }, + { + "$id": "2596", + "kind": "string", + "type": { + "$ref": "778" + }, + "value": "Microsoft.Compute/virtualMachineScaleSets" + } + ] + } + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "2597", + "name": "location", + "nameInRequest": "location", + "doc": "The name of the Azure region.", + "type": { + "$id": "2598", + "kind": "string", + "name": "azureLocation", + "crossLanguageDefinitionId": "Azure.Core.azureLocation", + "baseType": { + "$id": "2599", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2600", + "name": "targetTypeName", + "nameInRequest": "targetTypeName", + "doc": "String that represents a Target Type resource name.", + "type": { + "$id": "2601", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2602", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "2571" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "2603", + "type": { + "$ref": "761" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.Chaos.TargetTypes.get" + }, + { + "$id": "2604", + "kind": "paging", + "name": "list", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-01-01" + ], + "doc": "Get a list of Target Type resources for given location.", + "operation": { + "$id": "2605", + "name": "list", + "resourceName": "TargetType", + "doc": "Get a list of Target Type resources for given location.", + "accessibility": "public", + "parameters": [ + { + "$id": "2606", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "2607", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "2608", + "type": { + "$id": "2609", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-01-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2610", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "2611", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "2612", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2613", + "name": "location", + "nameInRequest": "location", + "doc": "The name of the Azure region.", + "type": { + "$id": "2614", + "kind": "string", + "name": "azureLocation", + "crossLanguageDefinitionId": "Azure.Core.azureLocation", + "baseType": { + "$id": "2615", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2616", + "name": "continuationToken", + "nameInRequest": "continuationToken", + "doc": "String that sets the continuation token.", + "type": { + "$id": "2617", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": false, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2618", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "2619", + "kind": "constant", + "valueType": { + "$id": "2620", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "2621", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "785" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/locations/{location}/targetTypes", + "bufferResponse": true, + "paging": { + "$id": "2622", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "2623", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.Chaos.TargetTypes.list", + "decorators": [], + "examples": [ + { + "$id": "2624", + "kind": "http", + "name": "List all Target Types for westus2 location.", + "description": "List all Target Types for westus2 location.", + "filePath": "2025-01-01/TargetTypes_List.json", + "parameters": [ + { + "$id": "2625", + "parameter": { + "$ref": "2606" + }, + "value": { + "$id": "2626", + "kind": "string", + "type": { + "$ref": "2607" + }, + "value": "2025-01-01" + } + }, + { + "$id": "2627", + "parameter": { + "$ref": "2613" + }, + "value": { + "$id": "2628", + "kind": "string", + "type": { + "$ref": "2614" + }, + "value": "westus2" + } + }, + { + "$id": "2629", + "parameter": { + "$ref": "2610" + }, + "value": { + "$id": "2630", + "kind": "string", + "type": { + "$ref": "2611" + }, + "value": "6b052e15-03d3-4f17-b2e1-be7f07588291" + } + } + ], + "responses": [ + { + "$id": "2631", + "response": { + "$ref": "2621" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2632", + "kind": "model", + "type": { + "$ref": "785" + }, + "value": { + "$id": "2633", + "nextLink": { + "$id": "2634", + "kind": "string", + "type": { + "$ref": "791" + }, + "value": "https://management.azure.com/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/providers/Microsoft.Chaos/locations/westus2/targetTypes?continuationToken=&api-version=2024-11-01-preview" + }, + "value": { + "$id": "2635", + "kind": "array", + "type": { + "$ref": "787" + }, + "value": [ + { + "$id": "2636", + "kind": "model", + "type": { + "$ref": "761" + }, + "value": { + "$id": "2637", + "name": { + "$id": "2638", + "kind": "string", + "type": { + "$ref": "91" + }, + "value": "Microsoft-Agent" + }, + "type": { + "$id": "2639", + "kind": "string", + "type": { + "$ref": "95" + }, + "value": "Microsoft.Chaos/locations/targetTypes" + }, + "id": { + "$id": "2640", + "kind": "string", + "type": { + "$ref": "86" + }, + "value": "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/providers/Microsoft.Chaos/locations/westus2/targetTypes/Microsoft-Agent" + }, + "properties": { + "$id": "2641", + "kind": "model", + "type": { + "$ref": "763" + }, + "value": { + "$id": "2642", + "description": { + "$id": "2643", + "kind": "string", + "type": { + "$ref": "769" + }, + "value": "A target represents Chaos Agent." + }, + "displayName": { + "$id": "2644", + "kind": "string", + "type": { + "$ref": "765" + }, + "value": "Chaos Agent" + }, + "propertiesSchema": { + "$id": "2645", + "kind": "string", + "type": { + "$ref": "773" + }, + "value": "https://schema.centralus.chaos-prod.azure.com/targets/Microsoft-VirtualMachine.json" + }, + "resourceTypes": { + "$id": "2646", + "kind": "array", + "type": { + "$ref": "777" + }, + "value": [ + { + "$id": "2647", + "kind": "string", + "type": { + "$ref": "778" + }, + "value": "Microsoft.Compute/virtualMachines" + }, + { + "$id": "2648", + "kind": "string", + "type": { + "$ref": "778" + }, + "value": "Microsoft.Compute/virtualMachineScaleSets" + } + ] + } + } + } + } + } + ] + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "2649", + "name": "location", + "nameInRequest": "location", + "doc": "The name of the Azure region.", + "type": { + "$id": "2650", + "kind": "string", + "name": "azureLocation", + "crossLanguageDefinitionId": "Azure.Core.azureLocation", + "baseType": { + "$id": "2651", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2652", + "name": "continuationToken", + "nameInRequest": "continuationToken", + "doc": "String that sets the continuation token.", + "type": { + "$id": "2653", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": false, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2654", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "2619" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "2655", + "type": { + "$id": "2656", + "kind": "array", + "name": "ArrayTargetType", + "valueType": { + "$ref": "761" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "resultSegments": [ + "value" + ] + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.Chaos.TargetTypes.list" + } + ], + "parameters": [ + { + "$id": "2657", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "2658", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "location": "Uri", + "isApiVersion": false, + "isContentType": false, + "isRequired": true, + "isEndpoint": true, + "skipUrlEncoding": false, + "explode": false, + "kind": "Client", + "defaultValue": { + "$id": "2659", + "type": { + "$id": "2660", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "2661", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "2662" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.Chaos.TargetTypes", + "apiVersions": [ + "2024-11-01-preview", + "2025-01-01" + ], + "parent": { + "$ref": "834" + } + }, + { + "$id": "2663", + "kind": "client", + "name": "OperationStatuses", + "namespace": "Azure.ResourceManager.Chaos", + "doc": "Chaos Studio async operation status resource operations.", + "methods": [ + { + "$id": "2664", + "kind": "basic", + "name": "get", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-01-01" + ], + "doc": "Returns the current status of an async operation.", + "operation": { + "$id": "2665", + "name": "get", + "resourceName": "OperationStatuses", + "doc": "Returns the current status of an async operation.", + "accessibility": "public", + "parameters": [ + { + "$id": "2666", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "2667", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "2668", + "type": { + "$id": "2669", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-01-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2670", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "2671", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "2672", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2673", + "name": "location", + "nameInRequest": "location", + "doc": "The location name.", + "type": { + "$id": "2674", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2675", + "name": "operationId", + "nameInRequest": "operationId", + "doc": "The ID of an ongoing async operation.", + "type": { + "$id": "2676", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2677", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "2678", + "kind": "constant", + "valueType": { + "$id": "2679", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "2680", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "795" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/locations/{location}/operationStatuses/{operationId}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.Chaos.OperationStatuses.get", + "decorators": [], + "examples": [ + { + "$id": "2681", + "kind": "http", + "name": "Gets Chaos Studio async operation status.", + "description": "Gets Chaos Studio async operation status.", + "filePath": "2025-01-01/OperationStatuses_Get.json", + "parameters": [ + { + "$id": "2682", + "parameter": { + "$ref": "2666" + }, + "value": { + "$id": "2683", + "kind": "string", + "type": { + "$ref": "2667" + }, + "value": "2025-01-01" + } + }, + { + "$id": "2684", + "parameter": { + "$ref": "2670" + }, + "value": { + "$id": "2685", + "kind": "string", + "type": { + "$ref": "2671" + }, + "value": "e25c0d12-0335-4fec-8ef8-3b4f9a10649e" + } + }, + { + "$id": "2686", + "parameter": { + "$ref": "2673" + }, + "value": { + "$id": "2687", + "kind": "string", + "type": { + "$ref": "2674" + }, + "value": "westus2" + } + }, + { + "$id": "2688", + "parameter": { + "$ref": "2675" + }, + "value": { + "$id": "2689", + "kind": "string", + "type": { + "$ref": "2676" + }, + "value": "4bdadd97-207c-4de8-9bba-08339ae099c7" + } + } + ], + "responses": [ + { + "$id": "2690", + "response": { + "$ref": "2680" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2691", + "kind": "model", + "type": { + "$ref": "795" + }, + "value": { + "$id": "2692", + "id": { + "$id": "2693", + "kind": "string", + "type": { + "$ref": "797" + }, + "value": "/subscriptions/e25c0d12-0335-4fec-8ef8-3b4f9a10649e/providers/Microsoft.Chaos/locations/westus2/operationStatuses/4bdadd97-207c-4de8-9bba-08339ae099c7" + }, + "name": { + "$id": "2694", + "kind": "string", + "type": { + "$ref": "802" + }, + "value": "4bdadd97-207c-4de8-9bba-08339ae099c7" + }, + "startTime": { + "$id": "2695", + "kind": "string", + "type": { + "$ref": "814" + }, + "value": "2024-11-14T21:52:52.2552574Z" + }, + "status": { + "$id": "2696", + "kind": "string", + "type": { + "$ref": "806" + }, + "value": "Creating" + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "2697", + "name": "location", + "nameInRequest": "location", + "doc": "The location name.", + "type": { + "$id": "2698", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2699", + "name": "operationId", + "nameInRequest": "operationId", + "doc": "The ID of an ongoing async operation.", + "type": { + "$id": "2700", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2701", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "2678" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "2702", + "type": { + "$ref": "795" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.Chaos.OperationStatuses.get" + } + ], + "parameters": [ + { + "$id": "2703", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "2704", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "location": "Uri", + "isApiVersion": false, + "isContentType": false, + "isRequired": true, + "isEndpoint": true, + "skipUrlEncoding": false, + "explode": false, + "kind": "Client", + "defaultValue": { + "$id": "2705", + "type": { + "$id": "2706", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "2707", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "2708" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.Chaos.OperationStatuses", + "apiVersions": [ + "2024-11-01-preview", + "2025-01-01" + ], + "parent": { + "$ref": "834" + } + } + ] + } + ], + "auth": { + "$id": "2709", + "oAuth2": { + "$id": "2710", + "scopes": [ + "user_impersonation" + ] + } + } +} diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/Configuration.json b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/Configuration.json new file mode 100644 index 000000000000..950808ed35b8 --- /dev/null +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/Configuration.json @@ -0,0 +1,13 @@ +{ + "output-folder": ".", + "namespace": "Azure.ResourceManager.ComputeFleet", + "library-name": "Azure.ResourceManager.ComputeFleet", + "flavor": "azure", + "use-model-reader-writer": true, + "shared-source-folders": [ + "../../TempTypeSpecFiles/node_modules/@autorest/csharp/Generator.Shared", + "../../TempTypeSpecFiles/node_modules/@autorest/csharp/Azure.Core.Shared" + ], + "model-namespace": false, + "azure-arm": true +} diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/tsp-location.yaml b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/tsp-location.yaml index 4b6a31091856..9525b4c61b3a 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/tsp-location.yaml +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/azurefleet/AzureFleet.Management -commit: 462574dbd02088c209bb1da3eef0d93f699e8de2 +commit: 1a8dcbc31c561409f253e5f7a924ff577b583da7 repo: Azure/azure-rest-api-specs - +additionalDirectories: diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/tspCodeModel.json b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/tspCodeModel.json new file mode 100644 index 000000000000..823c6f369c3b --- /dev/null +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/tspCodeModel.json @@ -0,0 +1,38279 @@ +{ + "$id": "1", + "name": "Microsoft.AzureFleet", + "apiVersions": [ + "2024-11-01" + ], + "enums": [ + { + "$id": "2", + "kind": "enum", + "name": "Origin", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Origin", + "valueType": { + "$id": "3", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "4", + "kind": "enumvalue", + "name": "user", + "value": "user", + "valueType": { + "$id": "5", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "doc": "Indicates the operation is initiated by a user.", + "decorators": [] + }, + { + "$id": "6", + "kind": "enumvalue", + "name": "system", + "value": "system", + "valueType": { + "$id": "7", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "doc": "Indicates the operation is initiated by a system.", + "decorators": [] + }, + { + "$id": "8", + "kind": "enumvalue", + "name": "user,system", + "value": "user,system", + "valueType": { + "$id": "9", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "doc": "Indicates the operation is initiated by a user or system.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ComputeFleet", + "doc": "The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\"", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "10", + "kind": "enum", + "name": "ActionType", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ActionType", + "valueType": { + "$id": "11", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "12", + "kind": "enumvalue", + "name": "Internal", + "value": "Internal", + "valueType": { + "$id": "13", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "10" + }, + "doc": "Actions are for internal-only APIs.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ComputeFleet", + "doc": "Extensible enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "14", + "kind": "enum", + "name": "ComputeFleetProvisioningState", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ProvisioningState", + "valueType": { + "$id": "15", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "16", + "kind": "enumvalue", + "name": "Succeeded", + "value": "Succeeded", + "valueType": { + "$id": "17", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "14" + }, + "doc": "Resource has been created.", + "decorators": [] + }, + { + "$id": "18", + "kind": "enumvalue", + "name": "Failed", + "value": "Failed", + "valueType": { + "$id": "19", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "14" + }, + "doc": "Resource creation failed.", + "decorators": [] + }, + { + "$id": "20", + "kind": "enumvalue", + "name": "Canceled", + "value": "Canceled", + "valueType": { + "$id": "21", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "14" + }, + "doc": "Resource creation was canceled.", + "decorators": [] + }, + { + "$id": "22", + "kind": "enumvalue", + "name": "Creating", + "value": "Creating", + "valueType": { + "$id": "23", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "14" + }, + "doc": "Initial creation in progress.", + "decorators": [] + }, + { + "$id": "24", + "kind": "enumvalue", + "name": "Updating", + "value": "Updating", + "valueType": { + "$id": "25", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "14" + }, + "doc": "Update in progress.", + "decorators": [] + }, + { + "$id": "26", + "kind": "enumvalue", + "name": "Deleting", + "value": "Deleting", + "valueType": { + "$id": "27", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "14" + }, + "doc": "Deletion in progress.", + "decorators": [] + }, + { + "$id": "28", + "kind": "enumvalue", + "name": "Migrating", + "value": "Migrating", + "valueType": { + "$id": "29", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "14" + }, + "doc": "Resource is being migrated from one subscription or resource group to another.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ComputeFleet", + "doc": "The status of the current operation.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "30", + "kind": "enum", + "name": "ComputeFleetEvictionPolicy", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.EvictionPolicy", + "valueType": { + "$id": "31", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "32", + "kind": "enumvalue", + "name": "Delete", + "value": "Delete", + "valueType": { + "$id": "33", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "30" + }, + "doc": "When evicted, the Spot VM will be deleted and the corresponding capacity will be updated to reflect this.", + "decorators": [] + }, + { + "$id": "34", + "kind": "enumvalue", + "name": "Deallocate", + "value": "Deallocate", + "valueType": { + "$id": "35", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "30" + }, + "doc": "When evicted, the Spot VM will be deallocated/stopped", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ComputeFleet", + "doc": "Different kind of eviction policies", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "36", + "kind": "enum", + "name": "SpotAllocationStrategy", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SpotAllocationStrategy", + "valueType": { + "$id": "37", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "38", + "kind": "enumvalue", + "name": "PriceCapacityOptimized", + "value": "PriceCapacityOptimized", + "valueType": { + "$id": "39", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "36" + }, + "doc": "Default. VM sizes distribution will be determined to optimize for both price and capacity.", + "decorators": [] + }, + { + "$id": "40", + "kind": "enumvalue", + "name": "LowestPrice", + "value": "LowestPrice", + "valueType": { + "$id": "41", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "36" + }, + "doc": "VM sizes distribution will be determined to optimize for price. Note: Capacity will still be considered here but will be given much less weight.", + "decorators": [] + }, + { + "$id": "42", + "kind": "enumvalue", + "name": "CapacityOptimized", + "value": "CapacityOptimized", + "valueType": { + "$id": "43", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "36" + }, + "doc": "VM sizes distribution will be determined to optimize for capacity.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ComputeFleet", + "doc": "Spot allocation strategy types for Compute Fleet", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "44", + "kind": "enum", + "name": "RegularPriorityAllocationStrategy", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.RegularPriorityAllocationStrategy", + "valueType": { + "$id": "45", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "46", + "kind": "enumvalue", + "name": "LowestPrice", + "value": "LowestPrice", + "valueType": { + "$id": "47", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "44" + }, + "doc": "Default. VM sizes distribution will be determined to optimize for price.", + "decorators": [] + }, + { + "$id": "48", + "kind": "enumvalue", + "name": "Prioritized", + "value": "Prioritized", + "valueType": { + "$id": "49", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "44" + }, + "doc": "VM sizes distribution will be determined to optimize for the 'priority' as specified for each vm size.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ComputeFleet", + "doc": "Regular VM Allocation strategy types for Compute Fleet", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "50", + "kind": "enum", + "name": "ComputeFleetVMAttributeSupport", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributeSupport", + "valueType": { + "$id": "51", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "52", + "kind": "enumvalue", + "name": "Excluded", + "value": "Excluded", + "valueType": { + "$id": "53", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "50" + }, + "doc": "All VMSizes having the feature support will be excluded.", + "decorators": [] + }, + { + "$id": "54", + "kind": "enumvalue", + "name": "Included", + "value": "Included", + "valueType": { + "$id": "55", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "50" + }, + "doc": " VMSizes that have the feature support and that do not have the feature support will be used. Included is a union of Excluded and Required.", + "decorators": [] + }, + { + "$id": "56", + "kind": "enumvalue", + "name": "Required", + "value": "Required", + "valueType": { + "$id": "57", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "50" + }, + "doc": "Only the VMSizes having the feature support will be used.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ComputeFleet", + "doc": "VMSizes supported by Azure VMs. Included is a union of Excluded and Required.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "58", + "kind": "enum", + "name": "LocalStorageDiskType", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.LocalStorageDiskType", + "valueType": { + "$id": "59", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "60", + "kind": "enumvalue", + "name": "HDD", + "value": "HDD", + "valueType": { + "$id": "61", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "58" + }, + "doc": "HDD DiskType.", + "decorators": [] + }, + { + "$id": "62", + "kind": "enumvalue", + "name": "SSD", + "value": "SSD", + "valueType": { + "$id": "63", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "58" + }, + "doc": "SDD DiskType.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ComputeFleet", + "doc": "Different kind of Local storage disk types supported by Azure VMs.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "64", + "kind": "enum", + "name": "AcceleratorManufacturer", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.AcceleratorManufacturer", + "valueType": { + "$id": "65", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "66", + "kind": "enumvalue", + "name": "AMD", + "value": "AMD", + "valueType": { + "$id": "67", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "64" + }, + "doc": "AMD GpuType", + "decorators": [] + }, + { + "$id": "68", + "kind": "enumvalue", + "name": "Nvidia", + "value": "Nvidia", + "valueType": { + "$id": "69", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "64" + }, + "doc": "Nvidia GpuType", + "decorators": [] + }, + { + "$id": "70", + "kind": "enumvalue", + "name": "Xilinx", + "value": "Xilinx", + "valueType": { + "$id": "71", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "64" + }, + "doc": "Xilinx GpuType", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ComputeFleet", + "doc": "Accelerator manufacturers supported by Azure VMs.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "72", + "kind": "enum", + "name": "AcceleratorType", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.AcceleratorType", + "valueType": { + "$id": "73", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "74", + "kind": "enumvalue", + "name": "GPU", + "value": "GPU", + "valueType": { + "$id": "75", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "72" + }, + "doc": "GPU Accelerator", + "decorators": [] + }, + { + "$id": "76", + "kind": "enumvalue", + "name": "FPGA", + "value": "FPGA", + "valueType": { + "$id": "77", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "72" + }, + "doc": "FPGA Accelerator", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ComputeFleet", + "doc": "Accelerator types supported by Azure VMs.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "78", + "kind": "enum", + "name": "ComputeFleetVmCategory", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMCategory", + "valueType": { + "$id": "79", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "80", + "kind": "enumvalue", + "name": "GeneralPurpose", + "value": "GeneralPurpose", + "valueType": { + "$id": "81", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "78" + }, + "doc": "General purpose VM sizes provide balanced CPU-to-memory ratio. Ideal for testing and development, small to medium databases, and low to medium traffic web servers.", + "decorators": [] + }, + { + "$id": "82", + "kind": "enumvalue", + "name": "ComputeOptimized", + "value": "ComputeOptimized", + "valueType": { + "$id": "83", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "78" + }, + "doc": "Compute optimized VM sizes have a high CPU-to-memory ratio. These sizes are good for medium traffic web servers, network appliances, batch processes, and application servers.", + "decorators": [] + }, + { + "$id": "84", + "kind": "enumvalue", + "name": "MemoryOptimized", + "value": "MemoryOptimized", + "valueType": { + "$id": "85", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "78" + }, + "doc": "Memory optimized VM sizes offer a high memory-to-CPU ratio that is great for relational database servers, medium to large caches, and in-memory analytics.", + "decorators": [] + }, + { + "$id": "86", + "kind": "enumvalue", + "name": "StorageOptimized", + "value": "StorageOptimized", + "valueType": { + "$id": "87", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "78" + }, + "doc": "Storage optimized virtual machine (VM) sizes offer high disk throughput and IO, and are ideal for Big Data, SQL, NoSQL databases, data warehousing, and large transactional databases. \nExamples include Cassandra, MongoDB, Cloudera, and Redis.", + "decorators": [] + }, + { + "$id": "88", + "kind": "enumvalue", + "name": "GpuAccelerated", + "value": "GpuAccelerated", + "valueType": { + "$id": "89", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "78" + }, + "doc": "GPU optimized VM sizes are specialized virtual machines available with single, multiple, or fractional GPUs. \nThese sizes are designed for compute-intensive, graphics-intensive, and visualization workloads.", + "decorators": [] + }, + { + "$id": "90", + "kind": "enumvalue", + "name": "FpgaAccelerated", + "value": "FpgaAccelerated", + "valueType": { + "$id": "91", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "78" + }, + "doc": "FPGA optimized VM sizes are specialized virtual machines available with single or multiple FPGA. \nThese sizes are designed for compute-intensive workloads. This article provides information about the number and type of FPGA, vCPUs, data disks, and NICs. \nStorage throughput and network bandwidth are also included for each size in this grouping.", + "decorators": [] + }, + { + "$id": "92", + "kind": "enumvalue", + "name": "HighPerformanceCompute", + "value": "HighPerformanceCompute", + "valueType": { + "$id": "93", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "78" + }, + "doc": "Azure High Performance Compute VMs are optimized for various HPC workloads such as computational fluid dynamics, finite element analysis, frontend and backend EDA, \nrendering, molecular dynamics, computational geo science, weather simulation, and financial risk analysis.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ComputeFleet", + "doc": "VMCategories defined for Azure VMs.\nSee: https://learn.microsoft.com/en-us/azure/virtual-machines/sizes/overview?tabs=breakdownseries%2Cgeneralsizelist%2Ccomputesizelist%2Cmemorysizelist%2Cstoragesizelist%2Cgpusizelist%2Cfpgasizelist%2Chpcsizelist#general-purpose", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "94", + "kind": "enum", + "name": "ArchitectureType", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ArchitectureType", + "valueType": { + "$id": "95", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "96", + "kind": "enumvalue", + "name": "ARM64", + "value": "ARM64", + "valueType": { + "$id": "97", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "94" + }, + "doc": "ARM64 Architecture", + "decorators": [] + }, + { + "$id": "98", + "kind": "enumvalue", + "name": "X64", + "value": "X64", + "valueType": { + "$id": "99", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "94" + }, + "doc": "X64 Architecture", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ComputeFleet", + "doc": "Architecture types supported by Azure VMs.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "100", + "kind": "enum", + "name": "CpuManufacturer", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.CpuManufacturer", + "valueType": { + "$id": "101", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "102", + "kind": "enumvalue", + "name": "Intel", + "value": "Intel", + "valueType": { + "$id": "103", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "100" + }, + "doc": "Intel CPU.", + "decorators": [] + }, + { + "$id": "104", + "kind": "enumvalue", + "name": "AMD", + "value": "AMD", + "valueType": { + "$id": "105", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "100" + }, + "doc": "AMD CPU.", + "decorators": [] + }, + { + "$id": "106", + "kind": "enumvalue", + "name": "Microsoft", + "value": "Microsoft", + "valueType": { + "$id": "107", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "100" + }, + "doc": "Microsoft CPU.", + "decorators": [] + }, + { + "$id": "108", + "kind": "enumvalue", + "name": "Ampere", + "value": "Ampere", + "valueType": { + "$id": "109", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "100" + }, + "doc": "Ampere CPU.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ComputeFleet", + "doc": "Cpu Manufacturers supported by Azure VMs.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "110", + "kind": "enum", + "name": "WindowsSetupAdditionalInformation_passName", + "valueType": { + "$id": "111", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "112", + "kind": "enumvalue", + "name": "OobeSystem", + "value": "OobeSystem", + "doc": "OobeSystem", + "valueType": { + "$ref": "111" + }, + "enumType": { + "$ref": "110" + } + } + ], + "crossLanguageDefinitionId": "", + "namespace": "Azure.ResourceManager.ComputeFleet", + "doc": "The WindowsSetupAdditionalInformation_passName", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "113", + "kind": "enum", + "name": "WindowsSetupAdditionalInformation_componentName", + "valueType": { + "$id": "114", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "115", + "kind": "enumvalue", + "name": "Microsoft-Windows-Shell-Setup", + "value": "Microsoft-Windows-Shell-Setup", + "doc": "Microsoft-Windows-Shell-Setup", + "valueType": { + "$ref": "114" + }, + "enumType": { + "$ref": "113" + } + } + ], + "crossLanguageDefinitionId": "", + "namespace": "Azure.ResourceManager.ComputeFleet", + "doc": "The WindowsSetupAdditionalInformation_componentName", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "116", + "kind": "enum", + "name": "AdditionalInformationSettingNames", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SettingNames", + "valueType": { + "$id": "117", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "118", + "kind": "enumvalue", + "name": "AutoLogon", + "value": "AutoLogon", + "valueType": { + "$id": "119", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "116" + }, + "doc": "AutoLogon setting", + "decorators": [] + }, + { + "$id": "120", + "kind": "enumvalue", + "name": "FirstLogonCommands", + "value": "FirstLogonCommands", + "valueType": { + "$id": "121", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "116" + }, + "doc": "FirstLogonCommands setting", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ComputeFleet", + "doc": "Specifies the name of the setting to which the content applies. Possible values\nare: FirstLogonCommands and AutoLogon.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "122", + "kind": "enum", + "name": "ComputeFleetWindowsVMGuestPatchMode", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.WindowsVMGuestPatchMode", + "valueType": { + "$id": "123", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "124", + "kind": "enumvalue", + "name": "Manual", + "value": "Manual", + "valueType": { + "$id": "125", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "122" + }, + "doc": "You control the application of patches to a virtual machine.\nYou do this by applying patches manually inside the VM. In this mode,\nautomatic updates are disabled; the property WindowsConfiguration.enableAutomaticUpdates\nmust be false", + "decorators": [] + }, + { + "$id": "126", + "kind": "enumvalue", + "name": "AutomaticByOS", + "value": "AutomaticByOS", + "valueType": { + "$id": "127", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "122" + }, + "doc": "The virtual machine will automatically be updated by the OS.\nThe property WindowsConfiguration.enableAutomaticUpdates must be true.", + "decorators": [] + }, + { + "$id": "128", + "kind": "enumvalue", + "name": "AutomaticByPlatform", + "value": "AutomaticByPlatform", + "valueType": { + "$id": "129", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "122" + }, + "doc": "The virtual machine will automatically updated by the platform. The properties\nprovisionVMAgent and WindowsConfiguration.enableAutomaticUpdates must be true.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ComputeFleet", + "doc": "Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual\nmachines associated to virtual machine scale set with OrchestrationMode as\nFlexible.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "130", + "kind": "enum", + "name": "ComputeFleetWindowsPatchAssessmentMode", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.WindowsPatchAssessmentMode", + "valueType": { + "$id": "131", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "132", + "kind": "enumvalue", + "name": "ImageDefault", + "value": "ImageDefault", + "valueType": { + "$id": "133", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "130" + }, + "doc": "You control the timing of patch assessments on a virtual machine.", + "decorators": [] + }, + { + "$id": "134", + "kind": "enumvalue", + "name": "AutomaticByPlatform", + "value": "AutomaticByPlatform", + "valueType": { + "$id": "135", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "130" + }, + "doc": "The platform will trigger periodic patch assessments. The property provisionVMAgent must be true.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ComputeFleet", + "doc": "Specifies the mode of VM Guest patch assessment for the IaaS virtual machine.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "136", + "kind": "enum", + "name": "ComputeFleetWindowsVMGuestPatchAutomaticByPlatformRebootSetting", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.WindowsVMGuestPatchAutomaticByPlatformRebootSetting", + "valueType": { + "$id": "137", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "138", + "kind": "enumvalue", + "name": "Unknown", + "value": "Unknown", + "valueType": { + "$id": "139", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "136" + }, + "doc": "Unknown Reboot setting", + "decorators": [] + }, + { + "$id": "140", + "kind": "enumvalue", + "name": "IfRequired", + "value": "IfRequired", + "valueType": { + "$id": "141", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "136" + }, + "doc": "IfRequired Reboot setting", + "decorators": [] + }, + { + "$id": "142", + "kind": "enumvalue", + "name": "Never", + "value": "Never", + "valueType": { + "$id": "143", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "136" + }, + "doc": "Never Reboot setting", + "decorators": [] + }, + { + "$id": "144", + "kind": "enumvalue", + "name": "Always", + "value": "Always", + "valueType": { + "$id": "145", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "136" + }, + "doc": "Always Reboot setting", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ComputeFleet", + "doc": "Specifies the reboot setting for all AutomaticByPlatform patch installation operations.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "146", + "kind": "enum", + "name": "ComputeFleetProtocolTypes", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ProtocolTypes", + "valueType": { + "$id": "147", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "148", + "kind": "enumvalue", + "name": "Http", + "value": "Http", + "valueType": { + "$id": "149", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "146" + }, + "doc": "Http protocol", + "decorators": [] + }, + { + "$id": "150", + "kind": "enumvalue", + "name": "Https", + "value": "Https", + "valueType": { + "$id": "151", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "146" + }, + "doc": "Https protocol", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ComputeFleet", + "doc": "Specifies the protocol of WinRM listener. Possible values are: **http,**\n**https.**", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "152", + "kind": "enum", + "name": "ComputeFleetLinuxVMGuestPatchMode", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.LinuxVMGuestPatchMode", + "valueType": { + "$id": "153", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "154", + "kind": "enumvalue", + "name": "ImageDefault", + "value": "ImageDefault", + "valueType": { + "$id": "155", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "152" + }, + "doc": "The virtual machine's default patching configuration is used.", + "decorators": [] + }, + { + "$id": "156", + "kind": "enumvalue", + "name": "AutomaticByPlatform", + "value": "AutomaticByPlatform", + "valueType": { + "$id": "157", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "152" + }, + "doc": "The virtual machine will be automatically updated by the platform. The property provisionVMAgent must be true.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ComputeFleet", + "doc": "Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual\nmachines associated to virtual machine scale set with OrchestrationMode as\nFlexible.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "158", + "kind": "enum", + "name": "ComputeFleetLinuxPatchAssessmentMode", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.LinuxPatchAssessmentMode", + "valueType": { + "$id": "159", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "160", + "kind": "enumvalue", + "name": "ImageDefault", + "value": "ImageDefault", + "valueType": { + "$id": "161", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "158" + }, + "doc": "You control the timing of patch assessments on a virtual machine.", + "decorators": [] + }, + { + "$id": "162", + "kind": "enumvalue", + "name": "AutomaticByPlatform", + "value": "AutomaticByPlatform", + "valueType": { + "$id": "163", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "158" + }, + "doc": "The platform will trigger periodic patch assessments.The property provisionVMAgent must be true.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ComputeFleet", + "doc": "Specifies the mode of VM Guest Patch Assessment for the IaaS virtual\nmachine.

Possible values are:

**ImageDefault** - You\ncontrol the timing of patch assessments on a virtual machine.

\n**AutomaticByPlatform** - The platform will trigger periodic patch assessments.\nThe property provisionVMAgent must be true.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "164", + "kind": "enum", + "name": "ComputeFleetLinuxVMGuestPatchAutomaticByPlatformRebootSetting", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.LinuxVMGuestPatchAutomaticByPlatformRebootSetting", + "valueType": { + "$id": "165", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "166", + "kind": "enumvalue", + "name": "Unknown", + "value": "Unknown", + "valueType": { + "$id": "167", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "164" + }, + "doc": "Unknown Reboot setting", + "decorators": [] + }, + { + "$id": "168", + "kind": "enumvalue", + "name": "IfRequired", + "value": "IfRequired", + "valueType": { + "$id": "169", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "164" + }, + "doc": "IfRequired Reboot setting", + "decorators": [] + }, + { + "$id": "170", + "kind": "enumvalue", + "name": "Never", + "value": "Never", + "valueType": { + "$id": "171", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "164" + }, + "doc": "Never Reboot setting", + "decorators": [] + }, + { + "$id": "172", + "kind": "enumvalue", + "name": "Always", + "value": "Always", + "valueType": { + "$id": "173", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "164" + }, + "doc": "Always Reboot setting", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ComputeFleet", + "doc": "Specifies the reboot setting for all AutomaticByPlatform patch installation\noperations.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "174", + "kind": "enum", + "name": "ComputeFleetCachingTypes", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.CachingTypes", + "valueType": { + "$id": "175", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "176", + "kind": "enumvalue", + "name": "None", + "value": "None", + "valueType": { + "$id": "177", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "174" + }, + "doc": "'None' is default for Standard Storage", + "decorators": [] + }, + { + "$id": "178", + "kind": "enumvalue", + "name": "ReadOnly", + "value": "ReadOnly", + "valueType": { + "$id": "179", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "174" + }, + "doc": "'ReadOnly' is default for Premium Storage", + "decorators": [] + }, + { + "$id": "180", + "kind": "enumvalue", + "name": "ReadWrite", + "value": "ReadWrite", + "valueType": { + "$id": "181", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "174" + }, + "doc": "'ReadWrite' is default for OS Disk", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ComputeFleet", + "doc": "Specifies the caching requirements.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "182", + "kind": "enum", + "name": "ComputeFleetDiskCreateOptionTypes", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.DiskCreateOptionTypes", + "valueType": { + "$id": "183", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "184", + "kind": "enumvalue", + "name": "FromImage", + "value": "FromImage", + "valueType": { + "$id": "185", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "182" + }, + "doc": "This value is used when you are using an image to create the virtual machine.\nIf you are using a platform image, you also use the imageReference element\ndescribed above. If you are using a marketplace image, you also use the\nplan element previously described.", + "decorators": [] + }, + { + "$id": "186", + "kind": "enumvalue", + "name": "Empty", + "value": "Empty", + "valueType": { + "$id": "187", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "182" + }, + "doc": "This value is used when creating an empty data disk.", + "decorators": [] + }, + { + "$id": "188", + "kind": "enumvalue", + "name": "Attach", + "value": "Attach", + "valueType": { + "$id": "189", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "182" + }, + "doc": "This value is used when you are using a specialized disk to create the virtual machine.", + "decorators": [] + }, + { + "$id": "190", + "kind": "enumvalue", + "name": "Copy", + "value": "Copy", + "valueType": { + "$id": "191", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "182" + }, + "doc": "This value is used to create a data disk from a snapshot or another disk.", + "decorators": [] + }, + { + "$id": "192", + "kind": "enumvalue", + "name": "Restore", + "value": "Restore", + "valueType": { + "$id": "193", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "182" + }, + "doc": "This value is used to create a data disk from a disk restore point.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ComputeFleet", + "doc": "Specifies how the virtual machine should be created.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "194", + "kind": "enum", + "name": "ComputeFleetDiffDiskOptions", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.DiffDiskOptions", + "valueType": { + "$id": "195", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "196", + "kind": "enumvalue", + "name": "Local", + "value": "Local", + "valueType": { + "$id": "197", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "194" + }, + "doc": "Local Option.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ComputeFleet", + "doc": "Specifies the ephemeral disk option for operating system disk.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "198", + "kind": "enum", + "name": "ComputeFleetDiffDiskPlacement", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.DiffDiskPlacement", + "valueType": { + "$id": "199", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "200", + "kind": "enumvalue", + "name": "CacheDisk", + "value": "CacheDisk", + "valueType": { + "$id": "201", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "198" + }, + "doc": "CacheDisk option.", + "decorators": [] + }, + { + "$id": "202", + "kind": "enumvalue", + "name": "ResourceDisk", + "value": "ResourceDisk", + "valueType": { + "$id": "203", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "198" + }, + "doc": "Resource Disk option.", + "decorators": [] + }, + { + "$id": "204", + "kind": "enumvalue", + "name": "NvmeDisk", + "value": "NvmeDisk", + "valueType": { + "$id": "205", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "198" + }, + "doc": "NvmeDisk option.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ComputeFleet", + "doc": "Specifies the ephemeral disk placement for operating system disk. This property\ncan be used by user in the request to choose the location i.e, cache disk or\nresource disk space for Ephemeral OS disk provisioning. For more information on\nEphemeral OS disk size requirements, please refer Ephemeral OS disk size\nrequirements for Windows VM at\nhttps://learn.microsoft.com/azure/virtual-machines/windows/ephemeral-os-disks#size-requirements\nand Linux VM at\nhttps://learn.microsoft.com/azure/virtual-machines/linux/ephemeral-os-disks#size-requirements\nMinimum api-version for NvmeDisk: 2024-03-01.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "206", + "kind": "enum", + "name": "ComputeFleetOperatingSystemTypes", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.OperatingSystemTypes", + "valueType": { + "$id": "207", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "208", + "kind": "enumvalue", + "name": "Windows", + "value": "Windows", + "valueType": { + "$id": "209", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "206" + }, + "doc": "Windows OS type", + "decorators": [] + }, + { + "$id": "210", + "kind": "enumvalue", + "name": "Linux", + "value": "Linux", + "valueType": { + "$id": "211", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "206" + }, + "doc": "Linux OS type", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ComputeFleet", + "doc": "This property allows you to specify the type of the OS that is included in the\ndisk if creating a VM from user-image or a specialized VHD. Possible values\nare: **Windows,** **Linux.**", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "212", + "kind": "enum", + "name": "ComputeFleetStorageAccountTypes", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.StorageAccountTypes", + "valueType": { + "$id": "213", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "214", + "kind": "enumvalue", + "name": "StandardLrs", + "value": "Standard_LRS", + "valueType": { + "$id": "215", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "212" + }, + "doc": "Standard_LRS option.", + "decorators": [] + }, + { + "$id": "216", + "kind": "enumvalue", + "name": "PremiumLrs", + "value": "Premium_LRS", + "valueType": { + "$id": "217", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "212" + }, + "doc": "Premium_LRS option.", + "decorators": [] + }, + { + "$id": "218", + "kind": "enumvalue", + "name": "StandardSsdLrd", + "value": "StandardSSD_LRS", + "valueType": { + "$id": "219", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "212" + }, + "doc": "StandardSSD_LRS option.", + "decorators": [] + }, + { + "$id": "220", + "kind": "enumvalue", + "name": "UltraSsdLrs", + "value": "UltraSSD_LRS", + "valueType": { + "$id": "221", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "212" + }, + "doc": "UltraSSD_LRS option.", + "decorators": [] + }, + { + "$id": "222", + "kind": "enumvalue", + "name": "PremiumZrs", + "value": "Premium_ZRS", + "valueType": { + "$id": "223", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "212" + }, + "doc": "Premium_ZRS option.", + "decorators": [] + }, + { + "$id": "224", + "kind": "enumvalue", + "name": "StandardSsdZrs", + "value": "StandardSSD_ZRS", + "valueType": { + "$id": "225", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "212" + }, + "doc": "StandardSSD_ZRS option.", + "decorators": [] + }, + { + "$id": "226", + "kind": "enumvalue", + "name": "PremiumV2_LRS", + "value": "PremiumV2_LRS", + "valueType": { + "$id": "227", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "212" + }, + "doc": "PremiumV2_LRS option.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ComputeFleet", + "doc": "Specifies the storage account type for the managed disk. Managed OS disk\nstorage account type can only be set when you create the scale set. NOTE:\nUltraSSD_LRS can only be used with data disks. It cannot be used with OS Disk.\nStandard_LRS uses Standard HDD. StandardSSD_LRS uses Standard SSD. Premium_LRS\nuses Premium SSD. UltraSSD_LRS uses Ultra disk. Premium_ZRS uses Premium SSD\nzone redundant storage. StandardSSD_ZRS uses Standard SSD zone redundant\nstorage. For more information regarding disks supported for Windows Virtual\nMachines, refer to\nhttps://learn.microsoft.com/azure/virtual-machines/windows/disks-types and, for\nLinux Virtual Machines, refer to\nhttps://learn.microsoft.com/azure/virtual-machines/linux/disks-types", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "228", + "kind": "enum", + "name": "ComputeFleetSecurityEncryptionTypes", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SecurityEncryptionTypes", + "valueType": { + "$id": "229", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "230", + "kind": "enumvalue", + "name": "VMGuestStateOnly", + "value": "VMGuestStateOnly", + "valueType": { + "$id": "231", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "228" + }, + "doc": "EncryptionType of the managed disk is set to VMGuestStateOnly for encryption\nof just the VMGuestState blob.", + "decorators": [] + }, + { + "$id": "232", + "kind": "enumvalue", + "name": "DiskWithVMGuestState", + "value": "DiskWithVMGuestState", + "valueType": { + "$id": "233", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "228" + }, + "doc": "EncryptionType of the managed disk is set to DiskWithVMGuestState for encryption\nof the managed disk along with VMGuestState blob.", + "decorators": [] + }, + { + "$id": "234", + "kind": "enumvalue", + "name": "NonPersistedTpm", + "value": "NonPersistedTPM", + "valueType": { + "$id": "235", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "228" + }, + "doc": "EncryptionType of the managed disk is set to NonPersistedTPM for not persisting\nfirmware state in the VMGuestState blob.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ComputeFleet", + "doc": "Specifies the EncryptionType of the managed disk.\n**Note:** It can be set for only Confidential VMs.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "236", + "kind": "enum", + "name": "ComputeFleetDiskDeleteOptionTypes", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.DiskDeleteOptionTypes", + "valueType": { + "$id": "237", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "238", + "kind": "enumvalue", + "name": "Delete", + "value": "Delete", + "valueType": { + "$id": "239", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "236" + }, + "doc": "If this value is used, the managed disk is deleted when VM gets deleted.", + "decorators": [] + }, + { + "$id": "240", + "kind": "enumvalue", + "name": "Detach", + "value": "Detach", + "valueType": { + "$id": "241", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "236" + }, + "doc": "If this value is used, the managed disk is retained after VM gets deleted.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ComputeFleet", + "doc": "Specifies the behavior of the managed disk when the VM gets deleted, for\nexample whether the managed disk is deleted or detached. Supported values are:\n**Delete.** If this value is used, the managed disk is deleted when VM gets\ndeleted. **Detach.** If this value is used, the managed disk is retained after\nVM gets deleted. Minimum api-version: 2021-03-01.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "242", + "kind": "enum", + "name": "ComputeFleetDiskControllerTypes", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.DiskControllerTypes", + "valueType": { + "$id": "243", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "244", + "kind": "enumvalue", + "name": "Scsi", + "value": "SCSI", + "valueType": { + "$id": "245", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "242" + }, + "doc": "SCSI disk type", + "decorators": [] + }, + { + "$id": "246", + "kind": "enumvalue", + "name": "Nvme", + "value": "NVMe", + "valueType": { + "$id": "247", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "242" + }, + "doc": "NVMe disk type", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ComputeFleet", + "doc": "Specifies the disk controller type configured for the VM and\nVirtualMachineScaleSet. This property is only supported for virtual machines\nwhose operating system disk and VM sku supports Generation 2\n(https://learn.microsoft.com/en-us/azure/virtual-machines/generation-2), please\ncheck the HyperVGenerations capability returned as part of VM sku capabilities\nin the response of Microsoft.Compute SKUs api for the region contains V2\n(https://learn.microsoft.com/rest/api/compute/resourceskus/list). For more\ninformation about Disk Controller Types supported please refer to\nhttps://aka.ms/azure-diskcontrollertypes.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "248", + "kind": "enum", + "name": "ComputeFleetDomainNameLabelScopeTypes", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.DomainNameLabelScopeTypes", + "valueType": { + "$id": "249", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "250", + "kind": "enumvalue", + "name": "TenantReuse", + "value": "TenantReuse", + "valueType": { + "$id": "251", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "248" + }, + "doc": "TenantReuse type", + "decorators": [] + }, + { + "$id": "252", + "kind": "enumvalue", + "name": "SubscriptionReuse", + "value": "SubscriptionReuse", + "valueType": { + "$id": "253", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "248" + }, + "doc": "SubscriptionReuse type", + "decorators": [] + }, + { + "$id": "254", + "kind": "enumvalue", + "name": "ResourceGroupReuse", + "value": "ResourceGroupReuse", + "valueType": { + "$id": "255", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "248" + }, + "doc": "ResourceGroupReuse type", + "decorators": [] + }, + { + "$id": "256", + "kind": "enumvalue", + "name": "NoReuse", + "value": "NoReuse", + "valueType": { + "$id": "257", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "248" + }, + "doc": "NoReuse type", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ComputeFleet", + "doc": "The Domain name label scope.The concatenation of the hashed domain name label\nthat generated according to the policy from domain name label scope and vm\nindex will be the domain name labels of the PublicIPAddress resources that will\nbe created", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "258", + "kind": "enum", + "name": "ComputeFleetIPVersion", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.IPVersion", + "valueType": { + "$id": "259", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "260", + "kind": "enumvalue", + "name": "IPv4", + "value": "IPv4", + "valueType": { + "$id": "261", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "258" + }, + "doc": "IPv4 version", + "decorators": [] + }, + { + "$id": "262", + "kind": "enumvalue", + "name": "IPv6", + "value": "IPv6", + "valueType": { + "$id": "263", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "258" + }, + "doc": "IPv6 version", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ComputeFleet", + "doc": "Available from Api-Version 2017-03-30 onwards, it represents whether the\nspecific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible\nvalues are: 'IPv4' and 'IPv6'.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "264", + "kind": "enum", + "name": "ComputeFleetVmDeleteOptions", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.DeleteOptions", + "valueType": { + "$id": "265", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "266", + "kind": "enumvalue", + "name": "Delete", + "value": "Delete", + "valueType": { + "$id": "267", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "264" + }, + "doc": "Delete Option", + "decorators": [] + }, + { + "$id": "268", + "kind": "enumvalue", + "name": "Detach", + "value": "Detach", + "valueType": { + "$id": "269", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "264" + }, + "doc": "Detach Option", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ComputeFleet", + "doc": "Specify what happens to the network interface when the VM is deleted", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "270", + "kind": "enum", + "name": "ComputeFleetPublicIPAddressSkuName", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.PublicIPAddressSkuName", + "valueType": { + "$id": "271", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "272", + "kind": "enumvalue", + "name": "Basic", + "value": "Basic", + "valueType": { + "$id": "273", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "270" + }, + "doc": "Basic sku name", + "decorators": [] + }, + { + "$id": "274", + "kind": "enumvalue", + "name": "Standard", + "value": "Standard", + "valueType": { + "$id": "275", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "270" + }, + "doc": "Standard sku name", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ComputeFleet", + "doc": "Specify public IP sku name.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "276", + "kind": "enum", + "name": "ComputeFleetPublicIPAddressSkuTier", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.PublicIPAddressSkuTier", + "valueType": { + "$id": "277", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "278", + "kind": "enumvalue", + "name": "Regional", + "value": "Regional", + "valueType": { + "$id": "279", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "276" + }, + "doc": "Regional sku tier", + "decorators": [] + }, + { + "$id": "280", + "kind": "enumvalue", + "name": "Global", + "value": "Global", + "valueType": { + "$id": "281", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "276" + }, + "doc": "Global sku tier", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ComputeFleet", + "doc": "Specify public IP sku tier", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "282", + "kind": "enum", + "name": "ComputeFleetNetworkInterfaceAuxiliaryMode", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.NetworkInterfaceAuxiliaryMode", + "valueType": { + "$id": "283", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "284", + "kind": "enumvalue", + "name": "None", + "value": "None", + "valueType": { + "$id": "285", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "282" + }, + "doc": "None Mode", + "decorators": [] + }, + { + "$id": "286", + "kind": "enumvalue", + "name": "AcceleratedConnections", + "value": "AcceleratedConnections", + "valueType": { + "$id": "287", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "282" + }, + "doc": "AcceleratedConnections Mode", + "decorators": [] + }, + { + "$id": "288", + "kind": "enumvalue", + "name": "Floating", + "value": "Floating", + "valueType": { + "$id": "289", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "282" + }, + "doc": "Floating Mode", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ComputeFleet", + "doc": "Specifies whether the Auxiliary mode is enabled for the Network Interface\nresource.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "290", + "kind": "enum", + "name": "ComputeFleetNetworkInterfaceAuxiliarySku", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.NetworkInterfaceAuxiliarySku", + "valueType": { + "$id": "291", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "292", + "kind": "enumvalue", + "name": "None", + "value": "None", + "valueType": { + "$id": "293", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "290" + }, + "doc": "no sku", + "decorators": [] + }, + { + "$id": "294", + "kind": "enumvalue", + "name": "A1", + "value": "A1", + "valueType": { + "$id": "295", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "290" + }, + "doc": "A1 sku", + "decorators": [] + }, + { + "$id": "296", + "kind": "enumvalue", + "name": "A2", + "value": "A2", + "valueType": { + "$id": "297", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "290" + }, + "doc": "A2 sku", + "decorators": [] + }, + { + "$id": "298", + "kind": "enumvalue", + "name": "A4", + "value": "A4", + "valueType": { + "$id": "299", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "290" + }, + "doc": "A4 sku", + "decorators": [] + }, + { + "$id": "300", + "kind": "enumvalue", + "name": "A8", + "value": "A8", + "valueType": { + "$id": "301", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "290" + }, + "doc": "A8 sku", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ComputeFleet", + "doc": "Specifies whether the Auxiliary sku is enabled for the Network Interface\nresource.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "302", + "kind": "enum", + "name": "ComputeFleetNetworkApiVersion", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.NetworkApiVersion", + "valueType": { + "$id": "303", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "304", + "kind": "enumvalue", + "name": "v2020_11_01", + "value": "2020-11-01", + "valueType": { + "$id": "305", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "302" + }, + "doc": "Initial version supported. Later versions are supported as well.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ComputeFleet", + "doc": "specifies the Microsoft.Network API version used when creating networking\nresources in the Network Interface Configurations for Virtual Machine Scale Set\nwith orchestration mode 'Flexible'", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "306", + "kind": "enum", + "name": "ComputeFleetSecurityTypes", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SecurityTypes", + "valueType": { + "$id": "307", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "308", + "kind": "enumvalue", + "name": "TrustedLaunch", + "value": "TrustedLaunch", + "valueType": { + "$id": "309", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "306" + }, + "doc": "TrustedLaunch security type", + "decorators": [] + }, + { + "$id": "310", + "kind": "enumvalue", + "name": "ConfidentialVM", + "value": "ConfidentialVM", + "valueType": { + "$id": "311", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "306" + }, + "doc": "ConfidentialVM security type", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ComputeFleet", + "doc": "Specifies the SecurityType of the virtual machine. It has to be set to any\nspecified value to enable UefiSettings. The default behavior is: UefiSettings\nwill not be enabled unless this property is set.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "312", + "kind": "enum", + "name": "ProxyAgentExecuteMode", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.Mode", + "valueType": { + "$id": "313", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "314", + "kind": "enumvalue", + "name": "Audit", + "value": "Audit", + "valueType": { + "$id": "315", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "312" + }, + "doc": "Audit Mode", + "decorators": [] + }, + { + "$id": "316", + "kind": "enumvalue", + "name": "Enforce", + "value": "Enforce", + "valueType": { + "$id": "317", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "312" + }, + "doc": "Enforce Mode", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ComputeFleet", + "doc": "Specifies the mode that ProxyAgent will execute on if the feature is enabled.\nProxyAgent will start to audit or monitor but not enforce access control over\nrequests to host endpoints in Audit mode, while in Enforce mode it will enforce\naccess control. The default value is Enforce mode.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "318", + "kind": "enum", + "name": "ManagedServiceIdentityType", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentityType", + "valueType": { + "$id": "319", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "320", + "kind": "enumvalue", + "name": "None", + "value": "None", + "valueType": { + "$id": "321", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "318" + }, + "doc": "No managed identity.", + "decorators": [] + }, + { + "$id": "322", + "kind": "enumvalue", + "name": "SystemAssigned", + "value": "SystemAssigned", + "valueType": { + "$id": "323", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "318" + }, + "doc": "System assigned managed identity.", + "decorators": [] + }, + { + "$id": "324", + "kind": "enumvalue", + "name": "UserAssigned", + "value": "UserAssigned", + "valueType": { + "$id": "325", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "318" + }, + "doc": "User assigned managed identity.", + "decorators": [] + }, + { + "$id": "326", + "kind": "enumvalue", + "name": "SystemAssigned,UserAssigned", + "value": "SystemAssigned,UserAssigned", + "valueType": { + "$id": "327", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "318" + }, + "doc": "System and user assigned managed identity.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ComputeFleet", + "doc": "Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "328", + "kind": "enum", + "name": "createdByType", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.createdByType", + "valueType": { + "$id": "329", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "330", + "kind": "enumvalue", + "name": "User", + "value": "User", + "valueType": { + "$id": "331", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "328" + }, + "doc": "The entity was created by a user.", + "decorators": [] + }, + { + "$id": "332", + "kind": "enumvalue", + "name": "Application", + "value": "Application", + "valueType": { + "$id": "333", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "328" + }, + "doc": "The entity was created by an application.", + "decorators": [] + }, + { + "$id": "334", + "kind": "enumvalue", + "name": "ManagedIdentity", + "value": "ManagedIdentity", + "valueType": { + "$id": "335", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "328" + }, + "doc": "The entity was created by a managed identity.", + "decorators": [] + }, + { + "$id": "336", + "kind": "enumvalue", + "name": "Key", + "value": "Key", + "valueType": { + "$id": "337", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "328" + }, + "doc": "The entity was created by a key.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ComputeFleet", + "doc": "The kind of entity that created the resource.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "338", + "kind": "enum", + "name": "ResourceProvisioningState", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceProvisioningState", + "valueType": { + "$id": "339", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "340", + "kind": "enumvalue", + "name": "Succeeded", + "value": "Succeeded", + "valueType": { + "$id": "341", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "338" + }, + "doc": "Resource has been created.", + "decorators": [] + }, + { + "$id": "342", + "kind": "enumvalue", + "name": "Failed", + "value": "Failed", + "valueType": { + "$id": "343", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "338" + }, + "doc": "Resource creation failed.", + "decorators": [] + }, + { + "$id": "344", + "kind": "enumvalue", + "name": "Canceled", + "value": "Canceled", + "valueType": { + "$id": "345", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "338" + }, + "doc": "Resource creation was canceled.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ComputeFleet", + "doc": "The provisioning state of a resource type.", + "isFixed": false, + "isFlags": false, + "usage": "LroPolling", + "decorators": [] + }, + { + "$id": "346", + "kind": "enum", + "name": "Versions", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.Versions", + "valueType": { + "$id": "347", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "348", + "kind": "enumvalue", + "name": "v2024_11_01", + "value": "2024-11-01", + "valueType": { + "$id": "349", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "346" + }, + "doc": "Public Api version", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ComputeFleet", + "doc": "Api versions", + "isFixed": true, + "isFlags": false, + "usage": "ApiVersionEnum", + "decorators": [] + } + ], + "models": [ + { + "$id": "350", + "kind": "model", + "name": "OperationListResult", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationListResult", + "usage": "Output,Json", + "doc": "A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.", + "decorators": [], + "properties": [ + { + "$id": "351", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The Operation items on this page", + "type": { + "$id": "352", + "kind": "array", + "name": "ArrayOperation", + "valueType": { + "$id": "353", + "kind": "model", + "name": "Operation", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation", + "usage": "Output,Json", + "doc": "Details of a REST API operation, returned from the Resource Provider Operations API", + "decorators": [], + "properties": [ + { + "$id": "354", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the operation, as per Resource-Based Access Control (RBAC). Examples: \"Microsoft.Compute/virtualMachines/write\", \"Microsoft.Compute/virtualMachines/capture/action\"", + "type": { + "$id": "355", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.name", + "serializationOptions": { + "$id": "356", + "json": { + "$id": "357", + "name": "name" + } + } + }, + { + "$id": "358", + "kind": "property", + "name": "isDataAction", + "serializedName": "isDataAction", + "doc": "Whether the operation applies to data-plane. This is \"true\" for data-plane operations and \"false\" for Azure Resource Manager/control-plane operations.", + "type": { + "$id": "359", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.isDataAction", + "serializationOptions": { + "$id": "360", + "json": { + "$id": "361", + "name": "isDataAction" + } + } + }, + { + "$id": "362", + "kind": "property", + "name": "display", + "serializedName": "display", + "doc": "Localized display information for this particular operation.", + "type": { + "$id": "363", + "kind": "model", + "name": "OperationDisplay", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay", + "usage": "Output,Json", + "doc": "Localized display information for and operation.", + "decorators": [], + "properties": [ + { + "$id": "364", + "kind": "property", + "name": "provider", + "serializedName": "provider", + "doc": "The localized friendly form of the resource provider name, e.g. \"Microsoft Monitoring Insights\" or \"Microsoft Compute\".", + "type": { + "$id": "365", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay.provider", + "serializationOptions": { + "$id": "366", + "json": { + "$id": "367", + "name": "provider" + } + } + }, + { + "$id": "368", + "kind": "property", + "name": "resource", + "serializedName": "resource", + "doc": "The localized friendly name of the resource type related to this operation. E.g. \"Virtual Machines\" or \"Job Schedule Collections\".", + "type": { + "$id": "369", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay.resource", + "serializationOptions": { + "$id": "370", + "json": { + "$id": "371", + "name": "resource" + } + } + }, + { + "$id": "372", + "kind": "property", + "name": "operation", + "serializedName": "operation", + "doc": "The concise, localized friendly name for the operation; suitable for dropdowns. E.g. \"Create or Update Virtual Machine\", \"Restart Virtual Machine\".", + "type": { + "$id": "373", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay.operation", + "serializationOptions": { + "$id": "374", + "json": { + "$id": "375", + "name": "operation" + } + } + }, + { + "$id": "376", + "kind": "property", + "name": "description", + "serializedName": "description", + "doc": "The short, localized friendly description of the operation; suitable for tool tips and detailed views.", + "type": { + "$id": "377", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay.description", + "serializationOptions": { + "$id": "378", + "json": { + "$id": "379", + "name": "description" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.display", + "serializationOptions": { + "$id": "380", + "json": { + "$id": "381", + "name": "display" + } + } + }, + { + "$id": "382", + "kind": "property", + "name": "origin", + "serializedName": "origin", + "doc": "The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\"", + "type": { + "$ref": "2" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.origin", + "serializationOptions": { + "$id": "383", + "json": { + "$id": "384", + "name": "origin" + } + } + }, + { + "$id": "385", + "kind": "property", + "name": "actionType", + "serializedName": "actionType", + "doc": "Extensible enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs.", + "type": { + "$ref": "10" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.actionType", + "serializationOptions": { + "$id": "386", + "json": { + "$id": "387", + "name": "actionType" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationListResult.value", + "serializationOptions": { + "$id": "388", + "json": { + "$id": "389", + "name": "value" + } + } + }, + { + "$id": "390", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "391", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "392", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationListResult.nextLink", + "serializationOptions": { + "$id": "393", + "json": { + "$id": "394", + "name": "nextLink" + } + } + } + ] + }, + { + "$ref": "353" + }, + { + "$ref": "363" + }, + { + "$id": "395", + "kind": "model", + "name": "ErrorResponse", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorResponse", + "usage": "Json,Exception", + "doc": "Common error response for all Azure Resource Manager APIs to return error details for failed operations.", + "decorators": [], + "properties": [ + { + "$id": "396", + "kind": "property", + "name": "error", + "serializedName": "error", + "doc": "The error object.", + "type": { + "$id": "397", + "kind": "model", + "name": "ErrorDetail", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail", + "usage": "Json,Exception,LroPolling", + "doc": "The error detail.", + "decorators": [], + "properties": [ + { + "$id": "398", + "kind": "property", + "name": "code", + "serializedName": "code", + "doc": "The error code.", + "type": { + "$id": "399", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.code", + "serializationOptions": { + "$id": "400", + "json": { + "$id": "401", + "name": "code" + } + } + }, + { + "$id": "402", + "kind": "property", + "name": "message", + "serializedName": "message", + "doc": "The error message.", + "type": { + "$id": "403", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.message", + "serializationOptions": { + "$id": "404", + "json": { + "$id": "405", + "name": "message" + } + } + }, + { + "$id": "406", + "kind": "property", + "name": "target", + "serializedName": "target", + "doc": "The error target.", + "type": { + "$id": "407", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.target", + "serializationOptions": { + "$id": "408", + "json": { + "$id": "409", + "name": "target" + } + } + }, + { + "$id": "410", + "kind": "property", + "name": "details", + "serializedName": "details", + "doc": "The error details.", + "type": { + "$id": "411", + "kind": "array", + "name": "ArrayErrorDetail", + "valueType": { + "$ref": "397" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.details", + "serializationOptions": { + "$id": "412", + "json": { + "$id": "413", + "name": "details" + } + } + }, + { + "$id": "414", + "kind": "property", + "name": "additionalInfo", + "serializedName": "additionalInfo", + "doc": "The error additional info.", + "type": { + "$id": "415", + "kind": "array", + "name": "ArrayErrorAdditionalInfo", + "valueType": { + "$id": "416", + "kind": "model", + "name": "ErrorAdditionalInfo", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo", + "usage": "Json,Exception,LroPolling", + "doc": "The resource management error additional info.", + "decorators": [], + "properties": [ + { + "$id": "417", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The additional info type.", + "type": { + "$id": "418", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo.type", + "serializationOptions": { + "$id": "419", + "json": { + "$id": "420", + "name": "type" + } + } + }, + { + "$id": "421", + "kind": "property", + "name": "info", + "serializedName": "info", + "doc": "The additional info.", + "type": { + "$id": "422", + "kind": "model", + "name": "ErrorAdditionalInfoInfo", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo.info.anonymous", + "usage": "Json,Exception,LroPolling", + "decorators": [], + "properties": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo.info", + "serializationOptions": { + "$id": "423", + "json": { + "$id": "424", + "name": "info" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.additionalInfo", + "serializationOptions": { + "$id": "425", + "json": { + "$id": "426", + "name": "additionalInfo" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorResponse.error", + "serializationOptions": { + "$id": "427", + "json": { + "$id": "428", + "name": "error" + } + } + } + ] + }, + { + "$ref": "397" + }, + { + "$ref": "416" + }, + { + "$ref": "422" + }, + { + "$id": "429", + "kind": "model", + "name": "ComputeFleet", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.Fleet", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "An Compute Fleet resource", + "decorators": [], + "baseModel": { + "$id": "430", + "kind": "model", + "name": "TrackedResource", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.TrackedResource", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'", + "decorators": [], + "baseModel": { + "$id": "431", + "kind": "model", + "name": "Resource", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Common fields that are returned in the response for all Azure Resource Manager resources", + "decorators": [], + "properties": [ + { + "$id": "432", + "kind": "property", + "name": "id", + "serializedName": "id", + "doc": "Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}", + "type": { + "$id": "433", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "434", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource.id", + "serializationOptions": { + "$id": "435", + "json": { + "$id": "436", + "name": "id" + } + } + }, + { + "$id": "437", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the resource", + "type": { + "$id": "438", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource.name", + "serializationOptions": { + "$id": "439", + "json": { + "$id": "440", + "name": "name" + } + } + }, + { + "$id": "441", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"", + "type": { + "$id": "442", + "kind": "string", + "name": "armResourceType", + "crossLanguageDefinitionId": "Azure.Core.armResourceType", + "baseType": { + "$id": "443", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource.type", + "serializationOptions": { + "$id": "444", + "json": { + "$id": "445", + "name": "type" + } + } + }, + { + "$id": "446", + "kind": "property", + "name": "systemData", + "serializedName": "systemData", + "doc": "Azure Resource Manager metadata containing createdBy and modifiedBy information.", + "type": { + "$id": "447", + "kind": "model", + "name": "SystemData", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData", + "usage": "Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Metadata pertaining to creation and last modification of the resource.", + "decorators": [], + "properties": [ + { + "$id": "448", + "kind": "property", + "name": "createdBy", + "serializedName": "createdBy", + "doc": "The identity that created the resource.", + "type": { + "$id": "449", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.createdBy", + "serializationOptions": { + "$id": "450", + "json": { + "$id": "451", + "name": "createdBy" + } + } + }, + { + "$id": "452", + "kind": "property", + "name": "createdByType", + "serializedName": "createdByType", + "doc": "The type of identity that created the resource.", + "type": { + "$ref": "328" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.createdByType", + "serializationOptions": { + "$id": "453", + "json": { + "$id": "454", + "name": "createdByType" + } + } + }, + { + "$id": "455", + "kind": "property", + "name": "createdAt", + "serializedName": "createdAt", + "doc": "The timestamp of resource creation (UTC).", + "type": { + "$id": "456", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "457", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.createdAt", + "serializationOptions": { + "$id": "458", + "json": { + "$id": "459", + "name": "createdAt" + } + } + }, + { + "$id": "460", + "kind": "property", + "name": "lastModifiedBy", + "serializedName": "lastModifiedBy", + "doc": "The identity that last modified the resource.", + "type": { + "$id": "461", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.lastModifiedBy", + "serializationOptions": { + "$id": "462", + "json": { + "$id": "463", + "name": "lastModifiedBy" + } + } + }, + { + "$id": "464", + "kind": "property", + "name": "lastModifiedByType", + "serializedName": "lastModifiedByType", + "doc": "The type of identity that last modified the resource.", + "type": { + "$ref": "328" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.lastModifiedByType", + "serializationOptions": { + "$id": "465", + "json": { + "$id": "466", + "name": "lastModifiedByType" + } + } + }, + { + "$id": "467", + "kind": "property", + "name": "lastModifiedAt", + "serializedName": "lastModifiedAt", + "doc": "The timestamp of resource last modification (UTC)", + "type": { + "$id": "468", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "469", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.lastModifiedAt", + "serializationOptions": { + "$id": "470", + "json": { + "$id": "471", + "name": "lastModifiedAt" + } + } + } + ] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource.systemData", + "serializationOptions": { + "$id": "472", + "json": { + "$id": "473", + "name": "systemData" + } + } + } + ] + }, + "properties": [ + { + "$id": "474", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Resource tags.", + "type": { + "$id": "475", + "kind": "dict", + "keyType": { + "$id": "476", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "477", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.TrackedResource.tags", + "serializationOptions": { + "$id": "478", + "json": { + "$id": "479", + "name": "tags" + } + } + }, + { + "$id": "480", + "kind": "property", + "name": "location", + "serializedName": "location", + "doc": "The geo-location where the resource lives", + "type": { + "$id": "481", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.TrackedResource.location", + "serializationOptions": { + "$id": "482", + "json": { + "$id": "483", + "name": "location" + } + } + } + ] + }, + "properties": [ + { + "$id": "484", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "485", + "kind": "model", + "name": "ComputeFleetProperties", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.FleetProperties", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Details of the Compute Fleet.", + "decorators": [], + "properties": [ + { + "$id": "486", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "The status of the last operation.", + "type": { + "$ref": "14" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.FleetProperties.provisioningState", + "serializationOptions": { + "$id": "487", + "json": { + "$id": "488", + "name": "provisioningState" + } + } + }, + { + "$id": "489", + "kind": "property", + "name": "spotPriorityProfile", + "serializedName": "spotPriorityProfile", + "doc": "Configuration Options for Spot instances in Compute Fleet.", + "type": { + "$id": "490", + "kind": "model", + "name": "SpotPriorityProfile", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SpotPriorityProfile", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Configuration Options for Spot instances in Compute Fleet.", + "decorators": [], + "properties": [ + { + "$id": "491", + "kind": "property", + "name": "capacity", + "serializedName": "capacity", + "doc": "Total capacity to achieve. It is currently in terms of number of VMs.", + "type": { + "$id": "492", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SpotPriorityProfile.capacity", + "serializationOptions": { + "$id": "493", + "json": { + "$id": "494", + "name": "capacity" + } + } + }, + { + "$id": "495", + "kind": "property", + "name": "minCapacity", + "serializedName": "minCapacity", + "doc": "Minimum capacity to achieve which cannot be updated. If we will not be able to \"guarantee\" minimum capacity, we will reject the request in the sync path itself.", + "type": { + "$id": "496", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SpotPriorityProfile.minCapacity", + "serializationOptions": { + "$id": "497", + "json": { + "$id": "498", + "name": "minCapacity" + } + } + }, + { + "$id": "499", + "kind": "property", + "name": "maxPricePerVM", + "serializedName": "maxPricePerVM", + "doc": "Price per hour of each Spot VM will never exceed this.", + "type": { + "$id": "500", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SpotPriorityProfile.maxPricePerVM", + "serializationOptions": { + "$id": "501", + "json": { + "$id": "502", + "name": "maxPricePerVM" + } + } + }, + { + "$id": "503", + "kind": "property", + "name": "evictionPolicy", + "serializedName": "evictionPolicy", + "doc": "Eviction Policy to follow when evicting Spot VMs.", + "type": { + "$ref": "30" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SpotPriorityProfile.evictionPolicy", + "serializationOptions": { + "$id": "504", + "json": { + "$id": "505", + "name": "evictionPolicy" + } + } + }, + { + "$id": "506", + "kind": "property", + "name": "allocationStrategy", + "serializedName": "allocationStrategy", + "doc": "Allocation strategy to follow when determining the VM sizes distribution for Spot VMs.", + "type": { + "$ref": "36" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SpotPriorityProfile.allocationStrategy", + "serializationOptions": { + "$id": "507", + "json": { + "$id": "508", + "name": "allocationStrategy" + } + } + }, + { + "$id": "509", + "kind": "property", + "name": "IsMaintainEnabled", + "serializedName": "maintain", + "doc": "Flag to enable/disable continuous goal seeking for the desired capacity and restoration of evicted Spot VMs.\nIf maintain is enabled, AzureFleetRP will use all VM sizes in vmSizesProfile to create new VMs (if VMs are evicted deleted)\nor update existing VMs with new VM sizes (if VMs are evicted deallocated or failed to allocate due to capacity constraint) in order to achieve the desired capacity.\nMaintain is enabled by default.", + "type": { + "$id": "510", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SpotPriorityProfile.maintain", + "serializationOptions": { + "$id": "511", + "json": { + "$id": "512", + "name": "maintain" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.FleetProperties.spotPriorityProfile", + "serializationOptions": { + "$id": "513", + "json": { + "$id": "514", + "name": "spotPriorityProfile" + } + } + }, + { + "$id": "515", + "kind": "property", + "name": "regularPriorityProfile", + "serializedName": "regularPriorityProfile", + "doc": "Configuration Options for Regular instances in Compute Fleet.", + "type": { + "$id": "516", + "kind": "model", + "name": "RegularPriorityProfile", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.RegularPriorityProfile", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Configuration Options for Regular instances in Compute Fleet.", + "decorators": [], + "properties": [ + { + "$id": "517", + "kind": "property", + "name": "capacity", + "serializedName": "capacity", + "doc": "Total capacity to achieve. It is currently in terms of number of VMs.", + "type": { + "$id": "518", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.RegularPriorityProfile.capacity", + "serializationOptions": { + "$id": "519", + "json": { + "$id": "520", + "name": "capacity" + } + } + }, + { + "$id": "521", + "kind": "property", + "name": "minCapacity", + "serializedName": "minCapacity", + "doc": "Minimum capacity to achieve which cannot be updated. If we will not be able to \"guarantee\" minimum capacity, we will reject the request in the sync path itself.", + "type": { + "$id": "522", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.RegularPriorityProfile.minCapacity", + "serializationOptions": { + "$id": "523", + "json": { + "$id": "524", + "name": "minCapacity" + } + } + }, + { + "$id": "525", + "kind": "property", + "name": "allocationStrategy", + "serializedName": "allocationStrategy", + "doc": "Allocation strategy to follow when determining the VM sizes distribution for Regular VMs.", + "type": { + "$ref": "44" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.RegularPriorityProfile.allocationStrategy", + "serializationOptions": { + "$id": "526", + "json": { + "$id": "527", + "name": "allocationStrategy" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.FleetProperties.regularPriorityProfile", + "serializationOptions": { + "$id": "528", + "json": { + "$id": "529", + "name": "regularPriorityProfile" + } + } + }, + { + "$id": "530", + "kind": "property", + "name": "vmSizesProfile", + "serializedName": "vmSizesProfile", + "doc": "List of VM sizes supported for Compute Fleet", + "type": { + "$id": "531", + "kind": "array", + "name": "ArrayVmSizeProfile", + "valueType": { + "$id": "532", + "kind": "model", + "name": "ComputeFleetVmSizeProfile", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VmSizeProfile", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Specifications about a VM Size. This will also contain the corresponding rank and weight in future.", + "decorators": [], + "properties": [ + { + "$id": "533", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The Sku name (e.g. 'Standard_DS1_v2')", + "type": { + "$id": "534", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VmSizeProfile.name", + "serializationOptions": { + "$id": "535", + "json": { + "$id": "536", + "name": "name" + } + } + }, + { + "$id": "537", + "kind": "property", + "name": "rank", + "serializedName": "rank", + "doc": "The rank of the VM size. This is used with 'RegularPriorityAllocationStrategy.Prioritized'\nThe lower the number, the higher the priority. Starting with 0.", + "type": { + "$id": "538", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VmSizeProfile.rank", + "serializationOptions": { + "$id": "539", + "json": { + "$id": "540", + "name": "rank" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.FleetProperties.vmSizesProfile", + "serializationOptions": { + "$id": "541", + "json": { + "$id": "542", + "name": "vmSizesProfile" + } + } + }, + { + "$id": "543", + "kind": "property", + "name": "vmAttributes", + "serializedName": "vmAttributes", + "doc": "Attribute based Fleet.", + "type": { + "$id": "544", + "kind": "model", + "name": "ComputeFleetVMAttributes", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributes", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "VMAttributes that will be used to filter VMSizes which will be used to build Fleet.", + "decorators": [], + "properties": [ + { + "$id": "545", + "kind": "property", + "name": "vCpuCount", + "serializedName": "vCpuCount", + "doc": "The range of vCpuCount specified from Min to Max. Must be specified if VMAttributes are specified, either Min or Max is required if specified.", + "type": { + "$id": "546", + "kind": "model", + "name": "ComputeFleetVmAttributeMinMaxInteger", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributeMinMaxInteger", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "While retrieving VMSizes from CRS, Min = 0 (uint.MinValue) if not specified, Max = 4294967295 (uint.MaxValue) if not specified. This allows to filter VMAttributes on all available VMSizes.", + "decorators": [], + "properties": [ + { + "$id": "547", + "kind": "property", + "name": "min", + "serializedName": "min", + "doc": "Min VMSize from CRS, Min = 0 (uint.MinValue) if not specified.", + "type": { + "$id": "548", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributeMinMaxInteger.min", + "serializationOptions": { + "$id": "549", + "json": { + "$id": "550", + "name": "min" + } + } + }, + { + "$id": "551", + "kind": "property", + "name": "max", + "serializedName": "max", + "doc": "Max VMSize from CRS, Max = 4294967295 (uint.MaxValue) if not specified.", + "type": { + "$id": "552", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributeMinMaxInteger.max", + "serializationOptions": { + "$id": "553", + "json": { + "$id": "554", + "name": "max" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributes.vCpuCount", + "serializationOptions": { + "$id": "555", + "json": { + "$id": "556", + "name": "vCpuCount" + } + } + }, + { + "$id": "557", + "kind": "property", + "name": "memoryInGiB", + "serializedName": "memoryInGiB", + "doc": "The range of memory specified from Min to Max. Must be specified if VMAttributes are specified, either Min or Max is required if specified.", + "type": { + "$id": "558", + "kind": "model", + "name": "ComputeFleetVmAttributeMinMaxDouble", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributeMinMaxDouble", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "VMAttributes using double values.", + "decorators": [], + "properties": [ + { + "$id": "559", + "kind": "property", + "name": "min", + "serializedName": "min", + "doc": "Minimum value. default 0. Double.MinValue()", + "type": { + "$id": "560", + "kind": "float64", + "name": "float64", + "crossLanguageDefinitionId": "TypeSpec.float64", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributeMinMaxDouble.min", + "serializationOptions": { + "$id": "561", + "json": { + "$id": "562", + "name": "min" + } + } + }, + { + "$id": "563", + "kind": "property", + "name": "max", + "serializedName": "max", + "doc": "Maximum value. Double.MaxValue(1.7976931348623157E+308)", + "type": { + "$id": "564", + "kind": "float64", + "name": "float64", + "crossLanguageDefinitionId": "TypeSpec.float64", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributeMinMaxDouble.max", + "serializationOptions": { + "$id": "565", + "json": { + "$id": "566", + "name": "max" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributes.memoryInGiB", + "serializationOptions": { + "$id": "567", + "json": { + "$id": "568", + "name": "memoryInGiB" + } + } + }, + { + "$id": "569", + "kind": "property", + "name": "memoryInGiBPerVCpu", + "serializedName": "memoryInGiBPerVCpu", + "doc": "The range of memory in GiB per vCPU specified from min to max. Optional parameter. Either Min or Max is required if specified.", + "type": { + "$ref": "558" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributes.memoryInGiBPerVCpu", + "serializationOptions": { + "$id": "570", + "json": { + "$id": "571", + "name": "memoryInGiBPerVCpu" + } + } + }, + { + "$id": "572", + "kind": "property", + "name": "localStorageSupport", + "serializedName": "localStorageSupport", + "doc": "Specifies whether the VMSize supporting local storage should be used to build Fleet or not.\nIncluded - Default if not specified as most Azure VMs support local storage.", + "type": { + "$ref": "50" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributes.localStorageSupport", + "serializationOptions": { + "$id": "573", + "json": { + "$id": "574", + "name": "localStorageSupport" + } + } + }, + { + "$id": "575", + "kind": "property", + "name": "localStorageInGiB", + "serializedName": "localStorageInGiB", + "doc": "LocalStorageSupport should be set to \"Included\" or \"Required\" to use this VMAttribute. \nIf localStorageSupport is \"Excluded\", this VMAttribute can not be used.", + "type": { + "$ref": "558" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributes.localStorageInGiB", + "serializationOptions": { + "$id": "576", + "json": { + "$id": "577", + "name": "localStorageInGiB" + } + } + }, + { + "$id": "578", + "kind": "property", + "name": "localStorageDiskTypes", + "serializedName": "localStorageDiskTypes", + "doc": "The local storage disk types specified as a list. LocalStorageSupport should be set to \"Included\" or \"Required\" to use this VMAttribute. \nIf localStorageSupport is \"Excluded\", this VMAttribute can not be used.", + "type": { + "$id": "579", + "kind": "array", + "name": "ArrayLocalStorageDiskType", + "valueType": { + "$ref": "58" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributes.localStorageDiskTypes", + "serializationOptions": { + "$id": "580", + "json": { + "$id": "581", + "name": "localStorageDiskTypes" + } + } + }, + { + "$id": "582", + "kind": "property", + "name": "dataDiskCount", + "serializedName": "dataDiskCount", + "doc": "The range of data disk count specified from Min to Max. Optional parameter. Either Min or Max is required if specified.", + "type": { + "$ref": "546" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributes.dataDiskCount", + "serializationOptions": { + "$id": "583", + "json": { + "$id": "584", + "name": "dataDiskCount" + } + } + }, + { + "$id": "585", + "kind": "property", + "name": "networkInterfaceCount", + "serializedName": "networkInterfaceCount", + "doc": "The range of network interface count specified from Min to Max. Optional parameter. Either Min or Max is required if specified.", + "type": { + "$ref": "546" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributes.networkInterfaceCount", + "serializationOptions": { + "$id": "586", + "json": { + "$id": "587", + "name": "networkInterfaceCount" + } + } + }, + { + "$id": "588", + "kind": "property", + "name": "networkBandwidthInMbps", + "serializedName": "networkBandwidthInMbps", + "doc": "The range of network bandwidth in Mbps specified from Min to Max. Optional parameter. Either Min or Max is required if specified.", + "type": { + "$ref": "558" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributes.networkBandwidthInMbps", + "serializationOptions": { + "$id": "589", + "json": { + "$id": "590", + "name": "networkBandwidthInMbps" + } + } + }, + { + "$id": "591", + "kind": "property", + "name": "rdmaSupport", + "serializedName": "rdmaSupport", + "doc": "Specifies whether the VMSize supporting RDMA (Remote Direct Memory Access) should be used to build Fleet or not.", + "type": { + "$ref": "50" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributes.rdmaSupport", + "serializationOptions": { + "$id": "592", + "json": { + "$id": "593", + "name": "rdmaSupport" + } + } + }, + { + "$id": "594", + "kind": "property", + "name": "rdmaNetworkInterfaceCount", + "serializedName": "rdmaNetworkInterfaceCount", + "doc": "The range of RDMA (Remote Direct Memory Access) network interface count specified from Min to Max. Optional parameter. Either Min or Max is required if specified.\nrdmaSupport should be set to \"Included\" or \"Required\" to use this VMAttribute. \nIf rdmaSupport is \"Excluded\", this VMAttribute can not be used.", + "type": { + "$ref": "546" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributes.rdmaNetworkInterfaceCount", + "serializationOptions": { + "$id": "595", + "json": { + "$id": "596", + "name": "rdmaNetworkInterfaceCount" + } + } + }, + { + "$id": "597", + "kind": "property", + "name": "acceleratorSupport", + "serializedName": "acceleratorSupport", + "doc": "Specifies whether the VMSize supporting accelerator should be used to build Fleet or not.\nacceleratorSupport should be set to \"Included\" or \"Required\" to use this VMAttribute. \nIf acceleratorSupport is \"Excluded\", this VMAttribute can not be used.", + "type": { + "$ref": "50" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributes.acceleratorSupport", + "serializationOptions": { + "$id": "598", + "json": { + "$id": "599", + "name": "acceleratorSupport" + } + } + }, + { + "$id": "600", + "kind": "property", + "name": "acceleratorManufacturers", + "serializedName": "acceleratorManufacturers", + "doc": "The accelerator manufacturers specified as a list. \nacceleratorSupport should be set to \"Included\" or \"Required\" to use this VMAttribute. \nIf acceleratorSupport is \"Excluded\", this VMAttribute can not be used.", + "type": { + "$id": "601", + "kind": "array", + "name": "ArrayAcceleratorManufacturer", + "valueType": { + "$ref": "64" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributes.acceleratorManufacturers", + "serializationOptions": { + "$id": "602", + "json": { + "$id": "603", + "name": "acceleratorManufacturers" + } + } + }, + { + "$id": "604", + "kind": "property", + "name": "acceleratorTypes", + "serializedName": "acceleratorTypes", + "doc": "The accelerator types specified as a list. acceleratorSupport should be set to \"Included\" or \"Required\" to use this VMAttribute. \nIf acceleratorSupport is \"Excluded\", this VMAttribute can not be used.", + "type": { + "$id": "605", + "kind": "array", + "name": "ArrayAcceleratorType", + "valueType": { + "$ref": "72" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributes.acceleratorTypes", + "serializationOptions": { + "$id": "606", + "json": { + "$id": "607", + "name": "acceleratorTypes" + } + } + }, + { + "$id": "608", + "kind": "property", + "name": "acceleratorCount", + "serializedName": "acceleratorCount", + "doc": "The range of accelerator count specified from min to max. Optional parameter. Either Min or Max is required if specified.\nacceleratorSupport should be set to \"Included\" or \"Required\" to use this VMAttribute. \nIf acceleratorSupport is \"Excluded\", this VMAttribute can not be used.", + "type": { + "$ref": "546" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributes.acceleratorCount", + "serializationOptions": { + "$id": "609", + "json": { + "$id": "610", + "name": "acceleratorCount" + } + } + }, + { + "$id": "611", + "kind": "property", + "name": "vmCategories", + "serializedName": "vmCategories", + "doc": "The VM category specified as a list. Optional parameter.", + "type": { + "$id": "612", + "kind": "array", + "name": "ArrayVmCategory", + "valueType": { + "$ref": "78" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributes.vmCategories", + "serializationOptions": { + "$id": "613", + "json": { + "$id": "614", + "name": "vmCategories" + } + } + }, + { + "$id": "615", + "kind": "property", + "name": "architectureTypes", + "serializedName": "architectureTypes", + "doc": "The VM architecture types specified as a list. Optional parameter.", + "type": { + "$id": "616", + "kind": "array", + "name": "ArrayArchitectureType", + "valueType": { + "$ref": "94" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributes.architectureTypes", + "serializationOptions": { + "$id": "617", + "json": { + "$id": "618", + "name": "architectureTypes" + } + } + }, + { + "$id": "619", + "kind": "property", + "name": "cpuManufacturers", + "serializedName": "cpuManufacturers", + "doc": "The VM CPU manufacturers specified as a list. Optional parameter.", + "type": { + "$id": "620", + "kind": "array", + "name": "ArrayCpuManufacturer", + "valueType": { + "$ref": "100" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributes.cpuManufacturers", + "serializationOptions": { + "$id": "621", + "json": { + "$id": "622", + "name": "cpuManufacturers" + } + } + }, + { + "$id": "623", + "kind": "property", + "name": "burstableSupport", + "serializedName": "burstableSupport", + "doc": "Specifies whether the VMSize supporting burstable capability should be used to build Fleet or not.", + "type": { + "$ref": "50" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributes.burstableSupport", + "serializationOptions": { + "$id": "624", + "json": { + "$id": "625", + "name": "burstableSupport" + } + } + }, + { + "$id": "626", + "kind": "property", + "name": "excludedVMSizes", + "serializedName": "excludedVMSizes", + "doc": "Specifies which VMSizes should be excluded while building Fleet. Optional parameter.", + "type": { + "$id": "627", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "628", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMAttributes.excludedVMSizes", + "serializationOptions": { + "$id": "629", + "json": { + "$id": "630", + "name": "excludedVMSizes" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.FleetProperties.vmAttributes", + "serializationOptions": { + "$id": "631", + "json": { + "$id": "632", + "name": "vmAttributes" + } + } + }, + { + "$id": "633", + "kind": "property", + "name": "additionalLocationsProfile", + "serializedName": "additionalLocationsProfile", + "doc": "Represents the configuration for additional locations where Fleet resources may be deployed.", + "type": { + "$id": "634", + "kind": "model", + "name": "AdditionalLocationsProfile", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.AdditionalLocationsProfile", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Represents the configuration for additional locations where Fleet resources may be deployed.", + "decorators": [], + "properties": [ + { + "$id": "635", + "kind": "property", + "name": "locationProfiles", + "serializedName": "locationProfiles", + "doc": "The list of location profiles.", + "type": { + "$id": "636", + "kind": "array", + "name": "ArrayLocationProfile", + "valueType": { + "$id": "637", + "kind": "model", + "name": "LocationProfile", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.LocationProfile", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Represents the profile for a single additional location in the Fleet. The location and the virtualMachineProfileOverride (optional).", + "decorators": [], + "properties": [ + { + "$id": "638", + "kind": "property", + "name": "location", + "serializedName": "location", + "doc": "The ARM location name of the additional region. If LocationProfile is specified, then location is required.", + "type": { + "$id": "639", + "kind": "string", + "name": "azureLocation", + "crossLanguageDefinitionId": "Azure.Core.azureLocation", + "baseType": { + "$id": "640", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.LocationProfile.location", + "serializationOptions": { + "$id": "641", + "json": { + "$id": "642", + "name": "location" + } + } + }, + { + "$id": "643", + "kind": "property", + "name": "virtualMachineProfileOverride", + "serializedName": "virtualMachineProfileOverride", + "doc": "An override for computeProfile.baseVirtualMachineProfile specific to this region. \nThis override is merged with the base virtual machine profile to define the final virtual machine profile for the resources deployed in this location.", + "type": { + "$id": "644", + "kind": "model", + "name": "ComputeFleetVmProfile", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.BaseVirtualMachineProfile", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Describes the base virtual machine profile for fleet", + "decorators": [], + "properties": [ + { + "$id": "645", + "kind": "property", + "name": "osProfile", + "serializedName": "osProfile", + "doc": "Specifies the operating system settings for the virtual machines in the scale\nset.", + "type": { + "$id": "646", + "kind": "model", + "name": "ComputeFleetVmssOSProfile", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetOSProfile", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Describes a virtual machine scale set OS profile.", + "decorators": [], + "properties": [ + { + "$id": "647", + "kind": "property", + "name": "computerNamePrefix", + "serializedName": "computerNamePrefix", + "doc": "Specifies the computer name prefix for all of the virtual machines in the scale\nset. Computer name prefixes must be 1 to 15 characters long.", + "type": { + "$id": "648", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetOSProfile.computerNamePrefix", + "serializationOptions": { + "$id": "649", + "json": { + "$id": "650", + "name": "computerNamePrefix" + } + } + }, + { + "$id": "651", + "kind": "property", + "name": "adminUsername", + "serializedName": "adminUsername", + "doc": "Specifies the name of the administrator account.

**Windows-only\nrestriction:** Cannot end in \".\"

**Disallowed values:**\n\"administrator\", \"admin\", \"user\", \"user1\", \"test\", \"user2\", \"test1\", \"user3\",\n\"admin1\", \"1\", \"123\", \"a\", \"actuser\", \"adm\", \"admin2\", \"aspnet\", \"backup\",\n\"console\", \"david\", \"guest\", \"john\", \"owner\", \"root\", \"server\", \"sql\",\n\"support\", \"support_388945a0\", \"sys\", \"test2\", \"test3\", \"user4\", \"user5\".\n

**Minimum-length (Linux):** 1 character

**Max-length\n(Linux):** 64 characters

**Max-length (Windows):** 20 characters", + "type": { + "$id": "652", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetOSProfile.adminUsername", + "serializationOptions": { + "$id": "653", + "json": { + "$id": "654", + "name": "adminUsername" + } + } + }, + { + "$id": "655", + "kind": "property", + "name": "adminPassword", + "serializedName": "adminPassword", + "doc": "Specifies the password of the administrator account.

**Minimum-length\n(Windows):** 8 characters

**Minimum-length (Linux):** 6 characters\n

**Max-length (Windows):** 123 characters

**Max-length\n(Linux):** 72 characters

**Complexity requirements:** 3 out of 4\nconditions below need to be fulfilled
Has lower characters
Has upper\ncharacters
Has a digit
Has a special character (Regex match [\\W_])\n

**Disallowed values:** \"abc@123\", \"P@$$w0rd\", \"P@ssw0rd\",\n\"P@ssword123\", \"Pa$$word\", \"pass@word1\", \"Password!\", \"Password1\",\n\"Password22\", \"iloveyou!\"

For resetting the password, see [How to\nreset the Remote Desktop service or its login password in a Windows\nVM](https://learn.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp)\n

For resetting root password, see [Manage users, SSH, and check or\nrepair disks on Azure Linux VMs using the VMAccess\nExtension](https://learn.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection)", + "type": { + "$id": "656", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetOSProfile.adminPassword", + "serializationOptions": { + "$id": "657", + "json": { + "$id": "658", + "name": "adminPassword" + } + } + }, + { + "$id": "659", + "kind": "property", + "name": "customData", + "serializedName": "customData", + "doc": "Specifies a base-64 encoded string of custom data. The base-64 encoded string\nis decoded to a binary array that is saved as a file on the Virtual Machine.\nThe maximum length of the binary array is 65535 bytes. For using cloud-init for\nyour VM, see [Using cloud-init to customize a Linux VM during\ncreation](https://learn.microsoft.com/azure/virtual-machines/linux/using-cloud-init)", + "type": { + "$id": "660", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetOSProfile.customData", + "serializationOptions": { + "$id": "661", + "json": { + "$id": "662", + "name": "customData" + } + } + }, + { + "$id": "663", + "kind": "property", + "name": "windowsConfiguration", + "serializedName": "windowsConfiguration", + "doc": "Specifies Windows operating system settings on the virtual machine.", + "type": { + "$id": "664", + "kind": "model", + "name": "ComputeFleetWindowsConfiguration", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.WindowsConfiguration", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Specifies Windows operating system settings on the virtual machine.", + "decorators": [], + "properties": [ + { + "$id": "665", + "kind": "property", + "name": "IsVmAgentProvisioned", + "serializedName": "provisionVMAgent", + "doc": "Indicates whether virtual machine agent should be provisioned on the virtual\nmachine. When this property is not specified in the request body, it is set to\ntrue by default. This will ensure that VM Agent is installed on the VM so that\nextensions can be added to the VM later.", + "type": { + "$id": "666", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.WindowsConfiguration.provisionVMAgent", + "serializationOptions": { + "$id": "667", + "json": { + "$id": "668", + "name": "provisionVMAgent" + } + } + }, + { + "$id": "669", + "kind": "property", + "name": "IsAutomaticUpdatesEnabled", + "serializedName": "enableAutomaticUpdates", + "doc": "Indicates whether Automatic Updates is enabled for the Windows virtual machine.\nDefault value is true. For virtual machine scale sets, this property can be\nupdated and updates will take effect on OS reprovisioning.", + "type": { + "$id": "670", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.WindowsConfiguration.enableAutomaticUpdates", + "serializationOptions": { + "$id": "671", + "json": { + "$id": "672", + "name": "enableAutomaticUpdates" + } + } + }, + { + "$id": "673", + "kind": "property", + "name": "timeZone", + "serializedName": "timeZone", + "doc": "Specifies the time zone of the virtual machine. e.g. \"Pacific Standard Time\".\nPossible values can be\n[TimeZoneInfo.Id](https://learn.microsoft.com/dotnet/api/system.timezoneinfo.id?#System_TimeZoneInfo_Id)\nvalue from time zones returned by\n[TimeZoneInfo.GetSystemTimeZones](https://learn.microsoft.com/dotnet/api/system.timezoneinfo.getsystemtimezones).", + "type": { + "$id": "674", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.WindowsConfiguration.timeZone", + "serializationOptions": { + "$id": "675", + "json": { + "$id": "676", + "name": "timeZone" + } + } + }, + { + "$id": "677", + "kind": "property", + "name": "additionalUnattendContent", + "serializedName": "additionalUnattendContent", + "doc": "Specifies additional base-64 encoded XML formatted information that can be\nincluded in the Unattend.xml file, which is used by Windows Setup.", + "type": { + "$id": "678", + "kind": "array", + "name": "ArrayAdditionalUnattendContent", + "valueType": { + "$id": "679", + "kind": "model", + "name": "WindowsSetupAdditionalInformation", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.AdditionalUnattendContent", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Specifies additional XML formatted information that can be included in the\nUnattend.xml file, which is used by Windows Setup. Contents are defined by\nsetting name, component name, and the pass in which the content is applied.", + "decorators": [], + "properties": [ + { + "$id": "680", + "kind": "property", + "name": "passName", + "serializedName": "passName", + "doc": "The pass name. Currently, the only allowable value is OobeSystem.", + "type": { + "$id": "681", + "kind": "constant", + "valueType": { + "$ref": "110" + }, + "value": "OobeSystem", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.AdditionalUnattendContent.passName", + "serializationOptions": { + "$id": "682", + "json": { + "$id": "683", + "name": "passName" + } + } + }, + { + "$id": "684", + "kind": "property", + "name": "componentName", + "serializedName": "componentName", + "doc": "The component name. Currently, the only allowable value is\nMicrosoft-Windows-Shell-Setup.", + "type": { + "$id": "685", + "kind": "constant", + "valueType": { + "$ref": "113" + }, + "value": "Microsoft-Windows-Shell-Setup", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.AdditionalUnattendContent.componentName", + "serializationOptions": { + "$id": "686", + "json": { + "$id": "687", + "name": "componentName" + } + } + }, + { + "$id": "688", + "kind": "property", + "name": "settingName", + "serializedName": "settingName", + "doc": "Specifies the name of the setting to which the content applies. Possible values\nare: FirstLogonCommands and AutoLogon.", + "type": { + "$ref": "116" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.AdditionalUnattendContent.settingName", + "serializationOptions": { + "$id": "689", + "json": { + "$id": "690", + "name": "settingName" + } + } + }, + { + "$id": "691", + "kind": "property", + "name": "content", + "serializedName": "content", + "doc": "Specifies the XML formatted content that is added to the unattend.xml file for\nthe specified path and component. The XML must be less than 4KB and must\ninclude the root element for the setting or feature that is being inserted.", + "type": { + "$id": "692", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.AdditionalUnattendContent.content", + "serializationOptions": { + "$id": "693", + "json": { + "$id": "694", + "name": "content" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.WindowsConfiguration.additionalUnattendContent", + "serializationOptions": { + "$id": "695", + "json": { + "$id": "696", + "name": "additionalUnattendContent" + } + } + }, + { + "$id": "697", + "kind": "property", + "name": "patchSettings", + "serializedName": "patchSettings", + "doc": "[Preview Feature] Specifies settings related to VM Guest Patching on Windows.", + "type": { + "$id": "698", + "kind": "model", + "name": "ComputeFleetVmGuestPatchSettings", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.PatchSettings", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Specifies settings related to VM Guest Patching on Windows.", + "decorators": [], + "properties": [ + { + "$id": "699", + "kind": "property", + "name": "patchMode", + "serializedName": "patchMode", + "doc": "Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual\nmachines associated to virtual machine scale set with OrchestrationMode as\nFlexible.

Possible values are:

**Manual** - You\ncontrol the application of patches to a virtual machine. You do this by\napplying patches manually inside the VM. In this mode, automatic updates are\ndisabled; the property WindowsConfiguration.enableAutomaticUpdates must be\nfalse

**AutomaticByOS** - The virtual machine will automatically be\nupdated by the OS. The property WindowsConfiguration.enableAutomaticUpdates\nmust be true.

**AutomaticByPlatform** - the virtual machine will\nautomatically updated by the platform. The properties provisionVMAgent and\nWindowsConfiguration.enableAutomaticUpdates must be true", + "type": { + "$ref": "122" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.PatchSettings.patchMode", + "serializationOptions": { + "$id": "700", + "json": { + "$id": "701", + "name": "patchMode" + } + } + }, + { + "$id": "702", + "kind": "property", + "name": "IsHotPatchingEnabled", + "serializedName": "enableHotpatching", + "doc": "Enables customers to patch their Azure VMs without requiring a reboot. For\nenableHotpatching, the 'provisionVMAgent' must be set to true and 'patchMode'\nmust be set to 'AutomaticByPlatform'.", + "type": { + "$id": "703", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.PatchSettings.enableHotpatching", + "serializationOptions": { + "$id": "704", + "json": { + "$id": "705", + "name": "enableHotpatching" + } + } + }, + { + "$id": "706", + "kind": "property", + "name": "assessmentMode", + "serializedName": "assessmentMode", + "doc": "Specifies the mode of VM Guest patch assessment for the IaaS virtual\nmachine.

Possible values are:

**ImageDefault** - You\ncontrol the timing of patch assessments on a virtual machine.

\n**AutomaticByPlatform** - The platform will trigger periodic patch assessments.\nThe property provisionVMAgent must be true.", + "type": { + "$ref": "130" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.PatchSettings.assessmentMode", + "serializationOptions": { + "$id": "707", + "json": { + "$id": "708", + "name": "assessmentMode" + } + } + }, + { + "$id": "709", + "kind": "property", + "name": "automaticByPlatformSettings", + "serializedName": "automaticByPlatformSettings", + "doc": "Specifies additional settings for patch mode AutomaticByPlatform in VM Guest\nPatching on Windows.", + "type": { + "$id": "710", + "kind": "model", + "name": "ComputeFleetWindowsVMGuestPatchAutomaticByPlatformSettings", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.WindowsVMGuestPatchAutomaticByPlatformSettings", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Specifies additional settings to be applied when patch mode AutomaticByPlatform\nis selected in Windows patch settings.", + "decorators": [], + "properties": [ + { + "$id": "711", + "kind": "property", + "name": "rebootSetting", + "serializedName": "rebootSetting", + "doc": "Specifies the reboot setting for all AutomaticByPlatform patch installation\noperations.", + "type": { + "$ref": "136" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.WindowsVMGuestPatchAutomaticByPlatformSettings.rebootSetting", + "serializationOptions": { + "$id": "712", + "json": { + "$id": "713", + "name": "rebootSetting" + } + } + }, + { + "$id": "714", + "kind": "property", + "name": "IsBypassPlatformSafetyChecksOnUserScheduleEnabled", + "serializedName": "bypassPlatformSafetyChecksOnUserSchedule", + "doc": "Enables customer to schedule patching without accidental upgrades", + "type": { + "$id": "715", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.WindowsVMGuestPatchAutomaticByPlatformSettings.bypassPlatformSafetyChecksOnUserSchedule", + "serializationOptions": { + "$id": "716", + "json": { + "$id": "717", + "name": "bypassPlatformSafetyChecksOnUserSchedule" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.PatchSettings.automaticByPlatformSettings", + "serializationOptions": { + "$id": "718", + "json": { + "$id": "719", + "name": "automaticByPlatformSettings" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.WindowsConfiguration.patchSettings", + "serializationOptions": { + "$id": "720", + "json": { + "$id": "721", + "name": "patchSettings" + } + } + }, + { + "$id": "722", + "kind": "property", + "name": "winRM", + "serializedName": "winRM", + "doc": "Specifies the Windows Remote Management listeners. This enables remote Windows\nPowerShell.", + "type": { + "$id": "723", + "kind": "model", + "name": "WinRMConfiguration", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.WinRMConfiguration", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Describes Windows Remote Management configuration of the VM", + "decorators": [], + "properties": [ + { + "$id": "724", + "kind": "property", + "name": "listeners", + "serializedName": "listeners", + "doc": "The list of Windows Remote Management listeners", + "type": { + "$id": "725", + "kind": "array", + "name": "ArrayWinRmListener", + "valueType": { + "$id": "726", + "kind": "model", + "name": "ComputeFleetWinRMListener", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.WinRMListener", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Describes Protocol and thumbprint of Windows Remote Management listener", + "decorators": [], + "properties": [ + { + "$id": "727", + "kind": "property", + "name": "protocol", + "serializedName": "protocol", + "doc": "Specifies the protocol of WinRM listener. Possible values are: **http,**\n**https.**", + "type": { + "$ref": "146" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.WinRMListener.protocol", + "serializationOptions": { + "$id": "728", + "json": { + "$id": "729", + "name": "protocol" + } + } + }, + { + "$id": "730", + "kind": "property", + "name": "certificateUrl", + "serializedName": "certificateUrl", + "doc": "This is the URL of a certificate that has been uploaded to Key Vault as a\nsecret. For adding a secret to the Key Vault, see [Add a key or secret to the\nkey\nvault](https://learn.microsoft.com/azure/key-vault/key-vault-get-started/#add).\nIn this case, your certificate needs to be the Base64 encoding of the following\nJSON Object which is encoded in UTF-8:

{
\n\"data\":\"\",
\"dataType\":\"pfx\",
\n\"password\":\"\"
}
To install certificates on a virtual\nmachine it is recommended to use the [Azure Key Vault virtual machine extension\nfor\nLinux](https://learn.microsoft.com/azure/virtual-machines/extensions/key-vault-linux)\nor the [Azure Key Vault virtual machine extension for\nWindows](https://learn.microsoft.com/azure/virtual-machines/extensions/key-vault-windows).", + "type": { + "$id": "731", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.WinRMListener.certificateUrl", + "serializationOptions": { + "$id": "732", + "json": { + "$id": "733", + "name": "certificateUrl" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.WinRMConfiguration.listeners", + "serializationOptions": { + "$id": "734", + "json": { + "$id": "735", + "name": "listeners" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.WindowsConfiguration.winRM", + "serializationOptions": { + "$id": "736", + "json": { + "$id": "737", + "name": "winRM" + } + } + }, + { + "$id": "738", + "kind": "property", + "name": "IsVmAgentPlatformUpdatesEnabled", + "serializedName": "enableVMAgentPlatformUpdates", + "doc": "Indicates whether VMAgent Platform Updates is enabled for the Windows virtual\nmachine. Default value is false.", + "type": { + "$id": "739", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.WindowsConfiguration.enableVMAgentPlatformUpdates", + "serializationOptions": { + "$id": "740", + "json": { + "$id": "741", + "name": "enableVMAgentPlatformUpdates" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetOSProfile.windowsConfiguration", + "serializationOptions": { + "$id": "742", + "json": { + "$id": "743", + "name": "windowsConfiguration" + } + } + }, + { + "$id": "744", + "kind": "property", + "name": "linuxConfiguration", + "serializedName": "linuxConfiguration", + "doc": "Specifies the Linux operating system settings on the virtual machine. For a\nlist of supported Linux distributions, see [Linux on Azure-Endorsed\nDistributions](https://learn.microsoft.com/azure/virtual-machines/linux/endorsed-distros).", + "type": { + "$id": "745", + "kind": "model", + "name": "ComputeFleetLinuxConfiguration", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.LinuxConfiguration", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Specifies the Linux operating system settings on the virtual machine. For a\nlist of supported Linux distributions, see [Linux on Azure-Endorsed\nDistributions](https://learn.microsoft.com/azure/virtual-machines/linux/endorsed-distros).", + "decorators": [], + "properties": [ + { + "$id": "746", + "kind": "property", + "name": "IsPasswordAuthenticationDisabled", + "serializedName": "disablePasswordAuthentication", + "doc": "Specifies whether password authentication should be disabled.", + "type": { + "$id": "747", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.LinuxConfiguration.disablePasswordAuthentication", + "serializationOptions": { + "$id": "748", + "json": { + "$id": "749", + "name": "disablePasswordAuthentication" + } + } + }, + { + "$id": "750", + "kind": "property", + "name": "ssh", + "serializedName": "ssh", + "doc": "Specifies the ssh key configuration for a Linux OS.", + "type": { + "$id": "751", + "kind": "model", + "name": "ComputeFleetSshConfiguration", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SshConfiguration", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "SSH configuration for Linux based VMs running on Azure", + "decorators": [], + "properties": [ + { + "$id": "752", + "kind": "property", + "name": "publicKeys", + "serializedName": "publicKeys", + "doc": "The list of SSH public keys used to authenticate with linux based VMs.", + "type": { + "$id": "753", + "kind": "array", + "name": "ArraySshPublicKey", + "valueType": { + "$id": "754", + "kind": "model", + "name": "ComputeFleetSshPublicKey", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SshPublicKey", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Contains information about SSH certificate public key and the path on the Linux\nVM where the public key is placed.", + "decorators": [], + "properties": [ + { + "$id": "755", + "kind": "property", + "name": "path", + "serializedName": "path", + "doc": "Specifies the full path on the created VM where ssh public key is stored. If\nthe file already exists, the specified key is appended to the file. Example:\n/home/user/.ssh/authorized_keys", + "type": { + "$id": "756", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SshPublicKey.path", + "serializationOptions": { + "$id": "757", + "json": { + "$id": "758", + "name": "path" + } + } + }, + { + "$id": "759", + "kind": "property", + "name": "keyData", + "serializedName": "keyData", + "doc": "SSH public key certificate used to authenticate with the VM through ssh. The\nkey needs to be at least 2048-bit and in ssh-rsa format. For creating ssh keys,\nsee [Create SSH keys on Linux and Mac for Linux VMs in\nAzure]https://learn.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed).", + "type": { + "$id": "760", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SshPublicKey.keyData", + "serializationOptions": { + "$id": "761", + "json": { + "$id": "762", + "name": "keyData" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SshConfiguration.publicKeys", + "serializationOptions": { + "$id": "763", + "json": { + "$id": "764", + "name": "publicKeys" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.LinuxConfiguration.ssh", + "serializationOptions": { + "$id": "765", + "json": { + "$id": "766", + "name": "ssh" + } + } + }, + { + "$id": "767", + "kind": "property", + "name": "IsVmAgentProvisioned", + "serializedName": "provisionVMAgent", + "doc": "Indicates whether virtual machine agent should be provisioned on the virtual\nmachine. When this property is not specified in the request body, default\nbehavior is to set it to true. This will ensure that VM Agent is installed on\nthe VM so that extensions can be added to the VM later.", + "type": { + "$id": "768", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.LinuxConfiguration.provisionVMAgent", + "serializationOptions": { + "$id": "769", + "json": { + "$id": "770", + "name": "provisionVMAgent" + } + } + }, + { + "$id": "771", + "kind": "property", + "name": "patchSettings", + "serializedName": "patchSettings", + "doc": "[Preview Feature] Specifies settings related to VM Guest Patching on Linux.", + "type": { + "$id": "772", + "kind": "model", + "name": "ComputeFleetLinuxPatchSettings", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.LinuxPatchSettings", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Specifies settings related to VM Guest Patching on Linux.", + "decorators": [], + "properties": [ + { + "$id": "773", + "kind": "property", + "name": "patchMode", + "serializedName": "patchMode", + "doc": "Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual\nmachines associated to virtual machine scale set with OrchestrationMode as\nFlexible.

Possible values are:

**ImageDefault** - The\nvirtual machine's default patching configuration is used.

\n**AutomaticByPlatform** - The virtual machine will be automatically updated by\nthe platform. The property provisionVMAgent must be true", + "type": { + "$ref": "152" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.LinuxPatchSettings.patchMode", + "serializationOptions": { + "$id": "774", + "json": { + "$id": "775", + "name": "patchMode" + } + } + }, + { + "$id": "776", + "kind": "property", + "name": "assessmentMode", + "serializedName": "assessmentMode", + "doc": "Specifies the mode of VM Guest Patch Assessment for the IaaS virtual\nmachine.

Possible values are:

**ImageDefault** - You\ncontrol the timing of patch assessments on a virtual machine.

\n**AutomaticByPlatform** - The platform will trigger periodic patch assessments.\nThe property provisionVMAgent must be true.", + "type": { + "$ref": "158" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.LinuxPatchSettings.assessmentMode", + "serializationOptions": { + "$id": "777", + "json": { + "$id": "778", + "name": "assessmentMode" + } + } + }, + { + "$id": "779", + "kind": "property", + "name": "automaticByPlatformSettings", + "serializedName": "automaticByPlatformSettings", + "doc": "Specifies additional settings for patch mode AutomaticByPlatform in VM Guest\nPatching on Linux.", + "type": { + "$id": "780", + "kind": "model", + "name": "ComputeFleetLinuxVMGuestPatchAutomaticByPlatformSettings", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.LinuxVMGuestPatchAutomaticByPlatformSettings", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Specifies additional settings to be applied when patch mode AutomaticByPlatform\nis selected in Linux patch settings.", + "decorators": [], + "properties": [ + { + "$id": "781", + "kind": "property", + "name": "rebootSetting", + "serializedName": "rebootSetting", + "doc": "Specifies the reboot setting for all AutomaticByPlatform patch installation\noperations.", + "type": { + "$ref": "164" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.LinuxVMGuestPatchAutomaticByPlatformSettings.rebootSetting", + "serializationOptions": { + "$id": "782", + "json": { + "$id": "783", + "name": "rebootSetting" + } + } + }, + { + "$id": "784", + "kind": "property", + "name": "IsBypassPlatformSafetyChecksOnUserScheduleEnabled", + "serializedName": "bypassPlatformSafetyChecksOnUserSchedule", + "doc": "Enables customer to schedule patching without accidental upgrades", + "type": { + "$id": "785", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.LinuxVMGuestPatchAutomaticByPlatformSettings.bypassPlatformSafetyChecksOnUserSchedule", + "serializationOptions": { + "$id": "786", + "json": { + "$id": "787", + "name": "bypassPlatformSafetyChecksOnUserSchedule" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.LinuxPatchSettings.automaticByPlatformSettings", + "serializationOptions": { + "$id": "788", + "json": { + "$id": "789", + "name": "automaticByPlatformSettings" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.LinuxConfiguration.patchSettings", + "serializationOptions": { + "$id": "790", + "json": { + "$id": "791", + "name": "patchSettings" + } + } + }, + { + "$id": "792", + "kind": "property", + "name": "IsVmAgentPlatformUpdatesEnabled", + "serializedName": "enableVMAgentPlatformUpdates", + "doc": "Indicates whether VMAgent Platform Updates is enabled for the Linux virtual\nmachine. Default value is false.", + "type": { + "$id": "793", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.LinuxConfiguration.enableVMAgentPlatformUpdates", + "serializationOptions": { + "$id": "794", + "json": { + "$id": "795", + "name": "enableVMAgentPlatformUpdates" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetOSProfile.linuxConfiguration", + "serializationOptions": { + "$id": "796", + "json": { + "$id": "797", + "name": "linuxConfiguration" + } + } + }, + { + "$id": "798", + "kind": "property", + "name": "secrets", + "serializedName": "secrets", + "doc": "Specifies set of certificates that should be installed onto the virtual\nmachines in the scale set. To install certificates on a virtual machine it is\nrecommended to use the [Azure Key Vault virtual machine extension for\nLinux](https://learn.microsoft.com/azure/virtual-machines/extensions/key-vault-linux)\nor the [Azure Key Vault virtual machine extension for\nWindows](https://learn.microsoft.com/azure/virtual-machines/extensions/key-vault-windows).", + "type": { + "$id": "799", + "kind": "array", + "name": "ArrayVaultSecretGroup", + "valueType": { + "$id": "800", + "kind": "model", + "name": "ComputeFleetVaultSecretGroup", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VaultSecretGroup", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Describes a set of certificates which are all in the same Key Vault.", + "decorators": [], + "properties": [ + { + "$id": "801", + "kind": "property", + "name": "sourceVault", + "serializedName": "sourceVault", + "doc": "The relative URL of the Key Vault containing all of the certificates in\nVaultCertificates.", + "type": { + "$id": "802", + "kind": "model", + "name": "SubResource", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SubResource", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Describes SubResource", + "decorators": [], + "properties": [ + { + "$id": "803", + "kind": "property", + "name": "id", + "serializedName": "id", + "doc": "Resource Id", + "type": { + "$id": "804", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "805", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SubResource.id", + "serializationOptions": { + "$id": "806", + "json": { + "$id": "807", + "name": "id" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VaultSecretGroup.sourceVault", + "serializationOptions": { + "$id": "808", + "json": { + "$id": "809", + "name": "sourceVault" + } + } + }, + { + "$id": "810", + "kind": "property", + "name": "vaultCertificates", + "serializedName": "vaultCertificates", + "doc": "The list of key vault references in SourceVault which contain certificates.", + "type": { + "$id": "811", + "kind": "array", + "name": "ArrayVaultCertificate", + "valueType": { + "$id": "812", + "kind": "model", + "name": "ComputeFleetVaultCertificate", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VaultCertificate", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Describes a single certificate reference in a Key Vault, and where the\ncertificate should reside on the VM.", + "decorators": [], + "properties": [ + { + "$id": "813", + "kind": "property", + "name": "certificateUrl", + "serializedName": "certificateUrl", + "doc": "This is the URL of a certificate that has been uploaded to Key Vault as a\nsecret. For adding a secret to the Key Vault, see [Add a key or secret to the\nkey\nvault](https://learn.microsoft.com/azure/key-vault/key-vault-get-started/#add).\nIn this case, your certificate needs to be It is the Base64 encoding of the\nfollowing JSON Object which is encoded in UTF-8:

{
\n\"data\":\"\",
\"dataType\":\"pfx\",
\n\"password\":\"\"
}
To install certificates on a virtual\nmachine it is recommended to use the [Azure Key Vault virtual machine extension\nfor\nLinux](https://learn.microsoft.com/azure/virtual-machines/extensions/key-vault-linux)\nor the [Azure Key Vault virtual machine extension for\nWindows](https://learn.microsoft.com/azure/virtual-machines/extensions/key-vault-windows).", + "type": { + "$id": "814", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VaultCertificate.certificateUrl", + "serializationOptions": { + "$id": "815", + "json": { + "$id": "816", + "name": "certificateUrl" + } + } + }, + { + "$id": "817", + "kind": "property", + "name": "certificateStore", + "serializedName": "certificateStore", + "doc": "For Windows VMs, specifies the certificate store on the Virtual Machine to\nwhich the certificate should be added. The specified certificate store is\nimplicitly in the LocalMachine account. For Linux VMs, the certificate file is\nplaced under the /var/lib/waagent directory, with the file name\n<UppercaseThumbprint>.crt for the X509 certificate file and\n<UppercaseThumbprint>.prv for private key. Both of these files are .pem\nformatted.", + "type": { + "$id": "818", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VaultCertificate.certificateStore", + "serializationOptions": { + "$id": "819", + "json": { + "$id": "820", + "name": "certificateStore" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VaultSecretGroup.vaultCertificates", + "serializationOptions": { + "$id": "821", + "json": { + "$id": "822", + "name": "vaultCertificates" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetOSProfile.secrets", + "serializationOptions": { + "$id": "823", + "json": { + "$id": "824", + "name": "secrets" + } + } + }, + { + "$id": "825", + "kind": "property", + "name": "AreExtensionOperationsAllowed", + "serializedName": "allowExtensionOperations", + "doc": "Specifies whether extension operations should be allowed on the virtual machine\nscale set. This may only be set to False when no extensions are present on the\nvirtual machine scale set.", + "type": { + "$id": "826", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetOSProfile.allowExtensionOperations", + "serializationOptions": { + "$id": "827", + "json": { + "$id": "828", + "name": "allowExtensionOperations" + } + } + }, + { + "$id": "829", + "kind": "property", + "name": "IsGuestProvisionSignalRequired", + "serializedName": "requireGuestProvisionSignal", + "doc": "Optional property which must either be set to True or omitted.", + "type": { + "$id": "830", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetOSProfile.requireGuestProvisionSignal", + "serializationOptions": { + "$id": "831", + "json": { + "$id": "832", + "name": "requireGuestProvisionSignal" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.BaseVirtualMachineProfile.osProfile", + "serializationOptions": { + "$id": "833", + "json": { + "$id": "834", + "name": "osProfile" + } + } + }, + { + "$id": "835", + "kind": "property", + "name": "storageProfile", + "serializedName": "storageProfile", + "doc": "Specifies the storage settings for the virtual machine disks.", + "type": { + "$id": "836", + "kind": "model", + "name": "ComputeFleetVmssStorageProfile", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetStorageProfile", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Describes a virtual machine scale set storage profile.", + "decorators": [], + "properties": [ + { + "$id": "837", + "kind": "property", + "name": "imageReference", + "serializedName": "imageReference", + "doc": "Specifies information about the image to use. You can specify information about\nplatform images, marketplace images, or virtual machine images. This element is\nrequired when you want to use a platform image, marketplace image, or virtual\nmachine image, but is not used in other creation operations.", + "type": { + "$id": "838", + "kind": "model", + "name": "ComputeFleetImageReference", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ImageReference", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Specifies information about the image to use. You can specify information about\nplatform images, marketplace images, or virtual machine images. This element is\nrequired when you want to use a platform image, marketplace image, or virtual\nmachine image, but is not used in other creation operations. NOTE: Image\nreference publisher and offer can only be set when you create the scale set.", + "decorators": [], + "properties": [ + { + "$id": "839", + "kind": "property", + "name": "id", + "serializedName": "id", + "doc": "Resource Id", + "type": { + "$id": "840", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "841", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ImageReference.id", + "serializationOptions": { + "$id": "842", + "json": { + "$id": "843", + "name": "id" + } + } + }, + { + "$id": "844", + "kind": "property", + "name": "publisher", + "serializedName": "publisher", + "doc": "The image publisher.", + "type": { + "$id": "845", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ImageReference.publisher", + "serializationOptions": { + "$id": "846", + "json": { + "$id": "847", + "name": "publisher" + } + } + }, + { + "$id": "848", + "kind": "property", + "name": "offer", + "serializedName": "offer", + "doc": "Specifies the offer of the platform image or marketplace image used to create\nthe virtual machine.", + "type": { + "$id": "849", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ImageReference.offer", + "serializationOptions": { + "$id": "850", + "json": { + "$id": "851", + "name": "offer" + } + } + }, + { + "$id": "852", + "kind": "property", + "name": "sku", + "serializedName": "sku", + "doc": "The image SKU.", + "type": { + "$id": "853", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ImageReference.sku", + "serializationOptions": { + "$id": "854", + "json": { + "$id": "855", + "name": "sku" + } + } + }, + { + "$id": "856", + "kind": "property", + "name": "version", + "serializedName": "version", + "doc": "Specifies the version of the platform image or marketplace image used to create\nthe virtual machine. The allowed formats are Major.Minor.Build or 'latest'.\nMajor, Minor, and Build are decimal numbers. Specify 'latest' to use the latest\nversion of an image available at deploy time. Even if you use 'latest', the VM\nimage will not automatically update after deploy time even if a new version\nbecomes available. Please do not use field 'version' for gallery image\ndeployment, gallery image should always use 'id' field for deployment, to use 'latest'\nversion of gallery image, just set\n'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}'\nin the 'id' field without version input.", + "type": { + "$id": "857", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ImageReference.version", + "serializationOptions": { + "$id": "858", + "json": { + "$id": "859", + "name": "version" + } + } + }, + { + "$id": "860", + "kind": "property", + "name": "exactVersion", + "serializedName": "exactVersion", + "doc": "Specifies in decimal numbers, the version of platform image or marketplace\nimage used to create the virtual machine. This readonly field differs from 'version',\nonly if the value specified in 'version' field is 'latest'.", + "type": { + "$id": "861", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ImageReference.exactVersion", + "serializationOptions": { + "$id": "862", + "json": { + "$id": "863", + "name": "exactVersion" + } + } + }, + { + "$id": "864", + "kind": "property", + "name": "sharedGalleryImageId", + "serializedName": "sharedGalleryImageId", + "doc": "Specified the shared gallery image unique id for vm deployment. This can be\nfetched from shared gallery image GET call.", + "type": { + "$id": "865", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ImageReference.sharedGalleryImageId", + "serializationOptions": { + "$id": "866", + "json": { + "$id": "867", + "name": "sharedGalleryImageId" + } + } + }, + { + "$id": "868", + "kind": "property", + "name": "communityGalleryImageId", + "serializedName": "communityGalleryImageId", + "doc": "Specified the community gallery image unique id for vm deployment. This can be\nfetched from community gallery image GET call.", + "type": { + "$id": "869", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ImageReference.communityGalleryImageId", + "serializationOptions": { + "$id": "870", + "json": { + "$id": "871", + "name": "communityGalleryImageId" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetStorageProfile.imageReference", + "serializationOptions": { + "$id": "872", + "json": { + "$id": "873", + "name": "imageReference" + } + } + }, + { + "$id": "874", + "kind": "property", + "name": "osDisk", + "serializedName": "osDisk", + "doc": "Specifies information about the operating system disk used by the virtual\nmachines in the scale set. For more information about disks, see [About disks\nand VHDs for Azure virtual\nmachines](https://learn.microsoft.com/azure/virtual-machines/managed-disks-overview).", + "type": { + "$id": "875", + "kind": "model", + "name": "ComputeFleetVmssOSDisk", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetOSDisk", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Describes a virtual machine scale set operating system disk.", + "decorators": [], + "properties": [ + { + "$id": "876", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The disk name.", + "type": { + "$id": "877", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetOSDisk.name", + "serializationOptions": { + "$id": "878", + "json": { + "$id": "879", + "name": "name" + } + } + }, + { + "$id": "880", + "kind": "property", + "name": "caching", + "serializedName": "caching", + "doc": "Specifies the caching requirements. Possible values are: **None,**\n**ReadOnly,** **ReadWrite.** The default values are: **None for Standard\nstorage. ReadOnly for Premium storage.**", + "type": { + "$ref": "174" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetOSDisk.caching", + "serializationOptions": { + "$id": "881", + "json": { + "$id": "882", + "name": "caching" + } + } + }, + { + "$id": "883", + "kind": "property", + "name": "IsWriteAcceleratorEnabled", + "serializedName": "writeAcceleratorEnabled", + "doc": "Specifies whether writeAccelerator should be enabled or disabled on the disk.", + "type": { + "$id": "884", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetOSDisk.writeAcceleratorEnabled", + "serializationOptions": { + "$id": "885", + "json": { + "$id": "886", + "name": "writeAcceleratorEnabled" + } + } + }, + { + "$id": "887", + "kind": "property", + "name": "createOption", + "serializedName": "createOption", + "doc": "Specifies how the virtual machines in the scale set should be created. The only\nallowed value is: **FromImage.** This value is used when you are using an image\nto create the virtual machine. If you are using a platform image, you also use\nthe imageReference element described above. If you are using a marketplace\nimage, you also use the plan element previously described.", + "type": { + "$ref": "182" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetOSDisk.createOption", + "serializationOptions": { + "$id": "888", + "json": { + "$id": "889", + "name": "createOption" + } + } + }, + { + "$id": "890", + "kind": "property", + "name": "diffDiskSettings", + "serializedName": "diffDiskSettings", + "doc": "Specifies the ephemeral disk Settings for the operating system disk used by the\nvirtual machine scale set.", + "type": { + "$id": "891", + "kind": "model", + "name": "ComputeFleetDiffDiskSettings", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.DiffDiskSettings", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Describes the parameters of ephemeral disk settings that can be specified for\noperating system disk. **Note:** The ephemeral disk settings can only be\nspecified for managed disk.", + "decorators": [], + "properties": [ + { + "$id": "892", + "kind": "property", + "name": "option", + "serializedName": "option", + "doc": "Specifies the ephemeral disk settings for operating system disk.", + "type": { + "$ref": "194" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.DiffDiskSettings.option", + "serializationOptions": { + "$id": "893", + "json": { + "$id": "894", + "name": "option" + } + } + }, + { + "$id": "895", + "kind": "property", + "name": "placement", + "serializedName": "placement", + "doc": "Specifies the ephemeral disk placement for operating system disk. Possible\nvalues are: **CacheDisk,** **ResourceDisk.** The defaulting behavior is:\n**CacheDisk** if one is configured for the VM size otherwise **ResourceDisk**\nis used. Refer to the VM size documentation for Windows VM at\nhttps://learn.microsoft.com/azure/virtual-machines/windows/sizes and Linux VM at\nhttps://learn.microsoft.com/azure/virtual-machines/linux/sizes to check which VM\nsizes exposes a cache disk.", + "type": { + "$ref": "198" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.DiffDiskSettings.placement", + "serializationOptions": { + "$id": "896", + "json": { + "$id": "897", + "name": "placement" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetOSDisk.diffDiskSettings", + "serializationOptions": { + "$id": "898", + "json": { + "$id": "899", + "name": "diffDiskSettings" + } + } + }, + { + "$id": "900", + "kind": "property", + "name": "diskSizeGB", + "serializedName": "diskSizeGB", + "doc": "Specifies the size of an empty data disk in gigabytes. This element can be used\nto overwrite the size of the disk in a virtual machine image. The property 'diskSizeGB'\nis the number of bytes x 1024^3 for the disk and the value cannot\nbe larger than 1023.", + "type": { + "$id": "901", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetOSDisk.diskSizeGB", + "serializationOptions": { + "$id": "902", + "json": { + "$id": "903", + "name": "diskSizeGB" + } + } + }, + { + "$id": "904", + "kind": "property", + "name": "osType", + "serializedName": "osType", + "doc": "This property allows you to specify the type of the OS that is included in the\ndisk if creating a VM from user-image or a specialized VHD. Possible values\nare: **Windows,** **Linux.**", + "type": { + "$ref": "206" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetOSDisk.osType", + "serializationOptions": { + "$id": "905", + "json": { + "$id": "906", + "name": "osType" + } + } + }, + { + "$id": "907", + "kind": "property", + "name": "image", + "serializedName": "image", + "doc": "Specifies information about the unmanaged user image to base the scale set on.", + "type": { + "$id": "908", + "kind": "model", + "name": "ComputeFleetVirtualHardDisk", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualHardDisk", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Describes the uri of a disk.", + "decorators": [], + "properties": [ + { + "$id": "909", + "kind": "property", + "name": "uri", + "serializedName": "uri", + "doc": "Specifies the virtual hard disk's uri.", + "type": { + "$id": "910", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualHardDisk.uri", + "serializationOptions": { + "$id": "911", + "json": { + "$id": "912", + "name": "uri" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetOSDisk.image", + "serializationOptions": { + "$id": "913", + "json": { + "$id": "914", + "name": "image" + } + } + }, + { + "$id": "915", + "kind": "property", + "name": "vhdContainers", + "serializedName": "vhdContainers", + "doc": "Specifies the container urls that are used to store operating system disks for\nthe scale set.", + "type": { + "$id": "916", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "917", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetOSDisk.vhdContainers", + "serializationOptions": { + "$id": "918", + "json": { + "$id": "919", + "name": "vhdContainers" + } + } + }, + { + "$id": "920", + "kind": "property", + "name": "managedDisk", + "serializedName": "managedDisk", + "doc": "The managed disk parameters.", + "type": { + "$id": "921", + "kind": "model", + "name": "ComputeFleetVmssManagedDisk", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetManagedDiskParameters", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Describes the parameters of a ScaleSet managed disk.", + "decorators": [], + "properties": [ + { + "$id": "922", + "kind": "property", + "name": "storageAccountType", + "serializedName": "storageAccountType", + "doc": "Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can\nonly be used with data disks, it cannot be used with OS Disk.", + "type": { + "$ref": "212" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetManagedDiskParameters.storageAccountType", + "serializationOptions": { + "$id": "923", + "json": { + "$id": "924", + "name": "storageAccountType" + } + } + }, + { + "$id": "925", + "kind": "property", + "name": "diskEncryptionSet", + "serializedName": "diskEncryptionSet", + "doc": "Specifies the customer managed disk encryption set resource id for the managed\ndisk.", + "type": { + "$id": "926", + "kind": "model", + "name": "DiskEncryptionSetParameters", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.DiskEncryptionSetParameters", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Describes the parameter of customer managed disk encryption set resource id\nthat can be specified for disk. **Note:** The disk encryption set resource id\ncan only be specified for managed disk. Please refer\nhttps://aka.ms/mdssewithcmkoverview for more details.", + "decorators": [], + "properties": [ + { + "$id": "927", + "kind": "property", + "name": "id", + "serializedName": "id", + "doc": "Resource Id", + "type": { + "$id": "928", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "929", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.DiskEncryptionSetParameters.id", + "serializationOptions": { + "$id": "930", + "json": { + "$id": "931", + "name": "id" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetManagedDiskParameters.diskEncryptionSet", + "serializationOptions": { + "$id": "932", + "json": { + "$id": "933", + "name": "diskEncryptionSet" + } + } + }, + { + "$id": "934", + "kind": "property", + "name": "securityProfile", + "serializedName": "securityProfile", + "doc": "Specifies the security profile for the managed disk.", + "type": { + "$id": "935", + "kind": "model", + "name": "ComputeFleetVMDiskSecurityProfile", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMDiskSecurityProfile", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Specifies the security profile settings for the managed disk. **Note:** It can\nonly be set for Confidential VMs.", + "decorators": [], + "properties": [ + { + "$id": "936", + "kind": "property", + "name": "securityEncryptionType", + "serializedName": "securityEncryptionType", + "doc": "Specifies the EncryptionType of the managed disk. It is set to\nDiskWithVMGuestState for encryption of the managed disk along with VMGuestState\nblob, VMGuestStateOnly for encryption of just the VMGuestState blob, and\nNonPersistedTPM for not persisting firmware state in the VMGuestState blob..\n**Note:** It can be set for only Confidential VMs.", + "type": { + "$ref": "228" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMDiskSecurityProfile.securityEncryptionType", + "serializationOptions": { + "$id": "937", + "json": { + "$id": "938", + "name": "securityEncryptionType" + } + } + }, + { + "$id": "939", + "kind": "property", + "name": "diskEncryptionSet", + "serializedName": "diskEncryptionSet", + "doc": "Specifies the customer managed disk encryption set resource id for the managed\ndisk that is used for Customer Managed Key encrypted ConfidentialVM OS Disk and\nVMGuest blob.", + "type": { + "$ref": "926" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMDiskSecurityProfile.diskEncryptionSet", + "serializationOptions": { + "$id": "940", + "json": { + "$id": "941", + "name": "diskEncryptionSet" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetManagedDiskParameters.securityProfile", + "serializationOptions": { + "$id": "942", + "json": { + "$id": "943", + "name": "securityProfile" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetOSDisk.managedDisk", + "serializationOptions": { + "$id": "944", + "json": { + "$id": "945", + "name": "managedDisk" + } + } + }, + { + "$id": "946", + "kind": "property", + "name": "deleteOption", + "serializedName": "deleteOption", + "doc": "Specifies whether OS Disk should be deleted or detached upon VMSS Flex deletion\n(This feature is available for VMSS with Flexible OrchestrationMode only).\n

Possible values:

**Delete** If this value is used, the OS\ndisk is deleted when VMSS Flex VM is deleted.

**Detach** If this value\nis used, the OS disk is retained after VMSS Flex VM is deleted.

The\ndefault value is set to **Delete**. For an Ephemeral OS Disk, the default value\nis set to **Delete**. User cannot change the delete option for Ephemeral OS\nDisk.", + "type": { + "$ref": "236" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetOSDisk.deleteOption", + "serializationOptions": { + "$id": "947", + "json": { + "$id": "948", + "name": "deleteOption" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetStorageProfile.osDisk", + "serializationOptions": { + "$id": "949", + "json": { + "$id": "950", + "name": "osDisk" + } + } + }, + { + "$id": "951", + "kind": "property", + "name": "dataDisks", + "serializedName": "dataDisks", + "doc": "Specifies the parameters that are used to add data disks to the virtual\nmachines in the scale set. For more information about disks, see [About disks\nand VHDs for Azure virtual\nmachines](https://learn.microsoft.com/azure/virtual-machines/managed-disks-overview).", + "type": { + "$id": "952", + "kind": "array", + "name": "ArrayVirtualMachineScaleSetDataDisk", + "valueType": { + "$id": "953", + "kind": "model", + "name": "ComputeFleetVmssDataDisk", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetDataDisk", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Describes a virtual machine scale set data disk.", + "decorators": [], + "properties": [ + { + "$id": "954", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The disk name.", + "type": { + "$id": "955", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetDataDisk.name", + "serializationOptions": { + "$id": "956", + "json": { + "$id": "957", + "name": "name" + } + } + }, + { + "$id": "958", + "kind": "property", + "name": "lun", + "serializedName": "lun", + "doc": "Specifies the logical unit number of the data disk. This value is used to\nidentify data disks within the VM and therefore must be unique for each data\ndisk attached to a VM.", + "type": { + "$id": "959", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetDataDisk.lun", + "serializationOptions": { + "$id": "960", + "json": { + "$id": "961", + "name": "lun" + } + } + }, + { + "$id": "962", + "kind": "property", + "name": "caching", + "serializedName": "caching", + "doc": "Specifies the caching requirements. Possible values are: **None,**\n**ReadOnly,** **ReadWrite.** The default values are: **None for Standard\nstorage. ReadOnly for Premium storage.**", + "type": { + "$ref": "174" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetDataDisk.caching", + "serializationOptions": { + "$id": "963", + "json": { + "$id": "964", + "name": "caching" + } + } + }, + { + "$id": "965", + "kind": "property", + "name": "IsWriteAcceleratorEnabled", + "serializedName": "writeAcceleratorEnabled", + "doc": "Specifies whether writeAccelerator should be enabled or disabled on the disk.", + "type": { + "$id": "966", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetDataDisk.writeAcceleratorEnabled", + "serializationOptions": { + "$id": "967", + "json": { + "$id": "968", + "name": "writeAcceleratorEnabled" + } + } + }, + { + "$id": "969", + "kind": "property", + "name": "createOption", + "serializedName": "createOption", + "doc": "The create option.", + "type": { + "$ref": "182" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetDataDisk.createOption", + "serializationOptions": { + "$id": "970", + "json": { + "$id": "971", + "name": "createOption" + } + } + }, + { + "$id": "972", + "kind": "property", + "name": "diskSizeGB", + "serializedName": "diskSizeGB", + "doc": "Specifies the size of an empty data disk in gigabytes. This element can be used\nto overwrite the size of the disk in a virtual machine image. The property\ndiskSizeGB is the number of bytes x 1024^3 for the disk and the value cannot be\nlarger than 1023.", + "type": { + "$id": "973", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetDataDisk.diskSizeGB", + "serializationOptions": { + "$id": "974", + "json": { + "$id": "975", + "name": "diskSizeGB" + } + } + }, + { + "$id": "976", + "kind": "property", + "name": "managedDisk", + "serializedName": "managedDisk", + "doc": "The managed disk parameters.", + "type": { + "$ref": "921" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetDataDisk.managedDisk", + "serializationOptions": { + "$id": "977", + "json": { + "$id": "978", + "name": "managedDisk" + } + } + }, + { + "$id": "979", + "kind": "property", + "name": "DiskIopsReadWrite", + "serializedName": "diskIOPSReadWrite", + "doc": "Specifies the Read-Write IOPS for the managed disk. Should be used only when\nStorageAccountType is UltraSSD_LRS. If not specified, a default value would be\nassigned based on diskSizeGB.", + "type": { + "$id": "980", + "kind": "int64", + "name": "int64", + "crossLanguageDefinitionId": "TypeSpec.int64", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetDataDisk.diskIOPSReadWrite", + "serializationOptions": { + "$id": "981", + "json": { + "$id": "982", + "name": "diskIOPSReadWrite" + } + } + }, + { + "$id": "983", + "kind": "property", + "name": "DiskMbpsReadWrite", + "serializedName": "diskMBpsReadWrite", + "doc": "Specifies the bandwidth in MB per second for the managed disk. Should be used\nonly when StorageAccountType is UltraSSD_LRS. If not specified, a default value\nwould be assigned based on diskSizeGB.", + "type": { + "$id": "984", + "kind": "int64", + "name": "int64", + "crossLanguageDefinitionId": "TypeSpec.int64", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetDataDisk.diskMBpsReadWrite", + "serializationOptions": { + "$id": "985", + "json": { + "$id": "986", + "name": "diskMBpsReadWrite" + } + } + }, + { + "$id": "987", + "kind": "property", + "name": "deleteOption", + "serializedName": "deleteOption", + "doc": "Specifies whether data disk should be deleted or detached upon VMSS Flex\ndeletion (This feature is available for VMSS with Flexible OrchestrationMode\nonly).

Possible values:

**Delete** If this value is used, the\ndata disk is deleted when the VMSS Flex VM is deleted.

**Detach** If\nthis value is used, the data disk is retained after VMSS Flex VM is\ndeleted.

The default value is set to **Delete**.", + "type": { + "$ref": "236" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetDataDisk.deleteOption", + "serializationOptions": { + "$id": "988", + "json": { + "$id": "989", + "name": "deleteOption" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetStorageProfile.dataDisks", + "serializationOptions": { + "$id": "990", + "json": { + "$id": "991", + "name": "dataDisks" + } + } + }, + { + "$id": "992", + "kind": "property", + "name": "diskControllerType", + "serializedName": "diskControllerType", + "doc": "Specifies the disk controller type configured for the virtual machines in the scale set. Minimum api-version: 2022-08-01", + "type": { + "$ref": "242" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetStorageProfile.diskControllerType", + "serializationOptions": { + "$id": "993", + "json": { + "$id": "994", + "name": "diskControllerType" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.BaseVirtualMachineProfile.storageProfile", + "serializationOptions": { + "$id": "995", + "json": { + "$id": "996", + "name": "storageProfile" + } + } + }, + { + "$id": "997", + "kind": "property", + "name": "networkProfile", + "serializedName": "networkProfile", + "doc": "Specifies properties of the network interfaces of the virtual machines in the\nscale set.", + "type": { + "$id": "998", + "kind": "model", + "name": "ComputeFleetVmssNetworkProfile", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetNetworkProfile", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Describes a virtual machine scale set network profile.", + "decorators": [], + "properties": [ + { + "$id": "999", + "kind": "property", + "name": "healthProbe", + "serializedName": "healthProbe", + "doc": "A reference to a load balancer probe used to determine the health of an\ninstance in the virtual machine scale set. The reference will be in the form:\n'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'.", + "type": { + "$id": "1000", + "kind": "model", + "name": "ApiEntityReference", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ApiEntityReference", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "The API entity reference.", + "decorators": [], + "properties": [ + { + "$id": "1001", + "kind": "property", + "name": "id", + "serializedName": "id", + "doc": "The ARM resource id in the form of\n/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/...", + "type": { + "$id": "1002", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "1003", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ApiEntityReference.id", + "serializationOptions": { + "$id": "1004", + "json": { + "$id": "1005", + "name": "id" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetNetworkProfile.healthProbe", + "serializationOptions": { + "$id": "1006", + "json": { + "$id": "1007", + "name": "healthProbe" + } + } + }, + { + "$id": "1008", + "kind": "property", + "name": "networkInterfaceConfigurations", + "serializedName": "networkInterfaceConfigurations", + "doc": "The list of network configurations.", + "type": { + "$id": "1009", + "kind": "array", + "name": "ArrayVirtualMachineScaleSetNetworkConfiguration", + "valueType": { + "$id": "1010", + "kind": "model", + "name": "ComputeFleetVmssNetworkConfiguration", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetNetworkConfiguration", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Describes a virtual machine scale set network profile's network configurations.", + "decorators": [], + "properties": [ + { + "$id": "1011", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The network configuration name.", + "type": { + "$id": "1012", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetNetworkConfiguration.name", + "serializationOptions": { + "$id": "1013", + "json": { + "$id": "1014", + "name": "name" + } + } + }, + { + "$id": "1015", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "Describes a virtual machine scale set network profile's IP configuration.", + "type": { + "$id": "1016", + "kind": "model", + "name": "ComputeFleetVmssNetworkConfigurationProperties", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetNetworkConfigurationProperties", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Describes a virtual machine scale set network profile's IP configuration.", + "decorators": [], + "properties": [ + { + "$id": "1017", + "kind": "property", + "name": "IsPrimary", + "serializedName": "primary", + "doc": "Specifies the primary network interface in case the virtual machine has more\nthan 1 network interface.", + "type": { + "$id": "1018", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetNetworkConfigurationProperties.primary", + "serializationOptions": { + "$id": "1019", + "json": { + "$id": "1020", + "name": "primary" + } + } + }, + { + "$id": "1021", + "kind": "property", + "name": "IsAcceleratedNetworkingEnabled", + "serializedName": "enableAcceleratedNetworking", + "doc": "Specifies whether the network interface is accelerated networking-enabled.", + "type": { + "$id": "1022", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetNetworkConfigurationProperties.enableAcceleratedNetworking", + "serializationOptions": { + "$id": "1023", + "json": { + "$id": "1024", + "name": "enableAcceleratedNetworking" + } + } + }, + { + "$id": "1025", + "kind": "property", + "name": "IsTcpStateTrackingDisabled", + "serializedName": "disableTcpStateTracking", + "doc": "Specifies whether the network interface is disabled for tcp state tracking.", + "type": { + "$id": "1026", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetNetworkConfigurationProperties.disableTcpStateTracking", + "serializationOptions": { + "$id": "1027", + "json": { + "$id": "1028", + "name": "disableTcpStateTracking" + } + } + }, + { + "$id": "1029", + "kind": "property", + "name": "IsFpgaEnabled", + "serializedName": "enableFpga", + "doc": "Specifies whether the network interface is FPGA networking-enabled.", + "type": { + "$id": "1030", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetNetworkConfigurationProperties.enableFpga", + "serializationOptions": { + "$id": "1031", + "json": { + "$id": "1032", + "name": "enableFpga" + } + } + }, + { + "$id": "1033", + "kind": "property", + "name": "networkSecurityGroup", + "serializedName": "networkSecurityGroup", + "doc": "The network security group.", + "type": { + "$ref": "802" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetNetworkConfigurationProperties.networkSecurityGroup", + "serializationOptions": { + "$id": "1034", + "json": { + "$id": "1035", + "name": "networkSecurityGroup" + } + } + }, + { + "$id": "1036", + "kind": "property", + "name": "dnsSettings", + "serializedName": "dnsSettings", + "doc": "The dns settings to be applied on the network interfaces.", + "type": { + "$id": "1037", + "kind": "model", + "name": "ComputeFleetVmssNetworkDnsSettings", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetNetworkConfigurationDnsSettings", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Describes a virtual machines scale sets network configuration's DNS settings.", + "decorators": [], + "properties": [ + { + "$id": "1038", + "kind": "property", + "name": "dnsServers", + "serializedName": "dnsServers", + "doc": "List of DNS servers IP addresses", + "type": { + "$id": "1039", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1040", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetNetworkConfigurationDnsSettings.dnsServers", + "serializationOptions": { + "$id": "1041", + "json": { + "$id": "1042", + "name": "dnsServers" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetNetworkConfigurationProperties.dnsSettings", + "serializationOptions": { + "$id": "1043", + "json": { + "$id": "1044", + "name": "dnsSettings" + } + } + }, + { + "$id": "1045", + "kind": "property", + "name": "ipConfigurations", + "serializedName": "ipConfigurations", + "doc": "Specifies the IP configurations of the network interface.", + "type": { + "$id": "1046", + "kind": "array", + "name": "ArrayVirtualMachineScaleSetIpConfiguration", + "valueType": { + "$id": "1047", + "kind": "model", + "name": "ComputeFleetVmssIPConfiguration", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetIPConfiguration", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Describes a virtual machine scale set network profile's IP configuration.", + "decorators": [], + "properties": [ + { + "$id": "1048", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The IP configuration name.", + "type": { + "$id": "1049", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetIPConfiguration.name", + "serializationOptions": { + "$id": "1050", + "json": { + "$id": "1051", + "name": "name" + } + } + }, + { + "$id": "1052", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "Describes a virtual machine scale set network profile's IP configuration\nproperties.", + "type": { + "$id": "1053", + "kind": "model", + "name": "ComputeFleetVmssIPConfigurationProperties", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetIPConfigurationProperties", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Describes a virtual machine scale set network profile's IP configuration\nproperties.", + "decorators": [], + "properties": [ + { + "$id": "1054", + "kind": "property", + "name": "subnet", + "serializedName": "subnet", + "doc": "Specifies the identifier of the subnet.", + "type": { + "$ref": "1000" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetIPConfigurationProperties.subnet", + "serializationOptions": { + "$id": "1055", + "json": { + "$id": "1056", + "name": "subnet" + } + } + }, + { + "$id": "1057", + "kind": "property", + "name": "IsPrimary", + "serializedName": "primary", + "doc": "Specifies the primary network interface in case the virtual machine has more\nthan 1 network interface.", + "type": { + "$id": "1058", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetIPConfigurationProperties.primary", + "serializationOptions": { + "$id": "1059", + "json": { + "$id": "1060", + "name": "primary" + } + } + }, + { + "$id": "1061", + "kind": "property", + "name": "publicIPAddressConfiguration", + "serializedName": "publicIPAddressConfiguration", + "doc": "The publicIPAddressConfiguration.", + "type": { + "$id": "1062", + "kind": "model", + "name": "ComputeFleetVmssPublicIPAddressConfiguration", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetPublicIPAddressConfiguration", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Describes a virtual machines scale set IP Configuration's PublicIPAddress\nconfiguration", + "decorators": [], + "properties": [ + { + "$id": "1063", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The publicIP address configuration name.", + "type": { + "$id": "1064", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetPublicIPAddressConfiguration.name", + "serializationOptions": { + "$id": "1065", + "json": { + "$id": "1066", + "name": "name" + } + } + }, + { + "$id": "1067", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "Describes a virtual machines scale set IP Configuration's PublicIPAddress\nconfiguration", + "type": { + "$id": "1068", + "kind": "model", + "name": "ComputeFleetVmssPublicIPAddressConfigurationProperties", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetPublicIPAddressConfigurationProperties", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Describes a virtual machines scale set IP Configuration's PublicIPAddress\nconfiguration", + "decorators": [], + "properties": [ + { + "$id": "1069", + "kind": "property", + "name": "idleTimeoutInMinutes", + "serializedName": "idleTimeoutInMinutes", + "doc": "The idle timeout of the public IP address.", + "type": { + "$id": "1070", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetPublicIPAddressConfigurationProperties.idleTimeoutInMinutes", + "serializationOptions": { + "$id": "1071", + "json": { + "$id": "1072", + "name": "idleTimeoutInMinutes" + } + } + }, + { + "$id": "1073", + "kind": "property", + "name": "dnsSettings", + "serializedName": "dnsSettings", + "doc": "The dns settings to be applied on the publicIP addresses .", + "type": { + "$id": "1074", + "kind": "model", + "name": "ComputeFleetVmssPublicIPAddressDnsSettings", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Describes a virtual machines scale sets network configuration's DNS settings.", + "decorators": [], + "properties": [ + { + "$id": "1075", + "kind": "property", + "name": "domainNameLabel", + "serializedName": "domainNameLabel", + "doc": "The Domain name label.The concatenation of the domain name label and vm index\nwill be the domain name labels of the PublicIPAddress resources that will be\ncreated", + "type": { + "$id": "1076", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings.domainNameLabel", + "serializationOptions": { + "$id": "1077", + "json": { + "$id": "1078", + "name": "domainNameLabel" + } + } + }, + { + "$id": "1079", + "kind": "property", + "name": "domainNameLabelScope", + "serializedName": "domainNameLabelScope", + "doc": "The Domain name label scope.The concatenation of the hashed domain name label\nthat generated according to the policy from domain name label scope and vm\nindex will be the domain name labels of the PublicIPAddress resources that will\nbe created", + "type": { + "$ref": "248" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings.domainNameLabelScope", + "serializationOptions": { + "$id": "1080", + "json": { + "$id": "1081", + "name": "domainNameLabelScope" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetPublicIPAddressConfigurationProperties.dnsSettings", + "serializationOptions": { + "$id": "1082", + "json": { + "$id": "1083", + "name": "dnsSettings" + } + } + }, + { + "$id": "1084", + "kind": "property", + "name": "ipTags", + "serializedName": "ipTags", + "doc": "The list of IP tags associated with the public IP address.", + "type": { + "$id": "1085", + "kind": "array", + "name": "ArrayVirtualMachineScaleSetIpTag", + "valueType": { + "$id": "1086", + "kind": "model", + "name": "ComputeFleetVmssIPTag", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetIpTag", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Contains the IP tag associated with the public IP address.", + "decorators": [], + "properties": [ + { + "$id": "1087", + "kind": "property", + "name": "ipTagType", + "serializedName": "ipTagType", + "doc": "IP tag type. Example: FirstPartyUsage.", + "type": { + "$id": "1088", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetIpTag.ipTagType", + "serializationOptions": { + "$id": "1089", + "json": { + "$id": "1090", + "name": "ipTagType" + } + } + }, + { + "$id": "1091", + "kind": "property", + "name": "tag", + "serializedName": "tag", + "doc": "IP tag associated with the public IP. Example: SQL, Storage etc.", + "type": { + "$id": "1092", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetIpTag.tag", + "serializationOptions": { + "$id": "1093", + "json": { + "$id": "1094", + "name": "tag" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetPublicIPAddressConfigurationProperties.ipTags", + "serializationOptions": { + "$id": "1095", + "json": { + "$id": "1096", + "name": "ipTags" + } + } + }, + { + "$id": "1097", + "kind": "property", + "name": "publicIPPrefix", + "serializedName": "publicIPPrefix", + "doc": "The PublicIPPrefix from which to allocate publicIP addresses.", + "type": { + "$ref": "802" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetPublicIPAddressConfigurationProperties.publicIPPrefix", + "serializationOptions": { + "$id": "1098", + "json": { + "$id": "1099", + "name": "publicIPPrefix" + } + } + }, + { + "$id": "1100", + "kind": "property", + "name": "publicIPAddressVersion", + "serializedName": "publicIPAddressVersion", + "doc": "Available from Api-Version 2019-07-01 onwards, it represents whether the\nspecific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible\nvalues are: 'IPv4' and 'IPv6'.", + "type": { + "$ref": "258" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetPublicIPAddressConfigurationProperties.publicIPAddressVersion", + "serializationOptions": { + "$id": "1101", + "json": { + "$id": "1102", + "name": "publicIPAddressVersion" + } + } + }, + { + "$id": "1103", + "kind": "property", + "name": "deleteOption", + "serializedName": "deleteOption", + "doc": "Specify what happens to the public IP when the VM is deleted", + "type": { + "$ref": "264" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetPublicIPAddressConfigurationProperties.deleteOption", + "serializationOptions": { + "$id": "1104", + "json": { + "$id": "1105", + "name": "deleteOption" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetPublicIPAddressConfiguration.properties", + "serializationOptions": { + "$id": "1106", + "json": { + "$id": "1107", + "name": "properties" + } + } + }, + { + "$id": "1108", + "kind": "property", + "name": "sku", + "serializedName": "sku", + "doc": "Describes the public IP Sku. It can only be set with OrchestrationMode as\nFlexible.", + "type": { + "$id": "1109", + "kind": "model", + "name": "ComputeFleetPublicIPAddressSku", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.PublicIPAddressSku", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Describes the public IP Sku. It can only be set with OrchestrationMode as\nFlexible.", + "decorators": [], + "properties": [ + { + "$id": "1110", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "Specify public IP sku name", + "type": { + "$ref": "270" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.PublicIPAddressSku.name", + "serializationOptions": { + "$id": "1111", + "json": { + "$id": "1112", + "name": "name" + } + } + }, + { + "$id": "1113", + "kind": "property", + "name": "tier", + "serializedName": "tier", + "doc": "Specify public IP sku tier", + "type": { + "$ref": "276" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.PublicIPAddressSku.tier", + "serializationOptions": { + "$id": "1114", + "json": { + "$id": "1115", + "name": "tier" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetPublicIPAddressConfiguration.sku", + "serializationOptions": { + "$id": "1116", + "json": { + "$id": "1117", + "name": "sku" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetIPConfigurationProperties.publicIPAddressConfiguration", + "serializationOptions": { + "$id": "1118", + "json": { + "$id": "1119", + "name": "publicIPAddressConfiguration" + } + } + }, + { + "$id": "1120", + "kind": "property", + "name": "privateIPAddressVersion", + "serializedName": "privateIPAddressVersion", + "doc": "Available from Api-Version 2017-03-30 onwards, it represents whether the\nspecific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible\nvalues are: 'IPv4' and 'IPv6'.", + "type": { + "$ref": "258" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetIPConfigurationProperties.privateIPAddressVersion", + "serializationOptions": { + "$id": "1121", + "json": { + "$id": "1122", + "name": "privateIPAddressVersion" + } + } + }, + { + "$id": "1123", + "kind": "property", + "name": "applicationGatewayBackendAddressPools", + "serializedName": "applicationGatewayBackendAddressPools", + "doc": "Specifies an array of references to backend address pools of application\ngateways. A scale set can reference backend address pools of multiple\napplication gateways. Multiple scale sets cannot use the same application\ngateway.", + "type": { + "$id": "1124", + "kind": "array", + "name": "ArraySubResource", + "valueType": { + "$ref": "802" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetIPConfigurationProperties.applicationGatewayBackendAddressPools", + "serializationOptions": { + "$id": "1125", + "json": { + "$id": "1126", + "name": "applicationGatewayBackendAddressPools" + } + } + }, + { + "$id": "1127", + "kind": "property", + "name": "applicationSecurityGroups", + "serializedName": "applicationSecurityGroups", + "doc": "Specifies an array of references to application security group.", + "type": { + "$id": "1128", + "kind": "array", + "name": "ArraySubResource", + "valueType": { + "$ref": "802" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetIPConfigurationProperties.applicationSecurityGroups", + "serializationOptions": { + "$id": "1129", + "json": { + "$id": "1130", + "name": "applicationSecurityGroups" + } + } + }, + { + "$id": "1131", + "kind": "property", + "name": "loadBalancerBackendAddressPools", + "serializedName": "loadBalancerBackendAddressPools", + "doc": "Specifies an array of references to backend address pools of load balancers. A\nscale set can reference backend address pools of one public and one internal\nload balancer. Multiple scale sets cannot use the same basic sku load balancer.", + "type": { + "$id": "1132", + "kind": "array", + "name": "ArraySubResource", + "valueType": { + "$ref": "802" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetIPConfigurationProperties.loadBalancerBackendAddressPools", + "serializationOptions": { + "$id": "1133", + "json": { + "$id": "1134", + "name": "loadBalancerBackendAddressPools" + } + } + }, + { + "$id": "1135", + "kind": "property", + "name": "loadBalancerInboundNatPools", + "serializedName": "loadBalancerInboundNatPools", + "doc": "Specifies an array of references to inbound Nat pools of the load balancers. A\nscale set can reference inbound nat pools of one public and one internal load\nbalancer. Multiple scale sets cannot use the same basic sku load balancer.", + "type": { + "$id": "1136", + "kind": "array", + "name": "ArraySubResource", + "valueType": { + "$ref": "802" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetIPConfigurationProperties.loadBalancerInboundNatPools", + "serializationOptions": { + "$id": "1137", + "json": { + "$id": "1138", + "name": "loadBalancerInboundNatPools" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetIPConfiguration.properties", + "serializationOptions": { + "$id": "1139", + "json": { + "$id": "1140", + "name": "properties" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetNetworkConfigurationProperties.ipConfigurations", + "serializationOptions": { + "$id": "1141", + "json": { + "$id": "1142", + "name": "ipConfigurations" + } + } + }, + { + "$id": "1143", + "kind": "property", + "name": "IsIPForwardingEnabled", + "serializedName": "enableIPForwarding", + "doc": "Whether IP forwarding enabled on this NIC.", + "type": { + "$id": "1144", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetNetworkConfigurationProperties.enableIPForwarding", + "serializationOptions": { + "$id": "1145", + "json": { + "$id": "1146", + "name": "enableIPForwarding" + } + } + }, + { + "$id": "1147", + "kind": "property", + "name": "deleteOption", + "serializedName": "deleteOption", + "doc": "Specify what happens to the network interface when the VM is deleted", + "type": { + "$ref": "264" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetNetworkConfigurationProperties.deleteOption", + "serializationOptions": { + "$id": "1148", + "json": { + "$id": "1149", + "name": "deleteOption" + } + } + }, + { + "$id": "1150", + "kind": "property", + "name": "auxiliaryMode", + "serializedName": "auxiliaryMode", + "doc": "Specifies whether the Auxiliary mode is enabled for the Network Interface\nresource.", + "type": { + "$ref": "282" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetNetworkConfigurationProperties.auxiliaryMode", + "serializationOptions": { + "$id": "1151", + "json": { + "$id": "1152", + "name": "auxiliaryMode" + } + } + }, + { + "$id": "1153", + "kind": "property", + "name": "auxiliarySku", + "serializedName": "auxiliarySku", + "doc": "Specifies whether the Auxiliary sku is enabled for the Network Interface\nresource.", + "type": { + "$ref": "290" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetNetworkConfigurationProperties.auxiliarySku", + "serializationOptions": { + "$id": "1154", + "json": { + "$id": "1155", + "name": "auxiliarySku" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetNetworkConfiguration.properties", + "serializationOptions": { + "$id": "1156", + "json": { + "$id": "1157", + "name": "properties" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetNetworkProfile.networkInterfaceConfigurations", + "serializationOptions": { + "$id": "1158", + "json": { + "$id": "1159", + "name": "networkInterfaceConfigurations" + } + } + }, + { + "$id": "1160", + "kind": "property", + "name": "networkApiVersion", + "serializedName": "networkApiVersion", + "doc": "specifies the Microsoft.Network API version used when creating networking\nresources in the Network Interface Configurations for Virtual Machine Scale Set\nwith orchestration mode 'Flexible'", + "type": { + "$ref": "302" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetNetworkProfile.networkApiVersion", + "serializationOptions": { + "$id": "1161", + "json": { + "$id": "1162", + "name": "networkApiVersion" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.BaseVirtualMachineProfile.networkProfile", + "serializationOptions": { + "$id": "1163", + "json": { + "$id": "1164", + "name": "networkProfile" + } + } + }, + { + "$id": "1165", + "kind": "property", + "name": "securityProfile", + "serializedName": "securityProfile", + "doc": "Specifies the Security related profile settings for the virtual machines in the\nscale set.", + "type": { + "$id": "1166", + "kind": "model", + "name": "ComputeFleetSecurityProfile", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SecurityProfile", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Specifies the Security profile settings for the virtual machine or virtual\nmachine scale set.", + "decorators": [], + "properties": [ + { + "$id": "1167", + "kind": "property", + "name": "uefiSettings", + "serializedName": "uefiSettings", + "doc": "Specifies the security settings like secure boot and vTPM used while creating\nthe virtual machine. Minimum api-version: 2020-12-01.", + "type": { + "$id": "1168", + "kind": "model", + "name": "ComputeFleetUefiSettings", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.UefiSettings", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Specifies the security settings like secure boot and vTPM used while creating\nthe virtual machine. Minimum api-version: 2020-12-01.", + "decorators": [], + "properties": [ + { + "$id": "1169", + "kind": "property", + "name": "IsSecureBootEnabled", + "serializedName": "secureBootEnabled", + "doc": "Specifies whether secure boot should be enabled on the virtual machine. Minimum\napi-version: 2020-12-01.", + "type": { + "$id": "1170", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.UefiSettings.secureBootEnabled", + "serializationOptions": { + "$id": "1171", + "json": { + "$id": "1172", + "name": "secureBootEnabled" + } + } + }, + { + "$id": "1173", + "kind": "property", + "name": "IsVTpmEnabled", + "serializedName": "vTpmEnabled", + "doc": "Specifies whether vTPM should be enabled on the virtual machine. Minimum\napi-version: 2020-12-01.", + "type": { + "$id": "1174", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.UefiSettings.vTpmEnabled", + "serializationOptions": { + "$id": "1175", + "json": { + "$id": "1176", + "name": "vTpmEnabled" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SecurityProfile.uefiSettings", + "serializationOptions": { + "$id": "1177", + "json": { + "$id": "1178", + "name": "uefiSettings" + } + } + }, + { + "$id": "1179", + "kind": "property", + "name": "IsEncryptionAtHostEnabled", + "serializedName": "encryptionAtHost", + "doc": "This property can be used by user in the request to enable or disable the Host\nEncryption for the virtual machine or virtual machine scale set. This will\nenable the encryption for all the disks including Resource/Temp disk at host\nitself. The default behavior is: The Encryption at host will be disabled unless\nthis property is set to true for the resource.", + "type": { + "$id": "1180", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SecurityProfile.encryptionAtHost", + "serializationOptions": { + "$id": "1181", + "json": { + "$id": "1182", + "name": "encryptionAtHost" + } + } + }, + { + "$id": "1183", + "kind": "property", + "name": "securityType", + "serializedName": "securityType", + "doc": "Specifies the SecurityType of the virtual machine. It has to be set to any\nspecified value to enable UefiSettings. The default behavior is: UefiSettings\nwill not be enabled unless this property is set.", + "type": { + "$ref": "306" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SecurityProfile.securityType", + "serializationOptions": { + "$id": "1184", + "json": { + "$id": "1185", + "name": "securityType" + } + } + }, + { + "$id": "1186", + "kind": "property", + "name": "encryptionIdentity", + "serializedName": "encryptionIdentity", + "doc": "Specifies the Managed Identity used by ADE to get access token for keyvault\noperations.", + "type": { + "$id": "1187", + "kind": "model", + "name": "ComputeFleetEncryptionIdentity", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.EncryptionIdentity", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Specifies the Managed Identity used by ADE to get access token for keyvault\noperations.", + "decorators": [], + "properties": [ + { + "$id": "1188", + "kind": "property", + "name": "userAssignedIdentityResourceId", + "serializedName": "userAssignedIdentityResourceId", + "doc": "Specifies ARM Resource ID of one of the user identities associated with the VM.", + "type": { + "$id": "1189", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "1190", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.EncryptionIdentity.userAssignedIdentityResourceId", + "serializationOptions": { + "$id": "1191", + "json": { + "$id": "1192", + "name": "userAssignedIdentityResourceId" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SecurityProfile.encryptionIdentity", + "serializationOptions": { + "$id": "1193", + "json": { + "$id": "1194", + "name": "encryptionIdentity" + } + } + }, + { + "$id": "1195", + "kind": "property", + "name": "proxyAgentSettings", + "serializedName": "proxyAgentSettings", + "doc": "Specifies ProxyAgent settings while creating the virtual machine. Minimum\napi-version: 2023-09-01.", + "type": { + "$id": "1196", + "kind": "model", + "name": "ComputeFleetProxyAgentSettings", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ProxyAgentSettings", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Specifies ProxyAgent settings while creating the virtual machine. Minimum\napi-version: 2023-09-01.", + "decorators": [], + "properties": [ + { + "$id": "1197", + "kind": "property", + "name": "IsEnabled", + "serializedName": "enabled", + "doc": "Specifies whether ProxyAgent feature should be enabled on the virtual machine\nor virtual machine scale set.", + "type": { + "$id": "1198", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ProxyAgentSettings.enabled", + "serializationOptions": { + "$id": "1199", + "json": { + "$id": "1200", + "name": "enabled" + } + } + }, + { + "$id": "1201", + "kind": "property", + "name": "mode", + "serializedName": "mode", + "doc": "Specifies the mode that ProxyAgent will execute on if the feature is enabled.\nProxyAgent will start to audit or monitor but not enforce access control over\nrequests to host endpoints in Audit mode, while in Enforce mode it will enforce\naccess control. The default value is Enforce mode.", + "type": { + "$ref": "312" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ProxyAgentSettings.mode", + "serializationOptions": { + "$id": "1202", + "json": { + "$id": "1203", + "name": "mode" + } + } + }, + { + "$id": "1204", + "kind": "property", + "name": "keyIncarnationId", + "serializedName": "keyIncarnationId", + "doc": "Increase the value of this property allows user to reset the key used for\nsecuring communication channel between guest and host.", + "type": { + "$id": "1205", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ProxyAgentSettings.keyIncarnationId", + "serializationOptions": { + "$id": "1206", + "json": { + "$id": "1207", + "name": "keyIncarnationId" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SecurityProfile.proxyAgentSettings", + "serializationOptions": { + "$id": "1208", + "json": { + "$id": "1209", + "name": "proxyAgentSettings" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.BaseVirtualMachineProfile.securityProfile", + "serializationOptions": { + "$id": "1210", + "json": { + "$id": "1211", + "name": "securityProfile" + } + } + }, + { + "$id": "1212", + "kind": "property", + "name": "diagnosticsProfile", + "serializedName": "diagnosticsProfile", + "doc": "Specifies the boot diagnostic settings state.", + "type": { + "$id": "1213", + "kind": "model", + "name": "ComputeFleetDiagnosticsProfile", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.DiagnosticsProfile", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Specifies the boot diagnostic settings state. Minimum api-version: 2015-06-15.", + "decorators": [], + "properties": [ + { + "$id": "1214", + "kind": "property", + "name": "bootDiagnostics", + "serializedName": "bootDiagnostics", + "doc": "Boot Diagnostics is a debugging feature which allows you to view Console Output\nand Screenshot to diagnose VM status. **NOTE**: If storageUri is being\nspecified then ensure that the storage account is in the same region and\nsubscription as the VM. You can easily view the output of your console log.\nAzure also enables you to see a screenshot of the VM from the hypervisor.", + "type": { + "$id": "1215", + "kind": "model", + "name": "ComputeFleetBootDiagnostics", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.BootDiagnostics", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Boot Diagnostics is a debugging feature which allows you to view Console Output\nand Screenshot to diagnose VM status. You can easily view the output of your\nconsole log. Azure also enables you to see a screenshot of the VM from the\nhypervisor.", + "decorators": [], + "properties": [ + { + "$id": "1216", + "kind": "property", + "name": "IsEnabled", + "serializedName": "enabled", + "doc": "Whether boot diagnostics should be enabled on the Virtual Machine.", + "type": { + "$id": "1217", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.BootDiagnostics.enabled", + "serializationOptions": { + "$id": "1218", + "json": { + "$id": "1219", + "name": "enabled" + } + } + }, + { + "$id": "1220", + "kind": "property", + "name": "storageUri", + "serializedName": "storageUri", + "doc": "Uri of the storage account to use for placing the console output and\nscreenshot. If storageUri is not specified while enabling boot diagnostics,\nmanaged storage will be used.", + "type": { + "$id": "1221", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.BootDiagnostics.storageUri", + "serializationOptions": { + "$id": "1222", + "json": { + "$id": "1223", + "name": "storageUri" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.DiagnosticsProfile.bootDiagnostics", + "serializationOptions": { + "$id": "1224", + "json": { + "$id": "1225", + "name": "bootDiagnostics" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.BaseVirtualMachineProfile.diagnosticsProfile", + "serializationOptions": { + "$id": "1226", + "json": { + "$id": "1227", + "name": "diagnosticsProfile" + } + } + }, + { + "$id": "1228", + "kind": "property", + "name": "extensionProfile", + "serializedName": "extensionProfile", + "doc": "Specifies a collection of settings for extensions installed on virtual machines\nin the scale set.", + "type": { + "$id": "1229", + "kind": "model", + "name": "ComputeFleetVmssExtensionProfile", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtensionProfile", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Describes a virtual machine scale set extension profile.", + "decorators": [], + "properties": [ + { + "$id": "1230", + "kind": "property", + "name": "extensions", + "serializedName": "extensions", + "doc": "The virtual machine scale set child extension resources.", + "type": { + "$id": "1231", + "kind": "array", + "name": "ArrayVirtualMachineScaleSetExtension", + "valueType": { + "$id": "1232", + "kind": "model", + "name": "ComputeFleetVmssExtension", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtension", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Describes a Virtual Machine Scale Set Extension.", + "decorators": [], + "properties": [ + { + "$id": "1233", + "kind": "property", + "name": "id", + "serializedName": "id", + "doc": "Resource Id", + "type": { + "$id": "1234", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "1235", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtension.id", + "serializationOptions": { + "$id": "1236", + "json": { + "$id": "1237", + "name": "id" + } + } + }, + { + "$id": "1238", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the extension.", + "type": { + "$id": "1239", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtension.name", + "serializationOptions": { + "$id": "1240", + "json": { + "$id": "1241", + "name": "name" + } + } + }, + { + "$id": "1242", + "kind": "property", + "name": "ExtensionType", + "serializedName": "type", + "doc": "Resource type", + "type": { + "$id": "1243", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtension.type", + "serializationOptions": { + "$id": "1244", + "json": { + "$id": "1245", + "name": "type" + } + } + }, + { + "$id": "1246", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "Describes the properties of a Virtual Machine Scale Set Extension.", + "type": { + "$id": "1247", + "kind": "model", + "name": "ComputeFleetVmssExtensionProperties", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtensionProperties", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Describes the properties of a Virtual Machine Scale Set Extension.", + "decorators": [], + "properties": [ + { + "$id": "1248", + "kind": "property", + "name": "forceUpdateTag", + "serializedName": "forceUpdateTag", + "doc": "If a value is provided and is different from the previous value, the extension\nhandler will be forced to update even if the extension configuration has not\nchanged.", + "type": { + "$id": "1249", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtensionProperties.forceUpdateTag", + "serializationOptions": { + "$id": "1250", + "json": { + "$id": "1251", + "name": "forceUpdateTag" + } + } + }, + { + "$id": "1252", + "kind": "property", + "name": "publisher", + "serializedName": "publisher", + "doc": "The name of the extension handler publisher.", + "type": { + "$id": "1253", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtensionProperties.publisher", + "serializationOptions": { + "$id": "1254", + "json": { + "$id": "1255", + "name": "publisher" + } + } + }, + { + "$id": "1256", + "kind": "property", + "name": "ExtensionType", + "serializedName": "type", + "doc": "Specifies the type of the extension; an example is \"CustomScriptExtension\".", + "type": { + "$id": "1257", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtensionProperties.type", + "serializationOptions": { + "$id": "1258", + "json": { + "$id": "1259", + "name": "type" + } + } + }, + { + "$id": "1260", + "kind": "property", + "name": "typeHandlerVersion", + "serializedName": "typeHandlerVersion", + "doc": "Specifies the version of the script handler.", + "type": { + "$id": "1261", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtensionProperties.typeHandlerVersion", + "serializationOptions": { + "$id": "1262", + "json": { + "$id": "1263", + "name": "typeHandlerVersion" + } + } + }, + { + "$id": "1264", + "kind": "property", + "name": "ShouldAutoUpgradeMinorVersion", + "serializedName": "autoUpgradeMinorVersion", + "doc": "Indicates whether the extension should use a newer minor version if one is\navailable at deployment time. Once deployed, however, the extension will not\nupgrade minor versions unless redeployed, even with this property set to true.", + "type": { + "$id": "1265", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtensionProperties.autoUpgradeMinorVersion", + "serializationOptions": { + "$id": "1266", + "json": { + "$id": "1267", + "name": "autoUpgradeMinorVersion" + } + } + }, + { + "$id": "1268", + "kind": "property", + "name": "IsAutomaticUpgradeEnabled", + "serializedName": "enableAutomaticUpgrade", + "doc": "Indicates whether the extension should be automatically upgraded by the\nplatform if there is a newer version of the extension available.", + "type": { + "$id": "1269", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtensionProperties.enableAutomaticUpgrade", + "serializationOptions": { + "$id": "1270", + "json": { + "$id": "1271", + "name": "enableAutomaticUpgrade" + } + } + }, + { + "$id": "1272", + "kind": "property", + "name": "settings", + "serializedName": "settings", + "doc": "Json formatted public settings for the extension.", + "type": { + "$id": "1273", + "kind": "dict", + "keyType": { + "$id": "1274", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1275", + "kind": "unknown", + "name": "unknown", + "crossLanguageDefinitionId": "", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtensionProperties.settings", + "serializationOptions": { + "$id": "1276", + "json": { + "$id": "1277", + "name": "settings" + } + } + }, + { + "$id": "1278", + "kind": "property", + "name": "protectedSettings", + "serializedName": "protectedSettings", + "doc": "The extension can contain either protectedSettings or\nprotectedSettingsFromKeyVault or no protected settings at all.", + "type": { + "$id": "1279", + "kind": "dict", + "keyType": { + "$id": "1280", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1281", + "kind": "unknown", + "name": "unknown", + "crossLanguageDefinitionId": "", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtensionProperties.protectedSettings", + "serializationOptions": { + "$id": "1282", + "json": { + "$id": "1283", + "name": "protectedSettings" + } + } + }, + { + "$id": "1284", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "The provisioning state, which only appears in the response.", + "type": { + "$id": "1285", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtensionProperties.provisioningState", + "serializationOptions": { + "$id": "1286", + "json": { + "$id": "1287", + "name": "provisioningState" + } + } + }, + { + "$id": "1288", + "kind": "property", + "name": "provisionAfterExtensions", + "serializedName": "provisionAfterExtensions", + "doc": "Collection of extension names after which this extension needs to be\nprovisioned.", + "type": { + "$id": "1289", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1290", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtensionProperties.provisionAfterExtensions", + "serializationOptions": { + "$id": "1291", + "json": { + "$id": "1292", + "name": "provisionAfterExtensions" + } + } + }, + { + "$id": "1293", + "kind": "property", + "name": "IsSuppressFailuresEnabled", + "serializedName": "suppressFailures", + "doc": "Indicates whether failures stemming from the extension will be suppressed\n(Operational failures such as not connecting to the VM will not be suppressed\nregardless of this value). The default is false.", + "type": { + "$id": "1294", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtensionProperties.suppressFailures", + "serializationOptions": { + "$id": "1295", + "json": { + "$id": "1296", + "name": "suppressFailures" + } + } + }, + { + "$id": "1297", + "kind": "property", + "name": "protectedSettingsFromKeyVault", + "serializedName": "protectedSettingsFromKeyVault", + "doc": "The extensions protected settings that are passed by reference, and consumed\nfrom key vault", + "type": { + "$id": "1298", + "kind": "model", + "name": "ComputeFleetKeyVaultSecretReference", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.KeyVaultSecretReference", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Describes a reference to Key Vault Secret", + "decorators": [], + "properties": [ + { + "$id": "1299", + "kind": "property", + "name": "secretUrl", + "serializedName": "secretUrl", + "doc": "The URL referencing a secret in a Key Vault.", + "type": { + "$id": "1300", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.KeyVaultSecretReference.secretUrl", + "serializationOptions": { + "$id": "1301", + "json": { + "$id": "1302", + "name": "secretUrl" + } + } + }, + { + "$id": "1303", + "kind": "property", + "name": "sourceVault", + "serializedName": "sourceVault", + "doc": "The relative URL of the Key Vault containing the secret.", + "type": { + "$ref": "802" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.KeyVaultSecretReference.sourceVault", + "serializationOptions": { + "$id": "1304", + "json": { + "$id": "1305", + "name": "sourceVault" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtensionProperties.protectedSettingsFromKeyVault", + "serializationOptions": { + "$id": "1306", + "json": { + "$id": "1307", + "name": "protectedSettingsFromKeyVault" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtension.properties", + "serializationOptions": { + "$id": "1308", + "json": { + "$id": "1309", + "name": "properties" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtensionProfile.extensions", + "serializationOptions": { + "$id": "1310", + "json": { + "$id": "1311", + "name": "extensions" + } + } + }, + { + "$id": "1312", + "kind": "property", + "name": "extensionsTimeBudget", + "serializedName": "extensionsTimeBudget", + "doc": "Specifies the time alloted for all extensions to start. The time duration\nshould be between 15 minutes and 120 minutes (inclusive) and should be\nspecified in ISO 8601 format. The default value is 90 minutes (PT1H30M).\nMinimum api-version: 2020-06-01.", + "type": { + "$id": "1313", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetExtensionProfile.extensionsTimeBudget", + "serializationOptions": { + "$id": "1314", + "json": { + "$id": "1315", + "name": "extensionsTimeBudget" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.BaseVirtualMachineProfile.extensionProfile", + "serializationOptions": { + "$id": "1316", + "json": { + "$id": "1317", + "name": "extensionProfile" + } + } + }, + { + "$id": "1318", + "kind": "property", + "name": "licenseType", + "serializedName": "licenseType", + "doc": "Specifies that the image or disk that is being used was licensed on-premises.\n

Possible values for Windows Server operating system are:

\nWindows_Client

Windows_Server

Possible values for Linux\nServer operating system are:

RHEL_BYOS (for RHEL)

SLES_BYOS\n(for SUSE)

For more information, see [Azure Hybrid Use Benefit for\nWindows\nServer](https://learn.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing)\n

[Azure Hybrid Use Benefit for Linux\nServer](https://learn.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux)\n

Minimum api-version: 2015-06-15", + "type": { + "$id": "1319", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.BaseVirtualMachineProfile.licenseType", + "serializationOptions": { + "$id": "1320", + "json": { + "$id": "1321", + "name": "licenseType" + } + } + }, + { + "$id": "1322", + "kind": "property", + "name": "scheduledEventsProfile", + "serializedName": "scheduledEventsProfile", + "doc": "Specifies Scheduled Event related configurations.", + "type": { + "$id": "1323", + "kind": "model", + "name": "ComputeFleetScheduledEventsProfile", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ScheduledEventsProfile", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Specifies Scheduled Event related configurations.", + "decorators": [], + "properties": [ + { + "$id": "1324", + "kind": "property", + "name": "terminateNotificationProfile", + "serializedName": "terminateNotificationProfile", + "doc": "Specifies Terminate Scheduled Event related configurations.", + "type": { + "$id": "1325", + "kind": "model", + "name": "ComputeFleetTerminateNotificationProfile", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.TerminateNotificationProfile", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Specifies Terminate Scheduled Event related configurations.", + "decorators": [], + "properties": [ + { + "$id": "1326", + "kind": "property", + "name": "notBeforeTimeout", + "serializedName": "notBeforeTimeout", + "doc": "Configurable length of time a Virtual Machine being deleted will have to\npotentially approve the Terminate Scheduled Event before the event is auto\napproved (timed out). The configuration must be specified in ISO 8601 format,\nthe default value is 5 minutes (PT5M)", + "type": { + "$id": "1327", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.TerminateNotificationProfile.notBeforeTimeout", + "serializationOptions": { + "$id": "1328", + "json": { + "$id": "1329", + "name": "notBeforeTimeout" + } + } + }, + { + "$id": "1330", + "kind": "property", + "name": "IsEnabled", + "serializedName": "enable", + "doc": "Specifies whether the Terminate Scheduled event is enabled or disabled.", + "type": { + "$id": "1331", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.TerminateNotificationProfile.enable", + "serializationOptions": { + "$id": "1332", + "json": { + "$id": "1333", + "name": "enable" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ScheduledEventsProfile.terminateNotificationProfile", + "serializationOptions": { + "$id": "1334", + "json": { + "$id": "1335", + "name": "terminateNotificationProfile" + } + } + }, + { + "$id": "1336", + "kind": "property", + "name": "osImageNotificationProfile", + "serializedName": "osImageNotificationProfile", + "doc": "Specifies OS Image Scheduled Event related configurations.", + "type": { + "$id": "1337", + "kind": "model", + "name": "ComputeFleetOSImageNotificationProfile", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.OSImageNotificationProfile", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Specifies OS Image Scheduled Event related configurations.", + "decorators": [], + "properties": [ + { + "$id": "1338", + "kind": "property", + "name": "notBeforeTimeout", + "serializedName": "notBeforeTimeout", + "doc": "Length of time a Virtual Machine being reimaged or having its OS upgraded will\nhave to potentially approve the OS Image Scheduled Event before the event is\nauto approved (timed out). The configuration is specified in ISO 8601 format,\nand the value must not exceed 15 minutes (PT15M)", + "type": { + "$id": "1339", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.OSImageNotificationProfile.notBeforeTimeout", + "serializationOptions": { + "$id": "1340", + "json": { + "$id": "1341", + "name": "notBeforeTimeout" + } + } + }, + { + "$id": "1342", + "kind": "property", + "name": "IsEnabled", + "serializedName": "enable", + "doc": "Specifies whether the OS Image Scheduled event is enabled or disabled.", + "type": { + "$id": "1343", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.OSImageNotificationProfile.enable", + "serializationOptions": { + "$id": "1344", + "json": { + "$id": "1345", + "name": "enable" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ScheduledEventsProfile.osImageNotificationProfile", + "serializationOptions": { + "$id": "1346", + "json": { + "$id": "1347", + "name": "osImageNotificationProfile" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.BaseVirtualMachineProfile.scheduledEventsProfile", + "serializationOptions": { + "$id": "1348", + "json": { + "$id": "1349", + "name": "scheduledEventsProfile" + } + } + }, + { + "$id": "1350", + "kind": "property", + "name": "userData", + "serializedName": "userData", + "doc": "UserData for the virtual machines in the scale set, which must be base-64\nencoded. Customer should not pass any secrets in here. Minimum api-version:\n2021-03-01.", + "type": { + "$id": "1351", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.BaseVirtualMachineProfile.userData", + "serializationOptions": { + "$id": "1352", + "json": { + "$id": "1353", + "name": "userData" + } + } + }, + { + "$id": "1354", + "kind": "property", + "name": "capacityReservation", + "serializedName": "capacityReservation", + "doc": "Specifies the capacity reservation related details of a scale set. Minimum\napi-version: 2021-04-01.", + "type": { + "$id": "1355", + "kind": "model", + "name": "CapacityReservationProfile", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.CapacityReservationProfile", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "The parameters of a capacity reservation Profile.", + "decorators": [], + "properties": [ + { + "$id": "1356", + "kind": "property", + "name": "capacityReservationGroup", + "serializedName": "capacityReservationGroup", + "doc": "Specifies the capacity reservation group resource id that should be used for\nallocating the virtual machine or scaleset vm instances provided enough\ncapacity has been reserved. Please refer to https://aka.ms/CapacityReservation\nfor more details.", + "type": { + "$ref": "802" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.CapacityReservationProfile.capacityReservationGroup", + "serializationOptions": { + "$id": "1357", + "json": { + "$id": "1358", + "name": "capacityReservationGroup" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.BaseVirtualMachineProfile.capacityReservation", + "serializationOptions": { + "$id": "1359", + "json": { + "$id": "1360", + "name": "capacityReservation" + } + } + }, + { + "$id": "1361", + "kind": "property", + "name": "applicationProfile", + "serializedName": "applicationProfile", + "doc": "Specifies the gallery applications that should be made available to the VM/VMSS", + "type": { + "$id": "1362", + "kind": "model", + "name": "ComputeFleetApplicationProfile", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ApplicationProfile", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Contains the list of gallery applications that should be made available to the\nVM/VMSS", + "decorators": [], + "properties": [ + { + "$id": "1363", + "kind": "property", + "name": "galleryApplications", + "serializedName": "galleryApplications", + "doc": "Specifies the gallery applications that should be made available to the VM/VMSS", + "type": { + "$id": "1364", + "kind": "array", + "name": "ArrayVmGalleryApplication", + "valueType": { + "$id": "1365", + "kind": "model", + "name": "ComputeFleetVMGalleryApplication", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMGalleryApplication", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Specifies the required information to reference a compute gallery application\nversion", + "decorators": [], + "properties": [ + { + "$id": "1366", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Optional, Specifies a passthrough value for more generic context.", + "type": { + "$id": "1367", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMGalleryApplication.tags", + "serializationOptions": { + "$id": "1368", + "json": { + "$id": "1369", + "name": "tags" + } + } + }, + { + "$id": "1370", + "kind": "property", + "name": "order", + "serializedName": "order", + "doc": "Optional, Specifies the order in which the packages have to be installed", + "type": { + "$id": "1371", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMGalleryApplication.order", + "serializationOptions": { + "$id": "1372", + "json": { + "$id": "1373", + "name": "order" + } + } + }, + { + "$id": "1374", + "kind": "property", + "name": "packageReferenceId", + "serializedName": "packageReferenceId", + "doc": "Specifies the GalleryApplicationVersion resource id on the form of\n/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{application}/versions/{version}", + "type": { + "$id": "1375", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "1376", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMGalleryApplication.packageReferenceId", + "serializationOptions": { + "$id": "1377", + "json": { + "$id": "1378", + "name": "packageReferenceId" + } + } + }, + { + "$id": "1379", + "kind": "property", + "name": "configurationReference", + "serializedName": "configurationReference", + "doc": "Optional, Specifies the uri to an azure blob that will replace the default\nconfiguration for the package if provided", + "type": { + "$id": "1380", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMGalleryApplication.configurationReference", + "serializationOptions": { + "$id": "1381", + "json": { + "$id": "1382", + "name": "configurationReference" + } + } + }, + { + "$id": "1383", + "kind": "property", + "name": "IsTreatFailureAsDeploymentFailureEnabled", + "serializedName": "treatFailureAsDeploymentFailure", + "doc": "Optional, If true, any failure for any operation in the VmApplication will fail\nthe deployment", + "type": { + "$id": "1384", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMGalleryApplication.treatFailureAsDeploymentFailure", + "serializationOptions": { + "$id": "1385", + "json": { + "$id": "1386", + "name": "treatFailureAsDeploymentFailure" + } + } + }, + { + "$id": "1387", + "kind": "property", + "name": "IsAutomaticUpgradeEnabled", + "serializedName": "enableAutomaticUpgrade", + "doc": "If set to true, when a new Gallery Application version is available in PIR/SIG,\nit will be automatically updated for the VM/VMSS", + "type": { + "$id": "1388", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMGalleryApplication.enableAutomaticUpgrade", + "serializationOptions": { + "$id": "1389", + "json": { + "$id": "1390", + "name": "enableAutomaticUpgrade" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ApplicationProfile.galleryApplications", + "serializationOptions": { + "$id": "1391", + "json": { + "$id": "1392", + "name": "galleryApplications" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.BaseVirtualMachineProfile.applicationProfile", + "serializationOptions": { + "$id": "1393", + "json": { + "$id": "1394", + "name": "applicationProfile" + } + } + }, + { + "$id": "1395", + "kind": "property", + "name": "hardwareProfile", + "serializedName": "hardwareProfile", + "doc": "Specifies the hardware profile related details of a scale set. Minimum\napi-version: 2021-11-01.", + "type": { + "$id": "1396", + "kind": "model", + "name": "ComputeFleetVmssHardwareProfile", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetHardwareProfile", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Specifies the hardware settings for the virtual machine scale set.", + "decorators": [], + "properties": [ + { + "$id": "1397", + "kind": "property", + "name": "vmSizeProperties", + "serializedName": "vmSizeProperties", + "doc": "Specifies the properties for customizing the size of the virtual machine.\nMinimum api-version: 2021-11-01. Please follow the instructions in [VM\nCustomization](https://aka.ms/vmcustomization) for more details.", + "type": { + "$id": "1398", + "kind": "model", + "name": "ComputeFleetVMSizeProperties", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMSizeProperties", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Specifies VM Size Property settings on the virtual machine.", + "decorators": [], + "properties": [ + { + "$id": "1399", + "kind": "property", + "name": "vCPUsAvailable", + "serializedName": "vCPUsAvailable", + "doc": "Specifies the number of vCPUs available for the VM. When this property is not\nspecified in the request body the default behavior is to set it to the value of\nvCPUs available for that VM size exposed in api response of [List all available\nvirtual machine sizes in a\nregion](https://learn.microsoft.com/en-us/rest/api/compute/resource-skus/list).", + "type": { + "$id": "1400", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMSizeProperties.vCPUsAvailable", + "serializationOptions": { + "$id": "1401", + "json": { + "$id": "1402", + "name": "vCPUsAvailable" + } + } + }, + { + "$id": "1403", + "kind": "property", + "name": "vCPUsPerCore", + "serializedName": "vCPUsPerCore", + "doc": "Specifies the vCPU to physical core ratio. When this property is not specified\nin the request body the default behavior is set to the value of vCPUsPerCore\nfor the VM Size exposed in api response of [List all available virtual machine\nsizes in a\nregion](https://learn.microsoft.com/en-us/rest/api/compute/resource-skus/list).\n**Setting this property to 1 also means that hyper-threading is disabled.**", + "type": { + "$id": "1404", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VMSizeProperties.vCPUsPerCore", + "serializationOptions": { + "$id": "1405", + "json": { + "$id": "1406", + "name": "vCPUsPerCore" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetHardwareProfile.vmSizeProperties", + "serializationOptions": { + "$id": "1407", + "json": { + "$id": "1408", + "name": "vmSizeProperties" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.BaseVirtualMachineProfile.hardwareProfile", + "serializationOptions": { + "$id": "1409", + "json": { + "$id": "1410", + "name": "hardwareProfile" + } + } + }, + { + "$id": "1411", + "kind": "property", + "name": "serviceArtifactReference", + "serializedName": "serviceArtifactReference", + "doc": "Specifies the service artifact reference id used to set same image version for\nall virtual machines in the scale set when using 'latest' image version.\nMinimum api-version: 2022-11-01", + "type": { + "$id": "1412", + "kind": "model", + "name": "ServiceArtifactReference", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ServiceArtifactReference", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Specifies the service artifact reference id used to set same image version for\nall virtual machines in the scale set when using 'latest' image version.\nMinimum api-version: 2022-11-01", + "decorators": [], + "properties": [ + { + "$id": "1413", + "kind": "property", + "name": "id", + "serializedName": "id", + "doc": "The service artifact reference id in the form of\n/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactName}/vmArtifactsProfiles/{vmArtifactsProfilesName}", + "type": { + "$id": "1414", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "1415", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ServiceArtifactReference.id", + "serializationOptions": { + "$id": "1416", + "json": { + "$id": "1417", + "name": "id" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.BaseVirtualMachineProfile.serviceArtifactReference", + "serializationOptions": { + "$id": "1418", + "json": { + "$id": "1419", + "name": "serviceArtifactReference" + } + } + }, + { + "$id": "1420", + "kind": "property", + "name": "securityPostureReference", + "serializedName": "securityPostureReference", + "doc": "Specifies the security posture to be used for all virtual machines in the scale\nset. Minimum api-version: 2023-03-01", + "type": { + "$id": "1421", + "kind": "model", + "name": "ComputeFleetSecurityPostureReference", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SecurityPostureReference", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Specifies the security posture to be used for all virtual machines in the scale\nset. Minimum api-version: 2023-03-01", + "decorators": [], + "properties": [ + { + "$id": "1422", + "kind": "property", + "name": "id", + "serializedName": "id", + "doc": "The security posture reference id in the form of\n/CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest", + "type": { + "$id": "1423", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SecurityPostureReference.id", + "serializationOptions": { + "$id": "1424", + "json": { + "$id": "1425", + "name": "id" + } + } + }, + { + "$id": "1426", + "kind": "property", + "name": "excludeExtensions", + "serializedName": "excludeExtensions", + "doc": "List of virtual machine extension names to exclude when applying the security\nposture.", + "type": { + "$id": "1427", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1428", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SecurityPostureReference.excludeExtensions", + "serializationOptions": { + "$id": "1429", + "json": { + "$id": "1430", + "name": "excludeExtensions" + } + } + }, + { + "$id": "1431", + "kind": "property", + "name": "isOverridable", + "serializedName": "isOverridable", + "doc": "Whether the security posture can be overridden by the user.", + "type": { + "$id": "1432", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.SecurityPostureReference.isOverridable", + "serializationOptions": { + "$id": "1433", + "json": { + "$id": "1434", + "name": "isOverridable" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.BaseVirtualMachineProfile.securityPostureReference", + "serializationOptions": { + "$id": "1435", + "json": { + "$id": "1436", + "name": "securityPostureReference" + } + } + }, + { + "$id": "1437", + "kind": "property", + "name": "CreatedOn", + "serializedName": "timeCreated", + "doc": "Specifies the time in which this VM profile for the Virtual Machine Scale Set\nwas created. Minimum API version for this property is 2023-09-01. This value\nwill be added to VMSS Flex VM tags when creating/updating the VMSS VM Profile\nwith minimum api-version 2023-09-01. Examples: \"2024-07-01T00:00:01.1234567+00:00\"", + "type": { + "$id": "1438", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "1439", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.BaseVirtualMachineProfile.timeCreated", + "serializationOptions": { + "$id": "1440", + "json": { + "$id": "1441", + "name": "timeCreated" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.LocationProfile.virtualMachineProfileOverride", + "serializationOptions": { + "$id": "1442", + "json": { + "$id": "1443", + "name": "virtualMachineProfileOverride" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.AdditionalLocationsProfile.locationProfiles", + "serializationOptions": { + "$id": "1444", + "json": { + "$id": "1445", + "name": "locationProfiles" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.FleetProperties.additionalLocationsProfile", + "serializationOptions": { + "$id": "1446", + "json": { + "$id": "1447", + "name": "additionalLocationsProfile" + } + } + }, + { + "$id": "1448", + "kind": "property", + "name": "computeProfile", + "serializedName": "computeProfile", + "doc": "Compute Profile to use for running user's workloads.", + "type": { + "$id": "1449", + "kind": "model", + "name": "ComputeFleetComputeProfile", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ComputeProfile", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Compute Profile to use for running user's workloads.", + "decorators": [], + "properties": [ + { + "$id": "1450", + "kind": "property", + "name": "baseVirtualMachineProfile", + "serializedName": "baseVirtualMachineProfile", + "doc": "Base Virtual Machine Profile Properties to be specified according to \"specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/{computeApiVersion}/virtualMachineScaleSet.json#/definitions/VirtualMachineScaleSetVMProfile\"", + "type": { + "$ref": "644" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ComputeProfile.baseVirtualMachineProfile", + "serializationOptions": { + "$id": "1451", + "json": { + "$id": "1452", + "name": "baseVirtualMachineProfile" + } + } + }, + { + "$id": "1453", + "kind": "property", + "name": "computeApiVersion", + "serializedName": "computeApiVersion", + "doc": "Specifies the Microsoft.Compute API version to use when creating underlying Virtual Machine scale sets and Virtual Machines.\nThe default value will be the latest supported computeApiVersion by Compute Fleet.", + "type": { + "$id": "1454", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ComputeProfile.computeApiVersion", + "serializationOptions": { + "$id": "1455", + "json": { + "$id": "1456", + "name": "computeApiVersion" + } + } + }, + { + "$id": "1457", + "kind": "property", + "name": "platformFaultDomainCount", + "serializedName": "platformFaultDomainCount", + "doc": "Specifies the number of fault domains to use when creating the underlying VMSS.\nA fault domain is a logical group of hardware within an Azure datacenter.\nVMs in the same fault domain share a common power source and network switch.\nIf not specified, defaults to 1, which represents \"Max Spreading\" (using as many fault domains as possible).\nThis property cannot be updated.", + "type": { + "$id": "1458", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ComputeProfile.platformFaultDomainCount", + "serializationOptions": { + "$id": "1459", + "json": { + "$id": "1460", + "name": "platformFaultDomainCount" + } + } + }, + { + "$id": "1461", + "kind": "property", + "name": "additionalVirtualMachineCapabilities", + "serializedName": "additionalVirtualMachineCapabilities", + "doc": "Specifies VMSS and VM API entity models support two additional capabilities as of today: ultraSSDEnabled and hibernationEnabled.\nultraSSDEnabled: Enables UltraSSD_LRS storage account type on the VMSS VMs.\nhibernationEnabled: Enables the hibernation capability on the VMSS VMs.\nDefault value is null if not specified. This property cannot be updated once set.", + "type": { + "$id": "1462", + "kind": "model", + "name": "AdditionalCapabilities", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.AdditionalCapabilities", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "AdditionalCapabilities for VM.", + "decorators": [], + "properties": [ + { + "$id": "1463", + "kind": "property", + "name": "isUltraSSDEnabled", + "serializedName": "ultraSSDEnabled", + "doc": "The flag that enables or disables a capability to have one or more managed data disks with UltraSSD_LRS storage account type on the VM or VMSS.\nManaged disks with storage account type UltraSSD_LRS can be added to a virtual machine or virtual machine scale set only if this property is enabled.", + "type": { + "$id": "1464", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.AdditionalCapabilities.ultraSSDEnabled", + "serializationOptions": { + "$id": "1465", + "json": { + "$id": "1466", + "name": "ultraSSDEnabled" + } + } + }, + { + "$id": "1467", + "kind": "property", + "name": "isHibernationEnabled", + "serializedName": "hibernationEnabled", + "doc": "The flag that enables or disables hibernation capability on the VM.", + "type": { + "$id": "1468", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.AdditionalCapabilities.hibernationEnabled", + "serializationOptions": { + "$id": "1469", + "json": { + "$id": "1470", + "name": "hibernationEnabled" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ComputeProfile.additionalVirtualMachineCapabilities", + "serializationOptions": { + "$id": "1471", + "json": { + "$id": "1472", + "name": "additionalVirtualMachineCapabilities" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.FleetProperties.computeProfile", + "serializationOptions": { + "$id": "1473", + "json": { + "$id": "1474", + "name": "computeProfile" + } + } + }, + { + "$id": "1475", + "kind": "property", + "name": "CreatedOn", + "serializedName": "timeCreated", + "doc": "Specifies the time at which the Compute Fleet is created.", + "type": { + "$id": "1476", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "1477", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.FleetProperties.timeCreated", + "serializationOptions": { + "$id": "1478", + "json": { + "$id": "1479", + "name": "timeCreated" + } + } + }, + { + "$id": "1480", + "kind": "property", + "name": "uniqueId", + "serializedName": "uniqueId", + "doc": "Specifies the ID which uniquely identifies a Compute Fleet.", + "type": { + "$id": "1481", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.FleetProperties.uniqueId", + "serializationOptions": { + "$id": "1482", + "json": { + "$id": "1483", + "name": "uniqueId" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.Fleet.properties", + "serializationOptions": { + "$id": "1484", + "json": { + "$id": "1485", + "name": "properties" + } + } + }, + { + "$id": "1486", + "kind": "path", + "name": "name", + "serializedName": "name", + "doc": "The name of the Compute Fleet", + "type": { + "$id": "1487", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.Fleet.name", + "discriminator": false, + "flatten": false + }, + { + "$id": "1488", + "kind": "property", + "name": "zones", + "serializedName": "zones", + "doc": "Zones in which the Compute Fleet is available", + "type": { + "$id": "1489", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1490", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.Fleet.zones", + "serializationOptions": { + "$id": "1491", + "json": { + "$id": "1492", + "name": "zones" + } + } + }, + { + "$id": "1493", + "kind": "property", + "name": "identity", + "serializedName": "identity", + "doc": "The managed service identities assigned to this resource.", + "type": { + "$id": "1494", + "kind": "model", + "name": "ManagedServiceIdentity", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Managed service identity (system assigned and/or user assigned identities)", + "decorators": [], + "properties": [ + { + "$id": "1495", + "kind": "property", + "name": "principalId", + "serializedName": "principalId", + "doc": "The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity.", + "type": { + "$id": "1496", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1497", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity.principalId", + "serializationOptions": { + "$id": "1498", + "json": { + "$id": "1499", + "name": "principalId" + } + } + }, + { + "$id": "1500", + "kind": "property", + "name": "tenantId", + "serializedName": "tenantId", + "doc": "The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity.", + "type": { + "$id": "1501", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1502", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity.tenantId", + "serializationOptions": { + "$id": "1503", + "json": { + "$id": "1504", + "name": "tenantId" + } + } + }, + { + "$id": "1505", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The type of managed identity assigned to this resource.", + "type": { + "$ref": "318" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity.type", + "serializationOptions": { + "$id": "1506", + "json": { + "$id": "1507", + "name": "type" + } + } + }, + { + "$id": "1508", + "kind": "property", + "name": "userAssignedIdentities", + "serializedName": "userAssignedIdentities", + "doc": "The identities assigned to this resource by the user.", + "type": { + "$id": "1509", + "kind": "dict", + "keyType": { + "$id": "1510", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1511", + "kind": "nullable", + "type": { + "$id": "1512", + "kind": "model", + "name": "UserAssignedIdentity", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.UserAssignedIdentity", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "User assigned identity properties", + "decorators": [], + "properties": [ + { + "$id": "1513", + "kind": "property", + "name": "clientId", + "serializedName": "clientId", + "doc": "The client ID of the assigned identity.", + "type": { + "$id": "1514", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1515", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.UserAssignedIdentity.clientId", + "serializationOptions": { + "$id": "1516", + "json": { + "$id": "1517", + "name": "clientId" + } + } + }, + { + "$id": "1518", + "kind": "property", + "name": "principalId", + "serializedName": "principalId", + "doc": "The principal ID of the assigned identity.", + "type": { + "$id": "1519", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1520", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.UserAssignedIdentity.principalId", + "serializationOptions": { + "$id": "1521", + "json": { + "$id": "1522", + "name": "principalId" + } + } + } + ] + }, + "namespace": "Azure.ResourceManager.ComputeFleet" + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity.userAssignedIdentities", + "serializationOptions": { + "$id": "1523", + "json": { + "$id": "1524", + "name": "userAssignedIdentities" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.Fleet.identity", + "serializationOptions": { + "$id": "1525", + "json": { + "$id": "1526", + "name": "identity" + } + } + }, + { + "$id": "1527", + "kind": "property", + "name": "plan", + "serializedName": "plan", + "doc": "Details of the resource plan.", + "type": { + "$id": "1528", + "kind": "model", + "name": "Plan", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Plan", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Plan for the resource.", + "decorators": [], + "properties": [ + { + "$id": "1529", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "A user defined name of the 3rd Party Artifact that is being procured.", + "type": { + "$id": "1530", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Plan.name", + "serializationOptions": { + "$id": "1531", + "json": { + "$id": "1532", + "name": "name" + } + } + }, + { + "$id": "1533", + "kind": "property", + "name": "publisher", + "serializedName": "publisher", + "doc": "The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic", + "type": { + "$id": "1534", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Plan.publisher", + "serializationOptions": { + "$id": "1535", + "json": { + "$id": "1536", + "name": "publisher" + } + } + }, + { + "$id": "1537", + "kind": "property", + "name": "product", + "serializedName": "product", + "doc": "The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID specified for the artifact at the time of Data Market onboarding.", + "type": { + "$id": "1538", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Plan.product", + "serializationOptions": { + "$id": "1539", + "json": { + "$id": "1540", + "name": "product" + } + } + }, + { + "$id": "1541", + "kind": "property", + "name": "promotionCode", + "serializedName": "promotionCode", + "doc": "A publisher provided promotion code as provisioned in Data Market for the said product/artifact.", + "type": { + "$id": "1542", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Plan.promotionCode", + "serializationOptions": { + "$id": "1543", + "json": { + "$id": "1544", + "name": "promotionCode" + } + } + }, + { + "$id": "1545", + "kind": "property", + "name": "version", + "serializedName": "version", + "doc": "The version of the desired product/artifact.", + "type": { + "$id": "1546", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Plan.version", + "serializationOptions": { + "$id": "1547", + "json": { + "$id": "1548", + "name": "version" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.Fleet.plan", + "serializationOptions": { + "$id": "1549", + "json": { + "$id": "1550", + "name": "plan" + } + } + } + ] + }, + { + "$ref": "485" + }, + { + "$ref": "490" + }, + { + "$ref": "516" + }, + { + "$ref": "532" + }, + { + "$ref": "544" + }, + { + "$ref": "546" + }, + { + "$ref": "558" + }, + { + "$ref": "634" + }, + { + "$ref": "637" + }, + { + "$ref": "644" + }, + { + "$ref": "646" + }, + { + "$ref": "664" + }, + { + "$ref": "679" + }, + { + "$ref": "698" + }, + { + "$ref": "710" + }, + { + "$ref": "723" + }, + { + "$ref": "726" + }, + { + "$ref": "745" + }, + { + "$ref": "751" + }, + { + "$ref": "754" + }, + { + "$ref": "772" + }, + { + "$ref": "780" + }, + { + "$ref": "800" + }, + { + "$ref": "802" + }, + { + "$ref": "812" + }, + { + "$ref": "836" + }, + { + "$ref": "838" + }, + { + "$ref": "875" + }, + { + "$ref": "891" + }, + { + "$ref": "908" + }, + { + "$ref": "921" + }, + { + "$ref": "926" + }, + { + "$ref": "935" + }, + { + "$ref": "953" + }, + { + "$ref": "998" + }, + { + "$ref": "1000" + }, + { + "$ref": "1010" + }, + { + "$ref": "1016" + }, + { + "$ref": "1037" + }, + { + "$ref": "1047" + }, + { + "$ref": "1053" + }, + { + "$ref": "1062" + }, + { + "$ref": "1068" + }, + { + "$ref": "1074" + }, + { + "$ref": "1086" + }, + { + "$ref": "1109" + }, + { + "$ref": "1166" + }, + { + "$ref": "1168" + }, + { + "$ref": "1187" + }, + { + "$ref": "1196" + }, + { + "$ref": "1213" + }, + { + "$ref": "1215" + }, + { + "$ref": "1229" + }, + { + "$ref": "1232" + }, + { + "$ref": "1247" + }, + { + "$ref": "1298" + }, + { + "$ref": "1323" + }, + { + "$ref": "1325" + }, + { + "$ref": "1337" + }, + { + "$ref": "1355" + }, + { + "$ref": "1362" + }, + { + "$ref": "1365" + }, + { + "$ref": "1396" + }, + { + "$ref": "1398" + }, + { + "$ref": "1412" + }, + { + "$ref": "1421" + }, + { + "$ref": "1449" + }, + { + "$ref": "1462" + }, + { + "$ref": "1494" + }, + { + "$ref": "1512" + }, + { + "$ref": "1528" + }, + { + "$ref": "430" + }, + { + "$ref": "431" + }, + { + "$ref": "447" + }, + { + "$id": "1551", + "kind": "model", + "name": "FleetUpdate", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.FleetUpdate", + "usage": "Input,Json", + "doc": "Fleet Update Model", + "decorators": [], + "properties": [ + { + "$id": "1552", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Resource tags.", + "type": { + "$id": "1553", + "kind": "dict", + "keyType": { + "$id": "1554", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1555", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.FleetUpdate.tags", + "serializationOptions": { + "$id": "1556", + "json": { + "$id": "1557", + "name": "tags" + } + } + }, + { + "$id": "1558", + "kind": "property", + "name": "identity", + "serializedName": "identity", + "doc": "Updatable managed service identity", + "type": { + "$id": "1559", + "kind": "model", + "name": "ManagedServiceIdentityUpdate", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ManagedServiceIdentityUpdate", + "usage": "Input,Json", + "doc": "The template for adding optional properties.", + "decorators": [], + "properties": [ + { + "$id": "1560", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The type of managed identity assigned to this resource.", + "type": { + "$ref": "318" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ManagedServiceIdentityUpdate.type", + "serializationOptions": { + "$id": "1561", + "json": { + "$id": "1562", + "name": "type" + } + } + }, + { + "$id": "1563", + "kind": "property", + "name": "userAssignedIdentities", + "serializedName": "userAssignedIdentities", + "doc": "The identities assigned to this resource by the user.", + "type": { + "$id": "1564", + "kind": "dict", + "keyType": { + "$id": "1565", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$ref": "1511" + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ManagedServiceIdentityUpdate.userAssignedIdentities", + "serializationOptions": { + "$id": "1566", + "json": { + "$id": "1567", + "name": "userAssignedIdentities" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.FleetUpdate.identity", + "serializationOptions": { + "$id": "1568", + "json": { + "$id": "1569", + "name": "identity" + } + } + }, + { + "$id": "1570", + "kind": "property", + "name": "plan", + "serializedName": "plan", + "doc": "Updatable resource plan", + "type": { + "$id": "1571", + "kind": "model", + "name": "ResourcePlanUpdate", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ResourcePlanUpdate", + "usage": "Input,Json", + "doc": "The template for adding optional properties.", + "decorators": [], + "properties": [ + { + "$id": "1572", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "A user defined name of the 3rd Party Artifact that is being procured.", + "type": { + "$id": "1573", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ResourcePlanUpdate.name", + "serializationOptions": { + "$id": "1574", + "json": { + "$id": "1575", + "name": "name" + } + } + }, + { + "$id": "1576", + "kind": "property", + "name": "publisher", + "serializedName": "publisher", + "doc": "The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic", + "type": { + "$id": "1577", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ResourcePlanUpdate.publisher", + "serializationOptions": { + "$id": "1578", + "json": { + "$id": "1579", + "name": "publisher" + } + } + }, + { + "$id": "1580", + "kind": "property", + "name": "product", + "serializedName": "product", + "doc": "The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID specified for the artifact at the time of Data Market onboarding.", + "type": { + "$id": "1581", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ResourcePlanUpdate.product", + "serializationOptions": { + "$id": "1582", + "json": { + "$id": "1583", + "name": "product" + } + } + }, + { + "$id": "1584", + "kind": "property", + "name": "promotionCode", + "serializedName": "promotionCode", + "doc": "A publisher provided promotion code as provisioned in Data Market for the said product/artifact.", + "type": { + "$id": "1585", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ResourcePlanUpdate.promotionCode", + "serializationOptions": { + "$id": "1586", + "json": { + "$id": "1587", + "name": "promotionCode" + } + } + }, + { + "$id": "1588", + "kind": "property", + "name": "version", + "serializedName": "version", + "doc": "The version of the desired product/artifact.", + "type": { + "$id": "1589", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ResourcePlanUpdate.version", + "serializationOptions": { + "$id": "1590", + "json": { + "$id": "1591", + "name": "version" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.FleetUpdate.plan", + "serializationOptions": { + "$id": "1592", + "json": { + "$id": "1593", + "name": "plan" + } + } + }, + { + "$id": "1594", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "RP-specific updatable properties", + "type": { + "$ref": "485" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.FleetUpdate.properties", + "serializationOptions": { + "$id": "1595", + "json": { + "$id": "1596", + "name": "properties" + } + } + } + ] + }, + { + "$ref": "1559" + }, + { + "$ref": "1571" + }, + { + "$id": "1597", + "kind": "model", + "name": "ArmOperationStatusResourceProvisioningState", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus", + "usage": "LroPolling", + "doc": "Standard Azure Resource Manager operation status response", + "decorators": [], + "properties": [ + { + "$id": "1598", + "kind": "property", + "name": "status", + "serializedName": "status", + "doc": "The operation status", + "type": { + "$ref": "338" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.status", + "serializationOptions": { + "$id": "1599", + "json": { + "$id": "1600", + "name": "status" + } + } + }, + { + "$id": "1601", + "kind": "path", + "name": "id", + "serializedName": "id", + "doc": "The unique identifier for the operationStatus resource", + "type": { + "$id": "1602", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.id", + "discriminator": false, + "flatten": false + }, + { + "$id": "1603", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the operationStatus resource", + "type": { + "$id": "1604", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.name", + "serializationOptions": { + "$id": "1605", + "json": { + "$id": "1606", + "name": "name" + } + } + }, + { + "$id": "1607", + "kind": "property", + "name": "startTime", + "serializedName": "startTime", + "doc": "Operation start time", + "type": { + "$id": "1608", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "1609", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.startTime", + "serializationOptions": { + "$id": "1610", + "json": { + "$id": "1611", + "name": "startTime" + } + } + }, + { + "$id": "1612", + "kind": "property", + "name": "endTime", + "serializedName": "endTime", + "doc": "Operation complete time", + "type": { + "$id": "1613", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "1614", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.endTime", + "serializationOptions": { + "$id": "1615", + "json": { + "$id": "1616", + "name": "endTime" + } + } + }, + { + "$id": "1617", + "kind": "property", + "name": "percentComplete", + "serializedName": "percentComplete", + "doc": "The progress made toward completing the operation", + "type": { + "$id": "1618", + "kind": "float64", + "name": "float64", + "crossLanguageDefinitionId": "TypeSpec.float64", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.percentComplete", + "serializationOptions": { + "$id": "1619", + "json": { + "$id": "1620", + "name": "percentComplete" + } + } + }, + { + "$id": "1621", + "kind": "property", + "name": "error", + "serializedName": "error", + "doc": "Errors that occurred if the operation ended with Canceled or Failed status", + "type": { + "$ref": "397" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.error", + "serializationOptions": { + "$id": "1622", + "json": { + "$id": "1623", + "name": "error" + } + } + } + ] + }, + { + "$id": "1624", + "kind": "model", + "name": "FleetListResult", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult", + "usage": "Output,Json", + "doc": "The response of a Fleet list operation.", + "decorators": [], + "properties": [ + { + "$id": "1625", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The Fleet items on this page", + "type": { + "$id": "1626", + "kind": "array", + "name": "ArrayFleet", + "valueType": { + "$ref": "429" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", + "serializationOptions": { + "$id": "1627", + "json": { + "$id": "1628", + "name": "value" + } + } + }, + { + "$id": "1629", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "1630", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "1631", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.nextLink", + "serializationOptions": { + "$id": "1632", + "json": { + "$id": "1633", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "1634", + "kind": "model", + "name": "VirtualMachineScaleSetListResult", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetListResult", + "usage": "Output,Json", + "doc": "The response of a VirtualMachineScaleSet list operation.", + "decorators": [], + "properties": [ + { + "$id": "1635", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The VirtualMachineScaleSet items on this page", + "type": { + "$id": "1636", + "kind": "array", + "name": "ArrayVirtualMachineScaleSet", + "valueType": { + "$id": "1637", + "kind": "model", + "name": "ComputeFleetVmss", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSet", + "usage": "Output,Json", + "doc": "An AzureFleet's virtualMachineScaleSet", + "decorators": [], + "properties": [ + { + "$id": "1638", + "kind": "path", + "name": "name", + "serializedName": "name", + "doc": "The name of the virtualMachineScaleSet", + "type": { + "$id": "1639", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSet.name", + "discriminator": false, + "flatten": false + }, + { + "$id": "1640", + "kind": "property", + "name": "id", + "serializedName": "id", + "doc": "The compute RP resource id of the virtualMachineScaleSet \n\"subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmssName}\"", + "type": { + "$id": "1641", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "1642", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSet.id", + "serializationOptions": { + "$id": "1643", + "json": { + "$id": "1644", + "name": "id" + } + } + }, + { + "$id": "1645", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "Type of the virtualMachineScaleSet", + "type": { + "$id": "1646", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSet.type", + "serializationOptions": { + "$id": "1647", + "json": { + "$id": "1648", + "name": "type" + } + } + }, + { + "$id": "1649", + "kind": "property", + "name": "operationStatus", + "serializedName": "operationStatus", + "doc": "This represents the operationStatus of the VMSS in response to the last operation that was performed on it by Azure Fleet resource.", + "type": { + "$ref": "14" + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSet.operationStatus", + "serializationOptions": { + "$id": "1650", + "json": { + "$id": "1651", + "name": "operationStatus" + } + } + }, + { + "$id": "1652", + "kind": "property", + "name": "error", + "serializedName": "error", + "doc": "Error Information when `operationStatus` is `Failed`", + "type": { + "$id": "1653", + "kind": "model", + "name": "ComputeFleetApiError", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ApiError", + "usage": "Output,Json", + "doc": "ApiError for Fleet", + "decorators": [], + "properties": [ + { + "$id": "1654", + "kind": "property", + "name": "code", + "serializedName": "code", + "doc": "The error code.", + "type": { + "$id": "1655", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ApiError.code", + "serializationOptions": { + "$id": "1656", + "json": { + "$id": "1657", + "name": "code" + } + } + }, + { + "$id": "1658", + "kind": "property", + "name": "target", + "serializedName": "target", + "doc": "The target of the particular error.", + "type": { + "$id": "1659", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ApiError.target", + "serializationOptions": { + "$id": "1660", + "json": { + "$id": "1661", + "name": "target" + } + } + }, + { + "$id": "1662", + "kind": "property", + "name": "message", + "serializedName": "message", + "doc": "The error message.", + "type": { + "$id": "1663", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ApiError.message", + "serializationOptions": { + "$id": "1664", + "json": { + "$id": "1665", + "name": "message" + } + } + }, + { + "$id": "1666", + "kind": "property", + "name": "details", + "serializedName": "details", + "doc": "The API error details", + "type": { + "$id": "1667", + "kind": "array", + "name": "ArrayApiErrorBase", + "valueType": { + "$id": "1668", + "kind": "model", + "name": "ComputeFleetApiErrorInfo", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ApiErrorBase", + "usage": "Output,Json", + "doc": "API error base.", + "decorators": [], + "properties": [ + { + "$id": "1669", + "kind": "property", + "name": "code", + "serializedName": "code", + "doc": "The error code.", + "type": { + "$id": "1670", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ApiErrorBase.code", + "serializationOptions": { + "$id": "1671", + "json": { + "$id": "1672", + "name": "code" + } + } + }, + { + "$id": "1673", + "kind": "property", + "name": "target", + "serializedName": "target", + "doc": "The target of the particular error.", + "type": { + "$id": "1674", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ApiErrorBase.target", + "serializationOptions": { + "$id": "1675", + "json": { + "$id": "1676", + "name": "target" + } + } + }, + { + "$id": "1677", + "kind": "property", + "name": "message", + "serializedName": "message", + "doc": "The error message.", + "type": { + "$id": "1678", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ApiErrorBase.message", + "serializationOptions": { + "$id": "1679", + "json": { + "$id": "1680", + "name": "message" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ApiError.details", + "serializationOptions": { + "$id": "1681", + "json": { + "$id": "1682", + "name": "details" + } + } + }, + { + "$id": "1683", + "kind": "property", + "name": "innererror", + "serializedName": "innererror", + "doc": "The API inner error", + "type": { + "$id": "1684", + "kind": "model", + "name": "ComputeFleetInnerError", + "namespace": "Azure.ResourceManager.ComputeFleet", + "crossLanguageDefinitionId": "Microsoft.AzureFleet.InnerError", + "usage": "Output,Json", + "doc": "Inner error details.", + "decorators": [], + "properties": [ + { + "$id": "1685", + "kind": "property", + "name": "exceptionType", + "serializedName": "exceptionType", + "doc": "The exception type.", + "type": { + "$id": "1686", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.InnerError.exceptionType", + "serializationOptions": { + "$id": "1687", + "json": { + "$id": "1688", + "name": "exceptionType" + } + } + }, + { + "$id": "1689", + "kind": "property", + "name": "errorDetail", + "serializedName": "errorDetail", + "doc": "The internal error message or exception dump.", + "type": { + "$id": "1690", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.InnerError.errorDetail", + "serializationOptions": { + "$id": "1691", + "json": { + "$id": "1692", + "name": "errorDetail" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.ApiError.innererror", + "serializationOptions": { + "$id": "1693", + "json": { + "$id": "1694", + "name": "innererror" + } + } + } + ] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSet.error", + "serializationOptions": { + "$id": "1695", + "json": { + "$id": "1696", + "name": "error" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetListResult.value", + "serializationOptions": { + "$id": "1697", + "json": { + "$id": "1698", + "name": "value" + } + } + }, + { + "$id": "1699", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "1700", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.VirtualMachineScaleSetListResult.nextLink", + "serializationOptions": { + "$id": "1701", + "json": { + "$id": "1702", + "name": "nextLink" + } + } + } + ] + }, + { + "$ref": "1637" + }, + { + "$ref": "1653" + }, + { + "$ref": "1668" + }, + { + "$ref": "1684" + } + ], + "clients": [ + { + "$id": "1703", + "kind": "client", + "name": "AzureFleetClient", + "namespace": "Azure.ResourceManager.ComputeFleet", + "methods": [], + "parameters": [ + { + "$id": "1704", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "1705", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "location": "Uri", + "isApiVersion": false, + "isContentType": false, + "isRequired": true, + "isEndpoint": true, + "skipUrlEncoding": false, + "explode": false, + "kind": "Client", + "defaultValue": { + "$id": "1706", + "type": { + "$id": "1707", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "1708", + "name": "TypeSpec.@service", + "arguments": { + "$id": "1709", + "options": { + "$id": "1710", + "title": "Microsoft.AzureFleet" + } + } + } + ], + "crossLanguageDefinitionId": "Microsoft.AzureFleet", + "apiVersions": [ + "2023-11-01-preview", + "2024-05-01-preview", + "2024-11-01" + ], + "children": [ + { + "$id": "1711", + "kind": "client", + "name": "Operations", + "namespace": "Azure.ResourceManager.ComputeFleet", + "methods": [ + { + "$id": "1712", + "kind": "paging", + "name": "list", + "accessibility": "internal", + "apiVersions": [ + "2023-11-01-preview", + "2024-05-01-preview", + "2024-11-01" + ], + "doc": "List the operations for the provider", + "operation": { + "$id": "1713", + "name": "list", + "resourceName": "Operations", + "doc": "List the operations for the provider", + "accessibility": "internal", + "parameters": [ + { + "$id": "1714", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1715", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1716", + "type": { + "$id": "1717", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-11-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1718", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1719", + "kind": "constant", + "valueType": { + "$id": "1720", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "1721", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "350" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/providers/Microsoft.AzureFleet/operations", + "bufferResponse": true, + "paging": { + "$id": "1722", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "1723", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Azure.ResourceManager.Operations.list", + "decorators": [], + "examples": [ + { + "$id": "1724", + "kind": "http", + "name": "Operations_List", + "description": "Operations_List", + "filePath": "2024-11-01/Operations_List.json", + "parameters": [ + { + "$id": "1725", + "parameter": { + "$ref": "1714" + }, + "value": { + "$id": "1726", + "kind": "string", + "type": { + "$ref": "1715" + }, + "value": "2024-11-01" + } + } + ], + "responses": [ + { + "$id": "1727", + "response": { + "$ref": "1721" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1728", + "kind": "model", + "type": { + "$ref": "350" + }, + "value": { + "$id": "1729", + "value": { + "$id": "1730", + "kind": "array", + "type": { + "$ref": "352" + }, + "value": [ + { + "$id": "1731", + "kind": "model", + "type": { + "$ref": "353" + }, + "value": { + "$id": "1732", + "origin": { + "$id": "1733", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "user,system" + }, + "name": { + "$id": "1734", + "kind": "string", + "type": { + "$ref": "355" + }, + "value": "Microsoft.AzureFleet/fleets/read" + }, + "isDataAction": { + "$id": "1735", + "kind": "boolean", + "type": { + "$ref": "359" + }, + "value": false + }, + "display": { + "$id": "1736", + "kind": "model", + "type": { + "$ref": "363" + }, + "value": { + "$id": "1737", + "provider": { + "$id": "1738", + "kind": "string", + "type": { + "$ref": "365" + }, + "value": "Microsoft Azure Fleet" + }, + "resource": { + "$id": "1739", + "kind": "string", + "type": { + "$ref": "369" + }, + "value": "Fleets" + }, + "operation": { + "$id": "1740", + "kind": "string", + "type": { + "$ref": "373" + }, + "value": "Get Azure Fleet" + }, + "description": { + "$id": "1741", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "Get properties of Azure Fleet resource" + } + } + } + } + }, + { + "$id": "1742", + "kind": "model", + "type": { + "$ref": "353" + }, + "value": { + "$id": "1743", + "origin": { + "$id": "1744", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "user,system" + }, + "name": { + "$id": "1745", + "kind": "string", + "type": { + "$ref": "355" + }, + "value": "Microsoft.AzureFleet/fleets/write" + }, + "isDataAction": { + "$id": "1746", + "kind": "boolean", + "type": { + "$ref": "359" + }, + "value": false + }, + "display": { + "$id": "1747", + "kind": "model", + "type": { + "$ref": "363" + }, + "value": { + "$id": "1748", + "provider": { + "$id": "1749", + "kind": "string", + "type": { + "$ref": "365" + }, + "value": "Microsoft Azure Fleet" + }, + "resource": { + "$id": "1750", + "kind": "string", + "type": { + "$ref": "369" + }, + "value": "Fleets" + }, + "operation": { + "$id": "1751", + "kind": "string", + "type": { + "$ref": "373" + }, + "value": "Create or Update Azure Fleet" + }, + "description": { + "$id": "1752", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "Creates a new Azure Fleet resource or updates an existing one" + } + } + } + } + }, + { + "$id": "1753", + "kind": "model", + "type": { + "$ref": "353" + }, + "value": { + "$id": "1754", + "origin": { + "$id": "1755", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "user,system" + }, + "name": { + "$id": "1756", + "kind": "string", + "type": { + "$ref": "355" + }, + "value": "Microsoft.AzureFleet/fleets/delete" + }, + "isDataAction": { + "$id": "1757", + "kind": "boolean", + "type": { + "$ref": "359" + }, + "value": false + }, + "display": { + "$id": "1758", + "kind": "model", + "type": { + "$ref": "363" + }, + "value": { + "$id": "1759", + "provider": { + "$id": "1760", + "kind": "string", + "type": { + "$ref": "365" + }, + "value": "Microsoft Azure Fleet" + }, + "resource": { + "$id": "1761", + "kind": "string", + "type": { + "$ref": "369" + }, + "value": "Fleets" + }, + "operation": { + "$id": "1762", + "kind": "string", + "type": { + "$ref": "373" + }, + "value": "Delete Virtual Machine and Virtual Machine scale sets in a Azure Fleet resource" + }, + "description": { + "$id": "1763", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "Deletes all compute resources of Azure Fleet resource" + } + } + } + } + }, + { + "$id": "1764", + "kind": "model", + "type": { + "$ref": "353" + }, + "value": { + "$id": "1765", + "origin": { + "$id": "1766", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "user,system" + }, + "name": { + "$id": "1767", + "kind": "string", + "type": { + "$ref": "355" + }, + "value": "Microsoft.AzureFleet/register/action" + }, + "isDataAction": { + "$id": "1768", + "kind": "boolean", + "type": { + "$ref": "359" + }, + "value": false + }, + "display": { + "$id": "1769", + "kind": "model", + "type": { + "$ref": "363" + }, + "value": { + "$id": "1770", + "provider": { + "$id": "1771", + "kind": "string", + "type": { + "$ref": "365" + }, + "value": "Microsoft Azure Fleet" + }, + "resource": { + "$id": "1772", + "kind": "string", + "type": { + "$ref": "369" + }, + "value": "Subscription" + }, + "operation": { + "$id": "1773", + "kind": "string", + "type": { + "$ref": "373" + }, + "value": "Register subscription for Microsoft.AzureFleet" + }, + "description": { + "$id": "1774", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "Registers Subscription with Microsoft.AzureFleet resource provider" + } + } + } + } + }, + { + "$id": "1775", + "kind": "model", + "type": { + "$ref": "353" + }, + "value": { + "$id": "1776", + "origin": { + "$id": "1777", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "user,system" + }, + "name": { + "$id": "1778", + "kind": "string", + "type": { + "$ref": "355" + }, + "value": "Microsoft.AzureFleet/unregister/action" + }, + "isDataAction": { + "$id": "1779", + "kind": "boolean", + "type": { + "$ref": "359" + }, + "value": false + }, + "display": { + "$id": "1780", + "kind": "model", + "type": { + "$ref": "363" + }, + "value": { + "$id": "1781", + "provider": { + "$id": "1782", + "kind": "string", + "type": { + "$ref": "365" + }, + "value": "Microsoft Azure Fleet" + }, + "resource": { + "$id": "1783", + "kind": "string", + "type": { + "$ref": "369" + }, + "value": "Subscription" + }, + "operation": { + "$id": "1784", + "kind": "string", + "type": { + "$ref": "373" + }, + "value": "Unregister Subscription for Microsoft.AzureFleet" + }, + "description": { + "$id": "1785", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "Unregisters Subscription with Microsoft.AzureFleet resource provider" + } + } + } + } + } + ] + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "1786", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "1719" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "1787", + "type": { + "$id": "1788", + "kind": "array", + "name": "ArrayOperation", + "valueType": { + "$ref": "353" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "resultSegments": [ + "value" + ] + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Azure.ResourceManager.Operations.list" + } + ], + "parameters": [ + { + "$id": "1789", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "1790", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "location": "Uri", + "isApiVersion": false, + "isContentType": false, + "isRequired": true, + "isEndpoint": true, + "skipUrlEncoding": false, + "explode": false, + "kind": "Client", + "defaultValue": { + "$id": "1791", + "type": { + "$id": "1792", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.Operations", + "apiVersions": [ + "2023-11-01-preview", + "2024-05-01-preview", + "2024-11-01" + ], + "parent": { + "$ref": "1703" + } + }, + { + "$id": "1793", + "kind": "client", + "name": "Fleets", + "namespace": "Azure.ResourceManager.ComputeFleet", + "methods": [ + { + "$id": "1794", + "kind": "basic", + "name": "get", + "accessibility": "public", + "apiVersions": [ + "2023-11-01-preview", + "2024-05-01-preview", + "2024-11-01" + ], + "doc": "Get a Fleet", + "operation": { + "$id": "1795", + "name": "get", + "resourceName": "Fleet", + "doc": "Get a Fleet", + "accessibility": "public", + "parameters": [ + { + "$id": "1796", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1797", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1798", + "type": { + "$id": "1799", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-11-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1800", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1801", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1802", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1803", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1804", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1805", + "name": "fleetName", + "nameInRequest": "fleetName", + "doc": "The name of the Compute Fleet", + "type": { + "$id": "1806", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1807", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1808", + "kind": "constant", + "valueType": { + "$id": "1809", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "1810", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "429" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureFleet/fleets/{fleetName}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.AzureFleet.Fleets.get", + "decorators": [], + "examples": [ + { + "$id": "1811", + "kind": "http", + "name": "Fleets_Get", + "description": "Fleets_Get", + "filePath": "2024-11-01/Fleets_Get.json", + "parameters": [ + { + "$id": "1812", + "parameter": { + "$ref": "1796" + }, + "value": { + "$id": "1813", + "kind": "string", + "type": { + "$ref": "1797" + }, + "value": "2024-11-01" + } + }, + { + "$id": "1814", + "parameter": { + "$ref": "1800" + }, + "value": { + "$id": "1815", + "kind": "string", + "type": { + "$ref": "1801" + }, + "value": "1DC2F28C-A625-4B0E-9748-9885A3C9E9EB" + } + }, + { + "$id": "1816", + "parameter": { + "$ref": "1803" + }, + "value": { + "$id": "1817", + "kind": "string", + "type": { + "$ref": "1804" + }, + "value": "rgazurefleet" + } + }, + { + "$id": "1818", + "parameter": { + "$ref": "1805" + }, + "value": { + "$id": "1819", + "kind": "string", + "type": { + "$ref": "1806" + }, + "value": "testFleet" + } + } + ], + "responses": [ + { + "$id": "1820", + "response": { + "$ref": "1810" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1821", + "kind": "model", + "type": { + "$ref": "429" + }, + "value": { + "$id": "1822", + "properties": { + "$id": "1823", + "kind": "model", + "type": { + "$ref": "485" + }, + "value": { + "$id": "1824", + "provisioningState": { + "$id": "1825", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Creating" + }, + "spotPriorityProfile": { + "$id": "1826", + "kind": "model", + "type": { + "$ref": "490" + }, + "value": { + "$id": "1827", + "capacity": { + "$id": "1828", + "kind": "number", + "type": { + "$ref": "492" + }, + "value": 20 + }, + "minCapacity": { + "$id": "1829", + "kind": "number", + "type": { + "$ref": "496" + }, + "value": 10 + }, + "maxPricePerVM": { + "$id": "1830", + "kind": "number", + "type": { + "$ref": "500" + }, + "value": 0.00865 + }, + "evictionPolicy": { + "$id": "1831", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "Delete" + }, + "allocationStrategy": { + "$id": "1832", + "kind": "string", + "type": { + "$ref": "36" + }, + "value": "PriceCapacityOptimized" + }, + "maintain": { + "$id": "1833", + "kind": "boolean", + "type": { + "$ref": "510" + }, + "value": true + } + } + }, + "regularPriorityProfile": { + "$id": "1834", + "kind": "model", + "type": { + "$ref": "516" + }, + "value": { + "$id": "1835", + "capacity": { + "$id": "1836", + "kind": "number", + "type": { + "$ref": "518" + }, + "value": 20 + }, + "minCapacity": { + "$id": "1837", + "kind": "number", + "type": { + "$ref": "522" + }, + "value": 10 + }, + "allocationStrategy": { + "$id": "1838", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "LowestPrice" + } + } + }, + "vmSizesProfile": { + "$id": "1839", + "kind": "array", + "type": { + "$ref": "531" + }, + "value": [ + { + "$id": "1840", + "kind": "model", + "type": { + "$ref": "532" + }, + "value": { + "$id": "1841", + "name": { + "$id": "1842", + "kind": "string", + "type": { + "$ref": "534" + }, + "value": "Standard_d1_v2" + }, + "rank": { + "$id": "1843", + "kind": "number", + "type": { + "$ref": "538" + }, + "value": 19225 + } + } + } + ] + }, + "computeProfile": { + "$id": "1844", + "kind": "model", + "type": { + "$ref": "1449" + }, + "value": { + "$id": "1845", + "baseVirtualMachineProfile": { + "$id": "1846", + "kind": "model", + "type": { + "$ref": "644" + }, + "value": { + "$id": "1847", + "osProfile": { + "$id": "1848", + "kind": "model", + "type": { + "$ref": "646" + }, + "value": { + "$id": "1849", + "computerNamePrefix": { + "$id": "1850", + "kind": "string", + "type": { + "$ref": "648" + }, + "value": "o" + }, + "adminUsername": { + "$id": "1851", + "kind": "string", + "type": { + "$ref": "652" + }, + "value": "nrgzqciiaaxjrqldbmjbqkyhntp" + }, + "windowsConfiguration": { + "$id": "1852", + "kind": "model", + "type": { + "$ref": "664" + }, + "value": { + "$id": "1853", + "provisionVMAgent": { + "$id": "1854", + "kind": "boolean", + "type": { + "$ref": "666" + }, + "value": true + }, + "enableAutomaticUpdates": { + "$id": "1855", + "kind": "boolean", + "type": { + "$ref": "670" + }, + "value": true + }, + "timeZone": { + "$id": "1856", + "kind": "string", + "type": { + "$ref": "674" + }, + "value": "hlyjiqcfksgrpjrct" + }, + "additionalUnattendContent": { + "$id": "1857", + "kind": "array", + "type": { + "$ref": "678" + }, + "value": [ + { + "$id": "1858", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "1859", + "passName": { + "$id": "1860", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "OobeSystem" + }, + "componentName": { + "$id": "1861", + "kind": "string", + "type": { + "$ref": "685" + }, + "value": "Microsoft-Windows-Shell-Setup" + }, + "settingName": { + "$id": "1862", + "kind": "string", + "type": { + "$ref": "116" + }, + "value": "AutoLogon" + } + } + } + ] + }, + "patchSettings": { + "$id": "1863", + "kind": "model", + "type": { + "$ref": "698" + }, + "value": { + "$id": "1864", + "patchMode": { + "$id": "1865", + "kind": "string", + "type": { + "$ref": "122" + }, + "value": "Manual" + }, + "enableHotpatching": { + "$id": "1866", + "kind": "boolean", + "type": { + "$ref": "703" + }, + "value": true + }, + "assessmentMode": { + "$id": "1867", + "kind": "string", + "type": { + "$ref": "130" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "1868", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "1869", + "rebootSetting": { + "$id": "1870", + "kind": "string", + "type": { + "$ref": "136" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "1871", + "kind": "boolean", + "type": { + "$ref": "715" + }, + "value": true + } + } + } + } + }, + "winRM": { + "$id": "1872", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "1873", + "listeners": { + "$id": "1874", + "kind": "array", + "type": { + "$ref": "725" + }, + "value": [ + { + "$id": "1875", + "kind": "model", + "type": { + "$ref": "726" + }, + "value": { + "$id": "1876", + "protocol": { + "$id": "1877", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "Http" + }, + "certificateUrl": { + "$id": "1878", + "kind": "string", + "type": { + "$ref": "731" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + } + } + } + ] + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "1879", + "kind": "boolean", + "type": { + "$ref": "739" + }, + "value": true + } + } + }, + "linuxConfiguration": { + "$id": "1880", + "kind": "model", + "type": { + "$ref": "745" + }, + "value": { + "$id": "1881", + "disablePasswordAuthentication": { + "$id": "1882", + "kind": "boolean", + "type": { + "$ref": "747" + }, + "value": true + }, + "ssh": { + "$id": "1883", + "kind": "model", + "type": { + "$ref": "751" + }, + "value": { + "$id": "1884", + "publicKeys": { + "$id": "1885", + "kind": "array", + "type": { + "$ref": "753" + }, + "value": [ + { + "$id": "1886", + "kind": "model", + "type": { + "$ref": "754" + }, + "value": { + "$id": "1887", + "path": { + "$id": "1888", + "kind": "string", + "type": { + "$ref": "756" + }, + "value": "kmqz" + }, + "keyData": { + "$id": "1889", + "kind": "string", + "type": { + "$ref": "760" + }, + "value": "kivgsubusvpprwqaqpjcmhsv" + } + } + } + ] + } + } + }, + "provisionVMAgent": { + "$id": "1890", + "kind": "boolean", + "type": { + "$ref": "768" + }, + "value": true + }, + "patchSettings": { + "$id": "1891", + "kind": "model", + "type": { + "$ref": "772" + }, + "value": { + "$id": "1892", + "patchMode": { + "$id": "1893", + "kind": "string", + "type": { + "$ref": "152" + }, + "value": "ImageDefault" + }, + "assessmentMode": { + "$id": "1894", + "kind": "string", + "type": { + "$ref": "158" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "1895", + "kind": "model", + "type": { + "$ref": "780" + }, + "value": { + "$id": "1896", + "rebootSetting": { + "$id": "1897", + "kind": "string", + "type": { + "$ref": "164" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "1898", + "kind": "boolean", + "type": { + "$ref": "785" + }, + "value": true + } + } + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "1899", + "kind": "boolean", + "type": { + "$ref": "793" + }, + "value": true + } + } + }, + "secrets": { + "$id": "1900", + "kind": "array", + "type": { + "$ref": "799" + }, + "value": [ + { + "$id": "1901", + "kind": "model", + "type": { + "$ref": "800" + }, + "value": { + "$id": "1902", + "sourceVault": { + "$id": "1903", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "1904", + "id": { + "$id": "1905", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + }, + "vaultCertificates": { + "$id": "1906", + "kind": "array", + "type": { + "$ref": "811" + }, + "value": [ + { + "$id": "1907", + "kind": "model", + "type": { + "$ref": "812" + }, + "value": { + "$id": "1908", + "certificateUrl": { + "$id": "1909", + "kind": "string", + "type": { + "$ref": "814" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + }, + "certificateStore": { + "$id": "1910", + "kind": "string", + "type": { + "$ref": "818" + }, + "value": "nlxrwavpzhueffxsshlun" + } + } + } + ] + } + } + } + ] + }, + "allowExtensionOperations": { + "$id": "1911", + "kind": "boolean", + "type": { + "$ref": "826" + }, + "value": true + }, + "requireGuestProvisionSignal": { + "$id": "1912", + "kind": "boolean", + "type": { + "$ref": "830" + }, + "value": true + } + } + }, + "storageProfile": { + "$id": "1913", + "kind": "model", + "type": { + "$ref": "836" + }, + "value": { + "$id": "1914", + "imageReference": { + "$id": "1915", + "kind": "model", + "type": { + "$ref": "838" + }, + "value": { + "$id": "1916", + "publisher": { + "$id": "1917", + "kind": "string", + "type": { + "$ref": "845" + }, + "value": "mqxgwbiyjzmxavhbkd" + }, + "offer": { + "$id": "1918", + "kind": "string", + "type": { + "$ref": "849" + }, + "value": "isxgumkarlkomp" + }, + "sku": { + "$id": "1919", + "kind": "string", + "type": { + "$ref": "853" + }, + "value": "eojmppqcrnpmxirtp" + }, + "version": { + "$id": "1920", + "kind": "string", + "type": { + "$ref": "857" + }, + "value": "wvpcqefgtmqdgltiuz" + }, + "exactVersion": { + "$id": "1921", + "kind": "string", + "type": { + "$ref": "861" + }, + "value": "zjbntmiskjexlr" + }, + "sharedGalleryImageId": { + "$id": "1922", + "kind": "string", + "type": { + "$ref": "865" + }, + "value": "kmkgihoxwlawuuhcinfirktdwkmx" + }, + "communityGalleryImageId": { + "$id": "1923", + "kind": "string", + "type": { + "$ref": "869" + }, + "value": "vlqe" + }, + "id": { + "$id": "1924", + "kind": "string", + "type": { + "$ref": "840" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}/versions/{versionName}" + } + } + }, + "osDisk": { + "$id": "1925", + "kind": "model", + "type": { + "$ref": "875" + }, + "value": { + "$id": "1926", + "name": { + "$id": "1927", + "kind": "string", + "type": { + "$ref": "877" + }, + "value": "wfttw" + }, + "caching": { + "$id": "1928", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "1929", + "kind": "boolean", + "type": { + "$ref": "884" + }, + "value": true + }, + "createOption": { + "$id": "1930", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "FromImage" + }, + "diffDiskSettings": { + "$id": "1931", + "kind": "model", + "type": { + "$ref": "891" + }, + "value": { + "$id": "1932", + "option": { + "$id": "1933", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "Local" + }, + "placement": { + "$id": "1934", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "CacheDisk" + } + } + }, + "diskSizeGB": { + "$id": "1935", + "kind": "number", + "type": { + "$ref": "901" + }, + "value": 14 + }, + "osType": { + "$id": "1936", + "kind": "string", + "type": { + "$ref": "206" + }, + "value": "Windows" + }, + "image": { + "$id": "1937", + "kind": "model", + "type": { + "$ref": "908" + }, + "value": { + "$id": "1938", + "uri": { + "$id": "1939", + "kind": "string", + "type": { + "$ref": "910" + }, + "value": "https://myStorageAccountName.blob.core.windows.net/myContainerName/myVhdName.vhd" + } + } + }, + "vhdContainers": { + "$id": "1940", + "kind": "array", + "type": { + "$ref": "916" + }, + "value": [ + { + "$id": "1941", + "kind": "string", + "type": { + "$ref": "917" + }, + "value": "tkzcwddtinkfpnfklatw" + } + ] + }, + "managedDisk": { + "$id": "1942", + "kind": "model", + "type": { + "$ref": "921" + }, + "value": { + "$id": "1943", + "storageAccountType": { + "$id": "1944", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "1945", + "kind": "model", + "type": { + "$ref": "926" + }, + "value": { + "$id": "1946", + "id": { + "$id": "1947", + "kind": "string", + "type": { + "$ref": "928" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "1948", + "kind": "model", + "type": { + "$ref": "935" + }, + "value": { + "$id": "1949", + "securityEncryptionType": { + "$id": "1950", + "kind": "string", + "type": { + "$ref": "228" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "1951", + "kind": "model", + "type": { + "$ref": "926" + }, + "value": { + "$id": "1952", + "id": { + "$id": "1953", + "kind": "string", + "type": { + "$ref": "928" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "deleteOption": { + "$id": "1954", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "Delete" + } + } + }, + "dataDisks": { + "$id": "1955", + "kind": "array", + "type": { + "$ref": "952" + }, + "value": [ + { + "$id": "1956", + "kind": "model", + "type": { + "$ref": "953" + }, + "value": { + "$id": "1957", + "name": { + "$id": "1958", + "kind": "string", + "type": { + "$ref": "955" + }, + "value": "eogiykmdmeikswxmigjws" + }, + "lun": { + "$id": "1959", + "kind": "number", + "type": { + "$ref": "959" + }, + "value": 14 + }, + "caching": { + "$id": "1960", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "1961", + "kind": "boolean", + "type": { + "$ref": "966" + }, + "value": true + }, + "createOption": { + "$id": "1962", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "FromImage" + }, + "diskSizeGB": { + "$id": "1963", + "kind": "number", + "type": { + "$ref": "973" + }, + "value": 6 + }, + "managedDisk": { + "$id": "1964", + "kind": "model", + "type": { + "$ref": "921" + }, + "value": { + "$id": "1965", + "storageAccountType": { + "$id": "1966", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "1967", + "kind": "model", + "type": { + "$ref": "926" + }, + "value": { + "$id": "1968", + "id": { + "$id": "1969", + "kind": "string", + "type": { + "$ref": "928" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "1970", + "kind": "model", + "type": { + "$ref": "935" + }, + "value": { + "$id": "1971", + "securityEncryptionType": { + "$id": "1972", + "kind": "string", + "type": { + "$ref": "228" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "1973", + "kind": "model", + "type": { + "$ref": "926" + }, + "value": { + "$id": "1974", + "id": { + "$id": "1975", + "kind": "string", + "type": { + "$ref": "928" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "diskIOPSReadWrite": { + "$id": "1976", + "kind": "number", + "type": { + "$ref": "980" + }, + "value": 27 + }, + "diskMBpsReadWrite": { + "$id": "1977", + "kind": "number", + "type": { + "$ref": "984" + }, + "value": 2 + }, + "deleteOption": { + "$id": "1978", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "Delete" + } + } + } + ] + }, + "diskControllerType": { + "$id": "1979", + "kind": "string", + "type": { + "$ref": "242" + }, + "value": "uzb" + } + } + }, + "networkProfile": { + "$id": "1980", + "kind": "model", + "type": { + "$ref": "998" + }, + "value": { + "$id": "1981", + "healthProbe": { + "$id": "1982", + "kind": "model", + "type": { + "$ref": "1000" + }, + "value": { + "$id": "1983", + "id": { + "$id": "1984", + "kind": "string", + "type": { + "$ref": "1002" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}" + } + } + }, + "networkInterfaceConfigurations": { + "$id": "1985", + "kind": "array", + "type": { + "$ref": "1009" + }, + "value": [ + { + "$id": "1986", + "kind": "model", + "type": { + "$ref": "1010" + }, + "value": { + "$id": "1987", + "name": { + "$id": "1988", + "kind": "string", + "type": { + "$ref": "1012" + }, + "value": "i" + }, + "properties": { + "$id": "1989", + "kind": "model", + "type": { + "$ref": "1016" + }, + "value": { + "$id": "1990", + "primary": { + "$id": "1991", + "kind": "boolean", + "type": { + "$ref": "1018" + }, + "value": true + }, + "enableAcceleratedNetworking": { + "$id": "1992", + "kind": "boolean", + "type": { + "$ref": "1022" + }, + "value": true + }, + "disableTcpStateTracking": { + "$id": "1993", + "kind": "boolean", + "type": { + "$ref": "1026" + }, + "value": true + }, + "enableFpga": { + "$id": "1994", + "kind": "boolean", + "type": { + "$ref": "1030" + }, + "value": true + }, + "networkSecurityGroup": { + "$id": "1995", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "1996", + "id": { + "$id": "1997", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}" + } + } + }, + "dnsSettings": { + "$id": "1998", + "kind": "model", + "type": { + "$ref": "1037" + }, + "value": { + "$id": "1999", + "dnsServers": { + "$id": "2000", + "kind": "array", + "type": { + "$ref": "1039" + }, + "value": [ + { + "$id": "2001", + "kind": "string", + "type": { + "$ref": "1040" + }, + "value": "nxmmfolhclsesu" + } + ] + } + } + }, + "ipConfigurations": { + "$id": "2002", + "kind": "array", + "type": { + "$ref": "1046" + }, + "value": [ + { + "$id": "2003", + "kind": "model", + "type": { + "$ref": "1047" + }, + "value": { + "$id": "2004", + "name": { + "$id": "2005", + "kind": "string", + "type": { + "$ref": "1049" + }, + "value": "oezqhkidfhyywlfzwuotilrpbqnjg" + }, + "properties": { + "$id": "2006", + "kind": "model", + "type": { + "$ref": "1053" + }, + "value": { + "$id": "2007", + "subnet": { + "$id": "2008", + "kind": "model", + "type": { + "$ref": "1000" + }, + "value": { + "$id": "2009", + "id": { + "$id": "2010", + "kind": "string", + "type": { + "$ref": "1002" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}" + } + } + }, + "primary": { + "$id": "2011", + "kind": "boolean", + "type": { + "$ref": "1058" + }, + "value": true + }, + "publicIPAddressConfiguration": { + "$id": "2012", + "kind": "model", + "type": { + "$ref": "1062" + }, + "value": { + "$id": "2013", + "name": { + "$id": "2014", + "kind": "string", + "type": { + "$ref": "1064" + }, + "value": "fvpqf" + }, + "properties": { + "$id": "2015", + "kind": "model", + "type": { + "$ref": "1068" + }, + "value": { + "$id": "2016", + "idleTimeoutInMinutes": { + "$id": "2017", + "kind": "number", + "type": { + "$ref": "1070" + }, + "value": 9 + }, + "dnsSettings": { + "$id": "2018", + "kind": "model", + "type": { + "$ref": "1074" + }, + "value": { + "$id": "2019", + "domainNameLabel": { + "$id": "2020", + "kind": "string", + "type": { + "$ref": "1076" + }, + "value": "ukrddzvmorpmfsczjwtbvp" + }, + "domainNameLabelScope": { + "$id": "2021", + "kind": "string", + "type": { + "$ref": "248" + }, + "value": "TenantReuse" + } + } + }, + "ipTags": { + "$id": "2022", + "kind": "array", + "type": { + "$ref": "1085" + }, + "value": [ + { + "$id": "2023", + "kind": "model", + "type": { + "$ref": "1086" + }, + "value": { + "$id": "2024", + "ipTagType": { + "$id": "2025", + "kind": "string", + "type": { + "$ref": "1088" + }, + "value": "sddgsoemnzgqizale" + }, + "tag": { + "$id": "2026", + "kind": "string", + "type": { + "$ref": "1092" + }, + "value": "wufmhrjsakbiaetyara" + } + } + } + ] + }, + "publicIPPrefix": { + "$id": "2027", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "2028", + "id": { + "$id": "2029", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}" + } + } + }, + "publicIPAddressVersion": { + "$id": "2030", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "IPv4" + }, + "deleteOption": { + "$id": "2031", + "kind": "string", + "type": { + "$ref": "264" + }, + "value": "Delete" + } + } + }, + "sku": { + "$id": "2032", + "kind": "model", + "type": { + "$ref": "1109" + }, + "value": { + "$id": "2033", + "name": { + "$id": "2034", + "kind": "string", + "type": { + "$ref": "270" + }, + "value": "Basic" + }, + "tier": { + "$id": "2035", + "kind": "string", + "type": { + "$ref": "276" + }, + "value": "Regional" + } + } + } + } + }, + "privateIPAddressVersion": { + "$id": "2036", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "IPv4" + }, + "applicationGatewayBackendAddressPools": { + "$id": "2037", + "kind": "array", + "type": { + "$ref": "1124" + }, + "value": [ + { + "$id": "2038", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "2039", + "id": { + "$id": "2040", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "applicationSecurityGroups": { + "$id": "2041", + "kind": "array", + "type": { + "$ref": "1128" + }, + "value": [ + { + "$id": "2042", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "2043", + "id": { + "$id": "2044", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}" + } + } + } + ] + }, + "loadBalancerBackendAddressPools": { + "$id": "2045", + "kind": "array", + "type": { + "$ref": "1132" + }, + "value": [ + { + "$id": "2046", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "2047", + "id": { + "$id": "2048", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "loadBalancerInboundNatPools": { + "$id": "2049", + "kind": "array", + "type": { + "$ref": "1136" + }, + "value": [ + { + "$id": "2050", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "2051", + "id": { + "$id": "2052", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatPools/{inboundNatPoolName}" + } + } + } + ] + } + } + } + } + } + ] + }, + "enableIPForwarding": { + "$id": "2053", + "kind": "boolean", + "type": { + "$ref": "1144" + }, + "value": true + }, + "deleteOption": { + "$id": "2054", + "kind": "string", + "type": { + "$ref": "264" + }, + "value": "Delete" + }, + "auxiliaryMode": { + "$id": "2055", + "kind": "string", + "type": { + "$ref": "282" + }, + "value": "None" + }, + "auxiliarySku": { + "$id": "2056", + "kind": "string", + "type": { + "$ref": "290" + }, + "value": "None" + } + } + } + } + } + ] + }, + "networkApiVersion": { + "$id": "2057", + "kind": "string", + "type": { + "$ref": "302" + }, + "value": "2020-11-01" + } + } + }, + "securityProfile": { + "$id": "2058", + "kind": "model", + "type": { + "$ref": "1166" + }, + "value": { + "$id": "2059", + "uefiSettings": { + "$id": "2060", + "kind": "model", + "type": { + "$ref": "1168" + }, + "value": { + "$id": "2061", + "secureBootEnabled": { + "$id": "2062", + "kind": "boolean", + "type": { + "$ref": "1170" + }, + "value": true + }, + "vTpmEnabled": { + "$id": "2063", + "kind": "boolean", + "type": { + "$ref": "1174" + }, + "value": true + } + } + }, + "encryptionAtHost": { + "$id": "2064", + "kind": "boolean", + "type": { + "$ref": "1180" + }, + "value": true + }, + "securityType": { + "$id": "2065", + "kind": "string", + "type": { + "$ref": "306" + }, + "value": "TrustedLaunch" + }, + "encryptionIdentity": { + "$id": "2066", + "kind": "model", + "type": { + "$ref": "1187" + }, + "value": { + "$id": "2067", + "userAssignedIdentityResourceId": { + "$id": "2068", + "kind": "string", + "type": { + "$ref": "1189" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{userAssignedIdentityName}" + } + } + }, + "proxyAgentSettings": { + "$id": "2069", + "kind": "model", + "type": { + "$ref": "1196" + }, + "value": { + "$id": "2070", + "enabled": { + "$id": "2071", + "kind": "boolean", + "type": { + "$ref": "1198" + }, + "value": true + }, + "mode": { + "$id": "2072", + "kind": "string", + "type": { + "$ref": "312" + }, + "value": "Audit" + }, + "keyIncarnationId": { + "$id": "2073", + "kind": "number", + "type": { + "$ref": "1205" + }, + "value": 20 + } + } + } + } + }, + "diagnosticsProfile": { + "$id": "2074", + "kind": "model", + "type": { + "$ref": "1213" + }, + "value": { + "$id": "2075", + "bootDiagnostics": { + "$id": "2076", + "kind": "model", + "type": { + "$ref": "1215" + }, + "value": { + "$id": "2077", + "enabled": { + "$id": "2078", + "kind": "boolean", + "type": { + "$ref": "1217" + }, + "value": true + }, + "storageUri": { + "$id": "2079", + "kind": "string", + "type": { + "$ref": "1221" + }, + "value": "http://myStorageAccountName.blob.core.windows.net" + } + } + } + } + }, + "extensionProfile": { + "$id": "2080", + "kind": "model", + "type": { + "$ref": "1229" + }, + "value": { + "$id": "2081", + "extensions": { + "$id": "2082", + "kind": "array", + "type": { + "$ref": "1231" + }, + "value": [ + { + "$id": "2083", + "kind": "model", + "type": { + "$ref": "1232" + }, + "value": { + "$id": "2084", + "name": { + "$id": "2085", + "kind": "string", + "type": { + "$ref": "1239" + }, + "value": "bndxuxx" + }, + "type": { + "$id": "2086", + "kind": "string", + "type": { + "$ref": "1243" + }, + "value": "cmeam" + }, + "properties": { + "$id": "2087", + "kind": "model", + "type": { + "$ref": "1247" + }, + "value": { + "$id": "2088", + "forceUpdateTag": { + "$id": "2089", + "kind": "string", + "type": { + "$ref": "1249" + }, + "value": "yhgxw" + }, + "publisher": { + "$id": "2090", + "kind": "string", + "type": { + "$ref": "1253" + }, + "value": "kpxtirxjfprhs" + }, + "type": { + "$id": "2091", + "kind": "string", + "type": { + "$ref": "1257" + }, + "value": "pgjilctjjwaa" + }, + "typeHandlerVersion": { + "$id": "2092", + "kind": "string", + "type": { + "$ref": "1261" + }, + "value": "zevivcoilxmbwlrihhhibq" + }, + "autoUpgradeMinorVersion": { + "$id": "2093", + "kind": "boolean", + "type": { + "$ref": "1265" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "2094", + "kind": "boolean", + "type": { + "$ref": "1269" + }, + "value": true + }, + "settings": { + "$id": "2095", + "kind": "dict", + "type": { + "$ref": "1273" + }, + "value": { + "$id": "2096" + } + }, + "provisioningState": { + "$id": "2097", + "kind": "string", + "type": { + "$ref": "1285" + }, + "value": "Succeeded" + }, + "provisionAfterExtensions": { + "$id": "2098", + "kind": "array", + "type": { + "$ref": "1289" + }, + "value": [ + { + "$id": "2099", + "kind": "string", + "type": { + "$ref": "1290" + }, + "value": "nftzosroolbcwmpupujzqwqe" + } + ] + }, + "suppressFailures": { + "$id": "2100", + "kind": "boolean", + "type": { + "$ref": "1294" + }, + "value": true + }, + "protectedSettingsFromKeyVault": { + "$id": "2101", + "kind": "model", + "type": { + "$ref": "1298" + }, + "value": { + "$id": "2102", + "secretUrl": { + "$id": "2103", + "kind": "string", + "type": { + "$ref": "1300" + }, + "value": "https://myVaultName.vault.azure.net/secrets/secret/mySecretName" + }, + "sourceVault": { + "$id": "2104", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "2105", + "id": { + "$id": "2106", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + } + } + } + } + }, + "id": { + "$id": "2107", + "kind": "string", + "type": { + "$ref": "1234" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{extensionName}" + } + } + } + ] + }, + "extensionsTimeBudget": { + "$id": "2108", + "kind": "string", + "type": { + "$ref": "1313" + }, + "value": "mbhjahtdygwgyszdwjtvlvtgchdwil" + } + } + }, + "licenseType": { + "$id": "2109", + "kind": "string", + "type": { + "$ref": "1319" + }, + "value": "v" + }, + "scheduledEventsProfile": { + "$id": "2110", + "kind": "model", + "type": { + "$ref": "1323" + }, + "value": { + "$id": "2111", + "terminateNotificationProfile": { + "$id": "2112", + "kind": "model", + "type": { + "$ref": "1325" + }, + "value": { + "$id": "2113", + "notBeforeTimeout": { + "$id": "2114", + "kind": "string", + "type": { + "$ref": "1327" + }, + "value": "iljppmmw" + }, + "enable": { + "$id": "2115", + "kind": "boolean", + "type": { + "$ref": "1331" + }, + "value": true + } + } + }, + "osImageNotificationProfile": { + "$id": "2116", + "kind": "model", + "type": { + "$ref": "1337" + }, + "value": { + "$id": "2117", + "notBeforeTimeout": { + "$id": "2118", + "kind": "string", + "type": { + "$ref": "1339" + }, + "value": "olbpadmevekyczfokodtfprxti" + }, + "enable": { + "$id": "2119", + "kind": "boolean", + "type": { + "$ref": "1343" + }, + "value": true + } + } + } + } + }, + "userData": { + "$id": "2120", + "kind": "string", + "type": { + "$ref": "1351" + }, + "value": "s" + }, + "capacityReservation": { + "$id": "2121", + "kind": "model", + "type": { + "$ref": "1355" + }, + "value": { + "$id": "2122", + "capacityReservationGroup": { + "$id": "2123", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "2124", + "id": { + "$id": "2125", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}" + } + } + } + } + }, + "applicationProfile": { + "$id": "2126", + "kind": "model", + "type": { + "$ref": "1362" + }, + "value": { + "$id": "2127", + "galleryApplications": { + "$id": "2128", + "kind": "array", + "type": { + "$ref": "1364" + }, + "value": [ + { + "$id": "2129", + "kind": "model", + "type": { + "$ref": "1365" + }, + "value": { + "$id": "2130", + "tags": { + "$id": "2131", + "kind": "string", + "type": { + "$ref": "1367" + }, + "value": "eyrqjbib" + }, + "order": { + "$id": "2132", + "kind": "number", + "type": { + "$ref": "1371" + }, + "value": 5 + }, + "packageReferenceId": { + "$id": "2133", + "kind": "string", + "type": { + "$ref": "1375" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{applicationName}/versions/{versionName}" + }, + "treatFailureAsDeploymentFailure": { + "$id": "2134", + "kind": "boolean", + "type": { + "$ref": "1384" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "2135", + "kind": "boolean", + "type": { + "$ref": "1388" + }, + "value": true + } + } + } + ] + } + } + }, + "hardwareProfile": { + "$id": "2136", + "kind": "model", + "type": { + "$ref": "1396" + }, + "value": { + "$id": "2137", + "vmSizeProperties": { + "$id": "2138", + "kind": "model", + "type": { + "$ref": "1398" + }, + "value": { + "$id": "2139", + "vCPUsAvailable": { + "$id": "2140", + "kind": "number", + "type": { + "$ref": "1400" + }, + "value": 16 + }, + "vCPUsPerCore": { + "$id": "2141", + "kind": "number", + "type": { + "$ref": "1404" + }, + "value": 23 + } + } + } + } + }, + "serviceArtifactReference": { + "$id": "2142", + "kind": "model", + "type": { + "$ref": "1412" + }, + "value": { + "$id": "2143", + "id": { + "$id": "2144", + "kind": "string", + "type": { + "$ref": "1414" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactsName}/vmArtifactsProfiles/{vmArtifactsProfileName}" + } + } + }, + "securityPostureReference": { + "$id": "2145", + "kind": "model", + "type": { + "$ref": "1421" + }, + "value": { + "$id": "2146", + "id": { + "$id": "2147", + "kind": "string", + "type": { + "$ref": "1423" + }, + "value": "mubredelfbshboaxrsxiajihahaa" + }, + "excludeExtensions": { + "$id": "2148", + "kind": "array", + "type": { + "$ref": "1427" + }, + "value": [ + { + "$id": "2149", + "kind": "string", + "type": { + "$ref": "1428" + }, + "value": "{securityPostureVMExtensionName}" + } + ] + }, + "isOverridable": { + "$id": "2150", + "kind": "boolean", + "type": { + "$ref": "1432" + }, + "value": true + } + } + }, + "timeCreated": { + "$id": "2151", + "kind": "string", + "type": { + "$ref": "1438" + }, + "value": "2024-04-29T21:51:44.043Z" + } + } + }, + "computeApiVersion": { + "$id": "2152", + "kind": "string", + "type": { + "$ref": "1454" + }, + "value": "2023-07-01" + }, + "platformFaultDomainCount": { + "$id": "2153", + "kind": "number", + "type": { + "$ref": "1458" + }, + "value": 1 + } + } + }, + "timeCreated": { + "$id": "2154", + "kind": "string", + "type": { + "$ref": "1476" + }, + "value": "2024-07-10T00:16:34.8590555+00:00" + }, + "uniqueId": { + "$id": "2155", + "kind": "string", + "type": { + "$ref": "1481" + }, + "value": "a2f7fabd-bbc2-4a20-afe1-49fdb3885a28" + } + } + }, + "zones": { + "$id": "2156", + "kind": "array", + "type": { + "$ref": "1489" + }, + "value": [ + { + "$id": "2157", + "kind": "string", + "type": { + "$ref": "1490" + }, + "value": "zone1" + }, + { + "$id": "2158", + "kind": "string", + "type": { + "$ref": "1490" + }, + "value": "zone2" + } + ] + }, + "identity": { + "$id": "2159", + "kind": "model", + "type": { + "$ref": "1494" + }, + "value": { + "$id": "2160", + "principalId": { + "$id": "2161", + "kind": "string", + "type": { + "$ref": "1496" + }, + "value": "4d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "tenantId": { + "$id": "2162", + "kind": "string", + "type": { + "$ref": "1501" + }, + "value": "5d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "type": { + "$id": "2163", + "kind": "string", + "type": { + "$ref": "318" + }, + "value": "UserAssigned" + }, + "userAssignedIdentities": { + "$id": "2164", + "kind": "dict", + "type": { + "$ref": "1509" + }, + "value": { + "$id": "2165", + "key9851": { + "$id": "2166", + "kind": "model", + "type": { + "$ref": "1512" + }, + "value": { + "$id": "2167", + "principalId": { + "$id": "2168", + "kind": "string", + "type": { + "$ref": "1519" + }, + "value": "6d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "clientId": { + "$id": "2169", + "kind": "string", + "type": { + "$ref": "1514" + }, + "value": "7d508e5b-374b-4382-9a1c-01fb8b6cb37c" + } + } + } + } + } + } + }, + "tags": { + "$id": "2170", + "kind": "dict", + "type": { + "$ref": "475" + }, + "value": { + "$id": "2171", + "key3518": { + "$id": "2172", + "kind": "string", + "type": { + "$ref": "477" + }, + "value": "luvrnuvsgdpbuofdskkcoqhfh" + } + } + }, + "plan": { + "$id": "2173", + "kind": "model", + "type": { + "$ref": "1528" + }, + "value": { + "$id": "2174", + "name": { + "$id": "2175", + "kind": "string", + "type": { + "$ref": "1530" + }, + "value": "jwgrcrnrtfoxn" + }, + "publisher": { + "$id": "2176", + "kind": "string", + "type": { + "$ref": "1534" + }, + "value": "iozjbiqqckqm" + }, + "product": { + "$id": "2177", + "kind": "string", + "type": { + "$ref": "1538" + }, + "value": "cgopbyvdyqikahwyxfpzwaqk" + }, + "promotionCode": { + "$id": "2178", + "kind": "string", + "type": { + "$ref": "1542" + }, + "value": "naglezezplcaruqogtxnuizslqnnbr" + }, + "version": { + "$id": "2179", + "kind": "string", + "type": { + "$ref": "1546" + }, + "value": "wa" + } + } + }, + "location": { + "$id": "2180", + "kind": "string", + "type": { + "$ref": "481" + }, + "value": "westus" + }, + "id": { + "$id": "2181", + "kind": "string", + "type": { + "$ref": "433" + }, + "value": "/subscriptions/7B0CD4DB-3381-4013-9B31-FB6E6FD0FF1C/resourceGroups/rgazurefleet/providers/Microsoft.AzureFleet/fleets/testFleet" + }, + "name": { + "$id": "2182", + "kind": "string", + "type": { + "$ref": "438" + }, + "value": "testFleet" + }, + "type": { + "$id": "2183", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "Microsoft.AzureFleet/fleets" + }, + "systemData": { + "$id": "2184", + "kind": "model", + "type": { + "$ref": "447" + }, + "value": { + "$id": "2185", + "createdBy": { + "$id": "2186", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "rowegentrpoajsv" + }, + "createdByType": { + "$id": "2187", + "kind": "string", + "type": { + "$ref": "328" + }, + "value": "User" + }, + "createdAt": { + "$id": "2188", + "kind": "string", + "type": { + "$ref": "456" + }, + "value": "2024-04-29T21:51:44.043Z" + }, + "lastModifiedBy": { + "$id": "2189", + "kind": "string", + "type": { + "$ref": "461" + }, + "value": "edwuayhhaoepxzisfaqjhmrxjq" + }, + "lastModifiedByType": { + "$id": "2190", + "kind": "string", + "type": { + "$ref": "328" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "2191", + "kind": "string", + "type": { + "$ref": "468" + }, + "value": "2024-04-29T21:51:44.043Z" + } + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "2192", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2193", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2194", + "name": "fleetName", + "nameInRequest": "fleetName", + "doc": "The name of the Compute Fleet", + "type": { + "$id": "2195", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2196", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "1808" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "2197", + "type": { + "$ref": "429" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.AzureFleet.Fleets.get" + }, + { + "$id": "2198", + "kind": "lro", + "name": "createOrUpdate", + "accessibility": "public", + "apiVersions": [ + "2023-11-01-preview", + "2024-05-01-preview", + "2024-11-01" + ], + "doc": "Create a Fleet", + "operation": { + "$id": "2199", + "name": "createOrUpdate", + "resourceName": "Fleet", + "doc": "Create a Fleet", + "accessibility": "public", + "parameters": [ + { + "$id": "2200", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "2201", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "2202", + "type": { + "$id": "2203", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-11-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2204", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "2205", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "2206", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2207", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2208", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2209", + "name": "fleetName", + "nameInRequest": "fleetName", + "doc": "The name of the Compute Fleet", + "type": { + "$id": "2210", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2211", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "2212", + "kind": "constant", + "valueType": { + "$id": "2213", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2214", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "2215", + "kind": "constant", + "valueType": { + "$id": "2216", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2217", + "name": "resource", + "nameInRequest": "resource", + "doc": "Resource create parameters.", + "type": { + "$ref": "429" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "2218", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "429" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + { + "$id": "2219", + "statusCodes": [ + 201 + ], + "bodyType": { + "$ref": "429" + }, + "headers": [ + { + "$id": "2220", + "name": "retryAfter", + "nameInResponse": "Retry-After", + "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "type": { + "$id": "2221", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "PUT", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureFleet/fleets/{fleetName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "longRunning": { + "$id": "2222", + "finalStateVia": 0, + "finalResponse": { + "$id": "2223", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "429" + } + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.AzureFleet.Fleets.createOrUpdate", + "decorators": [ + { + "$id": "2224", + "name": "Azure.Core.@useFinalStateVia", + "arguments": { + "$id": "2225", + "finalState": "azure-async-operation" + } + } + ], + "examples": [ + { + "$id": "2226", + "kind": "http", + "name": "Fleets_CreateOrUpdate", + "description": "Fleets_CreateOrUpdate", + "filePath": "2024-11-01/Fleets_CreateOrUpdate.json", + "parameters": [ + { + "$id": "2227", + "parameter": { + "$ref": "2200" + }, + "value": { + "$id": "2228", + "kind": "string", + "type": { + "$ref": "2201" + }, + "value": "2024-11-01" + } + }, + { + "$id": "2229", + "parameter": { + "$ref": "2204" + }, + "value": { + "$id": "2230", + "kind": "string", + "type": { + "$ref": "2205" + }, + "value": "1DC2F28C-A625-4B0E-9748-9885A3C9E9EB" + } + }, + { + "$id": "2231", + "parameter": { + "$ref": "2207" + }, + "value": { + "$id": "2232", + "kind": "string", + "type": { + "$ref": "2208" + }, + "value": "rgazurefleet" + } + }, + { + "$id": "2233", + "parameter": { + "$ref": "2209" + }, + "value": { + "$id": "2234", + "kind": "string", + "type": { + "$ref": "2210" + }, + "value": "testFleet" + } + }, + { + "$id": "2235", + "parameter": { + "$ref": "2217" + }, + "value": { + "$id": "2236", + "kind": "model", + "type": { + "$ref": "429" + }, + "value": { + "$id": "2237", + "properties": { + "$id": "2238", + "kind": "model", + "type": { + "$ref": "485" + }, + "value": { + "$id": "2239", + "spotPriorityProfile": { + "$id": "2240", + "kind": "model", + "type": { + "$ref": "490" + }, + "value": { + "$id": "2241", + "capacity": { + "$id": "2242", + "kind": "number", + "type": { + "$ref": "492" + }, + "value": 20 + }, + "minCapacity": { + "$id": "2243", + "kind": "number", + "type": { + "$ref": "496" + }, + "value": 10 + }, + "maxPricePerVM": { + "$id": "2244", + "kind": "number", + "type": { + "$ref": "500" + }, + "value": 0.00865 + }, + "evictionPolicy": { + "$id": "2245", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "Delete" + }, + "allocationStrategy": { + "$id": "2246", + "kind": "string", + "type": { + "$ref": "36" + }, + "value": "PriceCapacityOptimized" + }, + "maintain": { + "$id": "2247", + "kind": "boolean", + "type": { + "$ref": "510" + }, + "value": true + } + } + }, + "regularPriorityProfile": { + "$id": "2248", + "kind": "model", + "type": { + "$ref": "516" + }, + "value": { + "$id": "2249", + "capacity": { + "$id": "2250", + "kind": "number", + "type": { + "$ref": "518" + }, + "value": 20 + }, + "minCapacity": { + "$id": "2251", + "kind": "number", + "type": { + "$ref": "522" + }, + "value": 10 + }, + "allocationStrategy": { + "$id": "2252", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "LowestPrice" + } + } + }, + "vmSizesProfile": { + "$id": "2253", + "kind": "array", + "type": { + "$ref": "531" + }, + "value": [ + { + "$id": "2254", + "kind": "model", + "type": { + "$ref": "532" + }, + "value": { + "$id": "2255", + "name": { + "$id": "2256", + "kind": "string", + "type": { + "$ref": "534" + }, + "value": "Standard_d1_v2" + }, + "rank": { + "$id": "2257", + "kind": "number", + "type": { + "$ref": "538" + }, + "value": 19225 + } + } + } + ] + }, + "computeProfile": { + "$id": "2258", + "kind": "model", + "type": { + "$ref": "1449" + }, + "value": { + "$id": "2259", + "baseVirtualMachineProfile": { + "$id": "2260", + "kind": "model", + "type": { + "$ref": "644" + }, + "value": { + "$id": "2261", + "osProfile": { + "$id": "2262", + "kind": "model", + "type": { + "$ref": "646" + }, + "value": { + "$id": "2263", + "computerNamePrefix": { + "$id": "2264", + "kind": "string", + "type": { + "$ref": "648" + }, + "value": "o" + }, + "adminUsername": { + "$id": "2265", + "kind": "string", + "type": { + "$ref": "652" + }, + "value": "nrgzqciiaaxjrqldbmjbqkyhntp" + }, + "adminPassword": { + "$id": "2266", + "kind": "string", + "type": { + "$ref": "656" + }, + "value": "adfbrdxpv" + }, + "customData": { + "$id": "2267", + "kind": "string", + "type": { + "$ref": "660" + }, + "value": "xjjib" + }, + "windowsConfiguration": { + "$id": "2268", + "kind": "model", + "type": { + "$ref": "664" + }, + "value": { + "$id": "2269", + "provisionVMAgent": { + "$id": "2270", + "kind": "boolean", + "type": { + "$ref": "666" + }, + "value": true + }, + "enableAutomaticUpdates": { + "$id": "2271", + "kind": "boolean", + "type": { + "$ref": "670" + }, + "value": true + }, + "timeZone": { + "$id": "2272", + "kind": "string", + "type": { + "$ref": "674" + }, + "value": "hlyjiqcfksgrpjrct" + }, + "additionalUnattendContent": { + "$id": "2273", + "kind": "array", + "type": { + "$ref": "678" + }, + "value": [ + { + "$id": "2274", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "2275", + "passName": { + "$id": "2276", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "OobeSystem" + }, + "componentName": { + "$id": "2277", + "kind": "string", + "type": { + "$ref": "685" + }, + "value": "Microsoft-Windows-Shell-Setup" + }, + "settingName": { + "$id": "2278", + "kind": "string", + "type": { + "$ref": "116" + }, + "value": "AutoLogon" + }, + "content": { + "$id": "2279", + "kind": "string", + "type": { + "$ref": "692" + }, + "value": "bubmqbxjkj" + } + } + } + ] + }, + "patchSettings": { + "$id": "2280", + "kind": "model", + "type": { + "$ref": "698" + }, + "value": { + "$id": "2281", + "patchMode": { + "$id": "2282", + "kind": "string", + "type": { + "$ref": "122" + }, + "value": "Manual" + }, + "enableHotpatching": { + "$id": "2283", + "kind": "boolean", + "type": { + "$ref": "703" + }, + "value": true + }, + "assessmentMode": { + "$id": "2284", + "kind": "string", + "type": { + "$ref": "130" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "2285", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2286", + "rebootSetting": { + "$id": "2287", + "kind": "string", + "type": { + "$ref": "136" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "2288", + "kind": "boolean", + "type": { + "$ref": "715" + }, + "value": true + } + } + } + } + }, + "winRM": { + "$id": "2289", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "2290", + "listeners": { + "$id": "2291", + "kind": "array", + "type": { + "$ref": "725" + }, + "value": [ + { + "$id": "2292", + "kind": "model", + "type": { + "$ref": "726" + }, + "value": { + "$id": "2293", + "protocol": { + "$id": "2294", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "Https" + }, + "certificateUrl": { + "$id": "2295", + "kind": "string", + "type": { + "$ref": "731" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + } + } + } + ] + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "2296", + "kind": "boolean", + "type": { + "$ref": "739" + }, + "value": true + } + } + }, + "linuxConfiguration": { + "$id": "2297", + "kind": "model", + "type": { + "$ref": "745" + }, + "value": { + "$id": "2298", + "disablePasswordAuthentication": { + "$id": "2299", + "kind": "boolean", + "type": { + "$ref": "747" + }, + "value": true + }, + "ssh": { + "$id": "2300", + "kind": "model", + "type": { + "$ref": "751" + }, + "value": { + "$id": "2301", + "publicKeys": { + "$id": "2302", + "kind": "array", + "type": { + "$ref": "753" + }, + "value": [ + { + "$id": "2303", + "kind": "model", + "type": { + "$ref": "754" + }, + "value": { + "$id": "2304", + "path": { + "$id": "2305", + "kind": "string", + "type": { + "$ref": "756" + }, + "value": "kmqz" + }, + "keyData": { + "$id": "2306", + "kind": "string", + "type": { + "$ref": "760" + }, + "value": "kivgsubusvpprwqaqpjcmhsv" + } + } + } + ] + } + } + }, + "provisionVMAgent": { + "$id": "2307", + "kind": "boolean", + "type": { + "$ref": "768" + }, + "value": true + }, + "patchSettings": { + "$id": "2308", + "kind": "model", + "type": { + "$ref": "772" + }, + "value": { + "$id": "2309", + "patchMode": { + "$id": "2310", + "kind": "string", + "type": { + "$ref": "152" + }, + "value": "ImageDefault" + }, + "assessmentMode": { + "$id": "2311", + "kind": "string", + "type": { + "$ref": "158" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "2312", + "kind": "model", + "type": { + "$ref": "780" + }, + "value": { + "$id": "2313", + "rebootSetting": { + "$id": "2314", + "kind": "string", + "type": { + "$ref": "164" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "2315", + "kind": "boolean", + "type": { + "$ref": "785" + }, + "value": true + } + } + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "2316", + "kind": "boolean", + "type": { + "$ref": "793" + }, + "value": true + } + } + }, + "secrets": { + "$id": "2317", + "kind": "array", + "type": { + "$ref": "799" + }, + "value": [ + { + "$id": "2318", + "kind": "model", + "type": { + "$ref": "800" + }, + "value": { + "$id": "2319", + "sourceVault": { + "$id": "2320", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "2321", + "id": { + "$id": "2322", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + }, + "vaultCertificates": { + "$id": "2323", + "kind": "array", + "type": { + "$ref": "811" + }, + "value": [ + { + "$id": "2324", + "kind": "model", + "type": { + "$ref": "812" + }, + "value": { + "$id": "2325", + "certificateUrl": { + "$id": "2326", + "kind": "string", + "type": { + "$ref": "814" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + }, + "certificateStore": { + "$id": "2327", + "kind": "string", + "type": { + "$ref": "818" + }, + "value": "nlxrwavpzhueffxsshlun" + } + } + } + ] + } + } + } + ] + }, + "allowExtensionOperations": { + "$id": "2328", + "kind": "boolean", + "type": { + "$ref": "826" + }, + "value": true + }, + "requireGuestProvisionSignal": { + "$id": "2329", + "kind": "boolean", + "type": { + "$ref": "830" + }, + "value": true + } + } + }, + "storageProfile": { + "$id": "2330", + "kind": "model", + "type": { + "$ref": "836" + }, + "value": { + "$id": "2331", + "imageReference": { + "$id": "2332", + "kind": "model", + "type": { + "$ref": "838" + }, + "value": { + "$id": "2333", + "publisher": { + "$id": "2334", + "kind": "string", + "type": { + "$ref": "845" + }, + "value": "mqxgwbiyjzmxavhbkd" + }, + "offer": { + "$id": "2335", + "kind": "string", + "type": { + "$ref": "849" + }, + "value": "isxgumkarlkomp" + }, + "sku": { + "$id": "2336", + "kind": "string", + "type": { + "$ref": "853" + }, + "value": "eojmppqcrnpmxirtp" + }, + "version": { + "$id": "2337", + "kind": "string", + "type": { + "$ref": "857" + }, + "value": "wvpcqefgtmqdgltiuz" + }, + "sharedGalleryImageId": { + "$id": "2338", + "kind": "string", + "type": { + "$ref": "865" + }, + "value": "kmkgihoxwlawuuhcinfirktdwkmx" + }, + "communityGalleryImageId": { + "$id": "2339", + "kind": "string", + "type": { + "$ref": "869" + }, + "value": "vlqe" + }, + "id": { + "$id": "2340", + "kind": "string", + "type": { + "$ref": "840" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}/versions/{versionName}" + } + } + }, + "osDisk": { + "$id": "2341", + "kind": "model", + "type": { + "$ref": "875" + }, + "value": { + "$id": "2342", + "name": { + "$id": "2343", + "kind": "string", + "type": { + "$ref": "877" + }, + "value": "wfttw" + }, + "caching": { + "$id": "2344", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "2345", + "kind": "boolean", + "type": { + "$ref": "884" + }, + "value": true + }, + "createOption": { + "$id": "2346", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "FromImage" + }, + "diffDiskSettings": { + "$id": "2347", + "kind": "model", + "type": { + "$ref": "891" + }, + "value": { + "$id": "2348", + "option": { + "$id": "2349", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "Local" + }, + "placement": { + "$id": "2350", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "CacheDisk" + } + } + }, + "diskSizeGB": { + "$id": "2351", + "kind": "number", + "type": { + "$ref": "901" + }, + "value": 14 + }, + "osType": { + "$id": "2352", + "kind": "string", + "type": { + "$ref": "206" + }, + "value": "Windows" + }, + "image": { + "$id": "2353", + "kind": "model", + "type": { + "$ref": "908" + }, + "value": { + "$id": "2354", + "uri": { + "$id": "2355", + "kind": "string", + "type": { + "$ref": "910" + }, + "value": "https://myStorageAccountName.blob.core.windows.net/myContainerName/myVhdName.vhd" + } + } + }, + "vhdContainers": { + "$id": "2356", + "kind": "array", + "type": { + "$ref": "916" + }, + "value": [ + { + "$id": "2357", + "kind": "string", + "type": { + "$ref": "917" + }, + "value": "tkzcwddtinkfpnfklatw" + } + ] + }, + "managedDisk": { + "$id": "2358", + "kind": "model", + "type": { + "$ref": "921" + }, + "value": { + "$id": "2359", + "storageAccountType": { + "$id": "2360", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "2361", + "kind": "model", + "type": { + "$ref": "926" + }, + "value": { + "$id": "2362", + "id": { + "$id": "2363", + "kind": "string", + "type": { + "$ref": "928" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "2364", + "kind": "model", + "type": { + "$ref": "935" + }, + "value": { + "$id": "2365", + "securityEncryptionType": { + "$id": "2366", + "kind": "string", + "type": { + "$ref": "228" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "2367", + "kind": "model", + "type": { + "$ref": "926" + }, + "value": { + "$id": "2368", + "id": { + "$id": "2369", + "kind": "string", + "type": { + "$ref": "928" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "deleteOption": { + "$id": "2370", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "Delete" + } + } + }, + "dataDisks": { + "$id": "2371", + "kind": "array", + "type": { + "$ref": "952" + }, + "value": [ + { + "$id": "2372", + "kind": "model", + "type": { + "$ref": "953" + }, + "value": { + "$id": "2373", + "name": { + "$id": "2374", + "kind": "string", + "type": { + "$ref": "955" + }, + "value": "eogiykmdmeikswxmigjws" + }, + "lun": { + "$id": "2375", + "kind": "number", + "type": { + "$ref": "959" + }, + "value": 14 + }, + "caching": { + "$id": "2376", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "2377", + "kind": "boolean", + "type": { + "$ref": "966" + }, + "value": true + }, + "createOption": { + "$id": "2378", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "FromImage" + }, + "diskSizeGB": { + "$id": "2379", + "kind": "number", + "type": { + "$ref": "973" + }, + "value": 6 + }, + "managedDisk": { + "$id": "2380", + "kind": "model", + "type": { + "$ref": "921" + }, + "value": { + "$id": "2381", + "storageAccountType": { + "$id": "2382", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "2383", + "kind": "model", + "type": { + "$ref": "926" + }, + "value": { + "$id": "2384", + "id": { + "$id": "2385", + "kind": "string", + "type": { + "$ref": "928" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "2386", + "kind": "model", + "type": { + "$ref": "935" + }, + "value": { + "$id": "2387", + "securityEncryptionType": { + "$id": "2388", + "kind": "string", + "type": { + "$ref": "228" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "2389", + "kind": "model", + "type": { + "$ref": "926" + }, + "value": { + "$id": "2390", + "id": { + "$id": "2391", + "kind": "string", + "type": { + "$ref": "928" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "diskIOPSReadWrite": { + "$id": "2392", + "kind": "number", + "type": { + "$ref": "980" + }, + "value": 27 + }, + "diskMBpsReadWrite": { + "$id": "2393", + "kind": "number", + "type": { + "$ref": "984" + }, + "value": 2 + }, + "deleteOption": { + "$id": "2394", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "Delete" + } + } + } + ] + }, + "diskControllerType": { + "$id": "2395", + "kind": "string", + "type": { + "$ref": "242" + }, + "value": "uzb" + } + } + }, + "networkProfile": { + "$id": "2396", + "kind": "model", + "type": { + "$ref": "998" + }, + "value": { + "$id": "2397", + "healthProbe": { + "$id": "2398", + "kind": "model", + "type": { + "$ref": "1000" + }, + "value": { + "$id": "2399", + "id": { + "$id": "2400", + "kind": "string", + "type": { + "$ref": "1002" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}" + } + } + }, + "networkInterfaceConfigurations": { + "$id": "2401", + "kind": "array", + "type": { + "$ref": "1009" + }, + "value": [ + { + "$id": "2402", + "kind": "model", + "type": { + "$ref": "1010" + }, + "value": { + "$id": "2403", + "name": { + "$id": "2404", + "kind": "string", + "type": { + "$ref": "1012" + }, + "value": "i" + }, + "properties": { + "$id": "2405", + "kind": "model", + "type": { + "$ref": "1016" + }, + "value": { + "$id": "2406", + "primary": { + "$id": "2407", + "kind": "boolean", + "type": { + "$ref": "1018" + }, + "value": true + }, + "enableAcceleratedNetworking": { + "$id": "2408", + "kind": "boolean", + "type": { + "$ref": "1022" + }, + "value": true + }, + "disableTcpStateTracking": { + "$id": "2409", + "kind": "boolean", + "type": { + "$ref": "1026" + }, + "value": true + }, + "enableFpga": { + "$id": "2410", + "kind": "boolean", + "type": { + "$ref": "1030" + }, + "value": true + }, + "networkSecurityGroup": { + "$id": "2411", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "2412", + "id": { + "$id": "2413", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}" + } + } + }, + "dnsSettings": { + "$id": "2414", + "kind": "model", + "type": { + "$ref": "1037" + }, + "value": { + "$id": "2415", + "dnsServers": { + "$id": "2416", + "kind": "array", + "type": { + "$ref": "1039" + }, + "value": [ + { + "$id": "2417", + "kind": "string", + "type": { + "$ref": "1040" + }, + "value": "nxmmfolhclsesu" + } + ] + } + } + }, + "ipConfigurations": { + "$id": "2418", + "kind": "array", + "type": { + "$ref": "1046" + }, + "value": [ + { + "$id": "2419", + "kind": "model", + "type": { + "$ref": "1047" + }, + "value": { + "$id": "2420", + "name": { + "$id": "2421", + "kind": "string", + "type": { + "$ref": "1049" + }, + "value": "oezqhkidfhyywlfzwuotilrpbqnjg" + }, + "properties": { + "$id": "2422", + "kind": "model", + "type": { + "$ref": "1053" + }, + "value": { + "$id": "2423", + "subnet": { + "$id": "2424", + "kind": "model", + "type": { + "$ref": "1000" + }, + "value": { + "$id": "2425", + "id": { + "$id": "2426", + "kind": "string", + "type": { + "$ref": "1002" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}" + } + } + }, + "primary": { + "$id": "2427", + "kind": "boolean", + "type": { + "$ref": "1058" + }, + "value": true + }, + "publicIPAddressConfiguration": { + "$id": "2428", + "kind": "model", + "type": { + "$ref": "1062" + }, + "value": { + "$id": "2429", + "name": { + "$id": "2430", + "kind": "string", + "type": { + "$ref": "1064" + }, + "value": "fvpqf" + }, + "properties": { + "$id": "2431", + "kind": "model", + "type": { + "$ref": "1068" + }, + "value": { + "$id": "2432", + "idleTimeoutInMinutes": { + "$id": "2433", + "kind": "number", + "type": { + "$ref": "1070" + }, + "value": 9 + }, + "dnsSettings": { + "$id": "2434", + "kind": "model", + "type": { + "$ref": "1074" + }, + "value": { + "$id": "2435", + "domainNameLabel": { + "$id": "2436", + "kind": "string", + "type": { + "$ref": "1076" + }, + "value": "ukrddzvmorpmfsczjwtbvp" + }, + "domainNameLabelScope": { + "$id": "2437", + "kind": "string", + "type": { + "$ref": "248" + }, + "value": "TenantReuse" + } + } + }, + "ipTags": { + "$id": "2438", + "kind": "array", + "type": { + "$ref": "1085" + }, + "value": [ + { + "$id": "2439", + "kind": "model", + "type": { + "$ref": "1086" + }, + "value": { + "$id": "2440", + "ipTagType": { + "$id": "2441", + "kind": "string", + "type": { + "$ref": "1088" + }, + "value": "sddgsoemnzgqizale" + }, + "tag": { + "$id": "2442", + "kind": "string", + "type": { + "$ref": "1092" + }, + "value": "wufmhrjsakbiaetyara" + } + } + } + ] + }, + "publicIPPrefix": { + "$id": "2443", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "2444", + "id": { + "$id": "2445", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}" + } + } + }, + "publicIPAddressVersion": { + "$id": "2446", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "IPv4" + }, + "deleteOption": { + "$id": "2447", + "kind": "string", + "type": { + "$ref": "264" + }, + "value": "Delete" + } + } + }, + "sku": { + "$id": "2448", + "kind": "model", + "type": { + "$ref": "1109" + }, + "value": { + "$id": "2449", + "name": { + "$id": "2450", + "kind": "string", + "type": { + "$ref": "270" + }, + "value": "Basic" + }, + "tier": { + "$id": "2451", + "kind": "string", + "type": { + "$ref": "276" + }, + "value": "Regional" + } + } + } + } + }, + "privateIPAddressVersion": { + "$id": "2452", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "IPv4" + }, + "applicationGatewayBackendAddressPools": { + "$id": "2453", + "kind": "array", + "type": { + "$ref": "1124" + }, + "value": [ + { + "$id": "2454", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "2455", + "id": { + "$id": "2456", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "applicationSecurityGroups": { + "$id": "2457", + "kind": "array", + "type": { + "$ref": "1128" + }, + "value": [ + { + "$id": "2458", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "2459", + "id": { + "$id": "2460", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}" + } + } + } + ] + }, + "loadBalancerBackendAddressPools": { + "$id": "2461", + "kind": "array", + "type": { + "$ref": "1132" + }, + "value": [ + { + "$id": "2462", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "2463", + "id": { + "$id": "2464", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "loadBalancerInboundNatPools": { + "$id": "2465", + "kind": "array", + "type": { + "$ref": "1136" + }, + "value": [ + { + "$id": "2466", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "2467", + "id": { + "$id": "2468", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatPools/{inboundNatPoolName}" + } + } + } + ] + } + } + } + } + } + ] + }, + "enableIPForwarding": { + "$id": "2469", + "kind": "boolean", + "type": { + "$ref": "1144" + }, + "value": true + }, + "deleteOption": { + "$id": "2470", + "kind": "string", + "type": { + "$ref": "264" + }, + "value": "Delete" + }, + "auxiliaryMode": { + "$id": "2471", + "kind": "string", + "type": { + "$ref": "282" + }, + "value": "None" + }, + "auxiliarySku": { + "$id": "2472", + "kind": "string", + "type": { + "$ref": "290" + }, + "value": "None" + } + } + } + } + } + ] + }, + "networkApiVersion": { + "$id": "2473", + "kind": "string", + "type": { + "$ref": "302" + }, + "value": "2020-11-01" + } + } + }, + "securityProfile": { + "$id": "2474", + "kind": "model", + "type": { + "$ref": "1166" + }, + "value": { + "$id": "2475", + "uefiSettings": { + "$id": "2476", + "kind": "model", + "type": { + "$ref": "1168" + }, + "value": { + "$id": "2477", + "secureBootEnabled": { + "$id": "2478", + "kind": "boolean", + "type": { + "$ref": "1170" + }, + "value": true + }, + "vTpmEnabled": { + "$id": "2479", + "kind": "boolean", + "type": { + "$ref": "1174" + }, + "value": true + } + } + }, + "encryptionAtHost": { + "$id": "2480", + "kind": "boolean", + "type": { + "$ref": "1180" + }, + "value": true + }, + "securityType": { + "$id": "2481", + "kind": "string", + "type": { + "$ref": "306" + }, + "value": "TrustedLaunch" + }, + "encryptionIdentity": { + "$id": "2482", + "kind": "model", + "type": { + "$ref": "1187" + }, + "value": { + "$id": "2483", + "userAssignedIdentityResourceId": { + "$id": "2484", + "kind": "string", + "type": { + "$ref": "1189" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{userAssignedIdentityName}" + } + } + }, + "proxyAgentSettings": { + "$id": "2485", + "kind": "model", + "type": { + "$ref": "1196" + }, + "value": { + "$id": "2486", + "enabled": { + "$id": "2487", + "kind": "boolean", + "type": { + "$ref": "1198" + }, + "value": true + }, + "mode": { + "$id": "2488", + "kind": "string", + "type": { + "$ref": "312" + }, + "value": "Audit" + }, + "keyIncarnationId": { + "$id": "2489", + "kind": "number", + "type": { + "$ref": "1205" + }, + "value": 20 + } + } + } + } + }, + "diagnosticsProfile": { + "$id": "2490", + "kind": "model", + "type": { + "$ref": "1213" + }, + "value": { + "$id": "2491", + "bootDiagnostics": { + "$id": "2492", + "kind": "model", + "type": { + "$ref": "1215" + }, + "value": { + "$id": "2493", + "enabled": { + "$id": "2494", + "kind": "boolean", + "type": { + "$ref": "1217" + }, + "value": true + }, + "storageUri": { + "$id": "2495", + "kind": "string", + "type": { + "$ref": "1221" + }, + "value": "http://myStorageAccountName.blob.core.windows.net" + } + } + } + } + }, + "extensionProfile": { + "$id": "2496", + "kind": "model", + "type": { + "$ref": "1229" + }, + "value": { + "$id": "2497", + "extensions": { + "$id": "2498", + "kind": "array", + "type": { + "$ref": "1231" + }, + "value": [ + { + "$id": "2499", + "kind": "model", + "type": { + "$ref": "1232" + }, + "value": { + "$id": "2500", + "name": { + "$id": "2501", + "kind": "string", + "type": { + "$ref": "1239" + }, + "value": "bndxuxx" + }, + "properties": { + "$id": "2502", + "kind": "model", + "type": { + "$ref": "1247" + }, + "value": { + "$id": "2503", + "forceUpdateTag": { + "$id": "2504", + "kind": "string", + "type": { + "$ref": "1249" + }, + "value": "yhgxw" + }, + "publisher": { + "$id": "2505", + "kind": "string", + "type": { + "$ref": "1253" + }, + "value": "kpxtirxjfprhs" + }, + "type": { + "$id": "2506", + "kind": "string", + "type": { + "$ref": "1257" + }, + "value": "pgjilctjjwaa" + }, + "typeHandlerVersion": { + "$id": "2507", + "kind": "string", + "type": { + "$ref": "1261" + }, + "value": "zevivcoilxmbwlrihhhibq" + }, + "autoUpgradeMinorVersion": { + "$id": "2508", + "kind": "boolean", + "type": { + "$ref": "1265" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "2509", + "kind": "boolean", + "type": { + "$ref": "1269" + }, + "value": true + }, + "settings": { + "$id": "2510", + "kind": "dict", + "type": { + "$ref": "1273" + }, + "value": { + "$id": "2511" + } + }, + "protectedSettings": { + "$id": "2512", + "kind": "dict", + "type": { + "$ref": "1279" + }, + "value": { + "$id": "2513" + } + }, + "provisionAfterExtensions": { + "$id": "2514", + "kind": "array", + "type": { + "$ref": "1289" + }, + "value": [ + { + "$id": "2515", + "kind": "string", + "type": { + "$ref": "1290" + }, + "value": "nftzosroolbcwmpupujzqwqe" + } + ] + }, + "suppressFailures": { + "$id": "2516", + "kind": "boolean", + "type": { + "$ref": "1294" + }, + "value": true + }, + "protectedSettingsFromKeyVault": { + "$id": "2517", + "kind": "model", + "type": { + "$ref": "1298" + }, + "value": { + "$id": "2518", + "secretUrl": { + "$id": "2519", + "kind": "string", + "type": { + "$ref": "1300" + }, + "value": "https://myvaultName.vault.azure.net/secrets/secret/mySecretName" + }, + "sourceVault": { + "$id": "2520", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "2521", + "id": { + "$id": "2522", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + } + } + } + } + } + } + } + ] + }, + "extensionsTimeBudget": { + "$id": "2523", + "kind": "string", + "type": { + "$ref": "1313" + }, + "value": "mbhjahtdygwgyszdwjtvlvtgchdwil" + } + } + }, + "licenseType": { + "$id": "2524", + "kind": "string", + "type": { + "$ref": "1319" + }, + "value": "v" + }, + "scheduledEventsProfile": { + "$id": "2525", + "kind": "model", + "type": { + "$ref": "1323" + }, + "value": { + "$id": "2526", + "terminateNotificationProfile": { + "$id": "2527", + "kind": "model", + "type": { + "$ref": "1325" + }, + "value": { + "$id": "2528", + "notBeforeTimeout": { + "$id": "2529", + "kind": "string", + "type": { + "$ref": "1327" + }, + "value": "iljppmmw" + }, + "enable": { + "$id": "2530", + "kind": "boolean", + "type": { + "$ref": "1331" + }, + "value": true + } + } + }, + "osImageNotificationProfile": { + "$id": "2531", + "kind": "model", + "type": { + "$ref": "1337" + }, + "value": { + "$id": "2532", + "notBeforeTimeout": { + "$id": "2533", + "kind": "string", + "type": { + "$ref": "1339" + }, + "value": "olbpadmevekyczfokodtfprxti" + }, + "enable": { + "$id": "2534", + "kind": "boolean", + "type": { + "$ref": "1343" + }, + "value": true + } + } + } + } + }, + "userData": { + "$id": "2535", + "kind": "string", + "type": { + "$ref": "1351" + }, + "value": "s" + }, + "capacityReservation": { + "$id": "2536", + "kind": "model", + "type": { + "$ref": "1355" + }, + "value": { + "$id": "2537", + "capacityReservationGroup": { + "$id": "2538", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "2539", + "id": { + "$id": "2540", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}" + } + } + } + } + }, + "applicationProfile": { + "$id": "2541", + "kind": "model", + "type": { + "$ref": "1362" + }, + "value": { + "$id": "2542", + "galleryApplications": { + "$id": "2543", + "kind": "array", + "type": { + "$ref": "1364" + }, + "value": [ + { + "$id": "2544", + "kind": "model", + "type": { + "$ref": "1365" + }, + "value": { + "$id": "2545", + "tags": { + "$id": "2546", + "kind": "string", + "type": { + "$ref": "1367" + }, + "value": "eyrqjbib" + }, + "order": { + "$id": "2547", + "kind": "number", + "type": { + "$ref": "1371" + }, + "value": 5 + }, + "packageReferenceId": { + "$id": "2548", + "kind": "string", + "type": { + "$ref": "1375" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{applicationName}/versions/{versionName}" + }, + "configurationReference": { + "$id": "2549", + "kind": "string", + "type": { + "$ref": "1380" + }, + "value": "ulztmiavpojpbpbddgnuuiimxcpau" + }, + "treatFailureAsDeploymentFailure": { + "$id": "2550", + "kind": "boolean", + "type": { + "$ref": "1384" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "2551", + "kind": "boolean", + "type": { + "$ref": "1388" + }, + "value": true + } + } + } + ] + } + } + }, + "hardwareProfile": { + "$id": "2552", + "kind": "model", + "type": { + "$ref": "1396" + }, + "value": { + "$id": "2553", + "vmSizeProperties": { + "$id": "2554", + "kind": "model", + "type": { + "$ref": "1398" + }, + "value": { + "$id": "2555", + "vCPUsAvailable": { + "$id": "2556", + "kind": "number", + "type": { + "$ref": "1400" + }, + "value": 16 + }, + "vCPUsPerCore": { + "$id": "2557", + "kind": "number", + "type": { + "$ref": "1404" + }, + "value": 23 + } + } + } + } + }, + "serviceArtifactReference": { + "$id": "2558", + "kind": "model", + "type": { + "$ref": "1412" + }, + "value": { + "$id": "2559", + "id": { + "$id": "2560", + "kind": "string", + "type": { + "$ref": "1414" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactsName}/vmArtifactsProfiles/{vmArtifactsProfileName}" + } + } + }, + "securityPostureReference": { + "$id": "2561", + "kind": "model", + "type": { + "$ref": "1421" + }, + "value": { + "$id": "2562", + "id": { + "$id": "2563", + "kind": "string", + "type": { + "$ref": "1423" + }, + "value": "/CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest" + }, + "excludeExtensions": { + "$id": "2564", + "kind": "array", + "type": { + "$ref": "1427" + }, + "value": [ + { + "$id": "2565", + "kind": "string", + "type": { + "$ref": "1428" + }, + "value": "{securityPostureVMExtensionName}" + } + ] + }, + "isOverridable": { + "$id": "2566", + "kind": "boolean", + "type": { + "$ref": "1432" + }, + "value": true + } + } + } + } + }, + "computeApiVersion": { + "$id": "2567", + "kind": "string", + "type": { + "$ref": "1454" + }, + "value": "2023-07-01" + }, + "platformFaultDomainCount": { + "$id": "2568", + "kind": "number", + "type": { + "$ref": "1458" + }, + "value": 1 + } + } + } + } + }, + "zones": { + "$id": "2569", + "kind": "array", + "type": { + "$ref": "1489" + }, + "value": [ + { + "$id": "2570", + "kind": "string", + "type": { + "$ref": "1490" + }, + "value": "zone1" + }, + { + "$id": "2571", + "kind": "string", + "type": { + "$ref": "1490" + }, + "value": "zone2" + } + ] + }, + "identity": { + "$id": "2572", + "kind": "model", + "type": { + "$ref": "1494" + }, + "value": { + "$id": "2573", + "type": { + "$id": "2574", + "kind": "string", + "type": { + "$ref": "318" + }, + "value": "UserAssigned" + }, + "userAssignedIdentities": { + "$id": "2575", + "kind": "dict", + "type": { + "$ref": "1509" + }, + "value": { + "$id": "2576", + "key9851": { + "$id": "2577", + "kind": "model", + "type": { + "$ref": "1512" + }, + "value": { + "$id": "2578" + } + } + } + } + } + }, + "tags": { + "$id": "2579", + "kind": "dict", + "type": { + "$ref": "475" + }, + "value": { + "$id": "2580", + "key3518": { + "$id": "2581", + "kind": "string", + "type": { + "$ref": "477" + }, + "value": "luvrnuvsgdpbuofdskkcoqhfh" + } + } + }, + "location": { + "$id": "2582", + "kind": "string", + "type": { + "$ref": "481" + }, + "value": "westus" + }, + "plan": { + "$id": "2583", + "kind": "model", + "type": { + "$ref": "1528" + }, + "value": { + "$id": "2584", + "name": { + "$id": "2585", + "kind": "string", + "type": { + "$ref": "1530" + }, + "value": "jwgrcrnrtfoxn" + }, + "publisher": { + "$id": "2586", + "kind": "string", + "type": { + "$ref": "1534" + }, + "value": "iozjbiqqckqm" + }, + "product": { + "$id": "2587", + "kind": "string", + "type": { + "$ref": "1538" + }, + "value": "cgopbyvdyqikahwyxfpzwaqk" + }, + "promotionCode": { + "$id": "2588", + "kind": "string", + "type": { + "$ref": "1542" + }, + "value": "naglezezplcaruqogtxnuizslqnnbr" + }, + "version": { + "$id": "2589", + "kind": "string", + "type": { + "$ref": "1546" + }, + "value": "wa" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "2590", + "response": { + "$ref": "2218" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2591", + "kind": "model", + "type": { + "$ref": "429" + }, + "value": { + "$id": "2592", + "properties": { + "$id": "2593", + "kind": "model", + "type": { + "$ref": "485" + }, + "value": { + "$id": "2594", + "provisioningState": { + "$id": "2595", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + }, + "spotPriorityProfile": { + "$id": "2596", + "kind": "model", + "type": { + "$ref": "490" + }, + "value": { + "$id": "2597", + "capacity": { + "$id": "2598", + "kind": "number", + "type": { + "$ref": "492" + }, + "value": 10 + }, + "minCapacity": { + "$id": "2599", + "kind": "number", + "type": { + "$ref": "496" + }, + "value": 20 + }, + "maxPricePerVM": { + "$id": "2600", + "kind": "number", + "type": { + "$ref": "500" + }, + "value": 0.00865 + }, + "evictionPolicy": { + "$id": "2601", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "Delete" + }, + "allocationStrategy": { + "$id": "2602", + "kind": "string", + "type": { + "$ref": "36" + }, + "value": "PriceCapacityOptimized" + }, + "maintain": { + "$id": "2603", + "kind": "boolean", + "type": { + "$ref": "510" + }, + "value": true + } + } + }, + "regularPriorityProfile": { + "$id": "2604", + "kind": "model", + "type": { + "$ref": "516" + }, + "value": { + "$id": "2605", + "capacity": { + "$id": "2606", + "kind": "number", + "type": { + "$ref": "518" + }, + "value": 10 + }, + "minCapacity": { + "$id": "2607", + "kind": "number", + "type": { + "$ref": "522" + }, + "value": 10 + }, + "allocationStrategy": { + "$id": "2608", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "LowestPrice" + } + } + }, + "vmSizesProfile": { + "$id": "2609", + "kind": "array", + "type": { + "$ref": "531" + }, + "value": [ + { + "$id": "2610", + "kind": "model", + "type": { + "$ref": "532" + }, + "value": { + "$id": "2611", + "name": { + "$id": "2612", + "kind": "string", + "type": { + "$ref": "534" + }, + "value": "Standard_d1_v2" + }, + "rank": { + "$id": "2613", + "kind": "number", + "type": { + "$ref": "538" + }, + "value": 19225 + } + } + } + ] + }, + "computeProfile": { + "$id": "2614", + "kind": "model", + "type": { + "$ref": "1449" + }, + "value": { + "$id": "2615", + "baseVirtualMachineProfile": { + "$id": "2616", + "kind": "model", + "type": { + "$ref": "644" + }, + "value": { + "$id": "2617", + "osProfile": { + "$id": "2618", + "kind": "model", + "type": { + "$ref": "646" + }, + "value": { + "$id": "2619", + "computerNamePrefix": { + "$id": "2620", + "kind": "string", + "type": { + "$ref": "648" + }, + "value": "o" + }, + "adminUsername": { + "$id": "2621", + "kind": "string", + "type": { + "$ref": "652" + }, + "value": "nrgzqciiaaxjrqldbmjbqkyhntp" + }, + "windowsConfiguration": { + "$id": "2622", + "kind": "model", + "type": { + "$ref": "664" + }, + "value": { + "$id": "2623", + "provisionVMAgent": { + "$id": "2624", + "kind": "boolean", + "type": { + "$ref": "666" + }, + "value": true + }, + "enableAutomaticUpdates": { + "$id": "2625", + "kind": "boolean", + "type": { + "$ref": "670" + }, + "value": true + }, + "timeZone": { + "$id": "2626", + "kind": "string", + "type": { + "$ref": "674" + }, + "value": "hlyjiqcfksgrpjrct" + }, + "additionalUnattendContent": { + "$id": "2627", + "kind": "array", + "type": { + "$ref": "678" + }, + "value": [ + { + "$id": "2628", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "2629", + "passName": { + "$id": "2630", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "OobeSystem" + }, + "componentName": { + "$id": "2631", + "kind": "string", + "type": { + "$ref": "685" + }, + "value": "Microsoft-Windows-Shell-Setup" + }, + "settingName": { + "$id": "2632", + "kind": "string", + "type": { + "$ref": "116" + }, + "value": "AutoLogon" + } + } + } + ] + }, + "patchSettings": { + "$id": "2633", + "kind": "model", + "type": { + "$ref": "698" + }, + "value": { + "$id": "2634", + "patchMode": { + "$id": "2635", + "kind": "string", + "type": { + "$ref": "122" + }, + "value": "Manual" + }, + "enableHotpatching": { + "$id": "2636", + "kind": "boolean", + "type": { + "$ref": "703" + }, + "value": true + }, + "assessmentMode": { + "$id": "2637", + "kind": "string", + "type": { + "$ref": "130" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "2638", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "2639", + "rebootSetting": { + "$id": "2640", + "kind": "string", + "type": { + "$ref": "136" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "2641", + "kind": "boolean", + "type": { + "$ref": "715" + }, + "value": true + } + } + } + } + }, + "winRM": { + "$id": "2642", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "2643", + "listeners": { + "$id": "2644", + "kind": "array", + "type": { + "$ref": "725" + }, + "value": [ + { + "$id": "2645", + "kind": "model", + "type": { + "$ref": "726" + }, + "value": { + "$id": "2646", + "protocol": { + "$id": "2647", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "Https" + }, + "certificateUrl": { + "$id": "2648", + "kind": "string", + "type": { + "$ref": "731" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + } + } + } + ] + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "2649", + "kind": "boolean", + "type": { + "$ref": "739" + }, + "value": true + } + } + }, + "linuxConfiguration": { + "$id": "2650", + "kind": "model", + "type": { + "$ref": "745" + }, + "value": { + "$id": "2651", + "disablePasswordAuthentication": { + "$id": "2652", + "kind": "boolean", + "type": { + "$ref": "747" + }, + "value": true + }, + "ssh": { + "$id": "2653", + "kind": "model", + "type": { + "$ref": "751" + }, + "value": { + "$id": "2654", + "publicKeys": { + "$id": "2655", + "kind": "array", + "type": { + "$ref": "753" + }, + "value": [ + { + "$id": "2656", + "kind": "model", + "type": { + "$ref": "754" + }, + "value": { + "$id": "2657", + "path": { + "$id": "2658", + "kind": "string", + "type": { + "$ref": "756" + }, + "value": "kmqz" + }, + "keyData": { + "$id": "2659", + "kind": "string", + "type": { + "$ref": "760" + }, + "value": "kivgsubusvpprwqaqpjcmhsv" + } + } + } + ] + } + } + }, + "provisionVMAgent": { + "$id": "2660", + "kind": "boolean", + "type": { + "$ref": "768" + }, + "value": true + }, + "patchSettings": { + "$id": "2661", + "kind": "model", + "type": { + "$ref": "772" + }, + "value": { + "$id": "2662", + "patchMode": { + "$id": "2663", + "kind": "string", + "type": { + "$ref": "152" + }, + "value": "ImageDefault" + }, + "assessmentMode": { + "$id": "2664", + "kind": "string", + "type": { + "$ref": "158" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "2665", + "kind": "model", + "type": { + "$ref": "780" + }, + "value": { + "$id": "2666", + "rebootSetting": { + "$id": "2667", + "kind": "string", + "type": { + "$ref": "164" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "2668", + "kind": "boolean", + "type": { + "$ref": "785" + }, + "value": true + } + } + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "2669", + "kind": "boolean", + "type": { + "$ref": "793" + }, + "value": true + } + } + }, + "secrets": { + "$id": "2670", + "kind": "array", + "type": { + "$ref": "799" + }, + "value": [ + { + "$id": "2671", + "kind": "model", + "type": { + "$ref": "800" + }, + "value": { + "$id": "2672", + "sourceVault": { + "$id": "2673", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "2674", + "id": { + "$id": "2675", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + }, + "vaultCertificates": { + "$id": "2676", + "kind": "array", + "type": { + "$ref": "811" + }, + "value": [ + { + "$id": "2677", + "kind": "model", + "type": { + "$ref": "812" + }, + "value": { + "$id": "2678", + "certificateUrl": { + "$id": "2679", + "kind": "string", + "type": { + "$ref": "814" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + }, + "certificateStore": { + "$id": "2680", + "kind": "string", + "type": { + "$ref": "818" + }, + "value": "nlxrwavpzhueffxsshlun" + } + } + } + ] + } + } + } + ] + }, + "allowExtensionOperations": { + "$id": "2681", + "kind": "boolean", + "type": { + "$ref": "826" + }, + "value": true + }, + "requireGuestProvisionSignal": { + "$id": "2682", + "kind": "boolean", + "type": { + "$ref": "830" + }, + "value": true + } + } + }, + "storageProfile": { + "$id": "2683", + "kind": "model", + "type": { + "$ref": "836" + }, + "value": { + "$id": "2684", + "imageReference": { + "$id": "2685", + "kind": "model", + "type": { + "$ref": "838" + }, + "value": { + "$id": "2686", + "publisher": { + "$id": "2687", + "kind": "string", + "type": { + "$ref": "845" + }, + "value": "mqxgwbiyjzmxavhbkd" + }, + "offer": { + "$id": "2688", + "kind": "string", + "type": { + "$ref": "849" + }, + "value": "isxgumkarlkomp" + }, + "sku": { + "$id": "2689", + "kind": "string", + "type": { + "$ref": "853" + }, + "value": "eojmppqcrnpmxirtp" + }, + "version": { + "$id": "2690", + "kind": "string", + "type": { + "$ref": "857" + }, + "value": "wvpcqefgtmqdgltiuz" + }, + "exactVersion": { + "$id": "2691", + "kind": "string", + "type": { + "$ref": "861" + }, + "value": "zjbntmiskjexlr" + }, + "sharedGalleryImageId": { + "$id": "2692", + "kind": "string", + "type": { + "$ref": "865" + }, + "value": "kmkgihoxwlawuuhcinfirktdwkmx" + }, + "communityGalleryImageId": { + "$id": "2693", + "kind": "string", + "type": { + "$ref": "869" + }, + "value": "vlqe" + }, + "id": { + "$id": "2694", + "kind": "string", + "type": { + "$ref": "840" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}/versions/{versionName}" + } + } + }, + "osDisk": { + "$id": "2695", + "kind": "model", + "type": { + "$ref": "875" + }, + "value": { + "$id": "2696", + "name": { + "$id": "2697", + "kind": "string", + "type": { + "$ref": "877" + }, + "value": "wfttw" + }, + "caching": { + "$id": "2698", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "2699", + "kind": "boolean", + "type": { + "$ref": "884" + }, + "value": true + }, + "createOption": { + "$id": "2700", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "FromImage" + }, + "diffDiskSettings": { + "$id": "2701", + "kind": "model", + "type": { + "$ref": "891" + }, + "value": { + "$id": "2702", + "option": { + "$id": "2703", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "Local" + }, + "placement": { + "$id": "2704", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "CacheDisk" + } + } + }, + "diskSizeGB": { + "$id": "2705", + "kind": "number", + "type": { + "$ref": "901" + }, + "value": 14 + }, + "osType": { + "$id": "2706", + "kind": "string", + "type": { + "$ref": "206" + }, + "value": "Windows" + }, + "image": { + "$id": "2707", + "kind": "model", + "type": { + "$ref": "908" + }, + "value": { + "$id": "2708", + "uri": { + "$id": "2709", + "kind": "string", + "type": { + "$ref": "910" + }, + "value": "https://myStorageAccountName.blob.core.windows.net/myContainerName/myVhdName.vhd" + } + } + }, + "vhdContainers": { + "$id": "2710", + "kind": "array", + "type": { + "$ref": "916" + }, + "value": [ + { + "$id": "2711", + "kind": "string", + "type": { + "$ref": "917" + }, + "value": "tkzcwddtinkfpnfklatw" + } + ] + }, + "managedDisk": { + "$id": "2712", + "kind": "model", + "type": { + "$ref": "921" + }, + "value": { + "$id": "2713", + "storageAccountType": { + "$id": "2714", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "2715", + "kind": "model", + "type": { + "$ref": "926" + }, + "value": { + "$id": "2716", + "id": { + "$id": "2717", + "kind": "string", + "type": { + "$ref": "928" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "2718", + "kind": "model", + "type": { + "$ref": "935" + }, + "value": { + "$id": "2719", + "securityEncryptionType": { + "$id": "2720", + "kind": "string", + "type": { + "$ref": "228" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "2721", + "kind": "model", + "type": { + "$ref": "926" + }, + "value": { + "$id": "2722", + "id": { + "$id": "2723", + "kind": "string", + "type": { + "$ref": "928" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "deleteOption": { + "$id": "2724", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "Delete" + } + } + }, + "dataDisks": { + "$id": "2725", + "kind": "array", + "type": { + "$ref": "952" + }, + "value": [ + { + "$id": "2726", + "kind": "model", + "type": { + "$ref": "953" + }, + "value": { + "$id": "2727", + "name": { + "$id": "2728", + "kind": "string", + "type": { + "$ref": "955" + }, + "value": "eogiykmdmeikswxmigjws" + }, + "lun": { + "$id": "2729", + "kind": "number", + "type": { + "$ref": "959" + }, + "value": 14 + }, + "caching": { + "$id": "2730", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "2731", + "kind": "boolean", + "type": { + "$ref": "966" + }, + "value": true + }, + "createOption": { + "$id": "2732", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "FromImage" + }, + "diskSizeGB": { + "$id": "2733", + "kind": "number", + "type": { + "$ref": "973" + }, + "value": 6 + }, + "managedDisk": { + "$id": "2734", + "kind": "model", + "type": { + "$ref": "921" + }, + "value": { + "$id": "2735", + "storageAccountType": { + "$id": "2736", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "2737", + "kind": "model", + "type": { + "$ref": "926" + }, + "value": { + "$id": "2738", + "id": { + "$id": "2739", + "kind": "string", + "type": { + "$ref": "928" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "2740", + "kind": "model", + "type": { + "$ref": "935" + }, + "value": { + "$id": "2741", + "securityEncryptionType": { + "$id": "2742", + "kind": "string", + "type": { + "$ref": "228" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "2743", + "kind": "model", + "type": { + "$ref": "926" + }, + "value": { + "$id": "2744", + "id": { + "$id": "2745", + "kind": "string", + "type": { + "$ref": "928" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "diskIOPSReadWrite": { + "$id": "2746", + "kind": "number", + "type": { + "$ref": "980" + }, + "value": 27 + }, + "diskMBpsReadWrite": { + "$id": "2747", + "kind": "number", + "type": { + "$ref": "984" + }, + "value": 2 + }, + "deleteOption": { + "$id": "2748", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "Delete" + } + } + } + ] + }, + "diskControllerType": { + "$id": "2749", + "kind": "string", + "type": { + "$ref": "242" + }, + "value": "uzb" + } + } + }, + "networkProfile": { + "$id": "2750", + "kind": "model", + "type": { + "$ref": "998" + }, + "value": { + "$id": "2751", + "healthProbe": { + "$id": "2752", + "kind": "model", + "type": { + "$ref": "1000" + }, + "value": { + "$id": "2753", + "id": { + "$id": "2754", + "kind": "string", + "type": { + "$ref": "1002" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}" + } + } + }, + "networkInterfaceConfigurations": { + "$id": "2755", + "kind": "array", + "type": { + "$ref": "1009" + }, + "value": [ + { + "$id": "2756", + "kind": "model", + "type": { + "$ref": "1010" + }, + "value": { + "$id": "2757", + "name": { + "$id": "2758", + "kind": "string", + "type": { + "$ref": "1012" + }, + "value": "i" + }, + "properties": { + "$id": "2759", + "kind": "model", + "type": { + "$ref": "1016" + }, + "value": { + "$id": "2760", + "primary": { + "$id": "2761", + "kind": "boolean", + "type": { + "$ref": "1018" + }, + "value": true + }, + "enableAcceleratedNetworking": { + "$id": "2762", + "kind": "boolean", + "type": { + "$ref": "1022" + }, + "value": true + }, + "disableTcpStateTracking": { + "$id": "2763", + "kind": "boolean", + "type": { + "$ref": "1026" + }, + "value": true + }, + "enableFpga": { + "$id": "2764", + "kind": "boolean", + "type": { + "$ref": "1030" + }, + "value": true + }, + "networkSecurityGroup": { + "$id": "2765", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "2766", + "id": { + "$id": "2767", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}" + } + } + }, + "dnsSettings": { + "$id": "2768", + "kind": "model", + "type": { + "$ref": "1037" + }, + "value": { + "$id": "2769", + "dnsServers": { + "$id": "2770", + "kind": "array", + "type": { + "$ref": "1039" + }, + "value": [ + { + "$id": "2771", + "kind": "string", + "type": { + "$ref": "1040" + }, + "value": "nxmmfolhclsesu" + } + ] + } + } + }, + "ipConfigurations": { + "$id": "2772", + "kind": "array", + "type": { + "$ref": "1046" + }, + "value": [ + { + "$id": "2773", + "kind": "model", + "type": { + "$ref": "1047" + }, + "value": { + "$id": "2774", + "name": { + "$id": "2775", + "kind": "string", + "type": { + "$ref": "1049" + }, + "value": "oezqhkidfhyywlfzwuotilrpbqnjg" + }, + "properties": { + "$id": "2776", + "kind": "model", + "type": { + "$ref": "1053" + }, + "value": { + "$id": "2777", + "subnet": { + "$id": "2778", + "kind": "model", + "type": { + "$ref": "1000" + }, + "value": { + "$id": "2779", + "id": { + "$id": "2780", + "kind": "string", + "type": { + "$ref": "1002" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}" + } + } + }, + "primary": { + "$id": "2781", + "kind": "boolean", + "type": { + "$ref": "1058" + }, + "value": true + }, + "publicIPAddressConfiguration": { + "$id": "2782", + "kind": "model", + "type": { + "$ref": "1062" + }, + "value": { + "$id": "2783", + "name": { + "$id": "2784", + "kind": "string", + "type": { + "$ref": "1064" + }, + "value": "fvpqf" + }, + "properties": { + "$id": "2785", + "kind": "model", + "type": { + "$ref": "1068" + }, + "value": { + "$id": "2786", + "idleTimeoutInMinutes": { + "$id": "2787", + "kind": "number", + "type": { + "$ref": "1070" + }, + "value": 9 + }, + "dnsSettings": { + "$id": "2788", + "kind": "model", + "type": { + "$ref": "1074" + }, + "value": { + "$id": "2789", + "domainNameLabel": { + "$id": "2790", + "kind": "string", + "type": { + "$ref": "1076" + }, + "value": "ukrddzvmorpmfsczjwtbvp" + }, + "domainNameLabelScope": { + "$id": "2791", + "kind": "string", + "type": { + "$ref": "248" + }, + "value": "TenantReuse" + } + } + }, + "ipTags": { + "$id": "2792", + "kind": "array", + "type": { + "$ref": "1085" + }, + "value": [ + { + "$id": "2793", + "kind": "model", + "type": { + "$ref": "1086" + }, + "value": { + "$id": "2794", + "ipTagType": { + "$id": "2795", + "kind": "string", + "type": { + "$ref": "1088" + }, + "value": "sddgsoemnzgqizale" + }, + "tag": { + "$id": "2796", + "kind": "string", + "type": { + "$ref": "1092" + }, + "value": "wufmhrjsakbiaetyara" + } + } + } + ] + }, + "publicIPPrefix": { + "$id": "2797", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "2798", + "id": { + "$id": "2799", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}" + } + } + }, + "publicIPAddressVersion": { + "$id": "2800", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "IPv4" + }, + "deleteOption": { + "$id": "2801", + "kind": "string", + "type": { + "$ref": "264" + }, + "value": "Delete" + } + } + }, + "sku": { + "$id": "2802", + "kind": "model", + "type": { + "$ref": "1109" + }, + "value": { + "$id": "2803", + "name": { + "$id": "2804", + "kind": "string", + "type": { + "$ref": "270" + }, + "value": "Basic" + }, + "tier": { + "$id": "2805", + "kind": "string", + "type": { + "$ref": "276" + }, + "value": "Regional" + } + } + } + } + }, + "privateIPAddressVersion": { + "$id": "2806", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "IPv4" + }, + "applicationGatewayBackendAddressPools": { + "$id": "2807", + "kind": "array", + "type": { + "$ref": "1124" + }, + "value": [ + { + "$id": "2808", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "2809", + "id": { + "$id": "2810", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "applicationSecurityGroups": { + "$id": "2811", + "kind": "array", + "type": { + "$ref": "1128" + }, + "value": [ + { + "$id": "2812", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "2813", + "id": { + "$id": "2814", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}" + } + } + } + ] + }, + "loadBalancerBackendAddressPools": { + "$id": "2815", + "kind": "array", + "type": { + "$ref": "1132" + }, + "value": [ + { + "$id": "2816", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "2817", + "id": { + "$id": "2818", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "loadBalancerInboundNatPools": { + "$id": "2819", + "kind": "array", + "type": { + "$ref": "1136" + }, + "value": [ + { + "$id": "2820", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "2821", + "id": { + "$id": "2822", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatPools/{inboundNatPoolName}" + } + } + } + ] + } + } + } + } + } + ] + }, + "enableIPForwarding": { + "$id": "2823", + "kind": "boolean", + "type": { + "$ref": "1144" + }, + "value": true + }, + "deleteOption": { + "$id": "2824", + "kind": "string", + "type": { + "$ref": "264" + }, + "value": "Delete" + }, + "auxiliaryMode": { + "$id": "2825", + "kind": "string", + "type": { + "$ref": "282" + }, + "value": "None" + }, + "auxiliarySku": { + "$id": "2826", + "kind": "string", + "type": { + "$ref": "290" + }, + "value": "None" + } + } + } + } + } + ] + }, + "networkApiVersion": { + "$id": "2827", + "kind": "string", + "type": { + "$ref": "302" + }, + "value": "2020-11-01" + } + } + }, + "securityProfile": { + "$id": "2828", + "kind": "model", + "type": { + "$ref": "1166" + }, + "value": { + "$id": "2829", + "uefiSettings": { + "$id": "2830", + "kind": "model", + "type": { + "$ref": "1168" + }, + "value": { + "$id": "2831", + "secureBootEnabled": { + "$id": "2832", + "kind": "boolean", + "type": { + "$ref": "1170" + }, + "value": true + }, + "vTpmEnabled": { + "$id": "2833", + "kind": "boolean", + "type": { + "$ref": "1174" + }, + "value": true + } + } + }, + "encryptionAtHost": { + "$id": "2834", + "kind": "boolean", + "type": { + "$ref": "1180" + }, + "value": true + }, + "securityType": { + "$id": "2835", + "kind": "string", + "type": { + "$ref": "306" + }, + "value": "TrustedLaunch" + }, + "encryptionIdentity": { + "$id": "2836", + "kind": "model", + "type": { + "$ref": "1187" + }, + "value": { + "$id": "2837", + "userAssignedIdentityResourceId": { + "$id": "2838", + "kind": "string", + "type": { + "$ref": "1189" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{userAssignedIdentityName}" + } + } + }, + "proxyAgentSettings": { + "$id": "2839", + "kind": "model", + "type": { + "$ref": "1196" + }, + "value": { + "$id": "2840", + "enabled": { + "$id": "2841", + "kind": "boolean", + "type": { + "$ref": "1198" + }, + "value": true + }, + "mode": { + "$id": "2842", + "kind": "string", + "type": { + "$ref": "312" + }, + "value": "Audit" + }, + "keyIncarnationId": { + "$id": "2843", + "kind": "number", + "type": { + "$ref": "1205" + }, + "value": 20 + } + } + } + } + }, + "diagnosticsProfile": { + "$id": "2844", + "kind": "model", + "type": { + "$ref": "1213" + }, + "value": { + "$id": "2845", + "bootDiagnostics": { + "$id": "2846", + "kind": "model", + "type": { + "$ref": "1215" + }, + "value": { + "$id": "2847", + "enabled": { + "$id": "2848", + "kind": "boolean", + "type": { + "$ref": "1217" + }, + "value": true + }, + "storageUri": { + "$id": "2849", + "kind": "string", + "type": { + "$ref": "1221" + }, + "value": "http://myStorageAccountName.blob.core.windows.net" + } + } + } + } + }, + "extensionProfile": { + "$id": "2850", + "kind": "model", + "type": { + "$ref": "1229" + }, + "value": { + "$id": "2851", + "extensions": { + "$id": "2852", + "kind": "array", + "type": { + "$ref": "1231" + }, + "value": [ + { + "$id": "2853", + "kind": "model", + "type": { + "$ref": "1232" + }, + "value": { + "$id": "2854", + "name": { + "$id": "2855", + "kind": "string", + "type": { + "$ref": "1239" + }, + "value": "bndxuxx" + }, + "type": { + "$id": "2856", + "kind": "string", + "type": { + "$ref": "1243" + }, + "value": "cmeam" + }, + "properties": { + "$id": "2857", + "kind": "model", + "type": { + "$ref": "1247" + }, + "value": { + "$id": "2858", + "forceUpdateTag": { + "$id": "2859", + "kind": "string", + "type": { + "$ref": "1249" + }, + "value": "yhgxw" + }, + "publisher": { + "$id": "2860", + "kind": "string", + "type": { + "$ref": "1253" + }, + "value": "kpxtirxjfprhs" + }, + "type": { + "$id": "2861", + "kind": "string", + "type": { + "$ref": "1257" + }, + "value": "pgjilctjjwaa" + }, + "typeHandlerVersion": { + "$id": "2862", + "kind": "string", + "type": { + "$ref": "1261" + }, + "value": "zevivcoilxmbwlrihhhibq" + }, + "autoUpgradeMinorVersion": { + "$id": "2863", + "kind": "boolean", + "type": { + "$ref": "1265" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "2864", + "kind": "boolean", + "type": { + "$ref": "1269" + }, + "value": true + }, + "settings": { + "$id": "2865", + "kind": "dict", + "type": { + "$ref": "1273" + }, + "value": { + "$id": "2866" + } + }, + "provisioningState": { + "$id": "2867", + "kind": "string", + "type": { + "$ref": "1285" + }, + "value": "Succeeded" + }, + "provisionAfterExtensions": { + "$id": "2868", + "kind": "array", + "type": { + "$ref": "1289" + }, + "value": [ + { + "$id": "2869", + "kind": "string", + "type": { + "$ref": "1290" + }, + "value": "nftzosroolbcwmpupujzqwqe" + } + ] + }, + "suppressFailures": { + "$id": "2870", + "kind": "boolean", + "type": { + "$ref": "1294" + }, + "value": true + }, + "protectedSettingsFromKeyVault": { + "$id": "2871", + "kind": "model", + "type": { + "$ref": "1298" + }, + "value": { + "$id": "2872", + "secretUrl": { + "$id": "2873", + "kind": "string", + "type": { + "$ref": "1300" + }, + "value": "https://myVaultName.vault.azure.net/secrets/secret/mySecretName" + }, + "sourceVault": { + "$id": "2874", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "2875", + "id": { + "$id": "2876", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + } + } + } + } + }, + "id": { + "$id": "2877", + "kind": "string", + "type": { + "$ref": "1234" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{extensionName}" + } + } + } + ] + }, + "extensionsTimeBudget": { + "$id": "2878", + "kind": "string", + "type": { + "$ref": "1313" + }, + "value": "mbhjahtdygwgyszdwjtvlvtgchdwil" + } + } + }, + "licenseType": { + "$id": "2879", + "kind": "string", + "type": { + "$ref": "1319" + }, + "value": "v" + }, + "scheduledEventsProfile": { + "$id": "2880", + "kind": "model", + "type": { + "$ref": "1323" + }, + "value": { + "$id": "2881", + "terminateNotificationProfile": { + "$id": "2882", + "kind": "model", + "type": { + "$ref": "1325" + }, + "value": { + "$id": "2883", + "notBeforeTimeout": { + "$id": "2884", + "kind": "string", + "type": { + "$ref": "1327" + }, + "value": "iljppmmw" + }, + "enable": { + "$id": "2885", + "kind": "boolean", + "type": { + "$ref": "1331" + }, + "value": true + } + } + }, + "osImageNotificationProfile": { + "$id": "2886", + "kind": "model", + "type": { + "$ref": "1337" + }, + "value": { + "$id": "2887", + "notBeforeTimeout": { + "$id": "2888", + "kind": "string", + "type": { + "$ref": "1339" + }, + "value": "olbpadmevekyczfokodtfprxti" + }, + "enable": { + "$id": "2889", + "kind": "boolean", + "type": { + "$ref": "1343" + }, + "value": true + } + } + } + } + }, + "userData": { + "$id": "2890", + "kind": "string", + "type": { + "$ref": "1351" + }, + "value": "s" + }, + "capacityReservation": { + "$id": "2891", + "kind": "model", + "type": { + "$ref": "1355" + }, + "value": { + "$id": "2892", + "capacityReservationGroup": { + "$id": "2893", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "2894", + "id": { + "$id": "2895", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}" + } + } + } + } + }, + "applicationProfile": { + "$id": "2896", + "kind": "model", + "type": { + "$ref": "1362" + }, + "value": { + "$id": "2897", + "galleryApplications": { + "$id": "2898", + "kind": "array", + "type": { + "$ref": "1364" + }, + "value": [ + { + "$id": "2899", + "kind": "model", + "type": { + "$ref": "1365" + }, + "value": { + "$id": "2900", + "tags": { + "$id": "2901", + "kind": "string", + "type": { + "$ref": "1367" + }, + "value": "eyrqjbib" + }, + "order": { + "$id": "2902", + "kind": "number", + "type": { + "$ref": "1371" + }, + "value": 5 + }, + "packageReferenceId": { + "$id": "2903", + "kind": "string", + "type": { + "$ref": "1375" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{applicationName}/versions/{versionName}" + }, + "treatFailureAsDeploymentFailure": { + "$id": "2904", + "kind": "boolean", + "type": { + "$ref": "1384" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "2905", + "kind": "boolean", + "type": { + "$ref": "1388" + }, + "value": true + } + } + } + ] + } + } + }, + "hardwareProfile": { + "$id": "2906", + "kind": "model", + "type": { + "$ref": "1396" + }, + "value": { + "$id": "2907", + "vmSizeProperties": { + "$id": "2908", + "kind": "model", + "type": { + "$ref": "1398" + }, + "value": { + "$id": "2909", + "vCPUsAvailable": { + "$id": "2910", + "kind": "number", + "type": { + "$ref": "1400" + }, + "value": 16 + }, + "vCPUsPerCore": { + "$id": "2911", + "kind": "number", + "type": { + "$ref": "1404" + }, + "value": 23 + } + } + } + } + }, + "serviceArtifactReference": { + "$id": "2912", + "kind": "model", + "type": { + "$ref": "1412" + }, + "value": { + "$id": "2913", + "id": { + "$id": "2914", + "kind": "string", + "type": { + "$ref": "1414" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactsName}/vmArtifactsProfiles/{vmArtifactsProfileName}" + } + } + }, + "securityPostureReference": { + "$id": "2915", + "kind": "model", + "type": { + "$ref": "1421" + }, + "value": { + "$id": "2916", + "id": { + "$id": "2917", + "kind": "string", + "type": { + "$ref": "1423" + }, + "value": "/CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest" + }, + "excludeExtensions": { + "$id": "2918", + "kind": "array", + "type": { + "$ref": "1427" + }, + "value": [ + { + "$id": "2919", + "kind": "string", + "type": { + "$ref": "1428" + }, + "value": "{securityPostureVMExtensionName}" + } + ] + }, + "isOverridable": { + "$id": "2920", + "kind": "boolean", + "type": { + "$ref": "1432" + }, + "value": true + } + } + }, + "timeCreated": { + "$id": "2921", + "kind": "string", + "type": { + "$ref": "1438" + }, + "value": "2024-04-29T21:51:44.043Z" + } + } + }, + "computeApiVersion": { + "$id": "2922", + "kind": "string", + "type": { + "$ref": "1454" + }, + "value": "2023-07-01" + }, + "platformFaultDomainCount": { + "$id": "2923", + "kind": "number", + "type": { + "$ref": "1458" + }, + "value": 1 + } + } + }, + "timeCreated": { + "$id": "2924", + "kind": "string", + "type": { + "$ref": "1476" + }, + "value": "2024-07-10T00:16:34.8590555+00:00" + }, + "uniqueId": { + "$id": "2925", + "kind": "string", + "type": { + "$ref": "1481" + }, + "value": "a2f7fabd-bbc2-4a20-afe1-49fdb3885a28" + } + } + }, + "zones": { + "$id": "2926", + "kind": "array", + "type": { + "$ref": "1489" + }, + "value": [ + { + "$id": "2927", + "kind": "string", + "type": { + "$ref": "1490" + }, + "value": "zone1" + }, + { + "$id": "2928", + "kind": "string", + "type": { + "$ref": "1490" + }, + "value": "zone2" + } + ] + }, + "identity": { + "$id": "2929", + "kind": "model", + "type": { + "$ref": "1494" + }, + "value": { + "$id": "2930", + "principalId": { + "$id": "2931", + "kind": "string", + "type": { + "$ref": "1496" + }, + "value": "4d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "tenantId": { + "$id": "2932", + "kind": "string", + "type": { + "$ref": "1501" + }, + "value": "5d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "type": { + "$id": "2933", + "kind": "string", + "type": { + "$ref": "318" + }, + "value": "UserAssigned" + }, + "userAssignedIdentities": { + "$id": "2934", + "kind": "dict", + "type": { + "$ref": "1509" + }, + "value": { + "$id": "2935", + "key9851": { + "$id": "2936", + "kind": "model", + "type": { + "$ref": "1512" + }, + "value": { + "$id": "2937", + "principalId": { + "$id": "2938", + "kind": "string", + "type": { + "$ref": "1519" + }, + "value": "6d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "clientId": { + "$id": "2939", + "kind": "string", + "type": { + "$ref": "1514" + }, + "value": "7d508e5b-374b-4382-9a1c-01fb8b6cb37c" + } + } + } + } + } + } + }, + "plan": { + "$id": "2940", + "kind": "model", + "type": { + "$ref": "1528" + }, + "value": { + "$id": "2941", + "name": { + "$id": "2942", + "kind": "string", + "type": { + "$ref": "1530" + }, + "value": "jwgrcrnrtfoxn" + }, + "publisher": { + "$id": "2943", + "kind": "string", + "type": { + "$ref": "1534" + }, + "value": "iozjbiqqckqm" + }, + "product": { + "$id": "2944", + "kind": "string", + "type": { + "$ref": "1538" + }, + "value": "cgopbyvdyqikahwyxfpzwaqk" + }, + "promotionCode": { + "$id": "2945", + "kind": "string", + "type": { + "$ref": "1542" + }, + "value": "naglezezplcaruqogtxnuizslqnnbr" + }, + "version": { + "$id": "2946", + "kind": "string", + "type": { + "$ref": "1546" + }, + "value": "wa" + } + } + }, + "tags": { + "$id": "2947", + "kind": "dict", + "type": { + "$ref": "475" + }, + "value": { + "$id": "2948", + "key3518": { + "$id": "2949", + "kind": "string", + "type": { + "$ref": "477" + }, + "value": "luvrnuvsgdpbuofdskkcoqhfh" + } + } + }, + "location": { + "$id": "2950", + "kind": "string", + "type": { + "$ref": "481" + }, + "value": "westus" + }, + "id": { + "$id": "2951", + "kind": "string", + "type": { + "$ref": "433" + }, + "value": "/subscriptions/7B0CD4DB-3381-4013-9B31-FB6E6FD0FF1C/resourceGroups/rgazurefleet/providers/Microsoft.AzureFleet/fleets/testFleet" + }, + "name": { + "$id": "2952", + "kind": "string", + "type": { + "$ref": "438" + }, + "value": "testFleet" + }, + "type": { + "$id": "2953", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "Microsoft.AzureFleet/fleets" + }, + "systemData": { + "$id": "2954", + "kind": "model", + "type": { + "$ref": "447" + }, + "value": { + "$id": "2955", + "createdBy": { + "$id": "2956", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "rowegentrpoajsv" + }, + "createdByType": { + "$id": "2957", + "kind": "string", + "type": { + "$ref": "328" + }, + "value": "User" + }, + "createdAt": { + "$id": "2958", + "kind": "string", + "type": { + "$ref": "456" + }, + "value": "2024-04-29T21:51:44.043Z" + }, + "lastModifiedBy": { + "$id": "2959", + "kind": "string", + "type": { + "$ref": "461" + }, + "value": "edwuayhhaoepxzisfaqjhmrxjq" + }, + "lastModifiedByType": { + "$id": "2960", + "kind": "string", + "type": { + "$ref": "328" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "2961", + "kind": "string", + "type": { + "$ref": "468" + }, + "value": "2024-04-29T21:51:44.043Z" + } + } + } + } + } + }, + { + "$id": "2962", + "response": { + "$ref": "2219" + }, + "statusCode": 201, + "bodyValue": { + "$id": "2963", + "kind": "model", + "type": { + "$ref": "429" + }, + "value": { + "$id": "2964", + "properties": { + "$id": "2965", + "kind": "model", + "type": { + "$ref": "485" + }, + "value": { + "$id": "2966", + "provisioningState": { + "$id": "2967", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Creating" + }, + "spotPriorityProfile": { + "$id": "2968", + "kind": "model", + "type": { + "$ref": "490" + }, + "value": { + "$id": "2969", + "capacity": { + "$id": "2970", + "kind": "number", + "type": { + "$ref": "492" + }, + "value": 0 + }, + "minCapacity": { + "$id": "2971", + "kind": "number", + "type": { + "$ref": "496" + }, + "value": 0 + }, + "maxPricePerVM": { + "$id": "2972", + "kind": "number", + "type": { + "$ref": "500" + }, + "value": 0.00865 + }, + "evictionPolicy": { + "$id": "2973", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "Delete" + }, + "allocationStrategy": { + "$id": "2974", + "kind": "string", + "type": { + "$ref": "36" + }, + "value": "PriceCapacityOptimized" + }, + "maintain": { + "$id": "2975", + "kind": "boolean", + "type": { + "$ref": "510" + }, + "value": true + } + } + }, + "regularPriorityProfile": { + "$id": "2976", + "kind": "model", + "type": { + "$ref": "516" + }, + "value": { + "$id": "2977", + "capacity": { + "$id": "2978", + "kind": "number", + "type": { + "$ref": "518" + }, + "value": 20 + }, + "minCapacity": { + "$id": "2979", + "kind": "number", + "type": { + "$ref": "522" + }, + "value": 10 + }, + "allocationStrategy": { + "$id": "2980", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "LowestPrice" + } + } + }, + "vmSizesProfile": { + "$id": "2981", + "kind": "array", + "type": { + "$ref": "531" + }, + "value": [ + { + "$id": "2982", + "kind": "model", + "type": { + "$ref": "532" + }, + "value": { + "$id": "2983", + "name": { + "$id": "2984", + "kind": "string", + "type": { + "$ref": "534" + }, + "value": "Standard_d1_v2" + }, + "rank": { + "$id": "2985", + "kind": "number", + "type": { + "$ref": "538" + }, + "value": 19225 + } + } + } + ] + }, + "computeProfile": { + "$id": "2986", + "kind": "model", + "type": { + "$ref": "1449" + }, + "value": { + "$id": "2987", + "baseVirtualMachineProfile": { + "$id": "2988", + "kind": "model", + "type": { + "$ref": "644" + }, + "value": { + "$id": "2989", + "osProfile": { + "$id": "2990", + "kind": "model", + "type": { + "$ref": "646" + }, + "value": { + "$id": "2991", + "computerNamePrefix": { + "$id": "2992", + "kind": "string", + "type": { + "$ref": "648" + }, + "value": "o" + }, + "adminUsername": { + "$id": "2993", + "kind": "string", + "type": { + "$ref": "652" + }, + "value": "nrgzqciiaaxjrqldbmjbqkyhntp" + }, + "windowsConfiguration": { + "$id": "2994", + "kind": "model", + "type": { + "$ref": "664" + }, + "value": { + "$id": "2995", + "provisionVMAgent": { + "$id": "2996", + "kind": "boolean", + "type": { + "$ref": "666" + }, + "value": true + }, + "enableAutomaticUpdates": { + "$id": "2997", + "kind": "boolean", + "type": { + "$ref": "670" + }, + "value": true + }, + "timeZone": { + "$id": "2998", + "kind": "string", + "type": { + "$ref": "674" + }, + "value": "hlyjiqcfksgrpjrct" + }, + "additionalUnattendContent": { + "$id": "2999", + "kind": "array", + "type": { + "$ref": "678" + }, + "value": [ + { + "$id": "3000", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "3001", + "passName": { + "$id": "3002", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "OobeSystem" + }, + "componentName": { + "$id": "3003", + "kind": "string", + "type": { + "$ref": "685" + }, + "value": "Microsoft-Windows-Shell-Setup" + }, + "settingName": { + "$id": "3004", + "kind": "string", + "type": { + "$ref": "116" + }, + "value": "AutoLogon" + } + } + } + ] + }, + "patchSettings": { + "$id": "3005", + "kind": "model", + "type": { + "$ref": "698" + }, + "value": { + "$id": "3006", + "patchMode": { + "$id": "3007", + "kind": "string", + "type": { + "$ref": "122" + }, + "value": "Manual" + }, + "enableHotpatching": { + "$id": "3008", + "kind": "boolean", + "type": { + "$ref": "703" + }, + "value": true + }, + "assessmentMode": { + "$id": "3009", + "kind": "string", + "type": { + "$ref": "130" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "3010", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "3011", + "rebootSetting": { + "$id": "3012", + "kind": "string", + "type": { + "$ref": "136" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "3013", + "kind": "boolean", + "type": { + "$ref": "715" + }, + "value": true + } + } + } + } + }, + "winRM": { + "$id": "3014", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "3015", + "listeners": { + "$id": "3016", + "kind": "array", + "type": { + "$ref": "725" + }, + "value": [ + { + "$id": "3017", + "kind": "model", + "type": { + "$ref": "726" + }, + "value": { + "$id": "3018", + "protocol": { + "$id": "3019", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "Https" + }, + "certificateUrl": { + "$id": "3020", + "kind": "string", + "type": { + "$ref": "731" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + } + } + } + ] + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "3021", + "kind": "boolean", + "type": { + "$ref": "739" + }, + "value": true + } + } + }, + "linuxConfiguration": { + "$id": "3022", + "kind": "model", + "type": { + "$ref": "745" + }, + "value": { + "$id": "3023", + "disablePasswordAuthentication": { + "$id": "3024", + "kind": "boolean", + "type": { + "$ref": "747" + }, + "value": true + }, + "ssh": { + "$id": "3025", + "kind": "model", + "type": { + "$ref": "751" + }, + "value": { + "$id": "3026", + "publicKeys": { + "$id": "3027", + "kind": "array", + "type": { + "$ref": "753" + }, + "value": [ + { + "$id": "3028", + "kind": "model", + "type": { + "$ref": "754" + }, + "value": { + "$id": "3029", + "path": { + "$id": "3030", + "kind": "string", + "type": { + "$ref": "756" + }, + "value": "kmqz" + }, + "keyData": { + "$id": "3031", + "kind": "string", + "type": { + "$ref": "760" + }, + "value": "kivgsubusvpprwqaqpjcmhsv" + } + } + } + ] + } + } + }, + "provisionVMAgent": { + "$id": "3032", + "kind": "boolean", + "type": { + "$ref": "768" + }, + "value": true + }, + "patchSettings": { + "$id": "3033", + "kind": "model", + "type": { + "$ref": "772" + }, + "value": { + "$id": "3034", + "patchMode": { + "$id": "3035", + "kind": "string", + "type": { + "$ref": "152" + }, + "value": "ImageDefault" + }, + "assessmentMode": { + "$id": "3036", + "kind": "string", + "type": { + "$ref": "158" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "3037", + "kind": "model", + "type": { + "$ref": "780" + }, + "value": { + "$id": "3038", + "rebootSetting": { + "$id": "3039", + "kind": "string", + "type": { + "$ref": "164" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "3040", + "kind": "boolean", + "type": { + "$ref": "785" + }, + "value": true + } + } + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "3041", + "kind": "boolean", + "type": { + "$ref": "793" + }, + "value": true + } + } + }, + "secrets": { + "$id": "3042", + "kind": "array", + "type": { + "$ref": "799" + }, + "value": [ + { + "$id": "3043", + "kind": "model", + "type": { + "$ref": "800" + }, + "value": { + "$id": "3044", + "sourceVault": { + "$id": "3045", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "3046", + "id": { + "$id": "3047", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + }, + "vaultCertificates": { + "$id": "3048", + "kind": "array", + "type": { + "$ref": "811" + }, + "value": [ + { + "$id": "3049", + "kind": "model", + "type": { + "$ref": "812" + }, + "value": { + "$id": "3050", + "certificateUrl": { + "$id": "3051", + "kind": "string", + "type": { + "$ref": "814" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + }, + "certificateStore": { + "$id": "3052", + "kind": "string", + "type": { + "$ref": "818" + }, + "value": "nlxrwavpzhueffxsshlun" + } + } + } + ] + } + } + } + ] + }, + "allowExtensionOperations": { + "$id": "3053", + "kind": "boolean", + "type": { + "$ref": "826" + }, + "value": true + }, + "requireGuestProvisionSignal": { + "$id": "3054", + "kind": "boolean", + "type": { + "$ref": "830" + }, + "value": true + } + } + }, + "storageProfile": { + "$id": "3055", + "kind": "model", + "type": { + "$ref": "836" + }, + "value": { + "$id": "3056", + "imageReference": { + "$id": "3057", + "kind": "model", + "type": { + "$ref": "838" + }, + "value": { + "$id": "3058", + "publisher": { + "$id": "3059", + "kind": "string", + "type": { + "$ref": "845" + }, + "value": "mqxgwbiyjzmxavhbkd" + }, + "offer": { + "$id": "3060", + "kind": "string", + "type": { + "$ref": "849" + }, + "value": "isxgumkarlkomp" + }, + "sku": { + "$id": "3061", + "kind": "string", + "type": { + "$ref": "853" + }, + "value": "eojmppqcrnpmxirtp" + }, + "version": { + "$id": "3062", + "kind": "string", + "type": { + "$ref": "857" + }, + "value": "wvpcqefgtmqdgltiuz" + }, + "exactVersion": { + "$id": "3063", + "kind": "string", + "type": { + "$ref": "861" + }, + "value": "zjbntmiskjexlr" + }, + "sharedGalleryImageId": { + "$id": "3064", + "kind": "string", + "type": { + "$ref": "865" + }, + "value": "kmkgihoxwlawuuhcinfirktdwkmx" + }, + "communityGalleryImageId": { + "$id": "3065", + "kind": "string", + "type": { + "$ref": "869" + }, + "value": "vlqe" + }, + "id": { + "$id": "3066", + "kind": "string", + "type": { + "$ref": "840" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}/versions/{versionName}" + } + } + }, + "osDisk": { + "$id": "3067", + "kind": "model", + "type": { + "$ref": "875" + }, + "value": { + "$id": "3068", + "name": { + "$id": "3069", + "kind": "string", + "type": { + "$ref": "877" + }, + "value": "wfttw" + }, + "caching": { + "$id": "3070", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "3071", + "kind": "boolean", + "type": { + "$ref": "884" + }, + "value": true + }, + "createOption": { + "$id": "3072", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "FromImage" + }, + "diffDiskSettings": { + "$id": "3073", + "kind": "model", + "type": { + "$ref": "891" + }, + "value": { + "$id": "3074", + "option": { + "$id": "3075", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "Local" + }, + "placement": { + "$id": "3076", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "CacheDisk" + } + } + }, + "diskSizeGB": { + "$id": "3077", + "kind": "number", + "type": { + "$ref": "901" + }, + "value": 14 + }, + "osType": { + "$id": "3078", + "kind": "string", + "type": { + "$ref": "206" + }, + "value": "Windows" + }, + "image": { + "$id": "3079", + "kind": "model", + "type": { + "$ref": "908" + }, + "value": { + "$id": "3080", + "uri": { + "$id": "3081", + "kind": "string", + "type": { + "$ref": "910" + }, + "value": "https://myStorageAccountName.blob.core.windows.net/myContainerName/myVhdName.vhd" + } + } + }, + "vhdContainers": { + "$id": "3082", + "kind": "array", + "type": { + "$ref": "916" + }, + "value": [ + { + "$id": "3083", + "kind": "string", + "type": { + "$ref": "917" + }, + "value": "tkzcwddtinkfpnfklatw" + } + ] + }, + "managedDisk": { + "$id": "3084", + "kind": "model", + "type": { + "$ref": "921" + }, + "value": { + "$id": "3085", + "storageAccountType": { + "$id": "3086", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "3087", + "kind": "model", + "type": { + "$ref": "926" + }, + "value": { + "$id": "3088", + "id": { + "$id": "3089", + "kind": "string", + "type": { + "$ref": "928" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "3090", + "kind": "model", + "type": { + "$ref": "935" + }, + "value": { + "$id": "3091", + "securityEncryptionType": { + "$id": "3092", + "kind": "string", + "type": { + "$ref": "228" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "3093", + "kind": "model", + "type": { + "$ref": "926" + }, + "value": { + "$id": "3094", + "id": { + "$id": "3095", + "kind": "string", + "type": { + "$ref": "928" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "deleteOption": { + "$id": "3096", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "Delete" + } + } + }, + "dataDisks": { + "$id": "3097", + "kind": "array", + "type": { + "$ref": "952" + }, + "value": [ + { + "$id": "3098", + "kind": "model", + "type": { + "$ref": "953" + }, + "value": { + "$id": "3099", + "name": { + "$id": "3100", + "kind": "string", + "type": { + "$ref": "955" + }, + "value": "eogiykmdmeikswxmigjws" + }, + "lun": { + "$id": "3101", + "kind": "number", + "type": { + "$ref": "959" + }, + "value": 14 + }, + "caching": { + "$id": "3102", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "3103", + "kind": "boolean", + "type": { + "$ref": "966" + }, + "value": true + }, + "createOption": { + "$id": "3104", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "FromImage" + }, + "diskSizeGB": { + "$id": "3105", + "kind": "number", + "type": { + "$ref": "973" + }, + "value": 6 + }, + "managedDisk": { + "$id": "3106", + "kind": "model", + "type": { + "$ref": "921" + }, + "value": { + "$id": "3107", + "storageAccountType": { + "$id": "3108", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "3109", + "kind": "model", + "type": { + "$ref": "926" + }, + "value": { + "$id": "3110", + "id": { + "$id": "3111", + "kind": "string", + "type": { + "$ref": "928" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "3112", + "kind": "model", + "type": { + "$ref": "935" + }, + "value": { + "$id": "3113", + "securityEncryptionType": { + "$id": "3114", + "kind": "string", + "type": { + "$ref": "228" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "3115", + "kind": "model", + "type": { + "$ref": "926" + }, + "value": { + "$id": "3116", + "id": { + "$id": "3117", + "kind": "string", + "type": { + "$ref": "928" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "diskIOPSReadWrite": { + "$id": "3118", + "kind": "number", + "type": { + "$ref": "980" + }, + "value": 27 + }, + "diskMBpsReadWrite": { + "$id": "3119", + "kind": "number", + "type": { + "$ref": "984" + }, + "value": 2 + }, + "deleteOption": { + "$id": "3120", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "Delete" + } + } + } + ] + }, + "diskControllerType": { + "$id": "3121", + "kind": "string", + "type": { + "$ref": "242" + }, + "value": "uzb" + } + } + }, + "networkProfile": { + "$id": "3122", + "kind": "model", + "type": { + "$ref": "998" + }, + "value": { + "$id": "3123", + "healthProbe": { + "$id": "3124", + "kind": "model", + "type": { + "$ref": "1000" + }, + "value": { + "$id": "3125", + "id": { + "$id": "3126", + "kind": "string", + "type": { + "$ref": "1002" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}" + } + } + }, + "networkInterfaceConfigurations": { + "$id": "3127", + "kind": "array", + "type": { + "$ref": "1009" + }, + "value": [ + { + "$id": "3128", + "kind": "model", + "type": { + "$ref": "1010" + }, + "value": { + "$id": "3129", + "name": { + "$id": "3130", + "kind": "string", + "type": { + "$ref": "1012" + }, + "value": "i" + }, + "properties": { + "$id": "3131", + "kind": "model", + "type": { + "$ref": "1016" + }, + "value": { + "$id": "3132", + "primary": { + "$id": "3133", + "kind": "boolean", + "type": { + "$ref": "1018" + }, + "value": true + }, + "enableAcceleratedNetworking": { + "$id": "3134", + "kind": "boolean", + "type": { + "$ref": "1022" + }, + "value": true + }, + "disableTcpStateTracking": { + "$id": "3135", + "kind": "boolean", + "type": { + "$ref": "1026" + }, + "value": true + }, + "enableFpga": { + "$id": "3136", + "kind": "boolean", + "type": { + "$ref": "1030" + }, + "value": true + }, + "networkSecurityGroup": { + "$id": "3137", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "3138", + "id": { + "$id": "3139", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}" + } + } + }, + "dnsSettings": { + "$id": "3140", + "kind": "model", + "type": { + "$ref": "1037" + }, + "value": { + "$id": "3141", + "dnsServers": { + "$id": "3142", + "kind": "array", + "type": { + "$ref": "1039" + }, + "value": [ + { + "$id": "3143", + "kind": "string", + "type": { + "$ref": "1040" + }, + "value": "nxmmfolhclsesu" + } + ] + } + } + }, + "ipConfigurations": { + "$id": "3144", + "kind": "array", + "type": { + "$ref": "1046" + }, + "value": [ + { + "$id": "3145", + "kind": "model", + "type": { + "$ref": "1047" + }, + "value": { + "$id": "3146", + "name": { + "$id": "3147", + "kind": "string", + "type": { + "$ref": "1049" + }, + "value": "oezqhkidfhyywlfzwuotilrpbqnjg" + }, + "properties": { + "$id": "3148", + "kind": "model", + "type": { + "$ref": "1053" + }, + "value": { + "$id": "3149", + "subnet": { + "$id": "3150", + "kind": "model", + "type": { + "$ref": "1000" + }, + "value": { + "$id": "3151", + "id": { + "$id": "3152", + "kind": "string", + "type": { + "$ref": "1002" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}" + } + } + }, + "primary": { + "$id": "3153", + "kind": "boolean", + "type": { + "$ref": "1058" + }, + "value": true + }, + "publicIPAddressConfiguration": { + "$id": "3154", + "kind": "model", + "type": { + "$ref": "1062" + }, + "value": { + "$id": "3155", + "name": { + "$id": "3156", + "kind": "string", + "type": { + "$ref": "1064" + }, + "value": "fvpqf" + }, + "properties": { + "$id": "3157", + "kind": "model", + "type": { + "$ref": "1068" + }, + "value": { + "$id": "3158", + "idleTimeoutInMinutes": { + "$id": "3159", + "kind": "number", + "type": { + "$ref": "1070" + }, + "value": 9 + }, + "dnsSettings": { + "$id": "3160", + "kind": "model", + "type": { + "$ref": "1074" + }, + "value": { + "$id": "3161", + "domainNameLabel": { + "$id": "3162", + "kind": "string", + "type": { + "$ref": "1076" + }, + "value": "ukrddzvmorpmfsczjwtbvp" + }, + "domainNameLabelScope": { + "$id": "3163", + "kind": "string", + "type": { + "$ref": "248" + }, + "value": "TenantReuse" + } + } + }, + "ipTags": { + "$id": "3164", + "kind": "array", + "type": { + "$ref": "1085" + }, + "value": [ + { + "$id": "3165", + "kind": "model", + "type": { + "$ref": "1086" + }, + "value": { + "$id": "3166", + "ipTagType": { + "$id": "3167", + "kind": "string", + "type": { + "$ref": "1088" + }, + "value": "sddgsoemnzgqizale" + }, + "tag": { + "$id": "3168", + "kind": "string", + "type": { + "$ref": "1092" + }, + "value": "wufmhrjsakbiaetyara" + } + } + } + ] + }, + "publicIPPrefix": { + "$id": "3169", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "3170", + "id": { + "$id": "3171", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}" + } + } + }, + "publicIPAddressVersion": { + "$id": "3172", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "IPv4" + }, + "deleteOption": { + "$id": "3173", + "kind": "string", + "type": { + "$ref": "264" + }, + "value": "Delete" + } + } + }, + "sku": { + "$id": "3174", + "kind": "model", + "type": { + "$ref": "1109" + }, + "value": { + "$id": "3175", + "name": { + "$id": "3176", + "kind": "string", + "type": { + "$ref": "270" + }, + "value": "Basic" + }, + "tier": { + "$id": "3177", + "kind": "string", + "type": { + "$ref": "276" + }, + "value": "Regional" + } + } + } + } + }, + "privateIPAddressVersion": { + "$id": "3178", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "IPv4" + }, + "applicationGatewayBackendAddressPools": { + "$id": "3179", + "kind": "array", + "type": { + "$ref": "1124" + }, + "value": [ + { + "$id": "3180", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "3181", + "id": { + "$id": "3182", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "applicationSecurityGroups": { + "$id": "3183", + "kind": "array", + "type": { + "$ref": "1128" + }, + "value": [ + { + "$id": "3184", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "3185", + "id": { + "$id": "3186", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}" + } + } + } + ] + }, + "loadBalancerBackendAddressPools": { + "$id": "3187", + "kind": "array", + "type": { + "$ref": "1132" + }, + "value": [ + { + "$id": "3188", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "3189", + "id": { + "$id": "3190", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "loadBalancerInboundNatPools": { + "$id": "3191", + "kind": "array", + "type": { + "$ref": "1136" + }, + "value": [ + { + "$id": "3192", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "3193", + "id": { + "$id": "3194", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatPools/{inboundNatPoolName}" + } + } + } + ] + } + } + } + } + } + ] + }, + "enableIPForwarding": { + "$id": "3195", + "kind": "boolean", + "type": { + "$ref": "1144" + }, + "value": true + }, + "deleteOption": { + "$id": "3196", + "kind": "string", + "type": { + "$ref": "264" + }, + "value": "Delete" + }, + "auxiliaryMode": { + "$id": "3197", + "kind": "string", + "type": { + "$ref": "282" + }, + "value": "None" + }, + "auxiliarySku": { + "$id": "3198", + "kind": "string", + "type": { + "$ref": "290" + }, + "value": "None" + } + } + } + } + } + ] + }, + "networkApiVersion": { + "$id": "3199", + "kind": "string", + "type": { + "$ref": "302" + }, + "value": "2020-11-01" + } + } + }, + "securityProfile": { + "$id": "3200", + "kind": "model", + "type": { + "$ref": "1166" + }, + "value": { + "$id": "3201", + "uefiSettings": { + "$id": "3202", + "kind": "model", + "type": { + "$ref": "1168" + }, + "value": { + "$id": "3203", + "secureBootEnabled": { + "$id": "3204", + "kind": "boolean", + "type": { + "$ref": "1170" + }, + "value": true + }, + "vTpmEnabled": { + "$id": "3205", + "kind": "boolean", + "type": { + "$ref": "1174" + }, + "value": true + } + } + }, + "encryptionAtHost": { + "$id": "3206", + "kind": "boolean", + "type": { + "$ref": "1180" + }, + "value": true + }, + "securityType": { + "$id": "3207", + "kind": "string", + "type": { + "$ref": "306" + }, + "value": "TrustedLaunch" + }, + "encryptionIdentity": { + "$id": "3208", + "kind": "model", + "type": { + "$ref": "1187" + }, + "value": { + "$id": "3209", + "userAssignedIdentityResourceId": { + "$id": "3210", + "kind": "string", + "type": { + "$ref": "1189" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{userAssignedIdentityName}" + } + } + }, + "proxyAgentSettings": { + "$id": "3211", + "kind": "model", + "type": { + "$ref": "1196" + }, + "value": { + "$id": "3212", + "enabled": { + "$id": "3213", + "kind": "boolean", + "type": { + "$ref": "1198" + }, + "value": true + }, + "mode": { + "$id": "3214", + "kind": "string", + "type": { + "$ref": "312" + }, + "value": "Audit" + }, + "keyIncarnationId": { + "$id": "3215", + "kind": "number", + "type": { + "$ref": "1205" + }, + "value": 20 + } + } + } + } + }, + "diagnosticsProfile": { + "$id": "3216", + "kind": "model", + "type": { + "$ref": "1213" + }, + "value": { + "$id": "3217", + "bootDiagnostics": { + "$id": "3218", + "kind": "model", + "type": { + "$ref": "1215" + }, + "value": { + "$id": "3219", + "enabled": { + "$id": "3220", + "kind": "boolean", + "type": { + "$ref": "1217" + }, + "value": true + }, + "storageUri": { + "$id": "3221", + "kind": "string", + "type": { + "$ref": "1221" + }, + "value": "http://myStorageAccountName.blob.core.windows.net" + } + } + } + } + }, + "extensionProfile": { + "$id": "3222", + "kind": "model", + "type": { + "$ref": "1229" + }, + "value": { + "$id": "3223", + "extensions": { + "$id": "3224", + "kind": "array", + "type": { + "$ref": "1231" + }, + "value": [ + { + "$id": "3225", + "kind": "model", + "type": { + "$ref": "1232" + }, + "value": { + "$id": "3226", + "name": { + "$id": "3227", + "kind": "string", + "type": { + "$ref": "1239" + }, + "value": "bndxuxx" + }, + "type": { + "$id": "3228", + "kind": "string", + "type": { + "$ref": "1243" + }, + "value": "cmeam" + }, + "properties": { + "$id": "3229", + "kind": "model", + "type": { + "$ref": "1247" + }, + "value": { + "$id": "3230", + "forceUpdateTag": { + "$id": "3231", + "kind": "string", + "type": { + "$ref": "1249" + }, + "value": "yhgxw" + }, + "publisher": { + "$id": "3232", + "kind": "string", + "type": { + "$ref": "1253" + }, + "value": "kpxtirxjfprhs" + }, + "type": { + "$id": "3233", + "kind": "string", + "type": { + "$ref": "1257" + }, + "value": "pgjilctjjwaa" + }, + "typeHandlerVersion": { + "$id": "3234", + "kind": "string", + "type": { + "$ref": "1261" + }, + "value": "zevivcoilxmbwlrihhhibq" + }, + "autoUpgradeMinorVersion": { + "$id": "3235", + "kind": "boolean", + "type": { + "$ref": "1265" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "3236", + "kind": "boolean", + "type": { + "$ref": "1269" + }, + "value": true + }, + "settings": { + "$id": "3237", + "kind": "dict", + "type": { + "$ref": "1273" + }, + "value": { + "$id": "3238" + } + }, + "provisioningState": { + "$id": "3239", + "kind": "string", + "type": { + "$ref": "1285" + }, + "value": "Succeeded" + }, + "provisionAfterExtensions": { + "$id": "3240", + "kind": "array", + "type": { + "$ref": "1289" + }, + "value": [ + { + "$id": "3241", + "kind": "string", + "type": { + "$ref": "1290" + }, + "value": "nftzosroolbcwmpupujzqwqe" + } + ] + }, + "suppressFailures": { + "$id": "3242", + "kind": "boolean", + "type": { + "$ref": "1294" + }, + "value": true + }, + "protectedSettingsFromKeyVault": { + "$id": "3243", + "kind": "model", + "type": { + "$ref": "1298" + }, + "value": { + "$id": "3244", + "secretUrl": { + "$id": "3245", + "kind": "string", + "type": { + "$ref": "1300" + }, + "value": "https://myVaultName.vault.azure.net/secrets/secret/mySecretName" + }, + "sourceVault": { + "$id": "3246", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "3247", + "id": { + "$id": "3248", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + } + } + } + } + }, + "id": { + "$id": "3249", + "kind": "string", + "type": { + "$ref": "1234" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{extensionName}" + } + } + } + ] + }, + "extensionsTimeBudget": { + "$id": "3250", + "kind": "string", + "type": { + "$ref": "1313" + }, + "value": "mbhjahtdygwgyszdwjtvlvtgchdwil" + } + } + }, + "licenseType": { + "$id": "3251", + "kind": "string", + "type": { + "$ref": "1319" + }, + "value": "v" + }, + "scheduledEventsProfile": { + "$id": "3252", + "kind": "model", + "type": { + "$ref": "1323" + }, + "value": { + "$id": "3253", + "terminateNotificationProfile": { + "$id": "3254", + "kind": "model", + "type": { + "$ref": "1325" + }, + "value": { + "$id": "3255", + "notBeforeTimeout": { + "$id": "3256", + "kind": "string", + "type": { + "$ref": "1327" + }, + "value": "iljppmmw" + }, + "enable": { + "$id": "3257", + "kind": "boolean", + "type": { + "$ref": "1331" + }, + "value": true + } + } + }, + "osImageNotificationProfile": { + "$id": "3258", + "kind": "model", + "type": { + "$ref": "1337" + }, + "value": { + "$id": "3259", + "notBeforeTimeout": { + "$id": "3260", + "kind": "string", + "type": { + "$ref": "1339" + }, + "value": "olbpadmevekyczfokodtfprxti" + }, + "enable": { + "$id": "3261", + "kind": "boolean", + "type": { + "$ref": "1343" + }, + "value": true + } + } + } + } + }, + "userData": { + "$id": "3262", + "kind": "string", + "type": { + "$ref": "1351" + }, + "value": "s" + }, + "capacityReservation": { + "$id": "3263", + "kind": "model", + "type": { + "$ref": "1355" + }, + "value": { + "$id": "3264", + "capacityReservationGroup": { + "$id": "3265", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "3266", + "id": { + "$id": "3267", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}" + } + } + } + } + }, + "applicationProfile": { + "$id": "3268", + "kind": "model", + "type": { + "$ref": "1362" + }, + "value": { + "$id": "3269", + "galleryApplications": { + "$id": "3270", + "kind": "array", + "type": { + "$ref": "1364" + }, + "value": [ + { + "$id": "3271", + "kind": "model", + "type": { + "$ref": "1365" + }, + "value": { + "$id": "3272", + "tags": { + "$id": "3273", + "kind": "string", + "type": { + "$ref": "1367" + }, + "value": "eyrqjbib" + }, + "order": { + "$id": "3274", + "kind": "number", + "type": { + "$ref": "1371" + }, + "value": 5 + }, + "packageReferenceId": { + "$id": "3275", + "kind": "string", + "type": { + "$ref": "1375" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{applicationName}/versions/{versionName}" + }, + "treatFailureAsDeploymentFailure": { + "$id": "3276", + "kind": "boolean", + "type": { + "$ref": "1384" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "3277", + "kind": "boolean", + "type": { + "$ref": "1388" + }, + "value": true + } + } + } + ] + } + } + }, + "hardwareProfile": { + "$id": "3278", + "kind": "model", + "type": { + "$ref": "1396" + }, + "value": { + "$id": "3279", + "vmSizeProperties": { + "$id": "3280", + "kind": "model", + "type": { + "$ref": "1398" + }, + "value": { + "$id": "3281", + "vCPUsAvailable": { + "$id": "3282", + "kind": "number", + "type": { + "$ref": "1400" + }, + "value": 16 + }, + "vCPUsPerCore": { + "$id": "3283", + "kind": "number", + "type": { + "$ref": "1404" + }, + "value": 23 + } + } + } + } + }, + "serviceArtifactReference": { + "$id": "3284", + "kind": "model", + "type": { + "$ref": "1412" + }, + "value": { + "$id": "3285", + "id": { + "$id": "3286", + "kind": "string", + "type": { + "$ref": "1414" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactsName}/vmArtifactsProfiles/{vmArtifactsProfileName}" + } + } + }, + "securityPostureReference": { + "$id": "3287", + "kind": "model", + "type": { + "$ref": "1421" + }, + "value": { + "$id": "3288", + "id": { + "$id": "3289", + "kind": "string", + "type": { + "$ref": "1423" + }, + "value": "/CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest" + }, + "excludeExtensions": { + "$id": "3290", + "kind": "array", + "type": { + "$ref": "1427" + }, + "value": [ + { + "$id": "3291", + "kind": "string", + "type": { + "$ref": "1428" + }, + "value": "{securityPostureVMExtensionName}" + } + ] + }, + "isOverridable": { + "$id": "3292", + "kind": "boolean", + "type": { + "$ref": "1432" + }, + "value": true + } + } + }, + "timeCreated": { + "$id": "3293", + "kind": "string", + "type": { + "$ref": "1438" + }, + "value": "2024-04-29T21:51:44.043Z" + } + } + }, + "computeApiVersion": { + "$id": "3294", + "kind": "string", + "type": { + "$ref": "1454" + }, + "value": "2023-07-01" + }, + "platformFaultDomainCount": { + "$id": "3295", + "kind": "number", + "type": { + "$ref": "1458" + }, + "value": 1 + } + } + }, + "timeCreated": { + "$id": "3296", + "kind": "string", + "type": { + "$ref": "1476" + }, + "value": "2024-07-10T00:16:34.8590555+00:00" + }, + "uniqueId": { + "$id": "3297", + "kind": "string", + "type": { + "$ref": "1481" + }, + "value": "a2f7fabd-bbc2-4a20-afe1-49fdb3885a28" + } + } + }, + "zones": { + "$id": "3298", + "kind": "array", + "type": { + "$ref": "1489" + }, + "value": [ + { + "$id": "3299", + "kind": "string", + "type": { + "$ref": "1490" + }, + "value": "zone1" + }, + { + "$id": "3300", + "kind": "string", + "type": { + "$ref": "1490" + }, + "value": "zone2" + } + ] + }, + "identity": { + "$id": "3301", + "kind": "model", + "type": { + "$ref": "1494" + }, + "value": { + "$id": "3302", + "principalId": { + "$id": "3303", + "kind": "string", + "type": { + "$ref": "1496" + }, + "value": "4d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "tenantId": { + "$id": "3304", + "kind": "string", + "type": { + "$ref": "1501" + }, + "value": "5d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "type": { + "$id": "3305", + "kind": "string", + "type": { + "$ref": "318" + }, + "value": "UserAssigned" + }, + "userAssignedIdentities": { + "$id": "3306", + "kind": "dict", + "type": { + "$ref": "1509" + }, + "value": { + "$id": "3307", + "key9851": { + "$id": "3308", + "kind": "model", + "type": { + "$ref": "1512" + }, + "value": { + "$id": "3309", + "principalId": { + "$id": "3310", + "kind": "string", + "type": { + "$ref": "1519" + }, + "value": "6d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "clientId": { + "$id": "3311", + "kind": "string", + "type": { + "$ref": "1514" + }, + "value": "7d508e5b-374b-4382-9a1c-01fb8b6cb37c" + } + } + } + } + } + } + }, + "tags": { + "$id": "3312", + "kind": "dict", + "type": { + "$ref": "475" + }, + "value": { + "$id": "3313", + "key3518": { + "$id": "3314", + "kind": "string", + "type": { + "$ref": "477" + }, + "value": "luvrnuvsgdpbuofdskkcoqhfh" + } + } + }, + "plan": { + "$id": "3315", + "kind": "model", + "type": { + "$ref": "1528" + }, + "value": { + "$id": "3316", + "name": { + "$id": "3317", + "kind": "string", + "type": { + "$ref": "1530" + }, + "value": "jwgrcrnrtfoxn" + }, + "publisher": { + "$id": "3318", + "kind": "string", + "type": { + "$ref": "1534" + }, + "value": "iozjbiqqckqm" + }, + "product": { + "$id": "3319", + "kind": "string", + "type": { + "$ref": "1538" + }, + "value": "cgopbyvdyqikahwyxfpzwaqk" + }, + "promotionCode": { + "$id": "3320", + "kind": "string", + "type": { + "$ref": "1542" + }, + "value": "naglezezplcaruqogtxnuizslqnnbr" + }, + "version": { + "$id": "3321", + "kind": "string", + "type": { + "$ref": "1546" + }, + "value": "wa" + } + } + }, + "location": { + "$id": "3322", + "kind": "string", + "type": { + "$ref": "481" + }, + "value": "westus" + }, + "id": { + "$id": "3323", + "kind": "string", + "type": { + "$ref": "433" + }, + "value": "/subscriptions/7B0CD4DB-3381-4013-9B31-FB6E6FD0FF1C/resourceGroups/rgazurefleet/providers/Microsoft.AzureFleet/fleets/testFleet" + }, + "name": { + "$id": "3324", + "kind": "string", + "type": { + "$ref": "438" + }, + "value": "testFleet" + }, + "type": { + "$id": "3325", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "Microsoft.AzureFleet/fleets" + }, + "systemData": { + "$id": "3326", + "kind": "model", + "type": { + "$ref": "447" + }, + "value": { + "$id": "3327", + "createdBy": { + "$id": "3328", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "rowegentrpoajsv" + }, + "createdByType": { + "$id": "3329", + "kind": "string", + "type": { + "$ref": "328" + }, + "value": "User" + }, + "createdAt": { + "$id": "3330", + "kind": "string", + "type": { + "$ref": "456" + }, + "value": "2024-04-29T21:51:44.043Z" + }, + "lastModifiedBy": { + "$id": "3331", + "kind": "string", + "type": { + "$ref": "461" + }, + "value": "edwuayhhaoepxzisfaqjhmrxjq" + }, + "lastModifiedByType": { + "$id": "3332", + "kind": "string", + "type": { + "$ref": "328" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "3333", + "kind": "string", + "type": { + "$ref": "468" + }, + "value": "2024-04-29T21:51:44.043Z" + } + } + } + } + } + } + ] + }, + { + "$id": "3334", + "kind": "http", + "name": "Fleets_CreateOrUpdate_MinimumSet", + "description": "Fleets_CreateOrUpdate_MinimumSet", + "filePath": "2024-11-01/Fleets_CreateOrUpdate_MinimumSet.json", + "parameters": [ + { + "$id": "3335", + "parameter": { + "$ref": "2200" + }, + "value": { + "$id": "3336", + "kind": "string", + "type": { + "$ref": "2201" + }, + "value": "2024-11-01" + } + }, + { + "$id": "3337", + "parameter": { + "$ref": "2204" + }, + "value": { + "$id": "3338", + "kind": "string", + "type": { + "$ref": "2205" + }, + "value": "1DC2F28C-A625-4B0E-9748-9885A3C9E9EB" + } + }, + { + "$id": "3339", + "parameter": { + "$ref": "2207" + }, + "value": { + "$id": "3340", + "kind": "string", + "type": { + "$ref": "2208" + }, + "value": "rgazurefleet" + } + }, + { + "$id": "3341", + "parameter": { + "$ref": "2209" + }, + "value": { + "$id": "3342", + "kind": "string", + "type": { + "$ref": "2210" + }, + "value": "testFleet" + } + }, + { + "$id": "3343", + "parameter": { + "$ref": "2217" + }, + "value": { + "$id": "3344", + "kind": "model", + "type": { + "$ref": "429" + }, + "value": { + "$id": "3345", + "properties": { + "$id": "3346", + "kind": "model", + "type": { + "$ref": "485" + }, + "value": { + "$id": "3347", + "spotPriorityProfile": { + "$id": "3348", + "kind": "model", + "type": { + "$ref": "490" + }, + "value": { + "$id": "3349", + "capacity": { + "$id": "3350", + "kind": "number", + "type": { + "$ref": "492" + }, + "value": 2 + }, + "minCapacity": { + "$id": "3351", + "kind": "number", + "type": { + "$ref": "496" + }, + "value": 1 + }, + "evictionPolicy": { + "$id": "3352", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "Delete" + }, + "allocationStrategy": { + "$id": "3353", + "kind": "string", + "type": { + "$ref": "36" + }, + "value": "PriceCapacityOptimized" + }, + "maintain": { + "$id": "3354", + "kind": "boolean", + "type": { + "$ref": "510" + }, + "value": true + } + } + }, + "regularPriorityProfile": { + "$id": "3355", + "kind": "model", + "type": { + "$ref": "516" + }, + "value": { + "$id": "3356", + "capacity": { + "$id": "3357", + "kind": "number", + "type": { + "$ref": "518" + }, + "value": 2 + }, + "minCapacity": { + "$id": "3358", + "kind": "number", + "type": { + "$ref": "522" + }, + "value": 1 + }, + "allocationStrategy": { + "$id": "3359", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "LowestPrice" + } + } + }, + "vmSizesProfile": { + "$id": "3360", + "kind": "array", + "type": { + "$ref": "531" + }, + "value": [ + { + "$id": "3361", + "kind": "model", + "type": { + "$ref": "532" + }, + "value": { + "$id": "3362", + "name": { + "$id": "3363", + "kind": "string", + "type": { + "$ref": "534" + }, + "value": "Standard_D2s_v3" + } + } + }, + { + "$id": "3364", + "kind": "model", + "type": { + "$ref": "532" + }, + "value": { + "$id": "3365", + "name": { + "$id": "3366", + "kind": "string", + "type": { + "$ref": "534" + }, + "value": "Standard_D4s_v3" + } + } + }, + { + "$id": "3367", + "kind": "model", + "type": { + "$ref": "532" + }, + "value": { + "$id": "3368", + "name": { + "$id": "3369", + "kind": "string", + "type": { + "$ref": "534" + }, + "value": "Standard_E2s_v3" + } + } + } + ] + }, + "computeProfile": { + "$id": "3370", + "kind": "model", + "type": { + "$ref": "1449" + }, + "value": { + "$id": "3371", + "baseVirtualMachineProfile": { + "$id": "3372", + "kind": "model", + "type": { + "$ref": "644" + }, + "value": { + "$id": "3373", + "storageProfile": { + "$id": "3374", + "kind": "model", + "type": { + "$ref": "836" + }, + "value": { + "$id": "3375", + "imageReference": { + "$id": "3376", + "kind": "model", + "type": { + "$ref": "838" + }, + "value": { + "$id": "3377", + "publisher": { + "$id": "3378", + "kind": "string", + "type": { + "$ref": "845" + }, + "value": "canonical" + }, + "offer": { + "$id": "3379", + "kind": "string", + "type": { + "$ref": "849" + }, + "value": "0001-com-ubuntu-server-focal" + }, + "sku": { + "$id": "3380", + "kind": "string", + "type": { + "$ref": "853" + }, + "value": "20_04-lts-gen2" + }, + "version": { + "$id": "3381", + "kind": "string", + "type": { + "$ref": "857" + }, + "value": "latest" + } + } + }, + "osDisk": { + "$id": "3382", + "kind": "model", + "type": { + "$ref": "875" + }, + "value": { + "$id": "3383", + "caching": { + "$id": "3384", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "ReadWrite" + }, + "createOption": { + "$id": "3385", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "FromImage" + }, + "osType": { + "$id": "3386", + "kind": "string", + "type": { + "$ref": "206" + }, + "value": "Linux" + }, + "managedDisk": { + "$id": "3387", + "kind": "model", + "type": { + "$ref": "921" + }, + "value": { + "$id": "3388", + "storageAccountType": { + "$id": "3389", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "Standard_LRS" + } + } + } + } + } + } + }, + "osProfile": { + "$id": "3390", + "kind": "model", + "type": { + "$ref": "646" + }, + "value": { + "$id": "3391", + "computerNamePrefix": { + "$id": "3392", + "kind": "string", + "type": { + "$ref": "648" + }, + "value": "prefix" + }, + "adminUsername": { + "$id": "3393", + "kind": "string", + "type": { + "$ref": "652" + }, + "value": "azureuser" + }, + "adminPassword": { + "$id": "3394", + "kind": "string", + "type": { + "$ref": "656" + }, + "value": "TestPassword$0" + }, + "linuxConfiguration": { + "$id": "3395", + "kind": "model", + "type": { + "$ref": "745" + }, + "value": { + "$id": "3396", + "disablePasswordAuthentication": { + "$id": "3397", + "kind": "boolean", + "type": { + "$ref": "747" + }, + "value": false + } + } + } + } + }, + "networkProfile": { + "$id": "3398", + "kind": "model", + "type": { + "$ref": "998" + }, + "value": { + "$id": "3399", + "networkInterfaceConfigurations": { + "$id": "3400", + "kind": "array", + "type": { + "$ref": "1009" + }, + "value": [ + { + "$id": "3401", + "kind": "model", + "type": { + "$ref": "1010" + }, + "value": { + "$id": "3402", + "name": { + "$id": "3403", + "kind": "string", + "type": { + "$ref": "1012" + }, + "value": "vmNameTest" + }, + "properties": { + "$id": "3404", + "kind": "model", + "type": { + "$ref": "1016" + }, + "value": { + "$id": "3405", + "primary": { + "$id": "3406", + "kind": "boolean", + "type": { + "$ref": "1018" + }, + "value": true + }, + "enableAcceleratedNetworking": { + "$id": "3407", + "kind": "boolean", + "type": { + "$ref": "1022" + }, + "value": false + }, + "ipConfigurations": { + "$id": "3408", + "kind": "array", + "type": { + "$ref": "1046" + }, + "value": [ + { + "$id": "3409", + "kind": "model", + "type": { + "$ref": "1047" + }, + "value": { + "$id": "3410", + "name": { + "$id": "3411", + "kind": "string", + "type": { + "$ref": "1049" + }, + "value": "vmNameTest" + }, + "properties": { + "$id": "3412", + "kind": "model", + "type": { + "$ref": "1053" + }, + "value": { + "$id": "3413", + "subnet": { + "$id": "3414", + "kind": "model", + "type": { + "$ref": "1000" + }, + "value": { + "$id": "3415", + "id": { + "$id": "3416", + "kind": "string", + "type": { + "$ref": "1002" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}" + } + } + }, + "primary": { + "$id": "3417", + "kind": "boolean", + "type": { + "$ref": "1058" + }, + "value": true + }, + "loadBalancerBackendAddressPools": { + "$id": "3418", + "kind": "array", + "type": { + "$ref": "1132" + }, + "value": [ + { + "$id": "3419", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "3420", + "id": { + "$id": "3421", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + } + } + } + } + } + ] + }, + "enableIPForwarding": { + "$id": "3422", + "kind": "boolean", + "type": { + "$ref": "1144" + }, + "value": true + } + } + } + } + } + ] + }, + "networkApiVersion": { + "$id": "3423", + "kind": "string", + "type": { + "$ref": "302" + }, + "value": "2022-07-01" + } + } + } + } + }, + "computeApiVersion": { + "$id": "3424", + "kind": "string", + "type": { + "$ref": "1454" + }, + "value": "2023-09-01" + }, + "platformFaultDomainCount": { + "$id": "3425", + "kind": "number", + "type": { + "$ref": "1458" + }, + "value": 1 + } + } + } + } + }, + "tags": { + "$id": "3426", + "kind": "dict", + "type": { + "$ref": "475" + }, + "value": { + "$id": "3427", + "key": { + "$id": "3428", + "kind": "string", + "type": { + "$ref": "477" + }, + "value": "fleets-test" + } + } + }, + "location": { + "$id": "3429", + "kind": "string", + "type": { + "$ref": "481" + }, + "value": "eastus2euap" + } + } + } + } + ], + "responses": [ + { + "$id": "3430", + "response": { + "$ref": "2218" + }, + "statusCode": 200, + "bodyValue": { + "$id": "3431", + "kind": "model", + "type": { + "$ref": "429" + }, + "value": { + "$id": "3432", + "properties": { + "$id": "3433", + "kind": "model", + "type": { + "$ref": "485" + }, + "value": { + "$id": "3434", + "provisioningState": { + "$id": "3435", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + }, + "spotPriorityProfile": { + "$id": "3436", + "kind": "model", + "type": { + "$ref": "490" + }, + "value": { + "$id": "3437", + "capacity": { + "$id": "3438", + "kind": "number", + "type": { + "$ref": "492" + }, + "value": 2 + }, + "minCapacity": { + "$id": "3439", + "kind": "number", + "type": { + "$ref": "496" + }, + "value": 1 + }, + "evictionPolicy": { + "$id": "3440", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "Delete" + }, + "allocationStrategy": { + "$id": "3441", + "kind": "string", + "type": { + "$ref": "36" + }, + "value": "PriceCapacityOptimized" + }, + "maintain": { + "$id": "3442", + "kind": "boolean", + "type": { + "$ref": "510" + }, + "value": true + } + } + }, + "regularPriorityProfile": { + "$id": "3443", + "kind": "model", + "type": { + "$ref": "516" + }, + "value": { + "$id": "3444", + "capacity": { + "$id": "3445", + "kind": "number", + "type": { + "$ref": "518" + }, + "value": 2 + }, + "minCapacity": { + "$id": "3446", + "kind": "number", + "type": { + "$ref": "522" + }, + "value": 1 + }, + "allocationStrategy": { + "$id": "3447", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "LowestPrice" + } + } + }, + "vmSizesProfile": { + "$id": "3448", + "kind": "array", + "type": { + "$ref": "531" + }, + "value": [ + { + "$id": "3449", + "kind": "model", + "type": { + "$ref": "532" + }, + "value": { + "$id": "3450", + "name": { + "$id": "3451", + "kind": "string", + "type": { + "$ref": "534" + }, + "value": "Standard_D2s_v3" + } + } + }, + { + "$id": "3452", + "kind": "model", + "type": { + "$ref": "532" + }, + "value": { + "$id": "3453", + "name": { + "$id": "3454", + "kind": "string", + "type": { + "$ref": "534" + }, + "value": "Standard_D4s_v3" + } + } + }, + { + "$id": "3455", + "kind": "model", + "type": { + "$ref": "532" + }, + "value": { + "$id": "3456", + "name": { + "$id": "3457", + "kind": "string", + "type": { + "$ref": "534" + }, + "value": "Standard_E2s_v3" + } + } + } + ] + }, + "computeProfile": { + "$id": "3458", + "kind": "model", + "type": { + "$ref": "1449" + }, + "value": { + "$id": "3459", + "baseVirtualMachineProfile": { + "$id": "3460", + "kind": "model", + "type": { + "$ref": "644" + }, + "value": { + "$id": "3461", + "storageProfile": { + "$id": "3462", + "kind": "model", + "type": { + "$ref": "836" + }, + "value": { + "$id": "3463", + "imageReference": { + "$id": "3464", + "kind": "model", + "type": { + "$ref": "838" + }, + "value": { + "$id": "3465", + "publisher": { + "$id": "3466", + "kind": "string", + "type": { + "$ref": "845" + }, + "value": "canonical" + }, + "offer": { + "$id": "3467", + "kind": "string", + "type": { + "$ref": "849" + }, + "value": "0001-com-ubuntu-server-focal" + }, + "sku": { + "$id": "3468", + "kind": "string", + "type": { + "$ref": "853" + }, + "value": "20_04-lts-gen2" + }, + "version": { + "$id": "3469", + "kind": "string", + "type": { + "$ref": "857" + }, + "value": "latest" + } + } + }, + "osDisk": { + "$id": "3470", + "kind": "model", + "type": { + "$ref": "875" + }, + "value": { + "$id": "3471", + "caching": { + "$id": "3472", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "ReadWrite" + }, + "createOption": { + "$id": "3473", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "FromImage" + }, + "osType": { + "$id": "3474", + "kind": "string", + "type": { + "$ref": "206" + }, + "value": "Linux" + }, + "managedDisk": { + "$id": "3475", + "kind": "model", + "type": { + "$ref": "921" + }, + "value": { + "$id": "3476", + "storageAccountType": { + "$id": "3477", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "Standard_LRS" + } + } + } + } + } + } + }, + "osProfile": { + "$id": "3478", + "kind": "model", + "type": { + "$ref": "646" + }, + "value": { + "$id": "3479", + "computerNamePrefix": { + "$id": "3480", + "kind": "string", + "type": { + "$ref": "648" + }, + "value": "prefix" + }, + "adminUsername": { + "$id": "3481", + "kind": "string", + "type": { + "$ref": "652" + }, + "value": "azureuser" + }, + "linuxConfiguration": { + "$id": "3482", + "kind": "model", + "type": { + "$ref": "745" + }, + "value": { + "$id": "3483", + "disablePasswordAuthentication": { + "$id": "3484", + "kind": "boolean", + "type": { + "$ref": "747" + }, + "value": false + } + } + } + } + }, + "networkProfile": { + "$id": "3485", + "kind": "model", + "type": { + "$ref": "998" + }, + "value": { + "$id": "3486", + "networkInterfaceConfigurations": { + "$id": "3487", + "kind": "array", + "type": { + "$ref": "1009" + }, + "value": [ + { + "$id": "3488", + "kind": "model", + "type": { + "$ref": "1010" + }, + "value": { + "$id": "3489", + "name": { + "$id": "3490", + "kind": "string", + "type": { + "$ref": "1012" + }, + "value": "vmNameTest" + }, + "properties": { + "$id": "3491", + "kind": "model", + "type": { + "$ref": "1016" + }, + "value": { + "$id": "3492", + "primary": { + "$id": "3493", + "kind": "boolean", + "type": { + "$ref": "1018" + }, + "value": true + }, + "enableAcceleratedNetworking": { + "$id": "3494", + "kind": "boolean", + "type": { + "$ref": "1022" + }, + "value": false + }, + "ipConfigurations": { + "$id": "3495", + "kind": "array", + "type": { + "$ref": "1046" + }, + "value": [ + { + "$id": "3496", + "kind": "model", + "type": { + "$ref": "1047" + }, + "value": { + "$id": "3497", + "name": { + "$id": "3498", + "kind": "string", + "type": { + "$ref": "1049" + }, + "value": "vmNameTest" + }, + "properties": { + "$id": "3499", + "kind": "model", + "type": { + "$ref": "1053" + }, + "value": { + "$id": "3500", + "subnet": { + "$id": "3501", + "kind": "model", + "type": { + "$ref": "1000" + }, + "value": { + "$id": "3502", + "id": { + "$id": "3503", + "kind": "string", + "type": { + "$ref": "1002" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}" + } + } + }, + "primary": { + "$id": "3504", + "kind": "boolean", + "type": { + "$ref": "1058" + }, + "value": true + }, + "loadBalancerBackendAddressPools": { + "$id": "3505", + "kind": "array", + "type": { + "$ref": "1132" + }, + "value": [ + { + "$id": "3506", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "3507", + "id": { + "$id": "3508", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + } + } + } + } + } + ] + }, + "enableIPForwarding": { + "$id": "3509", + "kind": "boolean", + "type": { + "$ref": "1144" + }, + "value": true + } + } + } + } + } + ] + }, + "networkApiVersion": { + "$id": "3510", + "kind": "string", + "type": { + "$ref": "302" + }, + "value": "2022-07-01" + } + } + } + } + }, + "computeApiVersion": { + "$id": "3511", + "kind": "string", + "type": { + "$ref": "1454" + }, + "value": "2023-09-01" + }, + "platformFaultDomainCount": { + "$id": "3512", + "kind": "number", + "type": { + "$ref": "1458" + }, + "value": 1 + } + } + }, + "timeCreated": { + "$id": "3513", + "kind": "string", + "type": { + "$ref": "1476" + }, + "value": "2024-07-10T00:16:34.8590555+00:00" + }, + "uniqueId": { + "$id": "3514", + "kind": "string", + "type": { + "$ref": "1481" + }, + "value": "a2f7fabd-bbc2-4a20-afe1-49fdb3885a28" + } + } + }, + "tags": { + "$id": "3515", + "kind": "dict", + "type": { + "$ref": "475" + }, + "value": { + "$id": "3516", + "key": { + "$id": "3517", + "kind": "string", + "type": { + "$ref": "477" + }, + "value": "fleets-test" + } + } + }, + "location": { + "$id": "3518", + "kind": "string", + "type": { + "$ref": "481" + }, + "value": "eastus2euap" + }, + "id": { + "$id": "3519", + "kind": "string", + "type": { + "$ref": "433" + }, + "value": "/subscriptions/7B0CD4DB-3381-4013-9B31-FB6E6FD0FF1C/resourceGroups/rgazurefleet/providers/Microsoft.AzureFleet/fleets/testFleet" + }, + "name": { + "$id": "3520", + "kind": "string", + "type": { + "$ref": "438" + }, + "value": "testFleet" + }, + "type": { + "$id": "3521", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "Microsoft.AzureFleet/fleets" + } + } + } + }, + { + "$id": "3522", + "response": { + "$ref": "2219" + }, + "statusCode": 201, + "bodyValue": { + "$id": "3523", + "kind": "model", + "type": { + "$ref": "429" + }, + "value": { + "$id": "3524", + "properties": { + "$id": "3525", + "kind": "model", + "type": { + "$ref": "485" + }, + "value": { + "$id": "3526", + "provisioningState": { + "$id": "3527", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Creating" + }, + "spotPriorityProfile": { + "$id": "3528", + "kind": "model", + "type": { + "$ref": "490" + }, + "value": { + "$id": "3529", + "capacity": { + "$id": "3530", + "kind": "number", + "type": { + "$ref": "492" + }, + "value": 2 + }, + "minCapacity": { + "$id": "3531", + "kind": "number", + "type": { + "$ref": "496" + }, + "value": 1 + }, + "evictionPolicy": { + "$id": "3532", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "Delete" + }, + "allocationStrategy": { + "$id": "3533", + "kind": "string", + "type": { + "$ref": "36" + }, + "value": "PriceCapacityOptimized" + }, + "maintain": { + "$id": "3534", + "kind": "boolean", + "type": { + "$ref": "510" + }, + "value": true + } + } + }, + "regularPriorityProfile": { + "$id": "3535", + "kind": "model", + "type": { + "$ref": "516" + }, + "value": { + "$id": "3536", + "capacity": { + "$id": "3537", + "kind": "number", + "type": { + "$ref": "518" + }, + "value": 2 + }, + "minCapacity": { + "$id": "3538", + "kind": "number", + "type": { + "$ref": "522" + }, + "value": 1 + }, + "allocationStrategy": { + "$id": "3539", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "LowestPrice" + } + } + }, + "vmSizesProfile": { + "$id": "3540", + "kind": "array", + "type": { + "$ref": "531" + }, + "value": [ + { + "$id": "3541", + "kind": "model", + "type": { + "$ref": "532" + }, + "value": { + "$id": "3542", + "name": { + "$id": "3543", + "kind": "string", + "type": { + "$ref": "534" + }, + "value": "Standard_D2s_v3" + } + } + }, + { + "$id": "3544", + "kind": "model", + "type": { + "$ref": "532" + }, + "value": { + "$id": "3545", + "name": { + "$id": "3546", + "kind": "string", + "type": { + "$ref": "534" + }, + "value": "Standard_D4s_v3" + } + } + }, + { + "$id": "3547", + "kind": "model", + "type": { + "$ref": "532" + }, + "value": { + "$id": "3548", + "name": { + "$id": "3549", + "kind": "string", + "type": { + "$ref": "534" + }, + "value": "Standard_E2s_v3" + } + } + } + ] + }, + "computeProfile": { + "$id": "3550", + "kind": "model", + "type": { + "$ref": "1449" + }, + "value": { + "$id": "3551", + "baseVirtualMachineProfile": { + "$id": "3552", + "kind": "model", + "type": { + "$ref": "644" + }, + "value": { + "$id": "3553", + "storageProfile": { + "$id": "3554", + "kind": "model", + "type": { + "$ref": "836" + }, + "value": { + "$id": "3555", + "imageReference": { + "$id": "3556", + "kind": "model", + "type": { + "$ref": "838" + }, + "value": { + "$id": "3557", + "publisher": { + "$id": "3558", + "kind": "string", + "type": { + "$ref": "845" + }, + "value": "canonical" + }, + "offer": { + "$id": "3559", + "kind": "string", + "type": { + "$ref": "849" + }, + "value": "0001-com-ubuntu-server-focal" + }, + "sku": { + "$id": "3560", + "kind": "string", + "type": { + "$ref": "853" + }, + "value": "20_04-lts-gen2" + }, + "version": { + "$id": "3561", + "kind": "string", + "type": { + "$ref": "857" + }, + "value": "latest" + } + } + }, + "osDisk": { + "$id": "3562", + "kind": "model", + "type": { + "$ref": "875" + }, + "value": { + "$id": "3563", + "caching": { + "$id": "3564", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "ReadWrite" + }, + "createOption": { + "$id": "3565", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "FromImage" + }, + "osType": { + "$id": "3566", + "kind": "string", + "type": { + "$ref": "206" + }, + "value": "Linux" + }, + "managedDisk": { + "$id": "3567", + "kind": "model", + "type": { + "$ref": "921" + }, + "value": { + "$id": "3568", + "storageAccountType": { + "$id": "3569", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "Standard_LRS" + } + } + } + } + } + } + }, + "osProfile": { + "$id": "3570", + "kind": "model", + "type": { + "$ref": "646" + }, + "value": { + "$id": "3571", + "computerNamePrefix": { + "$id": "3572", + "kind": "string", + "type": { + "$ref": "648" + }, + "value": "prefix" + }, + "adminUsername": { + "$id": "3573", + "kind": "string", + "type": { + "$ref": "652" + }, + "value": "azureuser" + }, + "linuxConfiguration": { + "$id": "3574", + "kind": "model", + "type": { + "$ref": "745" + }, + "value": { + "$id": "3575", + "disablePasswordAuthentication": { + "$id": "3576", + "kind": "boolean", + "type": { + "$ref": "747" + }, + "value": false + } + } + } + } + }, + "networkProfile": { + "$id": "3577", + "kind": "model", + "type": { + "$ref": "998" + }, + "value": { + "$id": "3578", + "networkInterfaceConfigurations": { + "$id": "3579", + "kind": "array", + "type": { + "$ref": "1009" + }, + "value": [ + { + "$id": "3580", + "kind": "model", + "type": { + "$ref": "1010" + }, + "value": { + "$id": "3581", + "name": { + "$id": "3582", + "kind": "string", + "type": { + "$ref": "1012" + }, + "value": "vmNameTest" + }, + "properties": { + "$id": "3583", + "kind": "model", + "type": { + "$ref": "1016" + }, + "value": { + "$id": "3584", + "primary": { + "$id": "3585", + "kind": "boolean", + "type": { + "$ref": "1018" + }, + "value": true + }, + "enableAcceleratedNetworking": { + "$id": "3586", + "kind": "boolean", + "type": { + "$ref": "1022" + }, + "value": false + }, + "ipConfigurations": { + "$id": "3587", + "kind": "array", + "type": { + "$ref": "1046" + }, + "value": [ + { + "$id": "3588", + "kind": "model", + "type": { + "$ref": "1047" + }, + "value": { + "$id": "3589", + "name": { + "$id": "3590", + "kind": "string", + "type": { + "$ref": "1049" + }, + "value": "vmNameTest" + }, + "properties": { + "$id": "3591", + "kind": "model", + "type": { + "$ref": "1053" + }, + "value": { + "$id": "3592", + "subnet": { + "$id": "3593", + "kind": "model", + "type": { + "$ref": "1000" + }, + "value": { + "$id": "3594", + "id": { + "$id": "3595", + "kind": "string", + "type": { + "$ref": "1002" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}" + } + } + }, + "primary": { + "$id": "3596", + "kind": "boolean", + "type": { + "$ref": "1058" + }, + "value": true + }, + "loadBalancerBackendAddressPools": { + "$id": "3597", + "kind": "array", + "type": { + "$ref": "1132" + }, + "value": [ + { + "$id": "3598", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "3599", + "id": { + "$id": "3600", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + } + } + } + } + } + ] + }, + "enableIPForwarding": { + "$id": "3601", + "kind": "boolean", + "type": { + "$ref": "1144" + }, + "value": true + } + } + } + } + } + ] + }, + "networkApiVersion": { + "$id": "3602", + "kind": "string", + "type": { + "$ref": "302" + }, + "value": "2022-07-01" + } + } + } + } + }, + "computeApiVersion": { + "$id": "3603", + "kind": "string", + "type": { + "$ref": "1454" + }, + "value": "2023-09-01" + }, + "platformFaultDomainCount": { + "$id": "3604", + "kind": "number", + "type": { + "$ref": "1458" + }, + "value": 1 + } + } + }, + "timeCreated": { + "$id": "3605", + "kind": "string", + "type": { + "$ref": "1476" + }, + "value": "2024-07-10T00:16:34.8590555+00:00" + }, + "uniqueId": { + "$id": "3606", + "kind": "string", + "type": { + "$ref": "1481" + }, + "value": "a2f7fabd-bbc2-4a20-afe1-49fdb3885a28" + } + } + }, + "tags": { + "$id": "3607", + "kind": "dict", + "type": { + "$ref": "475" + }, + "value": { + "$id": "3608", + "key": { + "$id": "3609", + "kind": "string", + "type": { + "$ref": "477" + }, + "value": "fleets-test" + } + } + }, + "location": { + "$id": "3610", + "kind": "string", + "type": { + "$ref": "481" + }, + "value": "eastus2euap" + }, + "id": { + "$id": "3611", + "kind": "string", + "type": { + "$ref": "433" + }, + "value": "/subscriptions/7B0CD4DB-3381-4013-9B31-FB6E6FD0FF1C/resourceGroups/rgazurefleet/providers/Microsoft.AzureFleet/fleets/testFleet" + }, + "name": { + "$id": "3612", + "kind": "string", + "type": { + "$ref": "438" + }, + "value": "testFleet" + }, + "type": { + "$id": "3613", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "Microsoft.AzureFleet/fleets" + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "3614", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3615", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3616", + "name": "fleetName", + "nameInRequest": "fleetName", + "doc": "The name of the Compute Fleet", + "type": { + "$id": "3617", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3618", + "name": "resource", + "nameInRequest": "resource", + "doc": "Resource create parameters.", + "type": { + "$ref": "429" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3619", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "3620", + "kind": "constant", + "valueType": { + "$id": "3621", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3622", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "3623", + "kind": "constant", + "valueType": { + "$id": "3624", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "3625", + "type": { + "$ref": "429" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.AzureFleet.Fleets.createOrUpdate" + }, + { + "$id": "3626", + "kind": "lro", + "name": "update", + "accessibility": "public", + "apiVersions": [ + "2023-11-01-preview", + "2024-05-01-preview", + "2024-11-01" + ], + "doc": "Update a Fleet", + "operation": { + "$id": "3627", + "name": "update", + "resourceName": "Fleet", + "doc": "Update a Fleet", + "accessibility": "public", + "parameters": [ + { + "$id": "3628", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "3629", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "3630", + "type": { + "$id": "3631", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-11-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3632", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "3633", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "3634", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3635", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3636", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3637", + "name": "fleetName", + "nameInRequest": "fleetName", + "doc": "The name of the Compute Fleet", + "type": { + "$id": "3638", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3639", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "3640", + "kind": "constant", + "valueType": { + "$id": "3641", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3642", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "3643", + "kind": "constant", + "valueType": { + "$id": "3644", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3645", + "name": "properties", + "nameInRequest": "properties", + "doc": "The resource properties to be updated.", + "type": { + "$ref": "1551" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "3646", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "429" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + { + "$id": "3647", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "3648", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "3649", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "3650", + "name": "retryAfter", + "nameInResponse": "Retry-After", + "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "type": { + "$id": "3651", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false + } + ], + "httpMethod": "PATCH", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureFleet/fleets/{fleetName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "longRunning": { + "$id": "3652", + "finalStateVia": 1, + "finalResponse": { + "$id": "3653", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "429" + } + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": false, + "crossLanguageDefinitionId": "Microsoft.AzureFleet.Fleets.update", + "decorators": [], + "examples": [ + { + "$id": "3654", + "kind": "http", + "name": "Fleets_Update", + "description": "Fleets_Update", + "filePath": "2024-11-01/Fleets_Update.json", + "parameters": [ + { + "$id": "3655", + "parameter": { + "$ref": "3628" + }, + "value": { + "$id": "3656", + "kind": "string", + "type": { + "$ref": "3629" + }, + "value": "2024-11-01" + } + }, + { + "$id": "3657", + "parameter": { + "$ref": "3632" + }, + "value": { + "$id": "3658", + "kind": "string", + "type": { + "$ref": "3633" + }, + "value": "1DC2F28C-A625-4B0E-9748-9885A3C9E9EB" + } + }, + { + "$id": "3659", + "parameter": { + "$ref": "3635" + }, + "value": { + "$id": "3660", + "kind": "string", + "type": { + "$ref": "3636" + }, + "value": "rgazurefleet" + } + }, + { + "$id": "3661", + "parameter": { + "$ref": "3637" + }, + "value": { + "$id": "3662", + "kind": "string", + "type": { + "$ref": "3638" + }, + "value": "testFleet" + } + }, + { + "$id": "3663", + "parameter": { + "$ref": "3645" + }, + "value": { + "$id": "3664", + "kind": "model", + "type": { + "$ref": "1551" + }, + "value": { + "$id": "3665", + "identity": { + "$id": "3666", + "kind": "model", + "type": { + "$ref": "1559" + }, + "value": { + "$id": "3667", + "type": { + "$id": "3668", + "kind": "string", + "type": { + "$ref": "318" + }, + "value": "UserAssigned" + }, + "userAssignedIdentities": { + "$id": "3669", + "kind": "dict", + "type": { + "$ref": "1564" + }, + "value": { + "$id": "3670" + } + } + } + }, + "tags": { + "$id": "3671", + "kind": "dict", + "type": { + "$ref": "1553" + }, + "value": { + "$id": "3672" + } + }, + "properties": { + "$id": "3673", + "kind": "model", + "type": { + "$ref": "485" + }, + "value": { + "$id": "3674", + "spotPriorityProfile": { + "$id": "3675", + "kind": "model", + "type": { + "$ref": "490" + }, + "value": { + "$id": "3676", + "capacity": { + "$id": "3677", + "kind": "number", + "type": { + "$ref": "492" + }, + "value": 20 + }, + "minCapacity": { + "$id": "3678", + "kind": "number", + "type": { + "$ref": "496" + }, + "value": 10 + }, + "maxPricePerVM": { + "$id": "3679", + "kind": "number", + "type": { + "$ref": "500" + }, + "value": 0.00865 + }, + "evictionPolicy": { + "$id": "3680", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "Delete" + }, + "allocationStrategy": { + "$id": "3681", + "kind": "string", + "type": { + "$ref": "36" + }, + "value": "PriceCapacityOptimized" + }, + "maintain": { + "$id": "3682", + "kind": "boolean", + "type": { + "$ref": "510" + }, + "value": true + } + } + }, + "regularPriorityProfile": { + "$id": "3683", + "kind": "model", + "type": { + "$ref": "516" + }, + "value": { + "$id": "3684", + "capacity": { + "$id": "3685", + "kind": "number", + "type": { + "$ref": "518" + }, + "value": 20 + }, + "minCapacity": { + "$id": "3686", + "kind": "number", + "type": { + "$ref": "522" + }, + "value": 10 + }, + "allocationStrategy": { + "$id": "3687", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "LowestPrice" + } + } + }, + "vmSizesProfile": { + "$id": "3688", + "kind": "array", + "type": { + "$ref": "531" + }, + "value": [ + { + "$id": "3689", + "kind": "model", + "type": { + "$ref": "532" + }, + "value": { + "$id": "3690", + "name": { + "$id": "3691", + "kind": "string", + "type": { + "$ref": "534" + }, + "value": "Standard_d1_v2" + }, + "rank": { + "$id": "3692", + "kind": "number", + "type": { + "$ref": "538" + }, + "value": 19225 + } + } + } + ] + }, + "computeProfile": { + "$id": "3693", + "kind": "model", + "type": { + "$ref": "1449" + }, + "value": { + "$id": "3694", + "baseVirtualMachineProfile": { + "$id": "3695", + "kind": "model", + "type": { + "$ref": "644" + }, + "value": { + "$id": "3696", + "osProfile": { + "$id": "3697", + "kind": "model", + "type": { + "$ref": "646" + }, + "value": { + "$id": "3698", + "computerNamePrefix": { + "$id": "3699", + "kind": "string", + "type": { + "$ref": "648" + }, + "value": "o" + }, + "adminUsername": { + "$id": "3700", + "kind": "string", + "type": { + "$ref": "652" + }, + "value": "nrgzqciiaaxjrqldbmjbqkyhntp" + }, + "adminPassword": { + "$id": "3701", + "kind": "string", + "type": { + "$ref": "656" + }, + "value": "adfbrdxpv" + }, + "customData": { + "$id": "3702", + "kind": "string", + "type": { + "$ref": "660" + }, + "value": "xjjib" + }, + "windowsConfiguration": { + "$id": "3703", + "kind": "model", + "type": { + "$ref": "664" + }, + "value": { + "$id": "3704", + "provisionVMAgent": { + "$id": "3705", + "kind": "boolean", + "type": { + "$ref": "666" + }, + "value": true + }, + "enableAutomaticUpdates": { + "$id": "3706", + "kind": "boolean", + "type": { + "$ref": "670" + }, + "value": true + }, + "timeZone": { + "$id": "3707", + "kind": "string", + "type": { + "$ref": "674" + }, + "value": "hlyjiqcfksgrpjrct" + }, + "additionalUnattendContent": { + "$id": "3708", + "kind": "array", + "type": { + "$ref": "678" + }, + "value": [ + { + "$id": "3709", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "3710", + "passName": { + "$id": "3711", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "OobeSystem" + }, + "componentName": { + "$id": "3712", + "kind": "string", + "type": { + "$ref": "685" + }, + "value": "Microsoft-Windows-Shell-Setup" + }, + "settingName": { + "$id": "3713", + "kind": "string", + "type": { + "$ref": "116" + }, + "value": "AutoLogon" + }, + "content": { + "$id": "3714", + "kind": "string", + "type": { + "$ref": "692" + }, + "value": "bubmqbxjkj" + } + } + } + ] + }, + "patchSettings": { + "$id": "3715", + "kind": "model", + "type": { + "$ref": "698" + }, + "value": { + "$id": "3716", + "patchMode": { + "$id": "3717", + "kind": "string", + "type": { + "$ref": "122" + }, + "value": "Manual" + }, + "enableHotpatching": { + "$id": "3718", + "kind": "boolean", + "type": { + "$ref": "703" + }, + "value": true + }, + "assessmentMode": { + "$id": "3719", + "kind": "string", + "type": { + "$ref": "130" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "3720", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "3721", + "rebootSetting": { + "$id": "3722", + "kind": "string", + "type": { + "$ref": "136" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "3723", + "kind": "boolean", + "type": { + "$ref": "715" + }, + "value": true + } + } + } + } + }, + "winRM": { + "$id": "3724", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "3725", + "listeners": { + "$id": "3726", + "kind": "array", + "type": { + "$ref": "725" + }, + "value": [ + { + "$id": "3727", + "kind": "model", + "type": { + "$ref": "726" + }, + "value": { + "$id": "3728", + "protocol": { + "$id": "3729", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "Http" + }, + "certificateUrl": { + "$id": "3730", + "kind": "string", + "type": { + "$ref": "731" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + } + } + } + ] + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "3731", + "kind": "boolean", + "type": { + "$ref": "739" + }, + "value": true + } + } + }, + "linuxConfiguration": { + "$id": "3732", + "kind": "model", + "type": { + "$ref": "745" + }, + "value": { + "$id": "3733", + "disablePasswordAuthentication": { + "$id": "3734", + "kind": "boolean", + "type": { + "$ref": "747" + }, + "value": true + }, + "ssh": { + "$id": "3735", + "kind": "model", + "type": { + "$ref": "751" + }, + "value": { + "$id": "3736", + "publicKeys": { + "$id": "3737", + "kind": "array", + "type": { + "$ref": "753" + }, + "value": [ + { + "$id": "3738", + "kind": "model", + "type": { + "$ref": "754" + }, + "value": { + "$id": "3739", + "path": { + "$id": "3740", + "kind": "string", + "type": { + "$ref": "756" + }, + "value": "kmqz" + }, + "keyData": { + "$id": "3741", + "kind": "string", + "type": { + "$ref": "760" + }, + "value": "kivgsubusvpprwqaqpjcmhsv" + } + } + } + ] + } + } + }, + "provisionVMAgent": { + "$id": "3742", + "kind": "boolean", + "type": { + "$ref": "768" + }, + "value": true + }, + "patchSettings": { + "$id": "3743", + "kind": "model", + "type": { + "$ref": "772" + }, + "value": { + "$id": "3744", + "patchMode": { + "$id": "3745", + "kind": "string", + "type": { + "$ref": "152" + }, + "value": "ImageDefault" + }, + "assessmentMode": { + "$id": "3746", + "kind": "string", + "type": { + "$ref": "158" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "3747", + "kind": "model", + "type": { + "$ref": "780" + }, + "value": { + "$id": "3748", + "rebootSetting": { + "$id": "3749", + "kind": "string", + "type": { + "$ref": "164" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "3750", + "kind": "boolean", + "type": { + "$ref": "785" + }, + "value": true + } + } + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "3751", + "kind": "boolean", + "type": { + "$ref": "793" + }, + "value": true + } + } + }, + "secrets": { + "$id": "3752", + "kind": "array", + "type": { + "$ref": "799" + }, + "value": [ + { + "$id": "3753", + "kind": "model", + "type": { + "$ref": "800" + }, + "value": { + "$id": "3754", + "sourceVault": { + "$id": "3755", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "3756", + "id": { + "$id": "3757", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + }, + "vaultCertificates": { + "$id": "3758", + "kind": "array", + "type": { + "$ref": "811" + }, + "value": [ + { + "$id": "3759", + "kind": "model", + "type": { + "$ref": "812" + }, + "value": { + "$id": "3760", + "certificateUrl": { + "$id": "3761", + "kind": "string", + "type": { + "$ref": "814" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + }, + "certificateStore": { + "$id": "3762", + "kind": "string", + "type": { + "$ref": "818" + }, + "value": "nlxrwavpzhueffxsshlun" + } + } + } + ] + } + } + } + ] + }, + "allowExtensionOperations": { + "$id": "3763", + "kind": "boolean", + "type": { + "$ref": "826" + }, + "value": true + }, + "requireGuestProvisionSignal": { + "$id": "3764", + "kind": "boolean", + "type": { + "$ref": "830" + }, + "value": true + } + } + }, + "storageProfile": { + "$id": "3765", + "kind": "model", + "type": { + "$ref": "836" + }, + "value": { + "$id": "3766", + "imageReference": { + "$id": "3767", + "kind": "model", + "type": { + "$ref": "838" + }, + "value": { + "$id": "3768", + "publisher": { + "$id": "3769", + "kind": "string", + "type": { + "$ref": "845" + }, + "value": "mqxgwbiyjzmxavhbkd" + }, + "offer": { + "$id": "3770", + "kind": "string", + "type": { + "$ref": "849" + }, + "value": "isxgumkarlkomp" + }, + "sku": { + "$id": "3771", + "kind": "string", + "type": { + "$ref": "853" + }, + "value": "eojmppqcrnpmxirtp" + }, + "version": { + "$id": "3772", + "kind": "string", + "type": { + "$ref": "857" + }, + "value": "wvpcqefgtmqdgltiuz" + }, + "sharedGalleryImageId": { + "$id": "3773", + "kind": "string", + "type": { + "$ref": "865" + }, + "value": "kmkgihoxwlawuuhcinfirktdwkmx" + }, + "communityGalleryImageId": { + "$id": "3774", + "kind": "string", + "type": { + "$ref": "869" + }, + "value": "vlqe" + }, + "id": { + "$id": "3775", + "kind": "string", + "type": { + "$ref": "840" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}/versions/{versionName}" + } + } + }, + "osDisk": { + "$id": "3776", + "kind": "model", + "type": { + "$ref": "875" + }, + "value": { + "$id": "3777", + "name": { + "$id": "3778", + "kind": "string", + "type": { + "$ref": "877" + }, + "value": "wfttw" + }, + "caching": { + "$id": "3779", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "3780", + "kind": "boolean", + "type": { + "$ref": "884" + }, + "value": true + }, + "createOption": { + "$id": "3781", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "FromImage" + }, + "diffDiskSettings": { + "$id": "3782", + "kind": "model", + "type": { + "$ref": "891" + }, + "value": { + "$id": "3783", + "option": { + "$id": "3784", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "Local" + }, + "placement": { + "$id": "3785", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "CacheDisk" + } + } + }, + "diskSizeGB": { + "$id": "3786", + "kind": "number", + "type": { + "$ref": "901" + }, + "value": 14 + }, + "osType": { + "$id": "3787", + "kind": "string", + "type": { + "$ref": "206" + }, + "value": "Windows" + }, + "image": { + "$id": "3788", + "kind": "model", + "type": { + "$ref": "908" + }, + "value": { + "$id": "3789", + "uri": { + "$id": "3790", + "kind": "string", + "type": { + "$ref": "910" + }, + "value": "https://myStorageAccountName.blob.core.windows.net/myContainerName/myVhdName.vhd" + } + } + }, + "vhdContainers": { + "$id": "3791", + "kind": "array", + "type": { + "$ref": "916" + }, + "value": [ + { + "$id": "3792", + "kind": "string", + "type": { + "$ref": "917" + }, + "value": "tkzcwddtinkfpnfklatw" + } + ] + }, + "managedDisk": { + "$id": "3793", + "kind": "model", + "type": { + "$ref": "921" + }, + "value": { + "$id": "3794", + "storageAccountType": { + "$id": "3795", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "3796", + "kind": "model", + "type": { + "$ref": "926" + }, + "value": { + "$id": "3797", + "id": { + "$id": "3798", + "kind": "string", + "type": { + "$ref": "928" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "3799", + "kind": "model", + "type": { + "$ref": "935" + }, + "value": { + "$id": "3800", + "securityEncryptionType": { + "$id": "3801", + "kind": "string", + "type": { + "$ref": "228" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "3802", + "kind": "model", + "type": { + "$ref": "926" + }, + "value": { + "$id": "3803", + "id": { + "$id": "3804", + "kind": "string", + "type": { + "$ref": "928" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "deleteOption": { + "$id": "3805", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "Delete" + } + } + }, + "dataDisks": { + "$id": "3806", + "kind": "array", + "type": { + "$ref": "952" + }, + "value": [ + { + "$id": "3807", + "kind": "model", + "type": { + "$ref": "953" + }, + "value": { + "$id": "3808", + "name": { + "$id": "3809", + "kind": "string", + "type": { + "$ref": "955" + }, + "value": "eogiykmdmeikswxmigjws" + }, + "lun": { + "$id": "3810", + "kind": "number", + "type": { + "$ref": "959" + }, + "value": 14 + }, + "caching": { + "$id": "3811", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "3812", + "kind": "boolean", + "type": { + "$ref": "966" + }, + "value": true + }, + "createOption": { + "$id": "3813", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "FromImage" + }, + "diskSizeGB": { + "$id": "3814", + "kind": "number", + "type": { + "$ref": "973" + }, + "value": 6 + }, + "managedDisk": { + "$id": "3815", + "kind": "model", + "type": { + "$ref": "921" + }, + "value": { + "$id": "3816", + "storageAccountType": { + "$id": "3817", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "3818", + "kind": "model", + "type": { + "$ref": "926" + }, + "value": { + "$id": "3819", + "id": { + "$id": "3820", + "kind": "string", + "type": { + "$ref": "928" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "3821", + "kind": "model", + "type": { + "$ref": "935" + }, + "value": { + "$id": "3822", + "securityEncryptionType": { + "$id": "3823", + "kind": "string", + "type": { + "$ref": "228" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "3824", + "kind": "model", + "type": { + "$ref": "926" + }, + "value": { + "$id": "3825", + "id": { + "$id": "3826", + "kind": "string", + "type": { + "$ref": "928" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "diskIOPSReadWrite": { + "$id": "3827", + "kind": "number", + "type": { + "$ref": "980" + }, + "value": 27 + }, + "diskMBpsReadWrite": { + "$id": "3828", + "kind": "number", + "type": { + "$ref": "984" + }, + "value": 2 + }, + "deleteOption": { + "$id": "3829", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "Delete" + } + } + } + ] + }, + "diskControllerType": { + "$id": "3830", + "kind": "string", + "type": { + "$ref": "242" + }, + "value": "uzb" + } + } + }, + "networkProfile": { + "$id": "3831", + "kind": "model", + "type": { + "$ref": "998" + }, + "value": { + "$id": "3832", + "healthProbe": { + "$id": "3833", + "kind": "model", + "type": { + "$ref": "1000" + }, + "value": { + "$id": "3834", + "id": { + "$id": "3835", + "kind": "string", + "type": { + "$ref": "1002" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}" + } + } + }, + "networkInterfaceConfigurations": { + "$id": "3836", + "kind": "array", + "type": { + "$ref": "1009" + }, + "value": [ + { + "$id": "3837", + "kind": "model", + "type": { + "$ref": "1010" + }, + "value": { + "$id": "3838", + "name": { + "$id": "3839", + "kind": "string", + "type": { + "$ref": "1012" + }, + "value": "i" + }, + "properties": { + "$id": "3840", + "kind": "model", + "type": { + "$ref": "1016" + }, + "value": { + "$id": "3841", + "primary": { + "$id": "3842", + "kind": "boolean", + "type": { + "$ref": "1018" + }, + "value": true + }, + "enableAcceleratedNetworking": { + "$id": "3843", + "kind": "boolean", + "type": { + "$ref": "1022" + }, + "value": true + }, + "disableTcpStateTracking": { + "$id": "3844", + "kind": "boolean", + "type": { + "$ref": "1026" + }, + "value": true + }, + "enableFpga": { + "$id": "3845", + "kind": "boolean", + "type": { + "$ref": "1030" + }, + "value": true + }, + "networkSecurityGroup": { + "$id": "3846", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "3847", + "id": { + "$id": "3848", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}" + } + } + }, + "dnsSettings": { + "$id": "3849", + "kind": "model", + "type": { + "$ref": "1037" + }, + "value": { + "$id": "3850", + "dnsServers": { + "$id": "3851", + "kind": "array", + "type": { + "$ref": "1039" + }, + "value": [ + { + "$id": "3852", + "kind": "string", + "type": { + "$ref": "1040" + }, + "value": "nxmmfolhclsesu" + } + ] + } + } + }, + "ipConfigurations": { + "$id": "3853", + "kind": "array", + "type": { + "$ref": "1046" + }, + "value": [ + { + "$id": "3854", + "kind": "model", + "type": { + "$ref": "1047" + }, + "value": { + "$id": "3855", + "name": { + "$id": "3856", + "kind": "string", + "type": { + "$ref": "1049" + }, + "value": "oezqhkidfhyywlfzwuotilrpbqnjg" + }, + "properties": { + "$id": "3857", + "kind": "model", + "type": { + "$ref": "1053" + }, + "value": { + "$id": "3858", + "subnet": { + "$id": "3859", + "kind": "model", + "type": { + "$ref": "1000" + }, + "value": { + "$id": "3860", + "id": { + "$id": "3861", + "kind": "string", + "type": { + "$ref": "1002" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}" + } + } + }, + "primary": { + "$id": "3862", + "kind": "boolean", + "type": { + "$ref": "1058" + }, + "value": true + }, + "publicIPAddressConfiguration": { + "$id": "3863", + "kind": "model", + "type": { + "$ref": "1062" + }, + "value": { + "$id": "3864", + "name": { + "$id": "3865", + "kind": "string", + "type": { + "$ref": "1064" + }, + "value": "fvpqf" + }, + "properties": { + "$id": "3866", + "kind": "model", + "type": { + "$ref": "1068" + }, + "value": { + "$id": "3867", + "idleTimeoutInMinutes": { + "$id": "3868", + "kind": "number", + "type": { + "$ref": "1070" + }, + "value": 9 + }, + "dnsSettings": { + "$id": "3869", + "kind": "model", + "type": { + "$ref": "1074" + }, + "value": { + "$id": "3870", + "domainNameLabel": { + "$id": "3871", + "kind": "string", + "type": { + "$ref": "1076" + }, + "value": "ukrddzvmorpmfsczjwtbvp" + }, + "domainNameLabelScope": { + "$id": "3872", + "kind": "string", + "type": { + "$ref": "248" + }, + "value": "TenantReuse" + } + } + }, + "ipTags": { + "$id": "3873", + "kind": "array", + "type": { + "$ref": "1085" + }, + "value": [ + { + "$id": "3874", + "kind": "model", + "type": { + "$ref": "1086" + }, + "value": { + "$id": "3875", + "ipTagType": { + "$id": "3876", + "kind": "string", + "type": { + "$ref": "1088" + }, + "value": "sddgsoemnzgqizale" + }, + "tag": { + "$id": "3877", + "kind": "string", + "type": { + "$ref": "1092" + }, + "value": "wufmhrjsakbiaetyara" + } + } + } + ] + }, + "publicIPPrefix": { + "$id": "3878", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "3879", + "id": { + "$id": "3880", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}" + } + } + }, + "publicIPAddressVersion": { + "$id": "3881", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "IPv4" + }, + "deleteOption": { + "$id": "3882", + "kind": "string", + "type": { + "$ref": "264" + }, + "value": "Delete" + } + } + }, + "sku": { + "$id": "3883", + "kind": "model", + "type": { + "$ref": "1109" + }, + "value": { + "$id": "3884", + "name": { + "$id": "3885", + "kind": "string", + "type": { + "$ref": "270" + }, + "value": "Basic" + }, + "tier": { + "$id": "3886", + "kind": "string", + "type": { + "$ref": "276" + }, + "value": "Regional" + } + } + } + } + }, + "privateIPAddressVersion": { + "$id": "3887", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "IPv4" + }, + "applicationGatewayBackendAddressPools": { + "$id": "3888", + "kind": "array", + "type": { + "$ref": "1124" + }, + "value": [ + { + "$id": "3889", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "3890", + "id": { + "$id": "3891", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "applicationSecurityGroups": { + "$id": "3892", + "kind": "array", + "type": { + "$ref": "1128" + }, + "value": [ + { + "$id": "3893", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "3894", + "id": { + "$id": "3895", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}" + } + } + } + ] + }, + "loadBalancerBackendAddressPools": { + "$id": "3896", + "kind": "array", + "type": { + "$ref": "1132" + }, + "value": [ + { + "$id": "3897", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "3898", + "id": { + "$id": "3899", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "loadBalancerInboundNatPools": { + "$id": "3900", + "kind": "array", + "type": { + "$ref": "1136" + }, + "value": [ + { + "$id": "3901", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "3902", + "id": { + "$id": "3903", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatPools/{inboundNatPoolName}" + } + } + } + ] + } + } + } + } + } + ] + }, + "enableIPForwarding": { + "$id": "3904", + "kind": "boolean", + "type": { + "$ref": "1144" + }, + "value": true + }, + "deleteOption": { + "$id": "3905", + "kind": "string", + "type": { + "$ref": "264" + }, + "value": "Delete" + }, + "auxiliaryMode": { + "$id": "3906", + "kind": "string", + "type": { + "$ref": "282" + }, + "value": "None" + }, + "auxiliarySku": { + "$id": "3907", + "kind": "string", + "type": { + "$ref": "290" + }, + "value": "None" + } + } + } + } + } + ] + }, + "networkApiVersion": { + "$id": "3908", + "kind": "string", + "type": { + "$ref": "302" + }, + "value": "2020-11-01" + } + } + }, + "securityProfile": { + "$id": "3909", + "kind": "model", + "type": { + "$ref": "1166" + }, + "value": { + "$id": "3910", + "uefiSettings": { + "$id": "3911", + "kind": "model", + "type": { + "$ref": "1168" + }, + "value": { + "$id": "3912", + "secureBootEnabled": { + "$id": "3913", + "kind": "boolean", + "type": { + "$ref": "1170" + }, + "value": true + }, + "vTpmEnabled": { + "$id": "3914", + "kind": "boolean", + "type": { + "$ref": "1174" + }, + "value": true + } + } + }, + "encryptionAtHost": { + "$id": "3915", + "kind": "boolean", + "type": { + "$ref": "1180" + }, + "value": true + }, + "securityType": { + "$id": "3916", + "kind": "string", + "type": { + "$ref": "306" + }, + "value": "TrustedLaunch" + }, + "encryptionIdentity": { + "$id": "3917", + "kind": "model", + "type": { + "$ref": "1187" + }, + "value": { + "$id": "3918", + "userAssignedIdentityResourceId": { + "$id": "3919", + "kind": "string", + "type": { + "$ref": "1189" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{userAssignedIdentityName}" + } + } + }, + "proxyAgentSettings": { + "$id": "3920", + "kind": "model", + "type": { + "$ref": "1196" + }, + "value": { + "$id": "3921", + "enabled": { + "$id": "3922", + "kind": "boolean", + "type": { + "$ref": "1198" + }, + "value": true + }, + "mode": { + "$id": "3923", + "kind": "string", + "type": { + "$ref": "312" + }, + "value": "Audit" + }, + "keyIncarnationId": { + "$id": "3924", + "kind": "number", + "type": { + "$ref": "1205" + }, + "value": 20 + } + } + } + } + }, + "diagnosticsProfile": { + "$id": "3925", + "kind": "model", + "type": { + "$ref": "1213" + }, + "value": { + "$id": "3926", + "bootDiagnostics": { + "$id": "3927", + "kind": "model", + "type": { + "$ref": "1215" + }, + "value": { + "$id": "3928", + "enabled": { + "$id": "3929", + "kind": "boolean", + "type": { + "$ref": "1217" + }, + "value": true + }, + "storageUri": { + "$id": "3930", + "kind": "string", + "type": { + "$ref": "1221" + }, + "value": "http://myStorageAccountName.blob.core.windows.net" + } + } + } + } + }, + "extensionProfile": { + "$id": "3931", + "kind": "model", + "type": { + "$ref": "1229" + }, + "value": { + "$id": "3932", + "extensions": { + "$id": "3933", + "kind": "array", + "type": { + "$ref": "1231" + }, + "value": [ + { + "$id": "3934", + "kind": "model", + "type": { + "$ref": "1232" + }, + "value": { + "$id": "3935", + "name": { + "$id": "3936", + "kind": "string", + "type": { + "$ref": "1239" + }, + "value": "bndxuxx" + }, + "properties": { + "$id": "3937", + "kind": "model", + "type": { + "$ref": "1247" + }, + "value": { + "$id": "3938", + "forceUpdateTag": { + "$id": "3939", + "kind": "string", + "type": { + "$ref": "1249" + }, + "value": "yhgxw" + }, + "publisher": { + "$id": "3940", + "kind": "string", + "type": { + "$ref": "1253" + }, + "value": "kpxtirxjfprhs" + }, + "type": { + "$id": "3941", + "kind": "string", + "type": { + "$ref": "1257" + }, + "value": "pgjilctjjwaa" + }, + "typeHandlerVersion": { + "$id": "3942", + "kind": "string", + "type": { + "$ref": "1261" + }, + "value": "zevivcoilxmbwlrihhhibq" + }, + "autoUpgradeMinorVersion": { + "$id": "3943", + "kind": "boolean", + "type": { + "$ref": "1265" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "3944", + "kind": "boolean", + "type": { + "$ref": "1269" + }, + "value": true + }, + "settings": { + "$id": "3945", + "kind": "dict", + "type": { + "$ref": "1273" + }, + "value": { + "$id": "3946" + } + }, + "protectedSettings": { + "$id": "3947", + "kind": "dict", + "type": { + "$ref": "1279" + }, + "value": { + "$id": "3948" + } + }, + "provisionAfterExtensions": { + "$id": "3949", + "kind": "array", + "type": { + "$ref": "1289" + }, + "value": [ + { + "$id": "3950", + "kind": "string", + "type": { + "$ref": "1290" + }, + "value": "nftzosroolbcwmpupujzqwqe" + } + ] + }, + "suppressFailures": { + "$id": "3951", + "kind": "boolean", + "type": { + "$ref": "1294" + }, + "value": true + }, + "protectedSettingsFromKeyVault": { + "$id": "3952", + "kind": "model", + "type": { + "$ref": "1298" + }, + "value": { + "$id": "3953", + "secretUrl": { + "$id": "3954", + "kind": "string", + "type": { + "$ref": "1300" + }, + "value": "https://myVaultName.vault.azure.net/secrets/secret/mySecretName" + }, + "sourceVault": { + "$id": "3955", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "3956", + "id": { + "$id": "3957", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + } + } + } + } + } + } + } + ] + }, + "extensionsTimeBudget": { + "$id": "3958", + "kind": "string", + "type": { + "$ref": "1313" + }, + "value": "mbhjahtdygwgyszdwjtvlvtgchdwil" + } + } + }, + "licenseType": { + "$id": "3959", + "kind": "string", + "type": { + "$ref": "1319" + }, + "value": "v" + }, + "scheduledEventsProfile": { + "$id": "3960", + "kind": "model", + "type": { + "$ref": "1323" + }, + "value": { + "$id": "3961", + "terminateNotificationProfile": { + "$id": "3962", + "kind": "model", + "type": { + "$ref": "1325" + }, + "value": { + "$id": "3963", + "notBeforeTimeout": { + "$id": "3964", + "kind": "string", + "type": { + "$ref": "1327" + }, + "value": "iljppmmw" + }, + "enable": { + "$id": "3965", + "kind": "boolean", + "type": { + "$ref": "1331" + }, + "value": true + } + } + }, + "osImageNotificationProfile": { + "$id": "3966", + "kind": "model", + "type": { + "$ref": "1337" + }, + "value": { + "$id": "3967", + "notBeforeTimeout": { + "$id": "3968", + "kind": "string", + "type": { + "$ref": "1339" + }, + "value": "olbpadmevekyczfokodtfprxti" + }, + "enable": { + "$id": "3969", + "kind": "boolean", + "type": { + "$ref": "1343" + }, + "value": true + } + } + } + } + }, + "userData": { + "$id": "3970", + "kind": "string", + "type": { + "$ref": "1351" + }, + "value": "s" + }, + "capacityReservation": { + "$id": "3971", + "kind": "model", + "type": { + "$ref": "1355" + }, + "value": { + "$id": "3972", + "capacityReservationGroup": { + "$id": "3973", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "3974", + "id": { + "$id": "3975", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}" + } + } + } + } + }, + "applicationProfile": { + "$id": "3976", + "kind": "model", + "type": { + "$ref": "1362" + }, + "value": { + "$id": "3977", + "galleryApplications": { + "$id": "3978", + "kind": "array", + "type": { + "$ref": "1364" + }, + "value": [ + { + "$id": "3979", + "kind": "model", + "type": { + "$ref": "1365" + }, + "value": { + "$id": "3980", + "tags": { + "$id": "3981", + "kind": "string", + "type": { + "$ref": "1367" + }, + "value": "eyrqjbib" + }, + "order": { + "$id": "3982", + "kind": "number", + "type": { + "$ref": "1371" + }, + "value": 5 + }, + "packageReferenceId": { + "$id": "3983", + "kind": "string", + "type": { + "$ref": "1375" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{applicationName}/versions/{versionName}" + }, + "configurationReference": { + "$id": "3984", + "kind": "string", + "type": { + "$ref": "1380" + }, + "value": "ulztmiavpojpbpbddgnuuiimxcpau" + }, + "treatFailureAsDeploymentFailure": { + "$id": "3985", + "kind": "boolean", + "type": { + "$ref": "1384" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "3986", + "kind": "boolean", + "type": { + "$ref": "1388" + }, + "value": true + } + } + } + ] + } + } + }, + "hardwareProfile": { + "$id": "3987", + "kind": "model", + "type": { + "$ref": "1396" + }, + "value": { + "$id": "3988", + "vmSizeProperties": { + "$id": "3989", + "kind": "model", + "type": { + "$ref": "1398" + }, + "value": { + "$id": "3990", + "vCPUsAvailable": { + "$id": "3991", + "kind": "number", + "type": { + "$ref": "1400" + }, + "value": 16 + }, + "vCPUsPerCore": { + "$id": "3992", + "kind": "number", + "type": { + "$ref": "1404" + }, + "value": 23 + } + } + } + } + }, + "serviceArtifactReference": { + "$id": "3993", + "kind": "model", + "type": { + "$ref": "1412" + }, + "value": { + "$id": "3994", + "id": { + "$id": "3995", + "kind": "string", + "type": { + "$ref": "1414" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactsName}/vmArtifactsProfiles/{vmArtifactsProfileName}" + } + } + }, + "securityPostureReference": { + "$id": "3996", + "kind": "model", + "type": { + "$ref": "1421" + }, + "value": { + "$id": "3997", + "id": { + "$id": "3998", + "kind": "string", + "type": { + "$ref": "1423" + }, + "value": "/CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest" + }, + "excludeExtensions": { + "$id": "3999", + "kind": "array", + "type": { + "$ref": "1427" + }, + "value": [ + { + "$id": "4000", + "kind": "string", + "type": { + "$ref": "1428" + }, + "value": "{securityPostureVMExtensionName}" + } + ] + }, + "isOverridable": { + "$id": "4001", + "kind": "boolean", + "type": { + "$ref": "1432" + }, + "value": true + } + } + } + } + }, + "computeApiVersion": { + "$id": "4002", + "kind": "string", + "type": { + "$ref": "1454" + }, + "value": "2023-07-01" + }, + "platformFaultDomainCount": { + "$id": "4003", + "kind": "number", + "type": { + "$ref": "1458" + }, + "value": 1 + } + } + } + } + }, + "plan": { + "$id": "4004", + "kind": "model", + "type": { + "$ref": "1571" + }, + "value": { + "$id": "4005", + "name": { + "$id": "4006", + "kind": "string", + "type": { + "$ref": "1573" + }, + "value": "jwgrcrnrtfoxn" + }, + "publisher": { + "$id": "4007", + "kind": "string", + "type": { + "$ref": "1577" + }, + "value": "iozjbiqqckqm" + }, + "product": { + "$id": "4008", + "kind": "string", + "type": { + "$ref": "1581" + }, + "value": "cgopbyvdyqikahwyxfpzwaqk" + }, + "promotionCode": { + "$id": "4009", + "kind": "string", + "type": { + "$ref": "1585" + }, + "value": "naglezezplcaruqogtxnuizslqnnbr" + }, + "version": { + "$id": "4010", + "kind": "string", + "type": { + "$ref": "1589" + }, + "value": "wa" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "4011", + "response": { + "$ref": "3646" + }, + "statusCode": 200, + "bodyValue": { + "$id": "4012", + "kind": "model", + "type": { + "$ref": "429" + }, + "value": { + "$id": "4013", + "properties": { + "$id": "4014", + "kind": "model", + "type": { + "$ref": "485" + }, + "value": { + "$id": "4015", + "spotPriorityProfile": { + "$id": "4016", + "kind": "model", + "type": { + "$ref": "490" + }, + "value": { + "$id": "4017", + "capacity": { + "$id": "4018", + "kind": "number", + "type": { + "$ref": "492" + }, + "value": 20 + }, + "minCapacity": { + "$id": "4019", + "kind": "number", + "type": { + "$ref": "496" + }, + "value": 10 + }, + "maxPricePerVM": { + "$id": "4020", + "kind": "number", + "type": { + "$ref": "500" + }, + "value": 0.00865 + }, + "evictionPolicy": { + "$id": "4021", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "Delete" + }, + "allocationStrategy": { + "$id": "4022", + "kind": "string", + "type": { + "$ref": "36" + }, + "value": "PriceCapacityOptimized" + }, + "maintain": { + "$id": "4023", + "kind": "boolean", + "type": { + "$ref": "510" + }, + "value": true + } + } + }, + "regularPriorityProfile": { + "$id": "4024", + "kind": "model", + "type": { + "$ref": "516" + }, + "value": { + "$id": "4025", + "capacity": { + "$id": "4026", + "kind": "number", + "type": { + "$ref": "518" + }, + "value": 20 + }, + "minCapacity": { + "$id": "4027", + "kind": "number", + "type": { + "$ref": "522" + }, + "value": 10 + }, + "allocationStrategy": { + "$id": "4028", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "LowestPrice" + } + } + }, + "vmSizesProfile": { + "$id": "4029", + "kind": "array", + "type": { + "$ref": "531" + }, + "value": [ + { + "$id": "4030", + "kind": "model", + "type": { + "$ref": "532" + }, + "value": { + "$id": "4031", + "name": { + "$id": "4032", + "kind": "string", + "type": { + "$ref": "534" + }, + "value": "Standard_d1_v2" + }, + "rank": { + "$id": "4033", + "kind": "number", + "type": { + "$ref": "538" + }, + "value": 19225 + } + } + } + ] + }, + "computeProfile": { + "$id": "4034", + "kind": "model", + "type": { + "$ref": "1449" + }, + "value": { + "$id": "4035", + "baseVirtualMachineProfile": { + "$id": "4036", + "kind": "model", + "type": { + "$ref": "644" + }, + "value": { + "$id": "4037", + "osProfile": { + "$id": "4038", + "kind": "model", + "type": { + "$ref": "646" + }, + "value": { + "$id": "4039", + "computerNamePrefix": { + "$id": "4040", + "kind": "string", + "type": { + "$ref": "648" + }, + "value": "o" + }, + "adminUsername": { + "$id": "4041", + "kind": "string", + "type": { + "$ref": "652" + }, + "value": "nrgzqciiaaxjrqldbmjbqkyhntp" + }, + "windowsConfiguration": { + "$id": "4042", + "kind": "model", + "type": { + "$ref": "664" + }, + "value": { + "$id": "4043", + "provisionVMAgent": { + "$id": "4044", + "kind": "boolean", + "type": { + "$ref": "666" + }, + "value": true + }, + "enableAutomaticUpdates": { + "$id": "4045", + "kind": "boolean", + "type": { + "$ref": "670" + }, + "value": true + }, + "timeZone": { + "$id": "4046", + "kind": "string", + "type": { + "$ref": "674" + }, + "value": "hlyjiqcfksgrpjrct" + }, + "additionalUnattendContent": { + "$id": "4047", + "kind": "array", + "type": { + "$ref": "678" + }, + "value": [ + { + "$id": "4048", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "4049", + "passName": { + "$id": "4050", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "OobeSystem" + }, + "componentName": { + "$id": "4051", + "kind": "string", + "type": { + "$ref": "685" + }, + "value": "Microsoft-Windows-Shell-Setup" + }, + "settingName": { + "$id": "4052", + "kind": "string", + "type": { + "$ref": "116" + }, + "value": "AutoLogon" + } + } + } + ] + }, + "patchSettings": { + "$id": "4053", + "kind": "model", + "type": { + "$ref": "698" + }, + "value": { + "$id": "4054", + "patchMode": { + "$id": "4055", + "kind": "string", + "type": { + "$ref": "122" + }, + "value": "Manual" + }, + "enableHotpatching": { + "$id": "4056", + "kind": "boolean", + "type": { + "$ref": "703" + }, + "value": true + }, + "assessmentMode": { + "$id": "4057", + "kind": "string", + "type": { + "$ref": "130" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "4058", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "4059", + "rebootSetting": { + "$id": "4060", + "kind": "string", + "type": { + "$ref": "136" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "4061", + "kind": "boolean", + "type": { + "$ref": "715" + }, + "value": true + } + } + } + } + }, + "winRM": { + "$id": "4062", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "4063", + "listeners": { + "$id": "4064", + "kind": "array", + "type": { + "$ref": "725" + }, + "value": [ + { + "$id": "4065", + "kind": "model", + "type": { + "$ref": "726" + }, + "value": { + "$id": "4066", + "protocol": { + "$id": "4067", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "Http" + }, + "certificateUrl": { + "$id": "4068", + "kind": "string", + "type": { + "$ref": "731" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + } + } + } + ] + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "4069", + "kind": "boolean", + "type": { + "$ref": "739" + }, + "value": true + } + } + }, + "linuxConfiguration": { + "$id": "4070", + "kind": "model", + "type": { + "$ref": "745" + }, + "value": { + "$id": "4071", + "disablePasswordAuthentication": { + "$id": "4072", + "kind": "boolean", + "type": { + "$ref": "747" + }, + "value": true + }, + "ssh": { + "$id": "4073", + "kind": "model", + "type": { + "$ref": "751" + }, + "value": { + "$id": "4074", + "publicKeys": { + "$id": "4075", + "kind": "array", + "type": { + "$ref": "753" + }, + "value": [ + { + "$id": "4076", + "kind": "model", + "type": { + "$ref": "754" + }, + "value": { + "$id": "4077", + "path": { + "$id": "4078", + "kind": "string", + "type": { + "$ref": "756" + }, + "value": "kmqz" + }, + "keyData": { + "$id": "4079", + "kind": "string", + "type": { + "$ref": "760" + }, + "value": "kivgsubusvpprwqaqpjcmhsv" + } + } + } + ] + } + } + }, + "provisionVMAgent": { + "$id": "4080", + "kind": "boolean", + "type": { + "$ref": "768" + }, + "value": true + }, + "patchSettings": { + "$id": "4081", + "kind": "model", + "type": { + "$ref": "772" + }, + "value": { + "$id": "4082", + "patchMode": { + "$id": "4083", + "kind": "string", + "type": { + "$ref": "152" + }, + "value": "ImageDefault" + }, + "assessmentMode": { + "$id": "4084", + "kind": "string", + "type": { + "$ref": "158" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "4085", + "kind": "model", + "type": { + "$ref": "780" + }, + "value": { + "$id": "4086", + "rebootSetting": { + "$id": "4087", + "kind": "string", + "type": { + "$ref": "164" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "4088", + "kind": "boolean", + "type": { + "$ref": "785" + }, + "value": true + } + } + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "4089", + "kind": "boolean", + "type": { + "$ref": "793" + }, + "value": true + } + } + }, + "secrets": { + "$id": "4090", + "kind": "array", + "type": { + "$ref": "799" + }, + "value": [ + { + "$id": "4091", + "kind": "model", + "type": { + "$ref": "800" + }, + "value": { + "$id": "4092", + "sourceVault": { + "$id": "4093", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "4094", + "id": { + "$id": "4095", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + }, + "vaultCertificates": { + "$id": "4096", + "kind": "array", + "type": { + "$ref": "811" + }, + "value": [ + { + "$id": "4097", + "kind": "model", + "type": { + "$ref": "812" + }, + "value": { + "$id": "4098", + "certificateUrl": { + "$id": "4099", + "kind": "string", + "type": { + "$ref": "814" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + }, + "certificateStore": { + "$id": "4100", + "kind": "string", + "type": { + "$ref": "818" + }, + "value": "nlxrwavpzhueffxsshlun" + } + } + } + ] + } + } + } + ] + }, + "allowExtensionOperations": { + "$id": "4101", + "kind": "boolean", + "type": { + "$ref": "826" + }, + "value": true + }, + "requireGuestProvisionSignal": { + "$id": "4102", + "kind": "boolean", + "type": { + "$ref": "830" + }, + "value": true + } + } + }, + "storageProfile": { + "$id": "4103", + "kind": "model", + "type": { + "$ref": "836" + }, + "value": { + "$id": "4104", + "imageReference": { + "$id": "4105", + "kind": "model", + "type": { + "$ref": "838" + }, + "value": { + "$id": "4106", + "publisher": { + "$id": "4107", + "kind": "string", + "type": { + "$ref": "845" + }, + "value": "mqxgwbiyjzmxavhbkd" + }, + "offer": { + "$id": "4108", + "kind": "string", + "type": { + "$ref": "849" + }, + "value": "isxgumkarlkomp" + }, + "sku": { + "$id": "4109", + "kind": "string", + "type": { + "$ref": "853" + }, + "value": "eojmppqcrnpmxirtp" + }, + "version": { + "$id": "4110", + "kind": "string", + "type": { + "$ref": "857" + }, + "value": "wvpcqefgtmqdgltiuz" + }, + "sharedGalleryImageId": { + "$id": "4111", + "kind": "string", + "type": { + "$ref": "865" + }, + "value": "kmkgihoxwlawuuhcinfirktdwkmx" + }, + "communityGalleryImageId": { + "$id": "4112", + "kind": "string", + "type": { + "$ref": "869" + }, + "value": "vlqe" + }, + "id": { + "$id": "4113", + "kind": "string", + "type": { + "$ref": "840" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}/versions/{versionName}" + }, + "exactVersion": { + "$id": "4114", + "kind": "string", + "type": { + "$ref": "861" + }, + "value": "zjbntmiskjexlr" + } + } + }, + "osDisk": { + "$id": "4115", + "kind": "model", + "type": { + "$ref": "875" + }, + "value": { + "$id": "4116", + "name": { + "$id": "4117", + "kind": "string", + "type": { + "$ref": "877" + }, + "value": "wfttw" + }, + "caching": { + "$id": "4118", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "4119", + "kind": "boolean", + "type": { + "$ref": "884" + }, + "value": true + }, + "createOption": { + "$id": "4120", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "FromImage" + }, + "diffDiskSettings": { + "$id": "4121", + "kind": "model", + "type": { + "$ref": "891" + }, + "value": { + "$id": "4122", + "option": { + "$id": "4123", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "Local" + }, + "placement": { + "$id": "4124", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "CacheDisk" + } + } + }, + "diskSizeGB": { + "$id": "4125", + "kind": "number", + "type": { + "$ref": "901" + }, + "value": 14 + }, + "osType": { + "$id": "4126", + "kind": "string", + "type": { + "$ref": "206" + }, + "value": "Windows" + }, + "image": { + "$id": "4127", + "kind": "model", + "type": { + "$ref": "908" + }, + "value": { + "$id": "4128", + "uri": { + "$id": "4129", + "kind": "string", + "type": { + "$ref": "910" + }, + "value": "https://myStorageAccountName.blob.core.windows.net/myContainerName/myVhdName.vhd" + } + } + }, + "vhdContainers": { + "$id": "4130", + "kind": "array", + "type": { + "$ref": "916" + }, + "value": [ + { + "$id": "4131", + "kind": "string", + "type": { + "$ref": "917" + }, + "value": "tkzcwddtinkfpnfklatw" + } + ] + }, + "managedDisk": { + "$id": "4132", + "kind": "model", + "type": { + "$ref": "921" + }, + "value": { + "$id": "4133", + "storageAccountType": { + "$id": "4134", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "4135", + "kind": "model", + "type": { + "$ref": "926" + }, + "value": { + "$id": "4136", + "id": { + "$id": "4137", + "kind": "string", + "type": { + "$ref": "928" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "4138", + "kind": "model", + "type": { + "$ref": "935" + }, + "value": { + "$id": "4139", + "securityEncryptionType": { + "$id": "4140", + "kind": "string", + "type": { + "$ref": "228" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "4141", + "kind": "model", + "type": { + "$ref": "926" + }, + "value": { + "$id": "4142", + "id": { + "$id": "4143", + "kind": "string", + "type": { + "$ref": "928" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "deleteOption": { + "$id": "4144", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "Delete" + } + } + }, + "dataDisks": { + "$id": "4145", + "kind": "array", + "type": { + "$ref": "952" + }, + "value": [ + { + "$id": "4146", + "kind": "model", + "type": { + "$ref": "953" + }, + "value": { + "$id": "4147", + "name": { + "$id": "4148", + "kind": "string", + "type": { + "$ref": "955" + }, + "value": "eogiykmdmeikswxmigjws" + }, + "lun": { + "$id": "4149", + "kind": "number", + "type": { + "$ref": "959" + }, + "value": 14 + }, + "caching": { + "$id": "4150", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "4151", + "kind": "boolean", + "type": { + "$ref": "966" + }, + "value": true + }, + "createOption": { + "$id": "4152", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "FromImage" + }, + "diskSizeGB": { + "$id": "4153", + "kind": "number", + "type": { + "$ref": "973" + }, + "value": 6 + }, + "managedDisk": { + "$id": "4154", + "kind": "model", + "type": { + "$ref": "921" + }, + "value": { + "$id": "4155", + "storageAccountType": { + "$id": "4156", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "4157", + "kind": "model", + "type": { + "$ref": "926" + }, + "value": { + "$id": "4158", + "id": { + "$id": "4159", + "kind": "string", + "type": { + "$ref": "928" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "4160", + "kind": "model", + "type": { + "$ref": "935" + }, + "value": { + "$id": "4161", + "securityEncryptionType": { + "$id": "4162", + "kind": "string", + "type": { + "$ref": "228" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "4163", + "kind": "model", + "type": { + "$ref": "926" + }, + "value": { + "$id": "4164", + "id": { + "$id": "4165", + "kind": "string", + "type": { + "$ref": "928" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "diskIOPSReadWrite": { + "$id": "4166", + "kind": "number", + "type": { + "$ref": "980" + }, + "value": 27 + }, + "diskMBpsReadWrite": { + "$id": "4167", + "kind": "number", + "type": { + "$ref": "984" + }, + "value": 2 + }, + "deleteOption": { + "$id": "4168", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "Delete" + } + } + } + ] + }, + "diskControllerType": { + "$id": "4169", + "kind": "string", + "type": { + "$ref": "242" + }, + "value": "uzb" + } + } + }, + "networkProfile": { + "$id": "4170", + "kind": "model", + "type": { + "$ref": "998" + }, + "value": { + "$id": "4171", + "healthProbe": { + "$id": "4172", + "kind": "model", + "type": { + "$ref": "1000" + }, + "value": { + "$id": "4173", + "id": { + "$id": "4174", + "kind": "string", + "type": { + "$ref": "1002" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}" + } + } + }, + "networkInterfaceConfigurations": { + "$id": "4175", + "kind": "array", + "type": { + "$ref": "1009" + }, + "value": [ + { + "$id": "4176", + "kind": "model", + "type": { + "$ref": "1010" + }, + "value": { + "$id": "4177", + "name": { + "$id": "4178", + "kind": "string", + "type": { + "$ref": "1012" + }, + "value": "i" + }, + "properties": { + "$id": "4179", + "kind": "model", + "type": { + "$ref": "1016" + }, + "value": { + "$id": "4180", + "primary": { + "$id": "4181", + "kind": "boolean", + "type": { + "$ref": "1018" + }, + "value": true + }, + "enableAcceleratedNetworking": { + "$id": "4182", + "kind": "boolean", + "type": { + "$ref": "1022" + }, + "value": true + }, + "disableTcpStateTracking": { + "$id": "4183", + "kind": "boolean", + "type": { + "$ref": "1026" + }, + "value": true + }, + "enableFpga": { + "$id": "4184", + "kind": "boolean", + "type": { + "$ref": "1030" + }, + "value": true + }, + "networkSecurityGroup": { + "$id": "4185", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "4186", + "id": { + "$id": "4187", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}" + } + } + }, + "dnsSettings": { + "$id": "4188", + "kind": "model", + "type": { + "$ref": "1037" + }, + "value": { + "$id": "4189", + "dnsServers": { + "$id": "4190", + "kind": "array", + "type": { + "$ref": "1039" + }, + "value": [ + { + "$id": "4191", + "kind": "string", + "type": { + "$ref": "1040" + }, + "value": "nxmmfolhclsesu" + } + ] + } + } + }, + "ipConfigurations": { + "$id": "4192", + "kind": "array", + "type": { + "$ref": "1046" + }, + "value": [ + { + "$id": "4193", + "kind": "model", + "type": { + "$ref": "1047" + }, + "value": { + "$id": "4194", + "name": { + "$id": "4195", + "kind": "string", + "type": { + "$ref": "1049" + }, + "value": "oezqhkidfhyywlfzwuotilrpbqnjg" + }, + "properties": { + "$id": "4196", + "kind": "model", + "type": { + "$ref": "1053" + }, + "value": { + "$id": "4197", + "subnet": { + "$id": "4198", + "kind": "model", + "type": { + "$ref": "1000" + }, + "value": { + "$id": "4199", + "id": { + "$id": "4200", + "kind": "string", + "type": { + "$ref": "1002" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}" + } + } + }, + "primary": { + "$id": "4201", + "kind": "boolean", + "type": { + "$ref": "1058" + }, + "value": true + }, + "publicIPAddressConfiguration": { + "$id": "4202", + "kind": "model", + "type": { + "$ref": "1062" + }, + "value": { + "$id": "4203", + "name": { + "$id": "4204", + "kind": "string", + "type": { + "$ref": "1064" + }, + "value": "fvpqf" + }, + "properties": { + "$id": "4205", + "kind": "model", + "type": { + "$ref": "1068" + }, + "value": { + "$id": "4206", + "idleTimeoutInMinutes": { + "$id": "4207", + "kind": "number", + "type": { + "$ref": "1070" + }, + "value": 9 + }, + "dnsSettings": { + "$id": "4208", + "kind": "model", + "type": { + "$ref": "1074" + }, + "value": { + "$id": "4209", + "domainNameLabel": { + "$id": "4210", + "kind": "string", + "type": { + "$ref": "1076" + }, + "value": "ukrddzvmorpmfsczjwtbvp" + }, + "domainNameLabelScope": { + "$id": "4211", + "kind": "string", + "type": { + "$ref": "248" + }, + "value": "TenantReuse" + } + } + }, + "ipTags": { + "$id": "4212", + "kind": "array", + "type": { + "$ref": "1085" + }, + "value": [ + { + "$id": "4213", + "kind": "model", + "type": { + "$ref": "1086" + }, + "value": { + "$id": "4214", + "ipTagType": { + "$id": "4215", + "kind": "string", + "type": { + "$ref": "1088" + }, + "value": "sddgsoemnzgqizale" + }, + "tag": { + "$id": "4216", + "kind": "string", + "type": { + "$ref": "1092" + }, + "value": "wufmhrjsakbiaetyara" + } + } + } + ] + }, + "publicIPPrefix": { + "$id": "4217", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "4218", + "id": { + "$id": "4219", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}" + } + } + }, + "publicIPAddressVersion": { + "$id": "4220", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "IPv4" + }, + "deleteOption": { + "$id": "4221", + "kind": "string", + "type": { + "$ref": "264" + }, + "value": "Delete" + } + } + }, + "sku": { + "$id": "4222", + "kind": "model", + "type": { + "$ref": "1109" + }, + "value": { + "$id": "4223", + "name": { + "$id": "4224", + "kind": "string", + "type": { + "$ref": "270" + }, + "value": "Basic" + }, + "tier": { + "$id": "4225", + "kind": "string", + "type": { + "$ref": "276" + }, + "value": "Regional" + } + } + } + } + }, + "privateIPAddressVersion": { + "$id": "4226", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "IPv4" + }, + "applicationGatewayBackendAddressPools": { + "$id": "4227", + "kind": "array", + "type": { + "$ref": "1124" + }, + "value": [ + { + "$id": "4228", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "4229", + "id": { + "$id": "4230", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "applicationSecurityGroups": { + "$id": "4231", + "kind": "array", + "type": { + "$ref": "1128" + }, + "value": [ + { + "$id": "4232", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "4233", + "id": { + "$id": "4234", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}" + } + } + } + ] + }, + "loadBalancerBackendAddressPools": { + "$id": "4235", + "kind": "array", + "type": { + "$ref": "1132" + }, + "value": [ + { + "$id": "4236", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "4237", + "id": { + "$id": "4238", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "loadBalancerInboundNatPools": { + "$id": "4239", + "kind": "array", + "type": { + "$ref": "1136" + }, + "value": [ + { + "$id": "4240", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "4241", + "id": { + "$id": "4242", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatPools/{inboundNatPoolName}" + } + } + } + ] + } + } + } + } + } + ] + }, + "enableIPForwarding": { + "$id": "4243", + "kind": "boolean", + "type": { + "$ref": "1144" + }, + "value": true + }, + "deleteOption": { + "$id": "4244", + "kind": "string", + "type": { + "$ref": "264" + }, + "value": "Delete" + }, + "auxiliaryMode": { + "$id": "4245", + "kind": "string", + "type": { + "$ref": "282" + }, + "value": "None" + }, + "auxiliarySku": { + "$id": "4246", + "kind": "string", + "type": { + "$ref": "290" + }, + "value": "None" + } + } + } + } + } + ] + }, + "networkApiVersion": { + "$id": "4247", + "kind": "string", + "type": { + "$ref": "302" + }, + "value": "2020-11-01" + } + } + }, + "securityProfile": { + "$id": "4248", + "kind": "model", + "type": { + "$ref": "1166" + }, + "value": { + "$id": "4249", + "uefiSettings": { + "$id": "4250", + "kind": "model", + "type": { + "$ref": "1168" + }, + "value": { + "$id": "4251", + "secureBootEnabled": { + "$id": "4252", + "kind": "boolean", + "type": { + "$ref": "1170" + }, + "value": true + }, + "vTpmEnabled": { + "$id": "4253", + "kind": "boolean", + "type": { + "$ref": "1174" + }, + "value": true + } + } + }, + "encryptionAtHost": { + "$id": "4254", + "kind": "boolean", + "type": { + "$ref": "1180" + }, + "value": true + }, + "securityType": { + "$id": "4255", + "kind": "string", + "type": { + "$ref": "306" + }, + "value": "TrustedLaunch" + }, + "encryptionIdentity": { + "$id": "4256", + "kind": "model", + "type": { + "$ref": "1187" + }, + "value": { + "$id": "4257", + "userAssignedIdentityResourceId": { + "$id": "4258", + "kind": "string", + "type": { + "$ref": "1189" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{userAssignedIdentityName}" + } + } + }, + "proxyAgentSettings": { + "$id": "4259", + "kind": "model", + "type": { + "$ref": "1196" + }, + "value": { + "$id": "4260", + "enabled": { + "$id": "4261", + "kind": "boolean", + "type": { + "$ref": "1198" + }, + "value": true + }, + "mode": { + "$id": "4262", + "kind": "string", + "type": { + "$ref": "312" + }, + "value": "Audit" + }, + "keyIncarnationId": { + "$id": "4263", + "kind": "number", + "type": { + "$ref": "1205" + }, + "value": 20 + } + } + } + } + }, + "diagnosticsProfile": { + "$id": "4264", + "kind": "model", + "type": { + "$ref": "1213" + }, + "value": { + "$id": "4265", + "bootDiagnostics": { + "$id": "4266", + "kind": "model", + "type": { + "$ref": "1215" + }, + "value": { + "$id": "4267", + "enabled": { + "$id": "4268", + "kind": "boolean", + "type": { + "$ref": "1217" + }, + "value": true + }, + "storageUri": { + "$id": "4269", + "kind": "string", + "type": { + "$ref": "1221" + }, + "value": "http://myStorageAccountName.blob.core.windows.net" + } + } + } + } + }, + "extensionProfile": { + "$id": "4270", + "kind": "model", + "type": { + "$ref": "1229" + }, + "value": { + "$id": "4271", + "extensions": { + "$id": "4272", + "kind": "array", + "type": { + "$ref": "1231" + }, + "value": [ + { + "$id": "4273", + "kind": "model", + "type": { + "$ref": "1232" + }, + "value": { + "$id": "4274", + "name": { + "$id": "4275", + "kind": "string", + "type": { + "$ref": "1239" + }, + "value": "bndxuxx" + }, + "properties": { + "$id": "4276", + "kind": "model", + "type": { + "$ref": "1247" + }, + "value": { + "$id": "4277", + "forceUpdateTag": { + "$id": "4278", + "kind": "string", + "type": { + "$ref": "1249" + }, + "value": "yhgxw" + }, + "publisher": { + "$id": "4279", + "kind": "string", + "type": { + "$ref": "1253" + }, + "value": "kpxtirxjfprhs" + }, + "type": { + "$id": "4280", + "kind": "string", + "type": { + "$ref": "1257" + }, + "value": "pgjilctjjwaa" + }, + "typeHandlerVersion": { + "$id": "4281", + "kind": "string", + "type": { + "$ref": "1261" + }, + "value": "zevivcoilxmbwlrihhhibq" + }, + "autoUpgradeMinorVersion": { + "$id": "4282", + "kind": "boolean", + "type": { + "$ref": "1265" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "4283", + "kind": "boolean", + "type": { + "$ref": "1269" + }, + "value": true + }, + "provisionAfterExtensions": { + "$id": "4284", + "kind": "array", + "type": { + "$ref": "1289" + }, + "value": [ + { + "$id": "4285", + "kind": "string", + "type": { + "$ref": "1290" + }, + "value": "nftzosroolbcwmpupujzqwqe" + } + ] + }, + "suppressFailures": { + "$id": "4286", + "kind": "boolean", + "type": { + "$ref": "1294" + }, + "value": true + }, + "protectedSettingsFromKeyVault": { + "$id": "4287", + "kind": "model", + "type": { + "$ref": "1298" + }, + "value": { + "$id": "4288", + "secretUrl": { + "$id": "4289", + "kind": "string", + "type": { + "$ref": "1300" + }, + "value": "https://myVaultName.vault.azure.net/secrets/secret/mySecretName" + }, + "sourceVault": { + "$id": "4290", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "4291", + "id": { + "$id": "4292", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + } + } + }, + "settings": { + "$id": "4293", + "kind": "dict", + "type": { + "$ref": "1273" + }, + "value": { + "$id": "4294" + } + }, + "provisioningState": { + "$id": "4295", + "kind": "string", + "type": { + "$ref": "1285" + }, + "value": "Succeeded" + } + } + }, + "type": { + "$id": "4296", + "kind": "string", + "type": { + "$ref": "1243" + }, + "value": "cmeam" + }, + "id": { + "$id": "4297", + "kind": "string", + "type": { + "$ref": "1234" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{extensionName}" + } + } + } + ] + }, + "extensionsTimeBudget": { + "$id": "4298", + "kind": "string", + "type": { + "$ref": "1313" + }, + "value": "mbhjahtdygwgyszdwjtvlvtgchdwil" + } + } + }, + "licenseType": { + "$id": "4299", + "kind": "string", + "type": { + "$ref": "1319" + }, + "value": "v" + }, + "scheduledEventsProfile": { + "$id": "4300", + "kind": "model", + "type": { + "$ref": "1323" + }, + "value": { + "$id": "4301", + "terminateNotificationProfile": { + "$id": "4302", + "kind": "model", + "type": { + "$ref": "1325" + }, + "value": { + "$id": "4303", + "notBeforeTimeout": { + "$id": "4304", + "kind": "string", + "type": { + "$ref": "1327" + }, + "value": "iljppmmw" + }, + "enable": { + "$id": "4305", + "kind": "boolean", + "type": { + "$ref": "1331" + }, + "value": true + } + } + }, + "osImageNotificationProfile": { + "$id": "4306", + "kind": "model", + "type": { + "$ref": "1337" + }, + "value": { + "$id": "4307", + "notBeforeTimeout": { + "$id": "4308", + "kind": "string", + "type": { + "$ref": "1339" + }, + "value": "olbpadmevekyczfokodtfprxti" + }, + "enable": { + "$id": "4309", + "kind": "boolean", + "type": { + "$ref": "1343" + }, + "value": true + } + } + } + } + }, + "userData": { + "$id": "4310", + "kind": "string", + "type": { + "$ref": "1351" + }, + "value": "s" + }, + "capacityReservation": { + "$id": "4311", + "kind": "model", + "type": { + "$ref": "1355" + }, + "value": { + "$id": "4312", + "capacityReservationGroup": { + "$id": "4313", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "4314", + "id": { + "$id": "4315", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}" + } + } + } + } + }, + "applicationProfile": { + "$id": "4316", + "kind": "model", + "type": { + "$ref": "1362" + }, + "value": { + "$id": "4317", + "galleryApplications": { + "$id": "4318", + "kind": "array", + "type": { + "$ref": "1364" + }, + "value": [ + { + "$id": "4319", + "kind": "model", + "type": { + "$ref": "1365" + }, + "value": { + "$id": "4320", + "tags": { + "$id": "4321", + "kind": "string", + "type": { + "$ref": "1367" + }, + "value": "eyrqjbib" + }, + "order": { + "$id": "4322", + "kind": "number", + "type": { + "$ref": "1371" + }, + "value": 5 + }, + "packageReferenceId": { + "$id": "4323", + "kind": "string", + "type": { + "$ref": "1375" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{applicationName}/versions/{versionName}" + }, + "treatFailureAsDeploymentFailure": { + "$id": "4324", + "kind": "boolean", + "type": { + "$ref": "1384" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "4325", + "kind": "boolean", + "type": { + "$ref": "1388" + }, + "value": true + } + } + } + ] + } + } + }, + "hardwareProfile": { + "$id": "4326", + "kind": "model", + "type": { + "$ref": "1396" + }, + "value": { + "$id": "4327", + "vmSizeProperties": { + "$id": "4328", + "kind": "model", + "type": { + "$ref": "1398" + }, + "value": { + "$id": "4329", + "vCPUsAvailable": { + "$id": "4330", + "kind": "number", + "type": { + "$ref": "1400" + }, + "value": 16 + }, + "vCPUsPerCore": { + "$id": "4331", + "kind": "number", + "type": { + "$ref": "1404" + }, + "value": 23 + } + } + } + } + }, + "serviceArtifactReference": { + "$id": "4332", + "kind": "model", + "type": { + "$ref": "1412" + }, + "value": { + "$id": "4333", + "id": { + "$id": "4334", + "kind": "string", + "type": { + "$ref": "1414" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactsName}/vmArtifactsProfiles/{vmArtifactsProfileName}" + } + } + }, + "securityPostureReference": { + "$id": "4335", + "kind": "model", + "type": { + "$ref": "1421" + }, + "value": { + "$id": "4336", + "id": { + "$id": "4337", + "kind": "string", + "type": { + "$ref": "1423" + }, + "value": "/CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest" + }, + "excludeExtensions": { + "$id": "4338", + "kind": "array", + "type": { + "$ref": "1427" + }, + "value": [ + { + "$id": "4339", + "kind": "string", + "type": { + "$ref": "1428" + }, + "value": "{securityPostureVMExtensionName}" + } + ] + }, + "isOverridable": { + "$id": "4340", + "kind": "boolean", + "type": { + "$ref": "1432" + }, + "value": true + } + } + }, + "timeCreated": { + "$id": "4341", + "kind": "string", + "type": { + "$ref": "1438" + }, + "value": "2024-04-29T21:51:44.043Z" + } + } + }, + "computeApiVersion": { + "$id": "4342", + "kind": "string", + "type": { + "$ref": "1454" + }, + "value": "2023-07-01" + }, + "platformFaultDomainCount": { + "$id": "4343", + "kind": "number", + "type": { + "$ref": "1458" + }, + "value": 1 + } + } + }, + "provisioningState": { + "$id": "4344", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Creating" + }, + "timeCreated": { + "$id": "4345", + "kind": "string", + "type": { + "$ref": "1476" + }, + "value": "2024-07-10T00:16:34.8590555+00:00" + }, + "uniqueId": { + "$id": "4346", + "kind": "string", + "type": { + "$ref": "1481" + }, + "value": "a2f7fabd-bbc2-4a20-afe1-49fdb3885a28" + } + } + }, + "zones": { + "$id": "4347", + "kind": "array", + "type": { + "$ref": "1489" + }, + "value": [ + { + "$id": "4348", + "kind": "string", + "type": { + "$ref": "1490" + }, + "value": "zone1" + }, + { + "$id": "4349", + "kind": "string", + "type": { + "$ref": "1490" + }, + "value": "zone2" + } + ] + }, + "identity": { + "$id": "4350", + "kind": "model", + "type": { + "$ref": "1494" + }, + "value": { + "$id": "4351", + "type": { + "$id": "4352", + "kind": "string", + "type": { + "$ref": "318" + }, + "value": "UserAssigned" + }, + "userAssignedIdentities": { + "$id": "4353", + "kind": "dict", + "type": { + "$ref": "1509" + }, + "value": { + "$id": "4354" + } + }, + "principalId": { + "$id": "4355", + "kind": "string", + "type": { + "$ref": "1496" + }, + "value": "4d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "tenantId": { + "$id": "4356", + "kind": "string", + "type": { + "$ref": "1501" + }, + "value": "5d508e5b-374b-4382-9a1c-01fb8b6cb37c" + } + } + }, + "tags": { + "$id": "4357", + "kind": "dict", + "type": { + "$ref": "475" + }, + "value": { + "$id": "4358" + } + }, + "location": { + "$id": "4359", + "kind": "string", + "type": { + "$ref": "481" + }, + "value": "westus" + }, + "plan": { + "$id": "4360", + "kind": "model", + "type": { + "$ref": "1528" + }, + "value": { + "$id": "4361", + "name": { + "$id": "4362", + "kind": "string", + "type": { + "$ref": "1530" + }, + "value": "uapfngmdekvpgjhomthtpxjfdmmll" + }, + "publisher": { + "$id": "4363", + "kind": "string", + "type": { + "$ref": "1534" + }, + "value": "aqhles" + }, + "product": { + "$id": "4364", + "kind": "string", + "type": { + "$ref": "1538" + }, + "value": "bfzbkdnbexmedxdc" + }, + "promotionCode": { + "$id": "4365", + "kind": "string", + "type": { + "$ref": "1542" + }, + "value": "gspehogwfjxirz" + }, + "version": { + "$id": "4366", + "kind": "string", + "type": { + "$ref": "1546" + }, + "value": "yza" + } + } + }, + "id": { + "$id": "4367", + "kind": "string", + "type": { + "$ref": "433" + }, + "value": "/subscriptions/7B0CD4DB-3381-4013-9B31-FB6E6FD0FF1C/resourceGroups/rgazurefleet/providers/Microsoft.AzureFleet/fleets/testFleet" + }, + "name": { + "$id": "4368", + "kind": "string", + "type": { + "$ref": "438" + }, + "value": "testFleet" + }, + "type": { + "$id": "4369", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "Microsoft.AzureFleet/fleets" + }, + "systemData": { + "$id": "4370", + "kind": "model", + "type": { + "$ref": "447" + }, + "value": { + "$id": "4371", + "createdBy": { + "$id": "4372", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "rowegentrpoajsv" + }, + "createdByType": { + "$id": "4373", + "kind": "string", + "type": { + "$ref": "328" + }, + "value": "User" + }, + "createdAt": { + "$id": "4374", + "kind": "string", + "type": { + "$ref": "456" + }, + "value": "2024-04-29T21:51:44.043Z" + }, + "lastModifiedBy": { + "$id": "4375", + "kind": "string", + "type": { + "$ref": "461" + }, + "value": "edwuayhhaoepxzisfaqjhmrxjq" + }, + "lastModifiedByType": { + "$id": "4376", + "kind": "string", + "type": { + "$ref": "328" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "4377", + "kind": "string", + "type": { + "$ref": "468" + }, + "value": "2024-04-29T21:51:44.043Z" + } + } + } + } + } + }, + { + "$id": "4378", + "response": { + "$ref": "3647" + }, + "statusCode": 202 + } + ] + } + ] + }, + "parameters": [ + { + "$id": "4379", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "4380", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4381", + "name": "fleetName", + "nameInRequest": "fleetName", + "doc": "The name of the Compute Fleet", + "type": { + "$id": "4382", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4383", + "name": "properties", + "nameInRequest": "properties", + "doc": "The resource properties to be updated.", + "type": { + "$ref": "1551" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4384", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "4385", + "kind": "constant", + "valueType": { + "$id": "4386", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4387", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "4388", + "kind": "constant", + "valueType": { + "$id": "4389", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "4390", + "type": { + "$ref": "429" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.AzureFleet.Fleets.update" + }, + { + "$id": "4391", + "kind": "lro", + "name": "delete", + "accessibility": "public", + "apiVersions": [ + "2023-11-01-preview", + "2024-05-01-preview", + "2024-11-01" + ], + "doc": "Delete a Fleet", + "operation": { + "$id": "4392", + "name": "delete", + "resourceName": "Fleet", + "doc": "Delete a Fleet", + "accessibility": "public", + "parameters": [ + { + "$id": "4393", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "4394", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "4395", + "type": { + "$id": "4396", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-11-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4397", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "4398", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "4399", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4400", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "4401", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4402", + "name": "fleetName", + "nameInRequest": "fleetName", + "doc": "The name of the Compute Fleet", + "type": { + "$id": "4403", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4404", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "4405", + "kind": "constant", + "valueType": { + "$id": "4406", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "4407", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "4408", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "4409", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "4410", + "name": "retryAfter", + "nameInResponse": "Retry-After", + "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "type": { + "$id": "4411", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false + }, + { + "$id": "4412", + "statusCodes": [ + 204 + ], + "headers": [], + "isErrorResponse": false + } + ], + "httpMethod": "DELETE", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureFleet/fleets/{fleetName}", + "bufferResponse": true, + "longRunning": { + "$id": "4413", + "finalStateVia": 1, + "finalResponse": { + "$id": "4414", + "statusCodes": [ + 204 + ] + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.AzureFleet.Fleets.delete", + "decorators": [], + "examples": [ + { + "$id": "4415", + "kind": "http", + "name": "Fleets_Delete", + "description": "Fleets_Delete", + "filePath": "2024-11-01/Fleets_Delete.json", + "parameters": [ + { + "$id": "4416", + "parameter": { + "$ref": "4393" + }, + "value": { + "$id": "4417", + "kind": "string", + "type": { + "$ref": "4394" + }, + "value": "2024-11-01" + } + }, + { + "$id": "4418", + "parameter": { + "$ref": "4397" + }, + "value": { + "$id": "4419", + "kind": "string", + "type": { + "$ref": "4398" + }, + "value": "1DC2F28C-A625-4B0E-9748-9885A3C9E9EB" + } + }, + { + "$id": "4420", + "parameter": { + "$ref": "4400" + }, + "value": { + "$id": "4421", + "kind": "string", + "type": { + "$ref": "4401" + }, + "value": "rgazurefleet" + } + }, + { + "$id": "4422", + "parameter": { + "$ref": "4402" + }, + "value": { + "$id": "4423", + "kind": "string", + "type": { + "$ref": "4403" + }, + "value": "testFleet" + } + } + ], + "responses": [ + { + "$id": "4424", + "response": { + "$ref": "4407" + }, + "statusCode": 202 + }, + { + "$id": "4425", + "response": { + "$ref": "4412" + }, + "statusCode": 204 + } + ] + } + ] + }, + "parameters": [ + { + "$id": "4426", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "4427", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4428", + "name": "fleetName", + "nameInRequest": "fleetName", + "doc": "The name of the Compute Fleet", + "type": { + "$id": "4429", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4430", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "4431", + "kind": "constant", + "valueType": { + "$id": "4432", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "4433" + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.AzureFleet.Fleets.delete" + }, + { + "$id": "4434", + "kind": "paging", + "name": "listByResourceGroup", + "accessibility": "public", + "apiVersions": [ + "2023-11-01-preview", + "2024-05-01-preview", + "2024-11-01" + ], + "doc": "List Fleet resources by resource group", + "operation": { + "$id": "4435", + "name": "listByResourceGroup", + "resourceName": "Fleet", + "doc": "List Fleet resources by resource group", + "accessibility": "public", + "parameters": [ + { + "$id": "4436", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "4437", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "4438", + "type": { + "$id": "4439", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-11-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4440", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "4441", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "4442", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4443", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "4444", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4445", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "4446", + "kind": "constant", + "valueType": { + "$id": "4447", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "4448", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1624" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureFleet/fleets", + "bufferResponse": true, + "paging": { + "$id": "4449", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "4450", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.AzureFleet.Fleets.listByResourceGroup", + "decorators": [], + "examples": [ + { + "$id": "4451", + "kind": "http", + "name": "Fleets_ListByResourceGroup", + "description": "Fleets_ListByResourceGroup", + "filePath": "2024-11-01/Fleets_ListByResourceGroup.json", + "parameters": [ + { + "$id": "4452", + "parameter": { + "$ref": "4436" + }, + "value": { + "$id": "4453", + "kind": "string", + "type": { + "$ref": "4437" + }, + "value": "2024-11-01" + } + }, + { + "$id": "4454", + "parameter": { + "$ref": "4440" + }, + "value": { + "$id": "4455", + "kind": "string", + "type": { + "$ref": "4441" + }, + "value": "1DC2F28C-A625-4B0E-9748-9885A3C9E9EB" + } + }, + { + "$id": "4456", + "parameter": { + "$ref": "4443" + }, + "value": { + "$id": "4457", + "kind": "string", + "type": { + "$ref": "4444" + }, + "value": "rgazurefleet" + } + } + ], + "responses": [ + { + "$id": "4458", + "response": { + "$ref": "4448" + }, + "statusCode": 200, + "bodyValue": { + "$id": "4459", + "kind": "model", + "type": { + "$ref": "1624" + }, + "value": { + "$id": "4460", + "value": { + "$id": "4461", + "kind": "array", + "type": { + "$ref": "1626" + }, + "value": [ + { + "$id": "4462", + "kind": "model", + "type": { + "$ref": "429" + }, + "value": { + "$id": "4463", + "properties": { + "$id": "4464", + "kind": "model", + "type": { + "$ref": "485" + }, + "value": { + "$id": "4465", + "provisioningState": { + "$id": "4466", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Creating" + }, + "spotPriorityProfile": { + "$id": "4467", + "kind": "model", + "type": { + "$ref": "490" + }, + "value": { + "$id": "4468", + "capacity": { + "$id": "4469", + "kind": "number", + "type": { + "$ref": "492" + }, + "value": 20 + }, + "minCapacity": { + "$id": "4470", + "kind": "number", + "type": { + "$ref": "496" + }, + "value": 10 + }, + "maxPricePerVM": { + "$id": "4471", + "kind": "number", + "type": { + "$ref": "500" + }, + "value": 0.00865 + }, + "evictionPolicy": { + "$id": "4472", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "Delete" + }, + "allocationStrategy": { + "$id": "4473", + "kind": "string", + "type": { + "$ref": "36" + }, + "value": "PriceCapacityOptimized" + }, + "maintain": { + "$id": "4474", + "kind": "boolean", + "type": { + "$ref": "510" + }, + "value": true + } + } + }, + "regularPriorityProfile": { + "$id": "4475", + "kind": "model", + "type": { + "$ref": "516" + }, + "value": { + "$id": "4476", + "capacity": { + "$id": "4477", + "kind": "number", + "type": { + "$ref": "518" + }, + "value": 20 + }, + "minCapacity": { + "$id": "4478", + "kind": "number", + "type": { + "$ref": "522" + }, + "value": 10 + }, + "allocationStrategy": { + "$id": "4479", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "LowestPrice" + } + } + }, + "vmSizesProfile": { + "$id": "4480", + "kind": "array", + "type": { + "$ref": "531" + }, + "value": [ + { + "$id": "4481", + "kind": "model", + "type": { + "$ref": "532" + }, + "value": { + "$id": "4482", + "name": { + "$id": "4483", + "kind": "string", + "type": { + "$ref": "534" + }, + "value": "Standard_d1_v2" + }, + "rank": { + "$id": "4484", + "kind": "number", + "type": { + "$ref": "538" + }, + "value": 19225 + } + } + } + ] + }, + "computeProfile": { + "$id": "4485", + "kind": "model", + "type": { + "$ref": "1449" + }, + "value": { + "$id": "4486", + "baseVirtualMachineProfile": { + "$id": "4487", + "kind": "model", + "type": { + "$ref": "644" + }, + "value": { + "$id": "4488", + "osProfile": { + "$id": "4489", + "kind": "model", + "type": { + "$ref": "646" + }, + "value": { + "$id": "4490", + "computerNamePrefix": { + "$id": "4491", + "kind": "string", + "type": { + "$ref": "648" + }, + "value": "o" + }, + "adminUsername": { + "$id": "4492", + "kind": "string", + "type": { + "$ref": "652" + }, + "value": "nrgzqciiaaxjrqldbmjbqkyhntp" + }, + "windowsConfiguration": { + "$id": "4493", + "kind": "model", + "type": { + "$ref": "664" + }, + "value": { + "$id": "4494", + "provisionVMAgent": { + "$id": "4495", + "kind": "boolean", + "type": { + "$ref": "666" + }, + "value": true + }, + "enableAutomaticUpdates": { + "$id": "4496", + "kind": "boolean", + "type": { + "$ref": "670" + }, + "value": true + }, + "timeZone": { + "$id": "4497", + "kind": "string", + "type": { + "$ref": "674" + }, + "value": "hlyjiqcfksgrpjrct" + }, + "additionalUnattendContent": { + "$id": "4498", + "kind": "array", + "type": { + "$ref": "678" + }, + "value": [ + { + "$id": "4499", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "4500", + "passName": { + "$id": "4501", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "OobeSystem" + }, + "componentName": { + "$id": "4502", + "kind": "string", + "type": { + "$ref": "685" + }, + "value": "Microsoft-Windows-Shell-Setup" + }, + "settingName": { + "$id": "4503", + "kind": "string", + "type": { + "$ref": "116" + }, + "value": "AutoLogon" + } + } + } + ] + }, + "patchSettings": { + "$id": "4504", + "kind": "model", + "type": { + "$ref": "698" + }, + "value": { + "$id": "4505", + "patchMode": { + "$id": "4506", + "kind": "string", + "type": { + "$ref": "122" + }, + "value": "Manual" + }, + "enableHotpatching": { + "$id": "4507", + "kind": "boolean", + "type": { + "$ref": "703" + }, + "value": true + }, + "assessmentMode": { + "$id": "4508", + "kind": "string", + "type": { + "$ref": "130" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "4509", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "4510", + "rebootSetting": { + "$id": "4511", + "kind": "string", + "type": { + "$ref": "136" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "4512", + "kind": "boolean", + "type": { + "$ref": "715" + }, + "value": true + } + } + } + } + }, + "winRM": { + "$id": "4513", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "4514", + "listeners": { + "$id": "4515", + "kind": "array", + "type": { + "$ref": "725" + }, + "value": [ + { + "$id": "4516", + "kind": "model", + "type": { + "$ref": "726" + }, + "value": { + "$id": "4517", + "protocol": { + "$id": "4518", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "Http" + }, + "certificateUrl": { + "$id": "4519", + "kind": "string", + "type": { + "$ref": "731" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + } + } + } + ] + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "4520", + "kind": "boolean", + "type": { + "$ref": "739" + }, + "value": true + } + } + }, + "linuxConfiguration": { + "$id": "4521", + "kind": "model", + "type": { + "$ref": "745" + }, + "value": { + "$id": "4522", + "disablePasswordAuthentication": { + "$id": "4523", + "kind": "boolean", + "type": { + "$ref": "747" + }, + "value": true + }, + "ssh": { + "$id": "4524", + "kind": "model", + "type": { + "$ref": "751" + }, + "value": { + "$id": "4525", + "publicKeys": { + "$id": "4526", + "kind": "array", + "type": { + "$ref": "753" + }, + "value": [ + { + "$id": "4527", + "kind": "model", + "type": { + "$ref": "754" + }, + "value": { + "$id": "4528", + "path": { + "$id": "4529", + "kind": "string", + "type": { + "$ref": "756" + }, + "value": "kmqz" + }, + "keyData": { + "$id": "4530", + "kind": "string", + "type": { + "$ref": "760" + }, + "value": "kivgsubusvpprwqaqpjcmhsv" + } + } + } + ] + } + } + }, + "provisionVMAgent": { + "$id": "4531", + "kind": "boolean", + "type": { + "$ref": "768" + }, + "value": true + }, + "patchSettings": { + "$id": "4532", + "kind": "model", + "type": { + "$ref": "772" + }, + "value": { + "$id": "4533", + "patchMode": { + "$id": "4534", + "kind": "string", + "type": { + "$ref": "152" + }, + "value": "ImageDefault" + }, + "assessmentMode": { + "$id": "4535", + "kind": "string", + "type": { + "$ref": "158" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "4536", + "kind": "model", + "type": { + "$ref": "780" + }, + "value": { + "$id": "4537", + "rebootSetting": { + "$id": "4538", + "kind": "string", + "type": { + "$ref": "164" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "4539", + "kind": "boolean", + "type": { + "$ref": "785" + }, + "value": true + } + } + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "4540", + "kind": "boolean", + "type": { + "$ref": "793" + }, + "value": true + } + } + }, + "secrets": { + "$id": "4541", + "kind": "array", + "type": { + "$ref": "799" + }, + "value": [ + { + "$id": "4542", + "kind": "model", + "type": { + "$ref": "800" + }, + "value": { + "$id": "4543", + "sourceVault": { + "$id": "4544", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "4545", + "id": { + "$id": "4546", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + }, + "vaultCertificates": { + "$id": "4547", + "kind": "array", + "type": { + "$ref": "811" + }, + "value": [ + { + "$id": "4548", + "kind": "model", + "type": { + "$ref": "812" + }, + "value": { + "$id": "4549", + "certificateUrl": { + "$id": "4550", + "kind": "string", + "type": { + "$ref": "814" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + }, + "certificateStore": { + "$id": "4551", + "kind": "string", + "type": { + "$ref": "818" + }, + "value": "nlxrwavpzhueffxsshlun" + } + } + } + ] + } + } + } + ] + }, + "allowExtensionOperations": { + "$id": "4552", + "kind": "boolean", + "type": { + "$ref": "826" + }, + "value": true + }, + "requireGuestProvisionSignal": { + "$id": "4553", + "kind": "boolean", + "type": { + "$ref": "830" + }, + "value": true + } + } + }, + "storageProfile": { + "$id": "4554", + "kind": "model", + "type": { + "$ref": "836" + }, + "value": { + "$id": "4555", + "imageReference": { + "$id": "4556", + "kind": "model", + "type": { + "$ref": "838" + }, + "value": { + "$id": "4557", + "publisher": { + "$id": "4558", + "kind": "string", + "type": { + "$ref": "845" + }, + "value": "mqxgwbiyjzmxavhbkd" + }, + "offer": { + "$id": "4559", + "kind": "string", + "type": { + "$ref": "849" + }, + "value": "isxgumkarlkomp" + }, + "sku": { + "$id": "4560", + "kind": "string", + "type": { + "$ref": "853" + }, + "value": "eojmppqcrnpmxirtp" + }, + "version": { + "$id": "4561", + "kind": "string", + "type": { + "$ref": "857" + }, + "value": "wvpcqefgtmqdgltiuz" + }, + "exactVersion": { + "$id": "4562", + "kind": "string", + "type": { + "$ref": "861" + }, + "value": "zjbntmiskjexlr" + }, + "sharedGalleryImageId": { + "$id": "4563", + "kind": "string", + "type": { + "$ref": "865" + }, + "value": "kmkgihoxwlawuuhcinfirktdwkmx" + }, + "communityGalleryImageId": { + "$id": "4564", + "kind": "string", + "type": { + "$ref": "869" + }, + "value": "vlqe" + }, + "id": { + "$id": "4565", + "kind": "string", + "type": { + "$ref": "840" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}/versions/{versionName}" + } + } + }, + "osDisk": { + "$id": "4566", + "kind": "model", + "type": { + "$ref": "875" + }, + "value": { + "$id": "4567", + "name": { + "$id": "4568", + "kind": "string", + "type": { + "$ref": "877" + }, + "value": "wfttw" + }, + "caching": { + "$id": "4569", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "4570", + "kind": "boolean", + "type": { + "$ref": "884" + }, + "value": true + }, + "createOption": { + "$id": "4571", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "FromImage" + }, + "diffDiskSettings": { + "$id": "4572", + "kind": "model", + "type": { + "$ref": "891" + }, + "value": { + "$id": "4573", + "option": { + "$id": "4574", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "Local" + }, + "placement": { + "$id": "4575", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "CacheDisk" + } + } + }, + "diskSizeGB": { + "$id": "4576", + "kind": "number", + "type": { + "$ref": "901" + }, + "value": 14 + }, + "osType": { + "$id": "4577", + "kind": "string", + "type": { + "$ref": "206" + }, + "value": "Windows" + }, + "image": { + "$id": "4578", + "kind": "model", + "type": { + "$ref": "908" + }, + "value": { + "$id": "4579", + "uri": { + "$id": "4580", + "kind": "string", + "type": { + "$ref": "910" + }, + "value": "https://myStorageAccountName.blob.core.windows.net/myContainerName/myVhdName.vhd" + } + } + }, + "vhdContainers": { + "$id": "4581", + "kind": "array", + "type": { + "$ref": "916" + }, + "value": [ + { + "$id": "4582", + "kind": "string", + "type": { + "$ref": "917" + }, + "value": "tkzcwddtinkfpnfklatw" + } + ] + }, + "managedDisk": { + "$id": "4583", + "kind": "model", + "type": { + "$ref": "921" + }, + "value": { + "$id": "4584", + "storageAccountType": { + "$id": "4585", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "4586", + "kind": "model", + "type": { + "$ref": "926" + }, + "value": { + "$id": "4587", + "id": { + "$id": "4588", + "kind": "string", + "type": { + "$ref": "928" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "4589", + "kind": "model", + "type": { + "$ref": "935" + }, + "value": { + "$id": "4590", + "securityEncryptionType": { + "$id": "4591", + "kind": "string", + "type": { + "$ref": "228" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "4592", + "kind": "model", + "type": { + "$ref": "926" + }, + "value": { + "$id": "4593", + "id": { + "$id": "4594", + "kind": "string", + "type": { + "$ref": "928" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "deleteOption": { + "$id": "4595", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "Delete" + } + } + }, + "dataDisks": { + "$id": "4596", + "kind": "array", + "type": { + "$ref": "952" + }, + "value": [ + { + "$id": "4597", + "kind": "model", + "type": { + "$ref": "953" + }, + "value": { + "$id": "4598", + "name": { + "$id": "4599", + "kind": "string", + "type": { + "$ref": "955" + }, + "value": "eogiykmdmeikswxmigjws" + }, + "lun": { + "$id": "4600", + "kind": "number", + "type": { + "$ref": "959" + }, + "value": 14 + }, + "caching": { + "$id": "4601", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "4602", + "kind": "boolean", + "type": { + "$ref": "966" + }, + "value": true + }, + "createOption": { + "$id": "4603", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "FromImage" + }, + "diskSizeGB": { + "$id": "4604", + "kind": "number", + "type": { + "$ref": "973" + }, + "value": 6 + }, + "managedDisk": { + "$id": "4605", + "kind": "model", + "type": { + "$ref": "921" + }, + "value": { + "$id": "4606", + "storageAccountType": { + "$id": "4607", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "4608", + "kind": "model", + "type": { + "$ref": "926" + }, + "value": { + "$id": "4609", + "id": { + "$id": "4610", + "kind": "string", + "type": { + "$ref": "928" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "4611", + "kind": "model", + "type": { + "$ref": "935" + }, + "value": { + "$id": "4612", + "securityEncryptionType": { + "$id": "4613", + "kind": "string", + "type": { + "$ref": "228" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "4614", + "kind": "model", + "type": { + "$ref": "926" + }, + "value": { + "$id": "4615", + "id": { + "$id": "4616", + "kind": "string", + "type": { + "$ref": "928" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "diskIOPSReadWrite": { + "$id": "4617", + "kind": "number", + "type": { + "$ref": "980" + }, + "value": 27 + }, + "diskMBpsReadWrite": { + "$id": "4618", + "kind": "number", + "type": { + "$ref": "984" + }, + "value": 2 + }, + "deleteOption": { + "$id": "4619", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "Delete" + } + } + } + ] + }, + "diskControllerType": { + "$id": "4620", + "kind": "string", + "type": { + "$ref": "242" + }, + "value": "uzb" + } + } + }, + "networkProfile": { + "$id": "4621", + "kind": "model", + "type": { + "$ref": "998" + }, + "value": { + "$id": "4622", + "healthProbe": { + "$id": "4623", + "kind": "model", + "type": { + "$ref": "1000" + }, + "value": { + "$id": "4624", + "id": { + "$id": "4625", + "kind": "string", + "type": { + "$ref": "1002" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}" + } + } + }, + "networkInterfaceConfigurations": { + "$id": "4626", + "kind": "array", + "type": { + "$ref": "1009" + }, + "value": [ + { + "$id": "4627", + "kind": "model", + "type": { + "$ref": "1010" + }, + "value": { + "$id": "4628", + "name": { + "$id": "4629", + "kind": "string", + "type": { + "$ref": "1012" + }, + "value": "i" + }, + "properties": { + "$id": "4630", + "kind": "model", + "type": { + "$ref": "1016" + }, + "value": { + "$id": "4631", + "primary": { + "$id": "4632", + "kind": "boolean", + "type": { + "$ref": "1018" + }, + "value": true + }, + "enableAcceleratedNetworking": { + "$id": "4633", + "kind": "boolean", + "type": { + "$ref": "1022" + }, + "value": true + }, + "disableTcpStateTracking": { + "$id": "4634", + "kind": "boolean", + "type": { + "$ref": "1026" + }, + "value": true + }, + "enableFpga": { + "$id": "4635", + "kind": "boolean", + "type": { + "$ref": "1030" + }, + "value": true + }, + "networkSecurityGroup": { + "$id": "4636", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "4637", + "id": { + "$id": "4638", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}" + } + } + }, + "dnsSettings": { + "$id": "4639", + "kind": "model", + "type": { + "$ref": "1037" + }, + "value": { + "$id": "4640", + "dnsServers": { + "$id": "4641", + "kind": "array", + "type": { + "$ref": "1039" + }, + "value": [ + { + "$id": "4642", + "kind": "string", + "type": { + "$ref": "1040" + }, + "value": "nxmmfolhclsesu" + } + ] + } + } + }, + "ipConfigurations": { + "$id": "4643", + "kind": "array", + "type": { + "$ref": "1046" + }, + "value": [ + { + "$id": "4644", + "kind": "model", + "type": { + "$ref": "1047" + }, + "value": { + "$id": "4645", + "name": { + "$id": "4646", + "kind": "string", + "type": { + "$ref": "1049" + }, + "value": "oezqhkidfhyywlfzwuotilrpbqnjg" + }, + "properties": { + "$id": "4647", + "kind": "model", + "type": { + "$ref": "1053" + }, + "value": { + "$id": "4648", + "subnet": { + "$id": "4649", + "kind": "model", + "type": { + "$ref": "1000" + }, + "value": { + "$id": "4650", + "id": { + "$id": "4651", + "kind": "string", + "type": { + "$ref": "1002" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}" + } + } + }, + "primary": { + "$id": "4652", + "kind": "boolean", + "type": { + "$ref": "1058" + }, + "value": true + }, + "publicIPAddressConfiguration": { + "$id": "4653", + "kind": "model", + "type": { + "$ref": "1062" + }, + "value": { + "$id": "4654", + "name": { + "$id": "4655", + "kind": "string", + "type": { + "$ref": "1064" + }, + "value": "fvpqf" + }, + "properties": { + "$id": "4656", + "kind": "model", + "type": { + "$ref": "1068" + }, + "value": { + "$id": "4657", + "idleTimeoutInMinutes": { + "$id": "4658", + "kind": "number", + "type": { + "$ref": "1070" + }, + "value": 9 + }, + "dnsSettings": { + "$id": "4659", + "kind": "model", + "type": { + "$ref": "1074" + }, + "value": { + "$id": "4660", + "domainNameLabel": { + "$id": "4661", + "kind": "string", + "type": { + "$ref": "1076" + }, + "value": "ukrddzvmorpmfsczjwtbvp" + }, + "domainNameLabelScope": { + "$id": "4662", + "kind": "string", + "type": { + "$ref": "248" + }, + "value": "TenantReuse" + } + } + }, + "ipTags": { + "$id": "4663", + "kind": "array", + "type": { + "$ref": "1085" + }, + "value": [ + { + "$id": "4664", + "kind": "model", + "type": { + "$ref": "1086" + }, + "value": { + "$id": "4665", + "ipTagType": { + "$id": "4666", + "kind": "string", + "type": { + "$ref": "1088" + }, + "value": "sddgsoemnzgqizale" + }, + "tag": { + "$id": "4667", + "kind": "string", + "type": { + "$ref": "1092" + }, + "value": "wufmhrjsakbiaetyara" + } + } + } + ] + }, + "publicIPPrefix": { + "$id": "4668", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "4669", + "id": { + "$id": "4670", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}" + } + } + }, + "publicIPAddressVersion": { + "$id": "4671", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "IPv4" + }, + "deleteOption": { + "$id": "4672", + "kind": "string", + "type": { + "$ref": "264" + }, + "value": "Delete" + } + } + }, + "sku": { + "$id": "4673", + "kind": "model", + "type": { + "$ref": "1109" + }, + "value": { + "$id": "4674", + "name": { + "$id": "4675", + "kind": "string", + "type": { + "$ref": "270" + }, + "value": "Basic" + }, + "tier": { + "$id": "4676", + "kind": "string", + "type": { + "$ref": "276" + }, + "value": "Regional" + } + } + } + } + }, + "privateIPAddressVersion": { + "$id": "4677", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "IPv4" + }, + "applicationGatewayBackendAddressPools": { + "$id": "4678", + "kind": "array", + "type": { + "$ref": "1124" + }, + "value": [ + { + "$id": "4679", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "4680", + "id": { + "$id": "4681", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "applicationSecurityGroups": { + "$id": "4682", + "kind": "array", + "type": { + "$ref": "1128" + }, + "value": [ + { + "$id": "4683", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "4684", + "id": { + "$id": "4685", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}" + } + } + } + ] + }, + "loadBalancerBackendAddressPools": { + "$id": "4686", + "kind": "array", + "type": { + "$ref": "1132" + }, + "value": [ + { + "$id": "4687", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "4688", + "id": { + "$id": "4689", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "loadBalancerInboundNatPools": { + "$id": "4690", + "kind": "array", + "type": { + "$ref": "1136" + }, + "value": [ + { + "$id": "4691", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "4692", + "id": { + "$id": "4693", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatPools/{inboundNatPoolName}" + } + } + } + ] + } + } + } + } + } + ] + }, + "enableIPForwarding": { + "$id": "4694", + "kind": "boolean", + "type": { + "$ref": "1144" + }, + "value": true + }, + "deleteOption": { + "$id": "4695", + "kind": "string", + "type": { + "$ref": "264" + }, + "value": "Delete" + }, + "auxiliaryMode": { + "$id": "4696", + "kind": "string", + "type": { + "$ref": "282" + }, + "value": "None" + }, + "auxiliarySku": { + "$id": "4697", + "kind": "string", + "type": { + "$ref": "290" + }, + "value": "None" + } + } + } + } + } + ] + }, + "networkApiVersion": { + "$id": "4698", + "kind": "string", + "type": { + "$ref": "302" + }, + "value": "2020-11-01" + } + } + }, + "securityProfile": { + "$id": "4699", + "kind": "model", + "type": { + "$ref": "1166" + }, + "value": { + "$id": "4700", + "uefiSettings": { + "$id": "4701", + "kind": "model", + "type": { + "$ref": "1168" + }, + "value": { + "$id": "4702", + "secureBootEnabled": { + "$id": "4703", + "kind": "boolean", + "type": { + "$ref": "1170" + }, + "value": true + }, + "vTpmEnabled": { + "$id": "4704", + "kind": "boolean", + "type": { + "$ref": "1174" + }, + "value": true + } + } + }, + "encryptionAtHost": { + "$id": "4705", + "kind": "boolean", + "type": { + "$ref": "1180" + }, + "value": true + }, + "securityType": { + "$id": "4706", + "kind": "string", + "type": { + "$ref": "306" + }, + "value": "TrustedLaunch" + }, + "encryptionIdentity": { + "$id": "4707", + "kind": "model", + "type": { + "$ref": "1187" + }, + "value": { + "$id": "4708", + "userAssignedIdentityResourceId": { + "$id": "4709", + "kind": "string", + "type": { + "$ref": "1189" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{userAssignedIdentityName}" + } + } + }, + "proxyAgentSettings": { + "$id": "4710", + "kind": "model", + "type": { + "$ref": "1196" + }, + "value": { + "$id": "4711", + "enabled": { + "$id": "4712", + "kind": "boolean", + "type": { + "$ref": "1198" + }, + "value": true + }, + "mode": { + "$id": "4713", + "kind": "string", + "type": { + "$ref": "312" + }, + "value": "Audit" + }, + "keyIncarnationId": { + "$id": "4714", + "kind": "number", + "type": { + "$ref": "1205" + }, + "value": 20 + } + } + } + } + }, + "diagnosticsProfile": { + "$id": "4715", + "kind": "model", + "type": { + "$ref": "1213" + }, + "value": { + "$id": "4716", + "bootDiagnostics": { + "$id": "4717", + "kind": "model", + "type": { + "$ref": "1215" + }, + "value": { + "$id": "4718", + "enabled": { + "$id": "4719", + "kind": "boolean", + "type": { + "$ref": "1217" + }, + "value": true + }, + "storageUri": { + "$id": "4720", + "kind": "string", + "type": { + "$ref": "1221" + }, + "value": "http://myStorageAccountName.blob.core.windows.net" + } + } + } + } + }, + "extensionProfile": { + "$id": "4721", + "kind": "model", + "type": { + "$ref": "1229" + }, + "value": { + "$id": "4722", + "extensions": { + "$id": "4723", + "kind": "array", + "type": { + "$ref": "1231" + }, + "value": [ + { + "$id": "4724", + "kind": "model", + "type": { + "$ref": "1232" + }, + "value": { + "$id": "4725", + "name": { + "$id": "4726", + "kind": "string", + "type": { + "$ref": "1239" + }, + "value": "bndxuxx" + }, + "type": { + "$id": "4727", + "kind": "string", + "type": { + "$ref": "1243" + }, + "value": "cmeam" + }, + "properties": { + "$id": "4728", + "kind": "model", + "type": { + "$ref": "1247" + }, + "value": { + "$id": "4729", + "forceUpdateTag": { + "$id": "4730", + "kind": "string", + "type": { + "$ref": "1249" + }, + "value": "yhgxw" + }, + "publisher": { + "$id": "4731", + "kind": "string", + "type": { + "$ref": "1253" + }, + "value": "kpxtirxjfprhs" + }, + "type": { + "$id": "4732", + "kind": "string", + "type": { + "$ref": "1257" + }, + "value": "pgjilctjjwaa" + }, + "typeHandlerVersion": { + "$id": "4733", + "kind": "string", + "type": { + "$ref": "1261" + }, + "value": "zevivcoilxmbwlrihhhibq" + }, + "autoUpgradeMinorVersion": { + "$id": "4734", + "kind": "boolean", + "type": { + "$ref": "1265" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "4735", + "kind": "boolean", + "type": { + "$ref": "1269" + }, + "value": true + }, + "settings": { + "$id": "4736", + "kind": "dict", + "type": { + "$ref": "1273" + }, + "value": { + "$id": "4737" + } + }, + "provisioningState": { + "$id": "4738", + "kind": "string", + "type": { + "$ref": "1285" + }, + "value": "Succeeded" + }, + "provisionAfterExtensions": { + "$id": "4739", + "kind": "array", + "type": { + "$ref": "1289" + }, + "value": [ + { + "$id": "4740", + "kind": "string", + "type": { + "$ref": "1290" + }, + "value": "nftzosroolbcwmpupujzqwqe" + } + ] + }, + "suppressFailures": { + "$id": "4741", + "kind": "boolean", + "type": { + "$ref": "1294" + }, + "value": true + }, + "protectedSettingsFromKeyVault": { + "$id": "4742", + "kind": "model", + "type": { + "$ref": "1298" + }, + "value": { + "$id": "4743", + "secretUrl": { + "$id": "4744", + "kind": "string", + "type": { + "$ref": "1300" + }, + "value": "https://myVaultName.vault.azure.net/secrets/secret/mySecretName" + }, + "sourceVault": { + "$id": "4745", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "4746", + "id": { + "$id": "4747", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + } + } + } + } + }, + "id": { + "$id": "4748", + "kind": "string", + "type": { + "$ref": "1234" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{extensionName}" + } + } + } + ] + }, + "extensionsTimeBudget": { + "$id": "4749", + "kind": "string", + "type": { + "$ref": "1313" + }, + "value": "mbhjahtdygwgyszdwjtvlvtgchdwil" + } + } + }, + "licenseType": { + "$id": "4750", + "kind": "string", + "type": { + "$ref": "1319" + }, + "value": "v" + }, + "scheduledEventsProfile": { + "$id": "4751", + "kind": "model", + "type": { + "$ref": "1323" + }, + "value": { + "$id": "4752", + "terminateNotificationProfile": { + "$id": "4753", + "kind": "model", + "type": { + "$ref": "1325" + }, + "value": { + "$id": "4754", + "notBeforeTimeout": { + "$id": "4755", + "kind": "string", + "type": { + "$ref": "1327" + }, + "value": "iljppmmw" + }, + "enable": { + "$id": "4756", + "kind": "boolean", + "type": { + "$ref": "1331" + }, + "value": true + } + } + }, + "osImageNotificationProfile": { + "$id": "4757", + "kind": "model", + "type": { + "$ref": "1337" + }, + "value": { + "$id": "4758", + "notBeforeTimeout": { + "$id": "4759", + "kind": "string", + "type": { + "$ref": "1339" + }, + "value": "olbpadmevekyczfokodtfprxti" + }, + "enable": { + "$id": "4760", + "kind": "boolean", + "type": { + "$ref": "1343" + }, + "value": true + } + } + } + } + }, + "userData": { + "$id": "4761", + "kind": "string", + "type": { + "$ref": "1351" + }, + "value": "s" + }, + "capacityReservation": { + "$id": "4762", + "kind": "model", + "type": { + "$ref": "1355" + }, + "value": { + "$id": "4763", + "capacityReservationGroup": { + "$id": "4764", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "4765", + "id": { + "$id": "4766", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}" + } + } + } + } + }, + "applicationProfile": { + "$id": "4767", + "kind": "model", + "type": { + "$ref": "1362" + }, + "value": { + "$id": "4768", + "galleryApplications": { + "$id": "4769", + "kind": "array", + "type": { + "$ref": "1364" + }, + "value": [ + { + "$id": "4770", + "kind": "model", + "type": { + "$ref": "1365" + }, + "value": { + "$id": "4771", + "tags": { + "$id": "4772", + "kind": "string", + "type": { + "$ref": "1367" + }, + "value": "eyrqjbib" + }, + "order": { + "$id": "4773", + "kind": "number", + "type": { + "$ref": "1371" + }, + "value": 5 + }, + "packageReferenceId": { + "$id": "4774", + "kind": "string", + "type": { + "$ref": "1375" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{applicationName}/versions/{versionName}" + }, + "treatFailureAsDeploymentFailure": { + "$id": "4775", + "kind": "boolean", + "type": { + "$ref": "1384" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "4776", + "kind": "boolean", + "type": { + "$ref": "1388" + }, + "value": true + } + } + } + ] + } + } + }, + "hardwareProfile": { + "$id": "4777", + "kind": "model", + "type": { + "$ref": "1396" + }, + "value": { + "$id": "4778", + "vmSizeProperties": { + "$id": "4779", + "kind": "model", + "type": { + "$ref": "1398" + }, + "value": { + "$id": "4780", + "vCPUsAvailable": { + "$id": "4781", + "kind": "number", + "type": { + "$ref": "1400" + }, + "value": 16 + }, + "vCPUsPerCore": { + "$id": "4782", + "kind": "number", + "type": { + "$ref": "1404" + }, + "value": 23 + } + } + } + } + }, + "serviceArtifactReference": { + "$id": "4783", + "kind": "model", + "type": { + "$ref": "1412" + }, + "value": { + "$id": "4784", + "id": { + "$id": "4785", + "kind": "string", + "type": { + "$ref": "1414" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactsName}/vmArtifactsProfiles/{vmArtifactsProfileName}" + } + } + }, + "securityPostureReference": { + "$id": "4786", + "kind": "model", + "type": { + "$ref": "1421" + }, + "value": { + "$id": "4787", + "id": { + "$id": "4788", + "kind": "string", + "type": { + "$ref": "1423" + }, + "value": "mubredelfbshboaxrsxiajihahaa" + }, + "excludeExtensions": { + "$id": "4789", + "kind": "array", + "type": { + "$ref": "1427" + }, + "value": [ + { + "$id": "4790", + "kind": "string", + "type": { + "$ref": "1428" + }, + "value": "{securityPostureVMExtensionName}" + } + ] + }, + "isOverridable": { + "$id": "4791", + "kind": "boolean", + "type": { + "$ref": "1432" + }, + "value": true + } + } + }, + "timeCreated": { + "$id": "4792", + "kind": "string", + "type": { + "$ref": "1438" + }, + "value": "2024-04-29T21:51:44.043Z" + } + } + }, + "computeApiVersion": { + "$id": "4793", + "kind": "string", + "type": { + "$ref": "1454" + }, + "value": "2023-07-01" + }, + "platformFaultDomainCount": { + "$id": "4794", + "kind": "number", + "type": { + "$ref": "1458" + }, + "value": 1 + } + } + }, + "timeCreated": { + "$id": "4795", + "kind": "string", + "type": { + "$ref": "1476" + }, + "value": "2024-07-10T00:16:34.8590555+00:00" + }, + "uniqueId": { + "$id": "4796", + "kind": "string", + "type": { + "$ref": "1481" + }, + "value": "a2f7fabd-bbc2-4a20-afe1-49fdb3885a28" + } + } + }, + "zones": { + "$id": "4797", + "kind": "array", + "type": { + "$ref": "1489" + }, + "value": [ + { + "$id": "4798", + "kind": "string", + "type": { + "$ref": "1490" + }, + "value": "zone1" + }, + { + "$id": "4799", + "kind": "string", + "type": { + "$ref": "1490" + }, + "value": "zone2" + } + ] + }, + "identity": { + "$id": "4800", + "kind": "model", + "type": { + "$ref": "1494" + }, + "value": { + "$id": "4801", + "principalId": { + "$id": "4802", + "kind": "string", + "type": { + "$ref": "1496" + }, + "value": "4d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "tenantId": { + "$id": "4803", + "kind": "string", + "type": { + "$ref": "1501" + }, + "value": "5d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "type": { + "$id": "4804", + "kind": "string", + "type": { + "$ref": "318" + }, + "value": "UserAssigned" + }, + "userAssignedIdentities": { + "$id": "4805", + "kind": "dict", + "type": { + "$ref": "1509" + }, + "value": { + "$id": "4806", + "key9851": { + "$id": "4807", + "kind": "model", + "type": { + "$ref": "1512" + }, + "value": { + "$id": "4808", + "principalId": { + "$id": "4809", + "kind": "string", + "type": { + "$ref": "1519" + }, + "value": "6d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "clientId": { + "$id": "4810", + "kind": "string", + "type": { + "$ref": "1514" + }, + "value": "7d508e5b-374b-4382-9a1c-01fb8b6cb37c" + } + } + } + } + } + } + }, + "plan": { + "$id": "4811", + "kind": "model", + "type": { + "$ref": "1528" + }, + "value": { + "$id": "4812", + "name": { + "$id": "4813", + "kind": "string", + "type": { + "$ref": "1530" + }, + "value": "jwgrcrnrtfoxn" + }, + "publisher": { + "$id": "4814", + "kind": "string", + "type": { + "$ref": "1534" + }, + "value": "iozjbiqqckqm" + }, + "product": { + "$id": "4815", + "kind": "string", + "type": { + "$ref": "1538" + }, + "value": "cgopbyvdyqikahwyxfpzwaqk" + }, + "promotionCode": { + "$id": "4816", + "kind": "string", + "type": { + "$ref": "1542" + }, + "value": "naglezezplcaruqogtxnuizslqnnbr" + }, + "version": { + "$id": "4817", + "kind": "string", + "type": { + "$ref": "1546" + }, + "value": "wa" + } + } + }, + "tags": { + "$id": "4818", + "kind": "dict", + "type": { + "$ref": "475" + }, + "value": { + "$id": "4819", + "key3518": { + "$id": "4820", + "kind": "string", + "type": { + "$ref": "477" + }, + "value": "luvrnuvsgdpbuofdskkcoqhfh" + } + } + }, + "location": { + "$id": "4821", + "kind": "string", + "type": { + "$ref": "481" + }, + "value": "westus" + }, + "id": { + "$id": "4822", + "kind": "string", + "type": { + "$ref": "433" + }, + "value": "/subscriptions/7B0CD4DB-3381-4013-9B31-FB6E6FD0FF1C/resourceGroups/rgazurefleet/providers/Microsoft.AzureFleet/fleets/testFleet" + }, + "name": { + "$id": "4823", + "kind": "string", + "type": { + "$ref": "438" + }, + "value": "testFleet" + }, + "type": { + "$id": "4824", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "Microsoft.AzureFleet/fleets" + }, + "systemData": { + "$id": "4825", + "kind": "model", + "type": { + "$ref": "447" + }, + "value": { + "$id": "4826", + "createdBy": { + "$id": "4827", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "rowegentrpoajsv" + }, + "createdByType": { + "$id": "4828", + "kind": "string", + "type": { + "$ref": "328" + }, + "value": "User" + }, + "createdAt": { + "$id": "4829", + "kind": "string", + "type": { + "$ref": "456" + }, + "value": "2024-04-29T21:51:44.043Z" + }, + "lastModifiedBy": { + "$id": "4830", + "kind": "string", + "type": { + "$ref": "461" + }, + "value": "edwuayhhaoepxzisfaqjhmrxjq" + }, + "lastModifiedByType": { + "$id": "4831", + "kind": "string", + "type": { + "$ref": "328" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "4832", + "kind": "string", + "type": { + "$ref": "468" + }, + "value": "2024-04-29T21:51:44.043Z" + } + } + } + } + } + ] + }, + "nextLink": { + "$id": "4833", + "kind": "string", + "type": { + "$ref": "1630" + }, + "value": "https://microsoft.com/a" + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "4834", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "4835", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4836", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "4446" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "4837", + "type": { + "$id": "4838", + "kind": "array", + "name": "ArrayFleet", + "valueType": { + "$ref": "429" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "resultSegments": [ + "value" + ] + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.AzureFleet.Fleets.listByResourceGroup" + }, + { + "$id": "4839", + "kind": "paging", + "name": "listBySubscription", + "accessibility": "public", + "apiVersions": [ + "2023-11-01-preview", + "2024-05-01-preview", + "2024-11-01" + ], + "doc": "List Fleet resources by subscription ID", + "operation": { + "$id": "4840", + "name": "listBySubscription", + "resourceName": "Fleet", + "doc": "List Fleet resources by subscription ID", + "accessibility": "public", + "parameters": [ + { + "$id": "4841", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "4842", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "4843", + "type": { + "$id": "4844", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-11-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4845", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "4846", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "4847", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4848", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "4849", + "kind": "constant", + "valueType": { + "$id": "4850", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "4851", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1624" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/providers/Microsoft.AzureFleet/fleets", + "bufferResponse": true, + "paging": { + "$id": "4852", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "4853", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.AzureFleet.Fleets.listBySubscription", + "decorators": [], + "examples": [ + { + "$id": "4854", + "kind": "http", + "name": "Fleets_ListBySubscription", + "description": "Fleets_ListBySubscription", + "filePath": "2024-11-01/Fleets_ListBySubscription.json", + "parameters": [ + { + "$id": "4855", + "parameter": { + "$ref": "4841" + }, + "value": { + "$id": "4856", + "kind": "string", + "type": { + "$ref": "4842" + }, + "value": "2024-11-01" + } + }, + { + "$id": "4857", + "parameter": { + "$ref": "4845" + }, + "value": { + "$id": "4858", + "kind": "string", + "type": { + "$ref": "4846" + }, + "value": "1DC2F28C-A625-4B0E-9748-9885A3C9E9EB" + } + } + ], + "responses": [ + { + "$id": "4859", + "response": { + "$ref": "4851" + }, + "statusCode": 200, + "bodyValue": { + "$id": "4860", + "kind": "model", + "type": { + "$ref": "1624" + }, + "value": { + "$id": "4861", + "value": { + "$id": "4862", + "kind": "array", + "type": { + "$ref": "1626" + }, + "value": [ + { + "$id": "4863", + "kind": "model", + "type": { + "$ref": "429" + }, + "value": { + "$id": "4864", + "properties": { + "$id": "4865", + "kind": "model", + "type": { + "$ref": "485" + }, + "value": { + "$id": "4866", + "provisioningState": { + "$id": "4867", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Creating" + }, + "spotPriorityProfile": { + "$id": "4868", + "kind": "model", + "type": { + "$ref": "490" + }, + "value": { + "$id": "4869", + "capacity": { + "$id": "4870", + "kind": "number", + "type": { + "$ref": "492" + }, + "value": 20 + }, + "minCapacity": { + "$id": "4871", + "kind": "number", + "type": { + "$ref": "496" + }, + "value": 10 + }, + "maxPricePerVM": { + "$id": "4872", + "kind": "number", + "type": { + "$ref": "500" + }, + "value": 0.00865 + }, + "evictionPolicy": { + "$id": "4873", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "Delete" + }, + "allocationStrategy": { + "$id": "4874", + "kind": "string", + "type": { + "$ref": "36" + }, + "value": "PriceCapacityOptimized" + }, + "maintain": { + "$id": "4875", + "kind": "boolean", + "type": { + "$ref": "510" + }, + "value": true + } + } + }, + "regularPriorityProfile": { + "$id": "4876", + "kind": "model", + "type": { + "$ref": "516" + }, + "value": { + "$id": "4877", + "capacity": { + "$id": "4878", + "kind": "number", + "type": { + "$ref": "518" + }, + "value": 20 + }, + "minCapacity": { + "$id": "4879", + "kind": "number", + "type": { + "$ref": "522" + }, + "value": 10 + }, + "allocationStrategy": { + "$id": "4880", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "LowestPrice" + } + } + }, + "vmSizesProfile": { + "$id": "4881", + "kind": "array", + "type": { + "$ref": "531" + }, + "value": [ + { + "$id": "4882", + "kind": "model", + "type": { + "$ref": "532" + }, + "value": { + "$id": "4883", + "name": { + "$id": "4884", + "kind": "string", + "type": { + "$ref": "534" + }, + "value": "Standard_d1_v2" + }, + "rank": { + "$id": "4885", + "kind": "number", + "type": { + "$ref": "538" + }, + "value": 19225 + } + } + } + ] + }, + "computeProfile": { + "$id": "4886", + "kind": "model", + "type": { + "$ref": "1449" + }, + "value": { + "$id": "4887", + "baseVirtualMachineProfile": { + "$id": "4888", + "kind": "model", + "type": { + "$ref": "644" + }, + "value": { + "$id": "4889", + "osProfile": { + "$id": "4890", + "kind": "model", + "type": { + "$ref": "646" + }, + "value": { + "$id": "4891", + "computerNamePrefix": { + "$id": "4892", + "kind": "string", + "type": { + "$ref": "648" + }, + "value": "o" + }, + "adminUsername": { + "$id": "4893", + "kind": "string", + "type": { + "$ref": "652" + }, + "value": "nrgzqciiaaxjrqldbmjbqkyhntp" + }, + "windowsConfiguration": { + "$id": "4894", + "kind": "model", + "type": { + "$ref": "664" + }, + "value": { + "$id": "4895", + "provisionVMAgent": { + "$id": "4896", + "kind": "boolean", + "type": { + "$ref": "666" + }, + "value": true + }, + "enableAutomaticUpdates": { + "$id": "4897", + "kind": "boolean", + "type": { + "$ref": "670" + }, + "value": true + }, + "timeZone": { + "$id": "4898", + "kind": "string", + "type": { + "$ref": "674" + }, + "value": "hlyjiqcfksgrpjrct" + }, + "additionalUnattendContent": { + "$id": "4899", + "kind": "array", + "type": { + "$ref": "678" + }, + "value": [ + { + "$id": "4900", + "kind": "model", + "type": { + "$ref": "679" + }, + "value": { + "$id": "4901", + "passName": { + "$id": "4902", + "kind": "string", + "type": { + "$ref": "681" + }, + "value": "OobeSystem" + }, + "componentName": { + "$id": "4903", + "kind": "string", + "type": { + "$ref": "685" + }, + "value": "Microsoft-Windows-Shell-Setup" + }, + "settingName": { + "$id": "4904", + "kind": "string", + "type": { + "$ref": "116" + }, + "value": "AutoLogon" + } + } + } + ] + }, + "patchSettings": { + "$id": "4905", + "kind": "model", + "type": { + "$ref": "698" + }, + "value": { + "$id": "4906", + "patchMode": { + "$id": "4907", + "kind": "string", + "type": { + "$ref": "122" + }, + "value": "Manual" + }, + "enableHotpatching": { + "$id": "4908", + "kind": "boolean", + "type": { + "$ref": "703" + }, + "value": true + }, + "assessmentMode": { + "$id": "4909", + "kind": "string", + "type": { + "$ref": "130" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "4910", + "kind": "model", + "type": { + "$ref": "710" + }, + "value": { + "$id": "4911", + "rebootSetting": { + "$id": "4912", + "kind": "string", + "type": { + "$ref": "136" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "4913", + "kind": "boolean", + "type": { + "$ref": "715" + }, + "value": true + } + } + } + } + }, + "winRM": { + "$id": "4914", + "kind": "model", + "type": { + "$ref": "723" + }, + "value": { + "$id": "4915", + "listeners": { + "$id": "4916", + "kind": "array", + "type": { + "$ref": "725" + }, + "value": [ + { + "$id": "4917", + "kind": "model", + "type": { + "$ref": "726" + }, + "value": { + "$id": "4918", + "protocol": { + "$id": "4919", + "kind": "string", + "type": { + "$ref": "146" + }, + "value": "Http" + }, + "certificateUrl": { + "$id": "4920", + "kind": "string", + "type": { + "$ref": "731" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + } + } + } + ] + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "4921", + "kind": "boolean", + "type": { + "$ref": "739" + }, + "value": true + } + } + }, + "linuxConfiguration": { + "$id": "4922", + "kind": "model", + "type": { + "$ref": "745" + }, + "value": { + "$id": "4923", + "disablePasswordAuthentication": { + "$id": "4924", + "kind": "boolean", + "type": { + "$ref": "747" + }, + "value": true + }, + "ssh": { + "$id": "4925", + "kind": "model", + "type": { + "$ref": "751" + }, + "value": { + "$id": "4926", + "publicKeys": { + "$id": "4927", + "kind": "array", + "type": { + "$ref": "753" + }, + "value": [ + { + "$id": "4928", + "kind": "model", + "type": { + "$ref": "754" + }, + "value": { + "$id": "4929", + "path": { + "$id": "4930", + "kind": "string", + "type": { + "$ref": "756" + }, + "value": "kmqz" + }, + "keyData": { + "$id": "4931", + "kind": "string", + "type": { + "$ref": "760" + }, + "value": "kivgsubusvpprwqaqpjcmhsv" + } + } + } + ] + } + } + }, + "provisionVMAgent": { + "$id": "4932", + "kind": "boolean", + "type": { + "$ref": "768" + }, + "value": true + }, + "patchSettings": { + "$id": "4933", + "kind": "model", + "type": { + "$ref": "772" + }, + "value": { + "$id": "4934", + "patchMode": { + "$id": "4935", + "kind": "string", + "type": { + "$ref": "152" + }, + "value": "ImageDefault" + }, + "assessmentMode": { + "$id": "4936", + "kind": "string", + "type": { + "$ref": "158" + }, + "value": "ImageDefault" + }, + "automaticByPlatformSettings": { + "$id": "4937", + "kind": "model", + "type": { + "$ref": "780" + }, + "value": { + "$id": "4938", + "rebootSetting": { + "$id": "4939", + "kind": "string", + "type": { + "$ref": "164" + }, + "value": "Unknown" + }, + "bypassPlatformSafetyChecksOnUserSchedule": { + "$id": "4940", + "kind": "boolean", + "type": { + "$ref": "785" + }, + "value": true + } + } + } + } + }, + "enableVMAgentPlatformUpdates": { + "$id": "4941", + "kind": "boolean", + "type": { + "$ref": "793" + }, + "value": true + } + } + }, + "secrets": { + "$id": "4942", + "kind": "array", + "type": { + "$ref": "799" + }, + "value": [ + { + "$id": "4943", + "kind": "model", + "type": { + "$ref": "800" + }, + "value": { + "$id": "4944", + "sourceVault": { + "$id": "4945", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "4946", + "id": { + "$id": "4947", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + }, + "vaultCertificates": { + "$id": "4948", + "kind": "array", + "type": { + "$ref": "811" + }, + "value": [ + { + "$id": "4949", + "kind": "model", + "type": { + "$ref": "812" + }, + "value": { + "$id": "4950", + "certificateUrl": { + "$id": "4951", + "kind": "string", + "type": { + "$ref": "814" + }, + "value": "https://myVaultName.vault.azure.net/secrets/myCertName" + }, + "certificateStore": { + "$id": "4952", + "kind": "string", + "type": { + "$ref": "818" + }, + "value": "nlxrwavpzhueffxsshlun" + } + } + } + ] + } + } + } + ] + }, + "allowExtensionOperations": { + "$id": "4953", + "kind": "boolean", + "type": { + "$ref": "826" + }, + "value": true + }, + "requireGuestProvisionSignal": { + "$id": "4954", + "kind": "boolean", + "type": { + "$ref": "830" + }, + "value": true + } + } + }, + "storageProfile": { + "$id": "4955", + "kind": "model", + "type": { + "$ref": "836" + }, + "value": { + "$id": "4956", + "imageReference": { + "$id": "4957", + "kind": "model", + "type": { + "$ref": "838" + }, + "value": { + "$id": "4958", + "publisher": { + "$id": "4959", + "kind": "string", + "type": { + "$ref": "845" + }, + "value": "mqxgwbiyjzmxavhbkd" + }, + "offer": { + "$id": "4960", + "kind": "string", + "type": { + "$ref": "849" + }, + "value": "isxgumkarlkomp" + }, + "sku": { + "$id": "4961", + "kind": "string", + "type": { + "$ref": "853" + }, + "value": "eojmppqcrnpmxirtp" + }, + "version": { + "$id": "4962", + "kind": "string", + "type": { + "$ref": "857" + }, + "value": "wvpcqefgtmqdgltiuz" + }, + "exactVersion": { + "$id": "4963", + "kind": "string", + "type": { + "$ref": "861" + }, + "value": "zjbntmiskjexlr" + }, + "sharedGalleryImageId": { + "$id": "4964", + "kind": "string", + "type": { + "$ref": "865" + }, + "value": "kmkgihoxwlawuuhcinfirktdwkmx" + }, + "communityGalleryImageId": { + "$id": "4965", + "kind": "string", + "type": { + "$ref": "869" + }, + "value": "vlqe" + }, + "id": { + "$id": "4966", + "kind": "string", + "type": { + "$ref": "840" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}/versions/{versionName}" + } + } + }, + "osDisk": { + "$id": "4967", + "kind": "model", + "type": { + "$ref": "875" + }, + "value": { + "$id": "4968", + "name": { + "$id": "4969", + "kind": "string", + "type": { + "$ref": "877" + }, + "value": "wfttw" + }, + "caching": { + "$id": "4970", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "4971", + "kind": "boolean", + "type": { + "$ref": "884" + }, + "value": true + }, + "createOption": { + "$id": "4972", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "FromImage" + }, + "diffDiskSettings": { + "$id": "4973", + "kind": "model", + "type": { + "$ref": "891" + }, + "value": { + "$id": "4974", + "option": { + "$id": "4975", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "Local" + }, + "placement": { + "$id": "4976", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "CacheDisk" + } + } + }, + "diskSizeGB": { + "$id": "4977", + "kind": "number", + "type": { + "$ref": "901" + }, + "value": 14 + }, + "osType": { + "$id": "4978", + "kind": "string", + "type": { + "$ref": "206" + }, + "value": "Windows" + }, + "image": { + "$id": "4979", + "kind": "model", + "type": { + "$ref": "908" + }, + "value": { + "$id": "4980", + "uri": { + "$id": "4981", + "kind": "string", + "type": { + "$ref": "910" + }, + "value": "https://myStorageAccountName.blob.core.windows.net/myContainerName/myVhdName.vhd" + } + } + }, + "vhdContainers": { + "$id": "4982", + "kind": "array", + "type": { + "$ref": "916" + }, + "value": [ + { + "$id": "4983", + "kind": "string", + "type": { + "$ref": "917" + }, + "value": "tkzcwddtinkfpnfklatw" + } + ] + }, + "managedDisk": { + "$id": "4984", + "kind": "model", + "type": { + "$ref": "921" + }, + "value": { + "$id": "4985", + "storageAccountType": { + "$id": "4986", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "4987", + "kind": "model", + "type": { + "$ref": "926" + }, + "value": { + "$id": "4988", + "id": { + "$id": "4989", + "kind": "string", + "type": { + "$ref": "928" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "4990", + "kind": "model", + "type": { + "$ref": "935" + }, + "value": { + "$id": "4991", + "securityEncryptionType": { + "$id": "4992", + "kind": "string", + "type": { + "$ref": "228" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "4993", + "kind": "model", + "type": { + "$ref": "926" + }, + "value": { + "$id": "4994", + "id": { + "$id": "4995", + "kind": "string", + "type": { + "$ref": "928" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "deleteOption": { + "$id": "4996", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "Delete" + } + } + }, + "dataDisks": { + "$id": "4997", + "kind": "array", + "type": { + "$ref": "952" + }, + "value": [ + { + "$id": "4998", + "kind": "model", + "type": { + "$ref": "953" + }, + "value": { + "$id": "4999", + "name": { + "$id": "5000", + "kind": "string", + "type": { + "$ref": "955" + }, + "value": "eogiykmdmeikswxmigjws" + }, + "lun": { + "$id": "5001", + "kind": "number", + "type": { + "$ref": "959" + }, + "value": 14 + }, + "caching": { + "$id": "5002", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "None" + }, + "writeAcceleratorEnabled": { + "$id": "5003", + "kind": "boolean", + "type": { + "$ref": "966" + }, + "value": true + }, + "createOption": { + "$id": "5004", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "FromImage" + }, + "diskSizeGB": { + "$id": "5005", + "kind": "number", + "type": { + "$ref": "973" + }, + "value": 6 + }, + "managedDisk": { + "$id": "5006", + "kind": "model", + "type": { + "$ref": "921" + }, + "value": { + "$id": "5007", + "storageAccountType": { + "$id": "5008", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "Standard_LRS" + }, + "diskEncryptionSet": { + "$id": "5009", + "kind": "model", + "type": { + "$ref": "926" + }, + "value": { + "$id": "5010", + "id": { + "$id": "5011", + "kind": "string", + "type": { + "$ref": "928" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + }, + "securityProfile": { + "$id": "5012", + "kind": "model", + "type": { + "$ref": "935" + }, + "value": { + "$id": "5013", + "securityEncryptionType": { + "$id": "5014", + "kind": "string", + "type": { + "$ref": "228" + }, + "value": "VMGuestStateOnly" + }, + "diskEncryptionSet": { + "$id": "5015", + "kind": "model", + "type": { + "$ref": "926" + }, + "value": { + "$id": "5016", + "id": { + "$id": "5017", + "kind": "string", + "type": { + "$ref": "928" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}" + } + } + } + } + } + } + }, + "diskIOPSReadWrite": { + "$id": "5018", + "kind": "number", + "type": { + "$ref": "980" + }, + "value": 27 + }, + "diskMBpsReadWrite": { + "$id": "5019", + "kind": "number", + "type": { + "$ref": "984" + }, + "value": 2 + }, + "deleteOption": { + "$id": "5020", + "kind": "string", + "type": { + "$ref": "236" + }, + "value": "Delete" + } + } + } + ] + }, + "diskControllerType": { + "$id": "5021", + "kind": "string", + "type": { + "$ref": "242" + }, + "value": "uzb" + } + } + }, + "networkProfile": { + "$id": "5022", + "kind": "model", + "type": { + "$ref": "998" + }, + "value": { + "$id": "5023", + "healthProbe": { + "$id": "5024", + "kind": "model", + "type": { + "$ref": "1000" + }, + "value": { + "$id": "5025", + "id": { + "$id": "5026", + "kind": "string", + "type": { + "$ref": "1002" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}" + } + } + }, + "networkInterfaceConfigurations": { + "$id": "5027", + "kind": "array", + "type": { + "$ref": "1009" + }, + "value": [ + { + "$id": "5028", + "kind": "model", + "type": { + "$ref": "1010" + }, + "value": { + "$id": "5029", + "name": { + "$id": "5030", + "kind": "string", + "type": { + "$ref": "1012" + }, + "value": "i" + }, + "properties": { + "$id": "5031", + "kind": "model", + "type": { + "$ref": "1016" + }, + "value": { + "$id": "5032", + "primary": { + "$id": "5033", + "kind": "boolean", + "type": { + "$ref": "1018" + }, + "value": true + }, + "enableAcceleratedNetworking": { + "$id": "5034", + "kind": "boolean", + "type": { + "$ref": "1022" + }, + "value": true + }, + "disableTcpStateTracking": { + "$id": "5035", + "kind": "boolean", + "type": { + "$ref": "1026" + }, + "value": true + }, + "enableFpga": { + "$id": "5036", + "kind": "boolean", + "type": { + "$ref": "1030" + }, + "value": true + }, + "networkSecurityGroup": { + "$id": "5037", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "5038", + "id": { + "$id": "5039", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}" + } + } + }, + "dnsSettings": { + "$id": "5040", + "kind": "model", + "type": { + "$ref": "1037" + }, + "value": { + "$id": "5041", + "dnsServers": { + "$id": "5042", + "kind": "array", + "type": { + "$ref": "1039" + }, + "value": [ + { + "$id": "5043", + "kind": "string", + "type": { + "$ref": "1040" + }, + "value": "nxmmfolhclsesu" + } + ] + } + } + }, + "ipConfigurations": { + "$id": "5044", + "kind": "array", + "type": { + "$ref": "1046" + }, + "value": [ + { + "$id": "5045", + "kind": "model", + "type": { + "$ref": "1047" + }, + "value": { + "$id": "5046", + "name": { + "$id": "5047", + "kind": "string", + "type": { + "$ref": "1049" + }, + "value": "oezqhkidfhyywlfzwuotilrpbqnjg" + }, + "properties": { + "$id": "5048", + "kind": "model", + "type": { + "$ref": "1053" + }, + "value": { + "$id": "5049", + "subnet": { + "$id": "5050", + "kind": "model", + "type": { + "$ref": "1000" + }, + "value": { + "$id": "5051", + "id": { + "$id": "5052", + "kind": "string", + "type": { + "$ref": "1002" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}" + } + } + }, + "primary": { + "$id": "5053", + "kind": "boolean", + "type": { + "$ref": "1058" + }, + "value": true + }, + "publicIPAddressConfiguration": { + "$id": "5054", + "kind": "model", + "type": { + "$ref": "1062" + }, + "value": { + "$id": "5055", + "name": { + "$id": "5056", + "kind": "string", + "type": { + "$ref": "1064" + }, + "value": "fvpqf" + }, + "properties": { + "$id": "5057", + "kind": "model", + "type": { + "$ref": "1068" + }, + "value": { + "$id": "5058", + "idleTimeoutInMinutes": { + "$id": "5059", + "kind": "number", + "type": { + "$ref": "1070" + }, + "value": 9 + }, + "dnsSettings": { + "$id": "5060", + "kind": "model", + "type": { + "$ref": "1074" + }, + "value": { + "$id": "5061", + "domainNameLabel": { + "$id": "5062", + "kind": "string", + "type": { + "$ref": "1076" + }, + "value": "ukrddzvmorpmfsczjwtbvp" + }, + "domainNameLabelScope": { + "$id": "5063", + "kind": "string", + "type": { + "$ref": "248" + }, + "value": "TenantReuse" + } + } + }, + "ipTags": { + "$id": "5064", + "kind": "array", + "type": { + "$ref": "1085" + }, + "value": [ + { + "$id": "5065", + "kind": "model", + "type": { + "$ref": "1086" + }, + "value": { + "$id": "5066", + "ipTagType": { + "$id": "5067", + "kind": "string", + "type": { + "$ref": "1088" + }, + "value": "sddgsoemnzgqizale" + }, + "tag": { + "$id": "5068", + "kind": "string", + "type": { + "$ref": "1092" + }, + "value": "wufmhrjsakbiaetyara" + } + } + } + ] + }, + "publicIPPrefix": { + "$id": "5069", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "5070", + "id": { + "$id": "5071", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}" + } + } + }, + "publicIPAddressVersion": { + "$id": "5072", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "IPv4" + }, + "deleteOption": { + "$id": "5073", + "kind": "string", + "type": { + "$ref": "264" + }, + "value": "Delete" + } + } + }, + "sku": { + "$id": "5074", + "kind": "model", + "type": { + "$ref": "1109" + }, + "value": { + "$id": "5075", + "name": { + "$id": "5076", + "kind": "string", + "type": { + "$ref": "270" + }, + "value": "Basic" + }, + "tier": { + "$id": "5077", + "kind": "string", + "type": { + "$ref": "276" + }, + "value": "Regional" + } + } + } + } + }, + "privateIPAddressVersion": { + "$id": "5078", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "IPv4" + }, + "applicationGatewayBackendAddressPools": { + "$id": "5079", + "kind": "array", + "type": { + "$ref": "1124" + }, + "value": [ + { + "$id": "5080", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "5081", + "id": { + "$id": "5082", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "applicationSecurityGroups": { + "$id": "5083", + "kind": "array", + "type": { + "$ref": "1128" + }, + "value": [ + { + "$id": "5084", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "5085", + "id": { + "$id": "5086", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}" + } + } + } + ] + }, + "loadBalancerBackendAddressPools": { + "$id": "5087", + "kind": "array", + "type": { + "$ref": "1132" + }, + "value": [ + { + "$id": "5088", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "5089", + "id": { + "$id": "5090", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}" + } + } + } + ] + }, + "loadBalancerInboundNatPools": { + "$id": "5091", + "kind": "array", + "type": { + "$ref": "1136" + }, + "value": [ + { + "$id": "5092", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "5093", + "id": { + "$id": "5094", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatPools/{inboundNatPoolName}" + } + } + } + ] + } + } + } + } + } + ] + }, + "enableIPForwarding": { + "$id": "5095", + "kind": "boolean", + "type": { + "$ref": "1144" + }, + "value": true + }, + "deleteOption": { + "$id": "5096", + "kind": "string", + "type": { + "$ref": "264" + }, + "value": "Delete" + }, + "auxiliaryMode": { + "$id": "5097", + "kind": "string", + "type": { + "$ref": "282" + }, + "value": "None" + }, + "auxiliarySku": { + "$id": "5098", + "kind": "string", + "type": { + "$ref": "290" + }, + "value": "None" + } + } + } + } + } + ] + }, + "networkApiVersion": { + "$id": "5099", + "kind": "string", + "type": { + "$ref": "302" + }, + "value": "2020-11-01" + } + } + }, + "securityProfile": { + "$id": "5100", + "kind": "model", + "type": { + "$ref": "1166" + }, + "value": { + "$id": "5101", + "uefiSettings": { + "$id": "5102", + "kind": "model", + "type": { + "$ref": "1168" + }, + "value": { + "$id": "5103", + "secureBootEnabled": { + "$id": "5104", + "kind": "boolean", + "type": { + "$ref": "1170" + }, + "value": true + }, + "vTpmEnabled": { + "$id": "5105", + "kind": "boolean", + "type": { + "$ref": "1174" + }, + "value": true + } + } + }, + "encryptionAtHost": { + "$id": "5106", + "kind": "boolean", + "type": { + "$ref": "1180" + }, + "value": true + }, + "securityType": { + "$id": "5107", + "kind": "string", + "type": { + "$ref": "306" + }, + "value": "TrustedLaunch" + }, + "encryptionIdentity": { + "$id": "5108", + "kind": "model", + "type": { + "$ref": "1187" + }, + "value": { + "$id": "5109", + "userAssignedIdentityResourceId": { + "$id": "5110", + "kind": "string", + "type": { + "$ref": "1189" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{userAssignedIdentityName}" + } + } + }, + "proxyAgentSettings": { + "$id": "5111", + "kind": "model", + "type": { + "$ref": "1196" + }, + "value": { + "$id": "5112", + "enabled": { + "$id": "5113", + "kind": "boolean", + "type": { + "$ref": "1198" + }, + "value": true + }, + "mode": { + "$id": "5114", + "kind": "string", + "type": { + "$ref": "312" + }, + "value": "Audit" + }, + "keyIncarnationId": { + "$id": "5115", + "kind": "number", + "type": { + "$ref": "1205" + }, + "value": 20 + } + } + } + } + }, + "diagnosticsProfile": { + "$id": "5116", + "kind": "model", + "type": { + "$ref": "1213" + }, + "value": { + "$id": "5117", + "bootDiagnostics": { + "$id": "5118", + "kind": "model", + "type": { + "$ref": "1215" + }, + "value": { + "$id": "5119", + "enabled": { + "$id": "5120", + "kind": "boolean", + "type": { + "$ref": "1217" + }, + "value": true + }, + "storageUri": { + "$id": "5121", + "kind": "string", + "type": { + "$ref": "1221" + }, + "value": "http://myStorageAccountName.blob.core.windows.net" + } + } + } + } + }, + "extensionProfile": { + "$id": "5122", + "kind": "model", + "type": { + "$ref": "1229" + }, + "value": { + "$id": "5123", + "extensions": { + "$id": "5124", + "kind": "array", + "type": { + "$ref": "1231" + }, + "value": [ + { + "$id": "5125", + "kind": "model", + "type": { + "$ref": "1232" + }, + "value": { + "$id": "5126", + "name": { + "$id": "5127", + "kind": "string", + "type": { + "$ref": "1239" + }, + "value": "bndxuxx" + }, + "type": { + "$id": "5128", + "kind": "string", + "type": { + "$ref": "1243" + }, + "value": "cmeam" + }, + "properties": { + "$id": "5129", + "kind": "model", + "type": { + "$ref": "1247" + }, + "value": { + "$id": "5130", + "forceUpdateTag": { + "$id": "5131", + "kind": "string", + "type": { + "$ref": "1249" + }, + "value": "yhgxw" + }, + "publisher": { + "$id": "5132", + "kind": "string", + "type": { + "$ref": "1253" + }, + "value": "kpxtirxjfprhs" + }, + "type": { + "$id": "5133", + "kind": "string", + "type": { + "$ref": "1257" + }, + "value": "pgjilctjjwaa" + }, + "typeHandlerVersion": { + "$id": "5134", + "kind": "string", + "type": { + "$ref": "1261" + }, + "value": "zevivcoilxmbwlrihhhibq" + }, + "autoUpgradeMinorVersion": { + "$id": "5135", + "kind": "boolean", + "type": { + "$ref": "1265" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "5136", + "kind": "boolean", + "type": { + "$ref": "1269" + }, + "value": true + }, + "settings": { + "$id": "5137", + "kind": "dict", + "type": { + "$ref": "1273" + }, + "value": { + "$id": "5138" + } + }, + "provisioningState": { + "$id": "5139", + "kind": "string", + "type": { + "$ref": "1285" + }, + "value": "Succeeded" + }, + "provisionAfterExtensions": { + "$id": "5140", + "kind": "array", + "type": { + "$ref": "1289" + }, + "value": [ + { + "$id": "5141", + "kind": "string", + "type": { + "$ref": "1290" + }, + "value": "nftzosroolbcwmpupujzqwqe" + } + ] + }, + "suppressFailures": { + "$id": "5142", + "kind": "boolean", + "type": { + "$ref": "1294" + }, + "value": true + }, + "protectedSettingsFromKeyVault": { + "$id": "5143", + "kind": "model", + "type": { + "$ref": "1298" + }, + "value": { + "$id": "5144", + "secretUrl": { + "$id": "5145", + "kind": "string", + "type": { + "$ref": "1300" + }, + "value": "https://myVaultName.vault.azure.net/secrets/secret/mySecretName" + }, + "sourceVault": { + "$id": "5146", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "5147", + "id": { + "$id": "5148", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}" + } + } + } + } + } + } + }, + "id": { + "$id": "5149", + "kind": "string", + "type": { + "$ref": "1234" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{extensionName}" + } + } + } + ] + }, + "extensionsTimeBudget": { + "$id": "5150", + "kind": "string", + "type": { + "$ref": "1313" + }, + "value": "mbhjahtdygwgyszdwjtvlvtgchdwil" + } + } + }, + "licenseType": { + "$id": "5151", + "kind": "string", + "type": { + "$ref": "1319" + }, + "value": "v" + }, + "scheduledEventsProfile": { + "$id": "5152", + "kind": "model", + "type": { + "$ref": "1323" + }, + "value": { + "$id": "5153", + "terminateNotificationProfile": { + "$id": "5154", + "kind": "model", + "type": { + "$ref": "1325" + }, + "value": { + "$id": "5155", + "notBeforeTimeout": { + "$id": "5156", + "kind": "string", + "type": { + "$ref": "1327" + }, + "value": "iljppmmw" + }, + "enable": { + "$id": "5157", + "kind": "boolean", + "type": { + "$ref": "1331" + }, + "value": true + } + } + }, + "osImageNotificationProfile": { + "$id": "5158", + "kind": "model", + "type": { + "$ref": "1337" + }, + "value": { + "$id": "5159", + "notBeforeTimeout": { + "$id": "5160", + "kind": "string", + "type": { + "$ref": "1339" + }, + "value": "olbpadmevekyczfokodtfprxti" + }, + "enable": { + "$id": "5161", + "kind": "boolean", + "type": { + "$ref": "1343" + }, + "value": true + } + } + } + } + }, + "userData": { + "$id": "5162", + "kind": "string", + "type": { + "$ref": "1351" + }, + "value": "s" + }, + "capacityReservation": { + "$id": "5163", + "kind": "model", + "type": { + "$ref": "1355" + }, + "value": { + "$id": "5164", + "capacityReservationGroup": { + "$id": "5165", + "kind": "model", + "type": { + "$ref": "802" + }, + "value": { + "$id": "5166", + "id": { + "$id": "5167", + "kind": "string", + "type": { + "$ref": "804" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}" + } + } + } + } + }, + "applicationProfile": { + "$id": "5168", + "kind": "model", + "type": { + "$ref": "1362" + }, + "value": { + "$id": "5169", + "galleryApplications": { + "$id": "5170", + "kind": "array", + "type": { + "$ref": "1364" + }, + "value": [ + { + "$id": "5171", + "kind": "model", + "type": { + "$ref": "1365" + }, + "value": { + "$id": "5172", + "tags": { + "$id": "5173", + "kind": "string", + "type": { + "$ref": "1367" + }, + "value": "eyrqjbib" + }, + "order": { + "$id": "5174", + "kind": "number", + "type": { + "$ref": "1371" + }, + "value": 5 + }, + "packageReferenceId": { + "$id": "5175", + "kind": "string", + "type": { + "$ref": "1375" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{applicationName}/versions/{versionName}" + }, + "treatFailureAsDeploymentFailure": { + "$id": "5176", + "kind": "boolean", + "type": { + "$ref": "1384" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "5177", + "kind": "boolean", + "type": { + "$ref": "1388" + }, + "value": true + } + } + } + ] + } + } + }, + "hardwareProfile": { + "$id": "5178", + "kind": "model", + "type": { + "$ref": "1396" + }, + "value": { + "$id": "5179", + "vmSizeProperties": { + "$id": "5180", + "kind": "model", + "type": { + "$ref": "1398" + }, + "value": { + "$id": "5181", + "vCPUsAvailable": { + "$id": "5182", + "kind": "number", + "type": { + "$ref": "1400" + }, + "value": 16 + }, + "vCPUsPerCore": { + "$id": "5183", + "kind": "number", + "type": { + "$ref": "1404" + }, + "value": 23 + } + } + } + } + }, + "serviceArtifactReference": { + "$id": "5184", + "kind": "model", + "type": { + "$ref": "1412" + }, + "value": { + "$id": "5185", + "id": { + "$id": "5186", + "kind": "string", + "type": { + "$ref": "1414" + }, + "value": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactsName}/vmArtifactsProfiles/{vmArtifactsProfileName}" + } + } + }, + "securityPostureReference": { + "$id": "5187", + "kind": "model", + "type": { + "$ref": "1421" + }, + "value": { + "$id": "5188", + "id": { + "$id": "5189", + "kind": "string", + "type": { + "$ref": "1423" + }, + "value": "mubredelfbshboaxrsxiajihahaa" + }, + "excludeExtensions": { + "$id": "5190", + "kind": "array", + "type": { + "$ref": "1427" + }, + "value": [ + { + "$id": "5191", + "kind": "string", + "type": { + "$ref": "1428" + }, + "value": "{securityPostureVMExtensionName}" + } + ] + }, + "isOverridable": { + "$id": "5192", + "kind": "boolean", + "type": { + "$ref": "1432" + }, + "value": true + } + } + }, + "timeCreated": { + "$id": "5193", + "kind": "string", + "type": { + "$ref": "1438" + }, + "value": "2024-04-29T21:51:44.043Z" + } + } + }, + "computeApiVersion": { + "$id": "5194", + "kind": "string", + "type": { + "$ref": "1454" + }, + "value": "2023-07-01" + }, + "platformFaultDomainCount": { + "$id": "5195", + "kind": "number", + "type": { + "$ref": "1458" + }, + "value": 1 + } + } + }, + "timeCreated": { + "$id": "5196", + "kind": "string", + "type": { + "$ref": "1476" + }, + "value": "2024-07-10T00:16:34.8590555+00:00" + }, + "uniqueId": { + "$id": "5197", + "kind": "string", + "type": { + "$ref": "1481" + }, + "value": "a2f7fabd-bbc2-4a20-afe1-49fdb3885a28" + } + } + }, + "zones": { + "$id": "5198", + "kind": "array", + "type": { + "$ref": "1489" + }, + "value": [ + { + "$id": "5199", + "kind": "string", + "type": { + "$ref": "1490" + }, + "value": "zone1" + }, + { + "$id": "5200", + "kind": "string", + "type": { + "$ref": "1490" + }, + "value": "zone2" + } + ] + }, + "identity": { + "$id": "5201", + "kind": "model", + "type": { + "$ref": "1494" + }, + "value": { + "$id": "5202", + "principalId": { + "$id": "5203", + "kind": "string", + "type": { + "$ref": "1496" + }, + "value": "4d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "tenantId": { + "$id": "5204", + "kind": "string", + "type": { + "$ref": "1501" + }, + "value": "5d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "type": { + "$id": "5205", + "kind": "string", + "type": { + "$ref": "318" + }, + "value": "UserAssigned" + }, + "userAssignedIdentities": { + "$id": "5206", + "kind": "dict", + "type": { + "$ref": "1509" + }, + "value": { + "$id": "5207", + "key9851": { + "$id": "5208", + "kind": "model", + "type": { + "$ref": "1512" + }, + "value": { + "$id": "5209", + "principalId": { + "$id": "5210", + "kind": "string", + "type": { + "$ref": "1519" + }, + "value": "6d508e5b-374b-4382-9a1c-01fb8b6cb37c" + }, + "clientId": { + "$id": "5211", + "kind": "string", + "type": { + "$ref": "1514" + }, + "value": "7d508e5b-374b-4382-9a1c-01fb8b6cb37c" + } + } + } + } + } + } + }, + "plan": { + "$id": "5212", + "kind": "model", + "type": { + "$ref": "1528" + }, + "value": { + "$id": "5213", + "name": { + "$id": "5214", + "kind": "string", + "type": { + "$ref": "1530" + }, + "value": "jwgrcrnrtfoxn" + }, + "publisher": { + "$id": "5215", + "kind": "string", + "type": { + "$ref": "1534" + }, + "value": "iozjbiqqckqm" + }, + "product": { + "$id": "5216", + "kind": "string", + "type": { + "$ref": "1538" + }, + "value": "cgopbyvdyqikahwyxfpzwaqk" + }, + "promotionCode": { + "$id": "5217", + "kind": "string", + "type": { + "$ref": "1542" + }, + "value": "naglezezplcaruqogtxnuizslqnnbr" + }, + "version": { + "$id": "5218", + "kind": "string", + "type": { + "$ref": "1546" + }, + "value": "wa" + } + } + }, + "tags": { + "$id": "5219", + "kind": "dict", + "type": { + "$ref": "475" + }, + "value": { + "$id": "5220", + "key3518": { + "$id": "5221", + "kind": "string", + "type": { + "$ref": "477" + }, + "value": "luvrnuvsgdpbuofdskkcoqhfh" + } + } + }, + "location": { + "$id": "5222", + "kind": "string", + "type": { + "$ref": "481" + }, + "value": "westus" + }, + "id": { + "$id": "5223", + "kind": "string", + "type": { + "$ref": "433" + }, + "value": "/subscriptions/7B0CD4DB-3381-4013-9B31-FB6E6FD0FF1C/resourceGroups/rgazurefleet/providers/Microsoft.AzureFleet/fleets/testFleet" + }, + "name": { + "$id": "5224", + "kind": "string", + "type": { + "$ref": "438" + }, + "value": "testFleet" + }, + "type": { + "$id": "5225", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "Microsoft.AzureFleet/fleets" + }, + "systemData": { + "$id": "5226", + "kind": "model", + "type": { + "$ref": "447" + }, + "value": { + "$id": "5227", + "createdBy": { + "$id": "5228", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "rowegentrpoajsv" + }, + "createdByType": { + "$id": "5229", + "kind": "string", + "type": { + "$ref": "328" + }, + "value": "User" + }, + "createdAt": { + "$id": "5230", + "kind": "string", + "type": { + "$ref": "456" + }, + "value": "2024-04-29T21:51:44.043Z" + }, + "lastModifiedBy": { + "$id": "5231", + "kind": "string", + "type": { + "$ref": "461" + }, + "value": "edwuayhhaoepxzisfaqjhmrxjq" + }, + "lastModifiedByType": { + "$id": "5232", + "kind": "string", + "type": { + "$ref": "328" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "5233", + "kind": "string", + "type": { + "$ref": "468" + }, + "value": "2024-04-29T21:51:44.043Z" + } + } + } + } + } + ] + }, + "nextLink": { + "$id": "5234", + "kind": "string", + "type": { + "$ref": "1630" + }, + "value": "https://microsoft.com/a" + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "5235", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "4849" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "5236", + "type": { + "$id": "5237", + "kind": "array", + "name": "ArrayFleet", + "valueType": { + "$ref": "429" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "resultSegments": [ + "value" + ] + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.AzureFleet.Fleets.listBySubscription" + }, + { + "$id": "5238", + "kind": "paging", + "name": "listVirtualMachineScaleSets", + "accessibility": "public", + "apiVersions": [ + "2023-11-01-preview", + "2024-05-01-preview", + "2024-11-01" + ], + "doc": "List VirtualMachineScaleSet resources by Fleet", + "operation": { + "$id": "5239", + "name": "listVirtualMachineScaleSets", + "resourceName": "VirtualMachineScaleSet", + "doc": "List VirtualMachineScaleSet resources by Fleet", + "accessibility": "public", + "parameters": [ + { + "$id": "5240", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "5241", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "5242", + "type": { + "$id": "5243", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-11-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5244", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "5245", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "5246", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5247", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "5248", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5249", + "name": "name", + "nameInRequest": "name", + "doc": "The name of the Fleet", + "type": { + "$id": "5250", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5251", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "5252", + "kind": "constant", + "valueType": { + "$id": "5253", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "5254", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1634" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureFleet/fleets/{name}/virtualMachineScaleSets", + "bufferResponse": true, + "paging": { + "$id": "5255", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "5256", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.AzureFleet.Fleets.listVirtualMachineScaleSets", + "decorators": [], + "examples": [ + { + "$id": "5257", + "kind": "http", + "name": "Fleets_ListVirtualMachineScaleSets", + "description": "Fleets_ListVirtualMachineScaleSets", + "filePath": "2024-11-01/Fleets_ListVirtualMachineScaleSets.json", + "parameters": [ + { + "$id": "5258", + "parameter": { + "$ref": "5240" + }, + "value": { + "$id": "5259", + "kind": "string", + "type": { + "$ref": "5241" + }, + "value": "2024-11-01" + } + }, + { + "$id": "5260", + "parameter": { + "$ref": "5244" + }, + "value": { + "$id": "5261", + "kind": "string", + "type": { + "$ref": "5245" + }, + "value": "1DC2F28C-A625-4B0E-9748-9885A3C9E9EB" + } + }, + { + "$id": "5262", + "parameter": { + "$ref": "5247" + }, + "value": { + "$id": "5263", + "kind": "string", + "type": { + "$ref": "5248" + }, + "value": "rgazurefleet" + } + }, + { + "$id": "5264", + "parameter": { + "$ref": "5249" + }, + "value": { + "$id": "5265", + "kind": "string", + "type": { + "$ref": "5250" + }, + "value": "myFleet" + } + } + ], + "responses": [ + { + "$id": "5266", + "response": { + "$ref": "5254" + }, + "statusCode": 200, + "bodyValue": { + "$id": "5267", + "kind": "model", + "type": { + "$ref": "1634" + }, + "value": { + "$id": "5268", + "value": { + "$id": "5269", + "kind": "array", + "type": { + "$ref": "1636" + }, + "value": [ + { + "$id": "5270", + "kind": "model", + "type": { + "$ref": "1637" + }, + "value": { + "$id": "5271", + "id": { + "$id": "5272", + "kind": "string", + "type": { + "$ref": "1641" + }, + "value": "/subscriptions/7B0CD4DB-3381-4013-9B31-FB6E6FD0FF1C/resourceGroups/rgazurefleet/providers/Microsoft.AzureFleet/fleets/myFleet/virtualMachineScaleSets/myVmss" + }, + "type": { + "$id": "5273", + "kind": "string", + "type": { + "$ref": "1646" + }, + "value": "Microsoft.AzureFleet/fleets/virtualMachineScaleSets" + }, + "operationStatus": { + "$id": "5274", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Creating" + }, + "error": { + "$id": "5275", + "kind": "model", + "type": { + "$ref": "1653" + }, + "value": { + "$id": "5276", + "details": { + "$id": "5277", + "kind": "array", + "type": { + "$ref": "1667" + }, + "value": [ + { + "$id": "5278", + "kind": "model", + "type": { + "$ref": "1668" + }, + "value": { + "$id": "5279", + "code": { + "$id": "5280", + "kind": "string", + "type": { + "$ref": "1670" + }, + "value": "gzhtOverconstrainedAllocationRequestyosk" + }, + "target": { + "$id": "5281", + "kind": "string", + "type": { + "$ref": "1674" + }, + "value": "qfthabhrmndhfizfnrwpgxvnokpy" + }, + "message": { + "$id": "5282", + "kind": "string", + "type": { + "$ref": "1678" + }, + "value": "Allocation Failed" + } + } + } + ] + }, + "innererror": { + "$id": "5283", + "kind": "model", + "type": { + "$ref": "1684" + }, + "value": { + "$id": "5284", + "exceptionType": { + "$id": "5285", + "kind": "string", + "type": { + "$ref": "1686" + }, + "value": "sfaomfpoaptnbxchrfskm" + }, + "errorDetail": { + "$id": "5286", + "kind": "string", + "type": { + "$ref": "1690" + }, + "value": "ihjwbwykq" + } + } + }, + "code": { + "$id": "5287", + "kind": "string", + "type": { + "$ref": "1655" + }, + "value": "OverconstrainedAllocationRequest" + }, + "target": { + "$id": "5288", + "kind": "string", + "type": { + "$ref": "1659" + }, + "value": "nhaj" + }, + "message": { + "$id": "5289", + "kind": "string", + "type": { + "$ref": "1663" + }, + "value": "Allocation Failed" + } + } + } + } + } + ] + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "5290", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "5291", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5292", + "name": "name", + "nameInRequest": "name", + "doc": "The name of the Fleet", + "type": { + "$id": "5293", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5294", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "5252" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "5295", + "type": { + "$id": "5296", + "kind": "array", + "name": "ArrayVirtualMachineScaleSet", + "valueType": { + "$ref": "1637" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "resultSegments": [ + "value" + ] + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.AzureFleet.Fleets.listVirtualMachineScaleSets" + } + ], + "parameters": [ + { + "$id": "5297", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "5298", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "location": "Uri", + "isApiVersion": false, + "isContentType": false, + "isRequired": true, + "isEndpoint": true, + "skipUrlEncoding": false, + "explode": false, + "kind": "Client", + "defaultValue": { + "$id": "5299", + "type": { + "$id": "5300", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "5301", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "5302" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.AzureFleet.Fleets", + "apiVersions": [ + "2023-11-01-preview", + "2024-05-01-preview", + "2024-11-01" + ], + "parent": { + "$ref": "1703" + } + } + ] + } + ], + "auth": { + "$id": "5303", + "oAuth2": { + "$id": "5304", + "scopes": [ + "user_impersonation" + ] + } + } +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/Configuration.json b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/Configuration.json new file mode 100644 index 000000000000..3ebb2db81a78 --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/Configuration.json @@ -0,0 +1,12 @@ +{ + "output-folder": ".", + "namespace": "Azure.ResourceManager.ComputeSchedule", + "library-name": "Azure.ResourceManager.ComputeSchedule", + "flavor": "azure", + "use-model-reader-writer": true, + "shared-source-folders": [ + "../../TempTypeSpecFiles/node_modules/@autorest/csharp/Generator.Shared", + "../../TempTypeSpecFiles/node_modules/@autorest/csharp/Azure.Core.Shared" + ], + "azure-arm": true +} diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/tsp-location.yaml b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/tsp-location.yaml index a1e8be2a82fb..6745168bc126 100644 --- a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/tsp-location.yaml +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/tsp-location.yaml @@ -1,3 +1,4 @@ directory: specification/computeschedule/ComputeSchedule.Management -commit: 462574dbd02088c209bb1da3eef0d93f699e8de2 -repo: Azure/azure-rest-api-specs \ No newline at end of file +commit: 1a8dcbc31c561409f253e5f7a924ff577b583da7 +repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/tspCodeModel.json b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/tspCodeModel.json new file mode 100644 index 000000000000..30c3fa0dede7 --- /dev/null +++ b/sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/tspCodeModel.json @@ -0,0 +1,9974 @@ +{ + "$id": "1", + "name": "Microsoft.ComputeSchedule", + "apiVersions": [ + "2024-10-01" + ], + "enums": [ + { + "$id": "2", + "kind": "enum", + "name": "Origin", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Origin", + "valueType": { + "$id": "3", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "4", + "kind": "enumvalue", + "name": "user", + "value": "user", + "valueType": { + "$id": "5", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "doc": "Indicates the operation is initiated by a user.", + "decorators": [] + }, + { + "$id": "6", + "kind": "enumvalue", + "name": "system", + "value": "system", + "valueType": { + "$id": "7", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "doc": "Indicates the operation is initiated by a system.", + "decorators": [] + }, + { + "$id": "8", + "kind": "enumvalue", + "name": "user,system", + "value": "user,system", + "valueType": { + "$id": "9", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "doc": "Indicates the operation is initiated by a user or system.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ComputeSchedule", + "doc": "The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\"", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "10", + "kind": "enum", + "name": "ActionType", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ActionType", + "valueType": { + "$id": "11", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "12", + "kind": "enumvalue", + "name": "Internal", + "value": "Internal", + "valueType": { + "$id": "13", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "10" + }, + "doc": "Actions are for internal-only APIs.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ComputeSchedule", + "doc": "Extensible enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "14", + "kind": "enum", + "name": "ScheduledActionDeadlineType", + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.DeadlineType", + "valueType": { + "$id": "15", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "16", + "kind": "enumvalue", + "name": "Unknown", + "value": "Unknown", + "valueType": { + "$id": "17", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "14" + }, + "doc": "Default value of Unknown.", + "decorators": [] + }, + { + "$id": "18", + "kind": "enumvalue", + "name": "InitiateAt", + "value": "InitiateAt", + "valueType": { + "$id": "19", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "14" + }, + "doc": "Initiate the operation at the given deadline.", + "decorators": [] + }, + { + "$id": "20", + "kind": "enumvalue", + "name": "CompleteBy", + "value": "CompleteBy", + "valueType": { + "$id": "21", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "14" + }, + "doc": "Complete the operation by the given deadline.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ComputeSchedule", + "doc": "The types of deadlines supported by ScheduledActions", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json", + "decorators": [] + }, + { + "$id": "22", + "kind": "enum", + "name": "ScheduledActionOptimizationPreference", + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.OptimizationPreference", + "valueType": { + "$id": "23", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "24", + "kind": "enumvalue", + "name": "Cost", + "value": "Cost", + "valueType": { + "$id": "25", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "22" + }, + "doc": "Optimize while considering cost savings", + "decorators": [] + }, + { + "$id": "26", + "kind": "enumvalue", + "name": "Availability", + "value": "Availability", + "valueType": { + "$id": "27", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "22" + }, + "doc": "Optimize while considering availability of resources", + "decorators": [] + }, + { + "$id": "28", + "kind": "enumvalue", + "name": "CostAvailabilityBalanced", + "value": "CostAvailabilityBalanced", + "valueType": { + "$id": "29", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "22" + }, + "doc": "Optimize while considering a balance of cost and availability", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ComputeSchedule", + "doc": "The preferences customers can select to optimize their requests to ScheduledActions", + "isFixed": false, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "30", + "kind": "enum", + "name": "ResourceOperationType", + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ResourceOperationType", + "valueType": { + "$id": "31", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "32", + "kind": "enumvalue", + "name": "Unknown", + "value": "Unknown", + "valueType": { + "$id": "33", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "30" + }, + "doc": "The default value for this enum type", + "decorators": [] + }, + { + "$id": "34", + "kind": "enumvalue", + "name": "Start", + "value": "Start", + "valueType": { + "$id": "35", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "30" + }, + "doc": "Start operations on the resources", + "decorators": [] + }, + { + "$id": "36", + "kind": "enumvalue", + "name": "Deallocate", + "value": "Deallocate", + "valueType": { + "$id": "37", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "30" + }, + "doc": "Deallocate operations on the resources", + "decorators": [] + }, + { + "$id": "38", + "kind": "enumvalue", + "name": "Hibernate", + "value": "Hibernate", + "valueType": { + "$id": "39", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "30" + }, + "doc": "Hibernate operations on the resources", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ComputeSchedule", + "doc": "The kind of operation types that can be performed on resources using ScheduledActions", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "40", + "kind": "enum", + "name": "ScheduledActionOperationState", + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.OperationState", + "valueType": { + "$id": "41", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "42", + "kind": "enumvalue", + "name": "Unknown", + "value": "Unknown", + "valueType": { + "$id": "43", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "40" + }, + "doc": "The default value for the operation state enum", + "decorators": [] + }, + { + "$id": "44", + "kind": "enumvalue", + "name": "PendingScheduling", + "value": "PendingScheduling", + "valueType": { + "$id": "45", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "40" + }, + "doc": "Operations that are pending scheduling", + "decorators": [] + }, + { + "$id": "46", + "kind": "enumvalue", + "name": "Scheduled", + "value": "Scheduled", + "valueType": { + "$id": "47", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "40" + }, + "doc": "Operations that have been scheduled", + "decorators": [] + }, + { + "$id": "48", + "kind": "enumvalue", + "name": "PendingExecution", + "value": "PendingExecution", + "valueType": { + "$id": "49", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "40" + }, + "doc": "Operations that are waiting to be executed", + "decorators": [] + }, + { + "$id": "50", + "kind": "enumvalue", + "name": "Executing", + "value": "Executing", + "valueType": { + "$id": "51", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "40" + }, + "doc": "Operations that are in the process of being executed", + "decorators": [] + }, + { + "$id": "52", + "kind": "enumvalue", + "name": "Succeeded", + "value": "Succeeded", + "valueType": { + "$id": "53", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "40" + }, + "doc": "Operations that suceeded", + "decorators": [] + }, + { + "$id": "54", + "kind": "enumvalue", + "name": "Failed", + "value": "Failed", + "valueType": { + "$id": "55", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "40" + }, + "doc": "Operations that have failed", + "decorators": [] + }, + { + "$id": "56", + "kind": "enumvalue", + "name": "Cancelled", + "value": "Cancelled", + "valueType": { + "$id": "57", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "40" + }, + "doc": "Operations that have been Cancelled by the user", + "decorators": [] + }, + { + "$id": "58", + "kind": "enumvalue", + "name": "Blocked", + "value": "Blocked", + "valueType": { + "$id": "59", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "40" + }, + "doc": "Operations that are blocked", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ComputeSchedule", + "doc": "Values that define the states of operations in Scheduled Actions", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "60", + "kind": "enum", + "name": "Versions", + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.Versions", + "valueType": { + "$id": "61", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "62", + "kind": "enumvalue", + "name": "2024-10-01", + "value": "2024-10-01", + "valueType": { + "$id": "63", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "60" + }, + "doc": "2024-10-01 version", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ComputeSchedule", + "doc": "ComputeSchedule API versions", + "isFixed": true, + "isFlags": false, + "usage": "ApiVersionEnum", + "decorators": [] + } + ], + "models": [ + { + "$id": "64", + "kind": "model", + "name": "OperationListResult", + "namespace": "Azure.ResourceManager.ComputeSchedule", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationListResult", + "usage": "Output,Json", + "doc": "A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.", + "decorators": [], + "properties": [ + { + "$id": "65", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The Operation items on this page", + "type": { + "$id": "66", + "kind": "array", + "name": "ArrayOperation", + "valueType": { + "$id": "67", + "kind": "model", + "name": "Operation", + "namespace": "Azure.ResourceManager.ComputeSchedule", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation", + "usage": "Output,Json", + "doc": "Details of a REST API operation, returned from the Resource Provider Operations API", + "decorators": [], + "properties": [ + { + "$id": "68", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the operation, as per Resource-Based Access Control (RBAC). Examples: \"Microsoft.Compute/virtualMachines/write\", \"Microsoft.Compute/virtualMachines/capture/action\"", + "type": { + "$id": "69", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.name", + "serializationOptions": { + "$id": "70", + "json": { + "$id": "71", + "name": "name" + } + } + }, + { + "$id": "72", + "kind": "property", + "name": "isDataAction", + "serializedName": "isDataAction", + "doc": "Whether the operation applies to data-plane. This is \"true\" for data-plane operations and \"false\" for Azure Resource Manager/control-plane operations.", + "type": { + "$id": "73", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.isDataAction", + "serializationOptions": { + "$id": "74", + "json": { + "$id": "75", + "name": "isDataAction" + } + } + }, + { + "$id": "76", + "kind": "property", + "name": "display", + "serializedName": "display", + "doc": "Localized display information for this particular operation.", + "type": { + "$id": "77", + "kind": "model", + "name": "OperationDisplay", + "namespace": "Azure.ResourceManager.ComputeSchedule", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay", + "usage": "Output,Json", + "doc": "Localized display information for and operation.", + "decorators": [], + "properties": [ + { + "$id": "78", + "kind": "property", + "name": "provider", + "serializedName": "provider", + "doc": "The localized friendly form of the resource provider name, e.g. \"Microsoft Monitoring Insights\" or \"Microsoft Compute\".", + "type": { + "$id": "79", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay.provider", + "serializationOptions": { + "$id": "80", + "json": { + "$id": "81", + "name": "provider" + } + } + }, + { + "$id": "82", + "kind": "property", + "name": "resource", + "serializedName": "resource", + "doc": "The localized friendly name of the resource type related to this operation. E.g. \"Virtual Machines\" or \"Job Schedule Collections\".", + "type": { + "$id": "83", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay.resource", + "serializationOptions": { + "$id": "84", + "json": { + "$id": "85", + "name": "resource" + } + } + }, + { + "$id": "86", + "kind": "property", + "name": "operation", + "serializedName": "operation", + "doc": "The concise, localized friendly name for the operation; suitable for dropdowns. E.g. \"Create or Update Virtual Machine\", \"Restart Virtual Machine\".", + "type": { + "$id": "87", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay.operation", + "serializationOptions": { + "$id": "88", + "json": { + "$id": "89", + "name": "operation" + } + } + }, + { + "$id": "90", + "kind": "property", + "name": "description", + "serializedName": "description", + "doc": "The short, localized friendly description of the operation; suitable for tool tips and detailed views.", + "type": { + "$id": "91", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay.description", + "serializationOptions": { + "$id": "92", + "json": { + "$id": "93", + "name": "description" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.display", + "serializationOptions": { + "$id": "94", + "json": { + "$id": "95", + "name": "display" + } + } + }, + { + "$id": "96", + "kind": "property", + "name": "origin", + "serializedName": "origin", + "doc": "The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\"", + "type": { + "$ref": "2" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.origin", + "serializationOptions": { + "$id": "97", + "json": { + "$id": "98", + "name": "origin" + } + } + }, + { + "$id": "99", + "kind": "property", + "name": "actionType", + "serializedName": "actionType", + "doc": "Extensible enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs.", + "type": { + "$ref": "10" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.actionType", + "serializationOptions": { + "$id": "100", + "json": { + "$id": "101", + "name": "actionType" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationListResult.value", + "serializationOptions": { + "$id": "102", + "json": { + "$id": "103", + "name": "value" + } + } + }, + { + "$id": "104", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "105", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "106", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationListResult.nextLink", + "serializationOptions": { + "$id": "107", + "json": { + "$id": "108", + "name": "nextLink" + } + } + } + ] + }, + { + "$ref": "67" + }, + { + "$ref": "77" + }, + { + "$id": "109", + "kind": "model", + "name": "ErrorResponse", + "namespace": "Azure.ResourceManager.ComputeSchedule", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorResponse", + "usage": "Json,Exception", + "doc": "Common error response for all Azure Resource Manager APIs to return error details for failed operations.", + "decorators": [], + "properties": [ + { + "$id": "110", + "kind": "property", + "name": "error", + "serializedName": "error", + "doc": "The error object.", + "type": { + "$id": "111", + "kind": "model", + "name": "ErrorDetail", + "namespace": "Azure.ResourceManager.ComputeSchedule", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail", + "usage": "Json,Exception", + "doc": "The error detail.", + "decorators": [], + "properties": [ + { + "$id": "112", + "kind": "property", + "name": "code", + "serializedName": "code", + "doc": "The error code.", + "type": { + "$id": "113", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.code", + "serializationOptions": { + "$id": "114", + "json": { + "$id": "115", + "name": "code" + } + } + }, + { + "$id": "116", + "kind": "property", + "name": "message", + "serializedName": "message", + "doc": "The error message.", + "type": { + "$id": "117", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.message", + "serializationOptions": { + "$id": "118", + "json": { + "$id": "119", + "name": "message" + } + } + }, + { + "$id": "120", + "kind": "property", + "name": "target", + "serializedName": "target", + "doc": "The error target.", + "type": { + "$id": "121", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.target", + "serializationOptions": { + "$id": "122", + "json": { + "$id": "123", + "name": "target" + } + } + }, + { + "$id": "124", + "kind": "property", + "name": "details", + "serializedName": "details", + "doc": "The error details.", + "type": { + "$id": "125", + "kind": "array", + "name": "ArrayErrorDetail", + "valueType": { + "$ref": "111" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.details", + "serializationOptions": { + "$id": "126", + "json": { + "$id": "127", + "name": "details" + } + } + }, + { + "$id": "128", + "kind": "property", + "name": "additionalInfo", + "serializedName": "additionalInfo", + "doc": "The error additional info.", + "type": { + "$id": "129", + "kind": "array", + "name": "ArrayErrorAdditionalInfo", + "valueType": { + "$id": "130", + "kind": "model", + "name": "ErrorAdditionalInfo", + "namespace": "Azure.ResourceManager.ComputeSchedule", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo", + "usage": "Json,Exception", + "doc": "The resource management error additional info.", + "decorators": [], + "properties": [ + { + "$id": "131", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The additional info type.", + "type": { + "$id": "132", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo.type", + "serializationOptions": { + "$id": "133", + "json": { + "$id": "134", + "name": "type" + } + } + }, + { + "$id": "135", + "kind": "property", + "name": "info", + "serializedName": "info", + "doc": "The additional info.", + "type": { + "$id": "136", + "kind": "model", + "name": "ErrorAdditionalInfoInfo", + "namespace": "Azure.ResourceManager.ComputeSchedule", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo.info.anonymous", + "usage": "Json,Exception", + "decorators": [], + "properties": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo.info", + "serializationOptions": { + "$id": "137", + "json": { + "$id": "138", + "name": "info" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.additionalInfo", + "serializationOptions": { + "$id": "139", + "json": { + "$id": "140", + "name": "additionalInfo" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorResponse.error", + "serializationOptions": { + "$id": "141", + "json": { + "$id": "142", + "name": "error" + } + } + } + ] + }, + { + "$ref": "111" + }, + { + "$ref": "130" + }, + { + "$ref": "136" + }, + { + "$id": "143", + "kind": "model", + "name": "SubmitDeallocateRequest", + "namespace": "Azure.ResourceManager.ComputeSchedule", + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.SubmitDeallocateRequest", + "usage": "Input,Json", + "doc": "The deallocate request for resources", + "decorators": [], + "properties": [ + { + "$id": "144", + "kind": "property", + "name": "schedule", + "serializedName": "schedule", + "doc": "The schedule for the request", + "type": { + "$id": "145", + "kind": "model", + "name": "UserRequestSchedule", + "namespace": "Azure.ResourceManager.ComputeSchedule", + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.Schedule", + "usage": "Input,Json", + "doc": "The schedule details for the user request", + "decorators": [], + "properties": [ + { + "$id": "146", + "kind": "property", + "name": "deadline", + "serializedName": "deadline", + "doc": "The deadline for the operation", + "type": { + "$id": "147", + "kind": "offsetDateTime", + "name": "offsetDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "148", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.offsetDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.Schedule.deadline", + "serializationOptions": { + "$id": "149", + "json": { + "$id": "150", + "name": "deadline" + } + } + }, + { + "$id": "151", + "kind": "property", + "name": "userRequestDeadline", + "serializedName": "deadLine", + "doc": "The deadline for the operation", + "type": { + "$id": "152", + "kind": "offsetDateTime", + "name": "offsetDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "153", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.offsetDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.Schedule.deadLine", + "serializationOptions": { + "$id": "154", + "json": { + "$id": "155", + "name": "deadLine" + } + } + }, + { + "$id": "156", + "kind": "property", + "name": "timezone", + "serializedName": "timezone", + "doc": "The timezone for the operation", + "type": { + "$id": "157", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.Schedule.timezone", + "serializationOptions": { + "$id": "158", + "json": { + "$id": "159", + "name": "timezone" + } + } + }, + { + "$id": "160", + "kind": "property", + "name": "userRequestTimezone", + "serializedName": "timeZone", + "doc": "The timezone for the operation", + "type": { + "$id": "161", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.Schedule.timeZone", + "serializationOptions": { + "$id": "162", + "json": { + "$id": "163", + "name": "timeZone" + } + } + }, + { + "$id": "164", + "kind": "property", + "name": "deadlineType", + "serializedName": "deadlineType", + "doc": "The deadlinetype of the operation, this can either be InitiateAt or CompleteBy", + "type": { + "$ref": "14" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.Schedule.deadlineType", + "serializationOptions": { + "$id": "165", + "json": { + "$id": "166", + "name": "deadlineType" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.SubmitDeallocateRequest.schedule", + "serializationOptions": { + "$id": "167", + "json": { + "$id": "168", + "name": "schedule" + } + } + }, + { + "$id": "169", + "kind": "property", + "name": "executionParameters", + "serializedName": "executionParameters", + "doc": "The execution parameters for the request", + "type": { + "$id": "170", + "kind": "model", + "name": "ScheduledActionExecutionParameterDetail", + "namespace": "Azure.ResourceManager.ComputeSchedule", + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ExecutionParameters", + "usage": "Input,Json", + "doc": "Extra details needed to run the user's request", + "decorators": [], + "properties": [ + { + "$id": "171", + "kind": "property", + "name": "optimizationPreference", + "serializedName": "optimizationPreference", + "doc": "Details that could optimize the user's request", + "type": { + "$ref": "22" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ExecutionParameters.optimizationPreference", + "serializationOptions": { + "$id": "172", + "json": { + "$id": "173", + "name": "optimizationPreference" + } + } + }, + { + "$id": "174", + "kind": "property", + "name": "retryPolicy", + "serializedName": "retryPolicy", + "doc": "Retry policy the user can pass", + "type": { + "$id": "175", + "kind": "model", + "name": "UserRequestRetryPolicy", + "namespace": "Azure.ResourceManager.ComputeSchedule", + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.RetryPolicy", + "usage": "Input,Output,Json", + "doc": "The retry policy for the user request", + "decorators": [], + "properties": [ + { + "$id": "176", + "kind": "property", + "name": "retryCount", + "serializedName": "retryCount", + "doc": "Retry count for user request", + "type": { + "$id": "177", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.RetryPolicy.retryCount", + "serializationOptions": { + "$id": "178", + "json": { + "$id": "179", + "name": "retryCount" + } + } + }, + { + "$id": "180", + "kind": "property", + "name": "retryWindowInMinutes", + "serializedName": "retryWindowInMinutes", + "doc": "Retry window in minutes for user request", + "type": { + "$id": "181", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.RetryPolicy.retryWindowInMinutes", + "serializationOptions": { + "$id": "182", + "json": { + "$id": "183", + "name": "retryWindowInMinutes" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ExecutionParameters.retryPolicy", + "serializationOptions": { + "$id": "184", + "json": { + "$id": "185", + "name": "retryPolicy" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.SubmitDeallocateRequest.executionParameters", + "serializationOptions": { + "$id": "186", + "json": { + "$id": "187", + "name": "executionParameters" + } + } + }, + { + "$id": "188", + "kind": "property", + "name": "resources", + "serializedName": "resources", + "doc": "The resources for the request", + "type": { + "$id": "189", + "kind": "model", + "name": "UserRequestResources", + "namespace": "Azure.ResourceManager.ComputeSchedule", + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.Resources", + "usage": "Input,Json", + "doc": "The resources needed for the user request", + "decorators": [], + "properties": [ + { + "$id": "190", + "kind": "property", + "name": "ids", + "serializedName": "ids", + "doc": "The resource ids used for the request", + "type": { + "$id": "191", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "192", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "193", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.Resources.ids", + "serializationOptions": { + "$id": "194", + "json": { + "$id": "195", + "name": "ids" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.SubmitDeallocateRequest.resources", + "serializationOptions": { + "$id": "196", + "json": { + "$id": "197", + "name": "resources" + } + } + }, + { + "$id": "198", + "kind": "property", + "name": "correlationId", + "serializedName": "correlationid", + "doc": "CorrelationId item", + "type": { + "$id": "199", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.SubmitDeallocateRequest.correlationid", + "serializationOptions": { + "$id": "200", + "json": { + "$id": "201", + "name": "correlationid" + } + } + } + ] + }, + { + "$ref": "145" + }, + { + "$ref": "170" + }, + { + "$ref": "175" + }, + { + "$ref": "189" + }, + { + "$id": "202", + "kind": "model", + "name": "DeallocateResourceOperationResult", + "namespace": "Azure.ResourceManager.ComputeSchedule", + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.DeallocateResourceOperationResponse", + "usage": "Output,Json", + "doc": "The response from a deallocate request", + "decorators": [], + "properties": [ + { + "$id": "203", + "kind": "property", + "name": "description", + "serializedName": "description", + "doc": "The description of the operation response", + "type": { + "$id": "204", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.DeallocateResourceOperationResponse.description", + "serializationOptions": { + "$id": "205", + "json": { + "$id": "206", + "name": "description" + } + } + }, + { + "$id": "207", + "kind": "property", + "name": "ResourceType", + "serializedName": "type", + "doc": "The type of resources used in the deallocate request eg virtual machines", + "type": { + "$id": "208", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.DeallocateResourceOperationResponse.type", + "serializationOptions": { + "$id": "209", + "json": { + "$id": "210", + "name": "type" + } + } + }, + { + "$id": "211", + "kind": "property", + "name": "location", + "serializedName": "location", + "doc": "The location of the deallocate request eg westus", + "type": { + "$id": "212", + "kind": "string", + "name": "azureLocation", + "crossLanguageDefinitionId": "Azure.Core.azureLocation", + "baseType": { + "$id": "213", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.DeallocateResourceOperationResponse.location", + "serializationOptions": { + "$id": "214", + "json": { + "$id": "215", + "name": "location" + } + } + }, + { + "$id": "216", + "kind": "property", + "name": "results", + "serializedName": "results", + "doc": "The results from the deallocate request if no errors exist", + "type": { + "$id": "217", + "kind": "array", + "name": "ArrayResourceOperation", + "valueType": { + "$id": "218", + "kind": "model", + "name": "ResourceOperationResult", + "namespace": "Azure.ResourceManager.ComputeSchedule", + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ResourceOperation", + "usage": "Output,Json", + "doc": "High level response from an operation on a resource", + "decorators": [], + "properties": [ + { + "$id": "219", + "kind": "property", + "name": "resourceId", + "serializedName": "resourceId", + "doc": "Unique identifier for the resource involved in the operation, eg ArmId", + "type": { + "$id": "220", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "221", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ResourceOperation.resourceId", + "serializationOptions": { + "$id": "222", + "json": { + "$id": "223", + "name": "resourceId" + } + } + }, + { + "$id": "224", + "kind": "property", + "name": "errorCode", + "serializedName": "errorCode", + "doc": "Resource level error code if it exists", + "type": { + "$id": "225", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ResourceOperation.errorCode", + "serializationOptions": { + "$id": "226", + "json": { + "$id": "227", + "name": "errorCode" + } + } + }, + { + "$id": "228", + "kind": "property", + "name": "errorDetails", + "serializedName": "errorDetails", + "doc": "Resource level error details if they exist", + "type": { + "$id": "229", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ResourceOperation.errorDetails", + "serializationOptions": { + "$id": "230", + "json": { + "$id": "231", + "name": "errorDetails" + } + } + }, + { + "$id": "232", + "kind": "property", + "name": "operation", + "serializedName": "operation", + "doc": "Details of the operation performed on a resource", + "type": { + "$id": "233", + "kind": "model", + "name": "ResourceOperationDetails", + "namespace": "Azure.ResourceManager.ComputeSchedule", + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ResourceOperationDetails", + "usage": "Output,Json", + "doc": "The details of a response from an operation on a resource", + "decorators": [], + "properties": [ + { + "$id": "234", + "kind": "property", + "name": "operationId", + "serializedName": "operationId", + "doc": "Operation identifier for the unique operation", + "type": { + "$id": "235", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ResourceOperationDetails.operationId", + "serializationOptions": { + "$id": "236", + "json": { + "$id": "237", + "name": "operationId" + } + } + }, + { + "$id": "238", + "kind": "property", + "name": "resourceId", + "serializedName": "resourceId", + "doc": "Unique identifier for the resource involved in the operation, eg ArmId", + "type": { + "$id": "239", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "240", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ResourceOperationDetails.resourceId", + "serializationOptions": { + "$id": "241", + "json": { + "$id": "242", + "name": "resourceId" + } + } + }, + { + "$id": "243", + "kind": "property", + "name": "opType", + "serializedName": "opType", + "doc": "Type of operation performed on the resources", + "type": { + "$ref": "30" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ResourceOperationDetails.opType", + "serializationOptions": { + "$id": "244", + "json": { + "$id": "245", + "name": "opType" + } + } + }, + { + "$id": "246", + "kind": "property", + "name": "subscriptionId", + "serializedName": "subscriptionId", + "doc": "Subscription id attached to the request", + "type": { + "$id": "247", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ResourceOperationDetails.subscriptionId", + "serializationOptions": { + "$id": "248", + "json": { + "$id": "249", + "name": "subscriptionId" + } + } + }, + { + "$id": "250", + "kind": "property", + "name": "deadline", + "serializedName": "deadline", + "doc": "Deadline for the operation", + "type": { + "$id": "251", + "kind": "offsetDateTime", + "name": "offsetDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "252", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.offsetDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ResourceOperationDetails.deadline", + "serializationOptions": { + "$id": "253", + "json": { + "$id": "254", + "name": "deadline" + } + } + }, + { + "$id": "255", + "kind": "property", + "name": "deadlineType", + "serializedName": "deadlineType", + "doc": "Type of deadline of the operation", + "type": { + "$ref": "14" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ResourceOperationDetails.deadlineType", + "serializationOptions": { + "$id": "256", + "json": { + "$id": "257", + "name": "deadlineType" + } + } + }, + { + "$id": "258", + "kind": "property", + "name": "state", + "serializedName": "state", + "doc": "Current state of the operation", + "type": { + "$ref": "40" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ResourceOperationDetails.state", + "serializationOptions": { + "$id": "259", + "json": { + "$id": "260", + "name": "state" + } + } + }, + { + "$id": "261", + "kind": "property", + "name": "timezone", + "serializedName": "timezone", + "doc": "Timezone for the operation", + "type": { + "$id": "262", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ResourceOperationDetails.timezone", + "serializationOptions": { + "$id": "263", + "json": { + "$id": "264", + "name": "timezone" + } + } + }, + { + "$id": "265", + "kind": "property", + "name": "operationTimezone", + "serializedName": "timeZone", + "doc": "Timezone for the operation", + "type": { + "$id": "266", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ResourceOperationDetails.timeZone", + "serializationOptions": { + "$id": "267", + "json": { + "$id": "268", + "name": "timeZone" + } + } + }, + { + "$id": "269", + "kind": "property", + "name": "resourceOperationError", + "serializedName": "resourceOperationError", + "doc": "Operation level errors if they exist", + "type": { + "$id": "270", + "kind": "model", + "name": "ResourceOperationError", + "namespace": "Azure.ResourceManager.ComputeSchedule", + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ResourceOperationError", + "usage": "Output,Json", + "doc": "These describe errors that occur at the resource level", + "decorators": [], + "properties": [ + { + "$id": "271", + "kind": "property", + "name": "errorCode", + "serializedName": "errorCode", + "doc": "Code for the error eg 404, 500", + "type": { + "$id": "272", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ResourceOperationError.errorCode", + "serializationOptions": { + "$id": "273", + "json": { + "$id": "274", + "name": "errorCode" + } + } + }, + { + "$id": "275", + "kind": "property", + "name": "errorDetails", + "serializedName": "errorDetails", + "doc": "Detailed message about the error", + "type": { + "$id": "276", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ResourceOperationError.errorDetails", + "serializationOptions": { + "$id": "277", + "json": { + "$id": "278", + "name": "errorDetails" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ResourceOperationDetails.resourceOperationError", + "serializationOptions": { + "$id": "279", + "json": { + "$id": "280", + "name": "resourceOperationError" + } + } + }, + { + "$id": "281", + "kind": "property", + "name": "completedAt", + "serializedName": "completedAt", + "doc": "Time the operation was complete if errors are null", + "type": { + "$id": "282", + "kind": "offsetDateTime", + "name": "offsetDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "283", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.offsetDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ResourceOperationDetails.completedAt", + "serializationOptions": { + "$id": "284", + "json": { + "$id": "285", + "name": "completedAt" + } + } + }, + { + "$id": "286", + "kind": "property", + "name": "retryPolicy", + "serializedName": "retryPolicy", + "doc": "Retry policy the user can pass", + "type": { + "$ref": "175" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ResourceOperationDetails.retryPolicy", + "serializationOptions": { + "$id": "287", + "json": { + "$id": "288", + "name": "retryPolicy" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ResourceOperation.operation", + "serializationOptions": { + "$id": "289", + "json": { + "$id": "290", + "name": "operation" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.DeallocateResourceOperationResponse.results", + "serializationOptions": { + "$id": "291", + "json": { + "$id": "292", + "name": "results" + } + } + } + ] + }, + { + "$ref": "218" + }, + { + "$ref": "233" + }, + { + "$ref": "270" + }, + { + "$id": "293", + "kind": "model", + "name": "SubmitHibernateRequest", + "namespace": "Azure.ResourceManager.ComputeSchedule", + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.SubmitHibernateRequest", + "usage": "Input,Json", + "doc": "This is the request for hibernate", + "decorators": [], + "properties": [ + { + "$id": "294", + "kind": "property", + "name": "schedule", + "serializedName": "schedule", + "doc": "The schedule for the request", + "type": { + "$ref": "145" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.SubmitHibernateRequest.schedule", + "serializationOptions": { + "$id": "295", + "json": { + "$id": "296", + "name": "schedule" + } + } + }, + { + "$id": "297", + "kind": "property", + "name": "executionParameters", + "serializedName": "executionParameters", + "doc": "The execution parameters for the request", + "type": { + "$ref": "170" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.SubmitHibernateRequest.executionParameters", + "serializationOptions": { + "$id": "298", + "json": { + "$id": "299", + "name": "executionParameters" + } + } + }, + { + "$id": "300", + "kind": "property", + "name": "resources", + "serializedName": "resources", + "doc": "The resources for the request", + "type": { + "$ref": "189" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.SubmitHibernateRequest.resources", + "serializationOptions": { + "$id": "301", + "json": { + "$id": "302", + "name": "resources" + } + } + }, + { + "$id": "303", + "kind": "property", + "name": "correlationId", + "serializedName": "correlationid", + "doc": "CorrelationId item", + "type": { + "$id": "304", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.SubmitHibernateRequest.correlationid", + "serializationOptions": { + "$id": "305", + "json": { + "$id": "306", + "name": "correlationid" + } + } + } + ] + }, + { + "$id": "307", + "kind": "model", + "name": "HibernateResourceOperationResult", + "namespace": "Azure.ResourceManager.ComputeSchedule", + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.HibernateResourceOperationResponse", + "usage": "Output,Json", + "doc": "The response from a Hibernate request", + "decorators": [], + "properties": [ + { + "$id": "308", + "kind": "property", + "name": "description", + "serializedName": "description", + "doc": "The description of the operation response", + "type": { + "$id": "309", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.HibernateResourceOperationResponse.description", + "serializationOptions": { + "$id": "310", + "json": { + "$id": "311", + "name": "description" + } + } + }, + { + "$id": "312", + "kind": "property", + "name": "ResourceType", + "serializedName": "type", + "doc": "The type of resources used in the Hibernate request eg virtual machines", + "type": { + "$id": "313", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.HibernateResourceOperationResponse.type", + "serializationOptions": { + "$id": "314", + "json": { + "$id": "315", + "name": "type" + } + } + }, + { + "$id": "316", + "kind": "property", + "name": "location", + "serializedName": "location", + "doc": "The location of the Hibernate request eg westus", + "type": { + "$id": "317", + "kind": "string", + "name": "azureLocation", + "crossLanguageDefinitionId": "Azure.Core.azureLocation", + "baseType": { + "$id": "318", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.HibernateResourceOperationResponse.location", + "serializationOptions": { + "$id": "319", + "json": { + "$id": "320", + "name": "location" + } + } + }, + { + "$id": "321", + "kind": "property", + "name": "results", + "serializedName": "results", + "doc": "The results from the Hibernate request if no errors exist", + "type": { + "$id": "322", + "kind": "array", + "name": "ArrayResourceOperation", + "valueType": { + "$ref": "218" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.HibernateResourceOperationResponse.results", + "serializationOptions": { + "$id": "323", + "json": { + "$id": "324", + "name": "results" + } + } + } + ] + }, + { + "$id": "325", + "kind": "model", + "name": "SubmitStartRequest", + "namespace": "Azure.ResourceManager.ComputeSchedule", + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.SubmitStartRequest", + "usage": "Input,Json", + "doc": "This is the request for start", + "decorators": [], + "properties": [ + { + "$id": "326", + "kind": "property", + "name": "schedule", + "serializedName": "schedule", + "doc": "The schedule for the request", + "type": { + "$ref": "145" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.SubmitStartRequest.schedule", + "serializationOptions": { + "$id": "327", + "json": { + "$id": "328", + "name": "schedule" + } + } + }, + { + "$id": "329", + "kind": "property", + "name": "executionParameters", + "serializedName": "executionParameters", + "doc": "The execution parameters for the request", + "type": { + "$ref": "170" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.SubmitStartRequest.executionParameters", + "serializationOptions": { + "$id": "330", + "json": { + "$id": "331", + "name": "executionParameters" + } + } + }, + { + "$id": "332", + "kind": "property", + "name": "resources", + "serializedName": "resources", + "doc": "The resources for the request", + "type": { + "$ref": "189" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.SubmitStartRequest.resources", + "serializationOptions": { + "$id": "333", + "json": { + "$id": "334", + "name": "resources" + } + } + }, + { + "$id": "335", + "kind": "property", + "name": "correlationId", + "serializedName": "correlationid", + "doc": "CorrelationId item", + "type": { + "$id": "336", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.SubmitStartRequest.correlationid", + "serializationOptions": { + "$id": "337", + "json": { + "$id": "338", + "name": "correlationid" + } + } + } + ] + }, + { + "$id": "339", + "kind": "model", + "name": "StartResourceOperationResult", + "namespace": "Azure.ResourceManager.ComputeSchedule", + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.StartResourceOperationResponse", + "usage": "Output,Json", + "doc": "The response from a start request", + "decorators": [], + "properties": [ + { + "$id": "340", + "kind": "property", + "name": "description", + "serializedName": "description", + "doc": "The description of the operation response", + "type": { + "$id": "341", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.StartResourceOperationResponse.description", + "serializationOptions": { + "$id": "342", + "json": { + "$id": "343", + "name": "description" + } + } + }, + { + "$id": "344", + "kind": "property", + "name": "ResourceType", + "serializedName": "type", + "doc": "The type of resources used in the start request eg virtual machines", + "type": { + "$id": "345", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.StartResourceOperationResponse.type", + "serializationOptions": { + "$id": "346", + "json": { + "$id": "347", + "name": "type" + } + } + }, + { + "$id": "348", + "kind": "property", + "name": "location", + "serializedName": "location", + "doc": "The location of the start request eg westus", + "type": { + "$id": "349", + "kind": "string", + "name": "azureLocation", + "crossLanguageDefinitionId": "Azure.Core.azureLocation", + "baseType": { + "$id": "350", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.StartResourceOperationResponse.location", + "serializationOptions": { + "$id": "351", + "json": { + "$id": "352", + "name": "location" + } + } + }, + { + "$id": "353", + "kind": "property", + "name": "results", + "serializedName": "results", + "doc": "The results from the start request if no errors exist", + "type": { + "$id": "354", + "kind": "array", + "name": "ArrayResourceOperation", + "valueType": { + "$ref": "218" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.StartResourceOperationResponse.results", + "serializationOptions": { + "$id": "355", + "json": { + "$id": "356", + "name": "results" + } + } + } + ] + }, + { + "$id": "357", + "kind": "model", + "name": "ExecuteDeallocateRequest", + "namespace": "Azure.ResourceManager.ComputeSchedule", + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ExecuteDeallocateRequest", + "usage": "Input,Json", + "doc": "The ExecuteDeallocateRequest request for executeDeallocate operations", + "decorators": [], + "properties": [ + { + "$id": "358", + "kind": "property", + "name": "executionParameters", + "serializedName": "executionParameters", + "doc": "The execution parameters for the request", + "type": { + "$ref": "170" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ExecuteDeallocateRequest.executionParameters", + "serializationOptions": { + "$id": "359", + "json": { + "$id": "360", + "name": "executionParameters" + } + } + }, + { + "$id": "361", + "kind": "property", + "name": "resources", + "serializedName": "resources", + "doc": "The resources for the request", + "type": { + "$ref": "189" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ExecuteDeallocateRequest.resources", + "serializationOptions": { + "$id": "362", + "json": { + "$id": "363", + "name": "resources" + } + } + }, + { + "$id": "364", + "kind": "property", + "name": "correlationId", + "serializedName": "correlationid", + "doc": "CorrelationId item", + "type": { + "$id": "365", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ExecuteDeallocateRequest.correlationid", + "serializationOptions": { + "$id": "366", + "json": { + "$id": "367", + "name": "correlationid" + } + } + } + ] + }, + { + "$id": "368", + "kind": "model", + "name": "ExecuteHibernateRequest", + "namespace": "Azure.ResourceManager.ComputeSchedule", + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ExecuteHibernateRequest", + "usage": "Input,Json", + "doc": "The ExecuteHibernateRequest request for executeHibernate operations", + "decorators": [], + "properties": [ + { + "$id": "369", + "kind": "property", + "name": "executionParameters", + "serializedName": "executionParameters", + "doc": "The execution parameters for the request", + "type": { + "$ref": "170" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ExecuteHibernateRequest.executionParameters", + "serializationOptions": { + "$id": "370", + "json": { + "$id": "371", + "name": "executionParameters" + } + } + }, + { + "$id": "372", + "kind": "property", + "name": "resources", + "serializedName": "resources", + "doc": "The resources for the request", + "type": { + "$ref": "189" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ExecuteHibernateRequest.resources", + "serializationOptions": { + "$id": "373", + "json": { + "$id": "374", + "name": "resources" + } + } + }, + { + "$id": "375", + "kind": "property", + "name": "correlationId", + "serializedName": "correlationid", + "doc": "CorrelationId item", + "type": { + "$id": "376", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ExecuteHibernateRequest.correlationid", + "serializationOptions": { + "$id": "377", + "json": { + "$id": "378", + "name": "correlationid" + } + } + } + ] + }, + { + "$id": "379", + "kind": "model", + "name": "ExecuteStartRequest", + "namespace": "Azure.ResourceManager.ComputeSchedule", + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ExecuteStartRequest", + "usage": "Input,Json", + "doc": "The ExecuteStartRequest request for executeStart operations", + "decorators": [], + "properties": [ + { + "$id": "380", + "kind": "property", + "name": "executionParameters", + "serializedName": "executionParameters", + "doc": "The execution parameters for the request", + "type": { + "$ref": "170" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ExecuteStartRequest.executionParameters", + "serializationOptions": { + "$id": "381", + "json": { + "$id": "382", + "name": "executionParameters" + } + } + }, + { + "$id": "383", + "kind": "property", + "name": "resources", + "serializedName": "resources", + "doc": "The resources for the request", + "type": { + "$ref": "189" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ExecuteStartRequest.resources", + "serializationOptions": { + "$id": "384", + "json": { + "$id": "385", + "name": "resources" + } + } + }, + { + "$id": "386", + "kind": "property", + "name": "correlationId", + "serializedName": "correlationid", + "doc": "CorrelationId item", + "type": { + "$id": "387", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ExecuteStartRequest.correlationid", + "serializationOptions": { + "$id": "388", + "json": { + "$id": "389", + "name": "correlationid" + } + } + } + ] + }, + { + "$id": "390", + "kind": "model", + "name": "GetOperationStatusRequest", + "namespace": "Azure.ResourceManager.ComputeSchedule", + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.GetOperationStatusRequest", + "usage": "Input,Json", + "doc": "This is the request to get operation status using operationids", + "decorators": [], + "properties": [ + { + "$id": "391", + "kind": "property", + "name": "operationIds", + "serializedName": "operationIds", + "doc": "The list of operation ids to get the status of", + "type": { + "$id": "392", + "kind": "array", + "name": "Array1", + "valueType": { + "$id": "393", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.GetOperationStatusRequest.operationIds", + "serializationOptions": { + "$id": "394", + "json": { + "$id": "395", + "name": "operationIds" + } + } + }, + { + "$id": "396", + "kind": "property", + "name": "correlationId", + "serializedName": "correlationid", + "doc": "CorrelationId item", + "type": { + "$id": "397", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.GetOperationStatusRequest.correlationid", + "serializationOptions": { + "$id": "398", + "json": { + "$id": "399", + "name": "correlationid" + } + } + } + ] + }, + { + "$id": "400", + "kind": "model", + "name": "GetOperationStatusResult", + "namespace": "Azure.ResourceManager.ComputeSchedule", + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.GetOperationStatusResponse", + "usage": "Output,Json", + "doc": "This is the response from a get operations status request", + "decorators": [], + "properties": [ + { + "$id": "401", + "kind": "property", + "name": "results", + "serializedName": "results", + "doc": "An array of resource operations based on their operation ids", + "type": { + "$id": "402", + "kind": "array", + "name": "ArrayResourceOperation", + "valueType": { + "$ref": "218" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.GetOperationStatusResponse.results", + "serializationOptions": { + "$id": "403", + "json": { + "$id": "404", + "name": "results" + } + } + } + ] + }, + { + "$id": "405", + "kind": "model", + "name": "CancelOperationsRequest", + "namespace": "Azure.ResourceManager.ComputeSchedule", + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.CancelOperationsRequest", + "usage": "Input,Json", + "doc": "This is the request to cancel running operations in scheduled actions using the operation ids", + "decorators": [], + "properties": [ + { + "$id": "406", + "kind": "property", + "name": "operationIds", + "serializedName": "operationIds", + "doc": "The list of operation ids to cancel operations on", + "type": { + "$id": "407", + "kind": "array", + "name": "Array1", + "valueType": { + "$id": "408", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.CancelOperationsRequest.operationIds", + "serializationOptions": { + "$id": "409", + "json": { + "$id": "410", + "name": "operationIds" + } + } + }, + { + "$id": "411", + "kind": "property", + "name": "correlationId", + "serializedName": "correlationid", + "doc": "CorrelationId item", + "type": { + "$id": "412", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.CancelOperationsRequest.correlationid", + "serializationOptions": { + "$id": "413", + "json": { + "$id": "414", + "name": "correlationid" + } + } + } + ] + }, + { + "$id": "415", + "kind": "model", + "name": "CancelOperationsResult", + "namespace": "Azure.ResourceManager.ComputeSchedule", + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.CancelOperationsResponse", + "usage": "Output,Json", + "doc": "This is the response from a cancel operations request", + "decorators": [], + "properties": [ + { + "$id": "416", + "kind": "property", + "name": "results", + "serializedName": "results", + "doc": "An array of resource operations that were successfully cancelled", + "type": { + "$id": "417", + "kind": "array", + "name": "ArrayResourceOperation", + "valueType": { + "$ref": "218" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.CancelOperationsResponse.results", + "serializationOptions": { + "$id": "418", + "json": { + "$id": "419", + "name": "results" + } + } + } + ] + }, + { + "$id": "420", + "kind": "model", + "name": "GetOperationErrorsRequest", + "namespace": "Azure.ResourceManager.ComputeSchedule", + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.GetOperationErrorsRequest", + "usage": "Input,Json", + "doc": "This is the request to get errors per vm operations", + "decorators": [], + "properties": [ + { + "$id": "421", + "kind": "property", + "name": "operationIds", + "serializedName": "operationIds", + "doc": "The list of operation ids to query errors of", + "type": { + "$id": "422", + "kind": "array", + "name": "Array1", + "valueType": { + "$id": "423", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.GetOperationErrorsRequest.operationIds", + "serializationOptions": { + "$id": "424", + "json": { + "$id": "425", + "name": "operationIds" + } + } + } + ] + }, + { + "$id": "426", + "kind": "model", + "name": "GetOperationErrorsResult", + "namespace": "Azure.ResourceManager.ComputeSchedule", + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.GetOperationErrorsResponse", + "usage": "Output,Json", + "doc": "This is the response from a get operations errors request", + "decorators": [], + "properties": [ + { + "$id": "427", + "kind": "property", + "name": "results", + "serializedName": "results", + "doc": "An array of operationids and their corresponding errors if any", + "type": { + "$id": "428", + "kind": "array", + "name": "ArrayOperationErrorsResult", + "valueType": { + "$id": "429", + "kind": "model", + "name": "OperationErrorsResult", + "namespace": "Azure.ResourceManager.ComputeSchedule", + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.OperationErrorsResult", + "usage": "Output,Json", + "doc": "This is the first level of operation errors from the request when clients get errors per vm operation", + "decorators": [], + "properties": [ + { + "$id": "430", + "kind": "property", + "name": "operationId", + "serializedName": "operationId", + "doc": "The operationId identifying a vm operation", + "type": { + "$id": "431", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.OperationErrorsResult.operationId", + "serializationOptions": { + "$id": "432", + "json": { + "$id": "433", + "name": "operationId" + } + } + }, + { + "$id": "434", + "kind": "property", + "name": "creationTime", + "serializedName": "creationTime", + "doc": "The creation time of the error result", + "type": { + "$id": "435", + "kind": "offsetDateTime", + "name": "offsetDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "436", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.offsetDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.OperationErrorsResult.creationTime", + "serializationOptions": { + "$id": "437", + "json": { + "$id": "438", + "name": "creationTime" + } + } + }, + { + "$id": "439", + "kind": "property", + "name": "activationTime", + "serializedName": "activationTime", + "doc": "The activation time of a vm operation", + "type": { + "$id": "440", + "kind": "offsetDateTime", + "name": "offsetDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "441", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.offsetDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.OperationErrorsResult.activationTime", + "serializationOptions": { + "$id": "442", + "json": { + "$id": "443", + "name": "activationTime" + } + } + }, + { + "$id": "444", + "kind": "property", + "name": "completedAt", + "serializedName": "completedAt", + "doc": "The completion time of the operation if the operation was completed", + "type": { + "$id": "445", + "kind": "offsetDateTime", + "name": "offsetDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "446", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.offsetDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.OperationErrorsResult.completedAt", + "serializationOptions": { + "$id": "447", + "json": { + "$id": "448", + "name": "completedAt" + } + } + }, + { + "$id": "449", + "kind": "property", + "name": "operationErrors", + "serializedName": "operationErrors", + "doc": "A list of errors associated with the operationid", + "type": { + "$id": "450", + "kind": "array", + "name": "ArrayOperationErrorDetails", + "valueType": { + "$id": "451", + "kind": "model", + "name": "OperationErrorDetails", + "namespace": "Azure.ResourceManager.ComputeSchedule", + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.OperationErrorDetails", + "usage": "Output,Json", + "doc": "This defines a list of operation errors associated with a unique operationId", + "decorators": [], + "properties": [ + { + "$id": "452", + "kind": "property", + "name": "errorCode", + "serializedName": "errorCode", + "doc": "The error code of the operation", + "type": { + "$id": "453", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.OperationErrorDetails.errorCode", + "serializationOptions": { + "$id": "454", + "json": { + "$id": "455", + "name": "errorCode" + } + } + }, + { + "$id": "456", + "kind": "property", + "name": "errorDetails", + "serializedName": "errorDetails", + "doc": "The error details of the operation", + "type": { + "$id": "457", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.OperationErrorDetails.errorDetails", + "serializationOptions": { + "$id": "458", + "json": { + "$id": "459", + "name": "errorDetails" + } + } + }, + { + "$id": "460", + "kind": "property", + "name": "timestamp", + "serializedName": "timestamp", + "doc": "The timestamp of the error occurence", + "type": { + "$id": "461", + "kind": "offsetDateTime", + "name": "offsetDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "462", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.offsetDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.OperationErrorDetails.timestamp", + "serializationOptions": { + "$id": "463", + "json": { + "$id": "464", + "name": "timestamp" + } + } + }, + { + "$id": "465", + "kind": "property", + "name": "errorDetailsTimestamp", + "serializedName": "timeStamp", + "doc": "The timestamp of the error occurence", + "type": { + "$id": "466", + "kind": "offsetDateTime", + "name": "offsetDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "467", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.offsetDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.OperationErrorDetails.timeStamp", + "serializationOptions": { + "$id": "468", + "json": { + "$id": "469", + "name": "timeStamp" + } + } + }, + { + "$id": "470", + "kind": "property", + "name": "azureOperationName", + "serializedName": "azureOperationName", + "doc": "The compute operationid of the Start/Deallocate/Hibernate request", + "type": { + "$id": "471", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.OperationErrorDetails.azureOperationName", + "serializationOptions": { + "$id": "472", + "json": { + "$id": "473", + "name": "azureOperationName" + } + } + }, + { + "$id": "474", + "kind": "property", + "name": "crpOperationId", + "serializedName": "crpOperationId", + "doc": "The compute operationid of the Start/Deallocate/Hibernate request", + "type": { + "$id": "475", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.OperationErrorDetails.crpOperationId", + "serializationOptions": { + "$id": "476", + "json": { + "$id": "477", + "name": "crpOperationId" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.OperationErrorsResult.operationErrors", + "serializationOptions": { + "$id": "478", + "json": { + "$id": "479", + "name": "operationErrors" + } + } + }, + { + "$id": "480", + "kind": "property", + "name": "requestErrorCode", + "serializedName": "requestErrorCode", + "doc": "Request level error code", + "type": { + "$id": "481", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.OperationErrorsResult.requestErrorCode", + "serializationOptions": { + "$id": "482", + "json": { + "$id": "483", + "name": "requestErrorCode" + } + } + }, + { + "$id": "484", + "kind": "property", + "name": "requestErrorDetails", + "serializedName": "requestErrorDetails", + "doc": "Request level error details", + "type": { + "$id": "485", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.OperationErrorsResult.requestErrorDetails", + "serializationOptions": { + "$id": "486", + "json": { + "$id": "487", + "name": "requestErrorDetails" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.GetOperationErrorsResponse.results", + "serializationOptions": { + "$id": "488", + "json": { + "$id": "489", + "name": "results" + } + } + } + ] + }, + { + "$ref": "429" + }, + { + "$ref": "451" + } + ], + "clients": [ + { + "$id": "490", + "kind": "client", + "name": "ComputeScheduleClient", + "namespace": "Azure.ResourceManager.ComputeSchedule", + "doc": "Microsoft.ComputeSchedule Resource Provider management API.", + "methods": [], + "parameters": [ + { + "$id": "491", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "492", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "location": "Uri", + "isApiVersion": false, + "isContentType": false, + "isRequired": true, + "isEndpoint": true, + "skipUrlEncoding": false, + "explode": false, + "kind": "Client", + "defaultValue": { + "$id": "493", + "type": { + "$id": "494", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "495", + "name": "TypeSpec.@service", + "arguments": { + "$id": "496", + "options": { + "$id": "497", + "title": "Microsoft.ComputeSchedule" + } + } + } + ], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule", + "apiVersions": [ + "2024-08-15-preview", + "2024-10-01" + ], + "children": [ + { + "$id": "498", + "kind": "client", + "name": "Operations", + "namespace": "Azure.ResourceManager.ComputeSchedule", + "methods": [ + { + "$id": "499", + "kind": "paging", + "name": "list", + "accessibility": "public", + "apiVersions": [ + "2024-08-15-preview", + "2024-10-01" + ], + "doc": "List the operations for the provider", + "operation": { + "$id": "500", + "name": "list", + "resourceName": "Operations", + "doc": "List the operations for the provider", + "accessibility": "public", + "parameters": [ + { + "$id": "501", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "502", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "503", + "type": { + "$id": "504", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-10-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "505", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "506", + "kind": "constant", + "valueType": { + "$id": "507", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "508", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "64" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/providers/Microsoft.ComputeSchedule/operations", + "bufferResponse": true, + "paging": { + "$id": "509", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "510", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Azure.ResourceManager.Operations.list", + "decorators": [], + "examples": [ + { + "$id": "511", + "kind": "http", + "name": "Operations_List", + "description": "Operations_List", + "filePath": "2024-10-01/Operations_List.json", + "parameters": [ + { + "$id": "512", + "parameter": { + "$ref": "501" + }, + "value": { + "$id": "513", + "kind": "string", + "type": { + "$ref": "502" + }, + "value": "2024-10-01" + } + } + ], + "responses": [ + { + "$id": "514", + "response": { + "$ref": "508" + }, + "statusCode": 200, + "bodyValue": { + "$id": "515", + "kind": "model", + "type": { + "$ref": "64" + }, + "value": { + "$id": "516", + "value": { + "$id": "517", + "kind": "array", + "type": { + "$ref": "66" + }, + "value": [ + { + "$id": "518", + "kind": "model", + "type": { + "$ref": "67" + }, + "value": { + "$id": "519", + "name": { + "$id": "520", + "kind": "string", + "type": { + "$ref": "69" + }, + "value": "mtiwosbky" + }, + "isDataAction": { + "$id": "521", + "kind": "boolean", + "type": { + "$ref": "73" + }, + "value": true + }, + "display": { + "$id": "522", + "kind": "model", + "type": { + "$ref": "77" + }, + "value": { + "$id": "523", + "provider": { + "$id": "524", + "kind": "string", + "type": { + "$ref": "79" + }, + "value": "vtlhmqtfhlyllnplzpdpq" + }, + "resource": { + "$id": "525", + "kind": "string", + "type": { + "$ref": "83" + }, + "value": "epj" + }, + "operation": { + "$id": "526", + "kind": "string", + "type": { + "$ref": "87" + }, + "value": "tuneyqwanedwnnbztrmq" + }, + "description": { + "$id": "527", + "kind": "string", + "type": { + "$ref": "91" + }, + "value": "moyje" + } + } + }, + "origin": { + "$id": "528", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "user" + }, + "actionType": { + "$id": "529", + "kind": "string", + "type": { + "$ref": "10" + }, + "value": "Internal" + } + } + } + ] + }, + "nextLink": { + "$id": "530", + "kind": "string", + "type": { + "$ref": "105" + }, + "value": "https://microsoft.com/a" + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "531", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "506" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "532", + "type": { + "$id": "533", + "kind": "array", + "name": "ArrayOperation", + "valueType": { + "$ref": "67" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "resultSegments": [ + "value" + ] + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Azure.ResourceManager.Operations.list" + } + ], + "parameters": [ + { + "$id": "534", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "535", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "location": "Uri", + "isApiVersion": false, + "isContentType": false, + "isRequired": true, + "isEndpoint": true, + "skipUrlEncoding": false, + "explode": false, + "kind": "Client", + "defaultValue": { + "$id": "536", + "type": { + "$id": "537", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.Operations", + "apiVersions": [ + "2024-08-15-preview", + "2024-10-01" + ], + "parent": { + "$ref": "490" + } + }, + { + "$id": "538", + "kind": "client", + "name": "ScheduledActions", + "namespace": "Azure.ResourceManager.ComputeSchedule", + "methods": [ + { + "$id": "539", + "kind": "basic", + "name": "SubmitVirtualMachineDeallocate", + "accessibility": "public", + "apiVersions": [ + "2024-08-15-preview", + "2024-10-01" + ], + "doc": "VirtualMachinesSubmitDeallocate: Schedule deallocate operation for a batch of virtual machines at datetime in future.", + "operation": { + "$id": "540", + "name": "SubmitVirtualMachineDeallocate", + "resourceName": "ScheduledActions", + "doc": "VirtualMachinesSubmitDeallocate: Schedule deallocate operation for a batch of virtual machines at datetime in future.", + "accessibility": "public", + "parameters": [ + { + "$id": "541", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "542", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "543", + "type": { + "$id": "544", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-10-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "545", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "546", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "547", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "548", + "name": "locationparameter", + "nameInRequest": "locationparameter", + "doc": "The location name.", + "type": { + "$id": "549", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "550", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "551", + "kind": "constant", + "valueType": { + "$id": "552", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "553", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "554", + "kind": "constant", + "valueType": { + "$id": "555", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "556", + "name": "requestBody", + "nameInRequest": "requestBody", + "doc": "The request body", + "type": { + "$ref": "143" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "557", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "202" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesSubmitDeallocate", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesSubmitDeallocate", + "decorators": [], + "examples": [ + { + "$id": "558", + "kind": "http", + "name": "ScheduledActions_VirtualMachinesSubmitDeallocate", + "description": "ScheduledActions_VirtualMachinesSubmitDeallocate", + "filePath": "2024-10-01/ScheduledActions_VirtualMachinesSubmitDeallocate.json", + "parameters": [ + { + "$id": "559", + "parameter": { + "$ref": "541" + }, + "value": { + "$id": "560", + "kind": "string", + "type": { + "$ref": "542" + }, + "value": "2024-10-01" + } + }, + { + "$id": "561", + "parameter": { + "$ref": "545" + }, + "value": { + "$id": "562", + "kind": "string", + "type": { + "$ref": "546" + }, + "value": "D8E30CC0-2763-4FCC-84A8-3C5659281032" + } + }, + { + "$id": "563", + "parameter": { + "$ref": "548" + }, + "value": { + "$id": "564", + "kind": "string", + "type": { + "$ref": "549" + }, + "value": "eastus2euap" + } + }, + { + "$id": "565", + "parameter": { + "$ref": "556" + }, + "value": { + "$id": "566", + "kind": "model", + "type": { + "$ref": "143" + }, + "value": { + "$id": "567", + "schedule": { + "$id": "568", + "kind": "model", + "type": { + "$ref": "145" + }, + "value": { + "$id": "569", + "deadline": { + "$id": "570", + "kind": "string", + "type": { + "$ref": "147" + }, + "value": "2024-11-01T17:52:54.215Z" + }, + "timezone": { + "$id": "571", + "kind": "string", + "type": { + "$ref": "157" + }, + "value": "UTC" + }, + "deadlineType": { + "$id": "572", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "InitiateAt" + } + } + }, + "executionParameters": { + "$id": "573", + "kind": "model", + "type": { + "$ref": "170" + }, + "value": { + "$id": "574", + "retryPolicy": { + "$id": "575", + "kind": "model", + "type": { + "$ref": "175" + }, + "value": { + "$id": "576", + "retryCount": { + "$id": "577", + "kind": "number", + "type": { + "$ref": "177" + }, + "value": 4 + }, + "retryWindowInMinutes": { + "$id": "578", + "kind": "number", + "type": { + "$ref": "181" + }, + "value": 27 + } + } + } + } + }, + "resources": { + "$id": "579", + "kind": "model", + "type": { + "$ref": "189" + }, + "value": { + "$id": "580", + "ids": { + "$id": "581", + "kind": "array", + "type": { + "$ref": "191" + }, + "value": [ + { + "$id": "582", + "kind": "string", + "type": { + "$ref": "192" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + } + ] + } + } + }, + "correlationid": { + "$id": "583", + "kind": "string", + "type": { + "$ref": "199" + }, + "value": "23480d2f-1dca-4610-afb4-dd25eec1f34r" + } + } + } + } + ], + "responses": [ + { + "$id": "584", + "response": { + "$ref": "557" + }, + "statusCode": 200, + "bodyValue": { + "$id": "585", + "kind": "model", + "type": { + "$ref": "202" + }, + "value": { + "$id": "586", + "type": { + "$id": "587", + "kind": "string", + "type": { + "$ref": "208" + }, + "value": "virtualMachine" + }, + "location": { + "$id": "588", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "eastus2euap" + }, + "results": { + "$id": "589", + "kind": "array", + "type": { + "$ref": "217" + }, + "value": [ + { + "$id": "590", + "kind": "model", + "type": { + "$ref": "218" + }, + "value": { + "$id": "591", + "resourceId": { + "$id": "592", + "kind": "string", + "type": { + "$ref": "220" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + }, + "errorCode": { + "$id": "593", + "kind": "string", + "type": { + "$ref": "225" + }, + "value": "null" + }, + "errorDetails": { + "$id": "594", + "kind": "string", + "type": { + "$ref": "229" + }, + "value": "null" + }, + "operation": { + "$id": "595", + "kind": "model", + "type": { + "$ref": "233" + }, + "value": { + "$id": "596", + "operationId": { + "$id": "597", + "kind": "string", + "type": { + "$ref": "235" + }, + "value": "23480d2f-1dca-4610-afb4-dd25eec1f34r" + }, + "resourceId": { + "$id": "598", + "kind": "string", + "type": { + "$ref": "239" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + }, + "opType": { + "$id": "599", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "Deallocate" + }, + "subscriptionId": { + "$id": "600", + "kind": "string", + "type": { + "$ref": "247" + }, + "value": "D8E30CC0-2763-4FCC-84A8-3C5659281032" + }, + "deadline": { + "$id": "601", + "kind": "string", + "type": { + "$ref": "251" + }, + "value": "2024-11-01T17:52:53.667Z" + }, + "deadlineType": { + "$id": "602", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "InitiateAt" + }, + "state": { + "$id": "603", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Succeeded" + }, + "timezone": { + "$id": "604", + "kind": "string", + "type": { + "$ref": "262" + }, + "value": "UTC" + }, + "resourceOperationError": { + "$id": "605", + "kind": "model", + "type": { + "$ref": "270" + }, + "value": { + "$id": "606", + "errorCode": { + "$id": "607", + "kind": "string", + "type": { + "$ref": "272" + }, + "value": "null" + }, + "errorDetails": { + "$id": "608", + "kind": "string", + "type": { + "$ref": "276" + }, + "value": "null" + } + } + }, + "completedAt": { + "$id": "609", + "kind": "string", + "type": { + "$ref": "282" + }, + "value": "2024-11-01T17:52:53.668Z" + }, + "retryPolicy": { + "$id": "610", + "kind": "model", + "type": { + "$ref": "175" + }, + "value": { + "$id": "611", + "retryCount": { + "$id": "612", + "kind": "number", + "type": { + "$ref": "177" + }, + "value": 4 + }, + "retryWindowInMinutes": { + "$id": "613", + "kind": "number", + "type": { + "$ref": "181" + }, + "value": 27 + } + } + }, + "timeZone": { + "$id": "614", + "kind": "string", + "type": { + "$ref": "266" + }, + "value": "UTC" + } + } + } + } + } + ] + }, + "description": { + "$id": "615", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "Deallocate Resource Request" + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "616", + "name": "locationparameter", + "nameInRequest": "locationparameter", + "doc": "The location name.", + "type": { + "$id": "617", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "618", + "name": "requestBody", + "nameInRequest": "requestBody", + "doc": "The request body", + "type": { + "$ref": "143" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "619", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$ref": "551" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "620", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "554" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "621", + "type": { + "$ref": "202" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesSubmitDeallocate" + }, + { + "$id": "622", + "kind": "basic", + "name": "SubmitVirtualMachineHibernate", + "accessibility": "public", + "apiVersions": [ + "2024-08-15-preview", + "2024-10-01" + ], + "doc": "VirtualMachinesSubmitHibernate: Schedule hibernate operation for a batch of virtual machines at datetime in future.", + "operation": { + "$id": "623", + "name": "SubmitVirtualMachineHibernate", + "resourceName": "ScheduledActions", + "doc": "VirtualMachinesSubmitHibernate: Schedule hibernate operation for a batch of virtual machines at datetime in future.", + "accessibility": "public", + "parameters": [ + { + "$id": "624", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "625", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "626", + "type": { + "$id": "627", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-10-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "628", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "629", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "630", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "631", + "name": "locationparameter", + "nameInRequest": "locationparameter", + "doc": "The location name.", + "type": { + "$id": "632", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "633", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "634", + "kind": "constant", + "valueType": { + "$id": "635", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "636", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "637", + "kind": "constant", + "valueType": { + "$id": "638", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "639", + "name": "requestBody", + "nameInRequest": "requestBody", + "doc": "The request body", + "type": { + "$ref": "293" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "640", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "307" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesSubmitHibernate", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesSubmitHibernate", + "decorators": [], + "examples": [ + { + "$id": "641", + "kind": "http", + "name": "ScheduledActions_VirtualMachinesSubmitHibernate", + "description": "ScheduledActions_VirtualMachinesSubmitHibernate", + "filePath": "2024-10-01/ScheduledActions_VirtualMachinesSubmitHibernate.json", + "parameters": [ + { + "$id": "642", + "parameter": { + "$ref": "624" + }, + "value": { + "$id": "643", + "kind": "string", + "type": { + "$ref": "625" + }, + "value": "2024-10-01" + } + }, + { + "$id": "644", + "parameter": { + "$ref": "628" + }, + "value": { + "$id": "645", + "kind": "string", + "type": { + "$ref": "629" + }, + "value": "D8E30CC0-2763-4FCC-84A8-3C5659281032" + } + }, + { + "$id": "646", + "parameter": { + "$ref": "631" + }, + "value": { + "$id": "647", + "kind": "string", + "type": { + "$ref": "632" + }, + "value": "eastus2euap" + } + }, + { + "$id": "648", + "parameter": { + "$ref": "639" + }, + "value": { + "$id": "649", + "kind": "model", + "type": { + "$ref": "293" + }, + "value": { + "$id": "650", + "schedule": { + "$id": "651", + "kind": "model", + "type": { + "$ref": "145" + }, + "value": { + "$id": "652", + "deadline": { + "$id": "653", + "kind": "string", + "type": { + "$ref": "147" + }, + "value": "2024-11-01T17:52:54.215Z" + }, + "timezone": { + "$id": "654", + "kind": "string", + "type": { + "$ref": "157" + }, + "value": "UTC" + }, + "deadlineType": { + "$id": "655", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "InitiateAt" + } + } + }, + "executionParameters": { + "$id": "656", + "kind": "model", + "type": { + "$ref": "170" + }, + "value": { + "$id": "657", + "retryPolicy": { + "$id": "658", + "kind": "model", + "type": { + "$ref": "175" + }, + "value": { + "$id": "659", + "retryCount": { + "$id": "660", + "kind": "number", + "type": { + "$ref": "177" + }, + "value": 2 + }, + "retryWindowInMinutes": { + "$id": "661", + "kind": "number", + "type": { + "$ref": "181" + }, + "value": 27 + } + } + } + } + }, + "resources": { + "$id": "662", + "kind": "model", + "type": { + "$ref": "189" + }, + "value": { + "$id": "663", + "ids": { + "$id": "664", + "kind": "array", + "type": { + "$ref": "191" + }, + "value": [ + { + "$id": "665", + "kind": "string", + "type": { + "$ref": "192" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + } + ] + } + } + }, + "correlationid": { + "$id": "666", + "kind": "string", + "type": { + "$ref": "304" + }, + "value": "23480d2f-1dca-4610-afb4-dd25eec1f34r" + } + } + } + } + ], + "responses": [ + { + "$id": "667", + "response": { + "$ref": "640" + }, + "statusCode": 200, + "bodyValue": { + "$id": "668", + "kind": "model", + "type": { + "$ref": "307" + }, + "value": { + "$id": "669", + "type": { + "$id": "670", + "kind": "string", + "type": { + "$ref": "313" + }, + "value": "virtualMachine" + }, + "location": { + "$id": "671", + "kind": "string", + "type": { + "$ref": "317" + }, + "value": "eastus2euap" + }, + "results": { + "$id": "672", + "kind": "array", + "type": { + "$ref": "322" + }, + "value": [ + { + "$id": "673", + "kind": "model", + "type": { + "$ref": "218" + }, + "value": { + "$id": "674", + "resourceId": { + "$id": "675", + "kind": "string", + "type": { + "$ref": "220" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + }, + "errorCode": { + "$id": "676", + "kind": "string", + "type": { + "$ref": "225" + }, + "value": "null" + }, + "errorDetails": { + "$id": "677", + "kind": "string", + "type": { + "$ref": "229" + }, + "value": "null" + }, + "operation": { + "$id": "678", + "kind": "model", + "type": { + "$ref": "233" + }, + "value": { + "$id": "679", + "operationId": { + "$id": "680", + "kind": "string", + "type": { + "$ref": "235" + }, + "value": "23480d2f-1dca-4610-afb4-dd25eec1f34r" + }, + "resourceId": { + "$id": "681", + "kind": "string", + "type": { + "$ref": "239" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + }, + "opType": { + "$id": "682", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "Hibernate" + }, + "subscriptionId": { + "$id": "683", + "kind": "string", + "type": { + "$ref": "247" + }, + "value": "D8E30CC0-2763-4FCC-84A8-3C5659281032" + }, + "deadline": { + "$id": "684", + "kind": "string", + "type": { + "$ref": "251" + }, + "value": "2024-11-01T17:52:53.667Z" + }, + "deadlineType": { + "$id": "685", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "InitiateAt" + }, + "state": { + "$id": "686", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Succeeded" + }, + "timezone": { + "$id": "687", + "kind": "string", + "type": { + "$ref": "262" + }, + "value": "UTC" + }, + "resourceOperationError": { + "$id": "688", + "kind": "model", + "type": { + "$ref": "270" + }, + "value": { + "$id": "689", + "errorCode": { + "$id": "690", + "kind": "string", + "type": { + "$ref": "272" + }, + "value": "null" + }, + "errorDetails": { + "$id": "691", + "kind": "string", + "type": { + "$ref": "276" + }, + "value": "null" + } + } + }, + "completedAt": { + "$id": "692", + "kind": "string", + "type": { + "$ref": "282" + }, + "value": "2024-11-01T17:52:53.668Z" + }, + "retryPolicy": { + "$id": "693", + "kind": "model", + "type": { + "$ref": "175" + }, + "value": { + "$id": "694", + "retryCount": { + "$id": "695", + "kind": "number", + "type": { + "$ref": "177" + }, + "value": 2 + }, + "retryWindowInMinutes": { + "$id": "696", + "kind": "number", + "type": { + "$ref": "181" + }, + "value": 27 + } + } + }, + "timeZone": { + "$id": "697", + "kind": "string", + "type": { + "$ref": "266" + }, + "value": "UTC" + } + } + } + } + } + ] + }, + "description": { + "$id": "698", + "kind": "string", + "type": { + "$ref": "309" + }, + "value": "Hibernate Resource Request" + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "699", + "name": "locationparameter", + "nameInRequest": "locationparameter", + "doc": "The location name.", + "type": { + "$id": "700", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "701", + "name": "requestBody", + "nameInRequest": "requestBody", + "doc": "The request body", + "type": { + "$ref": "293" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "702", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$ref": "634" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "703", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "637" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "704", + "type": { + "$ref": "307" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesSubmitHibernate" + }, + { + "$id": "705", + "kind": "basic", + "name": "SubmitVirtualMachineStart", + "accessibility": "public", + "apiVersions": [ + "2024-08-15-preview", + "2024-10-01" + ], + "doc": "VirtualMachinesSubmitStart: Schedule start operation for a batch of virtual machines at datetime in future.", + "operation": { + "$id": "706", + "name": "SubmitVirtualMachineStart", + "resourceName": "ScheduledActions", + "doc": "VirtualMachinesSubmitStart: Schedule start operation for a batch of virtual machines at datetime in future.", + "accessibility": "public", + "parameters": [ + { + "$id": "707", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "708", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "709", + "type": { + "$id": "710", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-10-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "711", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "712", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "713", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "714", + "name": "locationparameter", + "nameInRequest": "locationparameter", + "doc": "The location name.", + "type": { + "$id": "715", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "716", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "717", + "kind": "constant", + "valueType": { + "$id": "718", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "719", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "720", + "kind": "constant", + "valueType": { + "$id": "721", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "722", + "name": "requestBody", + "nameInRequest": "requestBody", + "doc": "The request body", + "type": { + "$ref": "325" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "723", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "339" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesSubmitStart", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesSubmitStart", + "decorators": [], + "examples": [ + { + "$id": "724", + "kind": "http", + "name": "ScheduledActions_VirtualMachinesSubmitStart", + "description": "ScheduledActions_VirtualMachinesSubmitStart", + "filePath": "2024-10-01/ScheduledActions_VirtualMachinesSubmitStart.json", + "parameters": [ + { + "$id": "725", + "parameter": { + "$ref": "707" + }, + "value": { + "$id": "726", + "kind": "string", + "type": { + "$ref": "708" + }, + "value": "2024-10-01" + } + }, + { + "$id": "727", + "parameter": { + "$ref": "711" + }, + "value": { + "$id": "728", + "kind": "string", + "type": { + "$ref": "712" + }, + "value": "D8E30CC0-2763-4FCC-84A8-3C5659281032" + } + }, + { + "$id": "729", + "parameter": { + "$ref": "714" + }, + "value": { + "$id": "730", + "kind": "string", + "type": { + "$ref": "715" + }, + "value": "eastus2euap" + } + }, + { + "$id": "731", + "parameter": { + "$ref": "722" + }, + "value": { + "$id": "732", + "kind": "model", + "type": { + "$ref": "325" + }, + "value": { + "$id": "733", + "schedule": { + "$id": "734", + "kind": "model", + "type": { + "$ref": "145" + }, + "value": { + "$id": "735", + "deadline": { + "$id": "736", + "kind": "string", + "type": { + "$ref": "147" + }, + "value": "2024-11-01T17:52:54.215Z" + }, + "timezone": { + "$id": "737", + "kind": "string", + "type": { + "$ref": "157" + }, + "value": "UTC" + }, + "deadlineType": { + "$id": "738", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "InitiateAt" + } + } + }, + "executionParameters": { + "$id": "739", + "kind": "model", + "type": { + "$ref": "170" + }, + "value": { + "$id": "740", + "retryPolicy": { + "$id": "741", + "kind": "model", + "type": { + "$ref": "175" + }, + "value": { + "$id": "742", + "retryCount": { + "$id": "743", + "kind": "number", + "type": { + "$ref": "177" + }, + "value": 5 + }, + "retryWindowInMinutes": { + "$id": "744", + "kind": "number", + "type": { + "$ref": "181" + }, + "value": 27 + } + } + } + } + }, + "resources": { + "$id": "745", + "kind": "model", + "type": { + "$ref": "189" + }, + "value": { + "$id": "746", + "ids": { + "$id": "747", + "kind": "array", + "type": { + "$ref": "191" + }, + "value": [ + { + "$id": "748", + "kind": "string", + "type": { + "$ref": "192" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + } + ] + } + } + }, + "correlationid": { + "$id": "749", + "kind": "string", + "type": { + "$ref": "336" + }, + "value": "23480d2f-1dca-4610-afb4-dd25eec1f34r" + } + } + } + } + ], + "responses": [ + { + "$id": "750", + "response": { + "$ref": "723" + }, + "statusCode": 200, + "bodyValue": { + "$id": "751", + "kind": "model", + "type": { + "$ref": "339" + }, + "value": { + "$id": "752", + "type": { + "$id": "753", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "virtualMachine" + }, + "location": { + "$id": "754", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "eastus2euap" + }, + "results": { + "$id": "755", + "kind": "array", + "type": { + "$ref": "354" + }, + "value": [ + { + "$id": "756", + "kind": "model", + "type": { + "$ref": "218" + }, + "value": { + "$id": "757", + "resourceId": { + "$id": "758", + "kind": "string", + "type": { + "$ref": "220" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + }, + "errorCode": { + "$id": "759", + "kind": "string", + "type": { + "$ref": "225" + }, + "value": "null" + }, + "errorDetails": { + "$id": "760", + "kind": "string", + "type": { + "$ref": "229" + }, + "value": "null" + }, + "operation": { + "$id": "761", + "kind": "model", + "type": { + "$ref": "233" + }, + "value": { + "$id": "762", + "operationId": { + "$id": "763", + "kind": "string", + "type": { + "$ref": "235" + }, + "value": "23480d2f-1dca-4610-afb4-dd25eec1f34r" + }, + "resourceId": { + "$id": "764", + "kind": "string", + "type": { + "$ref": "239" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + }, + "opType": { + "$id": "765", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "Start" + }, + "subscriptionId": { + "$id": "766", + "kind": "string", + "type": { + "$ref": "247" + }, + "value": "D8E30CC0-2763-4FCC-84A8-3C5659281032" + }, + "deadline": { + "$id": "767", + "kind": "string", + "type": { + "$ref": "251" + }, + "value": "2024-11-01T17:52:53.667Z" + }, + "deadlineType": { + "$id": "768", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "InitiateAt" + }, + "state": { + "$id": "769", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Succeeded" + }, + "timezone": { + "$id": "770", + "kind": "string", + "type": { + "$ref": "262" + }, + "value": "UTC" + }, + "resourceOperationError": { + "$id": "771", + "kind": "model", + "type": { + "$ref": "270" + }, + "value": { + "$id": "772", + "errorCode": { + "$id": "773", + "kind": "string", + "type": { + "$ref": "272" + }, + "value": "null" + }, + "errorDetails": { + "$id": "774", + "kind": "string", + "type": { + "$ref": "276" + }, + "value": "null" + } + } + }, + "completedAt": { + "$id": "775", + "kind": "string", + "type": { + "$ref": "282" + }, + "value": "2024-11-01T17:52:53.668Z" + }, + "retryPolicy": { + "$id": "776", + "kind": "model", + "type": { + "$ref": "175" + }, + "value": { + "$id": "777", + "retryCount": { + "$id": "778", + "kind": "number", + "type": { + "$ref": "177" + }, + "value": 5 + }, + "retryWindowInMinutes": { + "$id": "779", + "kind": "number", + "type": { + "$ref": "181" + }, + "value": 27 + } + } + }, + "timeZone": { + "$id": "780", + "kind": "string", + "type": { + "$ref": "266" + }, + "value": "UTC" + } + } + } + } + } + ] + }, + "description": { + "$id": "781", + "kind": "string", + "type": { + "$ref": "341" + }, + "value": "Start Resource Request" + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "782", + "name": "locationparameter", + "nameInRequest": "locationparameter", + "doc": "The location name.", + "type": { + "$id": "783", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "784", + "name": "requestBody", + "nameInRequest": "requestBody", + "doc": "The request body", + "type": { + "$ref": "325" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "785", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$ref": "717" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "786", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "720" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "787", + "type": { + "$ref": "339" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesSubmitStart" + }, + { + "$id": "788", + "kind": "basic", + "name": "ExecuteVirtualMachineDeallocate", + "accessibility": "public", + "apiVersions": [ + "2024-08-15-preview", + "2024-10-01" + ], + "doc": "VirtualMachinesExecuteDeallocate: Execute deallocate operation for a batch of virtual machines, this operation is triggered as soon as Computeschedule receives it.", + "operation": { + "$id": "789", + "name": "ExecuteVirtualMachineDeallocate", + "resourceName": "ScheduledActions", + "doc": "VirtualMachinesExecuteDeallocate: Execute deallocate operation for a batch of virtual machines, this operation is triggered as soon as Computeschedule receives it.", + "accessibility": "public", + "parameters": [ + { + "$id": "790", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "791", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "792", + "type": { + "$id": "793", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-10-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "794", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "795", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "796", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "797", + "name": "locationparameter", + "nameInRequest": "locationparameter", + "doc": "The location name.", + "type": { + "$id": "798", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "799", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "800", + "kind": "constant", + "valueType": { + "$id": "801", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "802", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "803", + "kind": "constant", + "valueType": { + "$id": "804", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "805", + "name": "requestBody", + "nameInRequest": "requestBody", + "doc": "The request body", + "type": { + "$ref": "357" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "806", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "202" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesExecuteDeallocate", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteDeallocate", + "decorators": [], + "examples": [ + { + "$id": "807", + "kind": "http", + "name": "ScheduledActions_VirtualMachinesExecuteDeallocate", + "description": "ScheduledActions_VirtualMachinesExecuteDeallocate", + "filePath": "2024-10-01/ScheduledActions_VirtualMachinesExecuteDeallocate.json", + "parameters": [ + { + "$id": "808", + "parameter": { + "$ref": "790" + }, + "value": { + "$id": "809", + "kind": "string", + "type": { + "$ref": "791" + }, + "value": "2024-10-01" + } + }, + { + "$id": "810", + "parameter": { + "$ref": "794" + }, + "value": { + "$id": "811", + "kind": "string", + "type": { + "$ref": "795" + }, + "value": "D8E30CC0-2763-4FCC-84A8-3C5659281032" + } + }, + { + "$id": "812", + "parameter": { + "$ref": "797" + }, + "value": { + "$id": "813", + "kind": "string", + "type": { + "$ref": "798" + }, + "value": "eastus2euap" + } + }, + { + "$id": "814", + "parameter": { + "$ref": "805" + }, + "value": { + "$id": "815", + "kind": "model", + "type": { + "$ref": "357" + }, + "value": { + "$id": "816", + "executionParameters": { + "$id": "817", + "kind": "model", + "type": { + "$ref": "170" + }, + "value": { + "$id": "818", + "retryPolicy": { + "$id": "819", + "kind": "model", + "type": { + "$ref": "175" + }, + "value": { + "$id": "820", + "retryCount": { + "$id": "821", + "kind": "number", + "type": { + "$ref": "177" + }, + "value": 4 + }, + "retryWindowInMinutes": { + "$id": "822", + "kind": "number", + "type": { + "$ref": "181" + }, + "value": 27 + } + } + } + } + }, + "resources": { + "$id": "823", + "kind": "model", + "type": { + "$ref": "189" + }, + "value": { + "$id": "824", + "ids": { + "$id": "825", + "kind": "array", + "type": { + "$ref": "191" + }, + "value": [ + { + "$id": "826", + "kind": "string", + "type": { + "$ref": "192" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + } + ] + } + } + }, + "correlationid": { + "$id": "827", + "kind": "string", + "type": { + "$ref": "365" + }, + "value": "23480d2f-1dca-4610-afb4-dd25eec1f34r" + } + } + } + } + ], + "responses": [ + { + "$id": "828", + "response": { + "$ref": "806" + }, + "statusCode": 200, + "bodyValue": { + "$id": "829", + "kind": "model", + "type": { + "$ref": "202" + }, + "value": { + "$id": "830", + "type": { + "$id": "831", + "kind": "string", + "type": { + "$ref": "208" + }, + "value": "VirtualMachine" + }, + "location": { + "$id": "832", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "eastus2euap" + }, + "results": { + "$id": "833", + "kind": "array", + "type": { + "$ref": "217" + }, + "value": [ + { + "$id": "834", + "kind": "model", + "type": { + "$ref": "218" + }, + "value": { + "$id": "835", + "resourceId": { + "$id": "836", + "kind": "string", + "type": { + "$ref": "220" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + }, + "errorCode": { + "$id": "837", + "kind": "string", + "type": { + "$ref": "225" + }, + "value": "null" + }, + "errorDetails": { + "$id": "838", + "kind": "string", + "type": { + "$ref": "229" + }, + "value": "null" + }, + "operation": { + "$id": "839", + "kind": "model", + "type": { + "$ref": "233" + }, + "value": { + "$id": "840", + "operationId": { + "$id": "841", + "kind": "string", + "type": { + "$ref": "235" + }, + "value": "23480d2f-1dca-4610-afb4-dd25eec1f34r" + }, + "resourceId": { + "$id": "842", + "kind": "string", + "type": { + "$ref": "239" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + }, + "opType": { + "$id": "843", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "Deallocate" + }, + "subscriptionId": { + "$id": "844", + "kind": "string", + "type": { + "$ref": "247" + }, + "value": "D8E30CC0-2763-4FCC-84A8-3C5659281032" + }, + "deadline": { + "$id": "845", + "kind": "string", + "type": { + "$ref": "251" + }, + "value": "2024-11-01T17:52:53.667Z" + }, + "deadlineType": { + "$id": "846", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "InitiateAt" + }, + "state": { + "$id": "847", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Succeeded" + }, + "timezone": { + "$id": "848", + "kind": "string", + "type": { + "$ref": "262" + }, + "value": "UTC" + }, + "resourceOperationError": { + "$id": "849", + "kind": "model", + "type": { + "$ref": "270" + }, + "value": { + "$id": "850", + "errorCode": { + "$id": "851", + "kind": "string", + "type": { + "$ref": "272" + }, + "value": "null" + }, + "errorDetails": { + "$id": "852", + "kind": "string", + "type": { + "$ref": "276" + }, + "value": "null" + } + } + }, + "completedAt": { + "$id": "853", + "kind": "string", + "type": { + "$ref": "282" + }, + "value": "2024-11-01T17:52:53.668Z" + }, + "retryPolicy": { + "$id": "854", + "kind": "model", + "type": { + "$ref": "175" + }, + "value": { + "$id": "855", + "retryCount": { + "$id": "856", + "kind": "number", + "type": { + "$ref": "177" + }, + "value": 4 + }, + "retryWindowInMinutes": { + "$id": "857", + "kind": "number", + "type": { + "$ref": "181" + }, + "value": 27 + } + } + }, + "timeZone": { + "$id": "858", + "kind": "string", + "type": { + "$ref": "266" + }, + "value": "UTC" + } + } + } + } + } + ] + }, + "description": { + "$id": "859", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "Deallocate Resource Request" + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "860", + "name": "locationparameter", + "nameInRequest": "locationparameter", + "doc": "The location name.", + "type": { + "$id": "861", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "862", + "name": "requestBody", + "nameInRequest": "requestBody", + "doc": "The request body", + "type": { + "$ref": "357" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "863", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$ref": "800" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "864", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "803" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "865", + "type": { + "$ref": "202" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteDeallocate" + }, + { + "$id": "866", + "kind": "basic", + "name": "ExecuteVirtualMachineHibernate", + "accessibility": "public", + "apiVersions": [ + "2024-08-15-preview", + "2024-10-01" + ], + "doc": "VirtualMachinesExecuteHibernate: Execute hibernate operation for a batch of virtual machines, this operation is triggered as soon as Computeschedule receives it.", + "operation": { + "$id": "867", + "name": "ExecuteVirtualMachineHibernate", + "resourceName": "ScheduledActions", + "doc": "VirtualMachinesExecuteHibernate: Execute hibernate operation for a batch of virtual machines, this operation is triggered as soon as Computeschedule receives it.", + "accessibility": "public", + "parameters": [ + { + "$id": "868", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "869", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "870", + "type": { + "$id": "871", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-10-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "872", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "873", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "874", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "875", + "name": "locationparameter", + "nameInRequest": "locationparameter", + "doc": "The location name.", + "type": { + "$id": "876", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "877", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "878", + "kind": "constant", + "valueType": { + "$id": "879", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "880", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "881", + "kind": "constant", + "valueType": { + "$id": "882", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "883", + "name": "requestBody", + "nameInRequest": "requestBody", + "doc": "The request body", + "type": { + "$ref": "368" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "884", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "307" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesExecuteHibernate", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteHibernate", + "decorators": [], + "examples": [ + { + "$id": "885", + "kind": "http", + "name": "ScheduledActions_VirtualMachinesExecuteHibernate", + "description": "ScheduledActions_VirtualMachinesExecuteHibernate", + "filePath": "2024-10-01/ScheduledActions_VirtualMachinesExecuteHibernate.json", + "parameters": [ + { + "$id": "886", + "parameter": { + "$ref": "868" + }, + "value": { + "$id": "887", + "kind": "string", + "type": { + "$ref": "869" + }, + "value": "2024-10-01" + } + }, + { + "$id": "888", + "parameter": { + "$ref": "872" + }, + "value": { + "$id": "889", + "kind": "string", + "type": { + "$ref": "873" + }, + "value": "D8E30CC0-2763-4FCC-84A8-3C5659281032" + } + }, + { + "$id": "890", + "parameter": { + "$ref": "875" + }, + "value": { + "$id": "891", + "kind": "string", + "type": { + "$ref": "876" + }, + "value": "eastus2euap" + } + }, + { + "$id": "892", + "parameter": { + "$ref": "883" + }, + "value": { + "$id": "893", + "kind": "model", + "type": { + "$ref": "368" + }, + "value": { + "$id": "894", + "executionParameters": { + "$id": "895", + "kind": "model", + "type": { + "$ref": "170" + }, + "value": { + "$id": "896", + "retryPolicy": { + "$id": "897", + "kind": "model", + "type": { + "$ref": "175" + }, + "value": { + "$id": "898", + "retryCount": { + "$id": "899", + "kind": "number", + "type": { + "$ref": "177" + }, + "value": 5 + }, + "retryWindowInMinutes": { + "$id": "900", + "kind": "number", + "type": { + "$ref": "181" + }, + "value": 27 + } + } + } + } + }, + "resources": { + "$id": "901", + "kind": "model", + "type": { + "$ref": "189" + }, + "value": { + "$id": "902", + "ids": { + "$id": "903", + "kind": "array", + "type": { + "$ref": "191" + }, + "value": [ + { + "$id": "904", + "kind": "string", + "type": { + "$ref": "192" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + } + ] + } + } + }, + "correlationid": { + "$id": "905", + "kind": "string", + "type": { + "$ref": "376" + }, + "value": "23480d2f-1dca-4610-afb4-dd25eec1f34r" + } + } + } + } + ], + "responses": [ + { + "$id": "906", + "response": { + "$ref": "884" + }, + "statusCode": 200, + "bodyValue": { + "$id": "907", + "kind": "model", + "type": { + "$ref": "307" + }, + "value": { + "$id": "908", + "type": { + "$id": "909", + "kind": "string", + "type": { + "$ref": "313" + }, + "value": "VirtualMachine" + }, + "location": { + "$id": "910", + "kind": "string", + "type": { + "$ref": "317" + }, + "value": "eastus2euap" + }, + "results": { + "$id": "911", + "kind": "array", + "type": { + "$ref": "322" + }, + "value": [ + { + "$id": "912", + "kind": "model", + "type": { + "$ref": "218" + }, + "value": { + "$id": "913", + "resourceId": { + "$id": "914", + "kind": "string", + "type": { + "$ref": "220" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + }, + "errorCode": { + "$id": "915", + "kind": "string", + "type": { + "$ref": "225" + }, + "value": "null" + }, + "errorDetails": { + "$id": "916", + "kind": "string", + "type": { + "$ref": "229" + }, + "value": "null" + }, + "operation": { + "$id": "917", + "kind": "model", + "type": { + "$ref": "233" + }, + "value": { + "$id": "918", + "operationId": { + "$id": "919", + "kind": "string", + "type": { + "$ref": "235" + }, + "value": "23480d2f-1dca-4610-afb4-dd25eec1f34r" + }, + "resourceId": { + "$id": "920", + "kind": "string", + "type": { + "$ref": "239" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + }, + "opType": { + "$id": "921", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "Hibernate" + }, + "subscriptionId": { + "$id": "922", + "kind": "string", + "type": { + "$ref": "247" + }, + "value": "D8E30CC0-2763-4FCC-84A8-3C5659281032" + }, + "deadline": { + "$id": "923", + "kind": "string", + "type": { + "$ref": "251" + }, + "value": "2024-11-01T17:52:53.667Z" + }, + "deadlineType": { + "$id": "924", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "InitiateAt" + }, + "state": { + "$id": "925", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Succeeded" + }, + "timezone": { + "$id": "926", + "kind": "string", + "type": { + "$ref": "262" + }, + "value": "UTC" + }, + "resourceOperationError": { + "$id": "927", + "kind": "model", + "type": { + "$ref": "270" + }, + "value": { + "$id": "928", + "errorCode": { + "$id": "929", + "kind": "string", + "type": { + "$ref": "272" + }, + "value": "null" + }, + "errorDetails": { + "$id": "930", + "kind": "string", + "type": { + "$ref": "276" + }, + "value": "null" + } + } + }, + "completedAt": { + "$id": "931", + "kind": "string", + "type": { + "$ref": "282" + }, + "value": "2024-11-01T17:52:53.668Z" + }, + "retryPolicy": { + "$id": "932", + "kind": "model", + "type": { + "$ref": "175" + }, + "value": { + "$id": "933", + "retryCount": { + "$id": "934", + "kind": "number", + "type": { + "$ref": "177" + }, + "value": 5 + }, + "retryWindowInMinutes": { + "$id": "935", + "kind": "number", + "type": { + "$ref": "181" + }, + "value": 27 + } + } + }, + "timeZone": { + "$id": "936", + "kind": "string", + "type": { + "$ref": "266" + }, + "value": "UTC" + } + } + } + } + } + ] + }, + "description": { + "$id": "937", + "kind": "string", + "type": { + "$ref": "309" + }, + "value": "Hibernate Resource Request" + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "938", + "name": "locationparameter", + "nameInRequest": "locationparameter", + "doc": "The location name.", + "type": { + "$id": "939", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "940", + "name": "requestBody", + "nameInRequest": "requestBody", + "doc": "The request body", + "type": { + "$ref": "368" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "941", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$ref": "878" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "942", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "881" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "943", + "type": { + "$ref": "307" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteHibernate" + }, + { + "$id": "944", + "kind": "basic", + "name": "ExecuteVirtualMachineStart", + "accessibility": "public", + "apiVersions": [ + "2024-08-15-preview", + "2024-10-01" + ], + "doc": "VirtualMachinesExecuteStart: Execute start operation for a batch of virtual machines, this operation is triggered as soon as Computeschedule receives it.", + "operation": { + "$id": "945", + "name": "ExecuteVirtualMachineStart", + "resourceName": "ScheduledActions", + "doc": "VirtualMachinesExecuteStart: Execute start operation for a batch of virtual machines, this operation is triggered as soon as Computeschedule receives it.", + "accessibility": "public", + "parameters": [ + { + "$id": "946", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "947", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "948", + "type": { + "$id": "949", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-10-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "950", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "951", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "952", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "953", + "name": "locationparameter", + "nameInRequest": "locationparameter", + "doc": "The location name.", + "type": { + "$id": "954", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "955", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "956", + "kind": "constant", + "valueType": { + "$id": "957", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "958", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "959", + "kind": "constant", + "valueType": { + "$id": "960", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "961", + "name": "requestBody", + "nameInRequest": "requestBody", + "doc": "The request body", + "type": { + "$ref": "379" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "962", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "339" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesExecuteStart", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteStart", + "decorators": [], + "examples": [ + { + "$id": "963", + "kind": "http", + "name": "ScheduledActions_VirtualMachinesExecuteStart", + "description": "ScheduledActions_VirtualMachinesExecuteStart", + "filePath": "2024-10-01/ScheduledActions_VirtualMachinesExecuteStart.json", + "parameters": [ + { + "$id": "964", + "parameter": { + "$ref": "946" + }, + "value": { + "$id": "965", + "kind": "string", + "type": { + "$ref": "947" + }, + "value": "2024-10-01" + } + }, + { + "$id": "966", + "parameter": { + "$ref": "950" + }, + "value": { + "$id": "967", + "kind": "string", + "type": { + "$ref": "951" + }, + "value": "D8E30CC0-2763-4FCC-84A8-3C5659281032" + } + }, + { + "$id": "968", + "parameter": { + "$ref": "953" + }, + "value": { + "$id": "969", + "kind": "string", + "type": { + "$ref": "954" + }, + "value": "eastus2euap" + } + }, + { + "$id": "970", + "parameter": { + "$ref": "961" + }, + "value": { + "$id": "971", + "kind": "model", + "type": { + "$ref": "379" + }, + "value": { + "$id": "972", + "executionParameters": { + "$id": "973", + "kind": "model", + "type": { + "$ref": "170" + }, + "value": { + "$id": "974", + "retryPolicy": { + "$id": "975", + "kind": "model", + "type": { + "$ref": "175" + }, + "value": { + "$id": "976", + "retryCount": { + "$id": "977", + "kind": "number", + "type": { + "$ref": "177" + }, + "value": 2 + }, + "retryWindowInMinutes": { + "$id": "978", + "kind": "number", + "type": { + "$ref": "181" + }, + "value": 27 + } + } + } + } + }, + "resources": { + "$id": "979", + "kind": "model", + "type": { + "$ref": "189" + }, + "value": { + "$id": "980", + "ids": { + "$id": "981", + "kind": "array", + "type": { + "$ref": "191" + }, + "value": [ + { + "$id": "982", + "kind": "string", + "type": { + "$ref": "192" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + } + ] + } + } + }, + "correlationid": { + "$id": "983", + "kind": "string", + "type": { + "$ref": "387" + }, + "value": "23480d2f-1dca-4610-afb4-dd25eec1f34r" + } + } + } + } + ], + "responses": [ + { + "$id": "984", + "response": { + "$ref": "962" + }, + "statusCode": 200, + "bodyValue": { + "$id": "985", + "kind": "model", + "type": { + "$ref": "339" + }, + "value": { + "$id": "986", + "type": { + "$id": "987", + "kind": "string", + "type": { + "$ref": "345" + }, + "value": "virtualMachine" + }, + "location": { + "$id": "988", + "kind": "string", + "type": { + "$ref": "349" + }, + "value": "eastus2euap" + }, + "results": { + "$id": "989", + "kind": "array", + "type": { + "$ref": "354" + }, + "value": [ + { + "$id": "990", + "kind": "model", + "type": { + "$ref": "218" + }, + "value": { + "$id": "991", + "resourceId": { + "$id": "992", + "kind": "string", + "type": { + "$ref": "220" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + }, + "errorCode": { + "$id": "993", + "kind": "string", + "type": { + "$ref": "225" + }, + "value": "null" + }, + "errorDetails": { + "$id": "994", + "kind": "string", + "type": { + "$ref": "229" + }, + "value": "null" + }, + "operation": { + "$id": "995", + "kind": "model", + "type": { + "$ref": "233" + }, + "value": { + "$id": "996", + "operationId": { + "$id": "997", + "kind": "string", + "type": { + "$ref": "235" + }, + "value": "23480d2f-1dca-4610-afb4-dd25eec1f34r" + }, + "resourceId": { + "$id": "998", + "kind": "string", + "type": { + "$ref": "239" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + }, + "opType": { + "$id": "999", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "Start" + }, + "subscriptionId": { + "$id": "1000", + "kind": "string", + "type": { + "$ref": "247" + }, + "value": "D8E30CC0-2763-4FCC-84A8-3C5659281032" + }, + "deadline": { + "$id": "1001", + "kind": "string", + "type": { + "$ref": "251" + }, + "value": "2024-11-01T17:52:53.667Z" + }, + "deadlineType": { + "$id": "1002", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "InitiateAt" + }, + "state": { + "$id": "1003", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Succeeded" + }, + "timezone": { + "$id": "1004", + "kind": "string", + "type": { + "$ref": "262" + }, + "value": "UTC" + }, + "resourceOperationError": { + "$id": "1005", + "kind": "model", + "type": { + "$ref": "270" + }, + "value": { + "$id": "1006", + "errorCode": { + "$id": "1007", + "kind": "string", + "type": { + "$ref": "272" + }, + "value": "null" + }, + "errorDetails": { + "$id": "1008", + "kind": "string", + "type": { + "$ref": "276" + }, + "value": "null" + } + } + }, + "completedAt": { + "$id": "1009", + "kind": "string", + "type": { + "$ref": "282" + }, + "value": "2024-11-01T17:52:53.668Z" + }, + "retryPolicy": { + "$id": "1010", + "kind": "model", + "type": { + "$ref": "175" + }, + "value": { + "$id": "1011", + "retryCount": { + "$id": "1012", + "kind": "number", + "type": { + "$ref": "177" + }, + "value": 2 + }, + "retryWindowInMinutes": { + "$id": "1013", + "kind": "number", + "type": { + "$ref": "181" + }, + "value": 27 + } + } + }, + "timeZone": { + "$id": "1014", + "kind": "string", + "type": { + "$ref": "266" + }, + "value": "UTC" + } + } + } + } + } + ] + }, + "description": { + "$id": "1015", + "kind": "string", + "type": { + "$ref": "341" + }, + "value": "Start Resource Request" + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "1016", + "name": "locationparameter", + "nameInRequest": "locationparameter", + "doc": "The location name.", + "type": { + "$id": "1017", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1018", + "name": "requestBody", + "nameInRequest": "requestBody", + "doc": "The request body", + "type": { + "$ref": "379" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1019", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$ref": "956" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1020", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "959" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "1021", + "type": { + "$ref": "339" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesExecuteStart" + }, + { + "$id": "1022", + "kind": "basic", + "name": "GetVirtualMachineOperationStatus", + "accessibility": "public", + "apiVersions": [ + "2024-08-15-preview", + "2024-10-01" + ], + "doc": "VirtualMachinesGetOperationStatus: Polling endpoint to read status of operations performed on virtual machines", + "operation": { + "$id": "1023", + "name": "GetVirtualMachineOperationStatus", + "resourceName": "ScheduledActions", + "doc": "VirtualMachinesGetOperationStatus: Polling endpoint to read status of operations performed on virtual machines", + "accessibility": "public", + "parameters": [ + { + "$id": "1024", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1025", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1026", + "type": { + "$id": "1027", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-10-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1028", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1029", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1030", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1031", + "name": "locationparameter", + "nameInRequest": "locationparameter", + "doc": "The location name.", + "type": { + "$id": "1032", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1033", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "1034", + "kind": "constant", + "valueType": { + "$id": "1035", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1036", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1037", + "kind": "constant", + "valueType": { + "$id": "1038", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1039", + "name": "requestBody", + "nameInRequest": "requestBody", + "doc": "The request body", + "type": { + "$ref": "390" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "1040", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "400" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesGetOperationStatus", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesGetOperationStatus", + "decorators": [], + "examples": [ + { + "$id": "1041", + "kind": "http", + "name": "ScheduledActions_VirtualMachinesGetOperationStatus", + "description": "ScheduledActions_VirtualMachinesGetOperationStatus", + "filePath": "2024-10-01/ScheduledActions_VirtualMachinesGetOperationStatus.json", + "parameters": [ + { + "$id": "1042", + "parameter": { + "$ref": "1024" + }, + "value": { + "$id": "1043", + "kind": "string", + "type": { + "$ref": "1025" + }, + "value": "2024-10-01" + } + }, + { + "$id": "1044", + "parameter": { + "$ref": "1028" + }, + "value": { + "$id": "1045", + "kind": "string", + "type": { + "$ref": "1029" + }, + "value": "D8E30CC0-2763-4FCC-84A8-3C5659281032" + } + }, + { + "$id": "1046", + "parameter": { + "$ref": "1031" + }, + "value": { + "$id": "1047", + "kind": "string", + "type": { + "$ref": "1032" + }, + "value": "eastus2euap" + } + }, + { + "$id": "1048", + "parameter": { + "$ref": "1039" + }, + "value": { + "$id": "1049", + "kind": "model", + "type": { + "$ref": "390" + }, + "value": { + "$id": "1050", + "operationIds": { + "$id": "1051", + "kind": "array", + "type": { + "$ref": "392" + }, + "value": [ + { + "$id": "1052", + "kind": "string", + "type": { + "$ref": "393" + }, + "value": "23480d2f-1dca-4610-afb4-dd25eec1f34r" + } + ] + }, + "correlationid": { + "$id": "1053", + "kind": "string", + "type": { + "$ref": "397" + }, + "value": "35780d2f-1dca-4610-afb4-dd25eec1f34r" + } + } + } + } + ], + "responses": [ + { + "$id": "1054", + "response": { + "$ref": "1040" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1055", + "kind": "model", + "type": { + "$ref": "400" + }, + "value": { + "$id": "1056", + "results": { + "$id": "1057", + "kind": "array", + "type": { + "$ref": "402" + }, + "value": [ + { + "$id": "1058", + "kind": "model", + "type": { + "$ref": "218" + }, + "value": { + "$id": "1059", + "resourceId": { + "$id": "1060", + "kind": "string", + "type": { + "$ref": "220" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + }, + "errorCode": { + "$id": "1061", + "kind": "string", + "type": { + "$ref": "225" + }, + "value": "null" + }, + "errorDetails": { + "$id": "1062", + "kind": "string", + "type": { + "$ref": "229" + }, + "value": "null" + }, + "operation": { + "$id": "1063", + "kind": "model", + "type": { + "$ref": "233" + }, + "value": { + "$id": "1064", + "operationId": { + "$id": "1065", + "kind": "string", + "type": { + "$ref": "235" + }, + "value": "23480d2f-1dca-4610-afb4-dd25eec1f34r" + }, + "resourceId": { + "$id": "1066", + "kind": "string", + "type": { + "$ref": "239" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + }, + "opType": { + "$id": "1067", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "Deallocate" + }, + "subscriptionId": { + "$id": "1068", + "kind": "string", + "type": { + "$ref": "247" + }, + "value": "D8E30CC0-2763-4FCC-84A8-3C5659281032" + }, + "deadline": { + "$id": "1069", + "kind": "string", + "type": { + "$ref": "251" + }, + "value": "2024-11-01T17:52:53.667Z" + }, + "deadlineType": { + "$id": "1070", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "InitiateAt" + }, + "state": { + "$id": "1071", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Succeeded" + }, + "timezone": { + "$id": "1072", + "kind": "string", + "type": { + "$ref": "262" + }, + "value": "UTC" + }, + "resourceOperationError": { + "$id": "1073", + "kind": "model", + "type": { + "$ref": "270" + }, + "value": { + "$id": "1074", + "errorCode": { + "$id": "1075", + "kind": "string", + "type": { + "$ref": "272" + }, + "value": "null" + }, + "errorDetails": { + "$id": "1076", + "kind": "string", + "type": { + "$ref": "276" + }, + "value": "null" + } + } + }, + "completedAt": { + "$id": "1077", + "kind": "string", + "type": { + "$ref": "282" + }, + "value": "2024-11-01T17:52:53.668Z" + }, + "retryPolicy": { + "$id": "1078", + "kind": "model", + "type": { + "$ref": "175" + }, + "value": { + "$id": "1079", + "retryCount": { + "$id": "1080", + "kind": "number", + "type": { + "$ref": "177" + }, + "value": 4 + }, + "retryWindowInMinutes": { + "$id": "1081", + "kind": "number", + "type": { + "$ref": "181" + }, + "value": 27 + } + } + }, + "timeZone": { + "$id": "1082", + "kind": "string", + "type": { + "$ref": "266" + }, + "value": "UTC" + } + } + } + } + } + ] + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "1083", + "name": "locationparameter", + "nameInRequest": "locationparameter", + "doc": "The location name.", + "type": { + "$id": "1084", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1085", + "name": "requestBody", + "nameInRequest": "requestBody", + "doc": "The request body", + "type": { + "$ref": "390" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1086", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$ref": "1034" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1087", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "1037" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "1088", + "type": { + "$ref": "400" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesGetOperationStatus" + }, + { + "$id": "1089", + "kind": "basic", + "name": "CancelVirtualMachineOperations", + "accessibility": "public", + "apiVersions": [ + "2024-08-15-preview", + "2024-10-01" + ], + "doc": "VirtualMachinesCancelOperations: Cancel a previously submitted (start/deallocate/hibernate) request", + "operation": { + "$id": "1090", + "name": "CancelVirtualMachineOperations", + "resourceName": "ScheduledActions", + "doc": "VirtualMachinesCancelOperations: Cancel a previously submitted (start/deallocate/hibernate) request", + "accessibility": "public", + "parameters": [ + { + "$id": "1091", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1092", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1093", + "type": { + "$id": "1094", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-10-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1095", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1096", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1097", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1098", + "name": "locationparameter", + "nameInRequest": "locationparameter", + "doc": "The location name.", + "type": { + "$id": "1099", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1100", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "1101", + "kind": "constant", + "valueType": { + "$id": "1102", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1103", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1104", + "kind": "constant", + "valueType": { + "$id": "1105", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1106", + "name": "requestBody", + "nameInRequest": "requestBody", + "doc": "The request body", + "type": { + "$ref": "405" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "1107", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "415" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesCancelOperations", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesCancelOperations", + "decorators": [], + "examples": [ + { + "$id": "1108", + "kind": "http", + "name": "ScheduledActions_VirtualMachinesCancelOperations", + "description": "ScheduledActions_VirtualMachinesCancelOperations", + "filePath": "2024-10-01/ScheduledActions_VirtualMachinesCancelOperations.json", + "parameters": [ + { + "$id": "1109", + "parameter": { + "$ref": "1091" + }, + "value": { + "$id": "1110", + "kind": "string", + "type": { + "$ref": "1092" + }, + "value": "2024-10-01" + } + }, + { + "$id": "1111", + "parameter": { + "$ref": "1095" + }, + "value": { + "$id": "1112", + "kind": "string", + "type": { + "$ref": "1096" + }, + "value": "D8E30CC0-2763-4FCC-84A8-3C5659281032" + } + }, + { + "$id": "1113", + "parameter": { + "$ref": "1098" + }, + "value": { + "$id": "1114", + "kind": "string", + "type": { + "$ref": "1099" + }, + "value": "eastus2euap" + } + }, + { + "$id": "1115", + "parameter": { + "$ref": "1106" + }, + "value": { + "$id": "1116", + "kind": "model", + "type": { + "$ref": "405" + }, + "value": { + "$id": "1117", + "operationIds": { + "$id": "1118", + "kind": "array", + "type": { + "$ref": "407" + }, + "value": [ + { + "$id": "1119", + "kind": "string", + "type": { + "$ref": "408" + }, + "value": "23480d2f-1dca-4610-afb4-dd25eec1f34r" + } + ] + }, + "correlationid": { + "$id": "1120", + "kind": "string", + "type": { + "$ref": "412" + }, + "value": "23480d2f-1dca-4610-afb4-gg25eec1f34r" + } + } + } + } + ], + "responses": [ + { + "$id": "1121", + "response": { + "$ref": "1107" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1122", + "kind": "model", + "type": { + "$ref": "415" + }, + "value": { + "$id": "1123", + "results": { + "$id": "1124", + "kind": "array", + "type": { + "$ref": "417" + }, + "value": [ + { + "$id": "1125", + "kind": "model", + "type": { + "$ref": "218" + }, + "value": { + "$id": "1126", + "resourceId": { + "$id": "1127", + "kind": "string", + "type": { + "$ref": "220" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + }, + "errorCode": { + "$id": "1128", + "kind": "string", + "type": { + "$ref": "225" + }, + "value": "null" + }, + "errorDetails": { + "$id": "1129", + "kind": "string", + "type": { + "$ref": "229" + }, + "value": "null" + }, + "operation": { + "$id": "1130", + "kind": "model", + "type": { + "$ref": "233" + }, + "value": { + "$id": "1131", + "operationId": { + "$id": "1132", + "kind": "string", + "type": { + "$ref": "235" + }, + "value": "23480d2f-1dca-4610-afb4-dd25eec1f34r" + }, + "resourceId": { + "$id": "1133", + "kind": "string", + "type": { + "$ref": "239" + }, + "value": "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" + }, + "opType": { + "$id": "1134", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "Deallocate" + }, + "subscriptionId": { + "$id": "1135", + "kind": "string", + "type": { + "$ref": "247" + }, + "value": "D8E30CC0-2763-4FCC-84A8-3C5659281032" + }, + "deadline": { + "$id": "1136", + "kind": "string", + "type": { + "$ref": "251" + }, + "value": "2024-11-01T17:52:53.667Z" + }, + "deadlineType": { + "$id": "1137", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "InitiateAt" + }, + "state": { + "$id": "1138", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "Cancelled" + }, + "timezone": { + "$id": "1139", + "kind": "string", + "type": { + "$ref": "262" + }, + "value": "UTC" + }, + "resourceOperationError": { + "$id": "1140", + "kind": "model", + "type": { + "$ref": "270" + }, + "value": { + "$id": "1141", + "errorCode": { + "$id": "1142", + "kind": "string", + "type": { + "$ref": "272" + }, + "value": "null" + }, + "errorDetails": { + "$id": "1143", + "kind": "string", + "type": { + "$ref": "276" + }, + "value": "null" + } + } + }, + "completedAt": { + "$id": "1144", + "kind": "string", + "type": { + "$ref": "282" + }, + "value": "2024-11-01T17:52:53.668Z" + }, + "retryPolicy": { + "$id": "1145", + "kind": "model", + "type": { + "$ref": "175" + }, + "value": { + "$id": "1146", + "retryCount": { + "$id": "1147", + "kind": "number", + "type": { + "$ref": "177" + }, + "value": 4 + }, + "retryWindowInMinutes": { + "$id": "1148", + "kind": "number", + "type": { + "$ref": "181" + }, + "value": 27 + } + } + }, + "timeZone": { + "$id": "1149", + "kind": "string", + "type": { + "$ref": "266" + }, + "value": "UTC" + } + } + } + } + } + ] + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "1150", + "name": "locationparameter", + "nameInRequest": "locationparameter", + "doc": "The location name.", + "type": { + "$id": "1151", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1152", + "name": "requestBody", + "nameInRequest": "requestBody", + "doc": "The request body", + "type": { + "$ref": "405" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1153", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$ref": "1101" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1154", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "1104" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "1155", + "type": { + "$ref": "415" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesCancelOperations" + }, + { + "$id": "1156", + "kind": "basic", + "name": "GetVirtualMachineOperationErrors", + "accessibility": "public", + "apiVersions": [ + "2024-08-15-preview", + "2024-10-01" + ], + "doc": "VirtualMachinesGetOperationErrors: Get error details on operation errors (like transient errors encountered, additional logs) if they exist.", + "operation": { + "$id": "1157", + "name": "GetVirtualMachineOperationErrors", + "resourceName": "ScheduledActions", + "doc": "VirtualMachinesGetOperationErrors: Get error details on operation errors (like transient errors encountered, additional logs) if they exist.", + "accessibility": "public", + "parameters": [ + { + "$id": "1158", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1159", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1160", + "type": { + "$id": "1161", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2024-10-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1162", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1163", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1164", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1165", + "name": "locationparameter", + "nameInRequest": "locationparameter", + "doc": "The location name.", + "type": { + "$id": "1166", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1167", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "1168", + "kind": "constant", + "valueType": { + "$id": "1169", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1170", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1171", + "kind": "constant", + "valueType": { + "$id": "1172", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1173", + "name": "requestBody", + "nameInRequest": "requestBody", + "doc": "The request body", + "type": { + "$ref": "420" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "1174", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "426" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/providers/Microsoft.ComputeSchedule/locations/{locationparameter}/virtualMachinesGetOperationErrors", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesGetOperationErrors", + "decorators": [], + "examples": [ + { + "$id": "1175", + "kind": "http", + "name": "ScheduledActions_VirtualMachinesGetOperationErrors", + "description": "ScheduledActions_VirtualMachinesGetOperationErrors", + "filePath": "2024-10-01/ScheduledActions_VirtualMachinesGetOperationErrors.json", + "parameters": [ + { + "$id": "1176", + "parameter": { + "$ref": "1158" + }, + "value": { + "$id": "1177", + "kind": "string", + "type": { + "$ref": "1159" + }, + "value": "2024-10-01" + } + }, + { + "$id": "1178", + "parameter": { + "$ref": "1162" + }, + "value": { + "$id": "1179", + "kind": "string", + "type": { + "$ref": "1163" + }, + "value": "D8E30CC0-2763-4FCC-84A8-3C5659281032" + } + }, + { + "$id": "1180", + "parameter": { + "$ref": "1165" + }, + "value": { + "$id": "1181", + "kind": "string", + "type": { + "$ref": "1166" + }, + "value": "eastus2euap" + } + }, + { + "$id": "1182", + "parameter": { + "$ref": "1173" + }, + "value": { + "$id": "1183", + "kind": "model", + "type": { + "$ref": "420" + }, + "value": { + "$id": "1184", + "operationIds": { + "$id": "1185", + "kind": "array", + "type": { + "$ref": "422" + }, + "value": [ + { + "$id": "1186", + "kind": "string", + "type": { + "$ref": "423" + }, + "value": "23480d2f-1dca-4610-afb4-dd25eec1f34r" + } + ] + } + } + } + } + ], + "responses": [ + { + "$id": "1187", + "response": { + "$ref": "1174" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1188", + "kind": "model", + "type": { + "$ref": "426" + }, + "value": { + "$id": "1189", + "results": { + "$id": "1190", + "kind": "array", + "type": { + "$ref": "428" + }, + "value": [ + { + "$id": "1191", + "kind": "model", + "type": { + "$ref": "429" + }, + "value": { + "$id": "1192", + "operationId": { + "$id": "1193", + "kind": "string", + "type": { + "$ref": "431" + }, + "value": "23480d2f-1dca-4610-afb4-dd25eec1f34r" + }, + "creationTime": { + "$id": "1194", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "2024-11-01T17:52:53.999Z" + }, + "activationTime": { + "$id": "1195", + "kind": "string", + "type": { + "$ref": "440" + }, + "value": "2024-11-01T17:52:53.999Z" + }, + "completedAt": { + "$id": "1196", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "2024-11-01T17:52:53.999Z" + }, + "operationErrors": { + "$id": "1197", + "kind": "array", + "type": { + "$ref": "450" + }, + "value": [ + { + "$id": "1198", + "kind": "model", + "type": { + "$ref": "451" + }, + "value": { + "$id": "1199", + "errorCode": { + "$id": "1200", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "null" + }, + "errorDetails": { + "$id": "1201", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "null" + }, + "timestamp": { + "$id": "1202", + "kind": "string", + "type": { + "$ref": "461" + }, + "value": "2024-11-01T17:52:53.999Z" + }, + "azureOperationName": { + "$id": "1203", + "kind": "string", + "type": { + "$ref": "471" + }, + "value": "23480d2f-1dca-4610-afb4-dd25eec1f34r" + }, + "timeStamp": { + "$id": "1204", + "kind": "string", + "type": { + "$ref": "466" + }, + "value": "2024-11-27T16:55:03.357Z" + }, + "crpOperationId": { + "$id": "1205", + "kind": "string", + "type": { + "$ref": "475" + }, + "value": "23480d2f-1dca-4610-afb4-dd25eec1f34r" + } + } + } + ] + }, + "requestErrorCode": { + "$id": "1206", + "kind": "string", + "type": { + "$ref": "481" + }, + "value": "null" + }, + "requestErrorDetails": { + "$id": "1207", + "kind": "string", + "type": { + "$ref": "485" + }, + "value": "null" + } + } + } + ] + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "1208", + "name": "locationparameter", + "nameInRequest": "locationparameter", + "doc": "The location name.", + "type": { + "$id": "1209", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1210", + "name": "requestBody", + "nameInRequest": "requestBody", + "doc": "The request body", + "type": { + "$ref": "420" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1211", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$ref": "1168" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1212", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "1171" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "1213", + "type": { + "$ref": "426" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ScheduledActions.virtualMachinesGetOperationErrors" + } + ], + "parameters": [ + { + "$id": "1214", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "1215", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "location": "Uri", + "isApiVersion": false, + "isContentType": false, + "isRequired": true, + "isEndpoint": true, + "skipUrlEncoding": false, + "explode": false, + "kind": "Client", + "defaultValue": { + "$id": "1216", + "type": { + "$id": "1217", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ComputeSchedule.ScheduledActions", + "apiVersions": [ + "2024-08-15-preview", + "2024-10-01" + ], + "parent": { + "$ref": "490" + } + } + ] + } + ], + "auth": { + "$id": "1218", + "oAuth2": { + "$id": "1219", + "scopes": [ + "user_impersonation" + ] + } + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/Azure.ResourceManager.DatabaseFleetManager.sln b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/Azure.ResourceManager.DatabaseFleetManager.sln new file mode 100644 index 000000000000..089254656cac --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/Azure.ResourceManager.DatabaseFleetManager.sln @@ -0,0 +1,56 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29709.97 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.ResourceManager.DatabaseFleetManager.Samples", "samples\Azure.ResourceManager.DatabaseFleetManager.Samples.csproj", "{7A2DFF15-5746-49F4-BD0F-C6C35337088A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.ResourceManager.DatabaseFleetManager", "src\Azure.ResourceManager.DatabaseFleetManager.csproj", "{28FF4005-4467-4E36-92E7-DEA27DEB1519}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.ResourceManager.DatabaseFleetManager.Tests", "tests\Azure.ResourceManager.DatabaseFleetManager.Tests.csproj", "{1F1CD1D4-9932-4B73-99D8-C252A67D4B46}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.Build.0 = Release|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.Build.0 = Release|Any CPU + {7A2DFF15-5746-49F4-BD0F-C6C35337088A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7A2DFF15-5746-49F4-BD0F-C6C35337088A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7A2DFF15-5746-49F4-BD0F-C6C35337088A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7A2DFF15-5746-49F4-BD0F-C6C35337088A}.Release|Any CPU.Build.0 = Release|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Release|Any CPU.Build.0 = Release|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Release|Any CPU.Build.0 = Release|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Release|Any CPU.Build.0 = Release|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Debug|Any CPU.Build.0 = Debug|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Release|Any CPU.ActiveCfg = Release|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Release|Any CPU.Build.0 = Release|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {A97F4B90-2591-4689-B1F8-5F21FE6D6CAE} + EndGlobalSection +EndGlobal diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/CHANGELOG.md b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/CHANGELOG.md new file mode 100644 index 000000000000..8b33f0fedccc --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/CHANGELOG.md @@ -0,0 +1,11 @@ +# Release History + +## 1.0.0-beta.1 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes \ No newline at end of file diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/Directory.Build.props b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/Directory.Build.props new file mode 100644 index 000000000000..63bd836ad44b --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/Directory.Build.props @@ -0,0 +1,6 @@ + + + + diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/README.md b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/README.md new file mode 100644 index 000000000000..ce57f5065e0e --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/README.md @@ -0,0 +1,80 @@ +# Microsoft Azure DatabaseFleetManager management client library for .NET + +**[Describe the service briefly first.]** + +This library follows the [new Azure SDK guidelines](https://azure.github.io/azure-sdk/general_introduction.html), and provides many core capabilities: + + - Support MSAL.NET, Azure.Identity is out of box for supporting MSAL.NET. + - Support [OpenTelemetry](https://opentelemetry.io/) for distributed tracing. + - HTTP pipeline with custom policies. + - Better error-handling. + - Support uniform telemetry across all languages. + +## Getting started + +### Install the package + +Install the Microsoft Azure DatabaseFleetManager management library for .NET with [NuGet](https://www.nuget.org/): + +```dotnetcli +dotnet add package Azure.ResourceManager.DatabaseFleetManager --prerelease +``` + +### Prerequisites + +* You must have an [Microsoft Azure subscription](https://azure.microsoft.com/free/dotnet/). + +### Authenticate the Client + +To create an authenticated client and start interacting with Microsoft Azure resources, see the [quickstart guide here](https://github.com/Azure/azure-sdk-for-net/blob/main/doc/dev/mgmt_quickstart.md). + +## Key concepts + +Key concepts of the Microsoft Azure SDK for .NET can be found [here](https://azure.github.io/azure-sdk/dotnet_introduction.html) + +## Documentation + +Documentation is available to help you learn how to use this package: + +- [Quickstart](https://github.com/Azure/azure-sdk-for-net/blob/main/doc/dev/mgmt_quickstart.md). +- [API References](https://learn.microsoft.com/dotnet/api/?view=azure-dotnet). +- [Authentication](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/README.md). + +## Examples + +Code samples for using the management library for .NET can be found in the following locations +- [.NET Management Library Code Samples](https://aka.ms/azuresdk-net-mgmt-samples) + +## Troubleshooting + +- File an issue via [GitHub Issues](https://github.com/Azure/azure-sdk-for-net/issues). +- Check [previous questions](https://stackoverflow.com/questions/tagged/azure+.net) or ask new ones on Stack Overflow using Azure and .NET tags. + +## Next steps + +For more information about Microsoft Azure SDK, see [this website](https://azure.github.io/azure-sdk/). + +## Contributing + +For details on contributing to this repository, see the [contributing +guide][cg]. + +This project welcomes contributions and suggestions. Most contributions +require you to agree to a Contributor License Agreement (CLA) declaring +that you have the right to, and actually do, grant us the rights to use +your contribution. For details, visit . + +When you submit a pull request, a CLA-bot will automatically determine +whether you need to provide a CLA and decorate the PR appropriately +(for example, label, comment). Follow the instructions provided by the +bot. You'll only need to do this action once across all repositories +using our CLA. + +This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For +more information, see the [Code of Conduct FAQ][coc_faq] or contact + with any other questions or comments. + + +[cg]: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/resourcemanager/Azure.ResourceManager/docs/CONTRIBUTING.md +[coc]: https://opensource.microsoft.com/codeofconduct/ +[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ \ No newline at end of file diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/api/Azure.ResourceManager.DatabaseFleetManager.net8.0.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/api/Azure.ResourceManager.DatabaseFleetManager.net8.0.cs new file mode 100644 index 000000000000..3cd9005cfaab --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/api/Azure.ResourceManager.DatabaseFleetManager.net8.0.cs @@ -0,0 +1,637 @@ +namespace Azure.ResourceManager.DatabaseFleetManager +{ + public static partial class DatabaseFleetManagerExtensions + { + public static Azure.ResourceManager.DatabaseFleetManager.FirewallRuleResource GetFirewallRuleResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Response GetFleet(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string fleetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetFleetAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string fleetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.FleetDatabaseResource GetFleetDatabaseResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.FleetResource GetFleetResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.FleetCollection GetFleets(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetFleets(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetFleetsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.FleetspaceResource GetFleetspaceResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.FleetTierResource GetFleetTierResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + } + public partial class FirewallRuleCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected FirewallRuleCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string firewallRuleName, Azure.ResourceManager.DatabaseFleetManager.FirewallRuleData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string firewallRuleName, Azure.ResourceManager.DatabaseFleetManager.FirewallRuleData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string firewallRuleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string firewallRuleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string firewallRuleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(long? skip = default(long?), long? top = default(long?), string skiptoken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(long? skip = default(long?), long? top = default(long?), string skiptoken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string firewallRuleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string firewallRuleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string firewallRuleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class FirewallRuleData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public FirewallRuleData() { } + public Azure.ResourceManager.DatabaseFleetManager.Models.FirewallRuleProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.FirewallRuleData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.FirewallRuleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class FirewallRuleResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected FirewallRuleResource() { } + public virtual Azure.ResourceManager.DatabaseFleetManager.FirewallRuleData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, string firewallRuleName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.DatabaseFleetManager.FirewallRuleData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.FirewallRuleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DatabaseFleetManager.FirewallRuleData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DatabaseFleetManager.FirewallRuleData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class FleetCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected FleetCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string fleetName, Azure.ResourceManager.DatabaseFleetManager.FleetData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string fleetName, Azure.ResourceManager.DatabaseFleetManager.FleetData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string fleetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string fleetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string fleetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(long? skip = default(long?), long? top = default(long?), string skiptoken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(long? skip = default(long?), long? top = default(long?), string skiptoken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string fleetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string fleetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string fleetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class FleetData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public FleetData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.DatabaseFleetManager.Models.FleetProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.FleetData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.FleetData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class FleetDatabaseCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected FleetDatabaseCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string databaseName, Azure.ResourceManager.DatabaseFleetManager.FleetDatabaseData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string databaseName, Azure.ResourceManager.DatabaseFleetManager.FleetDatabaseData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string databaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string databaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string databaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(long? skip = default(long?), long? top = default(long?), string filter = null, string skiptoken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(long? skip = default(long?), long? top = default(long?), string filter = null, string skiptoken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string databaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string databaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string databaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class FleetDatabaseData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public FleetDatabaseData() { } + public Azure.ResourceManager.DatabaseFleetManager.Models.FleetDatabaseProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.FleetDatabaseData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.FleetDatabaseData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class FleetDatabaseResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected FleetDatabaseResource() { } + public virtual Azure.ResourceManager.DatabaseFleetManager.FleetDatabaseData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.ResourceManager.ArmOperation ChangeTier(Azure.WaitUntil waitUntil, Azure.ResourceManager.DatabaseFleetManager.Models.DatabaseChangeTierProperties body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task ChangeTierAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DatabaseFleetManager.Models.DatabaseChangeTierProperties body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, string databaseName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Rename(Azure.WaitUntil waitUntil, Azure.ResourceManager.DatabaseFleetManager.Models.DatabaseRenameProperties body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task RenameAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DatabaseFleetManager.Models.DatabaseRenameProperties body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Revert(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task RevertAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.DatabaseFleetManager.FleetDatabaseData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.FleetDatabaseData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DatabaseFleetManager.FleetDatabaseData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DatabaseFleetManager.FleetDatabaseData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class FleetResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected FleetResource() { } + public virtual Azure.ResourceManager.DatabaseFleetManager.FleetData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string fleetName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetFleetspace(string fleetspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetFleetspaceAsync(string fleetspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DatabaseFleetManager.FleetspaceCollection GetFleetspaces() { throw null; } + public virtual Azure.Response GetFleetTier(string tierName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetFleetTierAsync(string tierName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DatabaseFleetManager.FleetTierCollection GetFleetTiers() { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.DatabaseFleetManager.FleetData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.FleetData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DatabaseFleetManager.Models.FleetPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DatabaseFleetManager.Models.FleetPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class FleetspaceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected FleetspaceCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string fleetspaceName, Azure.ResourceManager.DatabaseFleetManager.FleetspaceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string fleetspaceName, Azure.ResourceManager.DatabaseFleetManager.FleetspaceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string fleetspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string fleetspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string fleetspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(long? skip = default(long?), long? top = default(long?), string skiptoken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(long? skip = default(long?), long? top = default(long?), string skiptoken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string fleetspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string fleetspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string fleetspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class FleetspaceData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public FleetspaceData() { } + public Azure.ResourceManager.DatabaseFleetManager.Models.FleetspaceProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.FleetspaceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.FleetspaceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class FleetspaceResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected FleetspaceResource() { } + public virtual Azure.ResourceManager.DatabaseFleetManager.FleetspaceData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetFirewallRule(string firewallRuleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetFirewallRuleAsync(string firewallRuleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DatabaseFleetManager.FirewallRuleCollection GetFirewallRules() { throw null; } + public virtual Azure.Response GetFleetDatabase(string databaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetFleetDatabaseAsync(string databaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DatabaseFleetManager.FleetDatabaseCollection GetFleetDatabases() { throw null; } + public virtual Azure.ResourceManager.ArmOperation RegisterServer(Azure.WaitUntil waitUntil, Azure.ResourceManager.DatabaseFleetManager.Models.RegisterServerProperties body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task RegisterServerAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DatabaseFleetManager.Models.RegisterServerProperties body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.DatabaseFleetManager.FleetspaceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.FleetspaceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Unregister(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task UnregisterAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DatabaseFleetManager.FleetspaceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DatabaseFleetManager.FleetspaceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class FleetTierCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected FleetTierCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string tierName, Azure.ResourceManager.DatabaseFleetManager.FleetTierData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string tierName, Azure.ResourceManager.DatabaseFleetManager.FleetTierData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string tierName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string tierName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string tierName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(long? skip = default(long?), long? top = default(long?), string skiptoken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(long? skip = default(long?), long? top = default(long?), string skiptoken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string tierName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string tierName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string tierName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class FleetTierData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public FleetTierData() { } + public Azure.ResourceManager.DatabaseFleetManager.Models.FleetTierProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.FleetTierData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.FleetTierData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class FleetTierResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected FleetTierResource() { } + public virtual Azure.ResourceManager.DatabaseFleetManager.FleetTierData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string fleetName, string tierName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Disable(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> DisableAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.DatabaseFleetManager.FleetTierData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.FleetTierData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DatabaseFleetManager.FleetTierData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DatabaseFleetManager.FleetTierData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.DatabaseFleetManager.Mocking +{ + public partial class MockableDatabaseFleetManagerArmClient : Azure.ResourceManager.ArmResource + { + protected MockableDatabaseFleetManagerArmClient() { } + public virtual Azure.ResourceManager.DatabaseFleetManager.FirewallRuleResource GetFirewallRuleResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.DatabaseFleetManager.FleetDatabaseResource GetFleetDatabaseResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.DatabaseFleetManager.FleetResource GetFleetResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.DatabaseFleetManager.FleetspaceResource GetFleetspaceResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.DatabaseFleetManager.FleetTierResource GetFleetTierResource(Azure.Core.ResourceIdentifier id) { throw null; } + } + public partial class MockableDatabaseFleetManagerResourceGroupResource : Azure.ResourceManager.ArmResource + { + protected MockableDatabaseFleetManagerResourceGroupResource() { } + public virtual Azure.Response GetFleet(string fleetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetFleetAsync(string fleetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DatabaseFleetManager.FleetCollection GetFleets() { throw null; } + } + public partial class MockableDatabaseFleetManagerSubscriptionResource : Azure.ResourceManager.ArmResource + { + protected MockableDatabaseFleetManagerSubscriptionResource() { } + public virtual Azure.Pageable GetFleets(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetFleetsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.DatabaseFleetManager.Models +{ + public static partial class ArmDatabaseFleetManagerModelFactory + { + public static Azure.ResourceManager.DatabaseFleetManager.FirewallRuleData FirewallRuleData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.DatabaseFleetManager.Models.FirewallRuleProperties properties = null) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.Models.FirewallRuleProperties FirewallRuleProperties(string startIPAddress = null, string endIPAddress = null, Azure.ResourceManager.DatabaseFleetManager.Models.AzureProvisioningState? provisioningState = default(Azure.ResourceManager.DatabaseFleetManager.Models.AzureProvisioningState?)) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.FleetData FleetData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.DatabaseFleetManager.Models.FleetProperties properties = null) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.FleetDatabaseData FleetDatabaseData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.DatabaseFleetManager.Models.FleetDatabaseProperties properties = null) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetDatabaseProperties FleetDatabaseProperties(string originalDatabaseId = null, Azure.ResourceManager.DatabaseFleetManager.Models.AzureProvisioningState? provisioningState = default(Azure.ResourceManager.DatabaseFleetManager.Models.AzureProvisioningState?), Azure.ResourceManager.DatabaseFleetManager.Models.DatabaseCreateMode? createMode = default(Azure.ResourceManager.DatabaseFleetManager.Models.DatabaseCreateMode?), string tierName = null, string connectionString = null, bool? recoverable = default(bool?), System.DateTimeOffset? restoreFromOn = default(System.DateTimeOffset?), System.DateTimeOffset? earliestRestoreOn = default(System.DateTimeOffset?), System.DateTimeOffset? latestRestoreOn = default(System.DateTimeOffset?), int? backupRetentionDays = default(int?), int? databaseSizeGbMax = default(int?), string sourceDatabaseName = null, System.Collections.Generic.IDictionary resourceTags = null, Azure.ResourceManager.DatabaseFleetManager.Models.IdentityProperties identity = null, Azure.ResourceManager.DatabaseFleetManager.Models.TransparentDataEncryption transparentDataEncryption = null, string collation = null) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetProperties FleetProperties(string description = null, Azure.ResourceManager.DatabaseFleetManager.Models.AzureProvisioningState? provisioningState = default(Azure.ResourceManager.DatabaseFleetManager.Models.AzureProvisioningState?)) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.FleetspaceData FleetspaceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.DatabaseFleetManager.Models.FleetspaceProperties properties = null) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetspaceProperties FleetspaceProperties(Azure.ResourceManager.DatabaseFleetManager.Models.AzureProvisioningState? provisioningState = default(Azure.ResourceManager.DatabaseFleetManager.Models.AzureProvisioningState?), int? capacityMax = default(int?), Azure.ResourceManager.DatabaseFleetManager.Models.MainPrincipal mainPrincipal = null) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.FleetTierData FleetTierData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.DatabaseFleetManager.Models.FleetTierProperties properties = null) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetTierProperties FleetTierProperties(bool? disabled = default(bool?), bool? serverless = default(bool?), bool? pooled = default(bool?), string serviceTier = null, string family = null, int? capacity = default(int?), int? poolNumOfDatabasesMax = default(int?), int? highAvailabilityReplicaCount = default(int?), Azure.ResourceManager.DatabaseFleetManager.Models.ZoneRedundancy? zoneRedundancy = default(Azure.ResourceManager.DatabaseFleetManager.Models.ZoneRedundancy?), double? databaseCapacityMin = default(double?), double? databaseCapacityMax = default(double?), int? databaseSizeGbMax = default(int?), Azure.ResourceManager.DatabaseFleetManager.Models.AzureProvisioningState? provisioningState = default(Azure.ResourceManager.DatabaseFleetManager.Models.AzureProvisioningState?)) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AzureProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AzureProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.Models.AzureProvisioningState Accepted { get { throw null; } } + public static Azure.ResourceManager.DatabaseFleetManager.Models.AzureProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.DatabaseFleetManager.Models.AzureProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.DatabaseFleetManager.Models.AzureProvisioningState Provisioning { get { throw null; } } + public static Azure.ResourceManager.DatabaseFleetManager.Models.AzureProvisioningState Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.DatabaseFleetManager.Models.AzureProvisioningState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.DatabaseFleetManager.Models.AzureProvisioningState left, Azure.ResourceManager.DatabaseFleetManager.Models.AzureProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.DatabaseFleetManager.Models.AzureProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DatabaseFleetManager.Models.AzureProvisioningState left, Azure.ResourceManager.DatabaseFleetManager.Models.AzureProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class DatabaseChangeTierProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DatabaseChangeTierProperties() { } + public string TargetTierName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.Models.DatabaseChangeTierProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.Models.DatabaseChangeTierProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DatabaseCreateMode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DatabaseCreateMode(string value) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.Models.DatabaseCreateMode Copy { get { throw null; } } + public static Azure.ResourceManager.DatabaseFleetManager.Models.DatabaseCreateMode Default { get { throw null; } } + public static Azure.ResourceManager.DatabaseFleetManager.Models.DatabaseCreateMode PointInTimeRestore { get { throw null; } } + public bool Equals(Azure.ResourceManager.DatabaseFleetManager.Models.DatabaseCreateMode other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.DatabaseFleetManager.Models.DatabaseCreateMode left, Azure.ResourceManager.DatabaseFleetManager.Models.DatabaseCreateMode right) { throw null; } + public static implicit operator Azure.ResourceManager.DatabaseFleetManager.Models.DatabaseCreateMode (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DatabaseFleetManager.Models.DatabaseCreateMode left, Azure.ResourceManager.DatabaseFleetManager.Models.DatabaseCreateMode right) { throw null; } + public override string ToString() { throw null; } + } + public partial class DatabaseIdentity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DatabaseIdentity() { } + public System.Guid? ClientId { get { throw null; } set { } } + public System.Guid? PrincipalId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.Models.DatabaseIdentity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.Models.DatabaseIdentity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DatabaseRenameProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DatabaseRenameProperties() { } + public string NewName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.Models.DatabaseRenameProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.Models.DatabaseRenameProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DestinationTierOverride : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DestinationTierOverride(Azure.ResourceManager.DatabaseFleetManager.Models.ResourceType resourceType, string tierName, string resourceName) { } + public string ResourceName { get { throw null; } } + public Azure.ResourceManager.DatabaseFleetManager.Models.ResourceType ResourceType { get { throw null; } } + public string TierName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.Models.DestinationTierOverride System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.Models.DestinationTierOverride System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class FirewallRuleProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public FirewallRuleProperties() { } + public string EndIPAddress { get { throw null; } set { } } + public Azure.ResourceManager.DatabaseFleetManager.Models.AzureProvisioningState? ProvisioningState { get { throw null; } } + public string StartIPAddress { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.Models.FirewallRuleProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.Models.FirewallRuleProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class FleetDatabaseProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public FleetDatabaseProperties() { } + public int? BackupRetentionDays { get { throw null; } } + public string Collation { get { throw null; } set { } } + public string ConnectionString { get { throw null; } } + public Azure.ResourceManager.DatabaseFleetManager.Models.DatabaseCreateMode? CreateMode { get { throw null; } set { } } + public int? DatabaseSizeGbMax { get { throw null; } } + public System.DateTimeOffset? EarliestRestoreOn { get { throw null; } } + public Azure.ResourceManager.DatabaseFleetManager.Models.IdentityProperties Identity { get { throw null; } set { } } + public System.DateTimeOffset? LatestRestoreOn { get { throw null; } } + public string OriginalDatabaseId { get { throw null; } } + public Azure.ResourceManager.DatabaseFleetManager.Models.AzureProvisioningState? ProvisioningState { get { throw null; } } + public bool? Recoverable { get { throw null; } } + public System.Collections.Generic.IDictionary ResourceTags { get { throw null; } } + public System.DateTimeOffset? RestoreFromOn { get { throw null; } set { } } + public string SourceDatabaseName { get { throw null; } set { } } + public string TierName { get { throw null; } set { } } + public Azure.ResourceManager.DatabaseFleetManager.Models.TransparentDataEncryption TransparentDataEncryption { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.Models.FleetDatabaseProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.Models.FleetDatabaseProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class FleetPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public FleetPatch() { } + public Azure.ResourceManager.DatabaseFleetManager.Models.FleetProperties Properties { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.Models.FleetPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.Models.FleetPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class FleetProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public FleetProperties() { } + public string Description { get { throw null; } set { } } + public Azure.ResourceManager.DatabaseFleetManager.Models.AzureProvisioningState? ProvisioningState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.Models.FleetProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.Models.FleetProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class FleetspaceProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public FleetspaceProperties() { } + public int? CapacityMax { get { throw null; } set { } } + public Azure.ResourceManager.DatabaseFleetManager.Models.MainPrincipal MainPrincipal { get { throw null; } set { } } + public Azure.ResourceManager.DatabaseFleetManager.Models.AzureProvisioningState? ProvisioningState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.Models.FleetspaceProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.Models.FleetspaceProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class FleetTierProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public FleetTierProperties() { } + public int? Capacity { get { throw null; } set { } } + public double? DatabaseCapacityMax { get { throw null; } set { } } + public double? DatabaseCapacityMin { get { throw null; } set { } } + public int? DatabaseSizeGbMax { get { throw null; } set { } } + public bool? Disabled { get { throw null; } } + public string Family { get { throw null; } set { } } + public int? HighAvailabilityReplicaCount { get { throw null; } set { } } + public bool? Pooled { get { throw null; } set { } } + public int? PoolNumOfDatabasesMax { get { throw null; } set { } } + public Azure.ResourceManager.DatabaseFleetManager.Models.AzureProvisioningState? ProvisioningState { get { throw null; } } + public bool? Serverless { get { throw null; } set { } } + public string ServiceTier { get { throw null; } set { } } + public Azure.ResourceManager.DatabaseFleetManager.Models.ZoneRedundancy? ZoneRedundancy { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.Models.FleetTierProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.Models.FleetTierProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class IdentityProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public IdentityProperties() { } + public System.Guid? FederatedClientId { get { throw null; } set { } } + public Azure.ResourceManager.DatabaseFleetManager.Models.IdentityType? IdentityType { get { throw null; } set { } } + public System.Collections.Generic.IList UserAssignedIdentities { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.Models.IdentityProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.Models.IdentityProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct IdentityType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public IdentityType(string value) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.Models.IdentityType None { get { throw null; } } + public static Azure.ResourceManager.DatabaseFleetManager.Models.IdentityType UserAssigned { get { throw null; } } + public bool Equals(Azure.ResourceManager.DatabaseFleetManager.Models.IdentityType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.DatabaseFleetManager.Models.IdentityType left, Azure.ResourceManager.DatabaseFleetManager.Models.IdentityType right) { throw null; } + public static implicit operator Azure.ResourceManager.DatabaseFleetManager.Models.IdentityType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DatabaseFleetManager.Models.IdentityType left, Azure.ResourceManager.DatabaseFleetManager.Models.IdentityType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class MainPrincipal : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public MainPrincipal() { } + public System.Guid? ApplicationId { get { throw null; } set { } } + public string Login { get { throw null; } set { } } + public System.Guid? ObjectId { get { throw null; } set { } } + public Azure.ResourceManager.DatabaseFleetManager.Models.PrincipalType? PrincipalType { get { throw null; } set { } } + public System.Guid? TenantId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.Models.MainPrincipal System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.Models.MainPrincipal System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct PrincipalType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PrincipalType(string value) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.Models.PrincipalType Application { get { throw null; } } + public static Azure.ResourceManager.DatabaseFleetManager.Models.PrincipalType User { get { throw null; } } + public bool Equals(Azure.ResourceManager.DatabaseFleetManager.Models.PrincipalType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.DatabaseFleetManager.Models.PrincipalType left, Azure.ResourceManager.DatabaseFleetManager.Models.PrincipalType right) { throw null; } + public static implicit operator Azure.ResourceManager.DatabaseFleetManager.Models.PrincipalType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DatabaseFleetManager.Models.PrincipalType left, Azure.ResourceManager.DatabaseFleetManager.Models.PrincipalType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class RegisterServerProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public RegisterServerProperties() { } + public System.Collections.Generic.IList DestinationTierOverrides { get { throw null; } } + public string SourceResourceGroupName { get { throw null; } set { } } + public string SourceServerName { get { throw null; } set { } } + public string SourceSubscriptionId { get { throw null; } set { } } + public string TierName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.Models.RegisterServerProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.Models.RegisterServerProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ResourceType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ResourceType(string value) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.Models.ResourceType Database { get { throw null; } } + public static Azure.ResourceManager.DatabaseFleetManager.Models.ResourceType Pool { get { throw null; } } + public bool Equals(Azure.ResourceManager.DatabaseFleetManager.Models.ResourceType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.DatabaseFleetManager.Models.ResourceType left, Azure.ResourceManager.DatabaseFleetManager.Models.ResourceType right) { throw null; } + public static implicit operator Azure.ResourceManager.DatabaseFleetManager.Models.ResourceType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DatabaseFleetManager.Models.ResourceType left, Azure.ResourceManager.DatabaseFleetManager.Models.ResourceType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class TransparentDataEncryption : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public TransparentDataEncryption() { } + public bool? EnableAutoRotation { get { throw null; } set { } } + public System.Collections.Generic.IList Keys { get { throw null; } } + public System.Uri KeyUri { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.Models.TransparentDataEncryption System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.Models.TransparentDataEncryption System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ZoneRedundancy : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ZoneRedundancy(string value) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.Models.ZoneRedundancy Disabled { get { throw null; } } + public static Azure.ResourceManager.DatabaseFleetManager.Models.ZoneRedundancy Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.DatabaseFleetManager.Models.ZoneRedundancy other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.DatabaseFleetManager.Models.ZoneRedundancy left, Azure.ResourceManager.DatabaseFleetManager.Models.ZoneRedundancy right) { throw null; } + public static implicit operator Azure.ResourceManager.DatabaseFleetManager.Models.ZoneRedundancy (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DatabaseFleetManager.Models.ZoneRedundancy left, Azure.ResourceManager.DatabaseFleetManager.Models.ZoneRedundancy right) { throw null; } + public override string ToString() { throw null; } + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/api/Azure.ResourceManager.DatabaseFleetManager.netstandard2.0.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/api/Azure.ResourceManager.DatabaseFleetManager.netstandard2.0.cs new file mode 100644 index 000000000000..3cd9005cfaab --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/api/Azure.ResourceManager.DatabaseFleetManager.netstandard2.0.cs @@ -0,0 +1,637 @@ +namespace Azure.ResourceManager.DatabaseFleetManager +{ + public static partial class DatabaseFleetManagerExtensions + { + public static Azure.ResourceManager.DatabaseFleetManager.FirewallRuleResource GetFirewallRuleResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Response GetFleet(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string fleetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetFleetAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string fleetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.FleetDatabaseResource GetFleetDatabaseResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.FleetResource GetFleetResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.FleetCollection GetFleets(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetFleets(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetFleetsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.FleetspaceResource GetFleetspaceResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.FleetTierResource GetFleetTierResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + } + public partial class FirewallRuleCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected FirewallRuleCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string firewallRuleName, Azure.ResourceManager.DatabaseFleetManager.FirewallRuleData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string firewallRuleName, Azure.ResourceManager.DatabaseFleetManager.FirewallRuleData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string firewallRuleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string firewallRuleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string firewallRuleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(long? skip = default(long?), long? top = default(long?), string skiptoken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(long? skip = default(long?), long? top = default(long?), string skiptoken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string firewallRuleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string firewallRuleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string firewallRuleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class FirewallRuleData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public FirewallRuleData() { } + public Azure.ResourceManager.DatabaseFleetManager.Models.FirewallRuleProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.FirewallRuleData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.FirewallRuleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class FirewallRuleResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected FirewallRuleResource() { } + public virtual Azure.ResourceManager.DatabaseFleetManager.FirewallRuleData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, string firewallRuleName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.DatabaseFleetManager.FirewallRuleData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.FirewallRuleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DatabaseFleetManager.FirewallRuleData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DatabaseFleetManager.FirewallRuleData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class FleetCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected FleetCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string fleetName, Azure.ResourceManager.DatabaseFleetManager.FleetData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string fleetName, Azure.ResourceManager.DatabaseFleetManager.FleetData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string fleetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string fleetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string fleetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(long? skip = default(long?), long? top = default(long?), string skiptoken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(long? skip = default(long?), long? top = default(long?), string skiptoken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string fleetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string fleetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string fleetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class FleetData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public FleetData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.DatabaseFleetManager.Models.FleetProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.FleetData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.FleetData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class FleetDatabaseCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected FleetDatabaseCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string databaseName, Azure.ResourceManager.DatabaseFleetManager.FleetDatabaseData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string databaseName, Azure.ResourceManager.DatabaseFleetManager.FleetDatabaseData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string databaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string databaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string databaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(long? skip = default(long?), long? top = default(long?), string filter = null, string skiptoken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(long? skip = default(long?), long? top = default(long?), string filter = null, string skiptoken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string databaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string databaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string databaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class FleetDatabaseData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public FleetDatabaseData() { } + public Azure.ResourceManager.DatabaseFleetManager.Models.FleetDatabaseProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.FleetDatabaseData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.FleetDatabaseData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class FleetDatabaseResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected FleetDatabaseResource() { } + public virtual Azure.ResourceManager.DatabaseFleetManager.FleetDatabaseData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.ResourceManager.ArmOperation ChangeTier(Azure.WaitUntil waitUntil, Azure.ResourceManager.DatabaseFleetManager.Models.DatabaseChangeTierProperties body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task ChangeTierAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DatabaseFleetManager.Models.DatabaseChangeTierProperties body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, string databaseName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Rename(Azure.WaitUntil waitUntil, Azure.ResourceManager.DatabaseFleetManager.Models.DatabaseRenameProperties body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task RenameAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DatabaseFleetManager.Models.DatabaseRenameProperties body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Revert(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task RevertAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.DatabaseFleetManager.FleetDatabaseData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.FleetDatabaseData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DatabaseFleetManager.FleetDatabaseData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DatabaseFleetManager.FleetDatabaseData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class FleetResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected FleetResource() { } + public virtual Azure.ResourceManager.DatabaseFleetManager.FleetData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string fleetName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetFleetspace(string fleetspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetFleetspaceAsync(string fleetspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DatabaseFleetManager.FleetspaceCollection GetFleetspaces() { throw null; } + public virtual Azure.Response GetFleetTier(string tierName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetFleetTierAsync(string tierName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DatabaseFleetManager.FleetTierCollection GetFleetTiers() { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.DatabaseFleetManager.FleetData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.FleetData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DatabaseFleetManager.Models.FleetPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DatabaseFleetManager.Models.FleetPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class FleetspaceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected FleetspaceCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string fleetspaceName, Azure.ResourceManager.DatabaseFleetManager.FleetspaceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string fleetspaceName, Azure.ResourceManager.DatabaseFleetManager.FleetspaceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string fleetspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string fleetspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string fleetspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(long? skip = default(long?), long? top = default(long?), string skiptoken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(long? skip = default(long?), long? top = default(long?), string skiptoken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string fleetspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string fleetspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string fleetspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class FleetspaceData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public FleetspaceData() { } + public Azure.ResourceManager.DatabaseFleetManager.Models.FleetspaceProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.FleetspaceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.FleetspaceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class FleetspaceResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected FleetspaceResource() { } + public virtual Azure.ResourceManager.DatabaseFleetManager.FleetspaceData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetFirewallRule(string firewallRuleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetFirewallRuleAsync(string firewallRuleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DatabaseFleetManager.FirewallRuleCollection GetFirewallRules() { throw null; } + public virtual Azure.Response GetFleetDatabase(string databaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetFleetDatabaseAsync(string databaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DatabaseFleetManager.FleetDatabaseCollection GetFleetDatabases() { throw null; } + public virtual Azure.ResourceManager.ArmOperation RegisterServer(Azure.WaitUntil waitUntil, Azure.ResourceManager.DatabaseFleetManager.Models.RegisterServerProperties body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task RegisterServerAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DatabaseFleetManager.Models.RegisterServerProperties body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.DatabaseFleetManager.FleetspaceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.FleetspaceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Unregister(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task UnregisterAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DatabaseFleetManager.FleetspaceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DatabaseFleetManager.FleetspaceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class FleetTierCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected FleetTierCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string tierName, Azure.ResourceManager.DatabaseFleetManager.FleetTierData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string tierName, Azure.ResourceManager.DatabaseFleetManager.FleetTierData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string tierName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string tierName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string tierName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(long? skip = default(long?), long? top = default(long?), string skiptoken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(long? skip = default(long?), long? top = default(long?), string skiptoken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string tierName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string tierName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string tierName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class FleetTierData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public FleetTierData() { } + public Azure.ResourceManager.DatabaseFleetManager.Models.FleetTierProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.FleetTierData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.FleetTierData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class FleetTierResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected FleetTierResource() { } + public virtual Azure.ResourceManager.DatabaseFleetManager.FleetTierData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string fleetName, string tierName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Disable(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> DisableAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.DatabaseFleetManager.FleetTierData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.FleetTierData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DatabaseFleetManager.FleetTierData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DatabaseFleetManager.FleetTierData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.DatabaseFleetManager.Mocking +{ + public partial class MockableDatabaseFleetManagerArmClient : Azure.ResourceManager.ArmResource + { + protected MockableDatabaseFleetManagerArmClient() { } + public virtual Azure.ResourceManager.DatabaseFleetManager.FirewallRuleResource GetFirewallRuleResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.DatabaseFleetManager.FleetDatabaseResource GetFleetDatabaseResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.DatabaseFleetManager.FleetResource GetFleetResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.DatabaseFleetManager.FleetspaceResource GetFleetspaceResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.DatabaseFleetManager.FleetTierResource GetFleetTierResource(Azure.Core.ResourceIdentifier id) { throw null; } + } + public partial class MockableDatabaseFleetManagerResourceGroupResource : Azure.ResourceManager.ArmResource + { + protected MockableDatabaseFleetManagerResourceGroupResource() { } + public virtual Azure.Response GetFleet(string fleetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetFleetAsync(string fleetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.DatabaseFleetManager.FleetCollection GetFleets() { throw null; } + } + public partial class MockableDatabaseFleetManagerSubscriptionResource : Azure.ResourceManager.ArmResource + { + protected MockableDatabaseFleetManagerSubscriptionResource() { } + public virtual Azure.Pageable GetFleets(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetFleetsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.DatabaseFleetManager.Models +{ + public static partial class ArmDatabaseFleetManagerModelFactory + { + public static Azure.ResourceManager.DatabaseFleetManager.FirewallRuleData FirewallRuleData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.DatabaseFleetManager.Models.FirewallRuleProperties properties = null) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.Models.FirewallRuleProperties FirewallRuleProperties(string startIPAddress = null, string endIPAddress = null, Azure.ResourceManager.DatabaseFleetManager.Models.AzureProvisioningState? provisioningState = default(Azure.ResourceManager.DatabaseFleetManager.Models.AzureProvisioningState?)) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.FleetData FleetData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.DatabaseFleetManager.Models.FleetProperties properties = null) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.FleetDatabaseData FleetDatabaseData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.DatabaseFleetManager.Models.FleetDatabaseProperties properties = null) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetDatabaseProperties FleetDatabaseProperties(string originalDatabaseId = null, Azure.ResourceManager.DatabaseFleetManager.Models.AzureProvisioningState? provisioningState = default(Azure.ResourceManager.DatabaseFleetManager.Models.AzureProvisioningState?), Azure.ResourceManager.DatabaseFleetManager.Models.DatabaseCreateMode? createMode = default(Azure.ResourceManager.DatabaseFleetManager.Models.DatabaseCreateMode?), string tierName = null, string connectionString = null, bool? recoverable = default(bool?), System.DateTimeOffset? restoreFromOn = default(System.DateTimeOffset?), System.DateTimeOffset? earliestRestoreOn = default(System.DateTimeOffset?), System.DateTimeOffset? latestRestoreOn = default(System.DateTimeOffset?), int? backupRetentionDays = default(int?), int? databaseSizeGbMax = default(int?), string sourceDatabaseName = null, System.Collections.Generic.IDictionary resourceTags = null, Azure.ResourceManager.DatabaseFleetManager.Models.IdentityProperties identity = null, Azure.ResourceManager.DatabaseFleetManager.Models.TransparentDataEncryption transparentDataEncryption = null, string collation = null) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetProperties FleetProperties(string description = null, Azure.ResourceManager.DatabaseFleetManager.Models.AzureProvisioningState? provisioningState = default(Azure.ResourceManager.DatabaseFleetManager.Models.AzureProvisioningState?)) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.FleetspaceData FleetspaceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.DatabaseFleetManager.Models.FleetspaceProperties properties = null) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetspaceProperties FleetspaceProperties(Azure.ResourceManager.DatabaseFleetManager.Models.AzureProvisioningState? provisioningState = default(Azure.ResourceManager.DatabaseFleetManager.Models.AzureProvisioningState?), int? capacityMax = default(int?), Azure.ResourceManager.DatabaseFleetManager.Models.MainPrincipal mainPrincipal = null) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.FleetTierData FleetTierData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.DatabaseFleetManager.Models.FleetTierProperties properties = null) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.Models.FleetTierProperties FleetTierProperties(bool? disabled = default(bool?), bool? serverless = default(bool?), bool? pooled = default(bool?), string serviceTier = null, string family = null, int? capacity = default(int?), int? poolNumOfDatabasesMax = default(int?), int? highAvailabilityReplicaCount = default(int?), Azure.ResourceManager.DatabaseFleetManager.Models.ZoneRedundancy? zoneRedundancy = default(Azure.ResourceManager.DatabaseFleetManager.Models.ZoneRedundancy?), double? databaseCapacityMin = default(double?), double? databaseCapacityMax = default(double?), int? databaseSizeGbMax = default(int?), Azure.ResourceManager.DatabaseFleetManager.Models.AzureProvisioningState? provisioningState = default(Azure.ResourceManager.DatabaseFleetManager.Models.AzureProvisioningState?)) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AzureProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AzureProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.Models.AzureProvisioningState Accepted { get { throw null; } } + public static Azure.ResourceManager.DatabaseFleetManager.Models.AzureProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.DatabaseFleetManager.Models.AzureProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.DatabaseFleetManager.Models.AzureProvisioningState Provisioning { get { throw null; } } + public static Azure.ResourceManager.DatabaseFleetManager.Models.AzureProvisioningState Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.DatabaseFleetManager.Models.AzureProvisioningState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.DatabaseFleetManager.Models.AzureProvisioningState left, Azure.ResourceManager.DatabaseFleetManager.Models.AzureProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.DatabaseFleetManager.Models.AzureProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DatabaseFleetManager.Models.AzureProvisioningState left, Azure.ResourceManager.DatabaseFleetManager.Models.AzureProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class DatabaseChangeTierProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DatabaseChangeTierProperties() { } + public string TargetTierName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.Models.DatabaseChangeTierProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.Models.DatabaseChangeTierProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DatabaseCreateMode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DatabaseCreateMode(string value) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.Models.DatabaseCreateMode Copy { get { throw null; } } + public static Azure.ResourceManager.DatabaseFleetManager.Models.DatabaseCreateMode Default { get { throw null; } } + public static Azure.ResourceManager.DatabaseFleetManager.Models.DatabaseCreateMode PointInTimeRestore { get { throw null; } } + public bool Equals(Azure.ResourceManager.DatabaseFleetManager.Models.DatabaseCreateMode other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.DatabaseFleetManager.Models.DatabaseCreateMode left, Azure.ResourceManager.DatabaseFleetManager.Models.DatabaseCreateMode right) { throw null; } + public static implicit operator Azure.ResourceManager.DatabaseFleetManager.Models.DatabaseCreateMode (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DatabaseFleetManager.Models.DatabaseCreateMode left, Azure.ResourceManager.DatabaseFleetManager.Models.DatabaseCreateMode right) { throw null; } + public override string ToString() { throw null; } + } + public partial class DatabaseIdentity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DatabaseIdentity() { } + public System.Guid? ClientId { get { throw null; } set { } } + public System.Guid? PrincipalId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.Models.DatabaseIdentity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.Models.DatabaseIdentity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DatabaseRenameProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DatabaseRenameProperties() { } + public string NewName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.Models.DatabaseRenameProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.Models.DatabaseRenameProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DestinationTierOverride : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DestinationTierOverride(Azure.ResourceManager.DatabaseFleetManager.Models.ResourceType resourceType, string tierName, string resourceName) { } + public string ResourceName { get { throw null; } } + public Azure.ResourceManager.DatabaseFleetManager.Models.ResourceType ResourceType { get { throw null; } } + public string TierName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.Models.DestinationTierOverride System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.Models.DestinationTierOverride System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class FirewallRuleProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public FirewallRuleProperties() { } + public string EndIPAddress { get { throw null; } set { } } + public Azure.ResourceManager.DatabaseFleetManager.Models.AzureProvisioningState? ProvisioningState { get { throw null; } } + public string StartIPAddress { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.Models.FirewallRuleProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.Models.FirewallRuleProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class FleetDatabaseProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public FleetDatabaseProperties() { } + public int? BackupRetentionDays { get { throw null; } } + public string Collation { get { throw null; } set { } } + public string ConnectionString { get { throw null; } } + public Azure.ResourceManager.DatabaseFleetManager.Models.DatabaseCreateMode? CreateMode { get { throw null; } set { } } + public int? DatabaseSizeGbMax { get { throw null; } } + public System.DateTimeOffset? EarliestRestoreOn { get { throw null; } } + public Azure.ResourceManager.DatabaseFleetManager.Models.IdentityProperties Identity { get { throw null; } set { } } + public System.DateTimeOffset? LatestRestoreOn { get { throw null; } } + public string OriginalDatabaseId { get { throw null; } } + public Azure.ResourceManager.DatabaseFleetManager.Models.AzureProvisioningState? ProvisioningState { get { throw null; } } + public bool? Recoverable { get { throw null; } } + public System.Collections.Generic.IDictionary ResourceTags { get { throw null; } } + public System.DateTimeOffset? RestoreFromOn { get { throw null; } set { } } + public string SourceDatabaseName { get { throw null; } set { } } + public string TierName { get { throw null; } set { } } + public Azure.ResourceManager.DatabaseFleetManager.Models.TransparentDataEncryption TransparentDataEncryption { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.Models.FleetDatabaseProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.Models.FleetDatabaseProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class FleetPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public FleetPatch() { } + public Azure.ResourceManager.DatabaseFleetManager.Models.FleetProperties Properties { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.Models.FleetPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.Models.FleetPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class FleetProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public FleetProperties() { } + public string Description { get { throw null; } set { } } + public Azure.ResourceManager.DatabaseFleetManager.Models.AzureProvisioningState? ProvisioningState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.Models.FleetProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.Models.FleetProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class FleetspaceProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public FleetspaceProperties() { } + public int? CapacityMax { get { throw null; } set { } } + public Azure.ResourceManager.DatabaseFleetManager.Models.MainPrincipal MainPrincipal { get { throw null; } set { } } + public Azure.ResourceManager.DatabaseFleetManager.Models.AzureProvisioningState? ProvisioningState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.Models.FleetspaceProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.Models.FleetspaceProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class FleetTierProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public FleetTierProperties() { } + public int? Capacity { get { throw null; } set { } } + public double? DatabaseCapacityMax { get { throw null; } set { } } + public double? DatabaseCapacityMin { get { throw null; } set { } } + public int? DatabaseSizeGbMax { get { throw null; } set { } } + public bool? Disabled { get { throw null; } } + public string Family { get { throw null; } set { } } + public int? HighAvailabilityReplicaCount { get { throw null; } set { } } + public bool? Pooled { get { throw null; } set { } } + public int? PoolNumOfDatabasesMax { get { throw null; } set { } } + public Azure.ResourceManager.DatabaseFleetManager.Models.AzureProvisioningState? ProvisioningState { get { throw null; } } + public bool? Serverless { get { throw null; } set { } } + public string ServiceTier { get { throw null; } set { } } + public Azure.ResourceManager.DatabaseFleetManager.Models.ZoneRedundancy? ZoneRedundancy { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.Models.FleetTierProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.Models.FleetTierProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class IdentityProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public IdentityProperties() { } + public System.Guid? FederatedClientId { get { throw null; } set { } } + public Azure.ResourceManager.DatabaseFleetManager.Models.IdentityType? IdentityType { get { throw null; } set { } } + public System.Collections.Generic.IList UserAssignedIdentities { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.Models.IdentityProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.Models.IdentityProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct IdentityType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public IdentityType(string value) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.Models.IdentityType None { get { throw null; } } + public static Azure.ResourceManager.DatabaseFleetManager.Models.IdentityType UserAssigned { get { throw null; } } + public bool Equals(Azure.ResourceManager.DatabaseFleetManager.Models.IdentityType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.DatabaseFleetManager.Models.IdentityType left, Azure.ResourceManager.DatabaseFleetManager.Models.IdentityType right) { throw null; } + public static implicit operator Azure.ResourceManager.DatabaseFleetManager.Models.IdentityType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DatabaseFleetManager.Models.IdentityType left, Azure.ResourceManager.DatabaseFleetManager.Models.IdentityType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class MainPrincipal : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public MainPrincipal() { } + public System.Guid? ApplicationId { get { throw null; } set { } } + public string Login { get { throw null; } set { } } + public System.Guid? ObjectId { get { throw null; } set { } } + public Azure.ResourceManager.DatabaseFleetManager.Models.PrincipalType? PrincipalType { get { throw null; } set { } } + public System.Guid? TenantId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.Models.MainPrincipal System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.Models.MainPrincipal System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct PrincipalType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PrincipalType(string value) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.Models.PrincipalType Application { get { throw null; } } + public static Azure.ResourceManager.DatabaseFleetManager.Models.PrincipalType User { get { throw null; } } + public bool Equals(Azure.ResourceManager.DatabaseFleetManager.Models.PrincipalType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.DatabaseFleetManager.Models.PrincipalType left, Azure.ResourceManager.DatabaseFleetManager.Models.PrincipalType right) { throw null; } + public static implicit operator Azure.ResourceManager.DatabaseFleetManager.Models.PrincipalType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DatabaseFleetManager.Models.PrincipalType left, Azure.ResourceManager.DatabaseFleetManager.Models.PrincipalType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class RegisterServerProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public RegisterServerProperties() { } + public System.Collections.Generic.IList DestinationTierOverrides { get { throw null; } } + public string SourceResourceGroupName { get { throw null; } set { } } + public string SourceServerName { get { throw null; } set { } } + public string SourceSubscriptionId { get { throw null; } set { } } + public string TierName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.Models.RegisterServerProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.Models.RegisterServerProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ResourceType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ResourceType(string value) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.Models.ResourceType Database { get { throw null; } } + public static Azure.ResourceManager.DatabaseFleetManager.Models.ResourceType Pool { get { throw null; } } + public bool Equals(Azure.ResourceManager.DatabaseFleetManager.Models.ResourceType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.DatabaseFleetManager.Models.ResourceType left, Azure.ResourceManager.DatabaseFleetManager.Models.ResourceType right) { throw null; } + public static implicit operator Azure.ResourceManager.DatabaseFleetManager.Models.ResourceType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DatabaseFleetManager.Models.ResourceType left, Azure.ResourceManager.DatabaseFleetManager.Models.ResourceType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class TransparentDataEncryption : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public TransparentDataEncryption() { } + public bool? EnableAutoRotation { get { throw null; } set { } } + public System.Collections.Generic.IList Keys { get { throw null; } } + public System.Uri KeyUri { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.Models.TransparentDataEncryption System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DatabaseFleetManager.Models.TransparentDataEncryption System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ZoneRedundancy : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ZoneRedundancy(string value) { throw null; } + public static Azure.ResourceManager.DatabaseFleetManager.Models.ZoneRedundancy Disabled { get { throw null; } } + public static Azure.ResourceManager.DatabaseFleetManager.Models.ZoneRedundancy Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.DatabaseFleetManager.Models.ZoneRedundancy other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.DatabaseFleetManager.Models.ZoneRedundancy left, Azure.ResourceManager.DatabaseFleetManager.Models.ZoneRedundancy right) { throw null; } + public static implicit operator Azure.ResourceManager.DatabaseFleetManager.Models.ZoneRedundancy (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DatabaseFleetManager.Models.ZoneRedundancy left, Azure.ResourceManager.DatabaseFleetManager.Models.ZoneRedundancy right) { throw null; } + public override string ToString() { throw null; } + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/assets.json b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/assets.json new file mode 100644 index 000000000000..a3ae9749e088 --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/assets.json @@ -0,0 +1,7 @@ + +{ + "AssetsRepo": "Azure/azure-sdk-assets", + "AssetsRepoPrefixPath": "net", + "TagPrefix": "net/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager", + "Tag": "" +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/samples/Azure.ResourceManager.DatabaseFleetManager.Samples.csproj b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/samples/Azure.ResourceManager.DatabaseFleetManager.Samples.csproj new file mode 100644 index 000000000000..1591846d9047 --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/samples/Azure.ResourceManager.DatabaseFleetManager.Samples.csproj @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_FirewallRuleCollection.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_FirewallRuleCollection.cs new file mode 100644 index 000000000000..460fbae841d0 --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_FirewallRuleCollection.cs @@ -0,0 +1,209 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.DatabaseFleetManager.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.DatabaseFleetManager.Samples +{ + public partial class Sample_FirewallRuleCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateOrUpdateFirewallRuleGeneratedByPolicy() + { + // Generated from example definition: 2025-02-01-preview/FirewallRules_CreateOrUpdate_MaximumSet_Gen.json + // this example is just showing the usage of "FirewallRule_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this FleetspaceResource created on azure + // for more information of creating FleetspaceResource, please refer to the document of FleetspaceResource + string subscriptionId = "a2b3c4d5-6789-0123-4567-89abcdef1234"; + string resourceGroupName = "rg-networking-operations"; + string fleetName = "data-fleet-01"; + string fleetspaceName = "prod-environment"; + ResourceIdentifier fleetspaceResourceId = FleetspaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, fleetspaceName); + FleetspaceResource fleetspace = client.GetFleetspaceResource(fleetspaceResourceId); + + // get the collection of this FirewallRuleResource + FirewallRuleCollection collection = fleetspace.GetFirewallRules(); + + // invoke the operation + string firewallRuleName = "allow-10-0-0-0-24-to-10-1-0-0-24"; + FirewallRuleData data = new FirewallRuleData + { + Properties = new FirewallRuleProperties + { + StartIPAddress = "10.0.0.0", + EndIPAddress = "10.0.0.255", + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, firewallRuleName, data); + FirewallRuleResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + FirewallRuleData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GetFirewallRuleGeneratedByPolicy() + { + // Generated from example definition: 2025-02-01-preview/FirewallRules_Get_MaximumSet_Gen.json + // this example is just showing the usage of "FirewallRule_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this FleetspaceResource created on azure + // for more information of creating FleetspaceResource, please refer to the document of FleetspaceResource + string subscriptionId = "a2b3c4d5-6789-0123-4567-89abcdef1234"; + string resourceGroupName = "rg-networking-operations"; + string fleetName = "data-fleet-01"; + string fleetspaceName = "prod-environment"; + ResourceIdentifier fleetspaceResourceId = FleetspaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, fleetspaceName); + FleetspaceResource fleetspace = client.GetFleetspaceResource(fleetspaceResourceId); + + // get the collection of this FirewallRuleResource + FirewallRuleCollection collection = fleetspace.GetFirewallRules(); + + // invoke the operation + string firewallRuleName = "allow-10-0-0-0-24-to-10-1-0-0-24"; + FirewallRuleResource result = await collection.GetAsync(firewallRuleName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + FirewallRuleData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_ListFirewallRulesByFleetspaceGeneratedByPolicy() + { + // Generated from example definition: 2025-02-01-preview/FirewallRules_ListByFleetspace_MaximumSet_Gen.json + // this example is just showing the usage of "FirewallRule_ListByFleetspace" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this FleetspaceResource created on azure + // for more information of creating FleetspaceResource, please refer to the document of FleetspaceResource + string subscriptionId = "a2b3c4d5-6789-0123-4567-89abcdef1234"; + string resourceGroupName = "rg-networking-operations"; + string fleetName = "data-fleet-01"; + string fleetspaceName = "prod-environment"; + ResourceIdentifier fleetspaceResourceId = FleetspaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, fleetspaceName); + FleetspaceResource fleetspace = client.GetFleetspaceResource(fleetspaceResourceId); + + // get the collection of this FirewallRuleResource + FirewallRuleCollection collection = fleetspace.GetFirewallRules(); + + // invoke the operation and iterate over the result + await foreach (FirewallRuleResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + FirewallRuleData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_GetFirewallRuleGeneratedByPolicy() + { + // Generated from example definition: 2025-02-01-preview/FirewallRules_Get_MaximumSet_Gen.json + // this example is just showing the usage of "FirewallRule_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this FleetspaceResource created on azure + // for more information of creating FleetspaceResource, please refer to the document of FleetspaceResource + string subscriptionId = "a2b3c4d5-6789-0123-4567-89abcdef1234"; + string resourceGroupName = "rg-networking-operations"; + string fleetName = "data-fleet-01"; + string fleetspaceName = "prod-environment"; + ResourceIdentifier fleetspaceResourceId = FleetspaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, fleetspaceName); + FleetspaceResource fleetspace = client.GetFleetspaceResource(fleetspaceResourceId); + + // get the collection of this FirewallRuleResource + FirewallRuleCollection collection = fleetspace.GetFirewallRules(); + + // invoke the operation + string firewallRuleName = "allow-10-0-0-0-24-to-10-1-0-0-24"; + bool result = await collection.ExistsAsync(firewallRuleName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_GetFirewallRuleGeneratedByPolicy() + { + // Generated from example definition: 2025-02-01-preview/FirewallRules_Get_MaximumSet_Gen.json + // this example is just showing the usage of "FirewallRule_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this FleetspaceResource created on azure + // for more information of creating FleetspaceResource, please refer to the document of FleetspaceResource + string subscriptionId = "a2b3c4d5-6789-0123-4567-89abcdef1234"; + string resourceGroupName = "rg-networking-operations"; + string fleetName = "data-fleet-01"; + string fleetspaceName = "prod-environment"; + ResourceIdentifier fleetspaceResourceId = FleetspaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, fleetspaceName); + FleetspaceResource fleetspace = client.GetFleetspaceResource(fleetspaceResourceId); + + // get the collection of this FirewallRuleResource + FirewallRuleCollection collection = fleetspace.GetFirewallRules(); + + // invoke the operation + string firewallRuleName = "allow-10-0-0-0-24-to-10-1-0-0-24"; + NullableResponse response = await collection.GetIfExistsAsync(firewallRuleName); + FirewallRuleResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + FirewallRuleData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_FirewallRuleResource.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_FirewallRuleResource.cs new file mode 100644 index 000000000000..87e86ff9cd3d --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_FirewallRuleResource.cs @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.DatabaseFleetManager.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.DatabaseFleetManager.Samples +{ + public partial class Sample_FirewallRuleResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GetFirewallRuleGeneratedByPolicy() + { + // Generated from example definition: 2025-02-01-preview/FirewallRules_Get_MaximumSet_Gen.json + // this example is just showing the usage of "FirewallRule_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this FirewallRuleResource created on azure + // for more information of creating FirewallRuleResource, please refer to the document of FirewallRuleResource + string subscriptionId = "a2b3c4d5-6789-0123-4567-89abcdef1234"; + string resourceGroupName = "rg-networking-operations"; + string fleetName = "data-fleet-01"; + string fleetspaceName = "prod-environment"; + string firewallRuleName = "allow-10-0-0-0-24-to-10-1-0-0-24"; + ResourceIdentifier firewallRuleResourceId = FirewallRuleResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, fleetspaceName, firewallRuleName); + FirewallRuleResource firewallRule = client.GetFirewallRuleResource(firewallRuleResourceId); + + // invoke the operation + FirewallRuleResource result = await firewallRule.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + FirewallRuleData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_DeleteFirewallRuleGeneratedByPolicy() + { + // Generated from example definition: 2025-02-01-preview/FirewallRules_Delete_MaximumSet_Gen.json + // this example is just showing the usage of "FirewallRule_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this FirewallRuleResource created on azure + // for more information of creating FirewallRuleResource, please refer to the document of FirewallRuleResource + string subscriptionId = "a2b3c4d5-6789-0123-4567-89abcdef1234"; + string resourceGroupName = "rg-networking-operations"; + string fleetName = "data-fleet-01"; + string fleetspaceName = "prod-environment"; + string firewallRuleName = "allow-10-0-0-0-24-to-10-1-0-0-24"; + ResourceIdentifier firewallRuleResourceId = FirewallRuleResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, fleetspaceName, firewallRuleName); + FirewallRuleResource firewallRule = client.GetFirewallRuleResource(firewallRuleResourceId); + + // invoke the operation + await firewallRule.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_CreateOrUpdateFirewallRuleGeneratedByPolicy() + { + // Generated from example definition: 2025-02-01-preview/FirewallRules_CreateOrUpdate_MaximumSet_Gen.json + // this example is just showing the usage of "FirewallRule_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this FirewallRuleResource created on azure + // for more information of creating FirewallRuleResource, please refer to the document of FirewallRuleResource + string subscriptionId = "a2b3c4d5-6789-0123-4567-89abcdef1234"; + string resourceGroupName = "rg-networking-operations"; + string fleetName = "data-fleet-01"; + string fleetspaceName = "prod-environment"; + string firewallRuleName = "allow-10-0-0-0-24-to-10-1-0-0-24"; + ResourceIdentifier firewallRuleResourceId = FirewallRuleResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, fleetspaceName, firewallRuleName); + FirewallRuleResource firewallRule = client.GetFirewallRuleResource(firewallRuleResourceId); + + // invoke the operation + FirewallRuleData data = new FirewallRuleData + { + Properties = new FirewallRuleProperties + { + StartIPAddress = "10.0.0.0", + EndIPAddress = "10.0.0.255", + }, + }; + ArmOperation lro = await firewallRule.UpdateAsync(WaitUntil.Completed, data); + FirewallRuleResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + FirewallRuleData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_FleetCollection.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_FleetCollection.cs new file mode 100644 index 000000000000..da1a1955775a --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_FleetCollection.cs @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.DatabaseFleetManager.Models; +using Azure.ResourceManager.Resources; +using NUnit.Framework; + +namespace Azure.ResourceManager.DatabaseFleetManager.Samples +{ + public partial class Sample_FleetCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_FleetsCreateOrUpdateMaximumSetGenGeneratedByMaximumSetRule() + { + // Generated from example definition: 2025-02-01-preview/Fleets_CreateOrUpdate_MaximumSet_Gen.json + // this example is just showing the usage of "Fleet_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "C3897315-3847-4D8A-B2FC-7307B066AD63"; + string resourceGroupName = "rg-database-fleet-manager"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this FleetResource + FleetCollection collection = resourceGroupResource.GetFleets(); + + // invoke the operation + string fleetName = "production-fleet-01"; + FleetData data = new FleetData(new AzureLocation("East US")) + { + Properties = new FleetProperties + { + Description = "Production fleet for high availability and scalability.", + }, + Tags = +{ +["environment"] = "production", +["owner"] = "team-database" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, fleetName, data); + FleetResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + FleetData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_FleetsGetMaximumSetGenGeneratedByMaximumSetRule() + { + // Generated from example definition: 2025-02-01-preview/Fleets_Get_MaximumSet_Gen.json + // this example is just showing the usage of "Fleet_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "C3897315-3847-4D8A-B2FC-7307B066AD63"; + string resourceGroupName = "rg-database-fleet-manager"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this FleetResource + FleetCollection collection = resourceGroupResource.GetFleets(); + + // invoke the operation + string fleetName = "production-fleet-01"; + FleetResource result = await collection.GetAsync(fleetName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + FleetData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_FleetsListByResourceGroupMaximumSetGenGeneratedByMaximumSetRule() + { + // Generated from example definition: 2025-02-01-preview/Fleets_ListByResourceGroup_MaximumSet_Gen.json + // this example is just showing the usage of "Fleet_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "C3897315-3847-4D8A-B2FC-7307B066AD63"; + string resourceGroupName = "rg-database-fleet-manager"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this FleetResource + FleetCollection collection = resourceGroupResource.GetFleets(); + + // invoke the operation and iterate over the result + await foreach (FleetResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + FleetData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_FleetsGetMaximumSetGenGeneratedByMaximumSetRule() + { + // Generated from example definition: 2025-02-01-preview/Fleets_Get_MaximumSet_Gen.json + // this example is just showing the usage of "Fleet_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "C3897315-3847-4D8A-B2FC-7307B066AD63"; + string resourceGroupName = "rg-database-fleet-manager"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this FleetResource + FleetCollection collection = resourceGroupResource.GetFleets(); + + // invoke the operation + string fleetName = "production-fleet-01"; + bool result = await collection.ExistsAsync(fleetName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_FleetsGetMaximumSetGenGeneratedByMaximumSetRule() + { + // Generated from example definition: 2025-02-01-preview/Fleets_Get_MaximumSet_Gen.json + // this example is just showing the usage of "Fleet_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "C3897315-3847-4D8A-B2FC-7307B066AD63"; + string resourceGroupName = "rg-database-fleet-manager"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this FleetResource + FleetCollection collection = resourceGroupResource.GetFleets(); + + // invoke the operation + string fleetName = "production-fleet-01"; + NullableResponse response = await collection.GetIfExistsAsync(fleetName); + FleetResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + FleetData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_FleetDatabaseCollection.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_FleetDatabaseCollection.cs new file mode 100644 index 000000000000..6a008639d091 --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_FleetDatabaseCollection.cs @@ -0,0 +1,232 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.DatabaseFleetManager.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.DatabaseFleetManager.Samples +{ + public partial class Sample_FleetDatabaseCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateOrUpdateDatabaseInFleetGeneratedByPolicy() + { + // Generated from example definition: 2025-02-01-preview/FleetDatabases_CreateOrUpdate_MaximumSet_Gen.json + // this example is just showing the usage of "FleetDatabase_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this FleetspaceResource created on azure + // for more information of creating FleetspaceResource, please refer to the document of FleetspaceResource + string subscriptionId = "C3897315-3847-4D8A-B2FC-7307B066AD63"; + string resourceGroupName = "rg-database-operations"; + string fleetName = "data-fleet-01"; + string fleetspaceName = "prod-environment"; + ResourceIdentifier fleetspaceResourceId = FleetspaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, fleetspaceName); + FleetspaceResource fleetspace = client.GetFleetspaceResource(fleetspaceResourceId); + + // get the collection of this FleetDatabaseResource + FleetDatabaseCollection collection = fleetspace.GetFleetDatabases(); + + // invoke the operation + string databaseName = "customer-db-prod"; + FleetDatabaseData data = new FleetDatabaseData + { + Properties = new FleetDatabaseProperties + { + CreateMode = DatabaseCreateMode.Default, + TierName = "Premium", + RestoreFromOn = DateTimeOffset.Parse("2024-11-06T09:16:05.048Z"), + SourceDatabaseName = "existing-db-prod", + ResourceTags = +{ +["project"] = "Customer Data" +}, + Identity = new IdentityProperties + { + IdentityType = IdentityType.None, + UserAssignedIdentities = {new DatabaseIdentity +{ +ResourceId = new ResourceIdentifier("/subscriptions/12345678-90ab-cdef-1234-567890abcdef/resourceGroups/rg-database-operations/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity-01"), +PrincipalId = Guid.Parse("a2b3c4d5-6789-0123-4567-89abcdef1234"), +ClientId = Guid.Parse("a2b3c4d5-6789-0123-4567-89abcdef1234"), +}}, + FederatedClientId = Guid.Parse("a2b3c4d5-6789-0123-4567-89abcdef1234"), + }, + TransparentDataEncryption = new TransparentDataEncryption + { + KeyUri = new Uri("https://keyvaultname.vault.azure.net/keys/myKey/12345"), + Keys = { "key1" }, + EnableAutoRotation = true, + }, + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, databaseName, data); + FleetDatabaseResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + FleetDatabaseData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_RetrieveDatabaseDetailsInFleetGeneratedByPolicy() + { + // Generated from example definition: 2025-02-01-preview/FleetDatabases_Get_MaximumSet_Gen.json + // this example is just showing the usage of "FleetDatabase_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this FleetspaceResource created on azure + // for more information of creating FleetspaceResource, please refer to the document of FleetspaceResource + string subscriptionId = "C3897315-3847-4D8A-B2FC-7307B066AD63"; + string resourceGroupName = "rg-database-operations"; + string fleetName = "data-fleet-01"; + string fleetspaceName = "prod-environment"; + ResourceIdentifier fleetspaceResourceId = FleetspaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, fleetspaceName); + FleetspaceResource fleetspace = client.GetFleetspaceResource(fleetspaceResourceId); + + // get the collection of this FleetDatabaseResource + FleetDatabaseCollection collection = fleetspace.GetFleetDatabases(); + + // invoke the operation + string databaseName = "customer-db-prod"; + FleetDatabaseResource result = await collection.GetAsync(databaseName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + FleetDatabaseData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_ListDatabasesInFleetspaceGeneratedByPolicy() + { + // Generated from example definition: 2025-02-01-preview/FleetDatabases_ListByFleetspace_MaximumSet_Gen.json + // this example is just showing the usage of "FleetDatabase_ListByFleetspace" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this FleetspaceResource created on azure + // for more information of creating FleetspaceResource, please refer to the document of FleetspaceResource + string subscriptionId = "C3897315-3847-4D8A-B2FC-7307B066AD63"; + string resourceGroupName = "rg-database-operations"; + string fleetName = "data-fleet-01"; + string fleetspaceName = "prod-environment"; + ResourceIdentifier fleetspaceResourceId = FleetspaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, fleetspaceName); + FleetspaceResource fleetspace = client.GetFleetspaceResource(fleetspaceResourceId); + + // get the collection of this FleetDatabaseResource + FleetDatabaseCollection collection = fleetspace.GetFleetDatabases(); + + // invoke the operation and iterate over the result + await foreach (FleetDatabaseResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + FleetDatabaseData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_RetrieveDatabaseDetailsInFleetGeneratedByPolicy() + { + // Generated from example definition: 2025-02-01-preview/FleetDatabases_Get_MaximumSet_Gen.json + // this example is just showing the usage of "FleetDatabase_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this FleetspaceResource created on azure + // for more information of creating FleetspaceResource, please refer to the document of FleetspaceResource + string subscriptionId = "C3897315-3847-4D8A-B2FC-7307B066AD63"; + string resourceGroupName = "rg-database-operations"; + string fleetName = "data-fleet-01"; + string fleetspaceName = "prod-environment"; + ResourceIdentifier fleetspaceResourceId = FleetspaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, fleetspaceName); + FleetspaceResource fleetspace = client.GetFleetspaceResource(fleetspaceResourceId); + + // get the collection of this FleetDatabaseResource + FleetDatabaseCollection collection = fleetspace.GetFleetDatabases(); + + // invoke the operation + string databaseName = "customer-db-prod"; + bool result = await collection.ExistsAsync(databaseName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_RetrieveDatabaseDetailsInFleetGeneratedByPolicy() + { + // Generated from example definition: 2025-02-01-preview/FleetDatabases_Get_MaximumSet_Gen.json + // this example is just showing the usage of "FleetDatabase_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this FleetspaceResource created on azure + // for more information of creating FleetspaceResource, please refer to the document of FleetspaceResource + string subscriptionId = "C3897315-3847-4D8A-B2FC-7307B066AD63"; + string resourceGroupName = "rg-database-operations"; + string fleetName = "data-fleet-01"; + string fleetspaceName = "prod-environment"; + ResourceIdentifier fleetspaceResourceId = FleetspaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, fleetspaceName); + FleetspaceResource fleetspace = client.GetFleetspaceResource(fleetspaceResourceId); + + // get the collection of this FleetDatabaseResource + FleetDatabaseCollection collection = fleetspace.GetFleetDatabases(); + + // invoke the operation + string databaseName = "customer-db-prod"; + NullableResponse response = await collection.GetIfExistsAsync(databaseName); + FleetDatabaseResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + FleetDatabaseData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_FleetDatabaseResource.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_FleetDatabaseResource.cs new file mode 100644 index 000000000000..37e47d452231 --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_FleetDatabaseResource.cs @@ -0,0 +1,236 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.DatabaseFleetManager.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.DatabaseFleetManager.Samples +{ + public partial class Sample_FleetDatabaseResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_RetrieveDatabaseDetailsInFleetGeneratedByPolicy() + { + // Generated from example definition: 2025-02-01-preview/FleetDatabases_Get_MaximumSet_Gen.json + // this example is just showing the usage of "FleetDatabase_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this FleetDatabaseResource created on azure + // for more information of creating FleetDatabaseResource, please refer to the document of FleetDatabaseResource + string subscriptionId = "C3897315-3847-4D8A-B2FC-7307B066AD63"; + string resourceGroupName = "rg-database-operations"; + string fleetName = "data-fleet-01"; + string fleetspaceName = "prod-environment"; + string databaseName = "customer-db-prod"; + ResourceIdentifier fleetDatabaseResourceId = FleetDatabaseResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, fleetspaceName, databaseName); + FleetDatabaseResource fleetDatabase = client.GetFleetDatabaseResource(fleetDatabaseResourceId); + + // invoke the operation + FleetDatabaseResource result = await fleetDatabase.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + FleetDatabaseData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_FleetDatabasesDeleteMaximumSetGenGeneratedByMaximumSetRule() + { + // Generated from example definition: 2025-02-01-preview/FleetDatabases_Delete_MaximumSet_Gen.json + // this example is just showing the usage of "FleetDatabase_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this FleetDatabaseResource created on azure + // for more information of creating FleetDatabaseResource, please refer to the document of FleetDatabaseResource + string subscriptionId = "C3897315-3847-4D8A-B2FC-7307B066AD63"; + string resourceGroupName = "rg-database-operations"; + string fleetName = "data-fleet-01"; + string fleetspaceName = "prod-environment"; + string databaseName = "customer-db-prod"; + ResourceIdentifier fleetDatabaseResourceId = FleetDatabaseResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, fleetspaceName, databaseName); + FleetDatabaseResource fleetDatabase = client.GetFleetDatabaseResource(fleetDatabaseResourceId); + + // invoke the operation + await fleetDatabase.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_UpdateDatabaseInFleetspaceGeneratedByPolicy() + { + // Generated from example definition: 2025-02-01-preview/FleetDatabases_Update_MaximumSet_Gen.json + // this example is just showing the usage of "FleetDatabase_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this FleetDatabaseResource created on azure + // for more information of creating FleetDatabaseResource, please refer to the document of FleetDatabaseResource + string subscriptionId = "C3897315-3847-4D8A-B2FC-7307B066AD63"; + string resourceGroupName = "rgdatabasefleetmanager"; + string fleetName = "production-fleet"; + string fleetspaceName = "primary-space"; + string databaseName = "customer-database-prod"; + ResourceIdentifier fleetDatabaseResourceId = FleetDatabaseResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, fleetspaceName, databaseName); + FleetDatabaseResource fleetDatabase = client.GetFleetDatabaseResource(fleetDatabaseResourceId); + + // invoke the operation + FleetDatabaseData data = new FleetDatabaseData + { + Properties = new FleetDatabaseProperties + { + CreateMode = DatabaseCreateMode.Default, + TierName = "Standard", + RestoreFromOn = DateTimeOffset.Parse("2024-11-06T09:16:05.048Z"), + SourceDatabaseName = "customer-database-staging", + ResourceTags = +{ +["environment"] = "production", +["owner"] = "database-team" +}, + Identity = new IdentityProperties + { + IdentityType = IdentityType.UserAssigned, + UserAssignedIdentities = {new DatabaseIdentity +{ +ResourceId = new ResourceIdentifier("/subscriptions/C3897315-3847-4D8A-B2FC-7307B066AD63/resourcegroups/rgdatabasefleetmanager/providers/Microsoft.ManagedIdentity/userAssignedIdentities/db-identity"), +PrincipalId = Guid.Parse("f8b7c2d3-b9c4-4f3b-85cd-3d56c6e49f92"), +ClientId = Guid.Parse("d2d8b19e-c4f7-4c62-8e8d-7f0f96d94e39"), +}}, + FederatedClientId = Guid.Parse("a2b3c4d5-6789-0123-4567-89abcdef1234"), + }, + TransparentDataEncryption = new TransparentDataEncryption + { + KeyUri = new Uri("https://keyvault-contoso.vault.azure.net/keys/db-encryption-key/abc123"), + Keys = { "abc123", "xyz789" }, + EnableAutoRotation = true, + }, + }, + }; + ArmOperation lro = await fleetDatabase.UpdateAsync(WaitUntil.Completed, data); + FleetDatabaseResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + FleetDatabaseData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task ChangeTier_ChangeDatabaseTierGeneratedByPolicy() + { + // Generated from example definition: 2025-02-01-preview/FleetDatabases_ChangeTier_MaximumSet_Gen.json + // this example is just showing the usage of "FleetDatabases_ChangeTier" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this FleetDatabaseResource created on azure + // for more information of creating FleetDatabaseResource, please refer to the document of FleetDatabaseResource + string subscriptionId = "C3897315-3847-4D8A-B2FC-7307B066AD63"; + string resourceGroupName = "rg-database-operations"; + string fleetName = "data-fleet-01"; + string fleetspaceName = "prod-environment"; + string databaseName = "customer-db-prod"; + ResourceIdentifier fleetDatabaseResourceId = FleetDatabaseResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, fleetspaceName, databaseName); + FleetDatabaseResource fleetDatabase = client.GetFleetDatabaseResource(fleetDatabaseResourceId); + + // invoke the operation + DatabaseChangeTierProperties body = new DatabaseChangeTierProperties + { + TargetTierName = "Standard", + }; + await fleetDatabase.ChangeTierAsync(WaitUntil.Completed, body); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Rename_RenameDatabaseInFleetspaceGeneratedByPolicy() + { + // Generated from example definition: 2025-02-01-preview/FleetDatabases_Rename_MaximumSet_Gen.json + // this example is just showing the usage of "FleetDatabases_Rename" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this FleetDatabaseResource created on azure + // for more information of creating FleetDatabaseResource, please refer to the document of FleetDatabaseResource + string subscriptionId = "C3897315-3847-4D8A-B2FC-7307B066AD63"; + string resourceGroupName = "rg-database-operations"; + string fleetName = "data-fleet-01"; + string fleetspaceName = "prod-environment"; + string databaseName = "customer-db-prod"; + ResourceIdentifier fleetDatabaseResourceId = FleetDatabaseResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, fleetspaceName, databaseName); + FleetDatabaseResource fleetDatabase = client.GetFleetDatabaseResource(fleetDatabaseResourceId); + + // invoke the operation + DatabaseRenameProperties body = new DatabaseRenameProperties + { + NewName = "new-customer-db-prod", + }; + await fleetDatabase.RenameAsync(WaitUntil.Completed, body); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Revert_RevertTransparentDataEncryptionInDatabaseGeneratedByPolicy() + { + // Generated from example definition: 2025-02-01-preview/FleetDatabases_Revert_MaximumSet_Gen.json + // this example is just showing the usage of "FleetDatabases_Revert" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this FleetDatabaseResource created on azure + // for more information of creating FleetDatabaseResource, please refer to the document of FleetDatabaseResource + string subscriptionId = "C3897315-3847-4D8A-B2FC-7307B066AD63"; + string resourceGroupName = "rg-database-operations"; + string fleetName = "data-fleet-01"; + string fleetspaceName = "prod-environment"; + string databaseName = "customer-db-prod"; + ResourceIdentifier fleetDatabaseResourceId = FleetDatabaseResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, fleetspaceName, databaseName); + FleetDatabaseResource fleetDatabase = client.GetFleetDatabaseResource(fleetDatabaseResourceId); + + // invoke the operation + await fleetDatabase.RevertAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_FleetResource.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_FleetResource.cs new file mode 100644 index 000000000000..89a408825e23 --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_FleetResource.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.DatabaseFleetManager.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.DatabaseFleetManager.Samples +{ + public partial class Sample_FleetResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_FleetsGetMaximumSetGenGeneratedByMaximumSetRule() + { + // Generated from example definition: 2025-02-01-preview/Fleets_Get_MaximumSet_Gen.json + // this example is just showing the usage of "Fleet_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this FleetResource created on azure + // for more information of creating FleetResource, please refer to the document of FleetResource + string subscriptionId = "C3897315-3847-4D8A-B2FC-7307B066AD63"; + string resourceGroupName = "rg-database-fleet-manager"; + string fleetName = "production-fleet-01"; + ResourceIdentifier fleetResourceId = FleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); + FleetResource fleet = client.GetFleetResource(fleetResourceId); + + // invoke the operation + FleetResource result = await fleet.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + FleetData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_FleetsDeleteMaximumSetGenGeneratedByMaximumSetRule() + { + // Generated from example definition: 2025-02-01-preview/Fleets_Delete_MaximumSet_Gen.json + // this example is just showing the usage of "Fleet_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this FleetResource created on azure + // for more information of creating FleetResource, please refer to the document of FleetResource + string subscriptionId = "C3897315-3847-4D8A-B2FC-7307B066AD63"; + string resourceGroupName = "rg-database-fleet-manager"; + string fleetName = "production-fleet-01"; + ResourceIdentifier fleetResourceId = FleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); + FleetResource fleet = client.GetFleetResource(fleetResourceId); + + // invoke the operation + await fleet.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_FleetsUpdateMaximumSetGenGeneratedByMaximumSetRule() + { + // Generated from example definition: 2025-02-01-preview/Fleets_Update_MaximumSet_Gen.json + // this example is just showing the usage of "Fleet_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this FleetResource created on azure + // for more information of creating FleetResource, please refer to the document of FleetResource + string subscriptionId = "C3897315-3847-4D8A-B2FC-7307B066AD63"; + string resourceGroupName = "rg-database-fleet-manager"; + string fleetName = "critical-production-fleet"; + ResourceIdentifier fleetResourceId = FleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); + FleetResource fleet = client.GetFleetResource(fleetResourceId); + + // invoke the operation + FleetPatch patch = new FleetPatch + { + Tags = +{ +["environment"] = "production", +["owner"] = "team-database" +}, + Properties = new FleetProperties + { + Description = "Fleet containing critical production databases and high availability configurations.", + }, + }; + ArmOperation lro = await fleet.UpdateAsync(WaitUntil.Completed, patch); + FleetResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + FleetData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_FleetTierCollection.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_FleetTierCollection.cs new file mode 100644 index 000000000000..cd978d6286e0 --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_FleetTierCollection.cs @@ -0,0 +1,213 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.DatabaseFleetManager.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.DatabaseFleetManager.Samples +{ + public partial class Sample_FleetTierCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_FleetTiersCreateOrUpdateMaximumSetGenGeneratedByMaximumSetRule() + { + // Generated from example definition: 2025-02-01-preview/FleetTiers_CreateOrUpdate_MaximumSet_Gen.json + // this example is just showing the usage of "FleetTier_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this FleetResource created on azure + // for more information of creating FleetResource, please refer to the document of FleetResource + string subscriptionId = "C3897315-3847-4D8A-B2FC-7307B066AD63"; + string resourceGroupName = "rg-database-fleet-manager"; + string fleetName = "critical-production-fleet"; + ResourceIdentifier fleetResourceId = FleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); + FleetResource fleet = client.GetFleetResource(fleetResourceId); + + // get the collection of this FleetTierResource + FleetTierCollection collection = fleet.GetFleetTiers(); + + // invoke the operation + string tierName = "general-purpose-tier"; + FleetTierData data = new FleetTierData + { + Properties = new FleetTierProperties + { + Serverless = false, + Pooled = true, + ServiceTier = "GeneralPurpose", + Family = "Gen5", + Capacity = 4, + PoolNumOfDatabasesMax = 10, + HighAvailabilityReplicaCount = 5, + ZoneRedundancy = ZoneRedundancy.Disabled, + DatabaseCapacityMin = 0, + DatabaseCapacityMax = 4, + DatabaseSizeGbMax = 50, + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, tierName, data); + FleetTierResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + FleetTierData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_FleetTiersGetMaximumSetGenGeneratedByMaximumSetRule() + { + // Generated from example definition: 2025-02-01-preview/FleetTiers_Get_MaximumSet_Gen.json + // this example is just showing the usage of "FleetTier_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this FleetResource created on azure + // for more information of creating FleetResource, please refer to the document of FleetResource + string subscriptionId = "C3897315-3847-4D8A-B2FC-7307B066AD63"; + string resourceGroupName = "rg-database-fleet-manager"; + string fleetName = "critical-production-fleet"; + ResourceIdentifier fleetResourceId = FleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); + FleetResource fleet = client.GetFleetResource(fleetResourceId); + + // get the collection of this FleetTierResource + FleetTierCollection collection = fleet.GetFleetTiers(); + + // invoke the operation + string tierName = "general-purpose-tier"; + FleetTierResource result = await collection.GetAsync(tierName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + FleetTierData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_FleetTiersListByFleetMaximumSetGenGeneratedByMaximumSetRule() + { + // Generated from example definition: 2025-02-01-preview/FleetTiers_ListByFleet_MaximumSet_Gen.json + // this example is just showing the usage of "FleetTier_ListByFleet" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this FleetResource created on azure + // for more information of creating FleetResource, please refer to the document of FleetResource + string subscriptionId = "C3897315-3847-4D8A-B2FC-7307B066AD63"; + string resourceGroupName = "rg-database-fleet-manager"; + string fleetName = "critical-production-fleet"; + ResourceIdentifier fleetResourceId = FleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); + FleetResource fleet = client.GetFleetResource(fleetResourceId); + + // get the collection of this FleetTierResource + FleetTierCollection collection = fleet.GetFleetTiers(); + + // invoke the operation and iterate over the result + await foreach (FleetTierResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + FleetTierData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_FleetTiersGetMaximumSetGenGeneratedByMaximumSetRule() + { + // Generated from example definition: 2025-02-01-preview/FleetTiers_Get_MaximumSet_Gen.json + // this example is just showing the usage of "FleetTier_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this FleetResource created on azure + // for more information of creating FleetResource, please refer to the document of FleetResource + string subscriptionId = "C3897315-3847-4D8A-B2FC-7307B066AD63"; + string resourceGroupName = "rg-database-fleet-manager"; + string fleetName = "critical-production-fleet"; + ResourceIdentifier fleetResourceId = FleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); + FleetResource fleet = client.GetFleetResource(fleetResourceId); + + // get the collection of this FleetTierResource + FleetTierCollection collection = fleet.GetFleetTiers(); + + // invoke the operation + string tierName = "general-purpose-tier"; + bool result = await collection.ExistsAsync(tierName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_FleetTiersGetMaximumSetGenGeneratedByMaximumSetRule() + { + // Generated from example definition: 2025-02-01-preview/FleetTiers_Get_MaximumSet_Gen.json + // this example is just showing the usage of "FleetTier_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this FleetResource created on azure + // for more information of creating FleetResource, please refer to the document of FleetResource + string subscriptionId = "C3897315-3847-4D8A-B2FC-7307B066AD63"; + string resourceGroupName = "rg-database-fleet-manager"; + string fleetName = "critical-production-fleet"; + ResourceIdentifier fleetResourceId = FleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); + FleetResource fleet = client.GetFleetResource(fleetResourceId); + + // get the collection of this FleetTierResource + FleetTierCollection collection = fleet.GetFleetTiers(); + + // invoke the operation + string tierName = "general-purpose-tier"; + NullableResponse response = await collection.GetIfExistsAsync(tierName); + FleetTierResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + FleetTierData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_FleetTierResource.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_FleetTierResource.cs new file mode 100644 index 000000000000..f087512991d3 --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_FleetTierResource.cs @@ -0,0 +1,157 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.DatabaseFleetManager.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.DatabaseFleetManager.Samples +{ + public partial class Sample_FleetTierResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_FleetTiersGetMaximumSetGenGeneratedByMaximumSetRule() + { + // Generated from example definition: 2025-02-01-preview/FleetTiers_Get_MaximumSet_Gen.json + // this example is just showing the usage of "FleetTier_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this FleetTierResource created on azure + // for more information of creating FleetTierResource, please refer to the document of FleetTierResource + string subscriptionId = "C3897315-3847-4D8A-B2FC-7307B066AD63"; + string resourceGroupName = "rg-database-fleet-manager"; + string fleetName = "critical-production-fleet"; + string tierName = "general-purpose-tier"; + ResourceIdentifier fleetTierResourceId = FleetTierResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, tierName); + FleetTierResource fleetTier = client.GetFleetTierResource(fleetTierResourceId); + + // invoke the operation + FleetTierResource result = await fleetTier.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + FleetTierData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_FleetTiersDeleteMaximumSetGenGeneratedByMaximumSetRule() + { + // Generated from example definition: 2025-02-01-preview/FleetTiers_Delete_MaximumSet_Gen.json + // this example is just showing the usage of "FleetTier_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this FleetTierResource created on azure + // for more information of creating FleetTierResource, please refer to the document of FleetTierResource + string subscriptionId = "C3897315-3847-4D8A-B2FC-7307B066AD63"; + string resourceGroupName = "rg-database-fleet-manager"; + string fleetName = "critical-production-fleet"; + string tierName = "general-purpose-tier"; + ResourceIdentifier fleetTierResourceId = FleetTierResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, tierName); + FleetTierResource fleetTier = client.GetFleetTierResource(fleetTierResourceId); + + // invoke the operation + await fleetTier.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_FleetTiersUpdateMaximumSetGenGeneratedByMaximumSetRule() + { + // Generated from example definition: 2025-02-01-preview/FleetTiers_Update_MaximumSet_Gen.json + // this example is just showing the usage of "FleetTier_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this FleetTierResource created on azure + // for more information of creating FleetTierResource, please refer to the document of FleetTierResource + string subscriptionId = "C3897315-3847-4D8A-B2FC-7307B066AD63"; + string resourceGroupName = "rg-database-fleet-manager"; + string fleetName = "critical-production-fleet"; + string tierName = "general-purpose-tier"; + ResourceIdentifier fleetTierResourceId = FleetTierResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, tierName); + FleetTierResource fleetTier = client.GetFleetTierResource(fleetTierResourceId); + + // invoke the operation + FleetTierData data = new FleetTierData + { + Properties = new FleetTierProperties + { + Serverless = false, + Pooled = true, + ServiceTier = "GeneralPurpose", + Family = "Gen5", + Capacity = 4, + PoolNumOfDatabasesMax = 10, + HighAvailabilityReplicaCount = 5, + ZoneRedundancy = ZoneRedundancy.Disabled, + DatabaseCapacityMin = 0, + DatabaseCapacityMax = 4, + DatabaseSizeGbMax = 50, + }, + }; + ArmOperation lro = await fleetTier.UpdateAsync(WaitUntil.Completed, data); + FleetTierResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + FleetTierData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Disable_FleetTiersDisableMaximumSetGenGeneratedByMaximumSetRule() + { + // Generated from example definition: 2025-02-01-preview/FleetTiers_Disable_MaximumSet_Gen.json + // this example is just showing the usage of "FleetTiers_Disable" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this FleetTierResource created on azure + // for more information of creating FleetTierResource, please refer to the document of FleetTierResource + string subscriptionId = "C3897315-3847-4D8A-B2FC-7307B066AD63"; + string resourceGroupName = "rg-database-fleet-manager"; + string fleetName = "critical-production-fleet"; + string tierName = "general-purpose-tier"; + ResourceIdentifier fleetTierResourceId = FleetTierResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, tierName); + FleetTierResource fleetTier = client.GetFleetTierResource(fleetTierResourceId); + + // invoke the operation + FleetTierResource result = await fleetTier.DisableAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + FleetTierData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_FleetspaceCollection.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_FleetspaceCollection.cs new file mode 100644 index 000000000000..a0888b0588bf --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_FleetspaceCollection.cs @@ -0,0 +1,211 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.DatabaseFleetManager.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.DatabaseFleetManager.Samples +{ + public partial class Sample_FleetspaceCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateOrUpdateFleetspaceGeneratedByPolicy() + { + // Generated from example definition: 2025-02-01-preview/Fleetspaces_CreateOrUpdate_MaximumSet_Gen.json + // this example is just showing the usage of "Fleetspace_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this FleetResource created on azure + // for more information of creating FleetResource, please refer to the document of FleetResource + string subscriptionId = "C3897315-3847-4D8A-B2FC-7307B066AD63"; + string resourceGroupName = "rgdatabasefleetmanager"; + string fleetName = "production-fleet"; + ResourceIdentifier fleetResourceId = FleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); + FleetResource fleet = client.GetFleetResource(fleetResourceId); + + // get the collection of this FleetspaceResource + FleetspaceCollection collection = fleet.GetFleetspaces(); + + // invoke the operation + string fleetspaceName = "primary-space"; + FleetspaceData data = new FleetspaceData + { + Properties = new FleetspaceProperties + { + CapacityMax = 150000, + MainPrincipal = new MainPrincipal + { + Login = "adminUser", + ApplicationId = Guid.Parse("d2d8b19e-c4f7-4c62-8e8d-7f0f96d94e39"), + ObjectId = Guid.Parse("f8b7c2d3-b9c4-4f3b-85cd-3d56c6e49f92"), + TenantId = Guid.Parse("bde45d44-ec42-45b8-a5a2-c5b998c65ef6"), + PrincipalType = PrincipalType.Application, + }, + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, fleetspaceName, data); + FleetspaceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + FleetspaceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_FleetspacesGetMaximumSetGenGeneratedByMaximumSetRule() + { + // Generated from example definition: 2025-02-01-preview/Fleetspaces_Get_MaximumSet_Gen.json + // this example is just showing the usage of "Fleetspace_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this FleetResource created on azure + // for more information of creating FleetResource, please refer to the document of FleetResource + string subscriptionId = "C3897315-3847-4D8A-B2FC-7307B066AD63"; + string resourceGroupName = "rgdatabasefleetmanager"; + string fleetName = "production-fleet"; + ResourceIdentifier fleetResourceId = FleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); + FleetResource fleet = client.GetFleetResource(fleetResourceId); + + // get the collection of this FleetspaceResource + FleetspaceCollection collection = fleet.GetFleetspaces(); + + // invoke the operation + string fleetspaceName = "primary-space"; + FleetspaceResource result = await collection.GetAsync(fleetspaceName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + FleetspaceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_FleetspacesListByFleetMaximumSetGenGeneratedByMaximumSetRule() + { + // Generated from example definition: 2025-02-01-preview/Fleetspaces_ListByFleet_MaximumSet_Gen.json + // this example is just showing the usage of "Fleetspace_ListByFleet" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this FleetResource created on azure + // for more information of creating FleetResource, please refer to the document of FleetResource + string subscriptionId = "C3897315-3847-4D8A-B2FC-7307B066AD63"; + string resourceGroupName = "rg-database-fleet-manager"; + string fleetName = "production-fleet"; + ResourceIdentifier fleetResourceId = FleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); + FleetResource fleet = client.GetFleetResource(fleetResourceId); + + // get the collection of this FleetspaceResource + FleetspaceCollection collection = fleet.GetFleetspaces(); + + // invoke the operation and iterate over the result + await foreach (FleetspaceResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + FleetspaceData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_FleetspacesGetMaximumSetGenGeneratedByMaximumSetRule() + { + // Generated from example definition: 2025-02-01-preview/Fleetspaces_Get_MaximumSet_Gen.json + // this example is just showing the usage of "Fleetspace_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this FleetResource created on azure + // for more information of creating FleetResource, please refer to the document of FleetResource + string subscriptionId = "C3897315-3847-4D8A-B2FC-7307B066AD63"; + string resourceGroupName = "rgdatabasefleetmanager"; + string fleetName = "production-fleet"; + ResourceIdentifier fleetResourceId = FleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); + FleetResource fleet = client.GetFleetResource(fleetResourceId); + + // get the collection of this FleetspaceResource + FleetspaceCollection collection = fleet.GetFleetspaces(); + + // invoke the operation + string fleetspaceName = "primary-space"; + bool result = await collection.ExistsAsync(fleetspaceName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_FleetspacesGetMaximumSetGenGeneratedByMaximumSetRule() + { + // Generated from example definition: 2025-02-01-preview/Fleetspaces_Get_MaximumSet_Gen.json + // this example is just showing the usage of "Fleetspace_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this FleetResource created on azure + // for more information of creating FleetResource, please refer to the document of FleetResource + string subscriptionId = "C3897315-3847-4D8A-B2FC-7307B066AD63"; + string resourceGroupName = "rgdatabasefleetmanager"; + string fleetName = "production-fleet"; + ResourceIdentifier fleetResourceId = FleetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName); + FleetResource fleet = client.GetFleetResource(fleetResourceId); + + // get the collection of this FleetspaceResource + FleetspaceCollection collection = fleet.GetFleetspaces(); + + // invoke the operation + string fleetspaceName = "primary-space"; + NullableResponse response = await collection.GetIfExistsAsync(fleetspaceName); + FleetspaceResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + FleetspaceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_FleetspaceResource.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_FleetspaceResource.cs new file mode 100644 index 000000000000..210b86120dc8 --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_FleetspaceResource.cs @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.DatabaseFleetManager.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.DatabaseFleetManager.Samples +{ + public partial class Sample_FleetspaceResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_FleetspacesGetMaximumSetGenGeneratedByMaximumSetRule() + { + // Generated from example definition: 2025-02-01-preview/Fleetspaces_Get_MaximumSet_Gen.json + // this example is just showing the usage of "Fleetspace_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this FleetspaceResource created on azure + // for more information of creating FleetspaceResource, please refer to the document of FleetspaceResource + string subscriptionId = "C3897315-3847-4D8A-B2FC-7307B066AD63"; + string resourceGroupName = "rgdatabasefleetmanager"; + string fleetName = "production-fleet"; + string fleetspaceName = "primary-space"; + ResourceIdentifier fleetspaceResourceId = FleetspaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, fleetspaceName); + FleetspaceResource fleetspace = client.GetFleetspaceResource(fleetspaceResourceId); + + // invoke the operation + FleetspaceResource result = await fleetspace.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + FleetspaceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_FleetspacesDeleteMaximumSetGenGeneratedByMaximumSetRule() + { + // Generated from example definition: 2025-02-01-preview/Fleetspaces_Delete_MaximumSet_Gen.json + // this example is just showing the usage of "Fleetspace_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this FleetspaceResource created on azure + // for more information of creating FleetspaceResource, please refer to the document of FleetspaceResource + string subscriptionId = "C3897315-3847-4D8A-B2FC-7307B066AD63"; + string resourceGroupName = "rgdatabasefleetmanager"; + string fleetName = "production-fleet"; + string fleetspaceName = "primary-space"; + ResourceIdentifier fleetspaceResourceId = FleetspaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, fleetspaceName); + FleetspaceResource fleetspace = client.GetFleetspaceResource(fleetspaceResourceId); + + // invoke the operation + await fleetspace.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_FleetspacesUpdateMaximumSetGenGeneratedByMaximumSetRule() + { + // Generated from example definition: 2025-02-01-preview/Fleetspaces_Update_MaximumSet_Gen.json + // this example is just showing the usage of "Fleetspace_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this FleetspaceResource created on azure + // for more information of creating FleetspaceResource, please refer to the document of FleetspaceResource + string subscriptionId = "C3897315-3847-4D8A-B2FC-7307B066AD63"; + string resourceGroupName = "rg-database-fleet-manager"; + string fleetName = "production-fleet"; + string fleetspaceName = "primary-space"; + ResourceIdentifier fleetspaceResourceId = FleetspaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, fleetspaceName); + FleetspaceResource fleetspace = client.GetFleetspaceResource(fleetspaceResourceId); + + // invoke the operation + FleetspaceData data = new FleetspaceData + { + Properties = new FleetspaceProperties + { + CapacityMax = 150000, + MainPrincipal = new MainPrincipal + { + Login = "adminUser", + ApplicationId = Guid.Parse("d2d8b19e-c4f7-4c62-8e8d-7f0f96d94e39"), + ObjectId = Guid.Parse("f8b7c2d3-b9c4-4f3b-85cd-3d56c6e49f92"), + TenantId = Guid.Parse("bde45d44-ec42-45b8-a5a2-c5b998c65ef6"), + PrincipalType = PrincipalType.Application, + }, + }, + }; + ArmOperation lro = await fleetspace.UpdateAsync(WaitUntil.Completed, data); + FleetspaceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + FleetspaceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task RegisterServer_FleetspacesRegisterServerMaximumSetGenGeneratedByMaximumSetRule() + { + // Generated from example definition: 2025-02-01-preview/Fleetspaces_RegisterServer_MaximumSet_Gen.json + // this example is just showing the usage of "Fleetspaces_RegisterServer" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this FleetspaceResource created on azure + // for more information of creating FleetspaceResource, please refer to the document of FleetspaceResource + string subscriptionId = "C3897315-3847-4D8A-B2FC-7307B066AD63"; + string resourceGroupName = "rg-database-fleet-manager"; + string fleetName = "production-fleet"; + string fleetspaceName = "primary-space"; + ResourceIdentifier fleetspaceResourceId = FleetspaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, fleetspaceName); + FleetspaceResource fleetspace = client.GetFleetspaceResource(fleetspaceResourceId); + + // invoke the operation + RegisterServerProperties body = new RegisterServerProperties + { + TierName = "Standard", + SourceSubscriptionId = "c76e2b32-46c7-4325-8f4f-476828a5b207", + SourceResourceGroupName = "rg-source-database", + SourceServerName = "source-db-server-prod", + DestinationTierOverrides = { new DestinationTierOverride(Models.ResourceType.Database, "bronze", "source-db-prod") }, + }; + await fleetspace.RegisterServerAsync(WaitUntil.Completed, body); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Unregister_FleetspacesUnregisterMaximumSetGenGeneratedByMaximumSetRule() + { + // Generated from example definition: 2025-02-01-preview/Fleetspaces_Unregister_MaximumSet_Gen.json + // this example is just showing the usage of "Fleetspaces_Unregister" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this FleetspaceResource created on azure + // for more information of creating FleetspaceResource, please refer to the document of FleetspaceResource + string subscriptionId = "C3897315-3847-4D8A-B2FC-7307B066AD63"; + string resourceGroupName = "rg-database-fleet-manager"; + string fleetName = "production-fleet"; + string fleetspaceName = "primary-space"; + ResourceIdentifier fleetspaceResourceId = FleetspaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fleetName, fleetspaceName); + FleetspaceResource fleetspace = client.GetFleetspaceResource(fleetspaceResourceId); + + // invoke the operation + await fleetspace.UnregisterAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs new file mode 100644 index 000000000000..3b8d32d2d723 --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.Resources; +using NUnit.Framework; + +namespace Azure.ResourceManager.DatabaseFleetManager.Samples +{ + public partial class Sample_SubscriptionResourceExtensions + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetFleets_FleetsListMaximumSetGenGeneratedByMaximumSetRule() + { + // Generated from example definition: 2025-02-01-preview/Fleets_List_MaximumSet_Gen.json + // this example is just showing the usage of "Fleet_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "C3897315-3847-4D8A-B2FC-7307B066AD63"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + await foreach (FleetResource item in subscriptionResource.GetFleetsAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + FleetData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Azure.ResourceManager.DatabaseFleetManager.csproj b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Azure.ResourceManager.DatabaseFleetManager.csproj new file mode 100644 index 000000000000..2bb49547d2ac --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Azure.ResourceManager.DatabaseFleetManager.csproj @@ -0,0 +1,8 @@ + + + Azure Resource Manager client SDK for Azure resource provider DatabaseFleetManager. + 1.0.0-beta.1 + azure;management;arm;resource manager;databasefleetmanager + Azure.ResourceManager.DatabaseFleetManager + + diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/ArmDatabaseFleetManagerModelFactory.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/ArmDatabaseFleetManagerModelFactory.cs new file mode 100644 index 000000000000..25d7a1bf677d --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/ArmDatabaseFleetManagerModelFactory.cs @@ -0,0 +1,220 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DatabaseFleetManager.Models +{ + /// Model factory for models. + public static partial class ArmDatabaseFleetManagerModelFactory + { + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Fleet database properties. + /// A new instance for mocking. + public static FleetDatabaseData FleetDatabaseData(ResourceIdentifier id = null, string name = null, Core.ResourceType resourceType = default, SystemData systemData = null, FleetDatabaseProperties properties = null) + { + return new FleetDatabaseData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Resource identifier for the underlying database resource. + /// Database state. + /// Create mode. Available options: Default - Create a database. Copy - Copy the source database (source database name must be specified) PointInTimeRestore - Create a database by restoring source database from a point in time (source database name and restore from time must be specified). + /// Name of the tier this database belongs to. + /// Connection string to connect to the database with. + /// If true, database is recoverable. + /// Restore from time when CreateMode is PointInTimeRestore. + /// Earliest restore time. + /// Latest restore time. + /// Backup retention in days. + /// Maximum database size in Gb. + /// Source database name used when CreateMode is Copy or PointInTimeRestore. + /// Additional database properties to be applied as the underlying database resource tags. + /// Identity property. + /// Transparent Data Encryption properties. + /// Database collation. + /// A new instance for mocking. + public static FleetDatabaseProperties FleetDatabaseProperties(string originalDatabaseId = null, AzureProvisioningState? provisioningState = null, DatabaseCreateMode? createMode = null, string tierName = null, string connectionString = null, bool? recoverable = null, DateTimeOffset? restoreFromOn = null, DateTimeOffset? earliestRestoreOn = null, DateTimeOffset? latestRestoreOn = null, int? backupRetentionDays = null, int? databaseSizeGbMax = null, string sourceDatabaseName = null, IDictionary resourceTags = null, IdentityProperties identity = null, TransparentDataEncryption transparentDataEncryption = null, string collation = null) + { + resourceTags ??= new Dictionary(); + + return new FleetDatabaseProperties( + originalDatabaseId, + provisioningState, + createMode, + tierName, + connectionString, + recoverable, + restoreFromOn, + earliestRestoreOn, + latestRestoreOn, + backupRetentionDays, + databaseSizeGbMax, + sourceDatabaseName, + resourceTags, + identity, + transparentDataEncryption, + collation, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// A Fleetspace properties. + /// A new instance for mocking. + public static FleetspaceData FleetspaceData(ResourceIdentifier id = null, string name = null, Core.ResourceType resourceType = default, SystemData systemData = null, FleetspaceProperties properties = null) + { + return new FleetspaceData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Fleetspace state. + /// Maximum number of vCores database fleet manager is allowed to provision in the fleetspace. + /// Main Microsoft Entra ID principal that has admin access to all databases in the fleetspace. + /// A new instance for mocking. + public static FleetspaceProperties FleetspaceProperties(AzureProvisioningState? provisioningState = null, int? capacityMax = null, MainPrincipal mainPrincipal = null) + { + return new FleetspaceProperties(provisioningState, capacityMax, mainPrincipal, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The fleet properties. + /// A new instance for mocking. + public static FleetData FleetData(ResourceIdentifier id = null, string name = null, Core.ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, FleetProperties properties = null) + { + tags ??= new Dictionary(); + + return new FleetData( + id, + name, + resourceType, + systemData, + tags, + location, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Fleet description. + /// Provisioning state. + /// A new instance for mocking. + public static FleetProperties FleetProperties(string description = null, AzureProvisioningState? provisioningState = null) + { + return new FleetProperties(description, provisioningState, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// A Firewall rule properties. + /// A new instance for mocking. + public static FirewallRuleData FirewallRuleData(ResourceIdentifier id = null, string name = null, Core.ResourceType resourceType = default, SystemData systemData = null, FirewallRuleProperties properties = null) + { + return new FirewallRuleData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Start IP address. + /// End IP address. + /// Provisioning state. + /// A new instance for mocking. + public static FirewallRuleProperties FirewallRuleProperties(string startIPAddress = null, string endIPAddress = null, AzureProvisioningState? provisioningState = null) + { + return new FirewallRuleProperties(startIPAddress, endIPAddress, provisioningState, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// A Fleet tier properties. + /// A new instance for mocking. + public static FleetTierData FleetTierData(ResourceIdentifier id = null, string name = null, Core.ResourceType resourceType = default, SystemData systemData = null, FleetTierProperties properties = null) + { + return new FleetTierData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// If true, tier is disabled. + /// If true, serverless resources are provisioned in the tier. + /// If true, databases are pooled. + /// Service tier of provisioned resources. Supported values: GeneralPurpose, Hyperscale. + /// Family of provisioned resources, for example Gen5. + /// Capacity of provisioned resources in the tier, in units matching the specified service tier, for example vCore for GeneralPurpose. + /// Maximum number of databases per pool. + /// Number of high availability replicas for databases in this tier. + /// Enable zone redundancy for all databases in this tier. + /// Minimum allocated capacity per database, in units matching the specified service tier. + /// Maximum allocated capacity per database, in units matching the specified service tier. + /// Maximum database size in Gb. + /// Provisioning state. + /// A new instance for mocking. + public static FleetTierProperties FleetTierProperties(bool? disabled = null, bool? serverless = null, bool? pooled = null, string serviceTier = null, string family = null, int? capacity = null, int? poolNumOfDatabasesMax = null, int? highAvailabilityReplicaCount = null, ZoneRedundancy? zoneRedundancy = null, double? databaseCapacityMin = null, double? databaseCapacityMax = null, int? databaseSizeGbMax = null, AzureProvisioningState? provisioningState = null) + { + return new FleetTierProperties( + disabled, + serverless, + pooled, + serviceTier, + family, + capacity, + poolNumOfDatabasesMax, + highAvailabilityReplicaCount, + zoneRedundancy, + databaseCapacityMin, + databaseCapacityMax, + databaseSizeGbMax, + provisioningState, + serializedAdditionalRawData: null); + } + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Extensions/DatabaseFleetManagerExtensions.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Extensions/DatabaseFleetManagerExtensions.cs new file mode 100644 index 000000000000..e89a58848597 --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Extensions/DatabaseFleetManagerExtensions.cs @@ -0,0 +1,295 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.ResourceManager.DatabaseFleetManager.Mocking; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.DatabaseFleetManager +{ + /// A class to add extension methods to Azure.ResourceManager.DatabaseFleetManager. + public static partial class DatabaseFleetManagerExtensions + { + private static MockableDatabaseFleetManagerArmClient GetMockableDatabaseFleetManagerArmClient(ArmClient client) + { + return client.GetCachedClient(client0 => new MockableDatabaseFleetManagerArmClient(client0)); + } + + private static MockableDatabaseFleetManagerResourceGroupResource GetMockableDatabaseFleetManagerResourceGroupResource(ArmResource resource) + { + return resource.GetCachedClient(client => new MockableDatabaseFleetManagerResourceGroupResource(client, resource.Id)); + } + + private static MockableDatabaseFleetManagerSubscriptionResource GetMockableDatabaseFleetManagerSubscriptionResource(ArmResource resource) + { + return resource.GetCachedClient(client => new MockableDatabaseFleetManagerSubscriptionResource(client, resource.Id)); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static FleetDatabaseResource GetFleetDatabaseResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableDatabaseFleetManagerArmClient(client).GetFleetDatabaseResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static FleetspaceResource GetFleetspaceResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableDatabaseFleetManagerArmClient(client).GetFleetspaceResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static FleetResource GetFleetResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableDatabaseFleetManagerArmClient(client).GetFleetResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static FirewallRuleResource GetFirewallRuleResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableDatabaseFleetManagerArmClient(client).GetFirewallRuleResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static FleetTierResource GetFleetTierResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableDatabaseFleetManagerArmClient(client).GetFleetTierResource(id); + } + + /// + /// Gets a collection of FleetResources in the ResourceGroupResource. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// is null. + /// An object representing collection of FleetResources and their operations over a FleetResource. + public static FleetCollection GetFleets(this ResourceGroupResource resourceGroupResource) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableDatabaseFleetManagerResourceGroupResource(resourceGroupResource).GetFleets(); + } + + /// + /// Gets a fleet resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName} + /// + /// + /// Operation Id + /// Fleet_Get + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// Name of the database fleet. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static async Task> GetFleetAsync(this ResourceGroupResource resourceGroupResource, string fleetName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return await GetMockableDatabaseFleetManagerResourceGroupResource(resourceGroupResource).GetFleetAsync(fleetName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets a fleet resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName} + /// + /// + /// Operation Id + /// Fleet_Get + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// Name of the database fleet. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static Response GetFleet(this ResourceGroupResource resourceGroupResource, string fleetName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableDatabaseFleetManagerResourceGroupResource(resourceGroupResource).GetFleet(fleetName, cancellationToken); + } + + /// + /// Gets all fleets in a subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.DatabaseFleetManager/fleets + /// + /// + /// Operation Id + /// Fleet_List + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// is null. + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetFleetsAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableDatabaseFleetManagerSubscriptionResource(subscriptionResource).GetFleetsAsync(cancellationToken); + } + + /// + /// Gets all fleets in a subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.DatabaseFleetManager/fleets + /// + /// + /// Operation Id + /// Fleet_List + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// is null. + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetFleets(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableDatabaseFleetManagerSubscriptionResource(subscriptionResource).GetFleets(cancellationToken); + } + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Extensions/MockableDatabaseFleetManagerArmClient.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Extensions/MockableDatabaseFleetManagerArmClient.cs new file mode 100644 index 000000000000..c3c91294f345 --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Extensions/MockableDatabaseFleetManagerArmClient.cs @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.DatabaseFleetManager.Mocking +{ + /// A class to add extension methods to ArmClient. + public partial class MockableDatabaseFleetManagerArmClient : ArmResource + { + /// Initializes a new instance of the class for mocking. + protected MockableDatabaseFleetManagerArmClient() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal MockableDatabaseFleetManagerArmClient(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + internal MockableDatabaseFleetManagerArmClient(ArmClient client) : this(client, ResourceIdentifier.Root) + { + } + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual FleetDatabaseResource GetFleetDatabaseResource(ResourceIdentifier id) + { + FleetDatabaseResource.ValidateResourceId(id); + return new FleetDatabaseResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual FleetspaceResource GetFleetspaceResource(ResourceIdentifier id) + { + FleetspaceResource.ValidateResourceId(id); + return new FleetspaceResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual FleetResource GetFleetResource(ResourceIdentifier id) + { + FleetResource.ValidateResourceId(id); + return new FleetResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual FirewallRuleResource GetFirewallRuleResource(ResourceIdentifier id) + { + FirewallRuleResource.ValidateResourceId(id); + return new FirewallRuleResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual FleetTierResource GetFleetTierResource(ResourceIdentifier id) + { + FleetTierResource.ValidateResourceId(id); + return new FleetTierResource(Client, id); + } + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Extensions/MockableDatabaseFleetManagerResourceGroupResource.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Extensions/MockableDatabaseFleetManagerResourceGroupResource.cs new file mode 100644 index 000000000000..85c1487077ff --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Extensions/MockableDatabaseFleetManagerResourceGroupResource.cs @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.DatabaseFleetManager.Mocking +{ + /// A class to add extension methods to ResourceGroupResource. + public partial class MockableDatabaseFleetManagerResourceGroupResource : ArmResource + { + /// Initializes a new instance of the class for mocking. + protected MockableDatabaseFleetManagerResourceGroupResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal MockableDatabaseFleetManagerResourceGroupResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// Gets a collection of FleetResources in the ResourceGroupResource. + /// An object representing collection of FleetResources and their operations over a FleetResource. + public virtual FleetCollection GetFleets() + { + return GetCachedClient(client => new FleetCollection(client, Id)); + } + + /// + /// Gets a fleet resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName} + /// + /// + /// Operation Id + /// Fleet_Get + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the database fleet. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetFleetAsync(string fleetName, CancellationToken cancellationToken = default) + { + return await GetFleets().GetAsync(fleetName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets a fleet resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName} + /// + /// + /// Operation Id + /// Fleet_Get + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the database fleet. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetFleet(string fleetName, CancellationToken cancellationToken = default) + { + return GetFleets().Get(fleetName, cancellationToken); + } + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Extensions/MockableDatabaseFleetManagerSubscriptionResource.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Extensions/MockableDatabaseFleetManagerSubscriptionResource.cs new file mode 100644 index 000000000000..d5e0e2001ef8 --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Extensions/MockableDatabaseFleetManagerSubscriptionResource.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Threading; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.DatabaseFleetManager.Mocking +{ + /// A class to add extension methods to SubscriptionResource. + public partial class MockableDatabaseFleetManagerSubscriptionResource : ArmResource + { + private ClientDiagnostics _fleetClientDiagnostics; + private FleetsRestOperations _fleetRestClient; + + /// Initializes a new instance of the class for mocking. + protected MockableDatabaseFleetManagerSubscriptionResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal MockableDatabaseFleetManagerSubscriptionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + private ClientDiagnostics FleetClientDiagnostics => _fleetClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.DatabaseFleetManager", FleetResource.ResourceType.Namespace, Diagnostics); + private FleetsRestOperations FleetRestClient => _fleetRestClient ??= new FleetsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(FleetResource.ResourceType)); + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// + /// Gets all fleets in a subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.DatabaseFleetManager/fleets + /// + /// + /// Operation Id + /// Fleet_List + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetFleetsAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => FleetRestClient.CreateListRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => FleetRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new FleetResource(Client, FleetData.DeserializeFleetData(e)), FleetClientDiagnostics, Pipeline, "MockableDatabaseFleetManagerSubscriptionResource.GetFleets", "value", "nextLink", cancellationToken); + } + + /// + /// Gets all fleets in a subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.DatabaseFleetManager/fleets + /// + /// + /// Operation Id + /// Fleet_List + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetFleets(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => FleetRestClient.CreateListRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => FleetRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new FleetResource(Client, FleetData.DeserializeFleetData(e)), FleetClientDiagnostics, Pipeline, "MockableDatabaseFleetManagerSubscriptionResource.GetFleets", "value", "nextLink", cancellationToken); + } + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FirewallRuleCollection.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FirewallRuleCollection.cs new file mode 100644 index 000000000000..bf8f48feaf7f --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FirewallRuleCollection.cs @@ -0,0 +1,499 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.DatabaseFleetManager +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetFirewallRules method from an instance of . + /// + public partial class FirewallRuleCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _firewallRuleClientDiagnostics; + private readonly FirewallRulesRestOperations _firewallRuleRestClient; + + /// Initializes a new instance of the class for mocking. + protected FirewallRuleCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal FirewallRuleCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _firewallRuleClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DatabaseFleetManager", FirewallRuleResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(FirewallRuleResource.ResourceType, out string firewallRuleApiVersion); + _firewallRuleRestClient = new FirewallRulesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, firewallRuleApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != FleetspaceResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, FleetspaceResource.ResourceType), nameof(id)); + } + + /// + /// Creates or updates a firewall rule. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces/{fleetspaceName}/firewallRules/{firewallRuleName} + /// + /// + /// Operation Id + /// FirewallRule_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-02-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. + /// Name of the firewall rule. + /// The firewall rule object to create or update. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string firewallRuleName, FirewallRuleData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(firewallRuleName, nameof(firewallRuleName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _firewallRuleClientDiagnostics.CreateScope("FirewallRuleCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _firewallRuleRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, firewallRuleName, data, cancellationToken).ConfigureAwait(false); + var operation = new DatabaseFleetManagerArmOperation(new FirewallRuleOperationSource(Client), _firewallRuleClientDiagnostics, Pipeline, _firewallRuleRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, firewallRuleName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates a firewall rule. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces/{fleetspaceName}/firewallRules/{firewallRuleName} + /// + /// + /// Operation Id + /// FirewallRule_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-02-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. + /// Name of the firewall rule. + /// The firewall rule object to create or update. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string firewallRuleName, FirewallRuleData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(firewallRuleName, nameof(firewallRuleName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _firewallRuleClientDiagnostics.CreateScope("FirewallRuleCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _firewallRuleRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, firewallRuleName, data, cancellationToken); + var operation = new DatabaseFleetManagerArmOperation(new FirewallRuleOperationSource(Client), _firewallRuleClientDiagnostics, Pipeline, _firewallRuleRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, firewallRuleName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a firewall rule. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces/{fleetspaceName}/firewallRules/{firewallRuleName} + /// + /// + /// Operation Id + /// FirewallRule_Get + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the firewall rule. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string firewallRuleName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(firewallRuleName, nameof(firewallRuleName)); + + using var scope = _firewallRuleClientDiagnostics.CreateScope("FirewallRuleCollection.Get"); + scope.Start(); + try + { + var response = await _firewallRuleRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, firewallRuleName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new FirewallRuleResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a firewall rule. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces/{fleetspaceName}/firewallRules/{firewallRuleName} + /// + /// + /// Operation Id + /// FirewallRule_Get + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the firewall rule. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string firewallRuleName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(firewallRuleName, nameof(firewallRuleName)); + + using var scope = _firewallRuleClientDiagnostics.CreateScope("FirewallRuleCollection.Get"); + scope.Start(); + try + { + var response = _firewallRuleRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, firewallRuleName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new FirewallRuleResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets all firewall rules in a fleetspace. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces/{fleetspaceName}/firewallRules + /// + /// + /// Operation Id + /// FirewallRule_ListByFleetspace + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The number of elements in the collection to skip. + /// The number of elements to return from the collection. + /// An opaque token that identifies a starting point in the collection. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(long? skip = null, long? top = null, string skiptoken = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _firewallRuleRestClient.CreateListByFleetspaceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, skip, top, skiptoken); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _firewallRuleRestClient.CreateListByFleetspaceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, skip, top, skiptoken); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new FirewallRuleResource(Client, FirewallRuleData.DeserializeFirewallRuleData(e)), _firewallRuleClientDiagnostics, Pipeline, "FirewallRuleCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Gets all firewall rules in a fleetspace. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces/{fleetspaceName}/firewallRules + /// + /// + /// Operation Id + /// FirewallRule_ListByFleetspace + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The number of elements in the collection to skip. + /// The number of elements to return from the collection. + /// An opaque token that identifies a starting point in the collection. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(long? skip = null, long? top = null, string skiptoken = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _firewallRuleRestClient.CreateListByFleetspaceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, skip, top, skiptoken); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _firewallRuleRestClient.CreateListByFleetspaceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, skip, top, skiptoken); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new FirewallRuleResource(Client, FirewallRuleData.DeserializeFirewallRuleData(e)), _firewallRuleClientDiagnostics, Pipeline, "FirewallRuleCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces/{fleetspaceName}/firewallRules/{firewallRuleName} + /// + /// + /// Operation Id + /// FirewallRule_Get + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the firewall rule. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string firewallRuleName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(firewallRuleName, nameof(firewallRuleName)); + + using var scope = _firewallRuleClientDiagnostics.CreateScope("FirewallRuleCollection.Exists"); + scope.Start(); + try + { + var response = await _firewallRuleRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, firewallRuleName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces/{fleetspaceName}/firewallRules/{firewallRuleName} + /// + /// + /// Operation Id + /// FirewallRule_Get + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the firewall rule. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string firewallRuleName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(firewallRuleName, nameof(firewallRuleName)); + + using var scope = _firewallRuleClientDiagnostics.CreateScope("FirewallRuleCollection.Exists"); + scope.Start(); + try + { + var response = _firewallRuleRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, firewallRuleName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces/{fleetspaceName}/firewallRules/{firewallRuleName} + /// + /// + /// Operation Id + /// FirewallRule_Get + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the firewall rule. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string firewallRuleName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(firewallRuleName, nameof(firewallRuleName)); + + using var scope = _firewallRuleClientDiagnostics.CreateScope("FirewallRuleCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _firewallRuleRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, firewallRuleName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new FirewallRuleResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces/{fleetspaceName}/firewallRules/{firewallRuleName} + /// + /// + /// Operation Id + /// FirewallRule_Get + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the firewall rule. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string firewallRuleName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(firewallRuleName, nameof(firewallRuleName)); + + using var scope = _firewallRuleClientDiagnostics.CreateScope("FirewallRuleCollection.GetIfExists"); + scope.Start(); + try + { + var response = _firewallRuleRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, firewallRuleName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new FirewallRuleResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FirewallRuleData.Serialization.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FirewallRuleData.Serialization.cs new file mode 100644 index 000000000000..e00a36737d00 --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FirewallRuleData.Serialization.cs @@ -0,0 +1,155 @@ +// 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.DatabaseFleetManager.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DatabaseFleetManager +{ + public partial class FirewallRuleData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FirewallRuleData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + FirewallRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FirewallRuleData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFirewallRuleData(document.RootElement, options); + } + + internal static FirewallRuleData DeserializeFirewallRuleData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + FirewallRuleProperties properties = default; + ResourceIdentifier id = default; + string name = default; + Core.ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = FirewallRuleProperties.DeserializeFirewallRuleProperties(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new Core.ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FirewallRuleData( + id, + name, + type, + systemData, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(FirewallRuleData)} does not support writing '{options.Format}' format."); + } + } + + FirewallRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeFirewallRuleData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FirewallRuleData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FirewallRuleData.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FirewallRuleData.cs new file mode 100644 index 000000000000..6138a49804b9 --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FirewallRuleData.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.DatabaseFleetManager.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DatabaseFleetManager +{ + /// + /// A class representing the FirewallRule data model. + /// A firewall rule. + /// + public partial class FirewallRuleData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public FirewallRuleData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// A Firewall rule properties. + /// Keeps track of any properties unknown to the library. + internal FirewallRuleData(ResourceIdentifier id, string name, Core.ResourceType resourceType, SystemData systemData, FirewallRuleProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// A Firewall rule properties. + public FirewallRuleProperties Properties { get; set; } + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FirewallRuleResource.Serialization.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FirewallRuleResource.Serialization.cs new file mode 100644 index 000000000000..57847384327f --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FirewallRuleResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.DatabaseFleetManager +{ + public partial class FirewallRuleResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + FirewallRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + FirewallRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FirewallRuleResource.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FirewallRuleResource.cs new file mode 100644 index 000000000000..8486d098a7b3 --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FirewallRuleResource.cs @@ -0,0 +1,348 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.DatabaseFleetManager +{ + /// + /// A Class representing a FirewallRule along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetFirewallRuleResource method. + /// Otherwise you can get one from its parent resource using the GetFirewallRule method. + /// + public partial class FirewallRuleResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The fleetName. + /// The fleetspaceName. + /// The firewallRuleName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, string firewallRuleName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces/{fleetspaceName}/firewallRules/{firewallRuleName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _firewallRuleClientDiagnostics; + private readonly FirewallRulesRestOperations _firewallRuleRestClient; + private readonly FirewallRuleData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.DatabaseFleetManager/fleets/fleetspaces/firewallRules"; + + /// Initializes a new instance of the class for mocking. + protected FirewallRuleResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal FirewallRuleResource(ArmClient client, FirewallRuleData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal FirewallRuleResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _firewallRuleClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DatabaseFleetManager", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string firewallRuleApiVersion); + _firewallRuleRestClient = new FirewallRulesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, firewallRuleApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual FirewallRuleData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Gets a firewall rule. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces/{fleetspaceName}/firewallRules/{firewallRuleName} + /// + /// + /// Operation Id + /// FirewallRule_Get + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _firewallRuleClientDiagnostics.CreateScope("FirewallRuleResource.Get"); + scope.Start(); + try + { + var response = await _firewallRuleRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new FirewallRuleResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a firewall rule. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces/{fleetspaceName}/firewallRules/{firewallRuleName} + /// + /// + /// Operation Id + /// FirewallRule_Get + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _firewallRuleClientDiagnostics.CreateScope("FirewallRuleResource.Get"); + scope.Start(); + try + { + var response = _firewallRuleRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new FirewallRuleResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes a firewall rule. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces/{fleetspaceName}/firewallRules/{firewallRuleName} + /// + /// + /// Operation Id + /// FirewallRule_Delete + /// + /// + /// Default Api Version + /// 2025-02-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. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _firewallRuleClientDiagnostics.CreateScope("FirewallRuleResource.Delete"); + scope.Start(); + try + { + var response = await _firewallRuleRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new DatabaseFleetManagerArmOperation(_firewallRuleClientDiagnostics, Pipeline, _firewallRuleRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes a firewall rule. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces/{fleetspaceName}/firewallRules/{firewallRuleName} + /// + /// + /// Operation Id + /// FirewallRule_Delete + /// + /// + /// Default Api Version + /// 2025-02-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. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _firewallRuleClientDiagnostics.CreateScope("FirewallRuleResource.Delete"); + scope.Start(); + try + { + var response = _firewallRuleRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new DatabaseFleetManagerArmOperation(_firewallRuleClientDiagnostics, Pipeline, _firewallRuleRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates a firewall rule. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces/{fleetspaceName}/firewallRules/{firewallRuleName} + /// + /// + /// Operation Id + /// FirewallRule_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-02-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. + /// The firewall rule object to create or update. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, FirewallRuleData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _firewallRuleClientDiagnostics.CreateScope("FirewallRuleResource.Update"); + scope.Start(); + try + { + var response = await _firewallRuleRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new DatabaseFleetManagerArmOperation(new FirewallRuleOperationSource(Client), _firewallRuleClientDiagnostics, Pipeline, _firewallRuleRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates a firewall rule. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces/{fleetspaceName}/firewallRules/{firewallRuleName} + /// + /// + /// Operation Id + /// FirewallRule_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-02-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. + /// The firewall rule object to create or update. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, FirewallRuleData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _firewallRuleClientDiagnostics.CreateScope("FirewallRuleResource.Update"); + scope.Start(); + try + { + var response = _firewallRuleRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new DatabaseFleetManagerArmOperation(new FirewallRuleOperationSource(Client), _firewallRuleClientDiagnostics, Pipeline, _firewallRuleRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetCollection.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetCollection.cs new file mode 100644 index 000000000000..1657d527cedd --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetCollection.cs @@ -0,0 +1,500 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.DatabaseFleetManager +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetFleets method from an instance of . + /// + public partial class FleetCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _fleetClientDiagnostics; + private readonly FleetsRestOperations _fleetRestClient; + + /// Initializes a new instance of the class for mocking. + protected FleetCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal FleetCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _fleetClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DatabaseFleetManager", FleetResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(FleetResource.ResourceType, out string fleetApiVersion); + _fleetRestClient = new FleetsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, fleetApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceGroupResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceGroupResource.ResourceType), nameof(id)); + } + + /// + /// Creates or updates a fleet resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName} + /// + /// + /// Operation Id + /// Fleet_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-02-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. + /// Name of the database fleet. + /// The fleet object to create or update. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string fleetName, FleetData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _fleetClientDiagnostics.CreateScope("FleetCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _fleetRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, fleetName, data, cancellationToken).ConfigureAwait(false); + var operation = new DatabaseFleetManagerArmOperation(new FleetOperationSource(Client), _fleetClientDiagnostics, Pipeline, _fleetRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, fleetName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates a fleet resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName} + /// + /// + /// Operation Id + /// Fleet_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-02-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. + /// Name of the database fleet. + /// The fleet object to create or update. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string fleetName, FleetData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _fleetClientDiagnostics.CreateScope("FleetCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _fleetRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, fleetName, data, cancellationToken); + var operation = new DatabaseFleetManagerArmOperation(new FleetOperationSource(Client), _fleetClientDiagnostics, Pipeline, _fleetRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, fleetName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a fleet resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName} + /// + /// + /// Operation Id + /// Fleet_Get + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the database fleet. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string fleetName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + + using var scope = _fleetClientDiagnostics.CreateScope("FleetCollection.Get"); + scope.Start(); + try + { + var response = await _fleetRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, fleetName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new FleetResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a fleet resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName} + /// + /// + /// Operation Id + /// Fleet_Get + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the database fleet. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string fleetName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + + using var scope = _fleetClientDiagnostics.CreateScope("FleetCollection.Get"); + scope.Start(); + try + { + var response = _fleetRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, fleetName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new FleetResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets all fleets in a resource group. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets + /// + /// + /// Operation Id + /// Fleet_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The number of elements in the collection to skip. + /// The number of elements to return from the collection. + /// An opaque token that identifies a starting point in the collection. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(long? skip = null, long? top = null, string skiptoken = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _fleetRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName, skip, top, skiptoken); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _fleetRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, skip, top, skiptoken); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new FleetResource(Client, FleetData.DeserializeFleetData(e)), _fleetClientDiagnostics, Pipeline, "FleetCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Gets all fleets in a resource group. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets + /// + /// + /// Operation Id + /// Fleet_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The number of elements in the collection to skip. + /// The number of elements to return from the collection. + /// An opaque token that identifies a starting point in the collection. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(long? skip = null, long? top = null, string skiptoken = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _fleetRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName, skip, top, skiptoken); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _fleetRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, skip, top, skiptoken); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new FleetResource(Client, FleetData.DeserializeFleetData(e)), _fleetClientDiagnostics, Pipeline, "FleetCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName} + /// + /// + /// Operation Id + /// Fleet_Get + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the database fleet. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string fleetName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + + using var scope = _fleetClientDiagnostics.CreateScope("FleetCollection.Exists"); + scope.Start(); + try + { + var response = await _fleetRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, fleetName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName} + /// + /// + /// Operation Id + /// Fleet_Get + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the database fleet. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string fleetName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + + using var scope = _fleetClientDiagnostics.CreateScope("FleetCollection.Exists"); + scope.Start(); + try + { + var response = _fleetRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, fleetName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName} + /// + /// + /// Operation Id + /// Fleet_Get + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the database fleet. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string fleetName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + + using var scope = _fleetClientDiagnostics.CreateScope("FleetCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _fleetRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, fleetName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new FleetResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName} + /// + /// + /// Operation Id + /// Fleet_Get + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the database fleet. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string fleetName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + + using var scope = _fleetClientDiagnostics.CreateScope("FleetCollection.GetIfExists"); + scope.Start(); + try + { + var response = _fleetRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, fleetName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new FleetResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetData.Serialization.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetData.Serialization.cs new file mode 100644 index 000000000000..19e4230b3ce6 --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetData.Serialization.cs @@ -0,0 +1,178 @@ +// 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.DatabaseFleetManager.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DatabaseFleetManager +{ + public partial class FleetData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FleetData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + FleetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FleetData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFleetData(document.RootElement, options); + } + + internal static FleetData DeserializeFleetData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + FleetProperties properties = default; + IDictionary tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + Core.ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = FleetProperties.DeserializeFleetProperties(property.Value, options); + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("location"u8)) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new Core.ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FleetData( + id, + name, + type, + systemData, + tags ?? new ChangeTrackingDictionary(), + location, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(FleetData)} does not support writing '{options.Format}' format."); + } + } + + FleetData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeFleetData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FleetData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetData.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetData.cs new file mode 100644 index 000000000000..b104bd126dd7 --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetData.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.DatabaseFleetManager.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DatabaseFleetManager +{ + /// + /// A class representing the Fleet data model. + /// A Database Fleet. + /// + public partial class FleetData : TrackedResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The location. + public FleetData(AzureLocation location) : base(location) + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The fleet properties. + /// Keeps track of any properties unknown to the library. + internal FleetData(ResourceIdentifier id, string name, Core.ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, FleetProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal FleetData() + { + } + + /// The fleet properties. + public FleetProperties Properties { get; set; } + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetDatabaseCollection.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetDatabaseCollection.cs new file mode 100644 index 000000000000..dec216d79917 --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetDatabaseCollection.cs @@ -0,0 +1,501 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.DatabaseFleetManager +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetFleetDatabases method from an instance of . + /// + public partial class FleetDatabaseCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _fleetDatabaseClientDiagnostics; + private readonly FleetDatabasesRestOperations _fleetDatabaseRestClient; + + /// Initializes a new instance of the class for mocking. + protected FleetDatabaseCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal FleetDatabaseCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _fleetDatabaseClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DatabaseFleetManager", FleetDatabaseResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(FleetDatabaseResource.ResourceType, out string fleetDatabaseApiVersion); + _fleetDatabaseRestClient = new FleetDatabasesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, fleetDatabaseApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != FleetspaceResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, FleetspaceResource.ResourceType), nameof(id)); + } + + /// + /// Creates or updates a fleet database. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces/{fleetspaceName}/databases/{databaseName} + /// + /// + /// Operation Id + /// FleetDatabase_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-02-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. + /// Name of the database. + /// The database object to create or update. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string databaseName, FleetDatabaseData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _fleetDatabaseClientDiagnostics.CreateScope("FleetDatabaseCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _fleetDatabaseRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, databaseName, data, cancellationToken).ConfigureAwait(false); + var operation = new DatabaseFleetManagerArmOperation(new FleetDatabaseOperationSource(Client), _fleetDatabaseClientDiagnostics, Pipeline, _fleetDatabaseRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, databaseName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates a fleet database. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces/{fleetspaceName}/databases/{databaseName} + /// + /// + /// Operation Id + /// FleetDatabase_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-02-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. + /// Name of the database. + /// The database object to create or update. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string databaseName, FleetDatabaseData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _fleetDatabaseClientDiagnostics.CreateScope("FleetDatabaseCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _fleetDatabaseRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, databaseName, data, cancellationToken); + var operation = new DatabaseFleetManagerArmOperation(new FleetDatabaseOperationSource(Client), _fleetDatabaseClientDiagnostics, Pipeline, _fleetDatabaseRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, databaseName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a fleet database. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces/{fleetspaceName}/databases/{databaseName} + /// + /// + /// Operation Id + /// FleetDatabase_Get + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the database. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string databaseName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); + + using var scope = _fleetDatabaseClientDiagnostics.CreateScope("FleetDatabaseCollection.Get"); + scope.Start(); + try + { + var response = await _fleetDatabaseRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, databaseName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new FleetDatabaseResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a fleet database. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces/{fleetspaceName}/databases/{databaseName} + /// + /// + /// Operation Id + /// FleetDatabase_Get + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the database. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string databaseName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); + + using var scope = _fleetDatabaseClientDiagnostics.CreateScope("FleetDatabaseCollection.Get"); + scope.Start(); + try + { + var response = _fleetDatabaseRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, databaseName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new FleetDatabaseResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets all fleet databases in a fleetspace. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces/{fleetspaceName}/databases + /// + /// + /// Operation Id + /// FleetDatabase_ListByFleetspace + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The number of elements in the collection to skip. + /// The number of elements to return from the collection. + /// An OData filter expression that filters elements in the collection. + /// An opaque token that identifies a starting point in the collection. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(long? skip = null, long? top = null, string filter = null, string skiptoken = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _fleetDatabaseRestClient.CreateListByFleetspaceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, skip, top, filter, skiptoken); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _fleetDatabaseRestClient.CreateListByFleetspaceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, skip, top, filter, skiptoken); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new FleetDatabaseResource(Client, FleetDatabaseData.DeserializeFleetDatabaseData(e)), _fleetDatabaseClientDiagnostics, Pipeline, "FleetDatabaseCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Gets all fleet databases in a fleetspace. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces/{fleetspaceName}/databases + /// + /// + /// Operation Id + /// FleetDatabase_ListByFleetspace + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The number of elements in the collection to skip. + /// The number of elements to return from the collection. + /// An OData filter expression that filters elements in the collection. + /// An opaque token that identifies a starting point in the collection. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(long? skip = null, long? top = null, string filter = null, string skiptoken = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _fleetDatabaseRestClient.CreateListByFleetspaceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, skip, top, filter, skiptoken); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _fleetDatabaseRestClient.CreateListByFleetspaceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, skip, top, filter, skiptoken); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new FleetDatabaseResource(Client, FleetDatabaseData.DeserializeFleetDatabaseData(e)), _fleetDatabaseClientDiagnostics, Pipeline, "FleetDatabaseCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces/{fleetspaceName}/databases/{databaseName} + /// + /// + /// Operation Id + /// FleetDatabase_Get + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the database. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string databaseName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); + + using var scope = _fleetDatabaseClientDiagnostics.CreateScope("FleetDatabaseCollection.Exists"); + scope.Start(); + try + { + var response = await _fleetDatabaseRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, databaseName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces/{fleetspaceName}/databases/{databaseName} + /// + /// + /// Operation Id + /// FleetDatabase_Get + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the database. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string databaseName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); + + using var scope = _fleetDatabaseClientDiagnostics.CreateScope("FleetDatabaseCollection.Exists"); + scope.Start(); + try + { + var response = _fleetDatabaseRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, databaseName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces/{fleetspaceName}/databases/{databaseName} + /// + /// + /// Operation Id + /// FleetDatabase_Get + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the database. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string databaseName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); + + using var scope = _fleetDatabaseClientDiagnostics.CreateScope("FleetDatabaseCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _fleetDatabaseRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, databaseName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new FleetDatabaseResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces/{fleetspaceName}/databases/{databaseName} + /// + /// + /// Operation Id + /// FleetDatabase_Get + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the database. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string databaseName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); + + using var scope = _fleetDatabaseClientDiagnostics.CreateScope("FleetDatabaseCollection.GetIfExists"); + scope.Start(); + try + { + var response = _fleetDatabaseRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, databaseName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new FleetDatabaseResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetDatabaseData.Serialization.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetDatabaseData.Serialization.cs new file mode 100644 index 000000000000..3c81181ff6fc --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetDatabaseData.Serialization.cs @@ -0,0 +1,155 @@ +// 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.DatabaseFleetManager.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DatabaseFleetManager +{ + public partial class FleetDatabaseData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FleetDatabaseData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + FleetDatabaseData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FleetDatabaseData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFleetDatabaseData(document.RootElement, options); + } + + internal static FleetDatabaseData DeserializeFleetDatabaseData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + FleetDatabaseProperties properties = default; + ResourceIdentifier id = default; + string name = default; + Core.ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = FleetDatabaseProperties.DeserializeFleetDatabaseProperties(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new Core.ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FleetDatabaseData( + id, + name, + type, + systemData, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(FleetDatabaseData)} does not support writing '{options.Format}' format."); + } + } + + FleetDatabaseData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeFleetDatabaseData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FleetDatabaseData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetDatabaseData.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetDatabaseData.cs new file mode 100644 index 000000000000..15a588a310a1 --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetDatabaseData.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.DatabaseFleetManager.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DatabaseFleetManager +{ + /// + /// A class representing the FleetDatabase data model. + /// A fleet database. + /// + public partial class FleetDatabaseData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public FleetDatabaseData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Fleet database properties. + /// Keeps track of any properties unknown to the library. + internal FleetDatabaseData(ResourceIdentifier id, string name, Core.ResourceType resourceType, SystemData systemData, FleetDatabaseProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Fleet database properties. + public FleetDatabaseProperties Properties { get; set; } + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetDatabaseResource.Serialization.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetDatabaseResource.Serialization.cs new file mode 100644 index 000000000000..590f0c91cc98 --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetDatabaseResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.DatabaseFleetManager +{ + public partial class FleetDatabaseResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + FleetDatabaseData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + FleetDatabaseData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetDatabaseResource.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetDatabaseResource.cs new file mode 100644 index 000000000000..78b41bfbae8f --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetDatabaseResource.cs @@ -0,0 +1,617 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.DatabaseFleetManager.Models; + +namespace Azure.ResourceManager.DatabaseFleetManager +{ + /// + /// A Class representing a FleetDatabase along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetFleetDatabaseResource method. + /// Otherwise you can get one from its parent resource using the GetFleetDatabase method. + /// + public partial class FleetDatabaseResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The fleetName. + /// The fleetspaceName. + /// The databaseName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, string databaseName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces/{fleetspaceName}/databases/{databaseName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _fleetDatabaseClientDiagnostics; + private readonly FleetDatabasesRestOperations _fleetDatabaseRestClient; + private readonly FleetDatabaseData _data; + + /// Gets the resource type for the operations. + public static readonly Core.ResourceType ResourceType = "Microsoft.DatabaseFleetManager/fleets/fleetspaces/databases"; + + /// Initializes a new instance of the class for mocking. + protected FleetDatabaseResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal FleetDatabaseResource(ArmClient client, FleetDatabaseData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal FleetDatabaseResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _fleetDatabaseClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DatabaseFleetManager", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string fleetDatabaseApiVersion); + _fleetDatabaseRestClient = new FleetDatabasesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, fleetDatabaseApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual FleetDatabaseData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Gets a fleet database. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces/{fleetspaceName}/databases/{databaseName} + /// + /// + /// Operation Id + /// FleetDatabase_Get + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _fleetDatabaseClientDiagnostics.CreateScope("FleetDatabaseResource.Get"); + scope.Start(); + try + { + var response = await _fleetDatabaseRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new FleetDatabaseResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a fleet database. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces/{fleetspaceName}/databases/{databaseName} + /// + /// + /// Operation Id + /// FleetDatabase_Get + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _fleetDatabaseClientDiagnostics.CreateScope("FleetDatabaseResource.Get"); + scope.Start(); + try + { + var response = _fleetDatabaseRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new FleetDatabaseResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes a fleet database. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces/{fleetspaceName}/databases/{databaseName} + /// + /// + /// Operation Id + /// FleetDatabase_Delete + /// + /// + /// Default Api Version + /// 2025-02-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. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _fleetDatabaseClientDiagnostics.CreateScope("FleetDatabaseResource.Delete"); + scope.Start(); + try + { + var response = await _fleetDatabaseRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new DatabaseFleetManagerArmOperation(_fleetDatabaseClientDiagnostics, Pipeline, _fleetDatabaseRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes a fleet database. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces/{fleetspaceName}/databases/{databaseName} + /// + /// + /// Operation Id + /// FleetDatabase_Delete + /// + /// + /// Default Api Version + /// 2025-02-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. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _fleetDatabaseClientDiagnostics.CreateScope("FleetDatabaseResource.Delete"); + scope.Start(); + try + { + var response = _fleetDatabaseRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new DatabaseFleetManagerArmOperation(_fleetDatabaseClientDiagnostics, Pipeline, _fleetDatabaseRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates a fleet database. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces/{fleetspaceName}/databases/{databaseName} + /// + /// + /// Operation Id + /// FleetDatabase_Update + /// + /// + /// Default Api Version + /// 2025-02-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. + /// The database object to patch. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, FleetDatabaseData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _fleetDatabaseClientDiagnostics.CreateScope("FleetDatabaseResource.Update"); + scope.Start(); + try + { + var response = await _fleetDatabaseRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new DatabaseFleetManagerArmOperation(new FleetDatabaseOperationSource(Client), _fleetDatabaseClientDiagnostics, Pipeline, _fleetDatabaseRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates a fleet database. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces/{fleetspaceName}/databases/{databaseName} + /// + /// + /// Operation Id + /// FleetDatabase_Update + /// + /// + /// Default Api Version + /// 2025-02-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. + /// The database object to patch. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, FleetDatabaseData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _fleetDatabaseClientDiagnostics.CreateScope("FleetDatabaseResource.Update"); + scope.Start(); + try + { + var response = _fleetDatabaseRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new DatabaseFleetManagerArmOperation(new FleetDatabaseOperationSource(Client), _fleetDatabaseClientDiagnostics, Pipeline, _fleetDatabaseRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Moves database to a different tier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces/{fleetspaceName}/databases/{databaseName}/changeTier + /// + /// + /// Operation Id + /// FleetDatabases_ChangeTier + /// + /// + /// Default Api Version + /// 2025-02-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. + /// The details of the change tier operation. + /// The cancellation token to use. + /// is null. + public virtual async Task ChangeTierAsync(WaitUntil waitUntil, DatabaseChangeTierProperties body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using var scope = _fleetDatabaseClientDiagnostics.CreateScope("FleetDatabaseResource.ChangeTier"); + scope.Start(); + try + { + var response = await _fleetDatabaseRestClient.ChangeTierAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, body, cancellationToken).ConfigureAwait(false); + var operation = new DatabaseFleetManagerArmOperation(_fleetDatabaseClientDiagnostics, Pipeline, _fleetDatabaseRestClient.CreateChangeTierRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Moves database to a different tier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces/{fleetspaceName}/databases/{databaseName}/changeTier + /// + /// + /// Operation Id + /// FleetDatabases_ChangeTier + /// + /// + /// Default Api Version + /// 2025-02-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. + /// The details of the change tier operation. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation ChangeTier(WaitUntil waitUntil, DatabaseChangeTierProperties body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using var scope = _fleetDatabaseClientDiagnostics.CreateScope("FleetDatabaseResource.ChangeTier"); + scope.Start(); + try + { + var response = _fleetDatabaseRestClient.ChangeTier(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, body, cancellationToken); + var operation = new DatabaseFleetManagerArmOperation(_fleetDatabaseClientDiagnostics, Pipeline, _fleetDatabaseRestClient.CreateChangeTierRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Renames a database. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces/{fleetspaceName}/databases/{databaseName}/rename + /// + /// + /// Operation Id + /// FleetDatabases_Rename + /// + /// + /// Default Api Version + /// 2025-02-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. + /// The details of the rename operation. + /// The cancellation token to use. + /// is null. + public virtual async Task RenameAsync(WaitUntil waitUntil, DatabaseRenameProperties body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using var scope = _fleetDatabaseClientDiagnostics.CreateScope("FleetDatabaseResource.Rename"); + scope.Start(); + try + { + var response = await _fleetDatabaseRestClient.RenameAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, body, cancellationToken).ConfigureAwait(false); + var operation = new DatabaseFleetManagerArmOperation(_fleetDatabaseClientDiagnostics, Pipeline, _fleetDatabaseRestClient.CreateRenameRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Renames a database. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces/{fleetspaceName}/databases/{databaseName}/rename + /// + /// + /// Operation Id + /// FleetDatabases_Rename + /// + /// + /// Default Api Version + /// 2025-02-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. + /// The details of the rename operation. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Rename(WaitUntil waitUntil, DatabaseRenameProperties body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using var scope = _fleetDatabaseClientDiagnostics.CreateScope("FleetDatabaseResource.Rename"); + scope.Start(); + try + { + var response = _fleetDatabaseRestClient.Rename(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, body, cancellationToken); + var operation = new DatabaseFleetManagerArmOperation(_fleetDatabaseClientDiagnostics, Pipeline, _fleetDatabaseRestClient.CreateRenameRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Revert a database transparent data encryption (TDE). + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces/{fleetspaceName}/databases/{databaseName}/revert + /// + /// + /// Operation Id + /// FleetDatabases_Revert + /// + /// + /// Default Api Version + /// 2025-02-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. + /// The cancellation token to use. + public virtual async Task RevertAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _fleetDatabaseClientDiagnostics.CreateScope("FleetDatabaseResource.Revert"); + scope.Start(); + try + { + var response = await _fleetDatabaseRestClient.RevertAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new DatabaseFleetManagerArmOperation(_fleetDatabaseClientDiagnostics, Pipeline, _fleetDatabaseRestClient.CreateRevertRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Revert a database transparent data encryption (TDE). + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces/{fleetspaceName}/databases/{databaseName}/revert + /// + /// + /// Operation Id + /// FleetDatabases_Revert + /// + /// + /// Default Api Version + /// 2025-02-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. + /// The cancellation token to use. + public virtual ArmOperation Revert(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _fleetDatabaseClientDiagnostics.CreateScope("FleetDatabaseResource.Revert"); + scope.Start(); + try + { + var response = _fleetDatabaseRestClient.Revert(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new DatabaseFleetManagerArmOperation(_fleetDatabaseClientDiagnostics, Pipeline, _fleetDatabaseRestClient.CreateRevertRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetResource.Serialization.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetResource.Serialization.cs new file mode 100644 index 000000000000..7f71b89ec415 --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.DatabaseFleetManager +{ + public partial class FleetResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + FleetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + FleetData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetResource.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetResource.cs new file mode 100644 index 000000000000..d7a95ec075a5 --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetResource.cs @@ -0,0 +1,845 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.DatabaseFleetManager.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.DatabaseFleetManager +{ + /// + /// A Class representing a Fleet along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetFleetResource method. + /// Otherwise you can get one from its parent resource using the GetFleet method. + /// + public partial class FleetResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The fleetName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string fleetName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _fleetClientDiagnostics; + private readonly FleetsRestOperations _fleetRestClient; + private readonly FleetData _data; + + /// Gets the resource type for the operations. + public static readonly Core.ResourceType ResourceType = "Microsoft.DatabaseFleetManager/fleets"; + + /// Initializes a new instance of the class for mocking. + protected FleetResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal FleetResource(ArmClient client, FleetData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal FleetResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _fleetClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DatabaseFleetManager", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string fleetApiVersion); + _fleetRestClient = new FleetsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, fleetApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual FleetData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// Gets a collection of FleetspaceResources in the Fleet. + /// An object representing collection of FleetspaceResources and their operations over a FleetspaceResource. + public virtual FleetspaceCollection GetFleetspaces() + { + return GetCachedClient(client => new FleetspaceCollection(client, Id)); + } + + /// + /// Gets fleetspace resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces/{fleetspaceName} + /// + /// + /// Operation Id + /// Fleetspace_Get + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the fleetspace. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetFleetspaceAsync(string fleetspaceName, CancellationToken cancellationToken = default) + { + return await GetFleetspaces().GetAsync(fleetspaceName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets fleetspace resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces/{fleetspaceName} + /// + /// + /// Operation Id + /// Fleetspace_Get + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the fleetspace. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetFleetspace(string fleetspaceName, CancellationToken cancellationToken = default) + { + return GetFleetspaces().Get(fleetspaceName, cancellationToken); + } + + /// Gets a collection of FleetTierResources in the Fleet. + /// An object representing collection of FleetTierResources and their operations over a FleetTierResource. + public virtual FleetTierCollection GetFleetTiers() + { + return GetCachedClient(client => new FleetTierCollection(client, Id)); + } + + /// + /// Gets a tier resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/tiers/{tierName} + /// + /// + /// Operation Id + /// FleetTier_Get + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the tier. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetFleetTierAsync(string tierName, CancellationToken cancellationToken = default) + { + return await GetFleetTiers().GetAsync(tierName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets a tier resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/tiers/{tierName} + /// + /// + /// Operation Id + /// FleetTier_Get + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the tier. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetFleetTier(string tierName, CancellationToken cancellationToken = default) + { + return GetFleetTiers().Get(tierName, cancellationToken); + } + + /// + /// Gets a fleet resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName} + /// + /// + /// Operation Id + /// Fleet_Get + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _fleetClientDiagnostics.CreateScope("FleetResource.Get"); + scope.Start(); + try + { + var response = await _fleetRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new FleetResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a fleet resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName} + /// + /// + /// Operation Id + /// Fleet_Get + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _fleetClientDiagnostics.CreateScope("FleetResource.Get"); + scope.Start(); + try + { + var response = _fleetRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new FleetResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes a fleet. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName} + /// + /// + /// Operation Id + /// Fleet_Delete + /// + /// + /// Default Api Version + /// 2025-02-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. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _fleetClientDiagnostics.CreateScope("FleetResource.Delete"); + scope.Start(); + try + { + var response = await _fleetRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new DatabaseFleetManagerArmOperation(_fleetClientDiagnostics, Pipeline, _fleetRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes a fleet. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName} + /// + /// + /// Operation Id + /// Fleet_Delete + /// + /// + /// Default Api Version + /// 2025-02-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. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _fleetClientDiagnostics.CreateScope("FleetResource.Delete"); + scope.Start(); + try + { + var response = _fleetRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new DatabaseFleetManagerArmOperation(_fleetClientDiagnostics, Pipeline, _fleetRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Modifies a fleet resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName} + /// + /// + /// Operation Id + /// Fleet_Update + /// + /// + /// Default Api Version + /// 2025-02-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. + /// The fleet object to patch. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, FleetPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _fleetClientDiagnostics.CreateScope("FleetResource.Update"); + scope.Start(); + try + { + var response = await _fleetRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new DatabaseFleetManagerArmOperation(new FleetOperationSource(Client), _fleetClientDiagnostics, Pipeline, _fleetRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Modifies a fleet resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName} + /// + /// + /// Operation Id + /// Fleet_Update + /// + /// + /// Default Api Version + /// 2025-02-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. + /// The fleet object to patch. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, FleetPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _fleetClientDiagnostics.CreateScope("FleetResource.Update"); + scope.Start(); + try + { + var response = _fleetRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); + var operation = new DatabaseFleetManagerArmOperation(new FleetOperationSource(Client), _fleetClientDiagnostics, Pipeline, _fleetRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName} + /// + /// + /// Operation Id + /// Fleet_Get + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _fleetClientDiagnostics.CreateScope("FleetResource.AddTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues[key] = value; + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _fleetRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new FleetResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new FleetPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName} + /// + /// + /// Operation Id + /// Fleet_Get + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _fleetClientDiagnostics.CreateScope("FleetResource.AddTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues[key] = value; + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _fleetRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new FleetResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new FleetPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName} + /// + /// + /// Operation Id + /// Fleet_Get + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _fleetClientDiagnostics.CreateScope("FleetResource.SetTags"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _fleetRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new FleetResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new FleetPatch(); + patch.Tags.ReplaceWith(tags); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName} + /// + /// + /// Operation Id + /// Fleet_Get + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _fleetClientDiagnostics.CreateScope("FleetResource.SetTags"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _fleetRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new FleetResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new FleetPatch(); + patch.Tags.ReplaceWith(tags); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName} + /// + /// + /// Operation Id + /// Fleet_Get + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _fleetClientDiagnostics.CreateScope("FleetResource.RemoveTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.Remove(key); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _fleetRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new FleetResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new FleetPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName} + /// + /// + /// Operation Id + /// Fleet_Get + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _fleetClientDiagnostics.CreateScope("FleetResource.RemoveTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.Remove(key); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _fleetRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new FleetResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new FleetPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetTierCollection.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetTierCollection.cs new file mode 100644 index 000000000000..e7d8fffec97a --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetTierCollection.cs @@ -0,0 +1,499 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.DatabaseFleetManager +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetFleetTiers method from an instance of . + /// + public partial class FleetTierCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _fleetTierClientDiagnostics; + private readonly FleetTiersRestOperations _fleetTierRestClient; + + /// Initializes a new instance of the class for mocking. + protected FleetTierCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal FleetTierCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _fleetTierClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DatabaseFleetManager", FleetTierResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(FleetTierResource.ResourceType, out string fleetTierApiVersion); + _fleetTierRestClient = new FleetTiersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, fleetTierApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != FleetResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, FleetResource.ResourceType), nameof(id)); + } + + /// + /// Creates or updates a tier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/tiers/{tierName} + /// + /// + /// Operation Id + /// FleetTier_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-02-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. + /// Name of the tier. + /// The tier object to create or update. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string tierName, FleetTierData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(tierName, nameof(tierName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _fleetTierClientDiagnostics.CreateScope("FleetTierCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _fleetTierRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, tierName, data, cancellationToken).ConfigureAwait(false); + var operation = new DatabaseFleetManagerArmOperation(new FleetTierOperationSource(Client), _fleetTierClientDiagnostics, Pipeline, _fleetTierRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, tierName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates a tier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/tiers/{tierName} + /// + /// + /// Operation Id + /// FleetTier_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-02-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. + /// Name of the tier. + /// The tier object to create or update. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string tierName, FleetTierData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(tierName, nameof(tierName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _fleetTierClientDiagnostics.CreateScope("FleetTierCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _fleetTierRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, tierName, data, cancellationToken); + var operation = new DatabaseFleetManagerArmOperation(new FleetTierOperationSource(Client), _fleetTierClientDiagnostics, Pipeline, _fleetTierRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, tierName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a tier resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/tiers/{tierName} + /// + /// + /// Operation Id + /// FleetTier_Get + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the tier. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string tierName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(tierName, nameof(tierName)); + + using var scope = _fleetTierClientDiagnostics.CreateScope("FleetTierCollection.Get"); + scope.Start(); + try + { + var response = await _fleetTierRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, tierName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new FleetTierResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a tier resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/tiers/{tierName} + /// + /// + /// Operation Id + /// FleetTier_Get + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the tier. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string tierName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(tierName, nameof(tierName)); + + using var scope = _fleetTierClientDiagnostics.CreateScope("FleetTierCollection.Get"); + scope.Start(); + try + { + var response = _fleetTierRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, tierName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new FleetTierResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List tiers in a fleet. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/tiers + /// + /// + /// Operation Id + /// FleetTier_ListByFleet + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The number of elements in the collection to skip. + /// The number of elements to return from the collection. + /// An opaque token that identifies a starting point in the collection. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(long? skip = null, long? top = null, string skiptoken = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _fleetTierRestClient.CreateListByFleetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, top, skiptoken); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _fleetTierRestClient.CreateListByFleetNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, top, skiptoken); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new FleetTierResource(Client, FleetTierData.DeserializeFleetTierData(e)), _fleetTierClientDiagnostics, Pipeline, "FleetTierCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List tiers in a fleet. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/tiers + /// + /// + /// Operation Id + /// FleetTier_ListByFleet + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The number of elements in the collection to skip. + /// The number of elements to return from the collection. + /// An opaque token that identifies a starting point in the collection. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(long? skip = null, long? top = null, string skiptoken = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _fleetTierRestClient.CreateListByFleetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, top, skiptoken); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _fleetTierRestClient.CreateListByFleetNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, top, skiptoken); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new FleetTierResource(Client, FleetTierData.DeserializeFleetTierData(e)), _fleetTierClientDiagnostics, Pipeline, "FleetTierCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/tiers/{tierName} + /// + /// + /// Operation Id + /// FleetTier_Get + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the tier. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string tierName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(tierName, nameof(tierName)); + + using var scope = _fleetTierClientDiagnostics.CreateScope("FleetTierCollection.Exists"); + scope.Start(); + try + { + var response = await _fleetTierRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, tierName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/tiers/{tierName} + /// + /// + /// Operation Id + /// FleetTier_Get + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the tier. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string tierName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(tierName, nameof(tierName)); + + using var scope = _fleetTierClientDiagnostics.CreateScope("FleetTierCollection.Exists"); + scope.Start(); + try + { + var response = _fleetTierRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, tierName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/tiers/{tierName} + /// + /// + /// Operation Id + /// FleetTier_Get + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the tier. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string tierName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(tierName, nameof(tierName)); + + using var scope = _fleetTierClientDiagnostics.CreateScope("FleetTierCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _fleetTierRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, tierName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new FleetTierResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/tiers/{tierName} + /// + /// + /// Operation Id + /// FleetTier_Get + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the tier. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string tierName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(tierName, nameof(tierName)); + + using var scope = _fleetTierClientDiagnostics.CreateScope("FleetTierCollection.GetIfExists"); + scope.Start(); + try + { + var response = _fleetTierRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, tierName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new FleetTierResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetTierData.Serialization.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetTierData.Serialization.cs new file mode 100644 index 000000000000..4ef11a28c117 --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetTierData.Serialization.cs @@ -0,0 +1,155 @@ +// 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.DatabaseFleetManager.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DatabaseFleetManager +{ + public partial class FleetTierData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FleetTierData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + FleetTierData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FleetTierData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFleetTierData(document.RootElement, options); + } + + internal static FleetTierData DeserializeFleetTierData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + FleetTierProperties properties = default; + ResourceIdentifier id = default; + string name = default; + Core.ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = FleetTierProperties.DeserializeFleetTierProperties(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new Core.ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FleetTierData( + id, + name, + type, + systemData, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(FleetTierData)} does not support writing '{options.Format}' format."); + } + } + + FleetTierData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeFleetTierData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FleetTierData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetTierData.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetTierData.cs new file mode 100644 index 000000000000..b7d9416f249a --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetTierData.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.DatabaseFleetManager.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DatabaseFleetManager +{ + /// + /// A class representing the FleetTier data model. + /// A SQL Database Fleet tier. + /// + public partial class FleetTierData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public FleetTierData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// A Fleet tier properties. + /// Keeps track of any properties unknown to the library. + internal FleetTierData(ResourceIdentifier id, string name, Core.ResourceType resourceType, SystemData systemData, FleetTierProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// A Fleet tier properties. + public FleetTierProperties Properties { get; set; } + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetTierResource.Serialization.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetTierResource.Serialization.cs new file mode 100644 index 000000000000..5e5e193cc976 --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetTierResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.DatabaseFleetManager +{ + public partial class FleetTierResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + FleetTierData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + FleetTierData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetTierResource.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetTierResource.cs new file mode 100644 index 000000000000..4b6723e281c2 --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetTierResource.cs @@ -0,0 +1,423 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.DatabaseFleetManager +{ + /// + /// A Class representing a FleetTier along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetFleetTierResource method. + /// Otherwise you can get one from its parent resource using the GetFleetTier method. + /// + public partial class FleetTierResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The fleetName. + /// The tierName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string fleetName, string tierName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/tiers/{tierName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _fleetTierClientDiagnostics; + private readonly FleetTiersRestOperations _fleetTierRestClient; + private readonly FleetTierData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.DatabaseFleetManager/fleets/tiers"; + + /// Initializes a new instance of the class for mocking. + protected FleetTierResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal FleetTierResource(ArmClient client, FleetTierData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal FleetTierResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _fleetTierClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DatabaseFleetManager", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string fleetTierApiVersion); + _fleetTierRestClient = new FleetTiersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, fleetTierApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual FleetTierData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Gets a tier resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/tiers/{tierName} + /// + /// + /// Operation Id + /// FleetTier_Get + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _fleetTierClientDiagnostics.CreateScope("FleetTierResource.Get"); + scope.Start(); + try + { + var response = await _fleetTierRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new FleetTierResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a tier resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/tiers/{tierName} + /// + /// + /// Operation Id + /// FleetTier_Get + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _fleetTierClientDiagnostics.CreateScope("FleetTierResource.Get"); + scope.Start(); + try + { + var response = _fleetTierRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new FleetTierResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes a tier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/tiers/{tierName} + /// + /// + /// Operation Id + /// FleetTier_Delete + /// + /// + /// Default Api Version + /// 2025-02-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. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _fleetTierClientDiagnostics.CreateScope("FleetTierResource.Delete"); + scope.Start(); + try + { + var response = await _fleetTierRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new DatabaseFleetManagerArmOperation(_fleetTierClientDiagnostics, Pipeline, _fleetTierRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes a tier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/tiers/{tierName} + /// + /// + /// Operation Id + /// FleetTier_Delete + /// + /// + /// Default Api Version + /// 2025-02-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. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _fleetTierClientDiagnostics.CreateScope("FleetTierResource.Delete"); + scope.Start(); + try + { + var response = _fleetTierRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new DatabaseFleetManagerArmOperation(_fleetTierClientDiagnostics, Pipeline, _fleetTierRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates a tier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/tiers/{tierName} + /// + /// + /// Operation Id + /// FleetTier_Update + /// + /// + /// Default Api Version + /// 2025-02-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. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, FleetTierData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _fleetTierClientDiagnostics.CreateScope("FleetTierResource.Update"); + scope.Start(); + try + { + var response = await _fleetTierRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new DatabaseFleetManagerArmOperation(new FleetTierOperationSource(Client), _fleetTierClientDiagnostics, Pipeline, _fleetTierRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates a tier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/tiers/{tierName} + /// + /// + /// Operation Id + /// FleetTier_Update + /// + /// + /// Default Api Version + /// 2025-02-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. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, FleetTierData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _fleetTierClientDiagnostics.CreateScope("FleetTierResource.Update"); + scope.Start(); + try + { + var response = _fleetTierRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new DatabaseFleetManagerArmOperation(new FleetTierOperationSource(Client), _fleetTierClientDiagnostics, Pipeline, _fleetTierRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Disables a tier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/tiers/{tierName}/disable + /// + /// + /// Operation Id + /// FleetTiers_Disable + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> DisableAsync(CancellationToken cancellationToken = default) + { + using var scope = _fleetTierClientDiagnostics.CreateScope("FleetTierResource.Disable"); + scope.Start(); + try + { + var response = await _fleetTierRestClient.DisableAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new FleetTierResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Disables a tier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/tiers/{tierName}/disable + /// + /// + /// Operation Id + /// FleetTiers_Disable + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Disable(CancellationToken cancellationToken = default) + { + using var scope = _fleetTierClientDiagnostics.CreateScope("FleetTierResource.Disable"); + scope.Start(); + try + { + var response = _fleetTierRestClient.Disable(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new FleetTierResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetspaceCollection.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetspaceCollection.cs new file mode 100644 index 000000000000..66e97247dfb7 --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetspaceCollection.cs @@ -0,0 +1,499 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.DatabaseFleetManager +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetFleetspaces method from an instance of . + /// + public partial class FleetspaceCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _fleetspaceClientDiagnostics; + private readonly FleetspacesRestOperations _fleetspaceRestClient; + + /// Initializes a new instance of the class for mocking. + protected FleetspaceCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal FleetspaceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _fleetspaceClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DatabaseFleetManager", FleetspaceResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(FleetspaceResource.ResourceType, out string fleetspaceApiVersion); + _fleetspaceRestClient = new FleetspacesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, fleetspaceApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != FleetResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, FleetResource.ResourceType), nameof(id)); + } + + /// + /// Creates or updates a fleetspace resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces/{fleetspaceName} + /// + /// + /// Operation Id + /// Fleetspace_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-02-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. + /// Name of the fleetspace. + /// The fleet object to create or update. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string fleetspaceName, FleetspaceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(fleetspaceName, nameof(fleetspaceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _fleetspaceClientDiagnostics.CreateScope("FleetspaceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _fleetspaceRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetspaceName, data, cancellationToken).ConfigureAwait(false); + var operation = new DatabaseFleetManagerArmOperation(new FleetspaceOperationSource(Client), _fleetspaceClientDiagnostics, Pipeline, _fleetspaceRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetspaceName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates a fleetspace resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces/{fleetspaceName} + /// + /// + /// Operation Id + /// Fleetspace_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-02-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. + /// Name of the fleetspace. + /// The fleet object to create or update. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string fleetspaceName, FleetspaceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(fleetspaceName, nameof(fleetspaceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _fleetspaceClientDiagnostics.CreateScope("FleetspaceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _fleetspaceRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetspaceName, data, cancellationToken); + var operation = new DatabaseFleetManagerArmOperation(new FleetspaceOperationSource(Client), _fleetspaceClientDiagnostics, Pipeline, _fleetspaceRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetspaceName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets fleetspace resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces/{fleetspaceName} + /// + /// + /// Operation Id + /// Fleetspace_Get + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the fleetspace. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string fleetspaceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(fleetspaceName, nameof(fleetspaceName)); + + using var scope = _fleetspaceClientDiagnostics.CreateScope("FleetspaceCollection.Get"); + scope.Start(); + try + { + var response = await _fleetspaceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetspaceName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new FleetspaceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets fleetspace resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces/{fleetspaceName} + /// + /// + /// Operation Id + /// Fleetspace_Get + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the fleetspace. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string fleetspaceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(fleetspaceName, nameof(fleetspaceName)); + + using var scope = _fleetspaceClientDiagnostics.CreateScope("FleetspaceCollection.Get"); + scope.Start(); + try + { + var response = _fleetspaceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetspaceName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new FleetspaceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists fleetspaces in a fleet. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces + /// + /// + /// Operation Id + /// Fleetspace_ListByFleet + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The number of elements in the collection to skip. + /// The number of elements to return from the collection. + /// An opaque token that identifies a starting point in the collection. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(long? skip = null, long? top = null, string skiptoken = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _fleetspaceRestClient.CreateListByFleetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, top, skiptoken); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _fleetspaceRestClient.CreateListByFleetNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, top, skiptoken); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new FleetspaceResource(Client, FleetspaceData.DeserializeFleetspaceData(e)), _fleetspaceClientDiagnostics, Pipeline, "FleetspaceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Lists fleetspaces in a fleet. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces + /// + /// + /// Operation Id + /// Fleetspace_ListByFleet + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The number of elements in the collection to skip. + /// The number of elements to return from the collection. + /// An opaque token that identifies a starting point in the collection. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(long? skip = null, long? top = null, string skiptoken = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _fleetspaceRestClient.CreateListByFleetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, top, skiptoken); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _fleetspaceRestClient.CreateListByFleetNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, top, skiptoken); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new FleetspaceResource(Client, FleetspaceData.DeserializeFleetspaceData(e)), _fleetspaceClientDiagnostics, Pipeline, "FleetspaceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces/{fleetspaceName} + /// + /// + /// Operation Id + /// Fleetspace_Get + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the fleetspace. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string fleetspaceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(fleetspaceName, nameof(fleetspaceName)); + + using var scope = _fleetspaceClientDiagnostics.CreateScope("FleetspaceCollection.Exists"); + scope.Start(); + try + { + var response = await _fleetspaceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetspaceName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces/{fleetspaceName} + /// + /// + /// Operation Id + /// Fleetspace_Get + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the fleetspace. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string fleetspaceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(fleetspaceName, nameof(fleetspaceName)); + + using var scope = _fleetspaceClientDiagnostics.CreateScope("FleetspaceCollection.Exists"); + scope.Start(); + try + { + var response = _fleetspaceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetspaceName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces/{fleetspaceName} + /// + /// + /// Operation Id + /// Fleetspace_Get + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the fleetspace. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string fleetspaceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(fleetspaceName, nameof(fleetspaceName)); + + using var scope = _fleetspaceClientDiagnostics.CreateScope("FleetspaceCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _fleetspaceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetspaceName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new FleetspaceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces/{fleetspaceName} + /// + /// + /// Operation Id + /// Fleetspace_Get + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the fleetspace. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string fleetspaceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(fleetspaceName, nameof(fleetspaceName)); + + using var scope = _fleetspaceClientDiagnostics.CreateScope("FleetspaceCollection.GetIfExists"); + scope.Start(); + try + { + var response = _fleetspaceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fleetspaceName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new FleetspaceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetspaceData.Serialization.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetspaceData.Serialization.cs new file mode 100644 index 000000000000..3e4bf7c0a4c6 --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetspaceData.Serialization.cs @@ -0,0 +1,155 @@ +// 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.DatabaseFleetManager.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DatabaseFleetManager +{ + public partial class FleetspaceData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FleetspaceData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + FleetspaceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FleetspaceData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFleetspaceData(document.RootElement, options); + } + + internal static FleetspaceData DeserializeFleetspaceData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + FleetspaceProperties properties = default; + ResourceIdentifier id = default; + string name = default; + Core.ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = FleetspaceProperties.DeserializeFleetspaceProperties(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new Core.ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FleetspaceData( + id, + name, + type, + systemData, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(FleetspaceData)} does not support writing '{options.Format}' format."); + } + } + + FleetspaceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeFleetspaceData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FleetspaceData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetspaceData.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetspaceData.cs new file mode 100644 index 000000000000..ff1a45dd143b --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetspaceData.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.DatabaseFleetManager.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.DatabaseFleetManager +{ + /// + /// A class representing the Fleetspace data model. + /// A fleetspace. + /// + public partial class FleetspaceData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public FleetspaceData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// A Fleetspace properties. + /// Keeps track of any properties unknown to the library. + internal FleetspaceData(ResourceIdentifier id, string name, Core.ResourceType resourceType, SystemData systemData, FleetspaceProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// A Fleetspace properties. + public FleetspaceProperties Properties { get; set; } + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetspaceResource.Serialization.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetspaceResource.Serialization.cs new file mode 100644 index 000000000000..b75fae2c086c --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetspaceResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.DatabaseFleetManager +{ + public partial class FleetspaceResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + FleetspaceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + FleetspaceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetspaceResource.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetspaceResource.cs new file mode 100644 index 000000000000..09866a232bc4 --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/FleetspaceResource.cs @@ -0,0 +1,662 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.DatabaseFleetManager.Models; + +namespace Azure.ResourceManager.DatabaseFleetManager +{ + /// + /// A Class representing a Fleetspace along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetFleetspaceResource method. + /// Otherwise you can get one from its parent resource using the GetFleetspace method. + /// + public partial class FleetspaceResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The fleetName. + /// The fleetspaceName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces/{fleetspaceName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _fleetspaceClientDiagnostics; + private readonly FleetspacesRestOperations _fleetspaceRestClient; + private readonly FleetspaceData _data; + + /// Gets the resource type for the operations. + public static readonly Core.ResourceType ResourceType = "Microsoft.DatabaseFleetManager/fleets/fleetspaces"; + + /// Initializes a new instance of the class for mocking. + protected FleetspaceResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal FleetspaceResource(ArmClient client, FleetspaceData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal FleetspaceResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _fleetspaceClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DatabaseFleetManager", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string fleetspaceApiVersion); + _fleetspaceRestClient = new FleetspacesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, fleetspaceApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual FleetspaceData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// Gets a collection of FleetDatabaseResources in the Fleetspace. + /// An object representing collection of FleetDatabaseResources and their operations over a FleetDatabaseResource. + public virtual FleetDatabaseCollection GetFleetDatabases() + { + return GetCachedClient(client => new FleetDatabaseCollection(client, Id)); + } + + /// + /// Gets a fleet database. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces/{fleetspaceName}/databases/{databaseName} + /// + /// + /// Operation Id + /// FleetDatabase_Get + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the database. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetFleetDatabaseAsync(string databaseName, CancellationToken cancellationToken = default) + { + return await GetFleetDatabases().GetAsync(databaseName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets a fleet database. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces/{fleetspaceName}/databases/{databaseName} + /// + /// + /// Operation Id + /// FleetDatabase_Get + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the database. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetFleetDatabase(string databaseName, CancellationToken cancellationToken = default) + { + return GetFleetDatabases().Get(databaseName, cancellationToken); + } + + /// Gets a collection of FirewallRuleResources in the Fleetspace. + /// An object representing collection of FirewallRuleResources and their operations over a FirewallRuleResource. + public virtual FirewallRuleCollection GetFirewallRules() + { + return GetCachedClient(client => new FirewallRuleCollection(client, Id)); + } + + /// + /// Gets a firewall rule. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces/{fleetspaceName}/firewallRules/{firewallRuleName} + /// + /// + /// Operation Id + /// FirewallRule_Get + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the firewall rule. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetFirewallRuleAsync(string firewallRuleName, CancellationToken cancellationToken = default) + { + return await GetFirewallRules().GetAsync(firewallRuleName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets a firewall rule. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces/{fleetspaceName}/firewallRules/{firewallRuleName} + /// + /// + /// Operation Id + /// FirewallRule_Get + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the firewall rule. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetFirewallRule(string firewallRuleName, CancellationToken cancellationToken = default) + { + return GetFirewallRules().Get(firewallRuleName, cancellationToken); + } + + /// + /// Gets fleetspace resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces/{fleetspaceName} + /// + /// + /// Operation Id + /// Fleetspace_Get + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _fleetspaceClientDiagnostics.CreateScope("FleetspaceResource.Get"); + scope.Start(); + try + { + var response = await _fleetspaceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new FleetspaceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets fleetspace resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces/{fleetspaceName} + /// + /// + /// Operation Id + /// Fleetspace_Get + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _fleetspaceClientDiagnostics.CreateScope("FleetspaceResource.Get"); + scope.Start(); + try + { + var response = _fleetspaceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new FleetspaceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes a fleetspace. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces/{fleetspaceName} + /// + /// + /// Operation Id + /// Fleetspace_Delete + /// + /// + /// Default Api Version + /// 2025-02-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. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _fleetspaceClientDiagnostics.CreateScope("FleetspaceResource.Delete"); + scope.Start(); + try + { + var response = await _fleetspaceRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new DatabaseFleetManagerArmOperation(_fleetspaceClientDiagnostics, Pipeline, _fleetspaceRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes a fleetspace. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces/{fleetspaceName} + /// + /// + /// Operation Id + /// Fleetspace_Delete + /// + /// + /// Default Api Version + /// 2025-02-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. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _fleetspaceClientDiagnostics.CreateScope("FleetspaceResource.Delete"); + scope.Start(); + try + { + var response = _fleetspaceRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new DatabaseFleetManagerArmOperation(_fleetspaceClientDiagnostics, Pipeline, _fleetspaceRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Modifies a fleetspace resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces/{fleetspaceName} + /// + /// + /// Operation Id + /// Fleetspace_Update + /// + /// + /// Default Api Version + /// 2025-02-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. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, FleetspaceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _fleetspaceClientDiagnostics.CreateScope("FleetspaceResource.Update"); + scope.Start(); + try + { + var response = await _fleetspaceRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new DatabaseFleetManagerArmOperation(new FleetspaceOperationSource(Client), _fleetspaceClientDiagnostics, Pipeline, _fleetspaceRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Modifies a fleetspace resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces/{fleetspaceName} + /// + /// + /// Operation Id + /// Fleetspace_Update + /// + /// + /// Default Api Version + /// 2025-02-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. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, FleetspaceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _fleetspaceClientDiagnostics.CreateScope("FleetspaceResource.Update"); + scope.Start(); + try + { + var response = _fleetspaceRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new DatabaseFleetManagerArmOperation(new FleetspaceOperationSource(Client), _fleetspaceClientDiagnostics, Pipeline, _fleetspaceRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Migrates an existing logical server into fleet. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces/{fleetspaceName}/registerServer + /// + /// + /// Operation Id + /// Fleetspaces_RegisterServer + /// + /// + /// Default Api Version + /// 2025-02-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. + /// The details of the register server operation. + /// The cancellation token to use. + /// is null. + public virtual async Task RegisterServerAsync(WaitUntil waitUntil, RegisterServerProperties body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using var scope = _fleetspaceClientDiagnostics.CreateScope("FleetspaceResource.RegisterServer"); + scope.Start(); + try + { + var response = await _fleetspaceRestClient.RegisterServerAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body, cancellationToken).ConfigureAwait(false); + var operation = new DatabaseFleetManagerArmOperation(_fleetspaceClientDiagnostics, Pipeline, _fleetspaceRestClient.CreateRegisterServerRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Migrates an existing logical server into fleet. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces/{fleetspaceName}/registerServer + /// + /// + /// Operation Id + /// Fleetspaces_RegisterServer + /// + /// + /// Default Api Version + /// 2025-02-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. + /// The details of the register server operation. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation RegisterServer(WaitUntil waitUntil, RegisterServerProperties body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using var scope = _fleetspaceClientDiagnostics.CreateScope("FleetspaceResource.RegisterServer"); + scope.Start(); + try + { + var response = _fleetspaceRestClient.RegisterServer(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body, cancellationToken); + var operation = new DatabaseFleetManagerArmOperation(_fleetspaceClientDiagnostics, Pipeline, _fleetspaceRestClient.CreateRegisterServerRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Unregisters all databases from a fleetspace + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces/{fleetspaceName}/unregister + /// + /// + /// Operation Id + /// Fleetspaces_Unregister + /// + /// + /// Default Api Version + /// 2025-02-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. + /// The cancellation token to use. + public virtual async Task UnregisterAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _fleetspaceClientDiagnostics.CreateScope("FleetspaceResource.Unregister"); + scope.Start(); + try + { + var response = await _fleetspaceRestClient.UnregisterAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new DatabaseFleetManagerArmOperation(_fleetspaceClientDiagnostics, Pipeline, _fleetspaceRestClient.CreateUnregisterRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Unregisters all databases from a fleetspace + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DatabaseFleetManager/fleets/{fleetName}/fleetspaces/{fleetspaceName}/unregister + /// + /// + /// Operation Id + /// Fleetspaces_Unregister + /// + /// + /// Default Api Version + /// 2025-02-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. + /// The cancellation token to use. + public virtual ArmOperation Unregister(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _fleetspaceClientDiagnostics.CreateScope("FleetspaceResource.Unregister"); + scope.Start(); + try + { + var response = _fleetspaceRestClient.Unregister(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new DatabaseFleetManagerArmOperation(_fleetspaceClientDiagnostics, Pipeline, _fleetspaceRestClient.CreateUnregisterRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Internal/Argument.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Internal/Argument.cs new file mode 100644 index 000000000000..0c8e7b17a1cd --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Internal/Argument.cs @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DatabaseFleetManager +{ + internal static class Argument + { + public static void AssertNotNull(T value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + } + + public static void AssertNotNull(T? value, string name) + where T : struct + { + if (!value.HasValue) + { + throw new ArgumentNullException(name); + } + } + + public static void AssertNotNullOrEmpty(IEnumerable value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + if (value is ICollection collectionOfT && collectionOfT.Count == 0) + { + throw new ArgumentException("Value cannot be an empty collection.", name); + } + if (value is ICollection collection && collection.Count == 0) + { + throw new ArgumentException("Value cannot be an empty collection.", name); + } + using IEnumerator e = value.GetEnumerator(); + if (!e.MoveNext()) + { + throw new ArgumentException("Value cannot be an empty collection.", name); + } + } + + public static void AssertNotNullOrEmpty(string value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + if (value.Length == 0) + { + throw new ArgumentException("Value cannot be an empty string.", name); + } + } + + public static void AssertNotNullOrWhiteSpace(string value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + if (string.IsNullOrWhiteSpace(value)) + { + throw new ArgumentException("Value cannot be empty or contain only white-space characters.", name); + } + } + + public static void AssertNotDefault(ref T value, string name) + where T : struct, IEquatable + { + if (value.Equals(default)) + { + throw new ArgumentException("Value cannot be empty.", name); + } + } + + public static void AssertInRange(T value, T minimum, T maximum, string name) + where T : notnull, IComparable + { + if (minimum.CompareTo(value) > 0) + { + throw new ArgumentOutOfRangeException(name, "Value is less than the minimum allowed."); + } + if (maximum.CompareTo(value) < 0) + { + throw new ArgumentOutOfRangeException(name, "Value is greater than the maximum allowed."); + } + } + + public static void AssertEnumDefined(Type enumType, object value, string name) + { + if (!Enum.IsDefined(enumType, value)) + { + throw new ArgumentException($"Value not defined for {enumType.FullName}.", name); + } + } + + public static T CheckNotNull(T value, string name) + where T : class + { + AssertNotNull(value, name); + return value; + } + + public static string CheckNotNullOrEmpty(string value, string name) + { + AssertNotNullOrEmpty(value, name); + return value; + } + + public static void AssertNull(T value, string name, string message = null) + { + if (value != null) + { + throw new ArgumentException(message ?? "Value must be null.", name); + } + } + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Internal/ChangeTrackingDictionary.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Internal/ChangeTrackingDictionary.cs new file mode 100644 index 000000000000..240180f8f8a5 --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Internal/ChangeTrackingDictionary.cs @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DatabaseFleetManager +{ + internal class ChangeTrackingDictionary : IDictionary, IReadOnlyDictionary where TKey : notnull + { + private IDictionary _innerDictionary; + + public ChangeTrackingDictionary() + { + } + + public ChangeTrackingDictionary(IDictionary dictionary) + { + if (dictionary == null) + { + return; + } + _innerDictionary = new Dictionary(dictionary); + } + + public ChangeTrackingDictionary(IReadOnlyDictionary dictionary) + { + if (dictionary == null) + { + return; + } + _innerDictionary = new Dictionary(); + foreach (var pair in dictionary) + { + _innerDictionary.Add(pair); + } + } + + public bool IsUndefined => _innerDictionary == null; + + public int Count => IsUndefined ? 0 : EnsureDictionary().Count; + + public bool IsReadOnly => IsUndefined ? false : EnsureDictionary().IsReadOnly; + + public ICollection Keys => IsUndefined ? Array.Empty() : EnsureDictionary().Keys; + + public ICollection Values => IsUndefined ? Array.Empty() : EnsureDictionary().Values; + + public TValue this[TKey key] + { + get + { + if (IsUndefined) + { + throw new KeyNotFoundException(nameof(key)); + } + return EnsureDictionary()[key]; + } + set + { + EnsureDictionary()[key] = value; + } + } + + IEnumerable IReadOnlyDictionary.Keys => Keys; + + IEnumerable IReadOnlyDictionary.Values => Values; + + public IEnumerator> GetEnumerator() + { + if (IsUndefined) + { + IEnumerator> enumerateEmpty() + { + yield break; + } + return enumerateEmpty(); + } + return EnsureDictionary().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + public void Add(KeyValuePair item) + { + EnsureDictionary().Add(item); + } + + public void Clear() + { + EnsureDictionary().Clear(); + } + + public bool Contains(KeyValuePair item) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().Contains(item); + } + + public void CopyTo(KeyValuePair[] array, int index) + { + if (IsUndefined) + { + return; + } + EnsureDictionary().CopyTo(array, index); + } + + public bool Remove(KeyValuePair item) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().Remove(item); + } + + public void Add(TKey key, TValue value) + { + EnsureDictionary().Add(key, value); + } + + public bool ContainsKey(TKey key) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().ContainsKey(key); + } + + public bool Remove(TKey key) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().Remove(key); + } + + public bool TryGetValue(TKey key, out TValue value) + { + if (IsUndefined) + { + value = default; + return false; + } + return EnsureDictionary().TryGetValue(key, out value); + } + + public IDictionary EnsureDictionary() + { + return _innerDictionary ??= new Dictionary(); + } + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Internal/ChangeTrackingList.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Internal/ChangeTrackingList.cs new file mode 100644 index 000000000000..f5a2dd110e6e --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Internal/ChangeTrackingList.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.DatabaseFleetManager +{ + internal class ChangeTrackingList : IList, IReadOnlyList + { + private IList _innerList; + + public ChangeTrackingList() + { + } + + public ChangeTrackingList(IList innerList) + { + if (innerList != null) + { + _innerList = innerList; + } + } + + public ChangeTrackingList(IReadOnlyList innerList) + { + if (innerList != null) + { + _innerList = innerList.ToList(); + } + } + + public bool IsUndefined => _innerList == null; + + public int Count => IsUndefined ? 0 : EnsureList().Count; + + public bool IsReadOnly => IsUndefined ? false : EnsureList().IsReadOnly; + + public T this[int index] + { + get + { + if (IsUndefined) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + return EnsureList()[index]; + } + set + { + if (IsUndefined) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + EnsureList()[index] = value; + } + } + + public void Reset() + { + _innerList = null; + } + + public IEnumerator GetEnumerator() + { + if (IsUndefined) + { + IEnumerator enumerateEmpty() + { + yield break; + } + return enumerateEmpty(); + } + return EnsureList().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + public void Add(T item) + { + EnsureList().Add(item); + } + + public void Clear() + { + EnsureList().Clear(); + } + + public bool Contains(T item) + { + if (IsUndefined) + { + return false; + } + return EnsureList().Contains(item); + } + + public void CopyTo(T[] array, int arrayIndex) + { + if (IsUndefined) + { + return; + } + EnsureList().CopyTo(array, arrayIndex); + } + + public bool Remove(T item) + { + if (IsUndefined) + { + return false; + } + return EnsureList().Remove(item); + } + + public int IndexOf(T item) + { + if (IsUndefined) + { + return -1; + } + return EnsureList().IndexOf(item); + } + + public void Insert(int index, T item) + { + EnsureList().Insert(index, item); + } + + public void RemoveAt(int index) + { + if (IsUndefined) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + EnsureList().RemoveAt(index); + } + + public IList EnsureList() + { + return _innerList ??= new List(); + } + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Internal/ModelSerializationExtensions.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Internal/ModelSerializationExtensions.cs new file mode 100644 index 000000000000..cf58591ad508 --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Internal/ModelSerializationExtensions.cs @@ -0,0 +1,399 @@ +// 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.Diagnostics; +using System.Globalization; +using System.Text.Json; +using System.Xml; +using Azure.Core; + +namespace Azure.ResourceManager.DatabaseFleetManager +{ + internal static class ModelSerializationExtensions + { + internal static readonly JsonDocumentOptions JsonDocumentOptions = new JsonDocumentOptions { MaxDepth = 256 }; + internal static readonly ModelReaderWriterOptions WireOptions = new ModelReaderWriterOptions("W"); + + public static object GetObject(this JsonElement element) + { + switch (element.ValueKind) + { + case JsonValueKind.String: + return element.GetString(); + case JsonValueKind.Number: + if (element.TryGetInt32(out int intValue)) + { + return intValue; + } + if (element.TryGetInt64(out long longValue)) + { + return longValue; + } + return element.GetDouble(); + case JsonValueKind.True: + return true; + case JsonValueKind.False: + return false; + case JsonValueKind.Undefined: + case JsonValueKind.Null: + return null; + case JsonValueKind.Object: + var dictionary = new Dictionary(); + foreach (var jsonProperty in element.EnumerateObject()) + { + dictionary.Add(jsonProperty.Name, jsonProperty.Value.GetObject()); + } + return dictionary; + case JsonValueKind.Array: + var list = new List(); + foreach (var item in element.EnumerateArray()) + { + list.Add(item.GetObject()); + } + return list.ToArray(); + default: + throw new NotSupportedException($"Not supported value kind {element.ValueKind}"); + } + } + + public static byte[] GetBytesFromBase64(this JsonElement element, string format) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + + return format switch + { + "U" => TypeFormatters.FromBase64UrlString(element.GetRequiredString()), + "D" => element.GetBytesFromBase64(), + _ => throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)) + }; + } + + public static DateTimeOffset GetDateTimeOffset(this JsonElement element, string format) => format switch + { + "U" when element.ValueKind == JsonValueKind.Number => DateTimeOffset.FromUnixTimeSeconds(element.GetInt64()), + _ => TypeFormatters.ParseDateTimeOffset(element.GetString(), format) + }; + + public static TimeSpan GetTimeSpan(this JsonElement element, string format) => TypeFormatters.ParseTimeSpan(element.GetString(), format); + + public static char GetChar(this JsonElement element) + { + if (element.ValueKind == JsonValueKind.String) + { + var text = element.GetString(); + if (text == null || text.Length != 1) + { + throw new NotSupportedException($"Cannot convert \"{text}\" to a char"); + } + return text[0]; + } + else + { + throw new NotSupportedException($"Cannot convert {element.ValueKind} to a char"); + } + } + + [Conditional("DEBUG")] + public static void ThrowNonNullablePropertyIsNull(this JsonProperty property) + { + throw new JsonException($"A property '{property.Name}' defined as non-nullable but received as null from the service. This exception only happens in DEBUG builds of the library and would be ignored in the release build"); + } + + public static string GetRequiredString(this JsonElement element) + { + var value = element.GetString(); + if (value == null) + { + throw new InvalidOperationException($"The requested operation requires an element of type 'String', but the target element has type '{element.ValueKind}'."); + } + return value; + } + + public static void WriteStringValue(this Utf8JsonWriter writer, DateTimeOffset value, string format) + { + writer.WriteStringValue(TypeFormatters.ToString(value, format)); + } + + public static void WriteStringValue(this Utf8JsonWriter writer, DateTime value, string format) + { + writer.WriteStringValue(TypeFormatters.ToString(value, format)); + } + + public static void WriteStringValue(this Utf8JsonWriter writer, TimeSpan value, string format) + { + writer.WriteStringValue(TypeFormatters.ToString(value, format)); + } + + public static void WriteStringValue(this Utf8JsonWriter writer, char value) + { + writer.WriteStringValue(value.ToString(CultureInfo.InvariantCulture)); + } + + public static void WriteBase64StringValue(this Utf8JsonWriter writer, byte[] value, string format) + { + if (value == null) + { + writer.WriteNullValue(); + return; + } + switch (format) + { + case "U": + writer.WriteStringValue(TypeFormatters.ToBase64UrlString(value)); + break; + case "D": + writer.WriteBase64StringValue(value); + break; + default: + throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)); + } + } + + public static void WriteNumberValue(this Utf8JsonWriter writer, DateTimeOffset value, string format) + { + if (format != "U") + { + throw new ArgumentOutOfRangeException(nameof(format), "Only 'U' format is supported when writing a DateTimeOffset as a Number."); + } + writer.WriteNumberValue(value.ToUnixTimeSeconds()); + } + + public static void WriteObjectValue(this Utf8JsonWriter writer, T value, ModelReaderWriterOptions options = null) + { + switch (value) + { + case null: + writer.WriteNullValue(); + break; + case IJsonModel jsonModel: + jsonModel.Write(writer, options ?? WireOptions); + break; + case IUtf8JsonSerializable serializable: + serializable.Write(writer); + break; + case byte[] bytes: + writer.WriteBase64StringValue(bytes); + break; + case BinaryData bytes0: + writer.WriteBase64StringValue(bytes0); + break; + case JsonElement json: + json.WriteTo(writer); + break; + case int i: + writer.WriteNumberValue(i); + break; + case decimal d: + writer.WriteNumberValue(d); + break; + case double d0: + if (double.IsNaN(d0)) + { + writer.WriteStringValue("NaN"); + } + else + { + writer.WriteNumberValue(d0); + } + break; + case float f: + writer.WriteNumberValue(f); + break; + case long l: + writer.WriteNumberValue(l); + break; + case string s: + writer.WriteStringValue(s); + break; + case bool b: + writer.WriteBooleanValue(b); + break; + case Guid g: + writer.WriteStringValue(g); + break; + case DateTimeOffset dateTimeOffset: + writer.WriteStringValue(dateTimeOffset, "O"); + break; + case DateTime dateTime: + writer.WriteStringValue(dateTime, "O"); + break; + case IEnumerable> enumerable: + writer.WriteStartObject(); + foreach (var pair in enumerable) + { + writer.WritePropertyName(pair.Key); + writer.WriteObjectValue(pair.Value, options); + } + writer.WriteEndObject(); + break; + case IEnumerable objectEnumerable: + writer.WriteStartArray(); + foreach (var item in objectEnumerable) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + break; + case TimeSpan timeSpan: + writer.WriteStringValue(timeSpan, "P"); + break; + default: + throw new NotSupportedException($"Not supported type {value.GetType()}"); + } + } + + public static void WriteObjectValue(this Utf8JsonWriter writer, object value, ModelReaderWriterOptions options = null) + { + writer.WriteObjectValue(value, options); + } + + internal static class TypeFormatters + { + private const string RoundtripZFormat = "yyyy-MM-ddTHH:mm:ss.fffffffZ"; + public const string DefaultNumberFormat = "G"; + + public static string ToString(bool value) => value ? "true" : "false"; + + public static string ToString(DateTime value, string format) => value.Kind switch + { + DateTimeKind.Utc => ToString((DateTimeOffset)value, format), + _ => throw new NotSupportedException($"DateTime {value} has a Kind of {value.Kind}. Azure SDK requires it to be UTC. You can call DateTime.SpecifyKind to change Kind property value to DateTimeKind.Utc.") + }; + + public static string ToString(DateTimeOffset value, string format) => format switch + { + "D" => value.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture), + "U" => value.ToUnixTimeSeconds().ToString(CultureInfo.InvariantCulture), + "O" => value.ToUniversalTime().ToString(RoundtripZFormat, CultureInfo.InvariantCulture), + "o" => value.ToUniversalTime().ToString(RoundtripZFormat, CultureInfo.InvariantCulture), + "R" => value.ToString("r", CultureInfo.InvariantCulture), + _ => value.ToString(format, CultureInfo.InvariantCulture) + }; + + public static string ToString(TimeSpan value, string format) => format switch + { + "P" => XmlConvert.ToString(value), + _ => value.ToString(format, CultureInfo.InvariantCulture) + }; + + public static string ToString(byte[] value, string format) => format switch + { + "U" => ToBase64UrlString(value), + "D" => Convert.ToBase64String(value), + _ => throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)) + }; + + public static string ToBase64UrlString(byte[] value) + { + int numWholeOrPartialInputBlocks = checked(value.Length + 2) / 3; + int size = checked(numWholeOrPartialInputBlocks * 4); + char[] output = new char[size]; + + int numBase64Chars = Convert.ToBase64CharArray(value, 0, value.Length, output, 0); + + int i = 0; + for (; i < numBase64Chars; i++) + { + char ch = output[i]; + if (ch == '+') + { + output[i] = '-'; + } + else + { + if (ch == '/') + { + output[i] = '_'; + } + else + { + if (ch == '=') + { + break; + } + } + } + } + + return new string(output, 0, i); + } + + public static byte[] FromBase64UrlString(string value) + { + int paddingCharsToAdd = (value.Length % 4) switch + { + 0 => 0, + 2 => 2, + 3 => 1, + _ => throw new InvalidOperationException("Malformed input") + }; + char[] output = new char[(value.Length + paddingCharsToAdd)]; + int i = 0; + for (; i < value.Length; i++) + { + char ch = value[i]; + if (ch == '-') + { + output[i] = '+'; + } + else + { + if (ch == '_') + { + output[i] = '/'; + } + else + { + output[i] = ch; + } + } + } + + for (; i < output.Length; i++) + { + output[i] = '='; + } + + return Convert.FromBase64CharArray(output, 0, output.Length); + } + + public static DateTimeOffset ParseDateTimeOffset(string value, string format) => format switch + { + "U" => DateTimeOffset.FromUnixTimeSeconds(long.Parse(value, CultureInfo.InvariantCulture)), + _ => DateTimeOffset.Parse(value, CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal) + }; + + public static TimeSpan ParseTimeSpan(string value, string format) => format switch + { + "P" => XmlConvert.ToTimeSpan(value), + _ => TimeSpan.ParseExact(value, format, CultureInfo.InvariantCulture) + }; + + public static string ConvertToString(object value, string format = null) => value switch + { + null => "null", + string s => s, + bool b => ToString(b), + int or float or double or long or decimal => ((IFormattable)value).ToString(DefaultNumberFormat, CultureInfo.InvariantCulture), + byte[] b0 when format != null => ToString(b0, format), + IEnumerable s0 => string.Join(",", s0), + DateTimeOffset dateTime when format != null => ToString(dateTime, format), + TimeSpan timeSpan when format != null => ToString(timeSpan, format), + TimeSpan timeSpan0 => XmlConvert.ToString(timeSpan0), + Guid guid => guid.ToString(), + BinaryData binaryData => ConvertToString(binaryData.ToArray(), format), + _ => value.ToString() + }; + } + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Internal/Optional.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Internal/Optional.cs new file mode 100644 index 000000000000..c0a6938f59ff --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Internal/Optional.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.ResourceManager.DatabaseFleetManager +{ + internal static class Optional + { + public static bool IsCollectionDefined(IEnumerable collection) + { + return !(collection is ChangeTrackingList changeTrackingList && changeTrackingList.IsUndefined); + } + + public static bool IsCollectionDefined(IDictionary collection) + { + return !(collection is ChangeTrackingDictionary changeTrackingDictionary && changeTrackingDictionary.IsUndefined); + } + + public static bool IsCollectionDefined(IReadOnlyDictionary collection) + { + return !(collection is ChangeTrackingDictionary changeTrackingDictionary && changeTrackingDictionary.IsUndefined); + } + + public static bool IsDefined(T? value) + where T : struct + { + return value.HasValue; + } + + public static bool IsDefined(object value) + { + return value != null; + } + + public static bool IsDefined(JsonElement value) + { + return value.ValueKind != JsonValueKind.Undefined; + } + + public static bool IsDefined(string value) + { + return value != null; + } + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Internal/Utf8JsonRequestContent.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Internal/Utf8JsonRequestContent.cs new file mode 100644 index 000000000000..39c287294c4d --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Internal/Utf8JsonRequestContent.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.IO; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.DatabaseFleetManager +{ + internal class Utf8JsonRequestContent : RequestContent + { + private readonly MemoryStream _stream; + private readonly RequestContent _content; + + public Utf8JsonRequestContent() + { + _stream = new MemoryStream(); + _content = Create(_stream); + JsonWriter = new Utf8JsonWriter(_stream); + } + + public Utf8JsonWriter JsonWriter { get; } + + public override async Task WriteToAsync(Stream stream, CancellationToken cancellationToken = default) + { + await JsonWriter.FlushAsync().ConfigureAwait(false); + await _content.WriteToAsync(stream, cancellationToken).ConfigureAwait(false); + } + + public override void WriteTo(Stream stream, CancellationToken cancellationToken = default) + { + JsonWriter.Flush(); + _content.WriteTo(stream, cancellationToken); + } + + public override bool TryComputeLength(out long length) + { + length = JsonWriter.BytesCommitted + JsonWriter.BytesPending; + return true; + } + + public override void Dispose() + { + JsonWriter.Dispose(); + _content.Dispose(); + _stream.Dispose(); + } + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/DatabaseFleetManagerArmOperation.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/DatabaseFleetManagerArmOperation.cs new file mode 100644 index 000000000000..6fd3fa7a1c7a --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/DatabaseFleetManagerArmOperation.cs @@ -0,0 +1,94 @@ +// 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.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.DatabaseFleetManager +{ +#pragma warning disable SA1649 // File name should match first type name + internal class DatabaseFleetManagerArmOperation : ArmOperation +#pragma warning restore SA1649 // File name should match first type name + { + private readonly OperationInternal _operation; + private readonly RehydrationToken? _completeRehydrationToken; + private readonly NextLinkOperationImplementation _nextLinkOperation; + private readonly string _operationId; + + /// Initializes a new instance of DatabaseFleetManagerArmOperation for mocking. + protected DatabaseFleetManagerArmOperation() + { + } + + internal DatabaseFleetManagerArmOperation(Response response, RehydrationToken? rehydrationToken = null) + { + _operation = OperationInternal.Succeeded(response); + _completeRehydrationToken = rehydrationToken; + _operationId = GetOperationId(rehydrationToken); + } + + internal DatabaseFleetManagerArmOperation(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response, OperationFinalStateVia finalStateVia, bool skipApiVersionOverride = false, string apiVersionOverrideValue = null) + { + var nextLinkOperation = NextLinkOperationImplementation.Create(pipeline, request.Method, request.Uri.ToUri(), response, finalStateVia, skipApiVersionOverride, apiVersionOverrideValue); + if (nextLinkOperation is NextLinkOperationImplementation nextLinkOperationValue) + { + _nextLinkOperation = nextLinkOperationValue; + _operationId = _nextLinkOperation.OperationId; + } + else + { + _completeRehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(request.Method, request.Uri.ToUri(), response, finalStateVia); + _operationId = GetOperationId(_completeRehydrationToken); + } + _operation = new OperationInternal(nextLinkOperation, clientDiagnostics, response, "DatabaseFleetManagerArmOperation", fallbackStrategy: new SequentialDelayStrategy()); + } + + private string GetOperationId(RehydrationToken? rehydrationToken) + { + if (rehydrationToken is null) + { + return null; + } + var lroDetails = ModelReaderWriter.Write(rehydrationToken, ModelReaderWriterOptions.Json).ToObjectFromJson>(); + return lroDetails["id"]; + } + /// + public override string Id => _operationId ?? NextLinkOperationImplementation.NotSet; + + /// + public override RehydrationToken? GetRehydrationToken() => _nextLinkOperation?.GetRehydrationToken() ?? _completeRehydrationToken; + + /// + public override bool HasCompleted => _operation.HasCompleted; + + /// + public override Response GetRawResponse() => _operation.RawResponse; + + /// + public override Response UpdateStatus(CancellationToken cancellationToken = default) => _operation.UpdateStatus(cancellationToken); + + /// + public override ValueTask UpdateStatusAsync(CancellationToken cancellationToken = default) => _operation.UpdateStatusAsync(cancellationToken); + + /// + public override Response WaitForCompletionResponse(CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponse(cancellationToken); + + /// + public override Response WaitForCompletionResponse(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponse(pollingInterval, cancellationToken); + + /// + public override ValueTask WaitForCompletionResponseAsync(CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponseAsync(cancellationToken); + + /// + public override ValueTask WaitForCompletionResponseAsync(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponseAsync(pollingInterval, cancellationToken); + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/DatabaseFleetManagerArmOperationOfT.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/DatabaseFleetManagerArmOperationOfT.cs new file mode 100644 index 000000000000..86c5d39dd20e --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/DatabaseFleetManagerArmOperationOfT.cs @@ -0,0 +1,100 @@ +// 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.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.DatabaseFleetManager +{ +#pragma warning disable SA1649 // File name should match first type name + internal class DatabaseFleetManagerArmOperation : ArmOperation +#pragma warning restore SA1649 // File name should match first type name + { + private readonly OperationInternal _operation; + private readonly RehydrationToken? _completeRehydrationToken; + private readonly NextLinkOperationImplementation _nextLinkOperation; + private readonly string _operationId; + + /// Initializes a new instance of DatabaseFleetManagerArmOperation for mocking. + protected DatabaseFleetManagerArmOperation() + { + } + + internal DatabaseFleetManagerArmOperation(Response response, RehydrationToken? rehydrationToken = null) + { + _operation = OperationInternal.Succeeded(response.GetRawResponse(), response.Value); + _completeRehydrationToken = rehydrationToken; + _operationId = GetOperationId(rehydrationToken); + } + + internal DatabaseFleetManagerArmOperation(IOperationSource source, ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response, OperationFinalStateVia finalStateVia, bool skipApiVersionOverride = false, string apiVersionOverrideValue = null) + { + var nextLinkOperation = NextLinkOperationImplementation.Create(pipeline, request.Method, request.Uri.ToUri(), response, finalStateVia, skipApiVersionOverride, apiVersionOverrideValue); + if (nextLinkOperation is NextLinkOperationImplementation nextLinkOperationValue) + { + _nextLinkOperation = nextLinkOperationValue; + _operationId = _nextLinkOperation.OperationId; + } + else + { + _completeRehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(request.Method, request.Uri.ToUri(), response, finalStateVia); + _operationId = GetOperationId(_completeRehydrationToken); + } + _operation = new OperationInternal(NextLinkOperationImplementation.Create(source, nextLinkOperation), clientDiagnostics, response, "DatabaseFleetManagerArmOperation", fallbackStrategy: new SequentialDelayStrategy()); + } + + private string GetOperationId(RehydrationToken? rehydrationToken) + { + if (rehydrationToken is null) + { + return null; + } + var lroDetails = ModelReaderWriter.Write(rehydrationToken, ModelReaderWriterOptions.Json).ToObjectFromJson>(); + return lroDetails["id"]; + } + /// + public override string Id => _operationId ?? NextLinkOperationImplementation.NotSet; + + /// + public override RehydrationToken? GetRehydrationToken() => _nextLinkOperation?.GetRehydrationToken() ?? _completeRehydrationToken; + + /// + public override T Value => _operation.Value; + + /// + public override bool HasValue => _operation.HasValue; + + /// + public override bool HasCompleted => _operation.HasCompleted; + + /// + public override Response GetRawResponse() => _operation.RawResponse; + + /// + public override Response UpdateStatus(CancellationToken cancellationToken = default) => _operation.UpdateStatus(cancellationToken); + + /// + public override ValueTask UpdateStatusAsync(CancellationToken cancellationToken = default) => _operation.UpdateStatusAsync(cancellationToken); + + /// + public override Response WaitForCompletion(CancellationToken cancellationToken = default) => _operation.WaitForCompletion(cancellationToken); + + /// + public override Response WaitForCompletion(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletion(pollingInterval, cancellationToken); + + /// + public override ValueTask> WaitForCompletionAsync(CancellationToken cancellationToken = default) => _operation.WaitForCompletionAsync(cancellationToken); + + /// + public override ValueTask> WaitForCompletionAsync(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionAsync(pollingInterval, cancellationToken); + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/FirewallRuleOperationSource.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/FirewallRuleOperationSource.cs new file mode 100644 index 000000000000..2604858bfca6 --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/FirewallRuleOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.DatabaseFleetManager +{ + internal class FirewallRuleOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal FirewallRuleOperationSource(ArmClient client) + { + _client = client; + } + + FirewallRuleResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return new FirewallRuleResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return await Task.FromResult(new FirewallRuleResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/FleetDatabaseOperationSource.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/FleetDatabaseOperationSource.cs new file mode 100644 index 000000000000..cf70c4e315a0 --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/FleetDatabaseOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.DatabaseFleetManager +{ + internal class FleetDatabaseOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal FleetDatabaseOperationSource(ArmClient client) + { + _client = client; + } + + FleetDatabaseResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return new FleetDatabaseResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return await Task.FromResult(new FleetDatabaseResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/FleetOperationSource.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/FleetOperationSource.cs new file mode 100644 index 000000000000..7838c8a79c8a --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/FleetOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.DatabaseFleetManager +{ + internal class FleetOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal FleetOperationSource(ArmClient client) + { + _client = client; + } + + FleetResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return new FleetResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return await Task.FromResult(new FleetResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/FleetTierOperationSource.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/FleetTierOperationSource.cs new file mode 100644 index 000000000000..4067f6ded8bc --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/FleetTierOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.DatabaseFleetManager +{ + internal class FleetTierOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal FleetTierOperationSource(ArmClient client) + { + _client = client; + } + + FleetTierResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return new FleetTierResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return await Task.FromResult(new FleetTierResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/FleetspaceOperationSource.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/FleetspaceOperationSource.cs new file mode 100644 index 000000000000..cd5e26bb8eee --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/LongRunningOperation/FleetspaceOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.DatabaseFleetManager +{ + internal class FleetspaceOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal FleetspaceOperationSource(ArmClient client) + { + _client = client; + } + + FleetspaceResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return new FleetspaceResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return await Task.FromResult(new FleetspaceResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/AzureProvisioningState.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/AzureProvisioningState.cs new file mode 100644 index 000000000000..c073fa2c2d75 --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/AzureProvisioningState.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.DatabaseFleetManager.Models +{ + /// The provisioning state of the resource. + public readonly partial struct AzureProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AzureProvisioningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + private const string CanceledValue = "Canceled"; + private const string ProvisioningValue = "Provisioning"; + private const string AcceptedValue = "Accepted"; + + /// Resource has been created. + public static AzureProvisioningState Succeeded { get; } = new AzureProvisioningState(SucceededValue); + /// Resource creation failed. + public static AzureProvisioningState Failed { get; } = new AzureProvisioningState(FailedValue); + /// Resource creation was canceled. + public static AzureProvisioningState Canceled { get; } = new AzureProvisioningState(CanceledValue); + /// Resource is provisioning. + public static AzureProvisioningState Provisioning { get; } = new AzureProvisioningState(ProvisioningValue); + /// Request on the resource has been accepted. + public static AzureProvisioningState Accepted { get; } = new AzureProvisioningState(AcceptedValue); + /// Determines if two values are the same. + public static bool operator ==(AzureProvisioningState left, AzureProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AzureProvisioningState left, AzureProvisioningState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AzureProvisioningState(string value) => new AzureProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AzureProvisioningState other && Equals(other); + /// + public bool Equals(AzureProvisioningState 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/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseChangeTierProperties.Serialization.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseChangeTierProperties.Serialization.cs new file mode 100644 index 000000000000..32e011095089 --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseChangeTierProperties.Serialization.cs @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DatabaseFleetManager.Models +{ + public partial class DatabaseChangeTierProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DatabaseChangeTierProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(TargetTierName)) + { + writer.WritePropertyName("targetTierName"u8); + writer.WriteStringValue(TargetTierName); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DatabaseChangeTierProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DatabaseChangeTierProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDatabaseChangeTierProperties(document.RootElement, options); + } + + internal static DatabaseChangeTierProperties DeserializeDatabaseChangeTierProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string targetTierName = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("targetTierName"u8)) + { + targetTierName = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DatabaseChangeTierProperties(targetTierName, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DatabaseChangeTierProperties)} does not support writing '{options.Format}' format."); + } + } + + DatabaseChangeTierProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDatabaseChangeTierProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DatabaseChangeTierProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseChangeTierProperties.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseChangeTierProperties.cs new file mode 100644 index 000000000000..8a70c7397149 --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseChangeTierProperties.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DatabaseFleetManager.Models +{ + /// A database change tier definition. + public partial class DatabaseChangeTierProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DatabaseChangeTierProperties() + { + } + + /// Initializes a new instance of . + /// A target tier name. + /// Keeps track of any properties unknown to the library. + internal DatabaseChangeTierProperties(string targetTierName, IDictionary serializedAdditionalRawData) + { + TargetTierName = targetTierName; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// A target tier name. + public string TargetTierName { get; set; } + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseCreateMode.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseCreateMode.cs new file mode 100644 index 000000000000..cc3388d3483e --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseCreateMode.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.DatabaseFleetManager.Models +{ + /// Create mode. Available options: Default - Create a database. Copy - Copy the source database (source database name must be specified) PointInTimeRestore - Create a database by restoring source database from a point in time (source database name and restore from time must be specified). + public readonly partial struct DatabaseCreateMode : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DatabaseCreateMode(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DefaultValue = "Default"; + private const string CopyValue = "Copy"; + private const string PointInTimeRestoreValue = "PointInTimeRestore"; + + /// Create a database. + public static DatabaseCreateMode Default { get; } = new DatabaseCreateMode(DefaultValue); + /// Copy the source database (source database name must be specified). + public static DatabaseCreateMode Copy { get; } = new DatabaseCreateMode(CopyValue); + /// Create a database by restoring source database from a point in time (source database name and restore from time must be specified). + public static DatabaseCreateMode PointInTimeRestore { get; } = new DatabaseCreateMode(PointInTimeRestoreValue); + /// Determines if two values are the same. + public static bool operator ==(DatabaseCreateMode left, DatabaseCreateMode right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DatabaseCreateMode left, DatabaseCreateMode right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DatabaseCreateMode(string value) => new DatabaseCreateMode(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DatabaseCreateMode other && Equals(other); + /// + public bool Equals(DatabaseCreateMode 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/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseIdentity.Serialization.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseIdentity.Serialization.cs new file mode 100644 index 000000000000..ebd6446153b4 --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseIdentity.Serialization.cs @@ -0,0 +1,163 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DatabaseFleetManager.Models +{ + public partial class DatabaseIdentity : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DatabaseIdentity)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(ResourceId)) + { + writer.WritePropertyName("resourceId"u8); + writer.WriteStringValue(ResourceId); + } + if (Optional.IsDefined(PrincipalId)) + { + writer.WritePropertyName("principalId"u8); + writer.WriteStringValue(PrincipalId.Value); + } + if (Optional.IsDefined(ClientId)) + { + writer.WritePropertyName("clientId"u8); + writer.WriteStringValue(ClientId.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DatabaseIdentity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DatabaseIdentity)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDatabaseIdentity(document.RootElement, options); + } + + internal static DatabaseIdentity DeserializeDatabaseIdentity(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier resourceId = default; + Guid? principalId = default; + Guid? clientId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("resourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("principalId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + principalId = property.Value.GetGuid(); + continue; + } + if (property.NameEquals("clientId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + clientId = property.Value.GetGuid(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DatabaseIdentity(resourceId, principalId, clientId, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DatabaseIdentity)} does not support writing '{options.Format}' format."); + } + } + + DatabaseIdentity IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDatabaseIdentity(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DatabaseIdentity)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseIdentity.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseIdentity.cs new file mode 100644 index 000000000000..67808bbeb8a3 --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseIdentity.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.DatabaseFleetManager.Models +{ + /// Database Identity properties. + public partial class DatabaseIdentity + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DatabaseIdentity() + { + } + + /// Initializes a new instance of . + /// Resource Id of the database identity. + /// Principal Id of the database identity. + /// Client Id of the database identity. + /// Keeps track of any properties unknown to the library. + internal DatabaseIdentity(ResourceIdentifier resourceId, Guid? principalId, Guid? clientId, IDictionary serializedAdditionalRawData) + { + ResourceId = resourceId; + PrincipalId = principalId; + ClientId = clientId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Resource Id of the database identity. + public ResourceIdentifier ResourceId { get; set; } + /// Principal Id of the database identity. + public Guid? PrincipalId { get; set; } + /// Client Id of the database identity. + public Guid? ClientId { get; set; } + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseRenameProperties.Serialization.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseRenameProperties.Serialization.cs new file mode 100644 index 000000000000..4f6679d545d3 --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseRenameProperties.Serialization.cs @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DatabaseFleetManager.Models +{ + public partial class DatabaseRenameProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DatabaseRenameProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(NewName)) + { + writer.WritePropertyName("newName"u8); + writer.WriteStringValue(NewName); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DatabaseRenameProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DatabaseRenameProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDatabaseRenameProperties(document.RootElement, options); + } + + internal static DatabaseRenameProperties DeserializeDatabaseRenameProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string newName = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("newName"u8)) + { + newName = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DatabaseRenameProperties(newName, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DatabaseRenameProperties)} does not support writing '{options.Format}' format."); + } + } + + DatabaseRenameProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDatabaseRenameProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DatabaseRenameProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseRenameProperties.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseRenameProperties.cs new file mode 100644 index 000000000000..214a1aebc3b1 --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DatabaseRenameProperties.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DatabaseFleetManager.Models +{ + /// A database rename definition. + public partial class DatabaseRenameProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DatabaseRenameProperties() + { + } + + /// Initializes a new instance of . + /// New database name. + /// Keeps track of any properties unknown to the library. + internal DatabaseRenameProperties(string newName, IDictionary serializedAdditionalRawData) + { + NewName = newName; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// New database name. + public string NewName { get; set; } + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DestinationTierOverride.Serialization.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DestinationTierOverride.Serialization.cs new file mode 100644 index 000000000000..d4b3b7c69463 --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DestinationTierOverride.Serialization.cs @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DatabaseFleetManager.Models +{ + public partial class DestinationTierOverride : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DestinationTierOverride)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("resourceType"u8); + writer.WriteStringValue(ResourceType.ToString()); + writer.WritePropertyName("tierName"u8); + writer.WriteStringValue(TierName); + writer.WritePropertyName("resourceName"u8); + writer.WriteStringValue(ResourceName); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DestinationTierOverride IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DestinationTierOverride)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDestinationTierOverride(document.RootElement, options); + } + + internal static DestinationTierOverride DeserializeDestinationTierOverride(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceType resourceType = default; + string tierName = default; + string resourceName = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("resourceType"u8)) + { + resourceType = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("tierName"u8)) + { + tierName = property.Value.GetString(); + continue; + } + if (property.NameEquals("resourceName"u8)) + { + resourceName = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DestinationTierOverride(resourceType, tierName, resourceName, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DestinationTierOverride)} does not support writing '{options.Format}' format."); + } + } + + DestinationTierOverride IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDestinationTierOverride(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DestinationTierOverride)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DestinationTierOverride.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DestinationTierOverride.cs new file mode 100644 index 000000000000..57d6395ac192 --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/DestinationTierOverride.cs @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DatabaseFleetManager.Models +{ + /// A destination tier override. + public partial class DestinationTierOverride + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Resource type. + /// Destination tier name. + /// Resource name. + /// or is null. + public DestinationTierOverride(ResourceType resourceType, string tierName, string resourceName) + { + Argument.AssertNotNull(tierName, nameof(tierName)); + Argument.AssertNotNull(resourceName, nameof(resourceName)); + + ResourceType = resourceType; + TierName = tierName; + ResourceName = resourceName; + } + + /// Initializes a new instance of . + /// Resource type. + /// Destination tier name. + /// Resource name. + /// Keeps track of any properties unknown to the library. + internal DestinationTierOverride(ResourceType resourceType, string tierName, string resourceName, IDictionary serializedAdditionalRawData) + { + ResourceType = resourceType; + TierName = tierName; + ResourceName = resourceName; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DestinationTierOverride() + { + } + + /// Resource type. + public ResourceType ResourceType { get; } + /// Destination tier name. + public string TierName { get; } + /// Resource name. + public string ResourceName { get; } + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FirewallRuleListResult.Serialization.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FirewallRuleListResult.Serialization.cs new file mode 100644 index 000000000000..ccd82bf73663 --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FirewallRuleListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DatabaseFleetManager.Models +{ + internal partial class FirewallRuleListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FirewallRuleListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + FirewallRuleListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FirewallRuleListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFirewallRuleListResult(document.RootElement, options); + } + + internal static FirewallRuleListResult DeserializeFirewallRuleListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(FirewallRuleData.DeserializeFirewallRuleData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FirewallRuleListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(FirewallRuleListResult)} does not support writing '{options.Format}' format."); + } + } + + FirewallRuleListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeFirewallRuleListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FirewallRuleListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FirewallRuleListResult.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FirewallRuleListResult.cs new file mode 100644 index 000000000000..fac7d86244ec --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FirewallRuleListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.DatabaseFleetManager.Models +{ + /// The response of a FirewallRule list operation. + internal partial class FirewallRuleListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The FirewallRule items on this page. + /// is null. + internal FirewallRuleListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The FirewallRule items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal FirewallRuleListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal FirewallRuleListResult() + { + } + + /// The FirewallRule items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FirewallRuleProperties.Serialization.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FirewallRuleProperties.Serialization.cs new file mode 100644 index 000000000000..ba54c2d1e5c3 --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FirewallRuleProperties.Serialization.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DatabaseFleetManager.Models +{ + public partial class FirewallRuleProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FirewallRuleProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(StartIPAddress)) + { + writer.WritePropertyName("startIpAddress"u8); + writer.WriteStringValue(StartIPAddress); + } + if (Optional.IsDefined(EndIPAddress)) + { + writer.WritePropertyName("endIpAddress"u8); + writer.WriteStringValue(EndIPAddress); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + FirewallRuleProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FirewallRuleProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFirewallRuleProperties(document.RootElement, options); + } + + internal static FirewallRuleProperties DeserializeFirewallRuleProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string startIPAddress = default; + string endIPAddress = default; + AzureProvisioningState? provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("startIpAddress"u8)) + { + startIPAddress = property.Value.GetString(); + continue; + } + if (property.NameEquals("endIpAddress"u8)) + { + endIPAddress = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new AzureProvisioningState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FirewallRuleProperties(startIPAddress, endIPAddress, provisioningState, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(FirewallRuleProperties)} does not support writing '{options.Format}' format."); + } + } + + FirewallRuleProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeFirewallRuleProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FirewallRuleProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FirewallRuleProperties.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FirewallRuleProperties.cs new file mode 100644 index 000000000000..2bf604d4345e --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FirewallRuleProperties.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DatabaseFleetManager.Models +{ + /// A Firewall rule properties. + public partial class FirewallRuleProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public FirewallRuleProperties() + { + } + + /// Initializes a new instance of . + /// Start IP address. + /// End IP address. + /// Provisioning state. + /// Keeps track of any properties unknown to the library. + internal FirewallRuleProperties(string startIPAddress, string endIPAddress, AzureProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) + { + StartIPAddress = startIPAddress; + EndIPAddress = endIPAddress; + ProvisioningState = provisioningState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Start IP address. + public string StartIPAddress { get; set; } + /// End IP address. + public string EndIPAddress { get; set; } + /// Provisioning state. + public AzureProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetDatabaseListResult.Serialization.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetDatabaseListResult.Serialization.cs new file mode 100644 index 000000000000..192ef03dca0b --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetDatabaseListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DatabaseFleetManager.Models +{ + internal partial class FleetDatabaseListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FleetDatabaseListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + FleetDatabaseListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FleetDatabaseListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFleetDatabaseListResult(document.RootElement, options); + } + + internal static FleetDatabaseListResult DeserializeFleetDatabaseListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(FleetDatabaseData.DeserializeFleetDatabaseData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FleetDatabaseListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(FleetDatabaseListResult)} does not support writing '{options.Format}' format."); + } + } + + FleetDatabaseListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeFleetDatabaseListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FleetDatabaseListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetDatabaseListResult.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetDatabaseListResult.cs new file mode 100644 index 000000000000..94d3204d6a4e --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetDatabaseListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.DatabaseFleetManager.Models +{ + /// The response of a FleetDatabase list operation. + internal partial class FleetDatabaseListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The FleetDatabase items on this page. + /// is null. + internal FleetDatabaseListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The FleetDatabase items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal FleetDatabaseListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal FleetDatabaseListResult() + { + } + + /// The FleetDatabase items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetDatabaseProperties.Serialization.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetDatabaseProperties.Serialization.cs new file mode 100644 index 000000000000..e94d8f475a9d --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetDatabaseProperties.Serialization.cs @@ -0,0 +1,366 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DatabaseFleetManager.Models +{ + public partial class FleetDatabaseProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FleetDatabaseProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(OriginalDatabaseId)) + { + writer.WritePropertyName("originalDatabaseId"u8); + writer.WriteStringValue(OriginalDatabaseId); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (Optional.IsDefined(CreateMode)) + { + writer.WritePropertyName("createMode"u8); + writer.WriteStringValue(CreateMode.Value.ToString()); + } + if (Optional.IsDefined(TierName)) + { + writer.WritePropertyName("tierName"u8); + writer.WriteStringValue(TierName); + } + if (options.Format != "W" && Optional.IsDefined(ConnectionString)) + { + writer.WritePropertyName("connectionString"u8); + writer.WriteStringValue(ConnectionString); + } + if (options.Format != "W" && Optional.IsDefined(Recoverable)) + { + writer.WritePropertyName("recoverable"u8); + writer.WriteBooleanValue(Recoverable.Value); + } + if (Optional.IsDefined(RestoreFromOn)) + { + writer.WritePropertyName("restoreFromTime"u8); + writer.WriteStringValue(RestoreFromOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(EarliestRestoreOn)) + { + writer.WritePropertyName("earliestRestoreTime"u8); + writer.WriteStringValue(EarliestRestoreOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(LatestRestoreOn)) + { + writer.WritePropertyName("latestRestoreTime"u8); + writer.WriteStringValue(LatestRestoreOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(BackupRetentionDays)) + { + writer.WritePropertyName("backupRetentionDays"u8); + writer.WriteNumberValue(BackupRetentionDays.Value); + } + if (options.Format != "W" && Optional.IsDefined(DatabaseSizeGbMax)) + { + writer.WritePropertyName("databaseSizeGbMax"u8); + writer.WriteNumberValue(DatabaseSizeGbMax.Value); + } + if (Optional.IsDefined(SourceDatabaseName)) + { + writer.WritePropertyName("sourceDatabaseName"u8); + writer.WriteStringValue(SourceDatabaseName); + } + if (Optional.IsCollectionDefined(ResourceTags)) + { + writer.WritePropertyName("resourceTags"u8); + writer.WriteStartObject(); + foreach (var item in ResourceTags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"u8); + writer.WriteObjectValue(Identity, options); + } + if (Optional.IsDefined(TransparentDataEncryption)) + { + writer.WritePropertyName("transparentDataEncryption"u8); + writer.WriteObjectValue(TransparentDataEncryption, options); + } + if (Optional.IsDefined(Collation)) + { + writer.WritePropertyName("collation"u8); + writer.WriteStringValue(Collation); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + FleetDatabaseProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FleetDatabaseProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFleetDatabaseProperties(document.RootElement, options); + } + + internal static FleetDatabaseProperties DeserializeFleetDatabaseProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string originalDatabaseId = default; + AzureProvisioningState? provisioningState = default; + DatabaseCreateMode? createMode = default; + string tierName = default; + string connectionString = default; + bool? recoverable = default; + DateTimeOffset? restoreFromTime = default; + DateTimeOffset? earliestRestoreTime = default; + DateTimeOffset? latestRestoreTime = default; + int? backupRetentionDays = default; + int? databaseSizeGbMax = default; + string sourceDatabaseName = default; + IDictionary resourceTags = default; + IdentityProperties identity = default; + TransparentDataEncryption transparentDataEncryption = default; + string collation = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("originalDatabaseId"u8)) + { + originalDatabaseId = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new AzureProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("createMode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + createMode = new DatabaseCreateMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("tierName"u8)) + { + tierName = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectionString"u8)) + { + connectionString = property.Value.GetString(); + continue; + } + if (property.NameEquals("recoverable"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + recoverable = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("restoreFromTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + restoreFromTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("earliestRestoreTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + earliestRestoreTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("latestRestoreTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + latestRestoreTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("backupRetentionDays"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + backupRetentionDays = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("databaseSizeGbMax"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + databaseSizeGbMax = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("sourceDatabaseName"u8)) + { + sourceDatabaseName = property.Value.GetString(); + continue; + } + if (property.NameEquals("resourceTags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + resourceTags = dictionary; + continue; + } + if (property.NameEquals("identity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + identity = IdentityProperties.DeserializeIdentityProperties(property.Value, options); + continue; + } + if (property.NameEquals("transparentDataEncryption"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + transparentDataEncryption = TransparentDataEncryption.DeserializeTransparentDataEncryption(property.Value, options); + continue; + } + if (property.NameEquals("collation"u8)) + { + collation = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FleetDatabaseProperties( + originalDatabaseId, + provisioningState, + createMode, + tierName, + connectionString, + recoverable, + restoreFromTime, + earliestRestoreTime, + latestRestoreTime, + backupRetentionDays, + databaseSizeGbMax, + sourceDatabaseName, + resourceTags ?? new ChangeTrackingDictionary(), + identity, + transparentDataEncryption, + collation, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(FleetDatabaseProperties)} does not support writing '{options.Format}' format."); + } + } + + FleetDatabaseProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeFleetDatabaseProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FleetDatabaseProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetDatabaseProperties.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetDatabaseProperties.cs new file mode 100644 index 000000000000..f9af6806a77c --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetDatabaseProperties.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DatabaseFleetManager.Models +{ + /// Fleet database properties. + public partial class FleetDatabaseProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public FleetDatabaseProperties() + { + ResourceTags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// Resource identifier for the underlying database resource. + /// Database state. + /// Create mode. Available options: Default - Create a database. Copy - Copy the source database (source database name must be specified) PointInTimeRestore - Create a database by restoring source database from a point in time (source database name and restore from time must be specified). + /// Name of the tier this database belongs to. + /// Connection string to connect to the database with. + /// If true, database is recoverable. + /// Restore from time when CreateMode is PointInTimeRestore. + /// Earliest restore time. + /// Latest restore time. + /// Backup retention in days. + /// Maximum database size in Gb. + /// Source database name used when CreateMode is Copy or PointInTimeRestore. + /// Additional database properties to be applied as the underlying database resource tags. + /// Identity property. + /// Transparent Data Encryption properties. + /// Database collation. + /// Keeps track of any properties unknown to the library. + internal FleetDatabaseProperties(string originalDatabaseId, AzureProvisioningState? provisioningState, DatabaseCreateMode? createMode, string tierName, string connectionString, bool? recoverable, DateTimeOffset? restoreFromOn, DateTimeOffset? earliestRestoreOn, DateTimeOffset? latestRestoreOn, int? backupRetentionDays, int? databaseSizeGbMax, string sourceDatabaseName, IDictionary resourceTags, IdentityProperties identity, TransparentDataEncryption transparentDataEncryption, string collation, IDictionary serializedAdditionalRawData) + { + OriginalDatabaseId = originalDatabaseId; + ProvisioningState = provisioningState; + CreateMode = createMode; + TierName = tierName; + ConnectionString = connectionString; + Recoverable = recoverable; + RestoreFromOn = restoreFromOn; + EarliestRestoreOn = earliestRestoreOn; + LatestRestoreOn = latestRestoreOn; + BackupRetentionDays = backupRetentionDays; + DatabaseSizeGbMax = databaseSizeGbMax; + SourceDatabaseName = sourceDatabaseName; + ResourceTags = resourceTags; + Identity = identity; + TransparentDataEncryption = transparentDataEncryption; + Collation = collation; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Resource identifier for the underlying database resource. + public string OriginalDatabaseId { get; } + /// Database state. + public AzureProvisioningState? ProvisioningState { get; } + /// Create mode. Available options: Default - Create a database. Copy - Copy the source database (source database name must be specified) PointInTimeRestore - Create a database by restoring source database from a point in time (source database name and restore from time must be specified). + public DatabaseCreateMode? CreateMode { get; set; } + /// Name of the tier this database belongs to. + public string TierName { get; set; } + /// Connection string to connect to the database with. + public string ConnectionString { get; } + /// If true, database is recoverable. + public bool? Recoverable { get; } + /// Restore from time when CreateMode is PointInTimeRestore. + public DateTimeOffset? RestoreFromOn { get; set; } + /// Earliest restore time. + public DateTimeOffset? EarliestRestoreOn { get; } + /// Latest restore time. + public DateTimeOffset? LatestRestoreOn { get; } + /// Backup retention in days. + public int? BackupRetentionDays { get; } + /// Maximum database size in Gb. + public int? DatabaseSizeGbMax { get; } + /// Source database name used when CreateMode is Copy or PointInTimeRestore. + public string SourceDatabaseName { get; set; } + /// Additional database properties to be applied as the underlying database resource tags. + public IDictionary ResourceTags { get; } + /// Identity property. + public IdentityProperties Identity { get; set; } + /// Transparent Data Encryption properties. + public TransparentDataEncryption TransparentDataEncryption { get; set; } + /// Database collation. + public string Collation { get; set; } + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetListResult.Serialization.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetListResult.Serialization.cs new file mode 100644 index 000000000000..947fc827324d --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DatabaseFleetManager.Models +{ + internal partial class FleetListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FleetListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + FleetListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FleetListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFleetListResult(document.RootElement, options); + } + + internal static FleetListResult DeserializeFleetListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(FleetData.DeserializeFleetData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FleetListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(FleetListResult)} does not support writing '{options.Format}' format."); + } + } + + FleetListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeFleetListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FleetListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetListResult.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetListResult.cs new file mode 100644 index 000000000000..8f540541070e --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.DatabaseFleetManager.Models +{ + /// The response of a Fleet list operation. + internal partial class FleetListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The Fleet items on this page. + /// is null. + internal FleetListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The Fleet items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal FleetListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal FleetListResult() + { + } + + /// The Fleet items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetPatch.Serialization.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetPatch.Serialization.cs new file mode 100644 index 000000000000..1d3092cc5d97 --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetPatch.Serialization.cs @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DatabaseFleetManager.Models +{ + public partial class FleetPatch : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FleetPatch)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + FleetPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FleetPatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFleetPatch(document.RootElement, options); + } + + internal static FleetPatch DeserializeFleetPatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary tags = default; + FleetProperties properties = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = FleetProperties.DeserializeFleetProperties(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FleetPatch(tags ?? new ChangeTrackingDictionary(), properties, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(FleetPatch)} does not support writing '{options.Format}' format."); + } + } + + FleetPatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeFleetPatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FleetPatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetPatch.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetPatch.cs new file mode 100644 index 000000000000..5d094a941c76 --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetPatch.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DatabaseFleetManager.Models +{ + /// An update to a Database Fleet. + public partial class FleetPatch + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public FleetPatch() + { + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// Resource tags. + /// The Database Fleet properties. + /// Keeps track of any properties unknown to the library. + internal FleetPatch(IDictionary tags, FleetProperties properties, IDictionary serializedAdditionalRawData) + { + Tags = tags; + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Resource tags. + public IDictionary Tags { get; } + /// The Database Fleet properties. + public FleetProperties Properties { get; set; } + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetProperties.Serialization.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetProperties.Serialization.cs new file mode 100644 index 000000000000..fe75ff9be114 --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetProperties.Serialization.cs @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DatabaseFleetManager.Models +{ + public partial class FleetProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FleetProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + FleetProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FleetProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFleetProperties(document.RootElement, options); + } + + internal static FleetProperties DeserializeFleetProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string description = default; + AzureProvisioningState? provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new AzureProvisioningState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FleetProperties(description, provisioningState, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(FleetProperties)} does not support writing '{options.Format}' format."); + } + } + + FleetProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeFleetProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FleetProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetProperties.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetProperties.cs new file mode 100644 index 000000000000..36f22956d71d --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetProperties.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DatabaseFleetManager.Models +{ + /// The Database Fleet properties. + public partial class FleetProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public FleetProperties() + { + } + + /// Initializes a new instance of . + /// Fleet description. + /// Provisioning state. + /// Keeps track of any properties unknown to the library. + internal FleetProperties(string description, AzureProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) + { + Description = description; + ProvisioningState = provisioningState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Fleet description. + public string Description { get; set; } + /// Provisioning state. + public AzureProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetTierListResult.Serialization.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetTierListResult.Serialization.cs new file mode 100644 index 000000000000..d5f81ad9a9a5 --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetTierListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DatabaseFleetManager.Models +{ + internal partial class FleetTierListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FleetTierListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + FleetTierListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FleetTierListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFleetTierListResult(document.RootElement, options); + } + + internal static FleetTierListResult DeserializeFleetTierListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(FleetTierData.DeserializeFleetTierData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FleetTierListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(FleetTierListResult)} does not support writing '{options.Format}' format."); + } + } + + FleetTierListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeFleetTierListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FleetTierListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetTierListResult.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetTierListResult.cs new file mode 100644 index 000000000000..b5e5af8cb162 --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetTierListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.DatabaseFleetManager.Models +{ + /// The response of a FleetTier list operation. + internal partial class FleetTierListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The FleetTier items on this page. + /// is null. + internal FleetTierListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The FleetTier items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal FleetTierListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal FleetTierListResult() + { + } + + /// The FleetTier items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetTierProperties.Serialization.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetTierProperties.Serialization.cs new file mode 100644 index 000000000000..ed01f9dd45c4 --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetTierProperties.Serialization.cs @@ -0,0 +1,319 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DatabaseFleetManager.Models +{ + public partial class FleetTierProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FleetTierProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(Disabled)) + { + writer.WritePropertyName("disabled"u8); + writer.WriteBooleanValue(Disabled.Value); + } + if (Optional.IsDefined(Serverless)) + { + writer.WritePropertyName("serverless"u8); + writer.WriteBooleanValue(Serverless.Value); + } + if (Optional.IsDefined(Pooled)) + { + writer.WritePropertyName("pooled"u8); + writer.WriteBooleanValue(Pooled.Value); + } + if (Optional.IsDefined(ServiceTier)) + { + writer.WritePropertyName("serviceTier"u8); + writer.WriteStringValue(ServiceTier); + } + if (Optional.IsDefined(Family)) + { + writer.WritePropertyName("family"u8); + writer.WriteStringValue(Family); + } + if (Optional.IsDefined(Capacity)) + { + writer.WritePropertyName("capacity"u8); + writer.WriteNumberValue(Capacity.Value); + } + if (Optional.IsDefined(PoolNumOfDatabasesMax)) + { + writer.WritePropertyName("poolNumOfDatabasesMax"u8); + writer.WriteNumberValue(PoolNumOfDatabasesMax.Value); + } + if (Optional.IsDefined(HighAvailabilityReplicaCount)) + { + writer.WritePropertyName("highAvailabilityReplicaCount"u8); + writer.WriteNumberValue(HighAvailabilityReplicaCount.Value); + } + if (Optional.IsDefined(ZoneRedundancy)) + { + writer.WritePropertyName("zoneRedundancy"u8); + writer.WriteStringValue(ZoneRedundancy.Value.ToString()); + } + if (Optional.IsDefined(DatabaseCapacityMin)) + { + writer.WritePropertyName("databaseCapacityMin"u8); + writer.WriteNumberValue(DatabaseCapacityMin.Value); + } + if (Optional.IsDefined(DatabaseCapacityMax)) + { + writer.WritePropertyName("databaseCapacityMax"u8); + writer.WriteNumberValue(DatabaseCapacityMax.Value); + } + if (Optional.IsDefined(DatabaseSizeGbMax)) + { + writer.WritePropertyName("databaseSizeGbMax"u8); + writer.WriteNumberValue(DatabaseSizeGbMax.Value); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + FleetTierProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FleetTierProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFleetTierProperties(document.RootElement, options); + } + + internal static FleetTierProperties DeserializeFleetTierProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool? disabled = default; + bool? serverless = default; + bool? pooled = default; + string serviceTier = default; + string family = default; + int? capacity = default; + int? poolNumOfDatabasesMax = default; + int? highAvailabilityReplicaCount = default; + ZoneRedundancy? zoneRedundancy = default; + double? databaseCapacityMin = default; + double? databaseCapacityMax = default; + int? databaseSizeGbMax = default; + AzureProvisioningState? provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("disabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + disabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("serverless"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + serverless = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("pooled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + pooled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("serviceTier"u8)) + { + serviceTier = property.Value.GetString(); + continue; + } + if (property.NameEquals("family"u8)) + { + family = property.Value.GetString(); + continue; + } + if (property.NameEquals("capacity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + capacity = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("poolNumOfDatabasesMax"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + poolNumOfDatabasesMax = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("highAvailabilityReplicaCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + highAvailabilityReplicaCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("zoneRedundancy"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + zoneRedundancy = new ZoneRedundancy(property.Value.GetString()); + continue; + } + if (property.NameEquals("databaseCapacityMin"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + databaseCapacityMin = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("databaseCapacityMax"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + databaseCapacityMax = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("databaseSizeGbMax"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + databaseSizeGbMax = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new AzureProvisioningState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FleetTierProperties( + disabled, + serverless, + pooled, + serviceTier, + family, + capacity, + poolNumOfDatabasesMax, + highAvailabilityReplicaCount, + zoneRedundancy, + databaseCapacityMin, + databaseCapacityMax, + databaseSizeGbMax, + provisioningState, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(FleetTierProperties)} does not support writing '{options.Format}' format."); + } + } + + FleetTierProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeFleetTierProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FleetTierProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetTierProperties.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetTierProperties.cs new file mode 100644 index 000000000000..35cb55d23201 --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetTierProperties.cs @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DatabaseFleetManager.Models +{ + /// A Fleet tier properties. + public partial class FleetTierProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public FleetTierProperties() + { + } + + /// Initializes a new instance of . + /// If true, tier is disabled. + /// If true, serverless resources are provisioned in the tier. + /// If true, databases are pooled. + /// Service tier of provisioned resources. Supported values: GeneralPurpose, Hyperscale. + /// Family of provisioned resources, for example Gen5. + /// Capacity of provisioned resources in the tier, in units matching the specified service tier, for example vCore for GeneralPurpose. + /// Maximum number of databases per pool. + /// Number of high availability replicas for databases in this tier. + /// Enable zone redundancy for all databases in this tier. + /// Minimum allocated capacity per database, in units matching the specified service tier. + /// Maximum allocated capacity per database, in units matching the specified service tier. + /// Maximum database size in Gb. + /// Provisioning state. + /// Keeps track of any properties unknown to the library. + internal FleetTierProperties(bool? disabled, bool? serverless, bool? pooled, string serviceTier, string family, int? capacity, int? poolNumOfDatabasesMax, int? highAvailabilityReplicaCount, ZoneRedundancy? zoneRedundancy, double? databaseCapacityMin, double? databaseCapacityMax, int? databaseSizeGbMax, AzureProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) + { + Disabled = disabled; + Serverless = serverless; + Pooled = pooled; + ServiceTier = serviceTier; + Family = family; + Capacity = capacity; + PoolNumOfDatabasesMax = poolNumOfDatabasesMax; + HighAvailabilityReplicaCount = highAvailabilityReplicaCount; + ZoneRedundancy = zoneRedundancy; + DatabaseCapacityMin = databaseCapacityMin; + DatabaseCapacityMax = databaseCapacityMax; + DatabaseSizeGbMax = databaseSizeGbMax; + ProvisioningState = provisioningState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// If true, tier is disabled. + public bool? Disabled { get; } + /// If true, serverless resources are provisioned in the tier. + public bool? Serverless { get; set; } + /// If true, databases are pooled. + public bool? Pooled { get; set; } + /// Service tier of provisioned resources. Supported values: GeneralPurpose, Hyperscale. + public string ServiceTier { get; set; } + /// Family of provisioned resources, for example Gen5. + public string Family { get; set; } + /// Capacity of provisioned resources in the tier, in units matching the specified service tier, for example vCore for GeneralPurpose. + public int? Capacity { get; set; } + /// Maximum number of databases per pool. + public int? PoolNumOfDatabasesMax { get; set; } + /// Number of high availability replicas for databases in this tier. + public int? HighAvailabilityReplicaCount { get; set; } + /// Enable zone redundancy for all databases in this tier. + public ZoneRedundancy? ZoneRedundancy { get; set; } + /// Minimum allocated capacity per database, in units matching the specified service tier. + public double? DatabaseCapacityMin { get; set; } + /// Maximum allocated capacity per database, in units matching the specified service tier. + public double? DatabaseCapacityMax { get; set; } + /// Maximum database size in Gb. + public int? DatabaseSizeGbMax { get; set; } + /// Provisioning state. + public AzureProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetspaceListResult.Serialization.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetspaceListResult.Serialization.cs new file mode 100644 index 000000000000..5119e07ccddf --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetspaceListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DatabaseFleetManager.Models +{ + internal partial class FleetspaceListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FleetspaceListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + FleetspaceListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FleetspaceListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFleetspaceListResult(document.RootElement, options); + } + + internal static FleetspaceListResult DeserializeFleetspaceListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(FleetspaceData.DeserializeFleetspaceData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FleetspaceListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(FleetspaceListResult)} does not support writing '{options.Format}' format."); + } + } + + FleetspaceListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeFleetspaceListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FleetspaceListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetspaceListResult.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetspaceListResult.cs new file mode 100644 index 000000000000..3f4024c0a31f --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetspaceListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.DatabaseFleetManager.Models +{ + /// The response of a Fleetspace list operation. + internal partial class FleetspaceListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The Fleetspace items on this page. + /// is null. + internal FleetspaceListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The Fleetspace items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal FleetspaceListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal FleetspaceListResult() + { + } + + /// The Fleetspace items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetspaceProperties.Serialization.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetspaceProperties.Serialization.cs new file mode 100644 index 000000000000..a433a4024b6c --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetspaceProperties.Serialization.cs @@ -0,0 +1,163 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DatabaseFleetManager.Models +{ + public partial class FleetspaceProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FleetspaceProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (Optional.IsDefined(CapacityMax)) + { + writer.WritePropertyName("capacityMax"u8); + writer.WriteNumberValue(CapacityMax.Value); + } + if (Optional.IsDefined(MainPrincipal)) + { + writer.WritePropertyName("mainPrincipal"u8); + writer.WriteObjectValue(MainPrincipal, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + FleetspaceProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FleetspaceProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFleetspaceProperties(document.RootElement, options); + } + + internal static FleetspaceProperties DeserializeFleetspaceProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AzureProvisioningState? provisioningState = default; + int? capacityMax = default; + MainPrincipal mainPrincipal = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new AzureProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("capacityMax"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + capacityMax = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("mainPrincipal"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + mainPrincipal = MainPrincipal.DeserializeMainPrincipal(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FleetspaceProperties(provisioningState, capacityMax, mainPrincipal, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(FleetspaceProperties)} does not support writing '{options.Format}' format."); + } + } + + FleetspaceProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeFleetspaceProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FleetspaceProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetspaceProperties.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetspaceProperties.cs new file mode 100644 index 000000000000..e9289aa3cdc4 --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/FleetspaceProperties.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DatabaseFleetManager.Models +{ + /// A Fleetspace properties. + public partial class FleetspaceProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public FleetspaceProperties() + { + } + + /// Initializes a new instance of . + /// Fleetspace state. + /// Maximum number of vCores database fleet manager is allowed to provision in the fleetspace. + /// Main Microsoft Entra ID principal that has admin access to all databases in the fleetspace. + /// Keeps track of any properties unknown to the library. + internal FleetspaceProperties(AzureProvisioningState? provisioningState, int? capacityMax, MainPrincipal mainPrincipal, IDictionary serializedAdditionalRawData) + { + ProvisioningState = provisioningState; + CapacityMax = capacityMax; + MainPrincipal = mainPrincipal; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Fleetspace state. + public AzureProvisioningState? ProvisioningState { get; } + /// Maximum number of vCores database fleet manager is allowed to provision in the fleetspace. + public int? CapacityMax { get; set; } + /// Main Microsoft Entra ID principal that has admin access to all databases in the fleetspace. + public MainPrincipal MainPrincipal { get; set; } + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/IdentityProperties.Serialization.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/IdentityProperties.Serialization.cs new file mode 100644 index 000000000000..488b4b2cfc27 --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/IdentityProperties.Serialization.cs @@ -0,0 +1,173 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DatabaseFleetManager.Models +{ + public partial class IdentityProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(IdentityProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(IdentityType)) + { + writer.WritePropertyName("identityType"u8); + writer.WriteStringValue(IdentityType.Value.ToString()); + } + if (Optional.IsCollectionDefined(UserAssignedIdentities)) + { + writer.WritePropertyName("userAssignedIdentities"u8); + writer.WriteStartArray(); + foreach (var item in UserAssignedIdentities) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(FederatedClientId)) + { + writer.WritePropertyName("federatedClientId"u8); + writer.WriteStringValue(FederatedClientId.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + IdentityProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(IdentityProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeIdentityProperties(document.RootElement, options); + } + + internal static IdentityProperties DeserializeIdentityProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IdentityType? identityType = default; + IList userAssignedIdentities = default; + Guid? federatedClientId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("identityType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + identityType = new IdentityType(property.Value.GetString()); + continue; + } + if (property.NameEquals("userAssignedIdentities"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DatabaseIdentity.DeserializeDatabaseIdentity(item, options)); + } + userAssignedIdentities = array; + continue; + } + if (property.NameEquals("federatedClientId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + federatedClientId = property.Value.GetGuid(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new IdentityProperties(identityType, userAssignedIdentities ?? new ChangeTrackingList(), federatedClientId, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(IdentityProperties)} does not support writing '{options.Format}' format."); + } + } + + IdentityProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeIdentityProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(IdentityProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/IdentityProperties.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/IdentityProperties.cs new file mode 100644 index 000000000000..c8aa59723fd3 --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/IdentityProperties.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DatabaseFleetManager.Models +{ + /// Database Identity. + public partial class IdentityProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public IdentityProperties() + { + UserAssignedIdentities = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Identity type of the main principal. + /// User identity ids. + /// The federated client id for the SQL Database. It is used for cross tenant CMK scenario. + /// Keeps track of any properties unknown to the library. + internal IdentityProperties(IdentityType? identityType, IList userAssignedIdentities, Guid? federatedClientId, IDictionary serializedAdditionalRawData) + { + IdentityType = identityType; + UserAssignedIdentities = userAssignedIdentities; + FederatedClientId = federatedClientId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Identity type of the main principal. + public IdentityType? IdentityType { get; set; } + /// User identity ids. + public IList UserAssignedIdentities { get; } + /// The federated client id for the SQL Database. It is used for cross tenant CMK scenario. + public Guid? FederatedClientId { get; set; } + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/IdentityType.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/IdentityType.cs new file mode 100644 index 000000000000..4c18df457266 --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/IdentityType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.DatabaseFleetManager.Models +{ + /// Identity type of the main principal. + public readonly partial struct IdentityType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public IdentityType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoneValue = "None"; + private const string UserAssignedValue = "UserAssigned"; + + /// No identity. + public static IdentityType None { get; } = new IdentityType(NoneValue); + /// User assigned identity. + public static IdentityType UserAssigned { get; } = new IdentityType(UserAssignedValue); + /// Determines if two values are the same. + public static bool operator ==(IdentityType left, IdentityType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(IdentityType left, IdentityType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator IdentityType(string value) => new IdentityType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is IdentityType other && Equals(other); + /// + public bool Equals(IdentityType 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/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/MainPrincipal.Serialization.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/MainPrincipal.Serialization.cs new file mode 100644 index 000000000000..68c67e32b2d7 --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/MainPrincipal.Serialization.cs @@ -0,0 +1,195 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DatabaseFleetManager.Models +{ + public partial class MainPrincipal : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(MainPrincipal)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Login)) + { + writer.WritePropertyName("login"u8); + writer.WriteStringValue(Login); + } + if (Optional.IsDefined(ApplicationId)) + { + writer.WritePropertyName("applicationId"u8); + writer.WriteStringValue(ApplicationId.Value); + } + if (Optional.IsDefined(ObjectId)) + { + writer.WritePropertyName("objectId"u8); + writer.WriteStringValue(ObjectId.Value); + } + if (Optional.IsDefined(TenantId)) + { + writer.WritePropertyName("tenantId"u8); + writer.WriteStringValue(TenantId.Value); + } + if (Optional.IsDefined(PrincipalType)) + { + writer.WritePropertyName("principalType"u8); + writer.WriteStringValue(PrincipalType.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + MainPrincipal IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(MainPrincipal)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeMainPrincipal(document.RootElement, options); + } + + internal static MainPrincipal DeserializeMainPrincipal(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string login = default; + Guid? applicationId = default; + Guid? objectId = default; + Guid? tenantId = default; + PrincipalType? principalType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("login"u8)) + { + login = property.Value.GetString(); + continue; + } + if (property.NameEquals("applicationId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + applicationId = property.Value.GetGuid(); + continue; + } + if (property.NameEquals("objectId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + objectId = property.Value.GetGuid(); + continue; + } + if (property.NameEquals("tenantId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tenantId = property.Value.GetGuid(); + continue; + } + if (property.NameEquals("principalType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + principalType = new PrincipalType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new MainPrincipal( + login, + applicationId, + objectId, + tenantId, + principalType, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(MainPrincipal)} does not support writing '{options.Format}' format."); + } + } + + MainPrincipal IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeMainPrincipal(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(MainPrincipal)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/MainPrincipal.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/MainPrincipal.cs new file mode 100644 index 000000000000..eb5d3839f132 --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/MainPrincipal.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DatabaseFleetManager.Models +{ + /// A main principal. + public partial class MainPrincipal + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public MainPrincipal() + { + } + + /// Initializes a new instance of . + /// Login name of the main principal. + /// Application Id of the main principal. + /// Object Id of the main principal. + /// Tenant Id of the main principal. + /// Principal type of the main principal. + /// Keeps track of any properties unknown to the library. + internal MainPrincipal(string login, Guid? applicationId, Guid? objectId, Guid? tenantId, PrincipalType? principalType, IDictionary serializedAdditionalRawData) + { + Login = login; + ApplicationId = applicationId; + ObjectId = objectId; + TenantId = tenantId; + PrincipalType = principalType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Login name of the main principal. + public string Login { get; set; } + /// Application Id of the main principal. + public Guid? ApplicationId { get; set; } + /// Object Id of the main principal. + public Guid? ObjectId { get; set; } + /// Tenant Id of the main principal. + public Guid? TenantId { get; set; } + /// Principal type of the main principal. + public PrincipalType? PrincipalType { get; set; } + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/PrincipalType.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/PrincipalType.cs new file mode 100644 index 000000000000..a8fe0c148ff2 --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/PrincipalType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.DatabaseFleetManager.Models +{ + /// Principal type of the authorized principal. + public readonly partial struct PrincipalType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public PrincipalType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ApplicationValue = "Application"; + private const string UserValue = "User"; + + /// Application principal type. + public static PrincipalType Application { get; } = new PrincipalType(ApplicationValue); + /// User principal type. + public static PrincipalType User { get; } = new PrincipalType(UserValue); + /// Determines if two values are the same. + public static bool operator ==(PrincipalType left, PrincipalType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(PrincipalType left, PrincipalType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator PrincipalType(string value) => new PrincipalType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is PrincipalType other && Equals(other); + /// + public bool Equals(PrincipalType 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/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/RegisterServerProperties.Serialization.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/RegisterServerProperties.Serialization.cs new file mode 100644 index 000000000000..1fba8d19e604 --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/RegisterServerProperties.Serialization.cs @@ -0,0 +1,193 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DatabaseFleetManager.Models +{ + public partial class RegisterServerProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RegisterServerProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(TierName)) + { + writer.WritePropertyName("tierName"u8); + writer.WriteStringValue(TierName); + } + if (Optional.IsDefined(SourceSubscriptionId)) + { + writer.WritePropertyName("sourceSubscriptionId"u8); + writer.WriteStringValue(SourceSubscriptionId); + } + if (Optional.IsDefined(SourceResourceGroupName)) + { + writer.WritePropertyName("sourceResourceGroupName"u8); + writer.WriteStringValue(SourceResourceGroupName); + } + if (Optional.IsDefined(SourceServerName)) + { + writer.WritePropertyName("sourceServerName"u8); + writer.WriteStringValue(SourceServerName); + } + if (Optional.IsCollectionDefined(DestinationTierOverrides)) + { + writer.WritePropertyName("destinationTierOverrides"u8); + writer.WriteStartArray(); + foreach (var item in DestinationTierOverrides) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + RegisterServerProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RegisterServerProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeRegisterServerProperties(document.RootElement, options); + } + + internal static RegisterServerProperties DeserializeRegisterServerProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string tierName = default; + string sourceSubscriptionId = default; + string sourceResourceGroupName = default; + string sourceServerName = default; + IList destinationTierOverrides = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("tierName"u8)) + { + tierName = property.Value.GetString(); + continue; + } + if (property.NameEquals("sourceSubscriptionId"u8)) + { + sourceSubscriptionId = property.Value.GetString(); + continue; + } + if (property.NameEquals("sourceResourceGroupName"u8)) + { + sourceResourceGroupName = property.Value.GetString(); + continue; + } + if (property.NameEquals("sourceServerName"u8)) + { + sourceServerName = property.Value.GetString(); + continue; + } + if (property.NameEquals("destinationTierOverrides"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DestinationTierOverride.DeserializeDestinationTierOverride(item, options)); + } + destinationTierOverrides = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new RegisterServerProperties( + tierName, + sourceSubscriptionId, + sourceResourceGroupName, + sourceServerName, + destinationTierOverrides ?? new ChangeTrackingList(), + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(RegisterServerProperties)} does not support writing '{options.Format}' format."); + } + } + + RegisterServerProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeRegisterServerProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(RegisterServerProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/RegisterServerProperties.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/RegisterServerProperties.cs new file mode 100644 index 000000000000..83270ed1034b --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/RegisterServerProperties.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DatabaseFleetManager.Models +{ + /// Server registration definition. + public partial class RegisterServerProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public RegisterServerProperties() + { + DestinationTierOverrides = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Destination tier name. + /// Source subscription id. + /// Source resource group name. + /// Source SQL Server name. + /// Destination tier overrides. + /// Keeps track of any properties unknown to the library. + internal RegisterServerProperties(string tierName, string sourceSubscriptionId, string sourceResourceGroupName, string sourceServerName, IList destinationTierOverrides, IDictionary serializedAdditionalRawData) + { + TierName = tierName; + SourceSubscriptionId = sourceSubscriptionId; + SourceResourceGroupName = sourceResourceGroupName; + SourceServerName = sourceServerName; + DestinationTierOverrides = destinationTierOverrides; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Destination tier name. + public string TierName { get; set; } + /// Source subscription id. + public string SourceSubscriptionId { get; set; } + /// Source resource group name. + public string SourceResourceGroupName { get; set; } + /// Source SQL Server name. + public string SourceServerName { get; set; } + /// Destination tier overrides. + public IList DestinationTierOverrides { get; } + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/ResourceType.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/ResourceType.cs new file mode 100644 index 000000000000..47ce2d88086f --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/ResourceType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.DatabaseFleetManager.Models +{ + /// Resource type of the destination tier override. + public readonly partial struct ResourceType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ResourceType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DatabaseValue = "Database"; + private const string PoolValue = "Pool"; + + /// Database resource type. + public static ResourceType Database { get; } = new ResourceType(DatabaseValue); + /// Elastic pool resource type. + public static ResourceType Pool { get; } = new ResourceType(PoolValue); + /// Determines if two values are the same. + public static bool operator ==(ResourceType left, ResourceType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ResourceType left, ResourceType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ResourceType(string value) => new ResourceType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ResourceType other && Equals(other); + /// + public bool Equals(ResourceType 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/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/TransparentDataEncryption.Serialization.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/TransparentDataEncryption.Serialization.cs new file mode 100644 index 000000000000..4410e7d3a802 --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/TransparentDataEncryption.Serialization.cs @@ -0,0 +1,173 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DatabaseFleetManager.Models +{ + public partial class TransparentDataEncryption : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TransparentDataEncryption)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(KeyUri)) + { + writer.WritePropertyName("keyUri"u8); + writer.WriteStringValue(KeyUri.AbsoluteUri); + } + if (Optional.IsCollectionDefined(Keys)) + { + writer.WritePropertyName("keys"u8); + writer.WriteStartArray(); + foreach (var item in Keys) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(EnableAutoRotation)) + { + writer.WritePropertyName("enableAutoRotation"u8); + writer.WriteBooleanValue(EnableAutoRotation.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + TransparentDataEncryption IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TransparentDataEncryption)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeTransparentDataEncryption(document.RootElement, options); + } + + internal static TransparentDataEncryption DeserializeTransparentDataEncryption(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Uri keyUri = default; + IList keys = default; + bool? enableAutoRotation = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("keyUri"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + keyUri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("keys"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + keys = array; + continue; + } + if (property.NameEquals("enableAutoRotation"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enableAutoRotation = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new TransparentDataEncryption(keyUri, keys ?? new ChangeTrackingList(), enableAutoRotation, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(TransparentDataEncryption)} does not support writing '{options.Format}' format."); + } + } + + TransparentDataEncryption IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeTransparentDataEncryption(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(TransparentDataEncryption)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/TransparentDataEncryption.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/TransparentDataEncryption.cs new file mode 100644 index 000000000000..8cf2e72658ff --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/TransparentDataEncryption.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DatabaseFleetManager.Models +{ + /// Transparent Data Encryption properties. + public partial class TransparentDataEncryption + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public TransparentDataEncryption() + { + Keys = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Customer Managed Key (CMK) Uri. + /// Additional Keys. + /// Enable key auto rotation. + /// Keeps track of any properties unknown to the library. + internal TransparentDataEncryption(Uri keyUri, IList keys, bool? enableAutoRotation, IDictionary serializedAdditionalRawData) + { + KeyUri = keyUri; + Keys = keys; + EnableAutoRotation = enableAutoRotation; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Customer Managed Key (CMK) Uri. + public Uri KeyUri { get; set; } + /// Additional Keys. + public IList Keys { get; } + /// Enable key auto rotation. + public bool? EnableAutoRotation { get; set; } + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/ZoneRedundancy.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/ZoneRedundancy.cs new file mode 100644 index 000000000000..5aaa4d259d0d --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/Models/ZoneRedundancy.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.DatabaseFleetManager.Models +{ + /// Status of zone redundancy in a tier. + public readonly partial struct ZoneRedundancy : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ZoneRedundancy(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnabledValue = "Enabled"; + private const string DisabledValue = "Disabled"; + + /// Zone redundancy enabled. + public static ZoneRedundancy Enabled { get; } = new ZoneRedundancy(EnabledValue); + /// Zone redundancy disabled. + public static ZoneRedundancy Disabled { get; } = new ZoneRedundancy(DisabledValue); + /// Determines if two values are the same. + public static bool operator ==(ZoneRedundancy left, ZoneRedundancy right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ZoneRedundancy left, ZoneRedundancy right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ZoneRedundancy(string value) => new ZoneRedundancy(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ZoneRedundancy other && Equals(other); + /// + public bool Equals(ZoneRedundancy 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/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/ProviderConstants.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/ProviderConstants.cs new file mode 100644 index 000000000000..978185b579aa --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/ProviderConstants.cs @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.DatabaseFleetManager +{ + internal static class ProviderConstants + { + public static string DefaultProviderNamespace { get; } = ClientDiagnostics.GetResourceProviderNamespace(typeof(ProviderConstants).Assembly); + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/RestOperations/FirewallRulesRestOperations.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/RestOperations/FirewallRulesRestOperations.cs new file mode 100644 index 000000000000..0f628e615d31 --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/RestOperations/FirewallRulesRestOperations.cs @@ -0,0 +1,585 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.DatabaseFleetManager.Models; + +namespace Azure.ResourceManager.DatabaseFleetManager +{ + internal partial class FirewallRulesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of FirewallRulesRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public FirewallRulesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-02-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, string firewallRuleName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DatabaseFleetManager/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendPath("/fleetspaces/", false); + uri.AppendPath(fleetspaceName, true); + uri.AppendPath("/firewallRules/", false); + uri.AppendPath(firewallRuleName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, string firewallRuleName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DatabaseFleetManager/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendPath("/fleetspaces/", false); + uri.AppendPath(fleetspaceName, true); + uri.AppendPath("/firewallRules/", false); + uri.AppendPath(firewallRuleName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets a firewall rule. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the database fleet. + /// Name of the fleetspace. + /// Name of the firewall rule. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, string firewallRuleName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNullOrEmpty(fleetspaceName, nameof(fleetspaceName)); + Argument.AssertNotNullOrEmpty(firewallRuleName, nameof(firewallRuleName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, fleetName, fleetspaceName, firewallRuleName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + FirewallRuleData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = FirewallRuleData.DeserializeFirewallRuleData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((FirewallRuleData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets a firewall rule. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the database fleet. + /// Name of the fleetspace. + /// Name of the firewall rule. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, string firewallRuleName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNullOrEmpty(fleetspaceName, nameof(fleetspaceName)); + Argument.AssertNotNullOrEmpty(firewallRuleName, nameof(firewallRuleName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, fleetName, fleetspaceName, firewallRuleName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + FirewallRuleData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = FirewallRuleData.DeserializeFirewallRuleData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((FirewallRuleData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, string firewallRuleName, FirewallRuleData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DatabaseFleetManager/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendPath("/fleetspaces/", false); + uri.AppendPath(fleetspaceName, true); + uri.AppendPath("/firewallRules/", false); + uri.AppendPath(firewallRuleName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, string firewallRuleName, FirewallRuleData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DatabaseFleetManager/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendPath("/fleetspaces/", false); + uri.AppendPath(fleetspaceName, true); + uri.AppendPath("/firewallRules/", false); + uri.AppendPath(firewallRuleName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates or updates a firewall rule. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the database fleet. + /// Name of the fleetspace. + /// Name of the firewall rule. + /// The firewall rule object to create or update. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, string firewallRuleName, FirewallRuleData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNullOrEmpty(fleetspaceName, nameof(fleetspaceName)); + Argument.AssertNotNullOrEmpty(firewallRuleName, nameof(firewallRuleName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, fleetName, fleetspaceName, firewallRuleName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates or updates a firewall rule. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the database fleet. + /// Name of the fleetspace. + /// Name of the firewall rule. + /// The firewall rule object to create or update. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, string firewallRuleName, FirewallRuleData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNullOrEmpty(fleetspaceName, nameof(fleetspaceName)); + Argument.AssertNotNullOrEmpty(firewallRuleName, nameof(firewallRuleName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, fleetName, fleetspaceName, firewallRuleName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, string firewallRuleName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DatabaseFleetManager/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendPath("/fleetspaces/", false); + uri.AppendPath(fleetspaceName, true); + uri.AppendPath("/firewallRules/", false); + uri.AppendPath(firewallRuleName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, string firewallRuleName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DatabaseFleetManager/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendPath("/fleetspaces/", false); + uri.AppendPath(fleetspaceName, true); + uri.AppendPath("/firewallRules/", false); + uri.AppendPath(firewallRuleName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes a firewall rule. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the database fleet. + /// Name of the fleetspace. + /// Name of the firewall rule. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, string firewallRuleName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNullOrEmpty(fleetspaceName, nameof(fleetspaceName)); + Argument.AssertNotNullOrEmpty(firewallRuleName, nameof(firewallRuleName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, fleetName, fleetspaceName, firewallRuleName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Deletes a firewall rule. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the database fleet. + /// Name of the fleetspace. + /// Name of the firewall rule. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, string firewallRuleName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNullOrEmpty(fleetspaceName, nameof(fleetspaceName)); + Argument.AssertNotNullOrEmpty(firewallRuleName, nameof(firewallRuleName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, fleetName, fleetspaceName, firewallRuleName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByFleetspaceRequestUri(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, long? skip, long? top, string skiptoken) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DatabaseFleetManager/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendPath("/fleetspaces/", false); + uri.AppendPath(fleetspaceName, true); + uri.AppendPath("/firewallRules", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (skip != null) + { + uri.AppendQuery("$skip", skip.Value, true); + } + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + if (skiptoken != null) + { + uri.AppendQuery("$skiptoken", skiptoken, true); + } + return uri; + } + + internal HttpMessage CreateListByFleetspaceRequest(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, long? skip, long? top, string skiptoken) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DatabaseFleetManager/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendPath("/fleetspaces/", false); + uri.AppendPath(fleetspaceName, true); + uri.AppendPath("/firewallRules", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (skip != null) + { + uri.AppendQuery("$skip", skip.Value, true); + } + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + if (skiptoken != null) + { + uri.AppendQuery("$skiptoken", skiptoken, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets all firewall rules in a fleetspace. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the database fleet. + /// Name of the fleetspace. + /// The number of elements in the collection to skip. + /// The number of elements to return from the collection. + /// An opaque token that identifies a starting point in the collection. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListByFleetspaceAsync(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, long? skip = null, long? top = null, string skiptoken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNullOrEmpty(fleetspaceName, nameof(fleetspaceName)); + + using var message = CreateListByFleetspaceRequest(subscriptionId, resourceGroupName, fleetName, fleetspaceName, skip, top, skiptoken); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + FirewallRuleListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = FirewallRuleListResult.DeserializeFirewallRuleListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets all firewall rules in a fleetspace. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the database fleet. + /// Name of the fleetspace. + /// The number of elements in the collection to skip. + /// The number of elements to return from the collection. + /// An opaque token that identifies a starting point in the collection. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListByFleetspace(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, long? skip = null, long? top = null, string skiptoken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNullOrEmpty(fleetspaceName, nameof(fleetspaceName)); + + using var message = CreateListByFleetspaceRequest(subscriptionId, resourceGroupName, fleetName, fleetspaceName, skip, top, skiptoken); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + FirewallRuleListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = FirewallRuleListResult.DeserializeFirewallRuleListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByFleetspaceNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, long? skip, long? top, string skiptoken) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByFleetspaceNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, long? skip, long? top, string skiptoken) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets all firewall rules in a fleetspace. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the database fleet. + /// Name of the fleetspace. + /// The number of elements in the collection to skip. + /// The number of elements to return from the collection. + /// An opaque token that identifies a starting point in the collection. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListByFleetspaceNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, long? skip = null, long? top = null, string skiptoken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNullOrEmpty(fleetspaceName, nameof(fleetspaceName)); + + using var message = CreateListByFleetspaceNextPageRequest(nextLink, subscriptionId, resourceGroupName, fleetName, fleetspaceName, skip, top, skiptoken); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + FirewallRuleListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = FirewallRuleListResult.DeserializeFirewallRuleListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets all firewall rules in a fleetspace. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the database fleet. + /// Name of the fleetspace. + /// The number of elements in the collection to skip. + /// The number of elements to return from the collection. + /// An opaque token that identifies a starting point in the collection. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListByFleetspaceNextPage(string nextLink, string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, long? skip = null, long? top = null, string skiptoken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNullOrEmpty(fleetspaceName, nameof(fleetspaceName)); + + using var message = CreateListByFleetspaceNextPageRequest(nextLink, subscriptionId, resourceGroupName, fleetName, fleetspaceName, skip, top, skiptoken); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + FirewallRuleListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = FirewallRuleListResult.DeserializeFirewallRuleListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/RestOperations/FleetDatabasesRestOperations.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/RestOperations/FleetDatabasesRestOperations.cs new file mode 100644 index 000000000000..826cdc4cd6d5 --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/RestOperations/FleetDatabasesRestOperations.cs @@ -0,0 +1,1021 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.DatabaseFleetManager.Models; + +namespace Azure.ResourceManager.DatabaseFleetManager +{ + internal partial class FleetDatabasesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of FleetDatabasesRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public FleetDatabasesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-02-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, string databaseName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DatabaseFleetManager/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendPath("/fleetspaces/", false); + uri.AppendPath(fleetspaceName, true); + uri.AppendPath("/databases/", false); + uri.AppendPath(databaseName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, string databaseName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DatabaseFleetManager/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendPath("/fleetspaces/", false); + uri.AppendPath(fleetspaceName, true); + uri.AppendPath("/databases/", false); + uri.AppendPath(databaseName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets a fleet database. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the database fleet. + /// Name of the fleetspace. + /// Name of the database. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, string databaseName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNullOrEmpty(fleetspaceName, nameof(fleetspaceName)); + Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, fleetName, fleetspaceName, databaseName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + FleetDatabaseData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = FleetDatabaseData.DeserializeFleetDatabaseData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((FleetDatabaseData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets a fleet database. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the database fleet. + /// Name of the fleetspace. + /// Name of the database. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, string databaseName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNullOrEmpty(fleetspaceName, nameof(fleetspaceName)); + Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, fleetName, fleetspaceName, databaseName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + FleetDatabaseData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = FleetDatabaseData.DeserializeFleetDatabaseData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((FleetDatabaseData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, string databaseName, FleetDatabaseData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DatabaseFleetManager/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendPath("/fleetspaces/", false); + uri.AppendPath(fleetspaceName, true); + uri.AppendPath("/databases/", false); + uri.AppendPath(databaseName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, string databaseName, FleetDatabaseData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DatabaseFleetManager/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendPath("/fleetspaces/", false); + uri.AppendPath(fleetspaceName, true); + uri.AppendPath("/databases/", false); + uri.AppendPath(databaseName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates or updates a fleet database. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the database fleet. + /// Name of the fleetspace. + /// Name of the database. + /// The database object to create or update. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, string databaseName, FleetDatabaseData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNullOrEmpty(fleetspaceName, nameof(fleetspaceName)); + Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, fleetName, fleetspaceName, databaseName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates or updates a fleet database. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the database fleet. + /// Name of the fleetspace. + /// Name of the database. + /// The database object to create or update. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, string databaseName, FleetDatabaseData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNullOrEmpty(fleetspaceName, nameof(fleetspaceName)); + Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, fleetName, fleetspaceName, databaseName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, string databaseName, FleetDatabaseData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DatabaseFleetManager/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendPath("/fleetspaces/", false); + uri.AppendPath(fleetspaceName, true); + uri.AppendPath("/databases/", false); + uri.AppendPath(databaseName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, string databaseName, FleetDatabaseData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DatabaseFleetManager/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendPath("/fleetspaces/", false); + uri.AppendPath(fleetspaceName, true); + uri.AppendPath("/databases/", false); + uri.AppendPath(databaseName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Updates a fleet database. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the database fleet. + /// Name of the fleetspace. + /// Name of the database. + /// The database object to patch. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, string databaseName, FleetDatabaseData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNullOrEmpty(fleetspaceName, nameof(fleetspaceName)); + Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, fleetName, fleetspaceName, databaseName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Updates a fleet database. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the database fleet. + /// Name of the fleetspace. + /// Name of the database. + /// The database object to patch. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, string databaseName, FleetDatabaseData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNullOrEmpty(fleetspaceName, nameof(fleetspaceName)); + Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, fleetName, fleetspaceName, databaseName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, string databaseName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DatabaseFleetManager/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendPath("/fleetspaces/", false); + uri.AppendPath(fleetspaceName, true); + uri.AppendPath("/databases/", false); + uri.AppendPath(databaseName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, string databaseName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DatabaseFleetManager/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendPath("/fleetspaces/", false); + uri.AppendPath(fleetspaceName, true); + uri.AppendPath("/databases/", false); + uri.AppendPath(databaseName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes a fleet database. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the database fleet. + /// Name of the fleetspace. + /// Name of the database. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, string databaseName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNullOrEmpty(fleetspaceName, nameof(fleetspaceName)); + Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, fleetName, fleetspaceName, databaseName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Deletes a fleet database. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the database fleet. + /// Name of the fleetspace. + /// Name of the database. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, string databaseName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNullOrEmpty(fleetspaceName, nameof(fleetspaceName)); + Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, fleetName, fleetspaceName, databaseName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByFleetspaceRequestUri(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, long? skip, long? top, string filter, string skiptoken) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DatabaseFleetManager/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendPath("/fleetspaces/", false); + uri.AppendPath(fleetspaceName, true); + uri.AppendPath("/databases", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (skip != null) + { + uri.AppendQuery("$skip", skip.Value, true); + } + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + if (skiptoken != null) + { + uri.AppendQuery("$skiptoken", skiptoken, true); + } + return uri; + } + + internal HttpMessage CreateListByFleetspaceRequest(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, long? skip, long? top, string filter, string skiptoken) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DatabaseFleetManager/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendPath("/fleetspaces/", false); + uri.AppendPath(fleetspaceName, true); + uri.AppendPath("/databases", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (skip != null) + { + uri.AppendQuery("$skip", skip.Value, true); + } + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + if (filter != null) + { + uri.AppendQuery("$filter", filter, true); + } + if (skiptoken != null) + { + uri.AppendQuery("$skiptoken", skiptoken, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets all fleet databases in a fleetspace. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the database fleet. + /// Name of the fleetspace. + /// The number of elements in the collection to skip. + /// The number of elements to return from the collection. + /// An OData filter expression that filters elements in the collection. + /// An opaque token that identifies a starting point in the collection. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListByFleetspaceAsync(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, long? skip = null, long? top = null, string filter = null, string skiptoken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNullOrEmpty(fleetspaceName, nameof(fleetspaceName)); + + using var message = CreateListByFleetspaceRequest(subscriptionId, resourceGroupName, fleetName, fleetspaceName, skip, top, filter, skiptoken); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + FleetDatabaseListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = FleetDatabaseListResult.DeserializeFleetDatabaseListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets all fleet databases in a fleetspace. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the database fleet. + /// Name of the fleetspace. + /// The number of elements in the collection to skip. + /// The number of elements to return from the collection. + /// An OData filter expression that filters elements in the collection. + /// An opaque token that identifies a starting point in the collection. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListByFleetspace(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, long? skip = null, long? top = null, string filter = null, string skiptoken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNullOrEmpty(fleetspaceName, nameof(fleetspaceName)); + + using var message = CreateListByFleetspaceRequest(subscriptionId, resourceGroupName, fleetName, fleetspaceName, skip, top, filter, skiptoken); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + FleetDatabaseListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = FleetDatabaseListResult.DeserializeFleetDatabaseListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateChangeTierRequestUri(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, string databaseName, DatabaseChangeTierProperties body) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DatabaseFleetManager/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendPath("/fleetspaces/", false); + uri.AppendPath(fleetspaceName, true); + uri.AppendPath("/databases/", false); + uri.AppendPath(databaseName, true); + uri.AppendPath("/changeTier", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateChangeTierRequest(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, string databaseName, DatabaseChangeTierProperties body) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DatabaseFleetManager/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendPath("/fleetspaces/", false); + uri.AppendPath(fleetspaceName, true); + uri.AppendPath("/databases/", false); + uri.AppendPath(databaseName, true); + uri.AppendPath("/changeTier", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(body, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Moves database to a different tier. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the database fleet. + /// Name of the fleetspace. + /// Name of the database. + /// The details of the change tier operation. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task ChangeTierAsync(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, string databaseName, DatabaseChangeTierProperties body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNullOrEmpty(fleetspaceName, nameof(fleetspaceName)); + Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); + Argument.AssertNotNull(body, nameof(body)); + + using var message = CreateChangeTierRequest(subscriptionId, resourceGroupName, fleetName, fleetspaceName, databaseName, body); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Moves database to a different tier. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the database fleet. + /// Name of the fleetspace. + /// Name of the database. + /// The details of the change tier operation. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response ChangeTier(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, string databaseName, DatabaseChangeTierProperties body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNullOrEmpty(fleetspaceName, nameof(fleetspaceName)); + Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); + Argument.AssertNotNull(body, nameof(body)); + + using var message = CreateChangeTierRequest(subscriptionId, resourceGroupName, fleetName, fleetspaceName, databaseName, body); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateRenameRequestUri(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, string databaseName, DatabaseRenameProperties body) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DatabaseFleetManager/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendPath("/fleetspaces/", false); + uri.AppendPath(fleetspaceName, true); + uri.AppendPath("/databases/", false); + uri.AppendPath(databaseName, true); + uri.AppendPath("/rename", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateRenameRequest(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, string databaseName, DatabaseRenameProperties body) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DatabaseFleetManager/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendPath("/fleetspaces/", false); + uri.AppendPath(fleetspaceName, true); + uri.AppendPath("/databases/", false); + uri.AppendPath(databaseName, true); + uri.AppendPath("/rename", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(body, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Renames a database. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the database fleet. + /// Name of the fleetspace. + /// Name of the database. + /// The details of the rename operation. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task RenameAsync(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, string databaseName, DatabaseRenameProperties body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNullOrEmpty(fleetspaceName, nameof(fleetspaceName)); + Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); + Argument.AssertNotNull(body, nameof(body)); + + using var message = CreateRenameRequest(subscriptionId, resourceGroupName, fleetName, fleetspaceName, databaseName, body); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Renames a database. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the database fleet. + /// Name of the fleetspace. + /// Name of the database. + /// The details of the rename operation. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Rename(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, string databaseName, DatabaseRenameProperties body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNullOrEmpty(fleetspaceName, nameof(fleetspaceName)); + Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); + Argument.AssertNotNull(body, nameof(body)); + + using var message = CreateRenameRequest(subscriptionId, resourceGroupName, fleetName, fleetspaceName, databaseName, body); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateRevertRequestUri(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, string databaseName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DatabaseFleetManager/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendPath("/fleetspaces/", false); + uri.AppendPath(fleetspaceName, true); + uri.AppendPath("/databases/", false); + uri.AppendPath(databaseName, true); + uri.AppendPath("/revert", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateRevertRequest(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, string databaseName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DatabaseFleetManager/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendPath("/fleetspaces/", false); + uri.AppendPath(fleetspaceName, true); + uri.AppendPath("/databases/", false); + uri.AppendPath(databaseName, true); + uri.AppendPath("/revert", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Revert a database transparent data encryption (TDE). + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the database fleet. + /// Name of the fleetspace. + /// Name of the database. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task RevertAsync(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, string databaseName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNullOrEmpty(fleetspaceName, nameof(fleetspaceName)); + Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); + + using var message = CreateRevertRequest(subscriptionId, resourceGroupName, fleetName, fleetspaceName, databaseName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Revert a database transparent data encryption (TDE). + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the database fleet. + /// Name of the fleetspace. + /// Name of the database. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Revert(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, string databaseName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNullOrEmpty(fleetspaceName, nameof(fleetspaceName)); + Argument.AssertNotNullOrEmpty(databaseName, nameof(databaseName)); + + using var message = CreateRevertRequest(subscriptionId, resourceGroupName, fleetName, fleetspaceName, databaseName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByFleetspaceNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, long? skip, long? top, string filter, string skiptoken) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByFleetspaceNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, long? skip, long? top, string filter, string skiptoken) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets all fleet databases in a fleetspace. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the database fleet. + /// Name of the fleetspace. + /// The number of elements in the collection to skip. + /// The number of elements to return from the collection. + /// An OData filter expression that filters elements in the collection. + /// An opaque token that identifies a starting point in the collection. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListByFleetspaceNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, long? skip = null, long? top = null, string filter = null, string skiptoken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNullOrEmpty(fleetspaceName, nameof(fleetspaceName)); + + using var message = CreateListByFleetspaceNextPageRequest(nextLink, subscriptionId, resourceGroupName, fleetName, fleetspaceName, skip, top, filter, skiptoken); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + FleetDatabaseListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = FleetDatabaseListResult.DeserializeFleetDatabaseListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets all fleet databases in a fleetspace. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the database fleet. + /// Name of the fleetspace. + /// The number of elements in the collection to skip. + /// The number of elements to return from the collection. + /// An OData filter expression that filters elements in the collection. + /// An opaque token that identifies a starting point in the collection. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListByFleetspaceNextPage(string nextLink, string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, long? skip = null, long? top = null, string filter = null, string skiptoken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNullOrEmpty(fleetspaceName, nameof(fleetspaceName)); + + using var message = CreateListByFleetspaceNextPageRequest(nextLink, subscriptionId, resourceGroupName, fleetName, fleetspaceName, skip, top, filter, skiptoken); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + FleetDatabaseListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = FleetDatabaseListResult.DeserializeFleetDatabaseListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/RestOperations/FleetTiersRestOperations.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/RestOperations/FleetTiersRestOperations.cs new file mode 100644 index 000000000000..03a7e139c584 --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/RestOperations/FleetTiersRestOperations.cs @@ -0,0 +1,751 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.DatabaseFleetManager.Models; + +namespace Azure.ResourceManager.DatabaseFleetManager +{ + internal partial class FleetTiersRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of FleetTiersRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public FleetTiersRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-02-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string fleetName, string tierName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DatabaseFleetManager/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendPath("/tiers/", false); + uri.AppendPath(tierName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string fleetName, string tierName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DatabaseFleetManager/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendPath("/tiers/", false); + uri.AppendPath(tierName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets a tier resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the database fleet. + /// Name of the tier. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string fleetName, string tierName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNullOrEmpty(tierName, nameof(tierName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, fleetName, tierName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + FleetTierData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = FleetTierData.DeserializeFleetTierData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((FleetTierData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets a tier resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the database fleet. + /// Name of the tier. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string fleetName, string tierName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNullOrEmpty(tierName, nameof(tierName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, fleetName, tierName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + FleetTierData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = FleetTierData.DeserializeFleetTierData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((FleetTierData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string fleetName, string tierName, FleetTierData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DatabaseFleetManager/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendPath("/tiers/", false); + uri.AppendPath(tierName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string fleetName, string tierName, FleetTierData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DatabaseFleetManager/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendPath("/tiers/", false); + uri.AppendPath(tierName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates or updates a tier. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the database fleet. + /// Name of the tier. + /// The tier object to create or update. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string fleetName, string tierName, FleetTierData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNullOrEmpty(tierName, nameof(tierName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, fleetName, tierName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates or updates a tier. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the database fleet. + /// Name of the tier. + /// The tier object to create or update. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string fleetName, string tierName, FleetTierData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNullOrEmpty(tierName, nameof(tierName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, fleetName, tierName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string fleetName, string tierName, FleetTierData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DatabaseFleetManager/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendPath("/tiers/", false); + uri.AppendPath(tierName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string fleetName, string tierName, FleetTierData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DatabaseFleetManager/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendPath("/tiers/", false); + uri.AppendPath(tierName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Updates a tier. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the database fleet. + /// Name of the tier. + /// The resource properties to be updated. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string fleetName, string tierName, FleetTierData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNullOrEmpty(tierName, nameof(tierName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, fleetName, tierName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Updates a tier. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the database fleet. + /// Name of the tier. + /// The resource properties to be updated. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string fleetName, string tierName, FleetTierData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNullOrEmpty(tierName, nameof(tierName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, fleetName, tierName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string fleetName, string tierName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DatabaseFleetManager/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendPath("/tiers/", false); + uri.AppendPath(tierName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string fleetName, string tierName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DatabaseFleetManager/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendPath("/tiers/", false); + uri.AppendPath(tierName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes a tier. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the database fleet. + /// Name of the tier. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string fleetName, string tierName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNullOrEmpty(tierName, nameof(tierName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, fleetName, tierName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Deletes a tier. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the database fleet. + /// Name of the tier. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string fleetName, string tierName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNullOrEmpty(tierName, nameof(tierName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, fleetName, tierName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByFleetRequestUri(string subscriptionId, string resourceGroupName, string fleetName, long? skip, long? top, string skiptoken) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DatabaseFleetManager/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendPath("/tiers", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (skip != null) + { + uri.AppendQuery("$skip", skip.Value, true); + } + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + if (skiptoken != null) + { + uri.AppendQuery("$skiptoken", skiptoken, true); + } + return uri; + } + + internal HttpMessage CreateListByFleetRequest(string subscriptionId, string resourceGroupName, string fleetName, long? skip, long? top, string skiptoken) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DatabaseFleetManager/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendPath("/tiers", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (skip != null) + { + uri.AppendQuery("$skip", skip.Value, true); + } + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + if (skiptoken != null) + { + uri.AppendQuery("$skiptoken", skiptoken, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List tiers in a fleet. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the database fleet. + /// The number of elements in the collection to skip. + /// The number of elements to return from the collection. + /// An opaque token that identifies a starting point in the collection. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByFleetAsync(string subscriptionId, string resourceGroupName, string fleetName, long? skip = null, long? top = null, string skiptoken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + + using var message = CreateListByFleetRequest(subscriptionId, resourceGroupName, fleetName, skip, top, skiptoken); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + FleetTierListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = FleetTierListResult.DeserializeFleetTierListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List tiers in a fleet. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the database fleet. + /// The number of elements in the collection to skip. + /// The number of elements to return from the collection. + /// An opaque token that identifies a starting point in the collection. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByFleet(string subscriptionId, string resourceGroupName, string fleetName, long? skip = null, long? top = null, string skiptoken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + + using var message = CreateListByFleetRequest(subscriptionId, resourceGroupName, fleetName, skip, top, skiptoken); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + FleetTierListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = FleetTierListResult.DeserializeFleetTierListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDisableRequestUri(string subscriptionId, string resourceGroupName, string fleetName, string tierName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DatabaseFleetManager/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendPath("/tiers/", false); + uri.AppendPath(tierName, true); + uri.AppendPath("/disable", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDisableRequest(string subscriptionId, string resourceGroupName, string fleetName, string tierName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DatabaseFleetManager/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendPath("/tiers/", false); + uri.AppendPath(tierName, true); + uri.AppendPath("/disable", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Disables a tier. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the database fleet. + /// Name of the tier. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> DisableAsync(string subscriptionId, string resourceGroupName, string fleetName, string tierName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNullOrEmpty(tierName, nameof(tierName)); + + using var message = CreateDisableRequest(subscriptionId, resourceGroupName, fleetName, tierName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + FleetTierData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = FleetTierData.DeserializeFleetTierData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Disables a tier. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the database fleet. + /// Name of the tier. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Disable(string subscriptionId, string resourceGroupName, string fleetName, string tierName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNullOrEmpty(tierName, nameof(tierName)); + + using var message = CreateDisableRequest(subscriptionId, resourceGroupName, fleetName, tierName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + FleetTierData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = FleetTierData.DeserializeFleetTierData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByFleetNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string fleetName, long? skip, long? top, string skiptoken) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByFleetNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string fleetName, long? skip, long? top, string skiptoken) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List tiers in a fleet. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the database fleet. + /// The number of elements in the collection to skip. + /// The number of elements to return from the collection. + /// An opaque token that identifies a starting point in the collection. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByFleetNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string fleetName, long? skip = null, long? top = null, string skiptoken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + + using var message = CreateListByFleetNextPageRequest(nextLink, subscriptionId, resourceGroupName, fleetName, skip, top, skiptoken); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + FleetTierListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = FleetTierListResult.DeserializeFleetTierListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List tiers in a fleet. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the database fleet. + /// The number of elements in the collection to skip. + /// The number of elements to return from the collection. + /// An opaque token that identifies a starting point in the collection. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByFleetNextPage(string nextLink, string subscriptionId, string resourceGroupName, string fleetName, long? skip = null, long? top = null, string skiptoken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + + using var message = CreateListByFleetNextPageRequest(nextLink, subscriptionId, resourceGroupName, fleetName, skip, top, skiptoken); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + FleetTierListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = FleetTierListResult.DeserializeFleetTierListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/RestOperations/FleetsRestOperations.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/RestOperations/FleetsRestOperations.cs new file mode 100644 index 000000000000..0a6aa9468696 --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/RestOperations/FleetsRestOperations.cs @@ -0,0 +1,759 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.DatabaseFleetManager.Models; + +namespace Azure.ResourceManager.DatabaseFleetManager +{ + internal partial class FleetsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of FleetsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public FleetsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-02-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string fleetName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DatabaseFleetManager/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string fleetName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DatabaseFleetManager/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets a fleet resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the database fleet. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string fleetName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, fleetName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + FleetData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = FleetData.DeserializeFleetData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((FleetData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets a fleet resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the database fleet. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string fleetName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, fleetName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + FleetData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = FleetData.DeserializeFleetData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((FleetData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string fleetName, FleetData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DatabaseFleetManager/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string fleetName, FleetData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DatabaseFleetManager/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates or updates a fleet resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the database fleet. + /// The fleet object to create or update. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string fleetName, FleetData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, fleetName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates or updates a fleet resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the database fleet. + /// The fleet object to create or update. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string fleetName, FleetData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, fleetName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string fleetName, FleetPatch patch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DatabaseFleetManager/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string fleetName, FleetPatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DatabaseFleetManager/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Modifies a fleet resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the database fleet. + /// The fleet object to patch. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string fleetName, FleetPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, fleetName, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Modifies a fleet resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the database fleet. + /// The fleet object to patch. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string fleetName, FleetPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, fleetName, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string fleetName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DatabaseFleetManager/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string fleetName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DatabaseFleetManager/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes a fleet. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the database fleet. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string fleetName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, fleetName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Deletes a fleet. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the database fleet. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string fleetName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, fleetName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByResourceGroupRequestUri(string subscriptionId, string resourceGroupName, long? skip, long? top, string skiptoken) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DatabaseFleetManager/fleets", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (skip != null) + { + uri.AppendQuery("$skip", skip.Value, true); + } + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + if (skiptoken != null) + { + uri.AppendQuery("$skiptoken", skiptoken, true); + } + return uri; + } + + internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, string resourceGroupName, long? skip, long? top, string skiptoken) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DatabaseFleetManager/fleets", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (skip != null) + { + uri.AppendQuery("$skip", skip.Value, true); + } + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + if (skiptoken != null) + { + uri.AppendQuery("$skiptoken", skiptoken, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets all fleets in a resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The number of elements in the collection to skip. + /// The number of elements to return from the collection. + /// An opaque token that identifies a starting point in the collection. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupAsync(string subscriptionId, string resourceGroupName, long? skip = null, long? top = null, string skiptoken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName, skip, top, skiptoken); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + FleetListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = FleetListResult.DeserializeFleetListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets all fleets in a resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The number of elements in the collection to skip. + /// The number of elements to return from the collection. + /// An opaque token that identifies a starting point in the collection. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroup(string subscriptionId, string resourceGroupName, long? skip = null, long? top = null, string skiptoken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName, skip, top, skiptoken); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + FleetListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = FleetListResult.DeserializeFleetListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.DatabaseFleetManager/fleets", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.DatabaseFleetManager/fleets", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets all fleets in a subscription. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListRequest(subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + FleetListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = FleetListResult.DeserializeFleetListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets all fleets in a subscription. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListRequest(subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + FleetListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = FleetListResult.DeserializeFleetListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByResourceGroupNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, long? skip, long? top, string skiptoken) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, long? skip, long? top, string skiptoken) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets all fleets in a resource group. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The number of elements in the collection to skip. + /// The number of elements to return from the collection. + /// An opaque token that identifies a starting point in the collection. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, long? skip = null, long? top = null, string skiptoken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName, skip, top, skiptoken); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + FleetListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = FleetListResult.DeserializeFleetListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets all fleets in a resource group. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The number of elements in the collection to skip. + /// The number of elements to return from the collection. + /// An opaque token that identifies a starting point in the collection. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroupNextPage(string nextLink, string subscriptionId, string resourceGroupName, long? skip = null, long? top = null, string skiptoken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName, skip, top, skiptoken); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + FleetListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = FleetListResult.DeserializeFleetListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets all fleets in a subscription. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + FleetListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = FleetListResult.DeserializeFleetListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets all fleets in a subscription. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + FleetListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = FleetListResult.DeserializeFleetListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/RestOperations/FleetspacesRestOperations.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/RestOperations/FleetspacesRestOperations.cs new file mode 100644 index 000000000000..b090d734346c --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Generated/RestOperations/FleetspacesRestOperations.cs @@ -0,0 +1,841 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.DatabaseFleetManager.Models; + +namespace Azure.ResourceManager.DatabaseFleetManager +{ + internal partial class FleetspacesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of FleetspacesRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public FleetspacesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-02-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DatabaseFleetManager/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendPath("/fleetspaces/", false); + uri.AppendPath(fleetspaceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DatabaseFleetManager/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendPath("/fleetspaces/", false); + uri.AppendPath(fleetspaceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets fleetspace resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the database fleet. + /// Name of the fleetspace. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNullOrEmpty(fleetspaceName, nameof(fleetspaceName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, fleetName, fleetspaceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + FleetspaceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = FleetspaceData.DeserializeFleetspaceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((FleetspaceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets fleetspace resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the database fleet. + /// Name of the fleetspace. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNullOrEmpty(fleetspaceName, nameof(fleetspaceName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, fleetName, fleetspaceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + FleetspaceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = FleetspaceData.DeserializeFleetspaceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((FleetspaceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, FleetspaceData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DatabaseFleetManager/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendPath("/fleetspaces/", false); + uri.AppendPath(fleetspaceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, FleetspaceData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DatabaseFleetManager/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendPath("/fleetspaces/", false); + uri.AppendPath(fleetspaceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates or updates a fleetspace resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the database fleet. + /// Name of the fleetspace. + /// The fleet object to create or update. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, FleetspaceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNullOrEmpty(fleetspaceName, nameof(fleetspaceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, fleetName, fleetspaceName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates or updates a fleetspace resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the database fleet. + /// Name of the fleetspace. + /// The fleet object to create or update. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, FleetspaceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNullOrEmpty(fleetspaceName, nameof(fleetspaceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, fleetName, fleetspaceName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, FleetspaceData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DatabaseFleetManager/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendPath("/fleetspaces/", false); + uri.AppendPath(fleetspaceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, FleetspaceData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DatabaseFleetManager/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendPath("/fleetspaces/", false); + uri.AppendPath(fleetspaceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Modifies a fleetspace resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the database fleet. + /// Name of the fleetspace. + /// The resource properties to be updated. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, FleetspaceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNullOrEmpty(fleetspaceName, nameof(fleetspaceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, fleetName, fleetspaceName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Modifies a fleetspace resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the database fleet. + /// Name of the fleetspace. + /// The resource properties to be updated. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, FleetspaceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNullOrEmpty(fleetspaceName, nameof(fleetspaceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, fleetName, fleetspaceName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DatabaseFleetManager/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendPath("/fleetspaces/", false); + uri.AppendPath(fleetspaceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DatabaseFleetManager/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendPath("/fleetspaces/", false); + uri.AppendPath(fleetspaceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes a fleetspace. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the database fleet. + /// Name of the fleetspace. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNullOrEmpty(fleetspaceName, nameof(fleetspaceName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, fleetName, fleetspaceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Deletes a fleetspace. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the database fleet. + /// Name of the fleetspace. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNullOrEmpty(fleetspaceName, nameof(fleetspaceName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, fleetName, fleetspaceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByFleetRequestUri(string subscriptionId, string resourceGroupName, string fleetName, long? skip, long? top, string skiptoken) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DatabaseFleetManager/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendPath("/fleetspaces", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (skip != null) + { + uri.AppendQuery("$skip", skip.Value, true); + } + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + if (skiptoken != null) + { + uri.AppendQuery("$skiptoken", skiptoken, true); + } + return uri; + } + + internal HttpMessage CreateListByFleetRequest(string subscriptionId, string resourceGroupName, string fleetName, long? skip, long? top, string skiptoken) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DatabaseFleetManager/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendPath("/fleetspaces", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (skip != null) + { + uri.AppendQuery("$skip", skip.Value, true); + } + if (top != null) + { + uri.AppendQuery("$top", top.Value, true); + } + if (skiptoken != null) + { + uri.AppendQuery("$skiptoken", skiptoken, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists fleetspaces in a fleet. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the database fleet. + /// The number of elements in the collection to skip. + /// The number of elements to return from the collection. + /// An opaque token that identifies a starting point in the collection. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByFleetAsync(string subscriptionId, string resourceGroupName, string fleetName, long? skip = null, long? top = null, string skiptoken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + + using var message = CreateListByFleetRequest(subscriptionId, resourceGroupName, fleetName, skip, top, skiptoken); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + FleetspaceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = FleetspaceListResult.DeserializeFleetspaceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists fleetspaces in a fleet. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the database fleet. + /// The number of elements in the collection to skip. + /// The number of elements to return from the collection. + /// An opaque token that identifies a starting point in the collection. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByFleet(string subscriptionId, string resourceGroupName, string fleetName, long? skip = null, long? top = null, string skiptoken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + + using var message = CreateListByFleetRequest(subscriptionId, resourceGroupName, fleetName, skip, top, skiptoken); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + FleetspaceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = FleetspaceListResult.DeserializeFleetspaceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateRegisterServerRequestUri(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, RegisterServerProperties body) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DatabaseFleetManager/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendPath("/fleetspaces/", false); + uri.AppendPath(fleetspaceName, true); + uri.AppendPath("/registerServer", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateRegisterServerRequest(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, RegisterServerProperties body) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DatabaseFleetManager/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendPath("/fleetspaces/", false); + uri.AppendPath(fleetspaceName, true); + uri.AppendPath("/registerServer", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(body, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Migrates an existing logical server into fleet. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the database fleet. + /// Name of the fleetspace. + /// The details of the register server operation. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task RegisterServerAsync(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, RegisterServerProperties body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNullOrEmpty(fleetspaceName, nameof(fleetspaceName)); + Argument.AssertNotNull(body, nameof(body)); + + using var message = CreateRegisterServerRequest(subscriptionId, resourceGroupName, fleetName, fleetspaceName, body); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Migrates an existing logical server into fleet. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the database fleet. + /// Name of the fleetspace. + /// The details of the register server operation. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response RegisterServer(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, RegisterServerProperties body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNullOrEmpty(fleetspaceName, nameof(fleetspaceName)); + Argument.AssertNotNull(body, nameof(body)); + + using var message = CreateRegisterServerRequest(subscriptionId, resourceGroupName, fleetName, fleetspaceName, body); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUnregisterRequestUri(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DatabaseFleetManager/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendPath("/fleetspaces/", false); + uri.AppendPath(fleetspaceName, true); + uri.AppendPath("/unregister", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUnregisterRequest(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DatabaseFleetManager/fleets/", false); + uri.AppendPath(fleetName, true); + uri.AppendPath("/fleetspaces/", false); + uri.AppendPath(fleetspaceName, true); + uri.AppendPath("/unregister", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Unregisters all databases from a fleetspace. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the database fleet. + /// Name of the fleetspace. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task UnregisterAsync(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNullOrEmpty(fleetspaceName, nameof(fleetspaceName)); + + using var message = CreateUnregisterRequest(subscriptionId, resourceGroupName, fleetName, fleetspaceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Unregisters all databases from a fleetspace. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the database fleet. + /// Name of the fleetspace. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Unregister(string subscriptionId, string resourceGroupName, string fleetName, string fleetspaceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + Argument.AssertNotNullOrEmpty(fleetspaceName, nameof(fleetspaceName)); + + using var message = CreateUnregisterRequest(subscriptionId, resourceGroupName, fleetName, fleetspaceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByFleetNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string fleetName, long? skip, long? top, string skiptoken) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByFleetNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string fleetName, long? skip, long? top, string skiptoken) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists fleetspaces in a fleet. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the database fleet. + /// The number of elements in the collection to skip. + /// The number of elements to return from the collection. + /// An opaque token that identifies a starting point in the collection. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByFleetNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string fleetName, long? skip = null, long? top = null, string skiptoken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + + using var message = CreateListByFleetNextPageRequest(nextLink, subscriptionId, resourceGroupName, fleetName, skip, top, skiptoken); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + FleetspaceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = FleetspaceListResult.DeserializeFleetspaceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists fleetspaces in a fleet. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the database fleet. + /// The number of elements in the collection to skip. + /// The number of elements to return from the collection. + /// An opaque token that identifies a starting point in the collection. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByFleetNextPage(string nextLink, string subscriptionId, string resourceGroupName, string fleetName, long? skip = null, long? top = null, string skiptoken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fleetName, nameof(fleetName)); + + using var message = CreateListByFleetNextPageRequest(nextLink, subscriptionId, resourceGroupName, fleetName, skip, top, skiptoken); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + FleetspaceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = FleetspaceListResult.DeserializeFleetspaceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Properties/AssemblyInfo.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..5054b8d16600 --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/src/Properties/AssemblyInfo.cs @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo("Azure.ResourceManager.DatabaseFleetManager.Tests, PublicKey = 0024000004800000940000000602000000240000525341310004000001000100d15ddcb29688295338af4b7686603fe614abd555e09efba8fb88ee09e1f7b1ccaeed2e8f823fa9eef3fdd60217fc012ea67d2479751a0b8c087a4185541b851bd8b16f8d91b840e51b1cb0ba6fe647997e57429265e85ef62d565db50a69ae1647d54d7bd855e4db3d8a91510e5bcbd0edfbbecaa20a7bd9ae74593daa7b11b4")] + +// Replace Microsoft.Test with the correct resource provider namepace for your service and uncomment. +// See https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/azure-services-resource-providers +// for the list of possible values. +[assembly: Azure.Core.AzureResourceProviderNamespace("DatabaseFleetManager")] diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/tests/Azure.ResourceManager.DatabaseFleetManager.Tests.csproj b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/tests/Azure.ResourceManager.DatabaseFleetManager.Tests.csproj new file mode 100644 index 000000000000..0d3762ddbdc3 --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/tests/Azure.ResourceManager.DatabaseFleetManager.Tests.csproj @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/tests/DatabaseFleetManagerManagementTestBase.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/tests/DatabaseFleetManagerManagementTestBase.cs new file mode 100644 index 000000000000..7ffd79d94660 --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/tests/DatabaseFleetManagerManagementTestBase.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure; +using Azure.Core; +using Azure.Core.TestFramework; +using Azure.ResourceManager; +using Azure.ResourceManager.Resources; +using Azure.ResourceManager.TestFramework; +using NUnit.Framework; +using System.Threading.Tasks; + +namespace Azure.ResourceManager.DatabaseFleetManager.Tests +{ + public class DatabaseFleetManagerManagementTestBase : ManagementRecordedTestBase + { + protected ArmClient Client { get; private set; } + protected SubscriptionResource DefaultSubscription { get; private set; } + + protected DatabaseFleetManagerManagementTestBase(bool isAsync, RecordedTestMode mode) + : base(isAsync, mode) + { + } + + protected DatabaseFleetManagerManagementTestBase(bool isAsync) + : base(isAsync) + { + } + + [SetUp] + public async Task CreateCommonClient() + { + Client = GetArmClient(); + DefaultSubscription = await Client.GetDefaultSubscriptionAsync().ConfigureAwait(false); + } + + protected async Task CreateResourceGroup(SubscriptionResource subscription, string rgNamePrefix, AzureLocation location) + { + string rgName = Recording.GenerateAssetName(rgNamePrefix); + ResourceGroupData input = new ResourceGroupData(location); + var lro = await subscription.GetResourceGroups().CreateOrUpdateAsync(WaitUntil.Completed, rgName, input); + return lro.Value; + } + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/tests/DatabaseFleetManagerManagementTestEnvironment.cs b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/tests/DatabaseFleetManagerManagementTestEnvironment.cs new file mode 100644 index 000000000000..9582ae45e94a --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/tests/DatabaseFleetManagerManagementTestEnvironment.cs @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core.TestFramework; + +namespace Azure.ResourceManager.DatabaseFleetManager.Tests +{ + public class DatabaseFleetManagerManagementTestEnvironment : TestEnvironment + { + } +} diff --git a/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/tsp-location.yaml b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/tsp-location.yaml new file mode 100644 index 000000000000..b75840433d14 --- /dev/null +++ b/sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/databasefleetmanager/DatabaseFleetManager.Management +commit: 1a8dcbc31c561409f253e5f7a924ff577b583da7 +repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/databasefleetmanager/ci.mgmt.yml b/sdk/databasefleetmanager/ci.mgmt.yml new file mode 100644 index 000000000000..97b2f849f23c --- /dev/null +++ b/sdk/databasefleetmanager/ci.mgmt.yml @@ -0,0 +1,26 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. + +trigger: none + +pr: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/databasefleetmanager /ci.mgmt.yml + - sdk/databasefleetmanager /Azure.ResourceManager.DatabaseFleetManager / + + +extends: + template: /eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: databasefleetmanager + ArtifactName: packages + LimitForPullRequest: true + Artifacts: + - name: Azure.ResourceManager.DatabaseFleetManager + safeName: AzureResourceManagerDatabaseFleetManager diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/tsp-location.yaml b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/tsp-location.yaml index 2b3e253ddbf3..2354d98198e4 100644 --- a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/tsp-location.yaml +++ b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/tsp-location.yaml @@ -1,3 +1,4 @@ directory: specification/informatica/Informatica.DataManagement.Management -commit: 462574dbd02088c209bb1da3eef0d93f699e8de2 -repo: Azure/azure-rest-api-specs \ No newline at end of file +commit: 1a8dcbc31c561409f253e5f7a924ff577b583da7 +repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/Configuration.json b/sdk/iotoperations/Azure.ResourceManager.IotOperations/Configuration.json new file mode 100644 index 000000000000..c0e9288ec7c4 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/Configuration.json @@ -0,0 +1,12 @@ +{ + "output-folder": ".", + "namespace": "Azure.ResourceManager.IotOperations", + "library-name": "Azure.ResourceManager.IotOperations", + "flavor": "azure", + "use-model-reader-writer": true, + "shared-source-folders": [ + "../../TempTypeSpecFiles/node_modules/@autorest/csharp/Generator.Shared", + "../../TempTypeSpecFiles/node_modules/@autorest/csharp/Azure.Core.Shared" + ], + "azure-arm": true +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/tsp-location.yaml b/sdk/iotoperations/Azure.ResourceManager.IotOperations/tsp-location.yaml index 25a72265e2a6..5052a5c43d19 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/tsp-location.yaml +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/tsp-location.yaml @@ -1,3 +1,4 @@ directory: specification/iotoperations/IoTOperations.Management -commit: 81f881effe41b9bdad29bc449dbf8a99ca894f2d +commit: 1a8dcbc31c561409f253e5f7a924ff577b583da7 repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/tspCodeModel.json b/sdk/iotoperations/Azure.ResourceManager.IotOperations/tspCodeModel.json new file mode 100644 index 000000000000..46e2395c71c4 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/tspCodeModel.json @@ -0,0 +1,73642 @@ +{ + "$id": "1", + "name": "Microsoft.IoTOperations", + "apiVersions": [ + "2024-11-01", + "2025-04-01" + ], + "enums": [ + { + "$id": "2", + "kind": "enum", + "name": "Origin", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Origin", + "valueType": { + "$id": "3", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "4", + "kind": "enumvalue", + "name": "user", + "value": "user", + "valueType": { + "$id": "5", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "doc": "Indicates the operation is initiated by a user.", + "decorators": [] + }, + { + "$id": "6", + "kind": "enumvalue", + "name": "system", + "value": "system", + "valueType": { + "$id": "7", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "doc": "Indicates the operation is initiated by a system.", + "decorators": [] + }, + { + "$id": "8", + "kind": "enumvalue", + "name": "user,system", + "value": "user,system", + "valueType": { + "$id": "9", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "doc": "Indicates the operation is initiated by a user or system.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.IotOperations", + "doc": "The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\"", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "10", + "kind": "enum", + "name": "ActionType", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ActionType", + "valueType": { + "$id": "11", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "12", + "kind": "enumvalue", + "name": "Internal", + "value": "Internal", + "valueType": { + "$id": "13", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "10" + }, + "doc": "Actions are for internal-only APIs.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.IotOperations", + "doc": "Extensible enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "14", + "kind": "enum", + "name": "IotOperationsProvisioningState", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.ProvisioningState", + "valueType": { + "$id": "15", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "16", + "kind": "enumvalue", + "name": "Succeeded", + "value": "Succeeded", + "valueType": { + "$id": "17", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "14" + }, + "doc": "Resource has been created.", + "decorators": [] + }, + { + "$id": "18", + "kind": "enumvalue", + "name": "Failed", + "value": "Failed", + "valueType": { + "$id": "19", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "14" + }, + "doc": "Resource creation failed.", + "decorators": [] + }, + { + "$id": "20", + "kind": "enumvalue", + "name": "Canceled", + "value": "Canceled", + "valueType": { + "$id": "21", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "14" + }, + "doc": "Resource creation was canceled.", + "decorators": [] + }, + { + "$id": "22", + "kind": "enumvalue", + "name": "Provisioning", + "value": "Provisioning", + "valueType": { + "$id": "23", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "14" + }, + "doc": "Resource is getting provisioned.", + "decorators": [] + }, + { + "$id": "24", + "kind": "enumvalue", + "name": "Updating", + "value": "Updating", + "valueType": { + "$id": "25", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "14" + }, + "doc": "Resource is Updating.", + "decorators": [] + }, + { + "$id": "26", + "kind": "enumvalue", + "name": "Deleting", + "value": "Deleting", + "valueType": { + "$id": "27", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "14" + }, + "doc": "Resource is Deleting.", + "decorators": [] + }, + { + "$id": "28", + "kind": "enumvalue", + "name": "Accepted", + "value": "Accepted", + "valueType": { + "$id": "29", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "14" + }, + "doc": "Resource has been Accepted.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.IotOperations", + "doc": "The enum defining status of resource.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "30", + "kind": "enum", + "name": "InstanceFeatureMode", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.InstanceFeatureMode", + "valueType": { + "$id": "31", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "32", + "kind": "enumvalue", + "name": "Stable", + "value": "Stable", + "valueType": { + "$id": "33", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "30" + }, + "doc": "Opt in to enable a stable feature", + "decorators": [] + }, + { + "$id": "34", + "kind": "enumvalue", + "name": "Preview", + "value": "Preview", + "valueType": { + "$id": "35", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "30" + }, + "doc": "Opt in to enable a preview feature", + "decorators": [] + }, + { + "$id": "36", + "kind": "enumvalue", + "name": "Disabled", + "value": "Disabled", + "valueType": { + "$id": "37", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "30" + }, + "doc": "Opt out of a feature", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.IotOperations", + "doc": "The enum defining mode of a feature.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "38", + "kind": "enum", + "name": "IotOperationsOperationalMode", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.OperationalMode", + "valueType": { + "$id": "39", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "40", + "kind": "enumvalue", + "name": "Enabled", + "value": "Enabled", + "valueType": { + "$id": "41", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "38" + }, + "doc": "Enabled is equivalent to True", + "decorators": [] + }, + { + "$id": "42", + "kind": "enumvalue", + "name": "Disabled", + "value": "Disabled", + "valueType": { + "$id": "43", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "38" + }, + "doc": "Disabled is equivalent to False.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.IotOperations", + "doc": "Mode properties", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "44", + "kind": "enum", + "name": "IotOperationsExtendedLocationType", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.ExtendedLocationType", + "valueType": { + "$id": "45", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "46", + "kind": "enumvalue", + "name": "CustomLocation", + "value": "CustomLocation", + "valueType": { + "$id": "47", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "44" + }, + "doc": "CustomLocation type", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.IotOperations", + "doc": "The enum defining type of ExtendedLocation accepted.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "48", + "kind": "enum", + "name": "ManagedServiceIdentityType", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentityType", + "valueType": { + "$id": "49", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "50", + "kind": "enumvalue", + "name": "None", + "value": "None", + "valueType": { + "$id": "51", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "48" + }, + "doc": "No managed identity.", + "decorators": [] + }, + { + "$id": "52", + "kind": "enumvalue", + "name": "SystemAssigned", + "value": "SystemAssigned", + "valueType": { + "$id": "53", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "48" + }, + "doc": "System assigned managed identity.", + "decorators": [] + }, + { + "$id": "54", + "kind": "enumvalue", + "name": "UserAssigned", + "value": "UserAssigned", + "valueType": { + "$id": "55", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "48" + }, + "doc": "User assigned managed identity.", + "decorators": [] + }, + { + "$id": "56", + "kind": "enumvalue", + "name": "SystemAssigned,UserAssigned", + "value": "SystemAssigned,UserAssigned", + "valueType": { + "$id": "57", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "48" + }, + "doc": "System and user assigned managed identity.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.IotOperations", + "doc": "Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "58", + "kind": "enum", + "name": "createdByType", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.createdByType", + "valueType": { + "$id": "59", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "60", + "kind": "enumvalue", + "name": "User", + "value": "User", + "valueType": { + "$id": "61", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "58" + }, + "doc": "The entity was created by a user.", + "decorators": [] + }, + { + "$id": "62", + "kind": "enumvalue", + "name": "Application", + "value": "Application", + "valueType": { + "$id": "63", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "58" + }, + "doc": "The entity was created by an application.", + "decorators": [] + }, + { + "$id": "64", + "kind": "enumvalue", + "name": "ManagedIdentity", + "value": "ManagedIdentity", + "valueType": { + "$id": "65", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "58" + }, + "doc": "The entity was created by a managed identity.", + "decorators": [] + }, + { + "$id": "66", + "kind": "enumvalue", + "name": "Key", + "value": "Key", + "valueType": { + "$id": "67", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "58" + }, + "doc": "The entity was created by a key.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.IotOperations", + "doc": "The kind of entity that created the resource.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "68", + "kind": "enum", + "name": "ResourceProvisioningState", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceProvisioningState", + "valueType": { + "$id": "69", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "70", + "kind": "enumvalue", + "name": "Succeeded", + "value": "Succeeded", + "valueType": { + "$id": "71", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "68" + }, + "doc": "Resource has been created.", + "decorators": [] + }, + { + "$id": "72", + "kind": "enumvalue", + "name": "Failed", + "value": "Failed", + "valueType": { + "$id": "73", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "68" + }, + "doc": "Resource creation failed.", + "decorators": [] + }, + { + "$id": "74", + "kind": "enumvalue", + "name": "Canceled", + "value": "Canceled", + "valueType": { + "$id": "75", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "68" + }, + "doc": "Resource creation was canceled.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.IotOperations", + "doc": "The provisioning state of a resource type.", + "isFixed": false, + "isFlags": false, + "usage": "LroPolling", + "decorators": [] + }, + { + "$id": "76", + "kind": "enum", + "name": "SubscriberMessageDropStrategy", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.SubscriberMessageDropStrategy", + "valueType": { + "$id": "77", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "78", + "kind": "enumvalue", + "name": "None", + "value": "None", + "valueType": { + "$id": "79", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "76" + }, + "doc": "Messages are never dropped.", + "decorators": [] + }, + { + "$id": "80", + "kind": "enumvalue", + "name": "DropOldest", + "value": "DropOldest", + "valueType": { + "$id": "81", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "76" + }, + "doc": "The oldest message is dropped.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.IotOperations", + "doc": "The enum defining strategies for dropping messages from the subscriber queue.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "82", + "kind": "enum", + "name": "PrivateKeyAlgorithm", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.PrivateKeyAlgorithm", + "valueType": { + "$id": "83", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "84", + "kind": "enumvalue", + "name": "Ec256", + "value": "Ec256", + "valueType": { + "$id": "85", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "82" + }, + "doc": "Algorithm - ec256.", + "decorators": [] + }, + { + "$id": "86", + "kind": "enumvalue", + "name": "Ec384", + "value": "Ec384", + "valueType": { + "$id": "87", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "82" + }, + "doc": "Algorithm - ec384.", + "decorators": [] + }, + { + "$id": "88", + "kind": "enumvalue", + "name": "Ec521", + "value": "Ec521", + "valueType": { + "$id": "89", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "82" + }, + "doc": "Algorithm - ec521.", + "decorators": [] + }, + { + "$id": "90", + "kind": "enumvalue", + "name": "Ed25519", + "value": "Ed25519", + "valueType": { + "$id": "91", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "82" + }, + "doc": "Algorithm - ed25519.", + "decorators": [] + }, + { + "$id": "92", + "kind": "enumvalue", + "name": "Rsa2048", + "value": "Rsa2048", + "valueType": { + "$id": "93", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "82" + }, + "doc": "Algorithm - rsa2048.", + "decorators": [] + }, + { + "$id": "94", + "kind": "enumvalue", + "name": "Rsa4096", + "value": "Rsa4096", + "valueType": { + "$id": "95", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "82" + }, + "doc": "Algorithm - rsa4096.", + "decorators": [] + }, + { + "$id": "96", + "kind": "enumvalue", + "name": "Rsa8192", + "value": "Rsa8192", + "valueType": { + "$id": "97", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "82" + }, + "doc": "Algorithm - rsa8192.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.IotOperations", + "doc": "Private key algorithm types.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "98", + "kind": "enum", + "name": "PrivateKeyRotationPolicy", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.PrivateKeyRotationPolicy", + "valueType": { + "$id": "99", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "100", + "kind": "enumvalue", + "name": "Always", + "value": "Always", + "valueType": { + "$id": "101", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "98" + }, + "doc": "Rotation Policy - Always.", + "decorators": [] + }, + { + "$id": "102", + "kind": "enumvalue", + "name": "Never", + "value": "Never", + "valueType": { + "$id": "103", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "98" + }, + "doc": "Rotation Policy - Never.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.IotOperations", + "doc": "Private key rotation policy.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "104", + "kind": "enum", + "name": "BrokerOperatorValues", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.OperatorValues", + "valueType": { + "$id": "105", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "106", + "kind": "enumvalue", + "name": "In", + "value": "In", + "valueType": { + "$id": "107", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "104" + }, + "doc": "In operator.", + "decorators": [] + }, + { + "$id": "108", + "kind": "enumvalue", + "name": "NotIn", + "value": "NotIn", + "valueType": { + "$id": "109", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "104" + }, + "doc": "NotIn operator.", + "decorators": [] + }, + { + "$id": "110", + "kind": "enumvalue", + "name": "Exists", + "value": "Exists", + "valueType": { + "$id": "111", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "104" + }, + "doc": "Exists operator.", + "decorators": [] + }, + { + "$id": "112", + "kind": "enumvalue", + "name": "DoesNotExist", + "value": "DoesNotExist", + "valueType": { + "$id": "113", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "104" + }, + "doc": "DoesNotExist operator.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.IotOperations", + "doc": "Valid operators are In, NotIn, Exists and DoesNotExist.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "114", + "kind": "enum", + "name": "BrokerMemoryProfile", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerMemoryProfile", + "valueType": { + "$id": "115", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "116", + "kind": "enumvalue", + "name": "Tiny", + "value": "Tiny", + "valueType": { + "$id": "117", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "114" + }, + "doc": "Tiny memory profile.", + "decorators": [] + }, + { + "$id": "118", + "kind": "enumvalue", + "name": "Low", + "value": "Low", + "valueType": { + "$id": "119", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "114" + }, + "doc": "Low memory profile.", + "decorators": [] + }, + { + "$id": "120", + "kind": "enumvalue", + "name": "Medium", + "value": "Medium", + "valueType": { + "$id": "121", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "114" + }, + "doc": "Medium memory profile.", + "decorators": [] + }, + { + "$id": "122", + "kind": "enumvalue", + "name": "High", + "value": "High", + "valueType": { + "$id": "123", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "114" + }, + "doc": "High memory profile.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.IotOperations", + "doc": "The memory profile settings of the Broker", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "124", + "kind": "enum", + "name": "BrokerProtocolType", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerProtocolType", + "valueType": { + "$id": "125", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "126", + "kind": "enumvalue", + "name": "Mqtt", + "value": "Mqtt", + "valueType": { + "$id": "127", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "124" + }, + "doc": "protocol broker", + "decorators": [] + }, + { + "$id": "128", + "kind": "enumvalue", + "name": "WebSockets", + "value": "WebSockets", + "valueType": { + "$id": "129", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "124" + }, + "doc": "protocol websocket", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.IotOperations", + "doc": "Broker Protocol types", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "130", + "kind": "enum", + "name": "TlsCertMethodMode", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.TlsCertMethodMode", + "valueType": { + "$id": "131", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "132", + "kind": "enumvalue", + "name": "Automatic", + "value": "Automatic", + "valueType": { + "$id": "133", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "130" + }, + "doc": "Automatic TLS server certificate configuration.", + "decorators": [] + }, + { + "$id": "134", + "kind": "enumvalue", + "name": "Manual", + "value": "Manual", + "valueType": { + "$id": "135", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "130" + }, + "doc": "Manual TLS server certificate configuration.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.IotOperations", + "doc": "Broker Authentication Mode", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "136", + "kind": "enum", + "name": "CertManagerIssuerKind", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.CertManagerIssuerKind", + "valueType": { + "$id": "137", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "138", + "kind": "enumvalue", + "name": "Issuer", + "value": "Issuer", + "valueType": { + "$id": "139", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "136" + }, + "doc": "Issuer kind.", + "decorators": [] + }, + { + "$id": "140", + "kind": "enumvalue", + "name": "ClusterIssuer", + "value": "ClusterIssuer", + "valueType": { + "$id": "141", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "136" + }, + "doc": "ClusterIssuer kind.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.IotOperations", + "doc": "CertManagerIssuerKind properties", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "142", + "kind": "enum", + "name": "BlockerListenerServiceType", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.ServiceType", + "valueType": { + "$id": "143", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "144", + "kind": "enumvalue", + "name": "ClusterIp", + "value": "ClusterIp", + "valueType": { + "$id": "145", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "142" + }, + "doc": "Cluster IP Service.", + "decorators": [] + }, + { + "$id": "146", + "kind": "enumvalue", + "name": "LoadBalancer", + "value": "LoadBalancer", + "valueType": { + "$id": "147", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "142" + }, + "doc": "Load Balancer Service.", + "decorators": [] + }, + { + "$id": "148", + "kind": "enumvalue", + "name": "NodePort", + "value": "NodePort", + "valueType": { + "$id": "149", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "142" + }, + "doc": "Node Port Service.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.IotOperations", + "doc": "Kubernetes Service Types supported by Listener", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "150", + "kind": "enum", + "name": "BrokerAuthenticationMethod", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthenticationMethod", + "valueType": { + "$id": "151", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "152", + "kind": "enumvalue", + "name": "Custom", + "value": "Custom", + "valueType": { + "$id": "153", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "150" + }, + "doc": "Custom authentication configuration.", + "decorators": [] + }, + { + "$id": "154", + "kind": "enumvalue", + "name": "ServiceAccountToken", + "value": "ServiceAccountToken", + "valueType": { + "$id": "155", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "150" + }, + "doc": "ServiceAccountToken authentication configuration.", + "decorators": [] + }, + { + "$id": "156", + "kind": "enumvalue", + "name": "X509", + "value": "X509", + "valueType": { + "$id": "157", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "150" + }, + "doc": "X.509 authentication configuration.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.IotOperations", + "doc": "Broker Authentication Mode", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "158", + "kind": "enum", + "name": "BrokerResourceDefinitionMethods", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerResourceDefinitionMethods", + "valueType": { + "$id": "159", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "160", + "kind": "enumvalue", + "name": "Connect", + "value": "Connect", + "valueType": { + "$id": "161", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "158" + }, + "doc": "Allowed Connecting to Broker", + "decorators": [] + }, + { + "$id": "162", + "kind": "enumvalue", + "name": "Publish", + "value": "Publish", + "valueType": { + "$id": "163", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "158" + }, + "doc": "Allowed Publishing to Broker", + "decorators": [] + }, + { + "$id": "164", + "kind": "enumvalue", + "name": "Subscribe", + "value": "Subscribe", + "valueType": { + "$id": "165", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "158" + }, + "doc": "Allowed Subscribing to Broker", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.IotOperations", + "doc": "BrokerResourceDefinitionMethods methods allowed", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "166", + "kind": "enum", + "name": "StateStoreResourceKeyTypes", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.StateStoreResourceKeyTypes", + "valueType": { + "$id": "167", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "168", + "kind": "enumvalue", + "name": "Pattern", + "value": "Pattern", + "valueType": { + "$id": "169", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "166" + }, + "doc": "Key type - pattern", + "decorators": [] + }, + { + "$id": "170", + "kind": "enumvalue", + "name": "String", + "value": "String", + "valueType": { + "$id": "171", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "166" + }, + "doc": "Key type - string", + "decorators": [] + }, + { + "$id": "172", + "kind": "enumvalue", + "name": "Binary", + "value": "Binary", + "valueType": { + "$id": "173", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "166" + }, + "doc": "Key type - binary", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.IotOperations", + "doc": "StateStoreResourceKeyTypes properties", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "174", + "kind": "enum", + "name": "StateStoreResourceDefinitionMethods", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.StateStoreResourceDefinitionMethods", + "valueType": { + "$id": "175", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "176", + "kind": "enumvalue", + "name": "Read", + "value": "Read", + "valueType": { + "$id": "177", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "174" + }, + "doc": "Get/KeyNotify from Store", + "decorators": [] + }, + { + "$id": "178", + "kind": "enumvalue", + "name": "Write", + "value": "Write", + "valueType": { + "$id": "179", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "174" + }, + "doc": "Set/Delete in Store", + "decorators": [] + }, + { + "$id": "180", + "kind": "enumvalue", + "name": "ReadWrite", + "value": "ReadWrite", + "valueType": { + "$id": "181", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "174" + }, + "doc": "Allowed all operations on Store - Get/KeyNotify/Set/Delete", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.IotOperations", + "doc": "StateStoreResourceDefinitionMethods methods allowed", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "182", + "kind": "enum", + "name": "DataflowOperationType", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.OperationType", + "valueType": { + "$id": "183", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "184", + "kind": "enumvalue", + "name": "Source", + "value": "Source", + "valueType": { + "$id": "185", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "182" + }, + "doc": "Dataflow Source Operation", + "decorators": [] + }, + { + "$id": "186", + "kind": "enumvalue", + "name": "Destination", + "value": "Destination", + "valueType": { + "$id": "187", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "182" + }, + "doc": "Dataflow Destination Operation", + "decorators": [] + }, + { + "$id": "188", + "kind": "enumvalue", + "name": "BuiltInTransformation", + "value": "BuiltInTransformation", + "valueType": { + "$id": "189", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "182" + }, + "doc": "Dataflow BuiltIn Transformation Operation", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.IotOperations", + "doc": "Dataflow Operation Type properties", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "190", + "kind": "enum", + "name": "DataflowSourceSerializationFormat", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.SourceSerializationFormat", + "valueType": { + "$id": "191", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "192", + "kind": "enumvalue", + "name": "Json", + "value": "Json", + "valueType": { + "$id": "193", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "190" + }, + "doc": "JSON Format", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.IotOperations", + "doc": "Serialization Format properties", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "194", + "kind": "enum", + "name": "TransformationSerializationFormat", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.TransformationSerializationFormat", + "valueType": { + "$id": "195", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "196", + "kind": "enumvalue", + "name": "Delta", + "value": "Delta", + "valueType": { + "$id": "197", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "194" + }, + "doc": "Delta Format", + "decorators": [] + }, + { + "$id": "198", + "kind": "enumvalue", + "name": "Json", + "value": "Json", + "valueType": { + "$id": "199", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "194" + }, + "doc": "JSON Format", + "decorators": [] + }, + { + "$id": "200", + "kind": "enumvalue", + "name": "Parquet", + "value": "Parquet", + "valueType": { + "$id": "201", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "194" + }, + "doc": "Parquet Format", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.IotOperations", + "doc": "Transformation Format properties", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "202", + "kind": "enum", + "name": "DataflowFilterType", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.FilterType", + "valueType": { + "$id": "203", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "204", + "kind": "enumvalue", + "name": "Filter", + "value": "Filter", + "valueType": { + "$id": "205", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "202" + }, + "doc": "Filter type", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.IotOperations", + "doc": "Filter Type properties", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "206", + "kind": "enum", + "name": "DataflowMappingType", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowMappingType", + "valueType": { + "$id": "207", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "208", + "kind": "enumvalue", + "name": "NewProperties", + "value": "NewProperties", + "valueType": { + "$id": "209", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "206" + }, + "doc": "New Properties type", + "decorators": [] + }, + { + "$id": "210", + "kind": "enumvalue", + "name": "Rename", + "value": "Rename", + "valueType": { + "$id": "211", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "206" + }, + "doc": "Rename type", + "decorators": [] + }, + { + "$id": "212", + "kind": "enumvalue", + "name": "Compute", + "value": "Compute", + "valueType": { + "$id": "213", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "206" + }, + "doc": "Compute type", + "decorators": [] + }, + { + "$id": "214", + "kind": "enumvalue", + "name": "PassThrough", + "value": "PassThrough", + "valueType": { + "$id": "215", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "206" + }, + "doc": "Pass-through type", + "decorators": [] + }, + { + "$id": "216", + "kind": "enumvalue", + "name": "BuiltInFunction", + "value": "BuiltInFunction", + "valueType": { + "$id": "217", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "206" + }, + "doc": "Built in function type", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.IotOperations", + "doc": "Dataflow type mapping properties", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "218", + "kind": "enum", + "name": "DataflowEndpointType", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.EndpointType", + "valueType": { + "$id": "219", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "220", + "kind": "enumvalue", + "name": "DataExplorer", + "value": "DataExplorer", + "valueType": { + "$id": "221", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "218" + }, + "doc": "Azure Data Explorer Type", + "decorators": [] + }, + { + "$id": "222", + "kind": "enumvalue", + "name": "DataLakeStorage", + "value": "DataLakeStorage", + "valueType": { + "$id": "223", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "218" + }, + "doc": "Azure Data Lake Type", + "decorators": [] + }, + { + "$id": "224", + "kind": "enumvalue", + "name": "FabricOneLake", + "value": "FabricOneLake", + "valueType": { + "$id": "225", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "218" + }, + "doc": "Microsoft Fabric Type", + "decorators": [] + }, + { + "$id": "226", + "kind": "enumvalue", + "name": "Kafka", + "value": "Kafka", + "valueType": { + "$id": "227", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "218" + }, + "doc": "Kafka Type", + "decorators": [] + }, + { + "$id": "228", + "kind": "enumvalue", + "name": "LocalStorage", + "value": "LocalStorage", + "valueType": { + "$id": "229", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "218" + }, + "doc": "Local Storage Type", + "decorators": [] + }, + { + "$id": "230", + "kind": "enumvalue", + "name": "Mqtt", + "value": "Mqtt", + "valueType": { + "$id": "231", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "218" + }, + "doc": "Broker Type", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.IotOperations", + "doc": "DataflowEndpoint Type properties", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "232", + "kind": "enum", + "name": "DataExplorerAuthMethod", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataExplorerAuthMethod", + "valueType": { + "$id": "233", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "234", + "kind": "enumvalue", + "name": "SystemAssignedManagedIdentity", + "value": "SystemAssignedManagedIdentity", + "valueType": { + "$id": "235", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "232" + }, + "doc": "SystemAssignedManagedIdentity type", + "decorators": [] + }, + { + "$id": "236", + "kind": "enumvalue", + "name": "UserAssignedManagedIdentity", + "value": "UserAssignedManagedIdentity", + "valueType": { + "$id": "237", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "232" + }, + "doc": "UserAssignedManagedIdentity type", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.IotOperations", + "doc": "DataflowEndpoint Data Explorer Authentication Method properties", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "238", + "kind": "enum", + "name": "DataLakeStorageAuthMethod", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataLakeStorageAuthMethod", + "valueType": { + "$id": "239", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "240", + "kind": "enumvalue", + "name": "SystemAssignedManagedIdentity", + "value": "SystemAssignedManagedIdentity", + "valueType": { + "$id": "241", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "238" + }, + "doc": "SystemAssignedManagedIdentity type", + "decorators": [] + }, + { + "$id": "242", + "kind": "enumvalue", + "name": "UserAssignedManagedIdentity", + "value": "UserAssignedManagedIdentity", + "valueType": { + "$id": "243", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "238" + }, + "doc": "UserAssignedManagedIdentity type", + "decorators": [] + }, + { + "$id": "244", + "kind": "enumvalue", + "name": "AccessToken", + "value": "AccessToken", + "valueType": { + "$id": "245", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "238" + }, + "doc": "AccessToken Option", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.IotOperations", + "doc": "DataflowEndpoint Data Lake Storage Authentication Method properties", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "246", + "kind": "enum", + "name": "FabricOneLakeAuthMethod", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.FabricOneLakeAuthMethod", + "valueType": { + "$id": "247", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "248", + "kind": "enumvalue", + "name": "SystemAssignedManagedIdentity", + "value": "SystemAssignedManagedIdentity", + "valueType": { + "$id": "249", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "246" + }, + "doc": "SystemAssignedManagedIdentity type", + "decorators": [] + }, + { + "$id": "250", + "kind": "enumvalue", + "name": "UserAssignedManagedIdentity", + "value": "UserAssignedManagedIdentity", + "valueType": { + "$id": "251", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "246" + }, + "doc": "UserAssignedManagedIdentity type", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.IotOperations", + "doc": "DataflowEndpoint Fabric One Lake Authentication Method properties", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "252", + "kind": "enum", + "name": "DataflowEndpointFabricPathType", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointFabricPathType", + "valueType": { + "$id": "253", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "254", + "kind": "enumvalue", + "name": "Files", + "value": "Files", + "valueType": { + "$id": "255", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "252" + }, + "doc": "FILES Type", + "decorators": [] + }, + { + "$id": "256", + "kind": "enumvalue", + "name": "Tables", + "value": "Tables", + "valueType": { + "$id": "257", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "252" + }, + "doc": "TABLES Type", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.IotOperations", + "doc": "DataflowEndpoint Fabric Path Type properties", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "258", + "kind": "enum", + "name": "KafkaAuthMethod", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.KafkaAuthMethod", + "valueType": { + "$id": "259", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "260", + "kind": "enumvalue", + "name": "SystemAssignedManagedIdentity", + "value": "SystemAssignedManagedIdentity", + "valueType": { + "$id": "261", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "258" + }, + "doc": "SystemAssignedManagedIdentity type", + "decorators": [] + }, + { + "$id": "262", + "kind": "enumvalue", + "name": "UserAssignedManagedIdentity", + "value": "UserAssignedManagedIdentity", + "valueType": { + "$id": "263", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "258" + }, + "doc": "UserAssignedManagedIdentity type", + "decorators": [] + }, + { + "$id": "264", + "kind": "enumvalue", + "name": "Sasl", + "value": "Sasl", + "valueType": { + "$id": "265", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "258" + }, + "doc": "Sasl Option", + "decorators": [] + }, + { + "$id": "266", + "kind": "enumvalue", + "name": "X509Certificate", + "value": "X509Certificate", + "valueType": { + "$id": "267", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "258" + }, + "doc": "x509Certificate Option", + "decorators": [] + }, + { + "$id": "268", + "kind": "enumvalue", + "name": "Anonymous", + "value": "Anonymous", + "valueType": { + "$id": "269", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "258" + }, + "doc": "Anonymous Option", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.IotOperations", + "doc": "DataflowEndpoint Kafka Authentication Method properties", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "270", + "kind": "enum", + "name": "DataflowEndpointAuthenticationSaslType", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointAuthenticationSaslType", + "valueType": { + "$id": "271", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "272", + "kind": "enumvalue", + "name": "Plain", + "value": "Plain", + "valueType": { + "$id": "273", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "270" + }, + "doc": "PLAIN Type", + "decorators": [] + }, + { + "$id": "274", + "kind": "enumvalue", + "name": "ScramSha256", + "value": "ScramSha256", + "valueType": { + "$id": "275", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "270" + }, + "doc": "SCRAM_SHA_256 Type", + "decorators": [] + }, + { + "$id": "276", + "kind": "enumvalue", + "name": "ScramSha512", + "value": "ScramSha512", + "valueType": { + "$id": "277", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "270" + }, + "doc": "SCRAM_SHA_512 Type", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.IotOperations", + "doc": "DataflowEndpoint Authentication Sasl Type properties", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "278", + "kind": "enum", + "name": "DataflowEndpointKafkaCompression", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointKafkaCompression", + "valueType": { + "$id": "279", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "280", + "kind": "enumvalue", + "name": "None", + "value": "None", + "valueType": { + "$id": "281", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "278" + }, + "doc": "NONE Option", + "decorators": [] + }, + { + "$id": "282", + "kind": "enumvalue", + "name": "Gzip", + "value": "Gzip", + "valueType": { + "$id": "283", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "278" + }, + "doc": "Gzip Option", + "decorators": [] + }, + { + "$id": "284", + "kind": "enumvalue", + "name": "Snappy", + "value": "Snappy", + "valueType": { + "$id": "285", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "278" + }, + "doc": "SNAPPY Option", + "decorators": [] + }, + { + "$id": "286", + "kind": "enumvalue", + "name": "Lz4", + "value": "Lz4", + "valueType": { + "$id": "287", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "278" + }, + "doc": "LZ4 Option", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.IotOperations", + "doc": "Kafka endpoint Compression properties", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "288", + "kind": "enum", + "name": "DataflowEndpointKafkaAcks", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointKafkaAcks", + "valueType": { + "$id": "289", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "290", + "kind": "enumvalue", + "name": "Zero", + "value": "Zero", + "valueType": { + "$id": "291", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "288" + }, + "doc": "ZERO Option", + "decorators": [] + }, + { + "$id": "292", + "kind": "enumvalue", + "name": "One", + "value": "One", + "valueType": { + "$id": "293", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "288" + }, + "doc": "ONE Option", + "decorators": [] + }, + { + "$id": "294", + "kind": "enumvalue", + "name": "All", + "value": "All", + "valueType": { + "$id": "295", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "288" + }, + "doc": "ALL Option", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.IotOperations", + "doc": "DataflowEndpoint Kafka Acks properties", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "296", + "kind": "enum", + "name": "DataflowEndpointKafkaPartitionStrategy", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointKafkaPartitionStrategy", + "valueType": { + "$id": "297", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "298", + "kind": "enumvalue", + "name": "Default", + "value": "Default", + "valueType": { + "$id": "299", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "296" + }, + "doc": "Default: Assigns messages to random partitions, using a round-robin algorithm.", + "decorators": [] + }, + { + "$id": "300", + "kind": "enumvalue", + "name": "Static", + "value": "Static", + "valueType": { + "$id": "301", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "296" + }, + "doc": "Static: Assigns messages to a fixed partition number that's derived from the instance ID of the dataflow.", + "decorators": [] + }, + { + "$id": "302", + "kind": "enumvalue", + "name": "Topic", + "value": "Topic", + "valueType": { + "$id": "303", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "296" + }, + "doc": "TOPIC Option", + "decorators": [] + }, + { + "$id": "304", + "kind": "enumvalue", + "name": "Property", + "value": "Property", + "valueType": { + "$id": "305", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "296" + }, + "doc": "PROPERTY Option", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.IotOperations", + "doc": "DataflowEndpoint Kafka Partition Strategy properties", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "306", + "kind": "enum", + "name": "CloudEventAttributeType", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.CloudEventAttributeType", + "valueType": { + "$id": "307", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "308", + "kind": "enumvalue", + "name": "Propagate", + "value": "Propagate", + "valueType": { + "$id": "309", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "306" + }, + "doc": "Propagate type", + "decorators": [] + }, + { + "$id": "310", + "kind": "enumvalue", + "name": "CreateOrRemap", + "value": "CreateOrRemap", + "valueType": { + "$id": "311", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "306" + }, + "doc": "CreateOrRemap type", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.IotOperations", + "doc": "How to map events to the cloud.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "312", + "kind": "enum", + "name": "MqttAuthMethod", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.MqttAuthMethod", + "valueType": { + "$id": "313", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "314", + "kind": "enumvalue", + "name": "SystemAssignedManagedIdentity", + "value": "SystemAssignedManagedIdentity", + "valueType": { + "$id": "315", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "312" + }, + "doc": "SystemAssignedManagedIdentity type", + "decorators": [] + }, + { + "$id": "316", + "kind": "enumvalue", + "name": "UserAssignedManagedIdentity", + "value": "UserAssignedManagedIdentity", + "valueType": { + "$id": "317", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "312" + }, + "doc": "UserAssignedManagedIdentity type", + "decorators": [] + }, + { + "$id": "318", + "kind": "enumvalue", + "name": "ServiceAccountToken", + "value": "ServiceAccountToken", + "valueType": { + "$id": "319", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "312" + }, + "doc": "ServiceAccountToken Option", + "decorators": [] + }, + { + "$id": "320", + "kind": "enumvalue", + "name": "X509Certificate", + "value": "X509Certificate", + "valueType": { + "$id": "321", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "312" + }, + "doc": "x509Certificate Option", + "decorators": [] + }, + { + "$id": "322", + "kind": "enumvalue", + "name": "Anonymous", + "value": "Anonymous", + "valueType": { + "$id": "323", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "312" + }, + "doc": "Anonymous Option", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.IotOperations", + "doc": "DataflowEndpoint Mqtt Authentication Method properties", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "324", + "kind": "enum", + "name": "MqttRetainType", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.MqttRetainType", + "valueType": { + "$id": "325", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "326", + "kind": "enumvalue", + "name": "Keep", + "value": "Keep", + "valueType": { + "$id": "327", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "324" + }, + "doc": "Retain the messages.", + "decorators": [] + }, + { + "$id": "328", + "kind": "enumvalue", + "name": "Never", + "value": "Never", + "valueType": { + "$id": "329", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "324" + }, + "doc": "Never retain messages.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.IotOperations", + "doc": "Broker Retain types", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "330", + "kind": "enum", + "name": "Versions", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Versions", + "valueType": { + "$id": "331", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "332", + "kind": "enumvalue", + "name": "2024-11-01", + "value": "2024-11-01", + "valueType": { + "$id": "333", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "330" + }, + "doc": "2024-11-01 version", + "decorators": [] + }, + { + "$id": "334", + "kind": "enumvalue", + "name": "2025-04-01", + "value": "2025-04-01", + "valueType": { + "$id": "335", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "330" + }, + "doc": "2025-04-01 version", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.IotOperations", + "doc": "Api versions", + "isFixed": true, + "isFlags": false, + "usage": "ApiVersionEnum", + "decorators": [] + } + ], + "models": [ + { + "$id": "336", + "kind": "model", + "name": "OperationListResult", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationListResult", + "usage": "Output,Json", + "doc": "A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.", + "decorators": [], + "properties": [ + { + "$id": "337", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The Operation items on this page", + "type": { + "$id": "338", + "kind": "array", + "name": "ArrayOperation", + "valueType": { + "$id": "339", + "kind": "model", + "name": "Operation", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation", + "usage": "Output,Json", + "doc": "Details of a REST API operation, returned from the Resource Provider Operations API", + "decorators": [], + "properties": [ + { + "$id": "340", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the operation, as per Resource-Based Access Control (RBAC). Examples: \"Microsoft.Compute/virtualMachines/write\", \"Microsoft.Compute/virtualMachines/capture/action\"", + "type": { + "$id": "341", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.name", + "serializationOptions": { + "$id": "342", + "json": { + "$id": "343", + "name": "name" + } + } + }, + { + "$id": "344", + "kind": "property", + "name": "isDataAction", + "serializedName": "isDataAction", + "doc": "Whether the operation applies to data-plane. This is \"true\" for data-plane operations and \"false\" for Azure Resource Manager/control-plane operations.", + "type": { + "$id": "345", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.isDataAction", + "serializationOptions": { + "$id": "346", + "json": { + "$id": "347", + "name": "isDataAction" + } + } + }, + { + "$id": "348", + "kind": "property", + "name": "display", + "serializedName": "display", + "doc": "Localized display information for this particular operation.", + "type": { + "$id": "349", + "kind": "model", + "name": "OperationDisplay", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay", + "usage": "Output,Json", + "doc": "Localized display information for and operation.", + "decorators": [], + "properties": [ + { + "$id": "350", + "kind": "property", + "name": "provider", + "serializedName": "provider", + "doc": "The localized friendly form of the resource provider name, e.g. \"Microsoft Monitoring Insights\" or \"Microsoft Compute\".", + "type": { + "$id": "351", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay.provider", + "serializationOptions": { + "$id": "352", + "json": { + "$id": "353", + "name": "provider" + } + } + }, + { + "$id": "354", + "kind": "property", + "name": "resource", + "serializedName": "resource", + "doc": "The localized friendly name of the resource type related to this operation. E.g. \"Virtual Machines\" or \"Job Schedule Collections\".", + "type": { + "$id": "355", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay.resource", + "serializationOptions": { + "$id": "356", + "json": { + "$id": "357", + "name": "resource" + } + } + }, + { + "$id": "358", + "kind": "property", + "name": "operation", + "serializedName": "operation", + "doc": "The concise, localized friendly name for the operation; suitable for dropdowns. E.g. \"Create or Update Virtual Machine\", \"Restart Virtual Machine\".", + "type": { + "$id": "359", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay.operation", + "serializationOptions": { + "$id": "360", + "json": { + "$id": "361", + "name": "operation" + } + } + }, + { + "$id": "362", + "kind": "property", + "name": "description", + "serializedName": "description", + "doc": "The short, localized friendly description of the operation; suitable for tool tips and detailed views.", + "type": { + "$id": "363", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay.description", + "serializationOptions": { + "$id": "364", + "json": { + "$id": "365", + "name": "description" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.display", + "serializationOptions": { + "$id": "366", + "json": { + "$id": "367", + "name": "display" + } + } + }, + { + "$id": "368", + "kind": "property", + "name": "origin", + "serializedName": "origin", + "doc": "The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\"", + "type": { + "$ref": "2" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.origin", + "serializationOptions": { + "$id": "369", + "json": { + "$id": "370", + "name": "origin" + } + } + }, + { + "$id": "371", + "kind": "property", + "name": "actionType", + "serializedName": "actionType", + "doc": "Extensible enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs.", + "type": { + "$ref": "10" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.actionType", + "serializationOptions": { + "$id": "372", + "json": { + "$id": "373", + "name": "actionType" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationListResult.value", + "serializationOptions": { + "$id": "374", + "json": { + "$id": "375", + "name": "value" + } + } + }, + { + "$id": "376", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "377", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "378", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationListResult.nextLink", + "serializationOptions": { + "$id": "379", + "json": { + "$id": "380", + "name": "nextLink" + } + } + } + ] + }, + { + "$ref": "339" + }, + { + "$ref": "349" + }, + { + "$id": "381", + "kind": "model", + "name": "ErrorResponse", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorResponse", + "usage": "Json,Exception", + "doc": "Common error response for all Azure Resource Manager APIs to return error details for failed operations.", + "decorators": [], + "properties": [ + { + "$id": "382", + "kind": "property", + "name": "error", + "serializedName": "error", + "doc": "The error object.", + "type": { + "$id": "383", + "kind": "model", + "name": "ErrorDetail", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail", + "usage": "Json,Exception,LroPolling", + "doc": "The error detail.", + "decorators": [], + "properties": [ + { + "$id": "384", + "kind": "property", + "name": "code", + "serializedName": "code", + "doc": "The error code.", + "type": { + "$id": "385", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.code", + "serializationOptions": { + "$id": "386", + "json": { + "$id": "387", + "name": "code" + } + } + }, + { + "$id": "388", + "kind": "property", + "name": "message", + "serializedName": "message", + "doc": "The error message.", + "type": { + "$id": "389", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.message", + "serializationOptions": { + "$id": "390", + "json": { + "$id": "391", + "name": "message" + } + } + }, + { + "$id": "392", + "kind": "property", + "name": "target", + "serializedName": "target", + "doc": "The error target.", + "type": { + "$id": "393", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.target", + "serializationOptions": { + "$id": "394", + "json": { + "$id": "395", + "name": "target" + } + } + }, + { + "$id": "396", + "kind": "property", + "name": "details", + "serializedName": "details", + "doc": "The error details.", + "type": { + "$id": "397", + "kind": "array", + "name": "ArrayErrorDetail", + "valueType": { + "$ref": "383" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.details", + "serializationOptions": { + "$id": "398", + "json": { + "$id": "399", + "name": "details" + } + } + }, + { + "$id": "400", + "kind": "property", + "name": "additionalInfo", + "serializedName": "additionalInfo", + "doc": "The error additional info.", + "type": { + "$id": "401", + "kind": "array", + "name": "ArrayErrorAdditionalInfo", + "valueType": { + "$id": "402", + "kind": "model", + "name": "ErrorAdditionalInfo", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo", + "usage": "Json,Exception,LroPolling", + "doc": "The resource management error additional info.", + "decorators": [], + "properties": [ + { + "$id": "403", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The additional info type.", + "type": { + "$id": "404", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo.type", + "serializationOptions": { + "$id": "405", + "json": { + "$id": "406", + "name": "type" + } + } + }, + { + "$id": "407", + "kind": "property", + "name": "info", + "serializedName": "info", + "doc": "The additional info.", + "type": { + "$id": "408", + "kind": "model", + "name": "ErrorAdditionalInfoInfo", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo.info.anonymous", + "usage": "Json,Exception,LroPolling", + "decorators": [], + "properties": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo.info", + "serializationOptions": { + "$id": "409", + "json": { + "$id": "410", + "name": "info" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.additionalInfo", + "serializationOptions": { + "$id": "411", + "json": { + "$id": "412", + "name": "additionalInfo" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorResponse.error", + "serializationOptions": { + "$id": "413", + "json": { + "$id": "414", + "name": "error" + } + } + } + ] + }, + { + "$ref": "383" + }, + { + "$ref": "402" + }, + { + "$ref": "408" + }, + { + "$id": "415", + "kind": "model", + "name": "IotOperationsInstance", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.InstanceResource", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "A Instance resource is a logical container for a set of child resources.", + "decorators": [], + "baseModel": { + "$id": "416", + "kind": "model", + "name": "TrackedResource", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.TrackedResource", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'", + "decorators": [], + "baseModel": { + "$id": "417", + "kind": "model", + "name": "Resource", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Common fields that are returned in the response for all Azure Resource Manager resources", + "decorators": [], + "properties": [ + { + "$id": "418", + "kind": "property", + "name": "id", + "serializedName": "id", + "doc": "Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}", + "type": { + "$id": "419", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "420", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource.id", + "serializationOptions": { + "$id": "421", + "json": { + "$id": "422", + "name": "id" + } + } + }, + { + "$id": "423", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the resource", + "type": { + "$id": "424", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource.name", + "serializationOptions": { + "$id": "425", + "json": { + "$id": "426", + "name": "name" + } + } + }, + { + "$id": "427", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"", + "type": { + "$id": "428", + "kind": "string", + "name": "armResourceType", + "crossLanguageDefinitionId": "Azure.Core.armResourceType", + "baseType": { + "$id": "429", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource.type", + "serializationOptions": { + "$id": "430", + "json": { + "$id": "431", + "name": "type" + } + } + }, + { + "$id": "432", + "kind": "property", + "name": "systemData", + "serializedName": "systemData", + "doc": "Azure Resource Manager metadata containing createdBy and modifiedBy information.", + "type": { + "$id": "433", + "kind": "model", + "name": "SystemData", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData", + "usage": "Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Metadata pertaining to creation and last modification of the resource.", + "decorators": [], + "properties": [ + { + "$id": "434", + "kind": "property", + "name": "createdBy", + "serializedName": "createdBy", + "doc": "The identity that created the resource.", + "type": { + "$id": "435", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.createdBy", + "serializationOptions": { + "$id": "436", + "json": { + "$id": "437", + "name": "createdBy" + } + } + }, + { + "$id": "438", + "kind": "property", + "name": "createdByType", + "serializedName": "createdByType", + "doc": "The type of identity that created the resource.", + "type": { + "$ref": "58" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.createdByType", + "serializationOptions": { + "$id": "439", + "json": { + "$id": "440", + "name": "createdByType" + } + } + }, + { + "$id": "441", + "kind": "property", + "name": "createdAt", + "serializedName": "createdAt", + "doc": "The timestamp of resource creation (UTC).", + "type": { + "$id": "442", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "443", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.createdAt", + "serializationOptions": { + "$id": "444", + "json": { + "$id": "445", + "name": "createdAt" + } + } + }, + { + "$id": "446", + "kind": "property", + "name": "lastModifiedBy", + "serializedName": "lastModifiedBy", + "doc": "The identity that last modified the resource.", + "type": { + "$id": "447", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.lastModifiedBy", + "serializationOptions": { + "$id": "448", + "json": { + "$id": "449", + "name": "lastModifiedBy" + } + } + }, + { + "$id": "450", + "kind": "property", + "name": "lastModifiedByType", + "serializedName": "lastModifiedByType", + "doc": "The type of identity that last modified the resource.", + "type": { + "$ref": "58" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.lastModifiedByType", + "serializationOptions": { + "$id": "451", + "json": { + "$id": "452", + "name": "lastModifiedByType" + } + } + }, + { + "$id": "453", + "kind": "property", + "name": "lastModifiedAt", + "serializedName": "lastModifiedAt", + "doc": "The timestamp of resource last modification (UTC)", + "type": { + "$id": "454", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "455", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.lastModifiedAt", + "serializationOptions": { + "$id": "456", + "json": { + "$id": "457", + "name": "lastModifiedAt" + } + } + } + ] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource.systemData", + "serializationOptions": { + "$id": "458", + "json": { + "$id": "459", + "name": "systemData" + } + } + } + ] + }, + "properties": [ + { + "$id": "460", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Resource tags.", + "type": { + "$id": "461", + "kind": "dict", + "keyType": { + "$id": "462", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "463", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.TrackedResource.tags", + "serializationOptions": { + "$id": "464", + "json": { + "$id": "465", + "name": "tags" + } + } + }, + { + "$id": "466", + "kind": "property", + "name": "location", + "serializedName": "location", + "doc": "The geo-location where the resource lives", + "type": { + "$id": "467", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.TrackedResource.location", + "serializationOptions": { + "$id": "468", + "json": { + "$id": "469", + "name": "location" + } + } + } + ] + }, + "properties": [ + { + "$id": "470", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "471", + "kind": "model", + "name": "IotOperationsInstanceProperties", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.InstanceProperties", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The properties of the Instance resource.", + "decorators": [], + "properties": [ + { + "$id": "472", + "kind": "property", + "name": "description", + "serializedName": "description", + "doc": "Detailed description of the Instance.", + "type": { + "$id": "473", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.InstanceProperties.description", + "serializationOptions": { + "$id": "474", + "json": { + "$id": "475", + "name": "description" + } + } + }, + { + "$id": "476", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "The status of the last operation.", + "type": { + "$ref": "14" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.InstanceProperties.provisioningState", + "serializationOptions": { + "$id": "477", + "json": { + "$id": "478", + "name": "provisioningState" + } + } + }, + { + "$id": "479", + "kind": "property", + "name": "version", + "serializedName": "version", + "doc": "The Azure IoT Operations version.", + "type": { + "$id": "480", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.InstanceProperties.version", + "serializationOptions": { + "$id": "481", + "json": { + "$id": "482", + "name": "version" + } + } + }, + { + "$id": "483", + "kind": "property", + "name": "schemaRegistryRef", + "serializedName": "schemaRegistryRef", + "doc": "The reference to the Schema Registry for this AIO Instance.", + "type": { + "$id": "484", + "kind": "model", + "name": "SchemaRegistryRef", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.SchemaRegistryRef", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The reference to the Schema Registry for this AIO Instance.", + "decorators": [], + "properties": [ + { + "$id": "485", + "kind": "property", + "name": "resourceId", + "serializedName": "resourceId", + "doc": "The resource ID of the Schema Registry.", + "type": { + "$id": "486", + "kind": "string", + "name": "SchemaRegistryID", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.SchemaRegistryID", + "baseType": { + "$id": "487", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "488", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.SchemaRegistryRef.resourceId", + "serializationOptions": { + "$id": "489", + "json": { + "$id": "490", + "name": "resourceId" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.InstanceProperties.schemaRegistryRef", + "serializationOptions": { + "$id": "491", + "json": { + "$id": "492", + "name": "schemaRegistryRef" + } + } + }, + { + "$id": "493", + "kind": "property", + "name": "features", + "serializedName": "features", + "doc": "The features of the AIO Instance.", + "type": { + "$id": "494", + "kind": "dict", + "keyType": { + "$id": "495", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "496", + "kind": "model", + "name": "InstanceFeature", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.InstanceFeature", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The features of the AIO Instance.", + "decorators": [], + "properties": [ + { + "$id": "497", + "kind": "property", + "name": "mode", + "serializedName": "mode", + "doc": "The state of the feature.", + "type": { + "$ref": "30" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.InstanceFeature.mode", + "serializationOptions": { + "$id": "498", + "json": { + "$id": "499", + "name": "mode" + } + } + }, + { + "$id": "500", + "kind": "property", + "name": "settings", + "serializedName": "settings", + "doc": "The settings of the feature.", + "type": { + "$id": "501", + "kind": "dict", + "keyType": { + "$id": "502", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$ref": "38" + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.InstanceFeature.settings", + "serializationOptions": { + "$id": "503", + "json": { + "$id": "504", + "name": "settings" + } + } + } + ] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.InstanceProperties.features", + "serializationOptions": { + "$id": "505", + "json": { + "$id": "506", + "name": "features" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.InstanceResource.properties", + "serializationOptions": { + "$id": "507", + "json": { + "$id": "508", + "name": "properties" + } + } + }, + { + "$id": "509", + "kind": "path", + "name": "name", + "serializedName": "name", + "doc": "Name of instance.", + "type": { + "$id": "510", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.InstanceResource.name", + "discriminator": false, + "flatten": false + }, + { + "$id": "511", + "kind": "property", + "name": "extendedLocation", + "serializedName": "extendedLocation", + "doc": "Edge location of the resource.", + "type": { + "$id": "512", + "kind": "model", + "name": "IotOperationsExtendedLocation", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.ExtendedLocation", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Extended location is an extension of Azure locations. They provide a way to use their Azure ARC enabled Kubernetes clusters as target locations for deploying Azure services instances.", + "decorators": [], + "properties": [ + { + "$id": "513", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the extended location.", + "type": { + "$id": "514", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.ExtendedLocation.name", + "serializationOptions": { + "$id": "515", + "json": { + "$id": "516", + "name": "name" + } + } + }, + { + "$id": "517", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "Type of ExtendedLocation.", + "type": { + "$ref": "44" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.ExtendedLocation.type", + "serializationOptions": { + "$id": "518", + "json": { + "$id": "519", + "name": "type" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.InstanceResource.extendedLocation", + "serializationOptions": { + "$id": "520", + "json": { + "$id": "521", + "name": "extendedLocation" + } + } + }, + { + "$id": "522", + "kind": "property", + "name": "identity", + "serializedName": "identity", + "doc": "The managed service identities assigned to this resource.", + "type": { + "$id": "523", + "kind": "model", + "name": "ManagedServiceIdentity", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Managed service identity (system assigned and/or user assigned identities)", + "decorators": [], + "properties": [ + { + "$id": "524", + "kind": "property", + "name": "principalId", + "serializedName": "principalId", + "doc": "The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity.", + "type": { + "$id": "525", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "526", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity.principalId", + "serializationOptions": { + "$id": "527", + "json": { + "$id": "528", + "name": "principalId" + } + } + }, + { + "$id": "529", + "kind": "property", + "name": "tenantId", + "serializedName": "tenantId", + "doc": "The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity.", + "type": { + "$id": "530", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "531", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity.tenantId", + "serializationOptions": { + "$id": "532", + "json": { + "$id": "533", + "name": "tenantId" + } + } + }, + { + "$id": "534", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The type of managed identity assigned to this resource.", + "type": { + "$ref": "48" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity.type", + "serializationOptions": { + "$id": "535", + "json": { + "$id": "536", + "name": "type" + } + } + }, + { + "$id": "537", + "kind": "property", + "name": "userAssignedIdentities", + "serializedName": "userAssignedIdentities", + "doc": "The identities assigned to this resource by the user.", + "type": { + "$id": "538", + "kind": "dict", + "keyType": { + "$id": "539", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "540", + "kind": "nullable", + "type": { + "$id": "541", + "kind": "model", + "name": "UserAssignedIdentity", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.UserAssignedIdentity", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "User assigned identity properties", + "decorators": [], + "properties": [ + { + "$id": "542", + "kind": "property", + "name": "clientId", + "serializedName": "clientId", + "doc": "The client ID of the assigned identity.", + "type": { + "$id": "543", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "544", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.UserAssignedIdentity.clientId", + "serializationOptions": { + "$id": "545", + "json": { + "$id": "546", + "name": "clientId" + } + } + }, + { + "$id": "547", + "kind": "property", + "name": "principalId", + "serializedName": "principalId", + "doc": "The principal ID of the assigned identity.", + "type": { + "$id": "548", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "549", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.UserAssignedIdentity.principalId", + "serializationOptions": { + "$id": "550", + "json": { + "$id": "551", + "name": "principalId" + } + } + } + ] + }, + "namespace": "Azure.ResourceManager.IotOperations" + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity.userAssignedIdentities", + "serializationOptions": { + "$id": "552", + "json": { + "$id": "553", + "name": "userAssignedIdentities" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.InstanceResource.identity", + "serializationOptions": { + "$id": "554", + "json": { + "$id": "555", + "name": "identity" + } + } + } + ] + }, + { + "$ref": "471" + }, + { + "$ref": "484" + }, + { + "$ref": "496" + }, + { + "$ref": "512" + }, + { + "$ref": "523" + }, + { + "$ref": "541" + }, + { + "$ref": "416" + }, + { + "$ref": "417" + }, + { + "$ref": "433" + }, + { + "$id": "556", + "kind": "model", + "name": "ArmOperationStatusResourceProvisioningState", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus", + "usage": "LroPolling", + "doc": "Standard Azure Resource Manager operation status response", + "decorators": [], + "properties": [ + { + "$id": "557", + "kind": "property", + "name": "status", + "serializedName": "status", + "doc": "The operation status", + "type": { + "$ref": "68" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.status", + "serializationOptions": { + "$id": "558", + "json": { + "$id": "559", + "name": "status" + } + } + }, + { + "$id": "560", + "kind": "path", + "name": "id", + "serializedName": "id", + "doc": "The unique identifier for the operationStatus resource", + "type": { + "$id": "561", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.id", + "discriminator": false, + "flatten": false + }, + { + "$id": "562", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the operationStatus resource", + "type": { + "$id": "563", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.name", + "serializationOptions": { + "$id": "564", + "json": { + "$id": "565", + "name": "name" + } + } + }, + { + "$id": "566", + "kind": "property", + "name": "startTime", + "serializedName": "startTime", + "doc": "Operation start time", + "type": { + "$id": "567", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "568", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.startTime", + "serializationOptions": { + "$id": "569", + "json": { + "$id": "570", + "name": "startTime" + } + } + }, + { + "$id": "571", + "kind": "property", + "name": "endTime", + "serializedName": "endTime", + "doc": "Operation complete time", + "type": { + "$id": "572", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "573", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.endTime", + "serializationOptions": { + "$id": "574", + "json": { + "$id": "575", + "name": "endTime" + } + } + }, + { + "$id": "576", + "kind": "property", + "name": "percentComplete", + "serializedName": "percentComplete", + "doc": "The progress made toward completing the operation", + "type": { + "$id": "577", + "kind": "float64", + "name": "float64", + "crossLanguageDefinitionId": "TypeSpec.float64", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.percentComplete", + "serializationOptions": { + "$id": "578", + "json": { + "$id": "579", + "name": "percentComplete" + } + } + }, + { + "$id": "580", + "kind": "property", + "name": "error", + "serializedName": "error", + "doc": "Errors that occurred if the operation ended with Canceled or Failed status", + "type": { + "$ref": "383" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.error", + "serializationOptions": { + "$id": "581", + "json": { + "$id": "582", + "name": "error" + } + } + } + ] + }, + { + "$id": "583", + "kind": "model", + "name": "InstancePatchModel", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.InstancePatchModel", + "usage": "Input,Json", + "doc": "The Instance update model.", + "decorators": [], + "properties": [ + { + "$id": "584", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Resource tags.", + "type": { + "$id": "585", + "kind": "dict", + "keyType": { + "$id": "586", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "587", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.InstancePatchModel.tags", + "serializationOptions": { + "$id": "588", + "json": { + "$id": "589", + "name": "tags" + } + } + }, + { + "$id": "590", + "kind": "property", + "name": "identity", + "serializedName": "identity", + "doc": "The managed service identities assigned to this resource.", + "type": { + "$ref": "523" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.InstancePatchModel.identity", + "serializationOptions": { + "$id": "591", + "json": { + "$id": "592", + "name": "identity" + } + } + } + ] + }, + { + "$id": "593", + "kind": "model", + "name": "InstanceResourceListResult", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult", + "usage": "Output,Json", + "doc": "The response of a InstanceResource list operation.", + "decorators": [], + "properties": [ + { + "$id": "594", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The InstanceResource items on this page", + "type": { + "$id": "595", + "kind": "array", + "name": "ArrayInstanceResource", + "valueType": { + "$ref": "415" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", + "serializationOptions": { + "$id": "596", + "json": { + "$id": "597", + "name": "value" + } + } + }, + { + "$id": "598", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "599", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "600", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.nextLink", + "serializationOptions": { + "$id": "601", + "json": { + "$id": "602", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "603", + "kind": "model", + "name": "IotOperationsBroker", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerResource", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Instance broker resource", + "decorators": [], + "baseModel": { + "$id": "604", + "kind": "model", + "name": "ProxyResource", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ProxyResource", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location", + "decorators": [], + "baseModel": { + "$ref": "417" + }, + "properties": [] + }, + "properties": [ + { + "$id": "605", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "606", + "kind": "model", + "name": "IotOperationsBrokerProperties", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerProperties", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Broker Resource properties", + "decorators": [], + "properties": [ + { + "$id": "607", + "kind": "property", + "name": "advanced", + "serializedName": "advanced", + "doc": "Advanced settings of Broker.", + "type": { + "$id": "608", + "kind": "model", + "name": "BrokerAdvancedSettings", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.AdvancedSettings", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Broker Advanced Settings", + "decorators": [], + "properties": [ + { + "$id": "609", + "kind": "property", + "name": "clients", + "serializedName": "clients", + "doc": "Configurations related to All Clients.", + "type": { + "$id": "610", + "kind": "model", + "name": "BrokerClientConfig", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.ClientConfig", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The settings of Client Config.", + "decorators": [], + "properties": [ + { + "$id": "611", + "kind": "property", + "name": "maxSessionExpirySeconds", + "serializedName": "maxSessionExpirySeconds", + "doc": "Upper bound of Session Expiry Interval, in seconds.", + "type": { + "$id": "612", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.ClientConfig.maxSessionExpirySeconds", + "serializationOptions": { + "$id": "613", + "json": { + "$id": "614", + "name": "maxSessionExpirySeconds" + } + } + }, + { + "$id": "615", + "kind": "property", + "name": "maxMessageExpirySeconds", + "serializedName": "maxMessageExpirySeconds", + "doc": "Upper bound of Message Expiry Interval, in seconds.", + "type": { + "$id": "616", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.ClientConfig.maxMessageExpirySeconds", + "serializationOptions": { + "$id": "617", + "json": { + "$id": "618", + "name": "maxMessageExpirySeconds" + } + } + }, + { + "$id": "619", + "kind": "property", + "name": "maxPacketSizeBytes", + "serializedName": "maxPacketSizeBytes", + "doc": "Max message size for a packet in Bytes.", + "type": { + "$id": "620", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.ClientConfig.maxPacketSizeBytes", + "serializationOptions": { + "$id": "621", + "json": { + "$id": "622", + "name": "maxPacketSizeBytes" + } + } + }, + { + "$id": "623", + "kind": "property", + "name": "subscriberQueueLimit", + "serializedName": "subscriberQueueLimit", + "doc": "The limit on the number of queued messages for a subscriber.", + "type": { + "$id": "624", + "kind": "model", + "name": "SubscriberQueueLimit", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.SubscriberQueueLimit", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The settings of Subscriber Queue Limit.", + "decorators": [], + "properties": [ + { + "$id": "625", + "kind": "property", + "name": "length", + "serializedName": "length", + "doc": "The maximum length of the queue before messages start getting dropped.", + "type": { + "$id": "626", + "kind": "int64", + "name": "int64", + "crossLanguageDefinitionId": "TypeSpec.int64", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.SubscriberQueueLimit.length", + "serializationOptions": { + "$id": "627", + "json": { + "$id": "628", + "name": "length" + } + } + }, + { + "$id": "629", + "kind": "property", + "name": "strategy", + "serializedName": "strategy", + "doc": "The strategy to use for dropping messages from the queue.", + "type": { + "$ref": "76" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.SubscriberQueueLimit.strategy", + "serializationOptions": { + "$id": "630", + "json": { + "$id": "631", + "name": "strategy" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.ClientConfig.subscriberQueueLimit", + "serializationOptions": { + "$id": "632", + "json": { + "$id": "633", + "name": "subscriberQueueLimit" + } + } + }, + { + "$id": "634", + "kind": "property", + "name": "maxReceiveMaximum", + "serializedName": "maxReceiveMaximum", + "doc": "Upper bound of Receive Maximum that a client can request in the CONNECT packet.", + "type": { + "$id": "635", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.ClientConfig.maxReceiveMaximum", + "serializationOptions": { + "$id": "636", + "json": { + "$id": "637", + "name": "maxReceiveMaximum" + } + } + }, + { + "$id": "638", + "kind": "property", + "name": "maxKeepAliveSeconds", + "serializedName": "maxKeepAliveSeconds", + "doc": "Upper bound of a client's Keep Alive, in seconds.", + "type": { + "$id": "639", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.ClientConfig.maxKeepAliveSeconds", + "serializationOptions": { + "$id": "640", + "json": { + "$id": "641", + "name": "maxKeepAliveSeconds" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.AdvancedSettings.clients", + "serializationOptions": { + "$id": "642", + "json": { + "$id": "643", + "name": "clients" + } + } + }, + { + "$id": "644", + "kind": "property", + "name": "encryptInternalTraffic", + "serializedName": "encryptInternalTraffic", + "doc": "The setting to enable or disable encryption of internal Traffic.", + "type": { + "$ref": "38" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.AdvancedSettings.encryptInternalTraffic", + "serializationOptions": { + "$id": "645", + "json": { + "$id": "646", + "name": "encryptInternalTraffic" + } + } + }, + { + "$id": "647", + "kind": "property", + "name": "internalCerts", + "serializedName": "internalCerts", + "doc": "Certificate rotation and private key configuration.", + "type": { + "$id": "648", + "kind": "model", + "name": "CertManagerCertConfig", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.CertManagerCertOptions", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Cert Manager Cert properties", + "decorators": [], + "properties": [ + { + "$id": "649", + "kind": "property", + "name": "duration", + "serializedName": "duration", + "doc": "Lifetime of certificate. Must be specified using a Go time.Duration format (h|m|s). E.g. 240h for 240 hours and 45m for 45 minutes.", + "type": { + "$id": "650", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.CertManagerCertOptions.duration", + "serializationOptions": { + "$id": "651", + "json": { + "$id": "652", + "name": "duration" + } + } + }, + { + "$id": "653", + "kind": "property", + "name": "renewBefore", + "serializedName": "renewBefore", + "doc": "When to begin renewing certificate. Must be specified using a Go time.Duration format (h|m|s). E.g. 240h for 240 hours and 45m for 45 minutes.", + "type": { + "$id": "654", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.CertManagerCertOptions.renewBefore", + "serializationOptions": { + "$id": "655", + "json": { + "$id": "656", + "name": "renewBefore" + } + } + }, + { + "$id": "657", + "kind": "property", + "name": "privateKey", + "serializedName": "privateKey", + "doc": "Configuration of certificate private key.", + "type": { + "$id": "658", + "kind": "model", + "name": "CertManagerPrivateKey", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.CertManagerPrivateKey", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Cert Manager private key properties", + "decorators": [], + "properties": [ + { + "$id": "659", + "kind": "property", + "name": "algorithm", + "serializedName": "algorithm", + "doc": "algorithm for private key.", + "type": { + "$ref": "82" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.CertManagerPrivateKey.algorithm", + "serializationOptions": { + "$id": "660", + "json": { + "$id": "661", + "name": "algorithm" + } + } + }, + { + "$id": "662", + "kind": "property", + "name": "rotationPolicy", + "serializedName": "rotationPolicy", + "doc": "cert-manager private key rotationPolicy.", + "type": { + "$ref": "98" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.CertManagerPrivateKey.rotationPolicy", + "serializationOptions": { + "$id": "663", + "json": { + "$id": "664", + "name": "rotationPolicy" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.CertManagerCertOptions.privateKey", + "serializationOptions": { + "$id": "665", + "json": { + "$id": "666", + "name": "privateKey" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.AdvancedSettings.internalCerts", + "serializationOptions": { + "$id": "667", + "json": { + "$id": "668", + "name": "internalCerts" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerProperties.advanced", + "serializationOptions": { + "$id": "669", + "json": { + "$id": "670", + "name": "advanced" + } + } + }, + { + "$id": "671", + "kind": "property", + "name": "cardinality", + "serializedName": "cardinality", + "doc": "The cardinality details of the broker.", + "type": { + "$id": "672", + "kind": "model", + "name": "BrokerCardinality", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Cardinality", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Cardinality properties", + "decorators": [], + "properties": [ + { + "$id": "673", + "kind": "property", + "name": "backendChain", + "serializedName": "backendChain", + "doc": "The backend broker desired properties", + "type": { + "$id": "674", + "kind": "model", + "name": "BrokerBackendChain", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BackendChain", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Desired properties of the backend instances of the broker", + "decorators": [], + "properties": [ + { + "$id": "675", + "kind": "property", + "name": "partitions", + "serializedName": "partitions", + "doc": "The desired number of physical backend partitions.", + "type": { + "$id": "676", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BackendChain.partitions", + "serializationOptions": { + "$id": "677", + "json": { + "$id": "678", + "name": "partitions" + } + } + }, + { + "$id": "679", + "kind": "property", + "name": "redundancyFactor", + "serializedName": "redundancyFactor", + "doc": "The desired numbers of backend replicas (pods) in a physical partition.", + "type": { + "$id": "680", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BackendChain.redundancyFactor", + "serializationOptions": { + "$id": "681", + "json": { + "$id": "682", + "name": "redundancyFactor" + } + } + }, + { + "$id": "683", + "kind": "property", + "name": "workers", + "serializedName": "workers", + "doc": "Number of logical backend workers per replica (pod).", + "type": { + "$id": "684", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BackendChain.workers", + "serializationOptions": { + "$id": "685", + "json": { + "$id": "686", + "name": "workers" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Cardinality.backendChain", + "serializationOptions": { + "$id": "687", + "json": { + "$id": "688", + "name": "backendChain" + } + } + }, + { + "$id": "689", + "kind": "property", + "name": "frontend", + "serializedName": "frontend", + "doc": "The frontend desired properties", + "type": { + "$id": "690", + "kind": "model", + "name": "BrokerFrontend", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Frontend", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The desired properties of the frontend instances of the Broker", + "decorators": [], + "properties": [ + { + "$id": "691", + "kind": "property", + "name": "replicas", + "serializedName": "replicas", + "doc": "The desired number of frontend instances (pods).", + "type": { + "$id": "692", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Frontend.replicas", + "serializationOptions": { + "$id": "693", + "json": { + "$id": "694", + "name": "replicas" + } + } + }, + { + "$id": "695", + "kind": "property", + "name": "workers", + "serializedName": "workers", + "doc": "Number of logical frontend workers per instance (pod).", + "type": { + "$id": "696", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Frontend.workers", + "serializationOptions": { + "$id": "697", + "json": { + "$id": "698", + "name": "workers" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Cardinality.frontend", + "serializationOptions": { + "$id": "699", + "json": { + "$id": "700", + "name": "frontend" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerProperties.cardinality", + "serializationOptions": { + "$id": "701", + "json": { + "$id": "702", + "name": "cardinality" + } + } + }, + { + "$id": "703", + "kind": "property", + "name": "diagnostics", + "serializedName": "diagnostics", + "doc": "Spec defines the desired identities of Broker diagnostics settings.", + "type": { + "$id": "704", + "kind": "model", + "name": "BrokerDiagnostics", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerDiagnostics", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Broker Diagnostic Setting properties", + "decorators": [], + "properties": [ + { + "$id": "705", + "kind": "property", + "name": "logs", + "serializedName": "logs", + "doc": "Diagnostic log settings for the resource.", + "type": { + "$id": "706", + "kind": "model", + "name": "DiagnosticsLogs", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DiagnosticsLogs", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Diagnostic Log properties", + "decorators": [], + "properties": [ + { + "$id": "707", + "kind": "property", + "name": "level", + "serializedName": "level", + "doc": "The log level. Examples - 'debug', 'info', 'warn', 'error', 'trace'.", + "type": { + "$id": "708", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DiagnosticsLogs.level", + "serializationOptions": { + "$id": "709", + "json": { + "$id": "710", + "name": "level" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerDiagnostics.logs", + "serializationOptions": { + "$id": "711", + "json": { + "$id": "712", + "name": "logs" + } + } + }, + { + "$id": "713", + "kind": "property", + "name": "metrics", + "serializedName": "metrics", + "doc": "The metrics settings for the resource.", + "type": { + "$id": "714", + "kind": "model", + "name": "IotOperationsMetrics", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Metrics", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Diagnostic Metrics properties", + "decorators": [], + "properties": [ + { + "$id": "715", + "kind": "property", + "name": "prometheusPort", + "serializedName": "prometheusPort", + "doc": "The prometheus port to expose the metrics.", + "type": { + "$id": "716", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Metrics.prometheusPort", + "serializationOptions": { + "$id": "717", + "json": { + "$id": "718", + "name": "prometheusPort" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerDiagnostics.metrics", + "serializationOptions": { + "$id": "719", + "json": { + "$id": "720", + "name": "metrics" + } + } + }, + { + "$id": "721", + "kind": "property", + "name": "selfCheck", + "serializedName": "selfCheck", + "doc": "The self check properties.", + "type": { + "$id": "722", + "kind": "model", + "name": "BrokerDiagnosticSelfCheck", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.SelfCheck", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Broker Diagnostic Self check properties", + "decorators": [], + "properties": [ + { + "$id": "723", + "kind": "property", + "name": "mode", + "serializedName": "mode", + "doc": "The toggle to enable/disable self check.", + "type": { + "$ref": "38" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.SelfCheck.mode", + "serializationOptions": { + "$id": "724", + "json": { + "$id": "725", + "name": "mode" + } + } + }, + { + "$id": "726", + "kind": "property", + "name": "intervalSeconds", + "serializedName": "intervalSeconds", + "doc": "The self check interval.", + "type": { + "$id": "727", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.SelfCheck.intervalSeconds", + "serializationOptions": { + "$id": "728", + "json": { + "$id": "729", + "name": "intervalSeconds" + } + } + }, + { + "$id": "730", + "kind": "property", + "name": "timeoutSeconds", + "serializedName": "timeoutSeconds", + "doc": "The timeout for self check.", + "type": { + "$id": "731", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.SelfCheck.timeoutSeconds", + "serializationOptions": { + "$id": "732", + "json": { + "$id": "733", + "name": "timeoutSeconds" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerDiagnostics.selfCheck", + "serializationOptions": { + "$id": "734", + "json": { + "$id": "735", + "name": "selfCheck" + } + } + }, + { + "$id": "736", + "kind": "property", + "name": "traces", + "serializedName": "traces", + "doc": "The trace properties.", + "type": { + "$id": "737", + "kind": "model", + "name": "BrokerDiagnosticTraces", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Traces", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Broker Diagnostic Trace properties", + "decorators": [], + "properties": [ + { + "$id": "738", + "kind": "property", + "name": "mode", + "serializedName": "mode", + "doc": "The toggle to enable/disable traces.", + "type": { + "$ref": "38" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Traces.mode", + "serializationOptions": { + "$id": "739", + "json": { + "$id": "740", + "name": "mode" + } + } + }, + { + "$id": "741", + "kind": "property", + "name": "cacheSizeMegabytes", + "serializedName": "cacheSizeMegabytes", + "doc": "The cache size in megabytes.", + "type": { + "$id": "742", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Traces.cacheSizeMegabytes", + "serializationOptions": { + "$id": "743", + "json": { + "$id": "744", + "name": "cacheSizeMegabytes" + } + } + }, + { + "$id": "745", + "kind": "property", + "name": "selfTracing", + "serializedName": "selfTracing", + "doc": "The self tracing properties.", + "type": { + "$id": "746", + "kind": "model", + "name": "DiagnosticSelfTracing", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.SelfTracing", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Diagnostic Self tracing properties", + "decorators": [], + "properties": [ + { + "$id": "747", + "kind": "property", + "name": "mode", + "serializedName": "mode", + "doc": "The toggle to enable/disable self tracing.", + "type": { + "$ref": "38" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.SelfTracing.mode", + "serializationOptions": { + "$id": "748", + "json": { + "$id": "749", + "name": "mode" + } + } + }, + { + "$id": "750", + "kind": "property", + "name": "intervalSeconds", + "serializedName": "intervalSeconds", + "doc": "The self tracing interval.", + "type": { + "$id": "751", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.SelfTracing.intervalSeconds", + "serializationOptions": { + "$id": "752", + "json": { + "$id": "753", + "name": "intervalSeconds" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Traces.selfTracing", + "serializationOptions": { + "$id": "754", + "json": { + "$id": "755", + "name": "selfTracing" + } + } + }, + { + "$id": "756", + "kind": "property", + "name": "spanChannelCapacity", + "serializedName": "spanChannelCapacity", + "doc": "The span channel capacity.", + "type": { + "$id": "757", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Traces.spanChannelCapacity", + "serializationOptions": { + "$id": "758", + "json": { + "$id": "759", + "name": "spanChannelCapacity" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerDiagnostics.traces", + "serializationOptions": { + "$id": "760", + "json": { + "$id": "761", + "name": "traces" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerProperties.diagnostics", + "serializationOptions": { + "$id": "762", + "json": { + "$id": "763", + "name": "diagnostics" + } + } + }, + { + "$id": "764", + "kind": "property", + "name": "diskBackedMessageBuffer", + "serializedName": "diskBackedMessageBuffer", + "doc": "Settings of Disk Backed Message Buffer.", + "type": { + "$id": "765", + "kind": "model", + "name": "DiskBackedMessageBuffer", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DiskBackedMessageBuffer", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "DiskBackedMessageBuffer properties", + "decorators": [], + "properties": [ + { + "$id": "766", + "kind": "property", + "name": "maxSize", + "serializedName": "maxSize", + "doc": "The max size of the message buffer on disk. If a PVC template is specified using one of ephemeralVolumeClaimSpec or persistentVolumeClaimSpec, then this size is used as the request and limit sizes of that template. If neither ephemeralVolumeClaimSpec nor persistentVolumeClaimSpec are specified, then an emptyDir volume is mounted with this size as its limit. See for details.", + "type": { + "$id": "767", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DiskBackedMessageBuffer.maxSize", + "serializationOptions": { + "$id": "768", + "json": { + "$id": "769", + "name": "maxSize" + } + } + }, + { + "$id": "770", + "kind": "property", + "name": "ephemeralVolumeClaimSpec", + "serializedName": "ephemeralVolumeClaimSpec", + "doc": "Use the specified persistent volume claim template to mount a \"generic ephemeral volume\" for the message buffer. See for details.", + "type": { + "$id": "771", + "kind": "model", + "name": "VolumeClaimSpec", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.VolumeClaimSpec", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "VolumeClaimSpec properties", + "decorators": [], + "properties": [ + { + "$id": "772", + "kind": "property", + "name": "volumeName", + "serializedName": "volumeName", + "doc": "VolumeName is the binding reference to the PersistentVolume backing this claim.", + "type": { + "$id": "773", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.VolumeClaimSpec.volumeName", + "serializationOptions": { + "$id": "774", + "json": { + "$id": "775", + "name": "volumeName" + } + } + }, + { + "$id": "776", + "kind": "property", + "name": "volumeMode", + "serializedName": "volumeMode", + "doc": "volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec. This is a beta feature.", + "type": { + "$id": "777", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.VolumeClaimSpec.volumeMode", + "serializationOptions": { + "$id": "778", + "json": { + "$id": "779", + "name": "volumeMode" + } + } + }, + { + "$id": "780", + "kind": "property", + "name": "storageClassName", + "serializedName": "storageClassName", + "doc": "Name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1", + "type": { + "$id": "781", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.VolumeClaimSpec.storageClassName", + "serializationOptions": { + "$id": "782", + "json": { + "$id": "783", + "name": "storageClassName" + } + } + }, + { + "$id": "784", + "kind": "property", + "name": "accessModes", + "serializedName": "accessModes", + "doc": "AccessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1", + "type": { + "$id": "785", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "786", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.VolumeClaimSpec.accessModes", + "serializationOptions": { + "$id": "787", + "json": { + "$id": "788", + "name": "accessModes" + } + } + }, + { + "$id": "789", + "kind": "property", + "name": "dataSource", + "serializedName": "dataSource", + "doc": "This field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source. If the AnyVolumeDataSource feature gate is enabled, this field will always have the same contents as the DataSourceRef field.", + "type": { + "$id": "790", + "kind": "model", + "name": "LocalKubernetesReference", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.LocalKubernetesReference", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Kubernetes reference", + "decorators": [], + "properties": [ + { + "$id": "791", + "kind": "property", + "name": "apiGroup", + "serializedName": "apiGroup", + "doc": "APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required.", + "type": { + "$id": "792", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.LocalKubernetesReference.apiGroup", + "serializationOptions": { + "$id": "793", + "json": { + "$id": "794", + "name": "apiGroup" + } + } + }, + { + "$id": "795", + "kind": "property", + "name": "kind", + "serializedName": "kind", + "doc": "Kind is the type of resource being referenced", + "type": { + "$id": "796", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.LocalKubernetesReference.kind", + "serializationOptions": { + "$id": "797", + "json": { + "$id": "798", + "name": "kind" + } + } + }, + { + "$id": "799", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "Name is the name of resource being referenced", + "type": { + "$id": "800", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.LocalKubernetesReference.name", + "serializationOptions": { + "$id": "801", + "json": { + "$id": "802", + "name": "name" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.VolumeClaimSpec.dataSource", + "serializationOptions": { + "$id": "803", + "json": { + "$id": "804", + "name": "dataSource" + } + } + }, + { + "$id": "805", + "kind": "property", + "name": "dataSourceRef", + "serializedName": "dataSourceRef", + "doc": "Specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any local object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the DataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, both fields (DataSource and DataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. There are two important differences between DataSource and DataSourceRef: * While DataSource only allows two specific types of objects, DataSourceRef allows any non-core object, as well as PersistentVolumeClaim objects. * While DataSource ignores disallowed values (dropping them), DataSourceRef preserves all values, and generates an error if a disallowed value is specified. (Beta) Using this field requires the AnyVolumeDataSource feature gate to be enabled.", + "type": { + "$id": "806", + "kind": "model", + "name": "KubernetesReference", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.KubernetesReference", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Kubernetes reference", + "decorators": [], + "properties": [ + { + "$id": "807", + "kind": "property", + "name": "apiGroup", + "serializedName": "apiGroup", + "doc": "APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required.", + "type": { + "$id": "808", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.KubernetesReference.apiGroup", + "serializationOptions": { + "$id": "809", + "json": { + "$id": "810", + "name": "apiGroup" + } + } + }, + { + "$id": "811", + "kind": "property", + "name": "kind", + "serializedName": "kind", + "doc": "Kind is the type of resource being referenced", + "type": { + "$id": "812", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.KubernetesReference.kind", + "serializationOptions": { + "$id": "813", + "json": { + "$id": "814", + "name": "kind" + } + } + }, + { + "$id": "815", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "Name is the name of resource being referenced", + "type": { + "$id": "816", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.KubernetesReference.name", + "serializationOptions": { + "$id": "817", + "json": { + "$id": "818", + "name": "name" + } + } + }, + { + "$id": "819", + "kind": "property", + "name": "namespace", + "serializedName": "namespace", + "doc": "Namespace is the namespace of the resource being referenced. This field is required when the resource has a namespace.", + "type": { + "$id": "820", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.KubernetesReference.namespace", + "serializationOptions": { + "$id": "821", + "json": { + "$id": "822", + "name": "namespace" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.VolumeClaimSpec.dataSourceRef", + "serializationOptions": { + "$id": "823", + "json": { + "$id": "824", + "name": "dataSourceRef" + } + } + }, + { + "$id": "825", + "kind": "property", + "name": "resources", + "serializedName": "resources", + "doc": "Resources represents the minimum resources the volume should have. If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements that are lower than previous value but must still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources", + "type": { + "$id": "826", + "kind": "model", + "name": "VolumeClaimResourceRequirements", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.VolumeClaimResourceRequirements", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "VolumeClaimResourceRequirements properties", + "decorators": [], + "properties": [ + { + "$id": "827", + "kind": "property", + "name": "limits", + "serializedName": "limits", + "doc": "Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/", + "type": { + "$id": "828", + "kind": "dict", + "keyType": { + "$id": "829", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "830", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.VolumeClaimResourceRequirements.limits", + "serializationOptions": { + "$id": "831", + "json": { + "$id": "832", + "name": "limits" + } + } + }, + { + "$id": "833", + "kind": "property", + "name": "requests", + "serializedName": "requests", + "doc": "Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/", + "type": { + "$id": "834", + "kind": "dict", + "keyType": { + "$id": "835", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "836", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.VolumeClaimResourceRequirements.requests", + "serializationOptions": { + "$id": "837", + "json": { + "$id": "838", + "name": "requests" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.VolumeClaimSpec.resources", + "serializationOptions": { + "$id": "839", + "json": { + "$id": "840", + "name": "resources" + } + } + }, + { + "$id": "841", + "kind": "property", + "name": "selector", + "serializedName": "selector", + "doc": "A label query over volumes to consider for binding.", + "type": { + "$id": "842", + "kind": "model", + "name": "VolumeClaimSpecSelector", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.VolumeClaimSpecSelector", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "VolumeClaimSpecSelector properties", + "decorators": [], + "properties": [ + { + "$id": "843", + "kind": "property", + "name": "matchExpressions", + "serializedName": "matchExpressions", + "doc": "MatchExpressions is a list of label selector requirements. The requirements are ANDed.", + "type": { + "$id": "844", + "kind": "array", + "name": "ArrayVolumeClaimSpecSelectorMatchExpressions", + "valueType": { + "$id": "845", + "kind": "model", + "name": "VolumeClaimSpecSelectorMatchExpressions", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.VolumeClaimSpecSelectorMatchExpressions", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "VolumeClaimSpecSelectorMatchExpressions properties", + "decorators": [], + "properties": [ + { + "$id": "846", + "kind": "property", + "name": "key", + "serializedName": "key", + "doc": "key is the label key that the selector applies to.", + "type": { + "$id": "847", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.VolumeClaimSpecSelectorMatchExpressions.key", + "serializationOptions": { + "$id": "848", + "json": { + "$id": "849", + "name": "key" + } + } + }, + { + "$id": "850", + "kind": "property", + "name": "operator", + "serializedName": "operator", + "doc": "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.", + "type": { + "$ref": "104" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.VolumeClaimSpecSelectorMatchExpressions.operator", + "serializationOptions": { + "$id": "851", + "json": { + "$id": "852", + "name": "operator" + } + } + }, + { + "$id": "853", + "kind": "property", + "name": "values", + "serializedName": "values", + "doc": "values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.", + "type": { + "$id": "854", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "855", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.VolumeClaimSpecSelectorMatchExpressions.values", + "serializationOptions": { + "$id": "856", + "json": { + "$id": "857", + "name": "values" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.VolumeClaimSpecSelector.matchExpressions", + "serializationOptions": { + "$id": "858", + "json": { + "$id": "859", + "name": "matchExpressions" + } + } + }, + { + "$id": "860", + "kind": "property", + "name": "matchLabels", + "serializedName": "matchLabels", + "doc": "MatchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed.", + "type": { + "$id": "861", + "kind": "dict", + "keyType": { + "$id": "862", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "863", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.VolumeClaimSpecSelector.matchLabels", + "serializationOptions": { + "$id": "864", + "json": { + "$id": "865", + "name": "matchLabels" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.VolumeClaimSpec.selector", + "serializationOptions": { + "$id": "866", + "json": { + "$id": "867", + "name": "selector" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DiskBackedMessageBuffer.ephemeralVolumeClaimSpec", + "serializationOptions": { + "$id": "868", + "json": { + "$id": "869", + "name": "ephemeralVolumeClaimSpec" + } + } + }, + { + "$id": "870", + "kind": "property", + "name": "persistentVolumeClaimSpec", + "serializedName": "persistentVolumeClaimSpec", + "doc": "Use the specified persistent volume claim template to mount a persistent volume for the message buffer.", + "type": { + "$ref": "771" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DiskBackedMessageBuffer.persistentVolumeClaimSpec", + "serializationOptions": { + "$id": "871", + "json": { + "$id": "872", + "name": "persistentVolumeClaimSpec" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerProperties.diskBackedMessageBuffer", + "serializationOptions": { + "$id": "873", + "json": { + "$id": "874", + "name": "diskBackedMessageBuffer" + } + } + }, + { + "$id": "875", + "kind": "property", + "name": "generateResourceLimits", + "serializedName": "generateResourceLimits", + "doc": "This setting controls whether Kubernetes CPU resource limits are requested. Increasing the number of replicas or workers proportionally increases the amount of CPU resources requested. If this setting is enabled and there are insufficient CPU resources, an error will be emitted.", + "type": { + "$id": "876", + "kind": "model", + "name": "GenerateResourceLimits", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.GenerateResourceLimits", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "GenerateResourceLimits properties", + "decorators": [], + "properties": [ + { + "$id": "877", + "kind": "property", + "name": "cpu", + "serializedName": "cpu", + "doc": "The toggle to enable/disable cpu resource limits.", + "type": { + "$ref": "38" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.GenerateResourceLimits.cpu", + "serializationOptions": { + "$id": "878", + "json": { + "$id": "879", + "name": "cpu" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerProperties.generateResourceLimits", + "serializationOptions": { + "$id": "880", + "json": { + "$id": "881", + "name": "generateResourceLimits" + } + } + }, + { + "$id": "882", + "kind": "property", + "name": "memoryProfile", + "serializedName": "memoryProfile", + "doc": "Memory profile of Broker.", + "type": { + "$ref": "114" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerProperties.memoryProfile", + "serializationOptions": { + "$id": "883", + "json": { + "$id": "884", + "name": "memoryProfile" + } + } + }, + { + "$id": "885", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "The status of the last operation.", + "type": { + "$ref": "14" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerProperties.provisioningState", + "serializationOptions": { + "$id": "886", + "json": { + "$id": "887", + "name": "provisioningState" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerResource.properties", + "serializationOptions": { + "$id": "888", + "json": { + "$id": "889", + "name": "properties" + } + } + }, + { + "$id": "890", + "kind": "path", + "name": "name", + "serializedName": "name", + "doc": "Name of broker.", + "type": { + "$id": "891", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerResource.name", + "discriminator": false, + "flatten": false + }, + { + "$id": "892", + "kind": "property", + "name": "extendedLocation", + "serializedName": "extendedLocation", + "doc": "Edge location of the resource.", + "type": { + "$ref": "512" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerResource.extendedLocation", + "serializationOptions": { + "$id": "893", + "json": { + "$id": "894", + "name": "extendedLocation" + } + } + } + ] + }, + { + "$ref": "606" + }, + { + "$ref": "608" + }, + { + "$ref": "610" + }, + { + "$ref": "624" + }, + { + "$ref": "648" + }, + { + "$ref": "658" + }, + { + "$ref": "672" + }, + { + "$ref": "674" + }, + { + "$ref": "690" + }, + { + "$ref": "704" + }, + { + "$ref": "706" + }, + { + "$ref": "714" + }, + { + "$ref": "722" + }, + { + "$ref": "737" + }, + { + "$ref": "746" + }, + { + "$ref": "765" + }, + { + "$ref": "771" + }, + { + "$ref": "790" + }, + { + "$ref": "806" + }, + { + "$ref": "826" + }, + { + "$ref": "842" + }, + { + "$ref": "845" + }, + { + "$ref": "876" + }, + { + "$ref": "604" + }, + { + "$id": "895", + "kind": "model", + "name": "BrokerResourceListResult", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult", + "usage": "Output,Json", + "doc": "The response of a BrokerResource list operation.", + "decorators": [], + "properties": [ + { + "$id": "896", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The BrokerResource items on this page", + "type": { + "$id": "897", + "kind": "array", + "name": "ArrayBrokerResource", + "valueType": { + "$ref": "603" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", + "serializationOptions": { + "$id": "898", + "json": { + "$id": "899", + "name": "value" + } + } + }, + { + "$id": "900", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "901", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "902", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.nextLink", + "serializationOptions": { + "$id": "903", + "json": { + "$id": "904", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "905", + "kind": "model", + "name": "IotOperationsBrokerListener", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerListenerResource", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Instance broker resource", + "decorators": [], + "baseModel": { + "$ref": "604" + }, + "properties": [ + { + "$id": "906", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "907", + "kind": "model", + "name": "IotOperationsBrokerListenerProperties", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerListenerProperties", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Defines a Broker listener. A listener is a collection of ports on which the broker accepts connections from clients.", + "decorators": [], + "properties": [ + { + "$id": "908", + "kind": "property", + "name": "serviceName", + "serializedName": "serviceName", + "doc": "Kubernetes Service name of this listener.", + "type": { + "$id": "909", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerListenerProperties.serviceName", + "serializationOptions": { + "$id": "910", + "json": { + "$id": "911", + "name": "serviceName" + } + } + }, + { + "$id": "912", + "kind": "property", + "name": "ports", + "serializedName": "ports", + "doc": "Ports on which this listener accepts client connections.", + "type": { + "$id": "913", + "kind": "array", + "name": "ArrayListenerPort", + "valueType": { + "$id": "914", + "kind": "model", + "name": "BrokerListenerPort", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.ListenerPort", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Defines a TCP port on which a `BrokerListener` listens.", + "decorators": [], + "properties": [ + { + "$id": "915", + "kind": "property", + "name": "authenticationRef", + "serializedName": "authenticationRef", + "doc": "Reference to client authentication settings. Omit to disable authentication.", + "type": { + "$id": "916", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.ListenerPort.authenticationRef", + "serializationOptions": { + "$id": "917", + "json": { + "$id": "918", + "name": "authenticationRef" + } + } + }, + { + "$id": "919", + "kind": "property", + "name": "authorizationRef", + "serializedName": "authorizationRef", + "doc": "Reference to client authorization settings. Omit to disable authorization.", + "type": { + "$id": "920", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.ListenerPort.authorizationRef", + "serializationOptions": { + "$id": "921", + "json": { + "$id": "922", + "name": "authorizationRef" + } + } + }, + { + "$id": "923", + "kind": "property", + "name": "nodePort", + "serializedName": "nodePort", + "doc": "Kubernetes node port. Only relevant when this port is associated with a `NodePort` listener.", + "type": { + "$id": "924", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.ListenerPort.nodePort", + "serializationOptions": { + "$id": "925", + "json": { + "$id": "926", + "name": "nodePort" + } + } + }, + { + "$id": "927", + "kind": "property", + "name": "port", + "serializedName": "port", + "doc": "TCP port for accepting client connections.", + "type": { + "$id": "928", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.ListenerPort.port", + "serializationOptions": { + "$id": "929", + "json": { + "$id": "930", + "name": "port" + } + } + }, + { + "$id": "931", + "kind": "property", + "name": "protocol", + "serializedName": "protocol", + "doc": "Protocol to use for client connections.", + "type": { + "$ref": "124" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.ListenerPort.protocol", + "serializationOptions": { + "$id": "932", + "json": { + "$id": "933", + "name": "protocol" + } + } + }, + { + "$id": "934", + "kind": "property", + "name": "tls", + "serializedName": "tls", + "doc": "TLS server certificate settings for this port. Omit to disable TLS.", + "type": { + "$id": "935", + "kind": "model", + "name": "ListenerPortTlsCertMethod", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.TlsCertMethod", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Collection of different TLS types, NOTE- Enum at a time only one of them needs to be supported", + "decorators": [], + "properties": [ + { + "$id": "936", + "kind": "property", + "name": "mode", + "serializedName": "mode", + "doc": "Mode of TLS server certificate management.", + "type": { + "$ref": "130" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.TlsCertMethod.mode", + "serializationOptions": { + "$id": "937", + "json": { + "$id": "938", + "name": "mode" + } + } + }, + { + "$id": "939", + "kind": "property", + "name": "certManagerCertificateSpec", + "serializedName": "certManagerCertificateSpec", + "doc": "Option 1 - Automatic TLS server certificate management with cert-manager.", + "type": { + "$id": "940", + "kind": "model", + "name": "CertManagerCertificateSpec", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.CertManagerCertificateSpec", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Automatic TLS server certificate management with cert-manager", + "decorators": [], + "properties": [ + { + "$id": "941", + "kind": "property", + "name": "duration", + "serializedName": "duration", + "doc": "Lifetime of certificate. Must be specified using a Go time.Duration format (h|m|s). E.g. 240h for 240 hours and 45m for 45 minutes.", + "type": { + "$id": "942", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.CertManagerCertificateSpec.duration", + "serializationOptions": { + "$id": "943", + "json": { + "$id": "944", + "name": "duration" + } + } + }, + { + "$id": "945", + "kind": "property", + "name": "secretName", + "serializedName": "secretName", + "doc": "Secret for storing server certificate. Any existing data will be overwritten. This is a reference to the secret through an identifying name, not the secret itself.", + "type": { + "$id": "946", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.CertManagerCertificateSpec.secretName", + "serializationOptions": { + "$id": "947", + "json": { + "$id": "948", + "name": "secretName" + } + } + }, + { + "$id": "949", + "kind": "property", + "name": "renewBefore", + "serializedName": "renewBefore", + "doc": "When to begin renewing certificate. Must be specified using a Go time.Duration format (h|m|s). E.g. 240h for 240 hours and 45m for 45 minutes.", + "type": { + "$id": "950", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.CertManagerCertificateSpec.renewBefore", + "serializationOptions": { + "$id": "951", + "json": { + "$id": "952", + "name": "renewBefore" + } + } + }, + { + "$id": "953", + "kind": "property", + "name": "issuerRef", + "serializedName": "issuerRef", + "doc": "cert-manager issuerRef.", + "type": { + "$id": "954", + "kind": "model", + "name": "CertManagerIssuerRef", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.CertManagerIssuerRef", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Cert-Manager issuerRef properties", + "decorators": [], + "properties": [ + { + "$id": "955", + "kind": "property", + "name": "group", + "serializedName": "group", + "doc": "group of issuer.", + "type": { + "$id": "956", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.CertManagerIssuerRef.group", + "serializationOptions": { + "$id": "957", + "json": { + "$id": "958", + "name": "group" + } + } + }, + { + "$id": "959", + "kind": "property", + "name": "kind", + "serializedName": "kind", + "doc": "kind of issuer (Issuer or ClusterIssuer).", + "type": { + "$ref": "136" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.CertManagerIssuerRef.kind", + "serializationOptions": { + "$id": "960", + "json": { + "$id": "961", + "name": "kind" + } + } + }, + { + "$id": "962", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "name of issuer.", + "type": { + "$id": "963", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.CertManagerIssuerRef.name", + "serializationOptions": { + "$id": "964", + "json": { + "$id": "965", + "name": "name" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.CertManagerCertificateSpec.issuerRef", + "serializationOptions": { + "$id": "966", + "json": { + "$id": "967", + "name": "issuerRef" + } + } + }, + { + "$id": "968", + "kind": "property", + "name": "privateKey", + "serializedName": "privateKey", + "doc": "Type of certificate private key.", + "type": { + "$ref": "658" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.CertManagerCertificateSpec.privateKey", + "serializationOptions": { + "$id": "969", + "json": { + "$id": "970", + "name": "privateKey" + } + } + }, + { + "$id": "971", + "kind": "property", + "name": "san", + "serializedName": "san", + "doc": "Additional Subject Alternative Names (SANs) to include in the certificate.", + "type": { + "$id": "972", + "kind": "model", + "name": "SanForCert", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.SanForCert", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Subject Alternative Names (SANs) for certificate.", + "decorators": [], + "properties": [ + { + "$id": "973", + "kind": "property", + "name": "dns", + "serializedName": "dns", + "doc": "DNS SANs.", + "type": { + "$id": "974", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "975", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.SanForCert.dns", + "serializationOptions": { + "$id": "976", + "json": { + "$id": "977", + "name": "dns" + } + } + }, + { + "$id": "978", + "kind": "property", + "name": "ip", + "serializedName": "ip", + "doc": "IP address SANs.", + "type": { + "$id": "979", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "980", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.SanForCert.ip", + "serializationOptions": { + "$id": "981", + "json": { + "$id": "982", + "name": "ip" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.CertManagerCertificateSpec.san", + "serializationOptions": { + "$id": "983", + "json": { + "$id": "984", + "name": "san" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.TlsCertMethod.certManagerCertificateSpec", + "serializationOptions": { + "$id": "985", + "json": { + "$id": "986", + "name": "certManagerCertificateSpec" + } + } + }, + { + "$id": "987", + "kind": "property", + "name": "manual", + "serializedName": "manual", + "doc": "Option 2 - Manual TLS server certificate management through a defined secret.", + "type": { + "$id": "988", + "kind": "model", + "name": "X509ManualCertificate", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.X509ManualCertificate", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "X509 Certificate Authentication properties.", + "decorators": [], + "properties": [ + { + "$id": "989", + "kind": "property", + "name": "secretRef", + "serializedName": "secretRef", + "doc": "Kubernetes secret containing an X.509 client certificate. This is a reference to the secret through an identifying name, not the secret itself.", + "type": { + "$id": "990", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.X509ManualCertificate.secretRef", + "serializationOptions": { + "$id": "991", + "json": { + "$id": "992", + "name": "secretRef" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.TlsCertMethod.manual", + "serializationOptions": { + "$id": "993", + "json": { + "$id": "994", + "name": "manual" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.ListenerPort.tls", + "serializationOptions": { + "$id": "995", + "json": { + "$id": "996", + "name": "tls" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerListenerProperties.ports", + "serializationOptions": { + "$id": "997", + "json": { + "$id": "998", + "name": "ports" + } + } + }, + { + "$id": "999", + "kind": "property", + "name": "serviceType", + "serializedName": "serviceType", + "doc": "Kubernetes Service type of this listener.", + "type": { + "$ref": "142" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerListenerProperties.serviceType", + "serializationOptions": { + "$id": "1000", + "json": { + "$id": "1001", + "name": "serviceType" + } + } + }, + { + "$id": "1002", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "The status of the last operation.", + "type": { + "$ref": "14" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerListenerProperties.provisioningState", + "serializationOptions": { + "$id": "1003", + "json": { + "$id": "1004", + "name": "provisioningState" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerListenerResource.properties", + "serializationOptions": { + "$id": "1005", + "json": { + "$id": "1006", + "name": "properties" + } + } + }, + { + "$id": "1007", + "kind": "path", + "name": "name", + "serializedName": "name", + "doc": "Name of Instance broker listener resource", + "type": { + "$id": "1008", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerListenerResource.name", + "discriminator": false, + "flatten": false + }, + { + "$id": "1009", + "kind": "property", + "name": "extendedLocation", + "serializedName": "extendedLocation", + "doc": "Edge location of the resource.", + "type": { + "$ref": "512" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerListenerResource.extendedLocation", + "serializationOptions": { + "$id": "1010", + "json": { + "$id": "1011", + "name": "extendedLocation" + } + } + } + ] + }, + { + "$ref": "907" + }, + { + "$ref": "914" + }, + { + "$ref": "935" + }, + { + "$ref": "940" + }, + { + "$ref": "954" + }, + { + "$ref": "972" + }, + { + "$ref": "988" + }, + { + "$id": "1012", + "kind": "model", + "name": "BrokerListenerResourceListResult", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult", + "usage": "Output,Json", + "doc": "The response of a BrokerListenerResource list operation.", + "decorators": [], + "properties": [ + { + "$id": "1013", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The BrokerListenerResource items on this page", + "type": { + "$id": "1014", + "kind": "array", + "name": "ArrayBrokerListenerResource", + "valueType": { + "$ref": "905" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", + "serializationOptions": { + "$id": "1015", + "json": { + "$id": "1016", + "name": "value" + } + } + }, + { + "$id": "1017", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "1018", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "1019", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.nextLink", + "serializationOptions": { + "$id": "1020", + "json": { + "$id": "1021", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "1022", + "kind": "model", + "name": "IotOperationsBrokerAuthentication", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthenticationResource", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Instance broker authentication resource", + "decorators": [], + "baseModel": { + "$ref": "604" + }, + "properties": [ + { + "$id": "1023", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "1024", + "kind": "model", + "name": "IotOperationsBrokerAuthenticationProperties", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthenticationProperties", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "BrokerAuthentication Resource properties", + "decorators": [], + "properties": [ + { + "$id": "1025", + "kind": "property", + "name": "authenticationMethods", + "serializedName": "authenticationMethods", + "doc": "Defines a set of Broker authentication methods to be used on `BrokerListeners`. For each array element one authenticator type supported.", + "type": { + "$id": "1026", + "kind": "array", + "name": "ArrayBrokerAuthenticatorMethods", + "valueType": { + "$id": "1027", + "kind": "model", + "name": "BrokerAuthenticatorMethods", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthenticatorMethods", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Set of broker authentication policies. Only one method is supported for each entry.", + "decorators": [], + "properties": [ + { + "$id": "1028", + "kind": "property", + "name": "method", + "serializedName": "method", + "doc": "Custom authentication configuration.", + "type": { + "$ref": "150" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthenticatorMethods.method", + "serializationOptions": { + "$id": "1029", + "json": { + "$id": "1030", + "name": "method" + } + } + }, + { + "$id": "1031", + "kind": "property", + "name": "customSettings", + "serializedName": "customSettings", + "doc": "Custom authentication configuration.", + "type": { + "$id": "1032", + "kind": "model", + "name": "BrokerAuthenticatorMethodCustom", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthenticatorMethodCustom", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Custom method for BrokerAuthentication", + "decorators": [], + "properties": [ + { + "$id": "1033", + "kind": "property", + "name": "auth", + "serializedName": "auth", + "doc": "Optional authentication needed for authenticating with the custom authentication server.", + "type": { + "$id": "1034", + "kind": "model", + "name": "BrokerAuthenticatorCustomAuth", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthenticatorCustomAuth", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Custom Authentication properties", + "decorators": [], + "properties": [ + { + "$id": "1035", + "kind": "property", + "name": "x509", + "serializedName": "x509", + "doc": "X509 Custom Auth type details.", + "type": { + "$ref": "988" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthenticatorCustomAuth.x509", + "serializationOptions": { + "$id": "1036", + "json": { + "$id": "1037", + "name": "x509" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthenticatorMethodCustom.auth", + "serializationOptions": { + "$id": "1038", + "json": { + "$id": "1039", + "name": "auth" + } + } + }, + { + "$id": "1040", + "kind": "property", + "name": "caCertConfigMap", + "serializedName": "caCertConfigMap", + "doc": "Optional CA certificate for validating the custom authentication server's certificate.", + "type": { + "$id": "1041", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthenticatorMethodCustom.caCertConfigMap", + "serializationOptions": { + "$id": "1042", + "json": { + "$id": "1043", + "name": "caCertConfigMap" + } + } + }, + { + "$id": "1044", + "kind": "property", + "name": "endpoint", + "serializedName": "endpoint", + "doc": "Endpoint of the custom authentication server. Must be an HTTPS endpoint.", + "type": { + "$id": "1045", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthenticatorMethodCustom.endpoint", + "serializationOptions": { + "$id": "1046", + "json": { + "$id": "1047", + "name": "endpoint" + } + } + }, + { + "$id": "1048", + "kind": "property", + "name": "headers", + "serializedName": "headers", + "doc": "Additional HTTP headers to pass to the custom authentication server.", + "type": { + "$id": "1049", + "kind": "dict", + "keyType": { + "$id": "1050", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1051", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthenticatorMethodCustom.headers", + "serializationOptions": { + "$id": "1052", + "json": { + "$id": "1053", + "name": "headers" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthenticatorMethods.customSettings", + "serializationOptions": { + "$id": "1054", + "json": { + "$id": "1055", + "name": "customSettings" + } + } + }, + { + "$id": "1056", + "kind": "property", + "name": "serviceAccountTokenSettings", + "serializedName": "serviceAccountTokenSettings", + "doc": "ServiceAccountToken authentication configuration.", + "type": { + "$id": "1057", + "kind": "model", + "name": "BrokerAuthenticatorMethodSat", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthenticatorMethodSat", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Service Account Token for BrokerAuthentication", + "decorators": [], + "properties": [ + { + "$id": "1058", + "kind": "property", + "name": "audiences", + "serializedName": "audiences", + "doc": "List of allowed audience.", + "type": { + "$id": "1059", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1060", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthenticatorMethodSat.audiences", + "serializationOptions": { + "$id": "1061", + "json": { + "$id": "1062", + "name": "audiences" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthenticatorMethods.serviceAccountTokenSettings", + "serializationOptions": { + "$id": "1063", + "json": { + "$id": "1064", + "name": "serviceAccountTokenSettings" + } + } + }, + { + "$id": "1065", + "kind": "property", + "name": "x509Settings", + "serializedName": "x509Settings", + "doc": "X.509 authentication configuration.", + "type": { + "$id": "1066", + "kind": "model", + "name": "BrokerAuthenticatorMethodX509", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthenticatorMethodX509", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "X509 for BrokerAuthentication.", + "decorators": [], + "properties": [ + { + "$id": "1067", + "kind": "property", + "name": "authorizationAttributes", + "serializedName": "authorizationAttributes", + "doc": "X509 authorization attributes properties.", + "type": { + "$id": "1068", + "kind": "dict", + "keyType": { + "$id": "1069", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1070", + "kind": "model", + "name": "BrokerAuthenticatorMethodX509Attributes", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthenticatorMethodX509Attributes", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "BrokerAuthenticatorMethodX509Attributes properties.", + "decorators": [], + "properties": [ + { + "$id": "1071", + "kind": "property", + "name": "attributes", + "serializedName": "attributes", + "doc": "Attributes object.", + "type": { + "$id": "1072", + "kind": "dict", + "keyType": { + "$id": "1073", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1074", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthenticatorMethodX509Attributes.attributes", + "serializationOptions": { + "$id": "1075", + "json": { + "$id": "1076", + "name": "attributes" + } + } + }, + { + "$id": "1077", + "kind": "property", + "name": "subject", + "serializedName": "subject", + "doc": "Subject of the X509 attribute.", + "type": { + "$id": "1078", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthenticatorMethodX509Attributes.subject", + "serializationOptions": { + "$id": "1079", + "json": { + "$id": "1080", + "name": "subject" + } + } + } + ] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthenticatorMethodX509.authorizationAttributes", + "serializationOptions": { + "$id": "1081", + "json": { + "$id": "1082", + "name": "authorizationAttributes" + } + } + }, + { + "$id": "1083", + "kind": "property", + "name": "trustedClientCaCert", + "serializedName": "trustedClientCaCert", + "doc": "Name of the trusted client ca cert resource.", + "type": { + "$id": "1084", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthenticatorMethodX509.trustedClientCaCert", + "serializationOptions": { + "$id": "1085", + "json": { + "$id": "1086", + "name": "trustedClientCaCert" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthenticatorMethods.x509Settings", + "serializationOptions": { + "$id": "1087", + "json": { + "$id": "1088", + "name": "x509Settings" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthenticationProperties.authenticationMethods", + "serializationOptions": { + "$id": "1089", + "json": { + "$id": "1090", + "name": "authenticationMethods" + } + } + }, + { + "$id": "1091", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "The status of the last operation.", + "type": { + "$ref": "14" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthenticationProperties.provisioningState", + "serializationOptions": { + "$id": "1092", + "json": { + "$id": "1093", + "name": "provisioningState" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthenticationResource.properties", + "serializationOptions": { + "$id": "1094", + "json": { + "$id": "1095", + "name": "properties" + } + } + }, + { + "$id": "1096", + "kind": "path", + "name": "name", + "serializedName": "name", + "doc": "Name of Instance broker authentication resource", + "type": { + "$id": "1097", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthenticationResource.name", + "discriminator": false, + "flatten": false + }, + { + "$id": "1098", + "kind": "property", + "name": "extendedLocation", + "serializedName": "extendedLocation", + "doc": "Edge location of the resource.", + "type": { + "$ref": "512" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthenticationResource.extendedLocation", + "serializationOptions": { + "$id": "1099", + "json": { + "$id": "1100", + "name": "extendedLocation" + } + } + } + ] + }, + { + "$ref": "1024" + }, + { + "$ref": "1027" + }, + { + "$ref": "1032" + }, + { + "$ref": "1034" + }, + { + "$ref": "1057" + }, + { + "$ref": "1066" + }, + { + "$ref": "1070" + }, + { + "$id": "1101", + "kind": "model", + "name": "BrokerAuthenticationResourceListResult", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult", + "usage": "Output,Json", + "doc": "The response of a BrokerAuthenticationResource list operation.", + "decorators": [], + "properties": [ + { + "$id": "1102", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The BrokerAuthenticationResource items on this page", + "type": { + "$id": "1103", + "kind": "array", + "name": "ArrayBrokerAuthenticationResource", + "valueType": { + "$ref": "1022" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", + "serializationOptions": { + "$id": "1104", + "json": { + "$id": "1105", + "name": "value" + } + } + }, + { + "$id": "1106", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "1107", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "1108", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.nextLink", + "serializationOptions": { + "$id": "1109", + "json": { + "$id": "1110", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "1111", + "kind": "model", + "name": "IotOperationsBrokerAuthorization", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthorizationResource", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Instance broker authorizations resource", + "decorators": [], + "baseModel": { + "$ref": "604" + }, + "properties": [ + { + "$id": "1112", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "1113", + "kind": "model", + "name": "IotOperationsBrokerAuthorizationProperties", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthorizationProperties", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "BrokerAuthorization Resource properties", + "decorators": [], + "properties": [ + { + "$id": "1114", + "kind": "property", + "name": "authorizationPolicies", + "serializedName": "authorizationPolicies", + "doc": "The list of authorization policies supported by the Authorization Resource.", + "type": { + "$id": "1115", + "kind": "model", + "name": "BrokerAuthorizationConfig", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.AuthorizationConfig", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Broker AuthorizationConfig properties", + "decorators": [], + "properties": [ + { + "$id": "1116", + "kind": "property", + "name": "cache", + "serializedName": "cache", + "doc": "Enable caching of the authorization rules.", + "type": { + "$ref": "38" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.AuthorizationConfig.cache", + "serializationOptions": { + "$id": "1117", + "json": { + "$id": "1118", + "name": "cache" + } + } + }, + { + "$id": "1119", + "kind": "property", + "name": "rules", + "serializedName": "rules", + "doc": "The authorization rules to follow. If no rule is set, but Authorization Resource is used that would mean DenyAll.", + "type": { + "$id": "1120", + "kind": "array", + "name": "ArrayAuthorizationRule", + "valueType": { + "$id": "1121", + "kind": "model", + "name": "BrokerAuthorizationRule", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.AuthorizationRule", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "AuthorizationConfig Rule Properties", + "decorators": [], + "properties": [ + { + "$id": "1122", + "kind": "property", + "name": "brokerResources", + "serializedName": "brokerResources", + "doc": "Give access to Broker methods and topics.", + "type": { + "$id": "1123", + "kind": "array", + "name": "ArrayBrokerResourceRule", + "valueType": { + "$id": "1124", + "kind": "model", + "name": "BrokerResourceRule", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerResourceRule", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Broker Resource Rule properties. This defines the objects that represent the actions or topics, such as - method.Connect, method.Publish, etc.", + "decorators": [], + "properties": [ + { + "$id": "1125", + "kind": "property", + "name": "method", + "serializedName": "method", + "doc": "Give access for a Broker method (i.e., Connect, Subscribe, or Publish).", + "type": { + "$ref": "158" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerResourceRule.method", + "serializationOptions": { + "$id": "1126", + "json": { + "$id": "1127", + "name": "method" + } + } + }, + { + "$id": "1128", + "kind": "property", + "name": "clientIds", + "serializedName": "clientIds", + "doc": "A list of client IDs that match the clients. The client IDs are case-sensitive and must match the client IDs provided by the clients during connection. This subfield may be set if the method is Connect.", + "type": { + "$id": "1129", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1130", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerResourceRule.clientIds", + "serializationOptions": { + "$id": "1131", + "json": { + "$id": "1132", + "name": "clientIds" + } + } + }, + { + "$id": "1133", + "kind": "property", + "name": "topics", + "serializedName": "topics", + "doc": "A list of topics or topic patterns that match the topics that the clients can publish or subscribe to. This subfield is required if the method is Publish or Subscribe.", + "type": { + "$id": "1134", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1135", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerResourceRule.topics", + "serializationOptions": { + "$id": "1136", + "json": { + "$id": "1137", + "name": "topics" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.AuthorizationRule.brokerResources", + "serializationOptions": { + "$id": "1138", + "json": { + "$id": "1139", + "name": "brokerResources" + } + } + }, + { + "$id": "1140", + "kind": "property", + "name": "principals", + "serializedName": "principals", + "doc": "Give access to clients based on the following properties.", + "type": { + "$id": "1141", + "kind": "model", + "name": "PrincipalConfig", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.PrincipalDefinition", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "PrincipalDefinition properties of Rule", + "decorators": [], + "properties": [ + { + "$id": "1142", + "kind": "property", + "name": "attributes", + "serializedName": "attributes", + "doc": "A list of key-value pairs that match the attributes of the clients. The attributes are case-sensitive and must match the attributes provided by the clients during authentication.", + "type": { + "$id": "1143", + "kind": "array", + "name": "ArrayRecord", + "valueType": { + "$id": "1144", + "kind": "dict", + "keyType": { + "$id": "1145", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1146", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.PrincipalDefinition.attributes", + "serializationOptions": { + "$id": "1147", + "json": { + "$id": "1148", + "name": "attributes" + } + } + }, + { + "$id": "1149", + "kind": "property", + "name": "clientIds", + "serializedName": "clientIds", + "doc": "A list of client IDs that match the clients. The client IDs are case-sensitive and must match the client IDs provided by the clients during connection.", + "type": { + "$id": "1150", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1151", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.PrincipalDefinition.clientIds", + "serializationOptions": { + "$id": "1152", + "json": { + "$id": "1153", + "name": "clientIds" + } + } + }, + { + "$id": "1154", + "kind": "property", + "name": "usernames", + "serializedName": "usernames", + "doc": "A list of usernames that match the clients. The usernames are case-sensitive and must match the usernames provided by the clients during authentication.", + "type": { + "$id": "1155", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1156", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.PrincipalDefinition.usernames", + "serializationOptions": { + "$id": "1157", + "json": { + "$id": "1158", + "name": "usernames" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.AuthorizationRule.principals", + "serializationOptions": { + "$id": "1159", + "json": { + "$id": "1160", + "name": "principals" + } + } + }, + { + "$id": "1161", + "kind": "property", + "name": "stateStoreResources", + "serializedName": "stateStoreResources", + "doc": "Give access to state store resources.", + "type": { + "$id": "1162", + "kind": "array", + "name": "ArrayStateStoreResourceRule", + "valueType": { + "$id": "1163", + "kind": "model", + "name": "StateStoreResourceRule", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.StateStoreResourceRule", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "State Store Resource Rule properties.", + "decorators": [], + "properties": [ + { + "$id": "1164", + "kind": "property", + "name": "keyType", + "serializedName": "keyType", + "doc": "Allowed keyTypes pattern, string, binary. The key type used for matching, for example pattern tries to match the key to a glob-style pattern and string checks key is equal to value provided in keys.", + "type": { + "$ref": "166" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.StateStoreResourceRule.keyType", + "serializationOptions": { + "$id": "1165", + "json": { + "$id": "1166", + "name": "keyType" + } + } + }, + { + "$id": "1167", + "kind": "property", + "name": "keys", + "serializedName": "keys", + "doc": "Give access to state store keys for the corresponding principals defined. When key type is pattern set glob-style pattern (e.g., '*', 'clients/*').", + "type": { + "$id": "1168", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1169", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.StateStoreResourceRule.keys", + "serializationOptions": { + "$id": "1170", + "json": { + "$id": "1171", + "name": "keys" + } + } + }, + { + "$id": "1172", + "kind": "property", + "name": "method", + "serializedName": "method", + "doc": "Give access for `Read`, `Write` and `ReadWrite` access level.", + "type": { + "$ref": "174" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.StateStoreResourceRule.method", + "serializationOptions": { + "$id": "1173", + "json": { + "$id": "1174", + "name": "method" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.AuthorizationRule.stateStoreResources", + "serializationOptions": { + "$id": "1175", + "json": { + "$id": "1176", + "name": "stateStoreResources" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.AuthorizationConfig.rules", + "serializationOptions": { + "$id": "1177", + "json": { + "$id": "1178", + "name": "rules" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthorizationProperties.authorizationPolicies", + "serializationOptions": { + "$id": "1179", + "json": { + "$id": "1180", + "name": "authorizationPolicies" + } + } + }, + { + "$id": "1181", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "The status of the last operation.", + "type": { + "$ref": "14" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthorizationProperties.provisioningState", + "serializationOptions": { + "$id": "1182", + "json": { + "$id": "1183", + "name": "provisioningState" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthorizationResource.properties", + "serializationOptions": { + "$id": "1184", + "json": { + "$id": "1185", + "name": "properties" + } + } + }, + { + "$id": "1186", + "kind": "path", + "name": "name", + "serializedName": "name", + "doc": "Name of Instance broker authorization resource", + "type": { + "$id": "1187", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthorizationResource.name", + "discriminator": false, + "flatten": false + }, + { + "$id": "1188", + "kind": "property", + "name": "extendedLocation", + "serializedName": "extendedLocation", + "doc": "Edge location of the resource.", + "type": { + "$ref": "512" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthorizationResource.extendedLocation", + "serializationOptions": { + "$id": "1189", + "json": { + "$id": "1190", + "name": "extendedLocation" + } + } + } + ] + }, + { + "$ref": "1113" + }, + { + "$ref": "1115" + }, + { + "$ref": "1121" + }, + { + "$ref": "1124" + }, + { + "$ref": "1141" + }, + { + "$ref": "1163" + }, + { + "$id": "1191", + "kind": "model", + "name": "BrokerAuthorizationResourceListResult", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult", + "usage": "Output,Json", + "doc": "The response of a BrokerAuthorizationResource list operation.", + "decorators": [], + "properties": [ + { + "$id": "1192", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The BrokerAuthorizationResource items on this page", + "type": { + "$id": "1193", + "kind": "array", + "name": "ArrayBrokerAuthorizationResource", + "valueType": { + "$ref": "1111" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", + "serializationOptions": { + "$id": "1194", + "json": { + "$id": "1195", + "name": "value" + } + } + }, + { + "$id": "1196", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "1197", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "1198", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.nextLink", + "serializationOptions": { + "$id": "1199", + "json": { + "$id": "1200", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "1201", + "kind": "model", + "name": "IotOperationsDataflowProfile", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowProfileResource", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Instance dataflowProfile resource", + "decorators": [], + "baseModel": { + "$ref": "604" + }, + "properties": [ + { + "$id": "1202", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "1203", + "kind": "model", + "name": "IotOperationsDataflowProfileProperties", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowProfileProperties", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "DataflowProfile Resource properties", + "decorators": [], + "properties": [ + { + "$id": "1204", + "kind": "property", + "name": "diagnostics", + "serializedName": "diagnostics", + "doc": "Spec defines the desired identities of NBC diagnostics settings.", + "type": { + "$id": "1205", + "kind": "model", + "name": "DataflowProfileDiagnostics", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.ProfileDiagnostics", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "DataflowProfile Diagnostics properties", + "decorators": [], + "properties": [ + { + "$id": "1206", + "kind": "property", + "name": "logs", + "serializedName": "logs", + "doc": "Diagnostic log settings for the resource.", + "type": { + "$ref": "706" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.ProfileDiagnostics.logs", + "serializationOptions": { + "$id": "1207", + "json": { + "$id": "1208", + "name": "logs" + } + } + }, + { + "$id": "1209", + "kind": "property", + "name": "metrics", + "serializedName": "metrics", + "doc": "The metrics settings for the resource.", + "type": { + "$ref": "714" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.ProfileDiagnostics.metrics", + "serializationOptions": { + "$id": "1210", + "json": { + "$id": "1211", + "name": "metrics" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowProfileProperties.diagnostics", + "serializationOptions": { + "$id": "1212", + "json": { + "$id": "1213", + "name": "diagnostics" + } + } + }, + { + "$id": "1214", + "kind": "property", + "name": "instanceCount", + "serializedName": "instanceCount", + "doc": "To manually scale the dataflow profile, specify the maximum number of instances you want to run.", + "type": { + "$id": "1215", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowProfileProperties.instanceCount", + "serializationOptions": { + "$id": "1216", + "json": { + "$id": "1217", + "name": "instanceCount" + } + } + }, + { + "$id": "1218", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "The status of the last operation.", + "type": { + "$ref": "14" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowProfileProperties.provisioningState", + "serializationOptions": { + "$id": "1219", + "json": { + "$id": "1220", + "name": "provisioningState" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowProfileResource.properties", + "serializationOptions": { + "$id": "1221", + "json": { + "$id": "1222", + "name": "properties" + } + } + }, + { + "$id": "1223", + "kind": "path", + "name": "name", + "serializedName": "name", + "doc": "Name of Instance dataflowProfile resource", + "type": { + "$id": "1224", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowProfileResource.name", + "discriminator": false, + "flatten": false + }, + { + "$id": "1225", + "kind": "property", + "name": "extendedLocation", + "serializedName": "extendedLocation", + "doc": "Edge location of the resource.", + "type": { + "$ref": "512" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowProfileResource.extendedLocation", + "serializationOptions": { + "$id": "1226", + "json": { + "$id": "1227", + "name": "extendedLocation" + } + } + } + ] + }, + { + "$ref": "1203" + }, + { + "$ref": "1205" + }, + { + "$id": "1228", + "kind": "model", + "name": "DataflowProfileResourceListResult", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult", + "usage": "Output,Json", + "doc": "The response of a DataflowProfileResource list operation.", + "decorators": [], + "properties": [ + { + "$id": "1229", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The DataflowProfileResource items on this page", + "type": { + "$id": "1230", + "kind": "array", + "name": "ArrayDataflowProfileResource", + "valueType": { + "$ref": "1201" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", + "serializationOptions": { + "$id": "1231", + "json": { + "$id": "1232", + "name": "value" + } + } + }, + { + "$id": "1233", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "1234", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "1235", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.nextLink", + "serializationOptions": { + "$id": "1236", + "json": { + "$id": "1237", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "1238", + "kind": "model", + "name": "IotOperationsDataflow", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowResource", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Instance dataflowProfile dataflow resource", + "decorators": [], + "baseModel": { + "$ref": "604" + }, + "properties": [ + { + "$id": "1239", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "1240", + "kind": "model", + "name": "IotOperationsDataflowProperties", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowProperties", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Dataflow Resource properties", + "decorators": [], + "properties": [ + { + "$id": "1241", + "kind": "property", + "name": "mode", + "serializedName": "mode", + "doc": "Mode for Dataflow. Optional; defaults to Enabled.", + "type": { + "$ref": "38" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowProperties.mode", + "serializationOptions": { + "$id": "1242", + "json": { + "$id": "1243", + "name": "mode" + } + } + }, + { + "$id": "1244", + "kind": "property", + "name": "operations", + "serializedName": "operations", + "doc": "List of operations including source and destination references as well as transformation.", + "type": { + "$id": "1245", + "kind": "array", + "name": "ArrayDataflowOperation", + "valueType": { + "$id": "1246", + "kind": "model", + "name": "DataflowOperationProperties", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowOperation", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Dataflow Operation properties. NOTE - One only method is allowed to be used for one entry.", + "decorators": [], + "properties": [ + { + "$id": "1247", + "kind": "property", + "name": "operationType", + "serializedName": "operationType", + "doc": "Type of operation.", + "type": { + "$ref": "182" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowOperation.operationType", + "serializationOptions": { + "$id": "1248", + "json": { + "$id": "1249", + "name": "operationType" + } + } + }, + { + "$id": "1250", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "Optional user provided name of the transformation.", + "type": { + "$id": "1251", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowOperation.name", + "serializationOptions": { + "$id": "1252", + "json": { + "$id": "1253", + "name": "name" + } + } + }, + { + "$id": "1254", + "kind": "property", + "name": "sourceSettings", + "serializedName": "sourceSettings", + "doc": "Source configuration.", + "type": { + "$id": "1255", + "kind": "model", + "name": "DataflowSourceOperationSettings", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowSourceOperationSettings", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Dataflow Source Operation properties", + "decorators": [], + "properties": [ + { + "$id": "1256", + "kind": "property", + "name": "endpointRef", + "serializedName": "endpointRef", + "doc": "Reference to the Dataflow Endpoint resource. Can only be of Broker and Kafka type.", + "type": { + "$id": "1257", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowSourceOperationSettings.endpointRef", + "serializationOptions": { + "$id": "1258", + "json": { + "$id": "1259", + "name": "endpointRef" + } + } + }, + { + "$id": "1260", + "kind": "property", + "name": "assetRef", + "serializedName": "assetRef", + "doc": "Reference to the resource in Azure Device Registry where the data in the endpoint originates from.", + "type": { + "$id": "1261", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowSourceOperationSettings.assetRef", + "serializationOptions": { + "$id": "1262", + "json": { + "$id": "1263", + "name": "assetRef" + } + } + }, + { + "$id": "1264", + "kind": "property", + "name": "serializationFormat", + "serializedName": "serializationFormat", + "doc": "Content is a JSON Schema. Allowed: JSON Schema/draft-7.", + "type": { + "$ref": "190" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowSourceOperationSettings.serializationFormat", + "serializationOptions": { + "$id": "1265", + "json": { + "$id": "1266", + "name": "serializationFormat" + } + } + }, + { + "$id": "1267", + "kind": "property", + "name": "schemaRef", + "serializedName": "schemaRef", + "doc": "Schema CR reference. Data will be deserialized according to the schema, and dropped if it doesn't match.", + "type": { + "$id": "1268", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowSourceOperationSettings.schemaRef", + "serializationOptions": { + "$id": "1269", + "json": { + "$id": "1270", + "name": "schemaRef" + } + } + }, + { + "$id": "1271", + "kind": "property", + "name": "dataSources", + "serializedName": "dataSources", + "doc": "List of source locations. Can be Broker or Kafka topics. Supports wildcards # and +.", + "type": { + "$id": "1272", + "kind": "array", + "name": "Array1", + "valueType": { + "$id": "1273", + "kind": "string", + "name": "NonEmptyString", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.NonEmptyString", + "baseType": { + "$id": "1274", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowSourceOperationSettings.dataSources", + "serializationOptions": { + "$id": "1275", + "json": { + "$id": "1276", + "name": "dataSources" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowOperation.sourceSettings", + "serializationOptions": { + "$id": "1277", + "json": { + "$id": "1278", + "name": "sourceSettings" + } + } + }, + { + "$id": "1279", + "kind": "property", + "name": "builtInTransformationSettings", + "serializedName": "builtInTransformationSettings", + "doc": "Built In Transformation configuration.", + "type": { + "$id": "1280", + "kind": "model", + "name": "DataflowBuiltInTransformationSettings", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowBuiltInTransformationSettings", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Dataflow BuiltIn Transformation properties", + "decorators": [], + "properties": [ + { + "$id": "1281", + "kind": "property", + "name": "serializationFormat", + "serializedName": "serializationFormat", + "doc": "Serialization format. Optional; defaults to JSON. Allowed value JSON Schema/draft-7, Parquet. Default: Json", + "type": { + "$ref": "194" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowBuiltInTransformationSettings.serializationFormat", + "serializationOptions": { + "$id": "1282", + "json": { + "$id": "1283", + "name": "serializationFormat" + } + } + }, + { + "$id": "1284", + "kind": "property", + "name": "schemaRef", + "serializedName": "schemaRef", + "doc": "Reference to the schema that describes the output of the transformation.", + "type": { + "$id": "1285", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowBuiltInTransformationSettings.schemaRef", + "serializationOptions": { + "$id": "1286", + "json": { + "$id": "1287", + "name": "schemaRef" + } + } + }, + { + "$id": "1288", + "kind": "property", + "name": "datasets", + "serializedName": "datasets", + "doc": "Enrich data from Broker State Store. Dataset references a key in Broker State Store.", + "type": { + "$id": "1289", + "kind": "array", + "name": "ArrayDataflowBuiltInTransformationDataset", + "valueType": { + "$id": "1290", + "kind": "model", + "name": "DataflowBuiltInTransformationDataset", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowBuiltInTransformationDataset", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Dataflow BuiltIn Transformation dataset properties", + "decorators": [], + "properties": [ + { + "$id": "1291", + "kind": "property", + "name": "key", + "serializedName": "key", + "doc": "The key of the dataset.", + "type": { + "$id": "1292", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowBuiltInTransformationDataset.key", + "serializationOptions": { + "$id": "1293", + "json": { + "$id": "1294", + "name": "key" + } + } + }, + { + "$id": "1295", + "kind": "property", + "name": "description", + "serializedName": "description", + "doc": "A user provided optional description of the dataset.", + "type": { + "$id": "1296", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowBuiltInTransformationDataset.description", + "serializationOptions": { + "$id": "1297", + "json": { + "$id": "1298", + "name": "description" + } + } + }, + { + "$id": "1299", + "kind": "property", + "name": "schemaRef", + "serializedName": "schemaRef", + "doc": "The reference to the schema that describes the dataset. Allowed: JSON Schema/draft-7.", + "type": { + "$id": "1300", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowBuiltInTransformationDataset.schemaRef", + "serializationOptions": { + "$id": "1301", + "json": { + "$id": "1302", + "name": "schemaRef" + } + } + }, + { + "$id": "1303", + "kind": "property", + "name": "inputs", + "serializedName": "inputs", + "doc": "List of fields for enriching from the Broker State Store.", + "type": { + "$id": "1304", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1305", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowBuiltInTransformationDataset.inputs", + "serializationOptions": { + "$id": "1306", + "json": { + "$id": "1307", + "name": "inputs" + } + } + }, + { + "$id": "1308", + "kind": "property", + "name": "expression", + "serializedName": "expression", + "doc": "Condition to enrich data from Broker State Store. Example: $1 < 0 || $1 > $2 (Assuming inputs section $1 and $2 are provided)", + "type": { + "$id": "1309", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowBuiltInTransformationDataset.expression", + "serializationOptions": { + "$id": "1310", + "json": { + "$id": "1311", + "name": "expression" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowBuiltInTransformationSettings.datasets", + "serializationOptions": { + "$id": "1312", + "json": { + "$id": "1313", + "name": "datasets" + } + } + }, + { + "$id": "1314", + "kind": "property", + "name": "filter", + "serializedName": "filter", + "doc": "Filters input record or datapoints based on condition.", + "type": { + "$id": "1315", + "kind": "array", + "name": "ArrayDataflowBuiltInTransformationFilter", + "valueType": { + "$id": "1316", + "kind": "model", + "name": "DataflowBuiltInTransformationFilter", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowBuiltInTransformationFilter", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Dataflow BuiltIn Transformation filter properties", + "decorators": [], + "properties": [ + { + "$id": "1317", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The type of dataflow operation.", + "type": { + "$ref": "202" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowBuiltInTransformationFilter.type", + "serializationOptions": { + "$id": "1318", + "json": { + "$id": "1319", + "name": "type" + } + } + }, + { + "$id": "1320", + "kind": "property", + "name": "description", + "serializedName": "description", + "doc": "A user provided optional description of the filter.", + "type": { + "$id": "1321", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowBuiltInTransformationFilter.description", + "serializationOptions": { + "$id": "1322", + "json": { + "$id": "1323", + "name": "description" + } + } + }, + { + "$id": "1324", + "kind": "property", + "name": "inputs", + "serializedName": "inputs", + "doc": "List of fields for filtering in JSON path expression.", + "type": { + "$id": "1325", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1326", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowBuiltInTransformationFilter.inputs", + "serializationOptions": { + "$id": "1327", + "json": { + "$id": "1328", + "name": "inputs" + } + } + }, + { + "$id": "1329", + "kind": "property", + "name": "expression", + "serializedName": "expression", + "doc": "Condition to filter data. Can reference input fields with {n} where n is the index of the input field starting from 1. Example: $1 < 0 || $1 > $2 (Assuming inputs section $1 and $2 are provided)", + "type": { + "$id": "1330", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowBuiltInTransformationFilter.expression", + "serializationOptions": { + "$id": "1331", + "json": { + "$id": "1332", + "name": "expression" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowBuiltInTransformationSettings.filter", + "serializationOptions": { + "$id": "1333", + "json": { + "$id": "1334", + "name": "filter" + } + } + }, + { + "$id": "1335", + "kind": "property", + "name": "map", + "serializedName": "map", + "doc": "Maps input to output message.", + "type": { + "$id": "1336", + "kind": "array", + "name": "ArrayDataflowBuiltInTransformationMap", + "valueType": { + "$id": "1337", + "kind": "model", + "name": "DataflowBuiltInTransformationMap", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowBuiltInTransformationMap", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Dataflow BuiltIn Transformation map properties", + "decorators": [], + "properties": [ + { + "$id": "1338", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "Type of transformation.", + "type": { + "$ref": "206" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowBuiltInTransformationMap.type", + "serializationOptions": { + "$id": "1339", + "json": { + "$id": "1340", + "name": "type" + } + } + }, + { + "$id": "1341", + "kind": "property", + "name": "description", + "serializedName": "description", + "doc": "A user provided optional description of the mapping function.", + "type": { + "$id": "1342", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowBuiltInTransformationMap.description", + "serializationOptions": { + "$id": "1343", + "json": { + "$id": "1344", + "name": "description" + } + } + }, + { + "$id": "1345", + "kind": "property", + "name": "inputs", + "serializedName": "inputs", + "doc": "List of fields for mapping in JSON path expression.", + "type": { + "$id": "1346", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1347", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowBuiltInTransformationMap.inputs", + "serializationOptions": { + "$id": "1348", + "json": { + "$id": "1349", + "name": "inputs" + } + } + }, + { + "$id": "1350", + "kind": "property", + "name": "expression", + "serializedName": "expression", + "doc": "Modify the inputs field(s) to the final output field. Example: $1 * 2.2 (Assuming inputs section $1 is provided)", + "type": { + "$id": "1351", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowBuiltInTransformationMap.expression", + "serializationOptions": { + "$id": "1352", + "json": { + "$id": "1353", + "name": "expression" + } + } + }, + { + "$id": "1354", + "kind": "property", + "name": "output", + "serializedName": "output", + "doc": "Where and how the input fields to be organized in the output record.", + "type": { + "$id": "1355", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowBuiltInTransformationMap.output", + "serializationOptions": { + "$id": "1356", + "json": { + "$id": "1357", + "name": "output" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowBuiltInTransformationSettings.map", + "serializationOptions": { + "$id": "1358", + "json": { + "$id": "1359", + "name": "map" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowOperation.builtInTransformationSettings", + "serializationOptions": { + "$id": "1360", + "json": { + "$id": "1361", + "name": "builtInTransformationSettings" + } + } + }, + { + "$id": "1362", + "kind": "property", + "name": "destinationSettings", + "serializedName": "destinationSettings", + "doc": "Destination configuration.", + "type": { + "$id": "1363", + "kind": "model", + "name": "DataflowDestinationOperationSettings", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowDestinationOperationSettings", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Dataflow Destination Operation properties", + "decorators": [], + "properties": [ + { + "$id": "1364", + "kind": "property", + "name": "endpointRef", + "serializedName": "endpointRef", + "doc": "Reference to the Endpoint CR. Can be of Broker, Kafka, Fabric, ADLS, ADX type.", + "type": { + "$id": "1365", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowDestinationOperationSettings.endpointRef", + "serializationOptions": { + "$id": "1366", + "json": { + "$id": "1367", + "name": "endpointRef" + } + } + }, + { + "$id": "1368", + "kind": "property", + "name": "dataDestination", + "serializedName": "dataDestination", + "doc": "Destination location, can be a topic or table name. Supports dynamic values with $topic, $systemProperties, $userProperties, $payload, $context, and $subscription.", + "type": { + "$id": "1369", + "kind": "string", + "name": "NonEmptyString", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.NonEmptyString", + "baseType": { + "$id": "1370", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowDestinationOperationSettings.dataDestination", + "serializationOptions": { + "$id": "1371", + "json": { + "$id": "1372", + "name": "dataDestination" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowOperation.destinationSettings", + "serializationOptions": { + "$id": "1373", + "json": { + "$id": "1374", + "name": "destinationSettings" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowProperties.operations", + "serializationOptions": { + "$id": "1375", + "json": { + "$id": "1376", + "name": "operations" + } + } + }, + { + "$id": "1377", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "The status of the last operation.", + "type": { + "$ref": "14" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowProperties.provisioningState", + "serializationOptions": { + "$id": "1378", + "json": { + "$id": "1379", + "name": "provisioningState" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowResource.properties", + "serializationOptions": { + "$id": "1380", + "json": { + "$id": "1381", + "name": "properties" + } + } + }, + { + "$id": "1382", + "kind": "path", + "name": "name", + "serializedName": "name", + "doc": "Name of Instance dataflowProfile dataflow resource", + "type": { + "$id": "1383", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowResource.name", + "discriminator": false, + "flatten": false + }, + { + "$id": "1384", + "kind": "property", + "name": "extendedLocation", + "serializedName": "extendedLocation", + "doc": "Edge location of the resource.", + "type": { + "$ref": "512" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowResource.extendedLocation", + "serializationOptions": { + "$id": "1385", + "json": { + "$id": "1386", + "name": "extendedLocation" + } + } + } + ] + }, + { + "$ref": "1240" + }, + { + "$ref": "1246" + }, + { + "$ref": "1255" + }, + { + "$ref": "1280" + }, + { + "$ref": "1290" + }, + { + "$ref": "1316" + }, + { + "$ref": "1337" + }, + { + "$ref": "1363" + }, + { + "$id": "1387", + "kind": "model", + "name": "DataflowResourceListResult", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult", + "usage": "Output,Json", + "doc": "The response of a DataflowResource list operation.", + "decorators": [], + "properties": [ + { + "$id": "1388", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The DataflowResource items on this page", + "type": { + "$id": "1389", + "kind": "array", + "name": "ArrayDataflowResource", + "valueType": { + "$ref": "1238" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", + "serializationOptions": { + "$id": "1390", + "json": { + "$id": "1391", + "name": "value" + } + } + }, + { + "$id": "1392", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "1393", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "1394", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.nextLink", + "serializationOptions": { + "$id": "1395", + "json": { + "$id": "1396", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "1397", + "kind": "model", + "name": "IotOperationsDataflowEndpoint", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointResource", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Instance dataflowEndpoint resource", + "decorators": [], + "baseModel": { + "$ref": "604" + }, + "properties": [ + { + "$id": "1398", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "1399", + "kind": "model", + "name": "IotOperationsDataflowEndpointProperties", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointProperties", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "DataflowEndpoint Resource properties. NOTE - Only one type of endpoint is supported for one Resource", + "decorators": [], + "properties": [ + { + "$id": "1400", + "kind": "property", + "name": "endpointType", + "serializedName": "endpointType", + "doc": "Endpoint Type.", + "type": { + "$ref": "218" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointProperties.endpointType", + "serializationOptions": { + "$id": "1401", + "json": { + "$id": "1402", + "name": "endpointType" + } + } + }, + { + "$id": "1403", + "kind": "property", + "name": "dataExplorerSettings", + "serializedName": "dataExplorerSettings", + "doc": "Azure Data Explorer endpoint.", + "type": { + "$id": "1404", + "kind": "model", + "name": "DataflowEndpointDataExplorer", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointDataExplorer", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Azure Data Explorer endpoint properties", + "decorators": [], + "properties": [ + { + "$id": "1405", + "kind": "property", + "name": "authentication", + "serializedName": "authentication", + "doc": "Authentication configuration. NOTE - only authentication property is allowed per entry.", + "type": { + "$id": "1406", + "kind": "model", + "name": "DataflowEndpointDataExplorerAuthentication", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointDataExplorerAuthentication", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Azure Data Explorer Authentication properties. NOTE - only authentication property is allowed per entry.", + "decorators": [], + "properties": [ + { + "$id": "1407", + "kind": "property", + "name": "method", + "serializedName": "method", + "doc": "Mode of Authentication.", + "type": { + "$ref": "232" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointDataExplorerAuthentication.method", + "serializationOptions": { + "$id": "1408", + "json": { + "$id": "1409", + "name": "method" + } + } + }, + { + "$id": "1410", + "kind": "property", + "name": "systemAssignedManagedIdentitySettings", + "serializedName": "systemAssignedManagedIdentitySettings", + "doc": "System-assigned managed identity authentication.", + "type": { + "$id": "1411", + "kind": "model", + "name": "DataflowEndpointAuthenticationSystemAssignedManagedIdentity", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "DataflowEndpoint Authentication SystemAssignedManagedIdentity properties", + "decorators": [], + "properties": [ + { + "$id": "1412", + "kind": "property", + "name": "audience", + "serializedName": "audience", + "doc": "Audience of the service to authenticate against. Optional; defaults to the audience for Service host configuration.", + "type": { + "$id": "1413", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointAuthenticationSystemAssignedManagedIdentity.audience", + "serializationOptions": { + "$id": "1414", + "json": { + "$id": "1415", + "name": "audience" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointDataExplorerAuthentication.systemAssignedManagedIdentitySettings", + "serializationOptions": { + "$id": "1416", + "json": { + "$id": "1417", + "name": "systemAssignedManagedIdentitySettings" + } + } + }, + { + "$id": "1418", + "kind": "property", + "name": "userAssignedManagedIdentitySettings", + "serializedName": "userAssignedManagedIdentitySettings", + "doc": "User-assigned managed identity authentication.", + "type": { + "$id": "1419", + "kind": "model", + "name": "DataflowEndpointAuthenticationUserAssignedManagedIdentity", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointAuthenticationUserAssignedManagedIdentity", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "DataflowEndpoint Authentication UserAssignedManagedIdentity properties", + "decorators": [], + "properties": [ + { + "$id": "1420", + "kind": "property", + "name": "clientId", + "serializedName": "clientId", + "doc": "Client ID for the user-assigned managed identity.", + "type": { + "$id": "1421", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointAuthenticationUserAssignedManagedIdentity.clientId", + "serializationOptions": { + "$id": "1422", + "json": { + "$id": "1423", + "name": "clientId" + } + } + }, + { + "$id": "1424", + "kind": "property", + "name": "scope", + "serializedName": "scope", + "doc": "Resource identifier (application ID URI) of the resource, affixed with the .default suffix.", + "type": { + "$id": "1425", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointAuthenticationUserAssignedManagedIdentity.scope", + "serializationOptions": { + "$id": "1426", + "json": { + "$id": "1427", + "name": "scope" + } + } + }, + { + "$id": "1428", + "kind": "property", + "name": "tenantId", + "serializedName": "tenantId", + "doc": "Tenant ID.", + "type": { + "$id": "1429", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointAuthenticationUserAssignedManagedIdentity.tenantId", + "serializationOptions": { + "$id": "1430", + "json": { + "$id": "1431", + "name": "tenantId" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointDataExplorerAuthentication.userAssignedManagedIdentitySettings", + "serializationOptions": { + "$id": "1432", + "json": { + "$id": "1433", + "name": "userAssignedManagedIdentitySettings" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointDataExplorer.authentication", + "serializationOptions": { + "$id": "1434", + "json": { + "$id": "1435", + "name": "authentication" + } + } + }, + { + "$id": "1436", + "kind": "property", + "name": "database", + "serializedName": "database", + "doc": "Database name.", + "type": { + "$id": "1437", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointDataExplorer.database", + "serializationOptions": { + "$id": "1438", + "json": { + "$id": "1439", + "name": "database" + } + } + }, + { + "$id": "1440", + "kind": "property", + "name": "host", + "serializedName": "host", + "doc": "Host of the Azure Data Explorer in the form of ..kusto.windows.net .", + "type": { + "$id": "1441", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointDataExplorer.host", + "serializationOptions": { + "$id": "1442", + "json": { + "$id": "1443", + "name": "host" + } + } + }, + { + "$id": "1444", + "kind": "property", + "name": "batching", + "serializedName": "batching", + "doc": "Azure Data Explorer endpoint batching configuration.", + "type": { + "$id": "1445", + "kind": "model", + "name": "IotOperationsBatchingConfig", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BatchingConfiguration", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Batching configuration", + "decorators": [], + "properties": [ + { + "$id": "1446", + "kind": "property", + "name": "latencySeconds", + "serializedName": "latencySeconds", + "doc": "Batching latency in seconds.", + "type": { + "$id": "1447", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BatchingConfiguration.latencySeconds", + "serializationOptions": { + "$id": "1448", + "json": { + "$id": "1449", + "name": "latencySeconds" + } + } + }, + { + "$id": "1450", + "kind": "property", + "name": "maxMessages", + "serializedName": "maxMessages", + "doc": "Maximum number of messages in a batch.", + "type": { + "$id": "1451", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BatchingConfiguration.maxMessages", + "serializationOptions": { + "$id": "1452", + "json": { + "$id": "1453", + "name": "maxMessages" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointDataExplorer.batching", + "serializationOptions": { + "$id": "1454", + "json": { + "$id": "1455", + "name": "batching" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointProperties.dataExplorerSettings", + "serializationOptions": { + "$id": "1456", + "json": { + "$id": "1457", + "name": "dataExplorerSettings" + } + } + }, + { + "$id": "1458", + "kind": "property", + "name": "dataLakeStorageSettings", + "serializedName": "dataLakeStorageSettings", + "doc": "Azure Data Lake endpoint.", + "type": { + "$id": "1459", + "kind": "model", + "name": "DataflowEndpointDataLakeStorage", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointDataLakeStorage", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Azure Data Lake endpoint properties", + "decorators": [], + "properties": [ + { + "$id": "1460", + "kind": "property", + "name": "authentication", + "serializedName": "authentication", + "doc": "Authentication configuration. NOTE - only authentication property is allowed per entry.", + "type": { + "$id": "1461", + "kind": "model", + "name": "DataflowEndpointDataLakeStorageAuthentication", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointDataLakeStorageAuthentication", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Azure Data Lake endpoint Authentication properties. NOTE Enum - Only one method is supported for one entry", + "decorators": [], + "properties": [ + { + "$id": "1462", + "kind": "property", + "name": "method", + "serializedName": "method", + "doc": "Mode of Authentication.", + "type": { + "$ref": "238" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointDataLakeStorageAuthentication.method", + "serializationOptions": { + "$id": "1463", + "json": { + "$id": "1464", + "name": "method" + } + } + }, + { + "$id": "1465", + "kind": "property", + "name": "accessTokenSettings", + "serializedName": "accessTokenSettings", + "doc": "SAS token authentication.", + "type": { + "$id": "1466", + "kind": "model", + "name": "DataflowEndpointAuthenticationAccessToken", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointAuthenticationAccessToken", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "DataflowEndpoint Authentication Access Token properties", + "decorators": [], + "properties": [ + { + "$id": "1467", + "kind": "property", + "name": "secretRef", + "serializedName": "secretRef", + "doc": "Token secret name.", + "type": { + "$id": "1468", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointAuthenticationAccessToken.secretRef", + "serializationOptions": { + "$id": "1469", + "json": { + "$id": "1470", + "name": "secretRef" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointDataLakeStorageAuthentication.accessTokenSettings", + "serializationOptions": { + "$id": "1471", + "json": { + "$id": "1472", + "name": "accessTokenSettings" + } + } + }, + { + "$id": "1473", + "kind": "property", + "name": "systemAssignedManagedIdentitySettings", + "serializedName": "systemAssignedManagedIdentitySettings", + "doc": "System-assigned managed identity authentication.", + "type": { + "$ref": "1411" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointDataLakeStorageAuthentication.systemAssignedManagedIdentitySettings", + "serializationOptions": { + "$id": "1474", + "json": { + "$id": "1475", + "name": "systemAssignedManagedIdentitySettings" + } + } + }, + { + "$id": "1476", + "kind": "property", + "name": "userAssignedManagedIdentitySettings", + "serializedName": "userAssignedManagedIdentitySettings", + "doc": "User-assigned managed identity authentication.", + "type": { + "$ref": "1419" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointDataLakeStorageAuthentication.userAssignedManagedIdentitySettings", + "serializationOptions": { + "$id": "1477", + "json": { + "$id": "1478", + "name": "userAssignedManagedIdentitySettings" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointDataLakeStorage.authentication", + "serializationOptions": { + "$id": "1479", + "json": { + "$id": "1480", + "name": "authentication" + } + } + }, + { + "$id": "1481", + "kind": "property", + "name": "host", + "serializedName": "host", + "doc": "Host of the Azure Data Lake in the form of .blob.core.windows.net .", + "type": { + "$id": "1482", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointDataLakeStorage.host", + "serializationOptions": { + "$id": "1483", + "json": { + "$id": "1484", + "name": "host" + } + } + }, + { + "$id": "1485", + "kind": "property", + "name": "batching", + "serializedName": "batching", + "doc": "Azure Data Lake endpoint batching configuration.", + "type": { + "$ref": "1445" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointDataLakeStorage.batching", + "serializationOptions": { + "$id": "1486", + "json": { + "$id": "1487", + "name": "batching" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointProperties.dataLakeStorageSettings", + "serializationOptions": { + "$id": "1488", + "json": { + "$id": "1489", + "name": "dataLakeStorageSettings" + } + } + }, + { + "$id": "1490", + "kind": "property", + "name": "fabricOneLakeSettings", + "serializedName": "fabricOneLakeSettings", + "doc": "Microsoft Fabric endpoint.", + "type": { + "$id": "1491", + "kind": "model", + "name": "DataflowEndpointFabricOneLake", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointFabricOneLake", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Microsoft Fabric endpoint properties", + "decorators": [], + "properties": [ + { + "$id": "1492", + "kind": "property", + "name": "authentication", + "serializedName": "authentication", + "doc": "Authentication configuration. NOTE - only one authentication property is allowed per entry.", + "type": { + "$id": "1493", + "kind": "model", + "name": "DataflowEndpointFabricOneLakeAuthentication", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointFabricOneLakeAuthentication", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Microsoft Fabric endpoint. Authentication properties. NOTE - Only one method is supported for one entry", + "decorators": [], + "properties": [ + { + "$id": "1494", + "kind": "property", + "name": "method", + "serializedName": "method", + "doc": "Mode of Authentication.", + "type": { + "$ref": "246" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointFabricOneLakeAuthentication.method", + "serializationOptions": { + "$id": "1495", + "json": { + "$id": "1496", + "name": "method" + } + } + }, + { + "$id": "1497", + "kind": "property", + "name": "systemAssignedManagedIdentitySettings", + "serializedName": "systemAssignedManagedIdentitySettings", + "doc": "System-assigned managed identity authentication.", + "type": { + "$ref": "1411" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointFabricOneLakeAuthentication.systemAssignedManagedIdentitySettings", + "serializationOptions": { + "$id": "1498", + "json": { + "$id": "1499", + "name": "systemAssignedManagedIdentitySettings" + } + } + }, + { + "$id": "1500", + "kind": "property", + "name": "userAssignedManagedIdentitySettings", + "serializedName": "userAssignedManagedIdentitySettings", + "doc": "User-assigned managed identity authentication.", + "type": { + "$ref": "1419" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointFabricOneLakeAuthentication.userAssignedManagedIdentitySettings", + "serializationOptions": { + "$id": "1501", + "json": { + "$id": "1502", + "name": "userAssignedManagedIdentitySettings" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointFabricOneLake.authentication", + "serializationOptions": { + "$id": "1503", + "json": { + "$id": "1504", + "name": "authentication" + } + } + }, + { + "$id": "1505", + "kind": "property", + "name": "names", + "serializedName": "names", + "doc": "Names of the workspace and lakehouse.", + "type": { + "$id": "1506", + "kind": "model", + "name": "DataflowEndpointFabricOneLakeNames", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointFabricOneLakeNames", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Microsoft Fabric endpoint Names properties", + "decorators": [], + "properties": [ + { + "$id": "1507", + "kind": "property", + "name": "lakehouseName", + "serializedName": "lakehouseName", + "doc": "Lakehouse name.", + "type": { + "$id": "1508", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointFabricOneLakeNames.lakehouseName", + "serializationOptions": { + "$id": "1509", + "json": { + "$id": "1510", + "name": "lakehouseName" + } + } + }, + { + "$id": "1511", + "kind": "property", + "name": "workspaceName", + "serializedName": "workspaceName", + "doc": "Workspace name.", + "type": { + "$id": "1512", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointFabricOneLakeNames.workspaceName", + "serializationOptions": { + "$id": "1513", + "json": { + "$id": "1514", + "name": "workspaceName" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointFabricOneLake.names", + "serializationOptions": { + "$id": "1515", + "json": { + "$id": "1516", + "name": "names" + } + } + }, + { + "$id": "1517", + "kind": "property", + "name": "oneLakePathType", + "serializedName": "oneLakePathType", + "doc": "Type of location of the data in the workspace. Can be either tables or files.", + "type": { + "$ref": "252" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointFabricOneLake.oneLakePathType", + "serializationOptions": { + "$id": "1518", + "json": { + "$id": "1519", + "name": "oneLakePathType" + } + } + }, + { + "$id": "1520", + "kind": "property", + "name": "host", + "serializedName": "host", + "doc": "Host of the Microsoft Fabric in the form of https://.fabric.microsoft.com.", + "type": { + "$id": "1521", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointFabricOneLake.host", + "serializationOptions": { + "$id": "1522", + "json": { + "$id": "1523", + "name": "host" + } + } + }, + { + "$id": "1524", + "kind": "property", + "name": "batching", + "serializedName": "batching", + "doc": "Batching configuration.", + "type": { + "$ref": "1445" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointFabricOneLake.batching", + "serializationOptions": { + "$id": "1525", + "json": { + "$id": "1526", + "name": "batching" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointProperties.fabricOneLakeSettings", + "serializationOptions": { + "$id": "1527", + "json": { + "$id": "1528", + "name": "fabricOneLakeSettings" + } + } + }, + { + "$id": "1529", + "kind": "property", + "name": "kafkaSettings", + "serializedName": "kafkaSettings", + "doc": "Kafka endpoint.", + "type": { + "$id": "1530", + "kind": "model", + "name": "DataflowEndpointKafka", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointKafka", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Kafka endpoint properties", + "decorators": [], + "properties": [ + { + "$id": "1531", + "kind": "property", + "name": "authentication", + "serializedName": "authentication", + "doc": "Authentication configuration. NOTE - only authentication property is allowed per entry.", + "type": { + "$id": "1532", + "kind": "model", + "name": "DataflowEndpointKafkaAuthentication", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointKafkaAuthentication", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Kafka endpoint Authentication properties. NOTE - only authentication property is allowed per entry", + "decorators": [], + "properties": [ + { + "$id": "1533", + "kind": "property", + "name": "method", + "serializedName": "method", + "doc": "Mode of Authentication.", + "type": { + "$ref": "258" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointKafkaAuthentication.method", + "serializationOptions": { + "$id": "1534", + "json": { + "$id": "1535", + "name": "method" + } + } + }, + { + "$id": "1536", + "kind": "property", + "name": "systemAssignedManagedIdentitySettings", + "serializedName": "systemAssignedManagedIdentitySettings", + "doc": "System-assigned managed identity authentication.", + "type": { + "$ref": "1411" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointKafkaAuthentication.systemAssignedManagedIdentitySettings", + "serializationOptions": { + "$id": "1537", + "json": { + "$id": "1538", + "name": "systemAssignedManagedIdentitySettings" + } + } + }, + { + "$id": "1539", + "kind": "property", + "name": "userAssignedManagedIdentitySettings", + "serializedName": "userAssignedManagedIdentitySettings", + "doc": "User-assigned managed identity authentication.", + "type": { + "$ref": "1419" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointKafkaAuthentication.userAssignedManagedIdentitySettings", + "serializationOptions": { + "$id": "1540", + "json": { + "$id": "1541", + "name": "userAssignedManagedIdentitySettings" + } + } + }, + { + "$id": "1542", + "kind": "property", + "name": "saslSettings", + "serializedName": "saslSettings", + "doc": "SASL authentication.", + "type": { + "$id": "1543", + "kind": "model", + "name": "DataflowEndpointAuthenticationSasl", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointAuthenticationSasl", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "DataflowEndpoint Authentication Sasl properties", + "decorators": [], + "properties": [ + { + "$id": "1544", + "kind": "property", + "name": "saslType", + "serializedName": "saslType", + "doc": "Type of SASL authentication. Can be PLAIN, SCRAM-SHA-256, or SCRAM-SHA-512.", + "type": { + "$ref": "270" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointAuthenticationSasl.saslType", + "serializationOptions": { + "$id": "1545", + "json": { + "$id": "1546", + "name": "saslType" + } + } + }, + { + "$id": "1547", + "kind": "property", + "name": "secretRef", + "serializedName": "secretRef", + "doc": "Token secret name.", + "type": { + "$id": "1548", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointAuthenticationSasl.secretRef", + "serializationOptions": { + "$id": "1549", + "json": { + "$id": "1550", + "name": "secretRef" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointKafkaAuthentication.saslSettings", + "serializationOptions": { + "$id": "1551", + "json": { + "$id": "1552", + "name": "saslSettings" + } + } + }, + { + "$id": "1553", + "kind": "property", + "name": "x509CertificateSettings", + "serializedName": "x509CertificateSettings", + "doc": "X.509 certificate authentication.", + "type": { + "$id": "1554", + "kind": "model", + "name": "DataflowEndpointAuthenticationX509", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointAuthenticationX509", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "DataflowEndpoint Authentication X509 properties", + "decorators": [], + "properties": [ + { + "$id": "1555", + "kind": "property", + "name": "secretRef", + "serializedName": "secretRef", + "doc": "Secret reference of the X.509 certificate.", + "type": { + "$id": "1556", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointAuthenticationX509.secretRef", + "serializationOptions": { + "$id": "1557", + "json": { + "$id": "1558", + "name": "secretRef" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointKafkaAuthentication.x509CertificateSettings", + "serializationOptions": { + "$id": "1559", + "json": { + "$id": "1560", + "name": "x509CertificateSettings" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointKafka.authentication", + "serializationOptions": { + "$id": "1561", + "json": { + "$id": "1562", + "name": "authentication" + } + } + }, + { + "$id": "1563", + "kind": "property", + "name": "consumerGroupId", + "serializedName": "consumerGroupId", + "doc": "Consumer group ID.", + "type": { + "$id": "1564", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointKafka.consumerGroupId", + "serializationOptions": { + "$id": "1565", + "json": { + "$id": "1566", + "name": "consumerGroupId" + } + } + }, + { + "$id": "1567", + "kind": "property", + "name": "host", + "serializedName": "host", + "doc": "Kafka endpoint host.", + "type": { + "$id": "1568", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointKafka.host", + "serializationOptions": { + "$id": "1569", + "json": { + "$id": "1570", + "name": "host" + } + } + }, + { + "$id": "1571", + "kind": "property", + "name": "batching", + "serializedName": "batching", + "doc": "Batching configuration.", + "type": { + "$id": "1572", + "kind": "model", + "name": "DataflowEndpointKafkaBatching", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointKafkaBatching", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Kafka endpoint Batching properties", + "decorators": [], + "properties": [ + { + "$id": "1573", + "kind": "property", + "name": "mode", + "serializedName": "mode", + "doc": "Mode for batching.", + "type": { + "$ref": "38" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointKafkaBatching.mode", + "serializationOptions": { + "$id": "1574", + "json": { + "$id": "1575", + "name": "mode" + } + } + }, + { + "$id": "1576", + "kind": "property", + "name": "latencyMs", + "serializedName": "latencyMs", + "doc": "Batching latency in milliseconds.", + "type": { + "$id": "1577", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointKafkaBatching.latencyMs", + "serializationOptions": { + "$id": "1578", + "json": { + "$id": "1579", + "name": "latencyMs" + } + } + }, + { + "$id": "1580", + "kind": "property", + "name": "maxBytes", + "serializedName": "maxBytes", + "doc": "Maximum number of bytes in a batch.", + "type": { + "$id": "1581", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointKafkaBatching.maxBytes", + "serializationOptions": { + "$id": "1582", + "json": { + "$id": "1583", + "name": "maxBytes" + } + } + }, + { + "$id": "1584", + "kind": "property", + "name": "maxMessages", + "serializedName": "maxMessages", + "doc": "Maximum number of messages in a batch.", + "type": { + "$id": "1585", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointKafkaBatching.maxMessages", + "serializationOptions": { + "$id": "1586", + "json": { + "$id": "1587", + "name": "maxMessages" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointKafka.batching", + "serializationOptions": { + "$id": "1588", + "json": { + "$id": "1589", + "name": "batching" + } + } + }, + { + "$id": "1590", + "kind": "property", + "name": "copyMqttProperties", + "serializedName": "copyMqttProperties", + "doc": "Copy Broker properties. No effect if the endpoint is used as a source or if the dataflow doesn't have an Broker source.", + "type": { + "$ref": "38" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointKafka.copyMqttProperties", + "serializationOptions": { + "$id": "1591", + "json": { + "$id": "1592", + "name": "copyMqttProperties" + } + } + }, + { + "$id": "1593", + "kind": "property", + "name": "compression", + "serializedName": "compression", + "doc": "Compression. Can be none, gzip, lz4, or snappy. No effect if the endpoint is used as a source.", + "type": { + "$ref": "278" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointKafka.compression", + "serializationOptions": { + "$id": "1594", + "json": { + "$id": "1595", + "name": "compression" + } + } + }, + { + "$id": "1596", + "kind": "property", + "name": "kafkaAcks", + "serializedName": "kafkaAcks", + "doc": "Kafka acks. Can be all, one, or zero. No effect if the endpoint is used as a source.", + "type": { + "$ref": "288" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointKafka.kafkaAcks", + "serializationOptions": { + "$id": "1597", + "json": { + "$id": "1598", + "name": "kafkaAcks" + } + } + }, + { + "$id": "1599", + "kind": "property", + "name": "partitionStrategy", + "serializedName": "partitionStrategy", + "doc": "Partition handling strategy. Can be default or static. No effect if the endpoint is used as a source.", + "type": { + "$ref": "296" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointKafka.partitionStrategy", + "serializationOptions": { + "$id": "1600", + "json": { + "$id": "1601", + "name": "partitionStrategy" + } + } + }, + { + "$id": "1602", + "kind": "property", + "name": "tls", + "serializedName": "tls", + "doc": "TLS configuration.", + "type": { + "$id": "1603", + "kind": "model", + "name": "IotOperationsTlsProperties", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.TlsProperties", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Tls properties", + "decorators": [], + "properties": [ + { + "$id": "1604", + "kind": "property", + "name": "mode", + "serializedName": "mode", + "doc": "Mode for TLS.", + "type": { + "$ref": "38" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.TlsProperties.mode", + "serializationOptions": { + "$id": "1605", + "json": { + "$id": "1606", + "name": "mode" + } + } + }, + { + "$id": "1607", + "kind": "property", + "name": "trustedCaCertificateConfigMapRef", + "serializedName": "trustedCaCertificateConfigMapRef", + "doc": "Trusted CA certificate config map.", + "type": { + "$id": "1608", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.TlsProperties.trustedCaCertificateConfigMapRef", + "serializationOptions": { + "$id": "1609", + "json": { + "$id": "1610", + "name": "trustedCaCertificateConfigMapRef" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointKafka.tls", + "serializationOptions": { + "$id": "1611", + "json": { + "$id": "1612", + "name": "tls" + } + } + }, + { + "$id": "1613", + "kind": "property", + "name": "cloudEventAttributes", + "serializedName": "cloudEventAttributes", + "doc": "Cloud event mapping config.", + "type": { + "$ref": "306" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointKafka.cloudEventAttributes", + "serializationOptions": { + "$id": "1614", + "json": { + "$id": "1615", + "name": "cloudEventAttributes" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointProperties.kafkaSettings", + "serializationOptions": { + "$id": "1616", + "json": { + "$id": "1617", + "name": "kafkaSettings" + } + } + }, + { + "$id": "1618", + "kind": "property", + "name": "localStorageSettings", + "serializedName": "localStorageSettings", + "doc": "Local persistent volume endpoint.", + "type": { + "$id": "1619", + "kind": "model", + "name": "DataflowEndpointLocalStorage", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointLocalStorage", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Local persistent volume endpoint properties", + "decorators": [], + "properties": [ + { + "$id": "1620", + "kind": "property", + "name": "persistentVolumeClaimRef", + "serializedName": "persistentVolumeClaimRef", + "doc": "Persistent volume claim name.", + "type": { + "$id": "1621", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointLocalStorage.persistentVolumeClaimRef", + "serializationOptions": { + "$id": "1622", + "json": { + "$id": "1623", + "name": "persistentVolumeClaimRef" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointProperties.localStorageSettings", + "serializationOptions": { + "$id": "1624", + "json": { + "$id": "1625", + "name": "localStorageSettings" + } + } + }, + { + "$id": "1626", + "kind": "property", + "name": "mqttSettings", + "serializedName": "mqttSettings", + "doc": "Broker endpoint.", + "type": { + "$id": "1627", + "kind": "model", + "name": "DataflowEndpointMqtt", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointMqtt", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Broker endpoint properties", + "decorators": [], + "properties": [ + { + "$id": "1628", + "kind": "property", + "name": "authentication", + "serializedName": "authentication", + "doc": "authentication properties. DEFAULT: kubernetes.audience=aio-internal. NOTE - Enum field only property is allowed", + "type": { + "$id": "1629", + "kind": "model", + "name": "DataflowEndpointMqttAuthentication", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointMqttAuthentication", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Mqtt endpoint Authentication properties. NOTE - only authentication property is allowed per entry.", + "decorators": [], + "properties": [ + { + "$id": "1630", + "kind": "property", + "name": "method", + "serializedName": "method", + "doc": "Mode of Authentication.", + "type": { + "$ref": "312" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointMqttAuthentication.method", + "serializationOptions": { + "$id": "1631", + "json": { + "$id": "1632", + "name": "method" + } + } + }, + { + "$id": "1633", + "kind": "property", + "name": "systemAssignedManagedIdentitySettings", + "serializedName": "systemAssignedManagedIdentitySettings", + "doc": "System-assigned managed identity authentication.", + "type": { + "$ref": "1411" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointMqttAuthentication.systemAssignedManagedIdentitySettings", + "serializationOptions": { + "$id": "1634", + "json": { + "$id": "1635", + "name": "systemAssignedManagedIdentitySettings" + } + } + }, + { + "$id": "1636", + "kind": "property", + "name": "userAssignedManagedIdentitySettings", + "serializedName": "userAssignedManagedIdentitySettings", + "doc": "User-assigned managed identity authentication.", + "type": { + "$ref": "1419" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointMqttAuthentication.userAssignedManagedIdentitySettings", + "serializationOptions": { + "$id": "1637", + "json": { + "$id": "1638", + "name": "userAssignedManagedIdentitySettings" + } + } + }, + { + "$id": "1639", + "kind": "property", + "name": "serviceAccountTokenSettings", + "serializedName": "serviceAccountTokenSettings", + "doc": "Kubernetes service account token authentication. Default audience if not set is aio-internal", + "type": { + "$id": "1640", + "kind": "model", + "name": "DataflowEndpointAuthenticationServiceAccountToken", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointAuthenticationServiceAccountToken", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Service Account Token for BrokerAuthentication", + "decorators": [], + "properties": [ + { + "$id": "1641", + "kind": "property", + "name": "audience", + "serializedName": "audience", + "doc": "Audience of the service account. Optional, defaults to the broker internal service account audience.", + "type": { + "$id": "1642", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointAuthenticationServiceAccountToken.audience", + "serializationOptions": { + "$id": "1643", + "json": { + "$id": "1644", + "name": "audience" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointMqttAuthentication.serviceAccountTokenSettings", + "serializationOptions": { + "$id": "1645", + "json": { + "$id": "1646", + "name": "serviceAccountTokenSettings" + } + } + }, + { + "$id": "1647", + "kind": "property", + "name": "x509CertificateSettings", + "serializedName": "x509CertificateSettings", + "doc": "X.509 certificate authentication.", + "type": { + "$ref": "1554" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointMqttAuthentication.x509CertificateSettings", + "serializationOptions": { + "$id": "1648", + "json": { + "$id": "1649", + "name": "x509CertificateSettings" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointMqtt.authentication", + "serializationOptions": { + "$id": "1650", + "json": { + "$id": "1651", + "name": "authentication" + } + } + }, + { + "$id": "1652", + "kind": "property", + "name": "clientIdPrefix", + "serializedName": "clientIdPrefix", + "doc": "Client ID prefix. Client ID generated by the dataflow is -TBD. Optional; no prefix if omitted.", + "type": { + "$id": "1653", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointMqtt.clientIdPrefix", + "serializationOptions": { + "$id": "1654", + "json": { + "$id": "1655", + "name": "clientIdPrefix" + } + } + }, + { + "$id": "1656", + "kind": "property", + "name": "host", + "serializedName": "host", + "doc": "Host of the Broker in the form of :. Optional; connects to Broker if omitted.", + "type": { + "$id": "1657", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointMqtt.host", + "serializationOptions": { + "$id": "1658", + "json": { + "$id": "1659", + "name": "host" + } + } + }, + { + "$id": "1660", + "kind": "property", + "name": "protocol", + "serializedName": "protocol", + "doc": "Enable or disable websockets.", + "type": { + "$ref": "124" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointMqtt.protocol", + "serializationOptions": { + "$id": "1661", + "json": { + "$id": "1662", + "name": "protocol" + } + } + }, + { + "$id": "1663", + "kind": "property", + "name": "keepAliveSeconds", + "serializedName": "keepAliveSeconds", + "doc": "Broker KeepAlive for connection in seconds.", + "type": { + "$id": "1664", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointMqtt.keepAliveSeconds", + "serializationOptions": { + "$id": "1665", + "json": { + "$id": "1666", + "name": "keepAliveSeconds" + } + } + }, + { + "$id": "1667", + "kind": "property", + "name": "retain", + "serializedName": "retain", + "doc": "Whether or not to keep the retain setting.", + "type": { + "$ref": "324" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointMqtt.retain", + "serializationOptions": { + "$id": "1668", + "json": { + "$id": "1669", + "name": "retain" + } + } + }, + { + "$id": "1670", + "kind": "property", + "name": "maxInflightMessages", + "serializedName": "maxInflightMessages", + "doc": "The max number of messages to keep in flight. For subscribe, this is the receive maximum. For publish, this is the maximum number of messages to send before waiting for an ack.", + "type": { + "$id": "1671", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointMqtt.maxInflightMessages", + "serializationOptions": { + "$id": "1672", + "json": { + "$id": "1673", + "name": "maxInflightMessages" + } + } + }, + { + "$id": "1674", + "kind": "property", + "name": "qos", + "serializedName": "qos", + "doc": "Qos for Broker connection.", + "type": { + "$id": "1675", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointMqtt.qos", + "serializationOptions": { + "$id": "1676", + "json": { + "$id": "1677", + "name": "qos" + } + } + }, + { + "$id": "1678", + "kind": "property", + "name": "sessionExpirySeconds", + "serializedName": "sessionExpirySeconds", + "doc": "Session expiry in seconds.", + "type": { + "$id": "1679", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointMqtt.sessionExpirySeconds", + "serializationOptions": { + "$id": "1680", + "json": { + "$id": "1681", + "name": "sessionExpirySeconds" + } + } + }, + { + "$id": "1682", + "kind": "property", + "name": "tls", + "serializedName": "tls", + "doc": "TLS configuration.", + "type": { + "$ref": "1603" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointMqtt.tls", + "serializationOptions": { + "$id": "1683", + "json": { + "$id": "1684", + "name": "tls" + } + } + }, + { + "$id": "1685", + "kind": "property", + "name": "cloudEventAttributes", + "serializedName": "cloudEventAttributes", + "doc": "Cloud event mapping config.", + "type": { + "$ref": "306" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointMqtt.cloudEventAttributes", + "serializationOptions": { + "$id": "1686", + "json": { + "$id": "1687", + "name": "cloudEventAttributes" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointProperties.mqttSettings", + "serializationOptions": { + "$id": "1688", + "json": { + "$id": "1689", + "name": "mqttSettings" + } + } + }, + { + "$id": "1690", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "The status of the last operation.", + "type": { + "$ref": "14" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointProperties.provisioningState", + "serializationOptions": { + "$id": "1691", + "json": { + "$id": "1692", + "name": "provisioningState" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointResource.properties", + "serializationOptions": { + "$id": "1693", + "json": { + "$id": "1694", + "name": "properties" + } + } + }, + { + "$id": "1695", + "kind": "path", + "name": "name", + "serializedName": "name", + "doc": "Name of Instance dataflowEndpoint resource", + "type": { + "$id": "1696", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointResource.name", + "discriminator": false, + "flatten": false + }, + { + "$id": "1697", + "kind": "property", + "name": "extendedLocation", + "serializedName": "extendedLocation", + "doc": "Edge location of the resource.", + "type": { + "$ref": "512" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpointResource.extendedLocation", + "serializationOptions": { + "$id": "1698", + "json": { + "$id": "1699", + "name": "extendedLocation" + } + } + } + ] + }, + { + "$ref": "1399" + }, + { + "$ref": "1404" + }, + { + "$ref": "1406" + }, + { + "$ref": "1411" + }, + { + "$ref": "1419" + }, + { + "$ref": "1445" + }, + { + "$ref": "1459" + }, + { + "$ref": "1461" + }, + { + "$ref": "1466" + }, + { + "$ref": "1491" + }, + { + "$ref": "1493" + }, + { + "$ref": "1506" + }, + { + "$ref": "1530" + }, + { + "$ref": "1532" + }, + { + "$ref": "1543" + }, + { + "$ref": "1554" + }, + { + "$ref": "1572" + }, + { + "$ref": "1603" + }, + { + "$ref": "1619" + }, + { + "$ref": "1627" + }, + { + "$ref": "1629" + }, + { + "$ref": "1640" + }, + { + "$id": "1700", + "kind": "model", + "name": "DataflowEndpointResourceListResult", + "namespace": "Azure.ResourceManager.IotOperations", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult", + "usage": "Output,Json", + "doc": "The response of a DataflowEndpointResource list operation.", + "decorators": [], + "properties": [ + { + "$id": "1701", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The DataflowEndpointResource items on this page", + "type": { + "$id": "1702", + "kind": "array", + "name": "ArrayDataflowEndpointResource", + "valueType": { + "$ref": "1397" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", + "serializationOptions": { + "$id": "1703", + "json": { + "$id": "1704", + "name": "value" + } + } + }, + { + "$id": "1705", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "1706", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "1707", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.nextLink", + "serializationOptions": { + "$id": "1708", + "json": { + "$id": "1709", + "name": "nextLink" + } + } + } + ] + } + ], + "clients": [ + { + "$id": "1710", + "kind": "client", + "name": "IoTOperationsClient", + "namespace": "Azure.ResourceManager.IotOperations", + "doc": "Microsoft.IoTOperations Resource Provider management API.", + "methods": [], + "parameters": [ + { + "$id": "1711", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "1712", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "location": "Uri", + "isApiVersion": false, + "isContentType": false, + "isRequired": true, + "isEndpoint": true, + "skipUrlEncoding": false, + "explode": false, + "kind": "Client", + "defaultValue": { + "$id": "1713", + "type": { + "$id": "1714", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "1715", + "name": "TypeSpec.@service", + "arguments": { + "$id": "1716", + "options": { + "$id": "1717", + "title": "Microsoft.IoTOperations management service." + } + } + } + ], + "crossLanguageDefinitionId": "Microsoft.IoTOperations", + "apiVersions": [ + "2024-11-01", + "2025-04-01" + ], + "children": [ + { + "$id": "1718", + "kind": "client", + "name": "Operations", + "namespace": "Azure.ResourceManager.IotOperations", + "methods": [ + { + "$id": "1719", + "kind": "paging", + "name": "list", + "accessibility": "public", + "apiVersions": [ + "2024-11-01", + "2025-04-01" + ], + "doc": "List the operations for the provider", + "operation": { + "$id": "1720", + "name": "list", + "resourceName": "Operations", + "doc": "List the operations for the provider", + "accessibility": "public", + "parameters": [ + { + "$id": "1721", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1722", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1723", + "type": { + "$id": "1724", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-04-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1725", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1726", + "kind": "constant", + "valueType": { + "$id": "1727", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "1728", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "336" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/providers/Microsoft.IoTOperations/operations", + "bufferResponse": true, + "paging": { + "$id": "1729", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "1730", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Azure.ResourceManager.Operations.list", + "decorators": [], + "examples": [ + { + "$id": "1731", + "kind": "http", + "name": "Operations_List", + "description": "Operations_List", + "filePath": "2025-04-01/Operations_List_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "1732", + "parameter": { + "$ref": "1721" + }, + "value": { + "$id": "1733", + "kind": "string", + "type": { + "$ref": "1722" + }, + "value": "2025-04-01" + } + } + ], + "responses": [ + { + "$id": "1734", + "response": { + "$ref": "1728" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1735", + "kind": "model", + "type": { + "$ref": "336" + }, + "value": { + "$id": "1736", + "value": { + "$id": "1737", + "kind": "array", + "type": { + "$ref": "338" + }, + "value": [ + { + "$id": "1738", + "kind": "model", + "type": { + "$ref": "339" + }, + "value": { + "$id": "1739", + "name": { + "$id": "1740", + "kind": "string", + "type": { + "$ref": "341" + }, + "value": "xzxqfusky" + }, + "isDataAction": { + "$id": "1741", + "kind": "boolean", + "type": { + "$ref": "345" + }, + "value": true + }, + "display": { + "$id": "1742", + "kind": "model", + "type": { + "$ref": "349" + }, + "value": { + "$id": "1743", + "provider": { + "$id": "1744", + "kind": "string", + "type": { + "$ref": "351" + }, + "value": "lrveskajtuwf" + }, + "resource": { + "$id": "1745", + "kind": "string", + "type": { + "$ref": "355" + }, + "value": "d" + }, + "operation": { + "$id": "1746", + "kind": "string", + "type": { + "$ref": "359" + }, + "value": "icuckgobartrrgmirax" + }, + "description": { + "$id": "1747", + "kind": "string", + "type": { + "$ref": "363" + }, + "value": "dsbfnxzvnoqdm" + } + } + }, + "origin": { + "$id": "1748", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "user" + }, + "actionType": { + "$id": "1749", + "kind": "string", + "type": { + "$ref": "10" + }, + "value": "Internal" + } + } + } + ] + }, + "nextLink": { + "$id": "1750", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "https://microsoft.com/a" + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "1751", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "1726" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "1752", + "type": { + "$id": "1753", + "kind": "array", + "name": "ArrayOperation", + "valueType": { + "$ref": "339" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "resultSegments": [ + "value" + ] + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Azure.ResourceManager.Operations.list" + } + ], + "parameters": [ + { + "$id": "1754", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "1755", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "location": "Uri", + "isApiVersion": false, + "isContentType": false, + "isRequired": true, + "isEndpoint": true, + "skipUrlEncoding": false, + "explode": false, + "kind": "Client", + "defaultValue": { + "$id": "1756", + "type": { + "$id": "1757", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Operations", + "apiVersions": [ + "2024-11-01", + "2025-04-01" + ], + "parent": { + "$ref": "1710" + } + }, + { + "$id": "1758", + "kind": "client", + "name": "Instance", + "namespace": "Azure.ResourceManager.IotOperations", + "methods": [ + { + "$id": "1759", + "kind": "basic", + "name": "get", + "accessibility": "public", + "apiVersions": [ + "2024-11-01", + "2025-04-01" + ], + "doc": "Get a InstanceResource", + "operation": { + "$id": "1760", + "name": "get", + "resourceName": "InstanceResource", + "doc": "Get a InstanceResource", + "accessibility": "public", + "parameters": [ + { + "$id": "1761", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1762", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1763", + "type": { + "$id": "1764", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-04-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1765", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1766", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1767", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1768", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1769", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1770", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "1771", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1772", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1773", + "kind": "constant", + "valueType": { + "$id": "1774", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "1775", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "415" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Instance.get", + "decorators": [], + "examples": [ + { + "$id": "1776", + "kind": "http", + "name": "Instance_Get", + "description": "Instance_Get", + "filePath": "2025-04-01/Instance_Get_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "1777", + "parameter": { + "$ref": "1761" + }, + "value": { + "$id": "1778", + "kind": "string", + "type": { + "$ref": "1762" + }, + "value": "2025-04-01" + } + }, + { + "$id": "1779", + "parameter": { + "$ref": "1765" + }, + "value": { + "$id": "1780", + "kind": "string", + "type": { + "$ref": "1766" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "1781", + "parameter": { + "$ref": "1768" + }, + "value": { + "$id": "1782", + "kind": "string", + "type": { + "$ref": "1769" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "1783", + "parameter": { + "$ref": "1770" + }, + "value": { + "$id": "1784", + "kind": "string", + "type": { + "$ref": "1771" + }, + "value": "aio-instance" + } + } + ], + "responses": [ + { + "$id": "1785", + "response": { + "$ref": "1775" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1786", + "kind": "model", + "type": { + "$ref": "415" + }, + "value": { + "$id": "1787", + "properties": { + "$id": "1788", + "kind": "model", + "type": { + "$ref": "471" + }, + "value": { + "$id": "1789", + "schemaRegistryRef": { + "$id": "1790", + "kind": "model", + "type": { + "$ref": "484" + }, + "value": { + "$id": "1791", + "resourceId": { + "$id": "1792", + "kind": "string", + "type": { + "$ref": "486" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.DeviceRegistry/schemaRegistries/resource-name123" + } + } + }, + "description": { + "$id": "1793", + "kind": "string", + "type": { + "$ref": "473" + }, + "value": "rlfvvnnhcypp" + }, + "provisioningState": { + "$id": "1794", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + }, + "version": { + "$id": "1795", + "kind": "string", + "type": { + "$ref": "480" + }, + "value": "vjjbmunthiphfmekvxgxcxkzdwjti" + }, + "features": { + "$id": "1796", + "kind": "dict", + "type": { + "$ref": "494" + }, + "value": { + "$id": "1797", + "dataFlows": { + "$id": "1798", + "kind": "model", + "type": { + "$ref": "496" + }, + "value": { + "$id": "1799", + "mode": { + "$id": "1800", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "Disabled" + } + } + }, + "akri": { + "$id": "1801", + "kind": "model", + "type": { + "$ref": "496" + }, + "value": { + "$id": "1802", + "mode": { + "$id": "1803", + "kind": "string", + "type": { + "$ref": "30" + }, + "value": "Preview" + } + } + }, + "mqttBroker": { + "$id": "1804", + "kind": "model", + "type": { + "$ref": "496" + }, + "value": { + "$id": "1805", + "settings": { + "$id": "1806", + "kind": "dict", + "type": { + "$ref": "501" + }, + "value": { + "$id": "1807", + "preview": { + "$id": "1808", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + } + } + } + } + } + } + } + } + }, + "extendedLocation": { + "$id": "1809", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "1810", + "name": { + "$id": "1811", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "1812", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "identity": { + "$id": "1813", + "kind": "model", + "type": { + "$ref": "523" + }, + "value": { + "$id": "1814", + "type": { + "$id": "1815", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "None" + }, + "userAssignedIdentities": { + "$id": "1816", + "kind": "dict", + "type": { + "$ref": "538" + }, + "value": { + "$id": "1817" + } + }, + "principalId": { + "$id": "1818", + "kind": "string", + "type": { + "$ref": "525" + }, + "value": "4a6e4195-75b8-4685-aa0c-0b5704779327" + }, + "tenantId": { + "$id": "1819", + "kind": "string", + "type": { + "$ref": "530" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + }, + "tags": { + "$id": "1820", + "kind": "dict", + "type": { + "$ref": "461" + }, + "value": { + "$id": "1821" + } + }, + "location": { + "$id": "1822", + "kind": "string", + "type": { + "$ref": "467" + }, + "value": "xvewadyhycrjpu" + }, + "id": { + "$id": "1823", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123" + }, + "name": { + "$id": "1824", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "llptmlifnqqwairx" + }, + "type": { + "$id": "1825", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "qwrfzxjfxvismlqvigot" + }, + "systemData": { + "$id": "1826", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "1827", + "createdBy": { + "$id": "1828", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "1829", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "1830", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "1831", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "1832", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "1833", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "1834", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1835", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1836", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "1837", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1838", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "1773" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "1839", + "type": { + "$ref": "415" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Instance.get" + }, + { + "$id": "1840", + "kind": "lro", + "name": "createOrUpdate", + "accessibility": "public", + "apiVersions": [ + "2024-11-01", + "2025-04-01" + ], + "doc": "Create a InstanceResource", + "operation": { + "$id": "1841", + "name": "createOrUpdate", + "resourceName": "InstanceResource", + "doc": "Create a InstanceResource", + "accessibility": "public", + "parameters": [ + { + "$id": "1842", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1843", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1844", + "type": { + "$id": "1845", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-04-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1846", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1847", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1848", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1849", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1850", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1851", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "1852", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1853", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "1854", + "kind": "constant", + "valueType": { + "$id": "1855", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1856", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1857", + "kind": "constant", + "valueType": { + "$id": "1858", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1859", + "name": "resource", + "nameInRequest": "resource", + "doc": "Resource create parameters.", + "type": { + "$ref": "415" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "1860", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "415" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + { + "$id": "1861", + "statusCodes": [ + 201 + ], + "bodyType": { + "$ref": "415" + }, + "headers": [ + { + "$id": "1862", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "1863", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "1864", + "name": "retryAfter", + "nameInResponse": "Retry-After", + "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "type": { + "$id": "1865", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "PUT", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "longRunning": { + "$id": "1866", + "finalStateVia": 0, + "finalResponse": { + "$id": "1867", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "415" + } + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Instance.createOrUpdate", + "decorators": [], + "examples": [ + { + "$id": "1868", + "kind": "http", + "name": "Instance_CreateOrUpdate", + "description": "Instance_CreateOrUpdate", + "filePath": "2025-04-01/Instance_CreateOrUpdate_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "1869", + "parameter": { + "$ref": "1842" + }, + "value": { + "$id": "1870", + "kind": "string", + "type": { + "$ref": "1843" + }, + "value": "2025-04-01" + } + }, + { + "$id": "1871", + "parameter": { + "$ref": "1846" + }, + "value": { + "$id": "1872", + "kind": "string", + "type": { + "$ref": "1847" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "1873", + "parameter": { + "$ref": "1849" + }, + "value": { + "$id": "1874", + "kind": "string", + "type": { + "$ref": "1850" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "1875", + "parameter": { + "$ref": "1851" + }, + "value": { + "$id": "1876", + "kind": "string", + "type": { + "$ref": "1852" + }, + "value": "aio-instance" + } + }, + { + "$id": "1877", + "parameter": { + "$ref": "1859" + }, + "value": { + "$id": "1878", + "kind": "model", + "type": { + "$ref": "415" + }, + "value": { + "$id": "1879", + "properties": { + "$id": "1880", + "kind": "model", + "type": { + "$ref": "471" + }, + "value": { + "$id": "1881", + "schemaRegistryRef": { + "$id": "1882", + "kind": "model", + "type": { + "$ref": "484" + }, + "value": { + "$id": "1883", + "resourceId": { + "$id": "1884", + "kind": "string", + "type": { + "$ref": "486" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.DeviceRegistry/schemaRegistries/resource-name123" + } + } + }, + "description": { + "$id": "1885", + "kind": "string", + "type": { + "$ref": "473" + }, + "value": "kpqtgocs" + } + } + }, + "extendedLocation": { + "$id": "1886", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "1887", + "name": { + "$id": "1888", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "1889", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "identity": { + "$id": "1890", + "kind": "model", + "type": { + "$ref": "523" + }, + "value": { + "$id": "1891", + "type": { + "$id": "1892", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "None" + }, + "userAssignedIdentities": { + "$id": "1893", + "kind": "dict", + "type": { + "$ref": "538" + }, + "value": { + "$id": "1894" + } + } + } + }, + "tags": { + "$id": "1895", + "kind": "dict", + "type": { + "$ref": "461" + }, + "value": { + "$id": "1896" + } + }, + "location": { + "$id": "1897", + "kind": "string", + "type": { + "$ref": "467" + }, + "value": "xvewadyhycrjpu" + } + } + } + } + ], + "responses": [ + { + "$id": "1898", + "response": { + "$ref": "1860" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1899", + "kind": "model", + "type": { + "$ref": "415" + }, + "value": { + "$id": "1900", + "properties": { + "$id": "1901", + "kind": "model", + "type": { + "$ref": "471" + }, + "value": { + "$id": "1902", + "schemaRegistryRef": { + "$id": "1903", + "kind": "model", + "type": { + "$ref": "484" + }, + "value": { + "$id": "1904", + "resourceId": { + "$id": "1905", + "kind": "string", + "type": { + "$ref": "486" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.DeviceRegistry/schemaRegistries/resource-name123" + } + } + }, + "description": { + "$id": "1906", + "kind": "string", + "type": { + "$ref": "473" + }, + "value": "kpqtgocs" + }, + "provisioningState": { + "$id": "1907", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + }, + "version": { + "$id": "1908", + "kind": "string", + "type": { + "$ref": "480" + }, + "value": "vjjbmunthiphfmekvxgxcxkzdwjti" + } + } + }, + "extendedLocation": { + "$id": "1909", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "1910", + "name": { + "$id": "1911", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "1912", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "identity": { + "$id": "1913", + "kind": "model", + "type": { + "$ref": "523" + }, + "value": { + "$id": "1914", + "type": { + "$id": "1915", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "None" + }, + "userAssignedIdentities": { + "$id": "1916", + "kind": "dict", + "type": { + "$ref": "538" + }, + "value": { + "$id": "1917" + } + }, + "principalId": { + "$id": "1918", + "kind": "string", + "type": { + "$ref": "525" + }, + "value": "4a6e4195-75b8-4685-aa0c-0b5704779327" + }, + "tenantId": { + "$id": "1919", + "kind": "string", + "type": { + "$ref": "530" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + }, + "tags": { + "$id": "1920", + "kind": "dict", + "type": { + "$ref": "461" + }, + "value": { + "$id": "1921" + } + }, + "location": { + "$id": "1922", + "kind": "string", + "type": { + "$ref": "467" + }, + "value": "xvewadyhycrjpu" + }, + "id": { + "$id": "1923", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123" + }, + "name": { + "$id": "1924", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "llptmlifnqqwairx" + }, + "type": { + "$id": "1925", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "qwrfzxjfxvismlqvigot" + }, + "systemData": { + "$id": "1926", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "1927", + "createdBy": { + "$id": "1928", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "1929", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "1930", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "1931", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "1932", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "1933", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "1934", + "response": { + "$ref": "1861" + }, + "statusCode": 201, + "bodyValue": { + "$id": "1935", + "kind": "model", + "type": { + "$ref": "415" + }, + "value": { + "$id": "1936", + "properties": { + "$id": "1937", + "kind": "model", + "type": { + "$ref": "471" + }, + "value": { + "$id": "1938", + "schemaRegistryRef": { + "$id": "1939", + "kind": "model", + "type": { + "$ref": "484" + }, + "value": { + "$id": "1940", + "resourceId": { + "$id": "1941", + "kind": "string", + "type": { + "$ref": "486" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.DeviceRegistry/schemaRegistries/resource-name123" + } + } + }, + "description": { + "$id": "1942", + "kind": "string", + "type": { + "$ref": "473" + }, + "value": "kpqtgocs" + }, + "provisioningState": { + "$id": "1943", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + }, + "version": { + "$id": "1944", + "kind": "string", + "type": { + "$ref": "480" + }, + "value": "vjjbmunthiphfmekvxgxcxkzdwjti" + } + } + }, + "extendedLocation": { + "$id": "1945", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "1946", + "name": { + "$id": "1947", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "1948", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "identity": { + "$id": "1949", + "kind": "model", + "type": { + "$ref": "523" + }, + "value": { + "$id": "1950", + "type": { + "$id": "1951", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "None" + }, + "userAssignedIdentities": { + "$id": "1952", + "kind": "dict", + "type": { + "$ref": "538" + }, + "value": { + "$id": "1953" + } + }, + "principalId": { + "$id": "1954", + "kind": "string", + "type": { + "$ref": "525" + }, + "value": "4a6e4195-75b8-4685-aa0c-0b5704779327" + }, + "tenantId": { + "$id": "1955", + "kind": "string", + "type": { + "$ref": "530" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + }, + "tags": { + "$id": "1956", + "kind": "dict", + "type": { + "$ref": "461" + }, + "value": { + "$id": "1957" + } + }, + "location": { + "$id": "1958", + "kind": "string", + "type": { + "$ref": "467" + }, + "value": "xvewadyhycrjpu" + }, + "id": { + "$id": "1959", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123" + }, + "name": { + "$id": "1960", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "llptmlifnqqwairx" + }, + "type": { + "$id": "1961", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "qwrfzxjfxvismlqvigot" + }, + "systemData": { + "$id": "1962", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "1963", + "createdBy": { + "$id": "1964", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "1965", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "1966", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "1967", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "1968", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "1969", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "1970", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1971", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1972", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "1973", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1974", + "name": "resource", + "nameInRequest": "resource", + "doc": "Resource create parameters.", + "type": { + "$ref": "415" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1975", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "1976", + "kind": "constant", + "valueType": { + "$id": "1977", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1978", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "1979", + "kind": "constant", + "valueType": { + "$id": "1980", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "1981", + "type": { + "$ref": "415" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Instance.createOrUpdate" + }, + { + "$id": "1982", + "kind": "basic", + "name": "update", + "accessibility": "public", + "apiVersions": [ + "2024-11-01", + "2025-04-01" + ], + "doc": "Update a InstanceResource", + "operation": { + "$id": "1983", + "name": "update", + "resourceName": "InstanceResource", + "doc": "Update a InstanceResource", + "accessibility": "public", + "parameters": [ + { + "$id": "1984", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1985", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1986", + "type": { + "$id": "1987", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-04-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1988", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1989", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1990", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1991", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1992", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1993", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "1994", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1995", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "1996", + "kind": "constant", + "valueType": { + "$id": "1997", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1998", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1999", + "kind": "constant", + "valueType": { + "$id": "2000", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2001", + "name": "properties", + "nameInRequest": "properties", + "doc": "The resource properties to be updated.", + "type": { + "$ref": "583" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "2002", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "415" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "PATCH", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": false, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Instance.update", + "decorators": [], + "examples": [ + { + "$id": "2003", + "kind": "http", + "name": "Instance_Update", + "description": "Instance_Update", + "filePath": "2025-04-01/Instance_Update_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "2004", + "parameter": { + "$ref": "1984" + }, + "value": { + "$id": "2005", + "kind": "string", + "type": { + "$ref": "1985" + }, + "value": "2025-04-01" + } + }, + { + "$id": "2006", + "parameter": { + "$ref": "1988" + }, + "value": { + "$id": "2007", + "kind": "string", + "type": { + "$ref": "1989" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "2008", + "parameter": { + "$ref": "1991" + }, + "value": { + "$id": "2009", + "kind": "string", + "type": { + "$ref": "1992" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "2010", + "parameter": { + "$ref": "1993" + }, + "value": { + "$id": "2011", + "kind": "string", + "type": { + "$ref": "1994" + }, + "value": "aio-instance" + } + }, + { + "$id": "2012", + "parameter": { + "$ref": "2001" + }, + "value": { + "$id": "2013", + "kind": "model", + "type": { + "$ref": "583" + }, + "value": { + "$id": "2014", + "tags": { + "$id": "2015", + "kind": "dict", + "type": { + "$ref": "585" + }, + "value": { + "$id": "2016" + } + }, + "identity": { + "$id": "2017", + "kind": "model", + "type": { + "$ref": "523" + }, + "value": { + "$id": "2018", + "type": { + "$id": "2019", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "None" + }, + "userAssignedIdentities": { + "$id": "2020", + "kind": "dict", + "type": { + "$ref": "538" + }, + "value": { + "$id": "2021" + } + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "2022", + "response": { + "$ref": "2002" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2023", + "kind": "model", + "type": { + "$ref": "415" + }, + "value": { + "$id": "2024", + "properties": { + "$id": "2025", + "kind": "model", + "type": { + "$ref": "471" + }, + "value": { + "$id": "2026", + "schemaRegistryRef": { + "$id": "2027", + "kind": "model", + "type": { + "$ref": "484" + }, + "value": { + "$id": "2028", + "resourceId": { + "$id": "2029", + "kind": "string", + "type": { + "$ref": "486" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.DeviceRegistry/schemaRegistries/resource-name123" + } + } + }, + "description": { + "$id": "2030", + "kind": "string", + "type": { + "$ref": "473" + }, + "value": "wwihkapmgjbyrtyaj" + }, + "provisioningState": { + "$id": "2031", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + }, + "version": { + "$id": "2032", + "kind": "string", + "type": { + "$ref": "480" + }, + "value": "vjjbmunthiphfmekvxgxcxkzdwjti" + } + } + }, + "extendedLocation": { + "$id": "2033", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "2034", + "name": { + "$id": "2035", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "2036", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "identity": { + "$id": "2037", + "kind": "model", + "type": { + "$ref": "523" + }, + "value": { + "$id": "2038", + "type": { + "$id": "2039", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "None" + }, + "userAssignedIdentities": { + "$id": "2040", + "kind": "dict", + "type": { + "$ref": "538" + }, + "value": { + "$id": "2041" + } + }, + "principalId": { + "$id": "2042", + "kind": "string", + "type": { + "$ref": "525" + }, + "value": "4a6e4195-75b8-4685-aa0c-0b5704779327" + }, + "tenantId": { + "$id": "2043", + "kind": "string", + "type": { + "$ref": "530" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + }, + "tags": { + "$id": "2044", + "kind": "dict", + "type": { + "$ref": "461" + }, + "value": { + "$id": "2045" + } + }, + "location": { + "$id": "2046", + "kind": "string", + "type": { + "$ref": "467" + }, + "value": "xvewadyhycrjpu" + }, + "id": { + "$id": "2047", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123" + }, + "name": { + "$id": "2048", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "llptmlifnqqwairx" + }, + "type": { + "$id": "2049", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "qwrfzxjfxvismlqvigot" + }, + "systemData": { + "$id": "2050", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "2051", + "createdBy": { + "$id": "2052", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "2053", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "2054", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "2055", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "2056", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "2057", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "2058", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2059", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2060", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "2061", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2062", + "name": "properties", + "nameInRequest": "properties", + "doc": "The resource properties to be updated.", + "type": { + "$ref": "583" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2063", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$ref": "1996" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2064", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "1999" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "2065", + "type": { + "$ref": "415" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Instance.update" + }, + { + "$id": "2066", + "kind": "lro", + "name": "delete", + "accessibility": "public", + "apiVersions": [ + "2024-11-01", + "2025-04-01" + ], + "doc": "Delete a InstanceResource", + "operation": { + "$id": "2067", + "name": "delete", + "resourceName": "InstanceResource", + "doc": "Delete a InstanceResource", + "accessibility": "public", + "parameters": [ + { + "$id": "2068", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "2069", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "2070", + "type": { + "$id": "2071", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-04-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2072", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "2073", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "2074", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2075", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2076", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2077", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "2078", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2079", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "2080", + "kind": "constant", + "valueType": { + "$id": "2081", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "2082", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "2083", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "2084", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "2085", + "name": "retryAfter", + "nameInResponse": "Retry-After", + "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "type": { + "$id": "2086", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false + }, + { + "$id": "2087", + "statusCodes": [ + 204 + ], + "headers": [], + "isErrorResponse": false + } + ], + "httpMethod": "DELETE", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}", + "bufferResponse": true, + "longRunning": { + "$id": "2088", + "finalStateVia": 1, + "finalResponse": { + "$id": "2089", + "statusCodes": [ + 204 + ] + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Instance.delete", + "decorators": [], + "examples": [ + { + "$id": "2090", + "kind": "http", + "name": "Instance_Delete", + "description": "Instance_Delete", + "filePath": "2025-04-01/Instance_Delete_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "2091", + "parameter": { + "$ref": "2068" + }, + "value": { + "$id": "2092", + "kind": "string", + "type": { + "$ref": "2069" + }, + "value": "2025-04-01" + } + }, + { + "$id": "2093", + "parameter": { + "$ref": "2072" + }, + "value": { + "$id": "2094", + "kind": "string", + "type": { + "$ref": "2073" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "2095", + "parameter": { + "$ref": "2075" + }, + "value": { + "$id": "2096", + "kind": "string", + "type": { + "$ref": "2076" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "2097", + "parameter": { + "$ref": "2077" + }, + "value": { + "$id": "2098", + "kind": "string", + "type": { + "$ref": "2078" + }, + "value": "aio-instance" + } + } + ], + "responses": [ + { + "$id": "2099", + "response": { + "$ref": "2082" + }, + "statusCode": 202 + }, + { + "$id": "2100", + "response": { + "$ref": "2087" + }, + "statusCode": 204 + } + ] + } + ] + }, + "parameters": [ + { + "$id": "2101", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2102", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2103", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "2104", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2105", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "2106", + "kind": "constant", + "valueType": { + "$id": "2107", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "2108" + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Instance.delete" + }, + { + "$id": "2109", + "kind": "paging", + "name": "listByResourceGroup", + "accessibility": "public", + "apiVersions": [ + "2024-11-01", + "2025-04-01" + ], + "doc": "List InstanceResource resources by resource group", + "operation": { + "$id": "2110", + "name": "listByResourceGroup", + "resourceName": "InstanceResource", + "doc": "List InstanceResource resources by resource group", + "accessibility": "public", + "parameters": [ + { + "$id": "2111", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "2112", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "2113", + "type": { + "$id": "2114", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-04-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2115", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "2116", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "2117", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2118", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2119", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2120", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "2121", + "kind": "constant", + "valueType": { + "$id": "2122", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "2123", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "593" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances", + "bufferResponse": true, + "paging": { + "$id": "2124", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "2125", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Instance.listByResourceGroup", + "decorators": [], + "examples": [ + { + "$id": "2126", + "kind": "http", + "name": "Instance_ListByResourceGroup", + "description": "Instance_ListByResourceGroup", + "filePath": "2025-04-01/Instance_ListByResourceGroup_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "2127", + "parameter": { + "$ref": "2111" + }, + "value": { + "$id": "2128", + "kind": "string", + "type": { + "$ref": "2112" + }, + "value": "2025-04-01" + } + }, + { + "$id": "2129", + "parameter": { + "$ref": "2115" + }, + "value": { + "$id": "2130", + "kind": "string", + "type": { + "$ref": "2116" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "2131", + "parameter": { + "$ref": "2118" + }, + "value": { + "$id": "2132", + "kind": "string", + "type": { + "$ref": "2119" + }, + "value": "rgiotoperations" + } + } + ], + "responses": [ + { + "$id": "2133", + "response": { + "$ref": "2123" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2134", + "kind": "model", + "type": { + "$ref": "593" + }, + "value": { + "$id": "2135", + "value": { + "$id": "2136", + "kind": "array", + "type": { + "$ref": "595" + }, + "value": [ + { + "$id": "2137", + "kind": "model", + "type": { + "$ref": "415" + }, + "value": { + "$id": "2138", + "properties": { + "$id": "2139", + "kind": "model", + "type": { + "$ref": "471" + }, + "value": { + "$id": "2140", + "provisioningState": { + "$id": "2141", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + }, + "version": { + "$id": "2142", + "kind": "string", + "type": { + "$ref": "480" + }, + "value": "vjjbmunthiphfmekvxgxcxkzdwjti" + }, + "schemaRegistryRef": { + "$id": "2143", + "kind": "model", + "type": { + "$ref": "484" + }, + "value": { + "$id": "2144", + "resourceId": { + "$id": "2145", + "kind": "string", + "type": { + "$ref": "486" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.DeviceRegistry/schemaRegistries/resource-name123" + } + } + }, + "description": { + "$id": "2146", + "kind": "string", + "type": { + "$ref": "473" + }, + "value": "vmujggxdvxk" + } + } + }, + "extendedLocation": { + "$id": "2147", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "2148", + "name": { + "$id": "2149", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "2150", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "identity": { + "$id": "2151", + "kind": "model", + "type": { + "$ref": "523" + }, + "value": { + "$id": "2152", + "principalId": { + "$id": "2153", + "kind": "string", + "type": { + "$ref": "525" + }, + "value": "4a6e4195-75b8-4685-aa0c-0b5704779327" + }, + "tenantId": { + "$id": "2154", + "kind": "string", + "type": { + "$ref": "530" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + }, + "type": { + "$id": "2155", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "None" + }, + "userAssignedIdentities": { + "$id": "2156", + "kind": "dict", + "type": { + "$ref": "538" + }, + "value": { + "$id": "2157" + } + } + } + }, + "tags": { + "$id": "2158", + "kind": "dict", + "type": { + "$ref": "461" + }, + "value": { + "$id": "2159" + } + }, + "location": { + "$id": "2160", + "kind": "string", + "type": { + "$ref": "467" + }, + "value": "xvewadyhycrjpu" + }, + "id": { + "$id": "2161", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123" + }, + "name": { + "$id": "2162", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "llptmlifnqqwairx" + }, + "type": { + "$id": "2163", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "qwrfzxjfxvismlqvigot" + }, + "systemData": { + "$id": "2164", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "2165", + "createdBy": { + "$id": "2166", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "2167", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "2168", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "2169", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "2170", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "2171", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + ] + }, + "nextLink": { + "$id": "2172", + "kind": "string", + "type": { + "$ref": "599" + }, + "value": "https://microsoft.com/a" + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "2173", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2174", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2175", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "2121" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "2176", + "type": { + "$id": "2177", + "kind": "array", + "name": "ArrayInstanceResource", + "valueType": { + "$ref": "415" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "resultSegments": [ + "value" + ] + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Instance.listByResourceGroup" + }, + { + "$id": "2178", + "kind": "paging", + "name": "listBySubscription", + "accessibility": "public", + "apiVersions": [ + "2024-11-01", + "2025-04-01" + ], + "doc": "List InstanceResource resources by subscription ID", + "operation": { + "$id": "2179", + "name": "listBySubscription", + "resourceName": "InstanceResource", + "doc": "List InstanceResource resources by subscription ID", + "accessibility": "public", + "parameters": [ + { + "$id": "2180", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "2181", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "2182", + "type": { + "$id": "2183", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-04-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2184", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "2185", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "2186", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2187", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "2188", + "kind": "constant", + "valueType": { + "$id": "2189", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "2190", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "593" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/providers/Microsoft.IoTOperations/instances", + "bufferResponse": true, + "paging": { + "$id": "2191", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "2192", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Instance.listBySubscription", + "decorators": [], + "examples": [ + { + "$id": "2193", + "kind": "http", + "name": "Instance_ListBySubscription", + "description": "Instance_ListBySubscription", + "filePath": "2025-04-01/Instance_ListBySubscription_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "2194", + "parameter": { + "$ref": "2180" + }, + "value": { + "$id": "2195", + "kind": "string", + "type": { + "$ref": "2181" + }, + "value": "2025-04-01" + } + }, + { + "$id": "2196", + "parameter": { + "$ref": "2184" + }, + "value": { + "$id": "2197", + "kind": "string", + "type": { + "$ref": "2185" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + } + ], + "responses": [ + { + "$id": "2198", + "response": { + "$ref": "2190" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2199", + "kind": "model", + "type": { + "$ref": "593" + }, + "value": { + "$id": "2200", + "value": { + "$id": "2201", + "kind": "array", + "type": { + "$ref": "595" + }, + "value": [ + { + "$id": "2202", + "kind": "model", + "type": { + "$ref": "415" + }, + "value": { + "$id": "2203", + "properties": { + "$id": "2204", + "kind": "model", + "type": { + "$ref": "471" + }, + "value": { + "$id": "2205", + "provisioningState": { + "$id": "2206", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + }, + "version": { + "$id": "2207", + "kind": "string", + "type": { + "$ref": "480" + }, + "value": "vjjbmunthiphfmekvxgxcxkzdwjti" + }, + "schemaRegistryRef": { + "$id": "2208", + "kind": "model", + "type": { + "$ref": "484" + }, + "value": { + "$id": "2209", + "resourceId": { + "$id": "2210", + "kind": "string", + "type": { + "$ref": "486" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.DeviceRegistry/schemaRegistries/resource-name123" + } + } + }, + "description": { + "$id": "2211", + "kind": "string", + "type": { + "$ref": "473" + }, + "value": "empgqmbhvklcqlyahmdsjemlep" + } + } + }, + "extendedLocation": { + "$id": "2212", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "2213", + "name": { + "$id": "2214", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "2215", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "identity": { + "$id": "2216", + "kind": "model", + "type": { + "$ref": "523" + }, + "value": { + "$id": "2217", + "principalId": { + "$id": "2218", + "kind": "string", + "type": { + "$ref": "525" + }, + "value": "4a6e4195-75b8-4685-aa0c-0b5704779327" + }, + "tenantId": { + "$id": "2219", + "kind": "string", + "type": { + "$ref": "530" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + }, + "type": { + "$id": "2220", + "kind": "string", + "type": { + "$ref": "48" + }, + "value": "None" + }, + "userAssignedIdentities": { + "$id": "2221", + "kind": "dict", + "type": { + "$ref": "538" + }, + "value": { + "$id": "2222" + } + } + } + }, + "tags": { + "$id": "2223", + "kind": "dict", + "type": { + "$ref": "461" + }, + "value": { + "$id": "2224" + } + }, + "location": { + "$id": "2225", + "kind": "string", + "type": { + "$ref": "467" + }, + "value": "xvewadyhycrjpu" + }, + "id": { + "$id": "2226", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123" + }, + "name": { + "$id": "2227", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "llptmlifnqqwairx" + }, + "type": { + "$id": "2228", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "qwrfzxjfxvismlqvigot" + }, + "systemData": { + "$id": "2229", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "2230", + "createdBy": { + "$id": "2231", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "2232", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "2233", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "2234", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "2235", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "2236", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + ] + }, + "nextLink": { + "$id": "2237", + "kind": "string", + "type": { + "$ref": "599" + }, + "value": "https://microsoft.com/a" + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "2238", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "2188" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "2239", + "type": { + "$id": "2240", + "kind": "array", + "name": "ArrayInstanceResource", + "valueType": { + "$ref": "415" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "resultSegments": [ + "value" + ] + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Instance.listBySubscription" + } + ], + "parameters": [ + { + "$id": "2241", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "2242", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "location": "Uri", + "isApiVersion": false, + "isContentType": false, + "isRequired": true, + "isEndpoint": true, + "skipUrlEncoding": false, + "explode": false, + "kind": "Client", + "defaultValue": { + "$id": "2243", + "type": { + "$id": "2244", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "2245", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "2246" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Instance", + "apiVersions": [ + "2024-11-01", + "2025-04-01" + ], + "parent": { + "$ref": "1710" + } + }, + { + "$id": "2247", + "kind": "client", + "name": "Broker", + "namespace": "Azure.ResourceManager.IotOperations", + "methods": [ + { + "$id": "2248", + "kind": "basic", + "name": "get", + "accessibility": "public", + "apiVersions": [ + "2024-11-01", + "2025-04-01" + ], + "doc": "Get a BrokerResource", + "operation": { + "$id": "2249", + "name": "get", + "resourceName": "BrokerResource", + "doc": "Get a BrokerResource", + "accessibility": "public", + "parameters": [ + { + "$id": "2250", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "2251", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "2252", + "type": { + "$id": "2253", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-04-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2254", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "2255", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "2256", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2257", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2258", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2259", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "2260", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2261", + "name": "brokerName", + "nameInRequest": "brokerName", + "doc": "Name of broker.", + "type": { + "$id": "2262", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2263", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "2264", + "kind": "constant", + "valueType": { + "$id": "2265", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "2266", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "603" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/brokers/{brokerName}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Broker.get", + "decorators": [], + "examples": [ + { + "$id": "2267", + "kind": "http", + "name": "Broker_Get", + "description": "Broker_Get", + "filePath": "2025-04-01/Broker_Get_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "2268", + "parameter": { + "$ref": "2250" + }, + "value": { + "$id": "2269", + "kind": "string", + "type": { + "$ref": "2251" + }, + "value": "2025-04-01" + } + }, + { + "$id": "2270", + "parameter": { + "$ref": "2254" + }, + "value": { + "$id": "2271", + "kind": "string", + "type": { + "$ref": "2255" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "2272", + "parameter": { + "$ref": "2257" + }, + "value": { + "$id": "2273", + "kind": "string", + "type": { + "$ref": "2258" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "2274", + "parameter": { + "$ref": "2259" + }, + "value": { + "$id": "2275", + "kind": "string", + "type": { + "$ref": "2260" + }, + "value": "resource-name123" + } + }, + { + "$id": "2276", + "parameter": { + "$ref": "2261" + }, + "value": { + "$id": "2277", + "kind": "string", + "type": { + "$ref": "2262" + }, + "value": "resource-name123" + } + } + ], + "responses": [ + { + "$id": "2278", + "response": { + "$ref": "2266" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2279", + "kind": "model", + "type": { + "$ref": "603" + }, + "value": { + "$id": "2280", + "properties": { + "$id": "2281", + "kind": "model", + "type": { + "$ref": "606" + }, + "value": { + "$id": "2282", + "advanced": { + "$id": "2283", + "kind": "model", + "type": { + "$ref": "608" + }, + "value": { + "$id": "2284", + "clients": { + "$id": "2285", + "kind": "model", + "type": { + "$ref": "610" + }, + "value": { + "$id": "2286", + "maxSessionExpirySeconds": { + "$id": "2287", + "kind": "number", + "type": { + "$ref": "612" + }, + "value": 3859 + }, + "maxMessageExpirySeconds": { + "$id": "2288", + "kind": "number", + "type": { + "$ref": "616" + }, + "value": 3263 + }, + "maxPacketSizeBytes": { + "$id": "2289", + "kind": "number", + "type": { + "$ref": "620" + }, + "value": 3029 + }, + "subscriberQueueLimit": { + "$id": "2290", + "kind": "model", + "type": { + "$ref": "624" + }, + "value": { + "$id": "2291", + "length": { + "$id": "2292", + "kind": "number", + "type": { + "$ref": "626" + }, + "value": 6 + }, + "strategy": { + "$id": "2293", + "kind": "string", + "type": { + "$ref": "76" + }, + "value": "None" + } + } + }, + "maxReceiveMaximum": { + "$id": "2294", + "kind": "number", + "type": { + "$ref": "635" + }, + "value": 2365 + }, + "maxKeepAliveSeconds": { + "$id": "2295", + "kind": "number", + "type": { + "$ref": "639" + }, + "value": 3744 + } + } + }, + "encryptInternalTraffic": { + "$id": "2296", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "internalCerts": { + "$id": "2297", + "kind": "model", + "type": { + "$ref": "648" + }, + "value": { + "$id": "2298", + "duration": { + "$id": "2299", + "kind": "string", + "type": { + "$ref": "650" + }, + "value": "bchrc" + }, + "renewBefore": { + "$id": "2300", + "kind": "string", + "type": { + "$ref": "654" + }, + "value": "xkafmpgjfifkwwrhkswtopdnne" + }, + "privateKey": { + "$id": "2301", + "kind": "model", + "type": { + "$ref": "658" + }, + "value": { + "$id": "2302", + "algorithm": { + "$id": "2303", + "kind": "string", + "type": { + "$ref": "82" + }, + "value": "Ec256" + }, + "rotationPolicy": { + "$id": "2304", + "kind": "string", + "type": { + "$ref": "98" + }, + "value": "Always" + } + } + } + } + } + } + }, + "cardinality": { + "$id": "2305", + "kind": "model", + "type": { + "$ref": "672" + }, + "value": { + "$id": "2306", + "backendChain": { + "$id": "2307", + "kind": "model", + "type": { + "$ref": "674" + }, + "value": { + "$id": "2308", + "partitions": { + "$id": "2309", + "kind": "number", + "type": { + "$ref": "676" + }, + "value": 11 + }, + "redundancyFactor": { + "$id": "2310", + "kind": "number", + "type": { + "$ref": "680" + }, + "value": 5 + }, + "workers": { + "$id": "2311", + "kind": "number", + "type": { + "$ref": "684" + }, + "value": 15 + } + } + }, + "frontend": { + "$id": "2312", + "kind": "model", + "type": { + "$ref": "690" + }, + "value": { + "$id": "2313", + "replicas": { + "$id": "2314", + "kind": "number", + "type": { + "$ref": "692" + }, + "value": 2 + }, + "workers": { + "$id": "2315", + "kind": "number", + "type": { + "$ref": "696" + }, + "value": 6 + } + } + } + } + }, + "diagnostics": { + "$id": "2316", + "kind": "model", + "type": { + "$ref": "704" + }, + "value": { + "$id": "2317", + "logs": { + "$id": "2318", + "kind": "model", + "type": { + "$ref": "706" + }, + "value": { + "$id": "2319", + "level": { + "$id": "2320", + "kind": "string", + "type": { + "$ref": "708" + }, + "value": "rnmwokumdmebpmfxxxzvvjfdywotav" + } + } + }, + "metrics": { + "$id": "2321", + "kind": "model", + "type": { + "$ref": "714" + }, + "value": { + "$id": "2322", + "prometheusPort": { + "$id": "2323", + "kind": "number", + "type": { + "$ref": "716" + }, + "value": 7581 + } + } + }, + "selfCheck": { + "$id": "2324", + "kind": "model", + "type": { + "$ref": "722" + }, + "value": { + "$id": "2325", + "mode": { + "$id": "2326", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "intervalSeconds": { + "$id": "2327", + "kind": "number", + "type": { + "$ref": "727" + }, + "value": 158 + }, + "timeoutSeconds": { + "$id": "2328", + "kind": "number", + "type": { + "$ref": "731" + }, + "value": 14 + } + } + }, + "traces": { + "$id": "2329", + "kind": "model", + "type": { + "$ref": "737" + }, + "value": { + "$id": "2330", + "mode": { + "$id": "2331", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "cacheSizeMegabytes": { + "$id": "2332", + "kind": "number", + "type": { + "$ref": "742" + }, + "value": 28 + }, + "selfTracing": { + "$id": "2333", + "kind": "model", + "type": { + "$ref": "746" + }, + "value": { + "$id": "2334", + "mode": { + "$id": "2335", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "intervalSeconds": { + "$id": "2336", + "kind": "number", + "type": { + "$ref": "751" + }, + "value": 22 + } + } + }, + "spanChannelCapacity": { + "$id": "2337", + "kind": "number", + "type": { + "$ref": "757" + }, + "value": 1000 + } + } + } + } + }, + "diskBackedMessageBuffer": { + "$id": "2338", + "kind": "model", + "type": { + "$ref": "765" + }, + "value": { + "$id": "2339", + "maxSize": { + "$id": "2340", + "kind": "string", + "type": { + "$ref": "767" + }, + "value": "500M" + }, + "ephemeralVolumeClaimSpec": { + "$id": "2341", + "kind": "model", + "type": { + "$ref": "771" + }, + "value": { + "$id": "2342", + "volumeName": { + "$id": "2343", + "kind": "string", + "type": { + "$ref": "773" + }, + "value": "c" + }, + "volumeMode": { + "$id": "2344", + "kind": "string", + "type": { + "$ref": "777" + }, + "value": "rxvpksjuuugqnqzeiprocknbn" + }, + "storageClassName": { + "$id": "2345", + "kind": "string", + "type": { + "$ref": "781" + }, + "value": "sseyhrjptkhrqvpdpjmornkqvon" + }, + "accessModes": { + "$id": "2346", + "kind": "array", + "type": { + "$ref": "785" + }, + "value": [ + { + "$id": "2347", + "kind": "string", + "type": { + "$ref": "786" + }, + "value": "nuluhigrbb" + } + ] + }, + "dataSource": { + "$id": "2348", + "kind": "model", + "type": { + "$ref": "790" + }, + "value": { + "$id": "2349", + "apiGroup": { + "$id": "2350", + "kind": "string", + "type": { + "$ref": "792" + }, + "value": "npqapyksvvpkohujx" + }, + "kind": { + "$id": "2351", + "kind": "string", + "type": { + "$ref": "796" + }, + "value": "wazgyb" + }, + "name": { + "$id": "2352", + "kind": "string", + "type": { + "$ref": "800" + }, + "value": "cwhsgxxcxsyppoefm" + } + } + }, + "dataSourceRef": { + "$id": "2353", + "kind": "model", + "type": { + "$ref": "806" + }, + "value": { + "$id": "2354", + "apiGroup": { + "$id": "2355", + "kind": "string", + "type": { + "$ref": "808" + }, + "value": "mnfnykznjjsoqpfsgdqioupt" + }, + "kind": { + "$id": "2356", + "kind": "string", + "type": { + "$ref": "812" + }, + "value": "odynqzekfzsnawrctaxg" + }, + "name": { + "$id": "2357", + "kind": "string", + "type": { + "$ref": "816" + }, + "value": "envszivbbmixbyddzg" + }, + "namespace": { + "$id": "2358", + "kind": "string", + "type": { + "$ref": "820" + }, + "value": "etcfzvxqd" + } + } + }, + "resources": { + "$id": "2359", + "kind": "model", + "type": { + "$ref": "826" + }, + "value": { + "$id": "2360", + "limits": { + "$id": "2361", + "kind": "dict", + "type": { + "$ref": "828" + }, + "value": { + "$id": "2362", + "key2719": { + "$id": "2363", + "kind": "string", + "type": { + "$ref": "830" + }, + "value": "hmphcrgctu" + } + } + }, + "requests": { + "$id": "2364", + "kind": "dict", + "type": { + "$ref": "834" + }, + "value": { + "$id": "2365", + "key2909": { + "$id": "2366", + "kind": "string", + "type": { + "$ref": "836" + }, + "value": "txocprnyrsgvhfrg" + } + } + } + } + }, + "selector": { + "$id": "2367", + "kind": "model", + "type": { + "$ref": "842" + }, + "value": { + "$id": "2368", + "matchExpressions": { + "$id": "2369", + "kind": "array", + "type": { + "$ref": "844" + }, + "value": [ + { + "$id": "2370", + "kind": "model", + "type": { + "$ref": "845" + }, + "value": { + "$id": "2371", + "key": { + "$id": "2372", + "kind": "string", + "type": { + "$ref": "847" + }, + "value": "e" + }, + "operator": { + "$id": "2373", + "kind": "string", + "type": { + "$ref": "104" + }, + "value": "In" + }, + "values": { + "$id": "2374", + "kind": "array", + "type": { + "$ref": "854" + }, + "value": [ + { + "$id": "2375", + "kind": "string", + "type": { + "$ref": "855" + }, + "value": "slmpajlywqvuyknipgztsonqyybt" + } + ] + } + } + } + ] + }, + "matchLabels": { + "$id": "2376", + "kind": "dict", + "type": { + "$ref": "861" + }, + "value": { + "$id": "2377", + "key6673": { + "$id": "2378", + "kind": "string", + "type": { + "$ref": "863" + }, + "value": "wlngfalznwxnurzpgxomcxhbqefpr" + } + } + } + } + } + } + }, + "persistentVolumeClaimSpec": { + "$id": "2379", + "kind": "model", + "type": { + "$ref": "771" + }, + "value": { + "$id": "2380", + "volumeName": { + "$id": "2381", + "kind": "string", + "type": { + "$ref": "773" + }, + "value": "c" + }, + "volumeMode": { + "$id": "2382", + "kind": "string", + "type": { + "$ref": "777" + }, + "value": "rxvpksjuuugqnqzeiprocknbn" + }, + "storageClassName": { + "$id": "2383", + "kind": "string", + "type": { + "$ref": "781" + }, + "value": "sseyhrjptkhrqvpdpjmornkqvon" + }, + "accessModes": { + "$id": "2384", + "kind": "array", + "type": { + "$ref": "785" + }, + "value": [ + { + "$id": "2385", + "kind": "string", + "type": { + "$ref": "786" + }, + "value": "nuluhigrbb" + } + ] + }, + "dataSource": { + "$id": "2386", + "kind": "model", + "type": { + "$ref": "790" + }, + "value": { + "$id": "2387", + "apiGroup": { + "$id": "2388", + "kind": "string", + "type": { + "$ref": "792" + }, + "value": "npqapyksvvpkohujx" + }, + "kind": { + "$id": "2389", + "kind": "string", + "type": { + "$ref": "796" + }, + "value": "wazgyb" + }, + "name": { + "$id": "2390", + "kind": "string", + "type": { + "$ref": "800" + }, + "value": "cwhsgxxcxsyppoefm" + } + } + }, + "dataSourceRef": { + "$id": "2391", + "kind": "model", + "type": { + "$ref": "806" + }, + "value": { + "$id": "2392", + "apiGroup": { + "$id": "2393", + "kind": "string", + "type": { + "$ref": "808" + }, + "value": "mnfnykznjjsoqpfsgdqioupt" + }, + "kind": { + "$id": "2394", + "kind": "string", + "type": { + "$ref": "812" + }, + "value": "odynqzekfzsnawrctaxg" + }, + "name": { + "$id": "2395", + "kind": "string", + "type": { + "$ref": "816" + }, + "value": "envszivbbmixbyddzg" + }, + "namespace": { + "$id": "2396", + "kind": "string", + "type": { + "$ref": "820" + }, + "value": "etcfzvxqd" + } + } + }, + "resources": { + "$id": "2397", + "kind": "model", + "type": { + "$ref": "826" + }, + "value": { + "$id": "2398", + "limits": { + "$id": "2399", + "kind": "dict", + "type": { + "$ref": "828" + }, + "value": { + "$id": "2400", + "key2719": { + "$id": "2401", + "kind": "string", + "type": { + "$ref": "830" + }, + "value": "hmphcrgctu" + } + } + }, + "requests": { + "$id": "2402", + "kind": "dict", + "type": { + "$ref": "834" + }, + "value": { + "$id": "2403", + "key2909": { + "$id": "2404", + "kind": "string", + "type": { + "$ref": "836" + }, + "value": "txocprnyrsgvhfrg" + } + } + } + } + }, + "selector": { + "$id": "2405", + "kind": "model", + "type": { + "$ref": "842" + }, + "value": { + "$id": "2406", + "matchExpressions": { + "$id": "2407", + "kind": "array", + "type": { + "$ref": "844" + }, + "value": [ + { + "$id": "2408", + "kind": "model", + "type": { + "$ref": "845" + }, + "value": { + "$id": "2409", + "key": { + "$id": "2410", + "kind": "string", + "type": { + "$ref": "847" + }, + "value": "e" + }, + "operator": { + "$id": "2411", + "kind": "string", + "type": { + "$ref": "104" + }, + "value": "In" + }, + "values": { + "$id": "2412", + "kind": "array", + "type": { + "$ref": "854" + }, + "value": [ + { + "$id": "2413", + "kind": "string", + "type": { + "$ref": "855" + }, + "value": "slmpajlywqvuyknipgztsonqyybt" + } + ] + } + } + } + ] + }, + "matchLabels": { + "$id": "2414", + "kind": "dict", + "type": { + "$ref": "861" + }, + "value": { + "$id": "2415", + "key6673": { + "$id": "2416", + "kind": "string", + "type": { + "$ref": "863" + }, + "value": "wlngfalznwxnurzpgxomcxhbqefpr" + } + } + } + } + } + } + } + } + }, + "generateResourceLimits": { + "$id": "2417", + "kind": "model", + "type": { + "$ref": "876" + }, + "value": { + "$id": "2418", + "cpu": { + "$id": "2419", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + } + } + }, + "memoryProfile": { + "$id": "2420", + "kind": "string", + "type": { + "$ref": "114" + }, + "value": "Tiny" + }, + "provisioningState": { + "$id": "2421", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "2422", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "2423", + "name": { + "$id": "2424", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "2425", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "2426", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123" + }, + "name": { + "$id": "2427", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "dowrkel" + }, + "type": { + "$id": "2428", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "xshjnsdgadygb" + }, + "systemData": { + "$id": "2429", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "2430", + "createdBy": { + "$id": "2431", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "2432", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "2433", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "2434", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "2435", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "2436", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "2437", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2438", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2439", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "2440", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2441", + "name": "brokerName", + "nameInRequest": "brokerName", + "doc": "Name of broker.", + "type": { + "$id": "2442", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2443", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "2264" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "2444", + "type": { + "$ref": "603" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Broker.get" + }, + { + "$id": "2445", + "kind": "lro", + "name": "createOrUpdate", + "accessibility": "public", + "apiVersions": [ + "2024-11-01", + "2025-04-01" + ], + "doc": "Create a BrokerResource", + "operation": { + "$id": "2446", + "name": "createOrUpdate", + "resourceName": "BrokerResource", + "doc": "Create a BrokerResource", + "accessibility": "public", + "parameters": [ + { + "$id": "2447", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "2448", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "2449", + "type": { + "$id": "2450", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-04-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2451", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "2452", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "2453", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2454", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2455", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2456", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "2457", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2458", + "name": "brokerName", + "nameInRequest": "brokerName", + "doc": "Name of broker.", + "type": { + "$id": "2459", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2460", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "2461", + "kind": "constant", + "valueType": { + "$id": "2462", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2463", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "2464", + "kind": "constant", + "valueType": { + "$id": "2465", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2466", + "name": "resource", + "nameInRequest": "resource", + "doc": "Resource create parameters.", + "type": { + "$ref": "603" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "2467", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "603" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + { + "$id": "2468", + "statusCodes": [ + 201 + ], + "bodyType": { + "$ref": "603" + }, + "headers": [ + { + "$id": "2469", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "2470", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "2471", + "name": "retryAfter", + "nameInResponse": "Retry-After", + "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "type": { + "$id": "2472", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "PUT", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/brokers/{brokerName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "longRunning": { + "$id": "2473", + "finalStateVia": 0, + "finalResponse": { + "$id": "2474", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "603" + } + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Broker.createOrUpdate", + "decorators": [], + "examples": [ + { + "$id": "2475", + "kind": "http", + "name": "Broker_CreateOrUpdate_Complex", + "description": "Broker_CreateOrUpdate_Complex", + "filePath": "2025-04-01/Broker_CreateOrUpdate_Complex.json", + "parameters": [ + { + "$id": "2476", + "parameter": { + "$ref": "2447" + }, + "value": { + "$id": "2477", + "kind": "string", + "type": { + "$ref": "2448" + }, + "value": "2025-04-01" + } + }, + { + "$id": "2478", + "parameter": { + "$ref": "2451" + }, + "value": { + "$id": "2479", + "kind": "string", + "type": { + "$ref": "2452" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "2480", + "parameter": { + "$ref": "2454" + }, + "value": { + "$id": "2481", + "kind": "string", + "type": { + "$ref": "2455" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "2482", + "parameter": { + "$ref": "2456" + }, + "value": { + "$id": "2483", + "kind": "string", + "type": { + "$ref": "2457" + }, + "value": "resource-name123" + } + }, + { + "$id": "2484", + "parameter": { + "$ref": "2458" + }, + "value": { + "$id": "2485", + "kind": "string", + "type": { + "$ref": "2459" + }, + "value": "resource-name123" + } + }, + { + "$id": "2486", + "parameter": { + "$ref": "2466" + }, + "value": { + "$id": "2487", + "kind": "model", + "type": { + "$ref": "603" + }, + "value": { + "$id": "2488", + "properties": { + "$id": "2489", + "kind": "model", + "type": { + "$ref": "606" + }, + "value": { + "$id": "2490", + "cardinality": { + "$id": "2491", + "kind": "model", + "type": { + "$ref": "672" + }, + "value": { + "$id": "2492", + "backendChain": { + "$id": "2493", + "kind": "model", + "type": { + "$ref": "674" + }, + "value": { + "$id": "2494", + "partitions": { + "$id": "2495", + "kind": "number", + "type": { + "$ref": "676" + }, + "value": 2 + }, + "redundancyFactor": { + "$id": "2496", + "kind": "number", + "type": { + "$ref": "680" + }, + "value": 2 + }, + "workers": { + "$id": "2497", + "kind": "number", + "type": { + "$ref": "684" + }, + "value": 2 + } + } + }, + "frontend": { + "$id": "2498", + "kind": "model", + "type": { + "$ref": "690" + }, + "value": { + "$id": "2499", + "replicas": { + "$id": "2500", + "kind": "number", + "type": { + "$ref": "692" + }, + "value": 2 + }, + "workers": { + "$id": "2501", + "kind": "number", + "type": { + "$ref": "696" + }, + "value": 2 + } + } + } + } + }, + "diskBackedMessageBuffer": { + "$id": "2502", + "kind": "model", + "type": { + "$ref": "765" + }, + "value": { + "$id": "2503", + "maxSize": { + "$id": "2504", + "kind": "string", + "type": { + "$ref": "767" + }, + "value": "50M" + } + } + }, + "generateResourceLimits": { + "$id": "2505", + "kind": "model", + "type": { + "$ref": "876" + }, + "value": { + "$id": "2506", + "cpu": { + "$id": "2507", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + } + } + }, + "memoryProfile": { + "$id": "2508", + "kind": "string", + "type": { + "$ref": "114" + }, + "value": "Medium" + } + } + }, + "extendedLocation": { + "$id": "2509", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "2510", + "name": { + "$id": "2511", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "2512", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "2513", + "response": { + "$ref": "2467" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2514", + "kind": "model", + "type": { + "$ref": "603" + }, + "value": { + "$id": "2515", + "properties": { + "$id": "2516", + "kind": "model", + "type": { + "$ref": "606" + }, + "value": { + "$id": "2517", + "cardinality": { + "$id": "2518", + "kind": "model", + "type": { + "$ref": "672" + }, + "value": { + "$id": "2519", + "backendChain": { + "$id": "2520", + "kind": "model", + "type": { + "$ref": "674" + }, + "value": { + "$id": "2521", + "partitions": { + "$id": "2522", + "kind": "number", + "type": { + "$ref": "676" + }, + "value": 2 + }, + "redundancyFactor": { + "$id": "2523", + "kind": "number", + "type": { + "$ref": "680" + }, + "value": 2 + }, + "workers": { + "$id": "2524", + "kind": "number", + "type": { + "$ref": "684" + }, + "value": 2 + } + } + }, + "frontend": { + "$id": "2525", + "kind": "model", + "type": { + "$ref": "690" + }, + "value": { + "$id": "2526", + "replicas": { + "$id": "2527", + "kind": "number", + "type": { + "$ref": "692" + }, + "value": 2 + }, + "workers": { + "$id": "2528", + "kind": "number", + "type": { + "$ref": "696" + }, + "value": 2 + } + } + } + } + }, + "diskBackedMessageBuffer": { + "$id": "2529", + "kind": "model", + "type": { + "$ref": "765" + }, + "value": { + "$id": "2530", + "maxSize": { + "$id": "2531", + "kind": "string", + "type": { + "$ref": "767" + }, + "value": "50M" + } + } + }, + "generateResourceLimits": { + "$id": "2532", + "kind": "model", + "type": { + "$ref": "876" + }, + "value": { + "$id": "2533", + "cpu": { + "$id": "2534", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + } + } + }, + "memoryProfile": { + "$id": "2535", + "kind": "string", + "type": { + "$ref": "114" + }, + "value": "Medium" + }, + "provisioningState": { + "$id": "2536", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "2537", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "2538", + "name": { + "$id": "2539", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "2540", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "2541", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123" + }, + "name": { + "$id": "2542", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "llptmlifnqqwairx" + }, + "type": { + "$id": "2543", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "qwrfzxjfxvismlqvigot" + }, + "systemData": { + "$id": "2544", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "2545", + "createdBy": { + "$id": "2546", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "2547", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "2548", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "2549", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "2550", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "2551", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "2552", + "response": { + "$ref": "2468" + }, + "statusCode": 201, + "bodyValue": { + "$id": "2553", + "kind": "model", + "type": { + "$ref": "603" + }, + "value": { + "$id": "2554", + "properties": { + "$id": "2555", + "kind": "model", + "type": { + "$ref": "606" + }, + "value": { + "$id": "2556", + "cardinality": { + "$id": "2557", + "kind": "model", + "type": { + "$ref": "672" + }, + "value": { + "$id": "2558", + "backendChain": { + "$id": "2559", + "kind": "model", + "type": { + "$ref": "674" + }, + "value": { + "$id": "2560", + "partitions": { + "$id": "2561", + "kind": "number", + "type": { + "$ref": "676" + }, + "value": 2 + }, + "redundancyFactor": { + "$id": "2562", + "kind": "number", + "type": { + "$ref": "680" + }, + "value": 2 + }, + "workers": { + "$id": "2563", + "kind": "number", + "type": { + "$ref": "684" + }, + "value": 2 + } + } + }, + "frontend": { + "$id": "2564", + "kind": "model", + "type": { + "$ref": "690" + }, + "value": { + "$id": "2565", + "replicas": { + "$id": "2566", + "kind": "number", + "type": { + "$ref": "692" + }, + "value": 2 + }, + "workers": { + "$id": "2567", + "kind": "number", + "type": { + "$ref": "696" + }, + "value": 2 + } + } + } + } + }, + "diskBackedMessageBuffer": { + "$id": "2568", + "kind": "model", + "type": { + "$ref": "765" + }, + "value": { + "$id": "2569", + "maxSize": { + "$id": "2570", + "kind": "string", + "type": { + "$ref": "767" + }, + "value": "50M" + } + } + }, + "generateResourceLimits": { + "$id": "2571", + "kind": "model", + "type": { + "$ref": "876" + }, + "value": { + "$id": "2572", + "cpu": { + "$id": "2573", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + } + } + }, + "memoryProfile": { + "$id": "2574", + "kind": "string", + "type": { + "$ref": "114" + }, + "value": "Medium" + }, + "provisioningState": { + "$id": "2575", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Accepted" + } + } + }, + "extendedLocation": { + "$id": "2576", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "2577", + "name": { + "$id": "2578", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "2579", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "2580", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123" + }, + "name": { + "$id": "2581", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "llptmlifnqqwairx" + }, + "type": { + "$id": "2582", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "qwrfzxjfxvismlqvigot" + }, + "systemData": { + "$id": "2583", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "2584", + "createdBy": { + "$id": "2585", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "2586", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "2587", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "2588", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "2589", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "2590", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + }, + { + "$id": "2591", + "kind": "http", + "name": "Broker_CreateOrUpdate", + "description": "Broker_CreateOrUpdate", + "filePath": "2025-04-01/Broker_CreateOrUpdate_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "2592", + "parameter": { + "$ref": "2447" + }, + "value": { + "$id": "2593", + "kind": "string", + "type": { + "$ref": "2448" + }, + "value": "2025-04-01" + } + }, + { + "$id": "2594", + "parameter": { + "$ref": "2451" + }, + "value": { + "$id": "2595", + "kind": "string", + "type": { + "$ref": "2452" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "2596", + "parameter": { + "$ref": "2454" + }, + "value": { + "$id": "2597", + "kind": "string", + "type": { + "$ref": "2455" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "2598", + "parameter": { + "$ref": "2456" + }, + "value": { + "$id": "2599", + "kind": "string", + "type": { + "$ref": "2457" + }, + "value": "resource-name123" + } + }, + { + "$id": "2600", + "parameter": { + "$ref": "2458" + }, + "value": { + "$id": "2601", + "kind": "string", + "type": { + "$ref": "2459" + }, + "value": "resource-name123" + } + }, + { + "$id": "2602", + "parameter": { + "$ref": "2466" + }, + "value": { + "$id": "2603", + "kind": "model", + "type": { + "$ref": "603" + }, + "value": { + "$id": "2604", + "properties": { + "$id": "2605", + "kind": "model", + "type": { + "$ref": "606" + }, + "value": { + "$id": "2606", + "advanced": { + "$id": "2607", + "kind": "model", + "type": { + "$ref": "608" + }, + "value": { + "$id": "2608", + "clients": { + "$id": "2609", + "kind": "model", + "type": { + "$ref": "610" + }, + "value": { + "$id": "2610", + "maxSessionExpirySeconds": { + "$id": "2611", + "kind": "number", + "type": { + "$ref": "612" + }, + "value": 3859 + }, + "maxMessageExpirySeconds": { + "$id": "2612", + "kind": "number", + "type": { + "$ref": "616" + }, + "value": 3263 + }, + "maxPacketSizeBytes": { + "$id": "2613", + "kind": "number", + "type": { + "$ref": "620" + }, + "value": 3029 + }, + "subscriberQueueLimit": { + "$id": "2614", + "kind": "model", + "type": { + "$ref": "624" + }, + "value": { + "$id": "2615", + "length": { + "$id": "2616", + "kind": "number", + "type": { + "$ref": "626" + }, + "value": 6 + }, + "strategy": { + "$id": "2617", + "kind": "string", + "type": { + "$ref": "76" + }, + "value": "None" + } + } + }, + "maxReceiveMaximum": { + "$id": "2618", + "kind": "number", + "type": { + "$ref": "635" + }, + "value": 2365 + }, + "maxKeepAliveSeconds": { + "$id": "2619", + "kind": "number", + "type": { + "$ref": "639" + }, + "value": 3744 + } + } + }, + "encryptInternalTraffic": { + "$id": "2620", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "internalCerts": { + "$id": "2621", + "kind": "model", + "type": { + "$ref": "648" + }, + "value": { + "$id": "2622", + "duration": { + "$id": "2623", + "kind": "string", + "type": { + "$ref": "650" + }, + "value": "bchrc" + }, + "renewBefore": { + "$id": "2624", + "kind": "string", + "type": { + "$ref": "654" + }, + "value": "xkafmpgjfifkwwrhkswtopdnne" + }, + "privateKey": { + "$id": "2625", + "kind": "model", + "type": { + "$ref": "658" + }, + "value": { + "$id": "2626", + "algorithm": { + "$id": "2627", + "kind": "string", + "type": { + "$ref": "82" + }, + "value": "Ec256" + }, + "rotationPolicy": { + "$id": "2628", + "kind": "string", + "type": { + "$ref": "98" + }, + "value": "Always" + } + } + } + } + } + } + }, + "cardinality": { + "$id": "2629", + "kind": "model", + "type": { + "$ref": "672" + }, + "value": { + "$id": "2630", + "backendChain": { + "$id": "2631", + "kind": "model", + "type": { + "$ref": "674" + }, + "value": { + "$id": "2632", + "partitions": { + "$id": "2633", + "kind": "number", + "type": { + "$ref": "676" + }, + "value": 11 + }, + "redundancyFactor": { + "$id": "2634", + "kind": "number", + "type": { + "$ref": "680" + }, + "value": 5 + }, + "workers": { + "$id": "2635", + "kind": "number", + "type": { + "$ref": "684" + }, + "value": 15 + } + } + }, + "frontend": { + "$id": "2636", + "kind": "model", + "type": { + "$ref": "690" + }, + "value": { + "$id": "2637", + "replicas": { + "$id": "2638", + "kind": "number", + "type": { + "$ref": "692" + }, + "value": 2 + }, + "workers": { + "$id": "2639", + "kind": "number", + "type": { + "$ref": "696" + }, + "value": 6 + } + } + } + } + }, + "diagnostics": { + "$id": "2640", + "kind": "model", + "type": { + "$ref": "704" + }, + "value": { + "$id": "2641", + "logs": { + "$id": "2642", + "kind": "model", + "type": { + "$ref": "706" + }, + "value": { + "$id": "2643", + "level": { + "$id": "2644", + "kind": "string", + "type": { + "$ref": "708" + }, + "value": "rnmwokumdmebpmfxxxzvvjfdywotav" + } + } + }, + "metrics": { + "$id": "2645", + "kind": "model", + "type": { + "$ref": "714" + }, + "value": { + "$id": "2646", + "prometheusPort": { + "$id": "2647", + "kind": "number", + "type": { + "$ref": "716" + }, + "value": 7581 + } + } + }, + "selfCheck": { + "$id": "2648", + "kind": "model", + "type": { + "$ref": "722" + }, + "value": { + "$id": "2649", + "mode": { + "$id": "2650", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "intervalSeconds": { + "$id": "2651", + "kind": "number", + "type": { + "$ref": "727" + }, + "value": 158 + }, + "timeoutSeconds": { + "$id": "2652", + "kind": "number", + "type": { + "$ref": "731" + }, + "value": 14 + } + } + }, + "traces": { + "$id": "2653", + "kind": "model", + "type": { + "$ref": "737" + }, + "value": { + "$id": "2654", + "mode": { + "$id": "2655", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "cacheSizeMegabytes": { + "$id": "2656", + "kind": "number", + "type": { + "$ref": "742" + }, + "value": 28 + }, + "selfTracing": { + "$id": "2657", + "kind": "model", + "type": { + "$ref": "746" + }, + "value": { + "$id": "2658", + "mode": { + "$id": "2659", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "intervalSeconds": { + "$id": "2660", + "kind": "number", + "type": { + "$ref": "751" + }, + "value": 22 + } + } + }, + "spanChannelCapacity": { + "$id": "2661", + "kind": "number", + "type": { + "$ref": "757" + }, + "value": 1000 + } + } + } + } + }, + "diskBackedMessageBuffer": { + "$id": "2662", + "kind": "model", + "type": { + "$ref": "765" + }, + "value": { + "$id": "2663", + "maxSize": { + "$id": "2664", + "kind": "string", + "type": { + "$ref": "767" + }, + "value": "500M" + }, + "ephemeralVolumeClaimSpec": { + "$id": "2665", + "kind": "model", + "type": { + "$ref": "771" + }, + "value": { + "$id": "2666", + "volumeName": { + "$id": "2667", + "kind": "string", + "type": { + "$ref": "773" + }, + "value": "c" + }, + "volumeMode": { + "$id": "2668", + "kind": "string", + "type": { + "$ref": "777" + }, + "value": "rxvpksjuuugqnqzeiprocknbn" + }, + "storageClassName": { + "$id": "2669", + "kind": "string", + "type": { + "$ref": "781" + }, + "value": "sseyhrjptkhrqvpdpjmornkqvon" + }, + "accessModes": { + "$id": "2670", + "kind": "array", + "type": { + "$ref": "785" + }, + "value": [ + { + "$id": "2671", + "kind": "string", + "type": { + "$ref": "786" + }, + "value": "nuluhigrbb" + } + ] + }, + "dataSource": { + "$id": "2672", + "kind": "model", + "type": { + "$ref": "790" + }, + "value": { + "$id": "2673", + "apiGroup": { + "$id": "2674", + "kind": "string", + "type": { + "$ref": "792" + }, + "value": "npqapyksvvpkohujx" + }, + "kind": { + "$id": "2675", + "kind": "string", + "type": { + "$ref": "796" + }, + "value": "wazgyb" + }, + "name": { + "$id": "2676", + "kind": "string", + "type": { + "$ref": "800" + }, + "value": "cwhsgxxcxsyppoefm" + } + } + }, + "dataSourceRef": { + "$id": "2677", + "kind": "model", + "type": { + "$ref": "806" + }, + "value": { + "$id": "2678", + "apiGroup": { + "$id": "2679", + "kind": "string", + "type": { + "$ref": "808" + }, + "value": "mnfnykznjjsoqpfsgdqioupt" + }, + "kind": { + "$id": "2680", + "kind": "string", + "type": { + "$ref": "812" + }, + "value": "odynqzekfzsnawrctaxg" + }, + "name": { + "$id": "2681", + "kind": "string", + "type": { + "$ref": "816" + }, + "value": "envszivbbmixbyddzg" + }, + "namespace": { + "$id": "2682", + "kind": "string", + "type": { + "$ref": "820" + }, + "value": "etcfzvxqd" + } + } + }, + "resources": { + "$id": "2683", + "kind": "model", + "type": { + "$ref": "826" + }, + "value": { + "$id": "2684", + "limits": { + "$id": "2685", + "kind": "dict", + "type": { + "$ref": "828" + }, + "value": { + "$id": "2686", + "key2719": { + "$id": "2687", + "kind": "string", + "type": { + "$ref": "830" + }, + "value": "hmphcrgctu" + } + } + }, + "requests": { + "$id": "2688", + "kind": "dict", + "type": { + "$ref": "834" + }, + "value": { + "$id": "2689", + "key2909": { + "$id": "2690", + "kind": "string", + "type": { + "$ref": "836" + }, + "value": "txocprnyrsgvhfrg" + } + } + } + } + }, + "selector": { + "$id": "2691", + "kind": "model", + "type": { + "$ref": "842" + }, + "value": { + "$id": "2692", + "matchExpressions": { + "$id": "2693", + "kind": "array", + "type": { + "$ref": "844" + }, + "value": [ + { + "$id": "2694", + "kind": "model", + "type": { + "$ref": "845" + }, + "value": { + "$id": "2695", + "key": { + "$id": "2696", + "kind": "string", + "type": { + "$ref": "847" + }, + "value": "e" + }, + "operator": { + "$id": "2697", + "kind": "string", + "type": { + "$ref": "104" + }, + "value": "In" + }, + "values": { + "$id": "2698", + "kind": "array", + "type": { + "$ref": "854" + }, + "value": [ + { + "$id": "2699", + "kind": "string", + "type": { + "$ref": "855" + }, + "value": "slmpajlywqvuyknipgztsonqyybt" + } + ] + } + } + } + ] + }, + "matchLabels": { + "$id": "2700", + "kind": "dict", + "type": { + "$ref": "861" + }, + "value": { + "$id": "2701", + "key6673": { + "$id": "2702", + "kind": "string", + "type": { + "$ref": "863" + }, + "value": "wlngfalznwxnurzpgxomcxhbqefpr" + } + } + } + } + } + } + }, + "persistentVolumeClaimSpec": { + "$id": "2703", + "kind": "model", + "type": { + "$ref": "771" + }, + "value": { + "$id": "2704", + "volumeName": { + "$id": "2705", + "kind": "string", + "type": { + "$ref": "773" + }, + "value": "c" + }, + "volumeMode": { + "$id": "2706", + "kind": "string", + "type": { + "$ref": "777" + }, + "value": "rxvpksjuuugqnqzeiprocknbn" + }, + "storageClassName": { + "$id": "2707", + "kind": "string", + "type": { + "$ref": "781" + }, + "value": "sseyhrjptkhrqvpdpjmornkqvon" + }, + "accessModes": { + "$id": "2708", + "kind": "array", + "type": { + "$ref": "785" + }, + "value": [ + { + "$id": "2709", + "kind": "string", + "type": { + "$ref": "786" + }, + "value": "nuluhigrbb" + } + ] + }, + "dataSource": { + "$id": "2710", + "kind": "model", + "type": { + "$ref": "790" + }, + "value": { + "$id": "2711", + "apiGroup": { + "$id": "2712", + "kind": "string", + "type": { + "$ref": "792" + }, + "value": "npqapyksvvpkohujx" + }, + "kind": { + "$id": "2713", + "kind": "string", + "type": { + "$ref": "796" + }, + "value": "wazgyb" + }, + "name": { + "$id": "2714", + "kind": "string", + "type": { + "$ref": "800" + }, + "value": "cwhsgxxcxsyppoefm" + } + } + }, + "dataSourceRef": { + "$id": "2715", + "kind": "model", + "type": { + "$ref": "806" + }, + "value": { + "$id": "2716", + "apiGroup": { + "$id": "2717", + "kind": "string", + "type": { + "$ref": "808" + }, + "value": "mnfnykznjjsoqpfsgdqioupt" + }, + "kind": { + "$id": "2718", + "kind": "string", + "type": { + "$ref": "812" + }, + "value": "odynqzekfzsnawrctaxg" + }, + "name": { + "$id": "2719", + "kind": "string", + "type": { + "$ref": "816" + }, + "value": "envszivbbmixbyddzg" + }, + "namespace": { + "$id": "2720", + "kind": "string", + "type": { + "$ref": "820" + }, + "value": "etcfzvxqd" + } + } + }, + "resources": { + "$id": "2721", + "kind": "model", + "type": { + "$ref": "826" + }, + "value": { + "$id": "2722", + "limits": { + "$id": "2723", + "kind": "dict", + "type": { + "$ref": "828" + }, + "value": { + "$id": "2724", + "key2719": { + "$id": "2725", + "kind": "string", + "type": { + "$ref": "830" + }, + "value": "hmphcrgctu" + } + } + }, + "requests": { + "$id": "2726", + "kind": "dict", + "type": { + "$ref": "834" + }, + "value": { + "$id": "2727", + "key2909": { + "$id": "2728", + "kind": "string", + "type": { + "$ref": "836" + }, + "value": "txocprnyrsgvhfrg" + } + } + } + } + }, + "selector": { + "$id": "2729", + "kind": "model", + "type": { + "$ref": "842" + }, + "value": { + "$id": "2730", + "matchExpressions": { + "$id": "2731", + "kind": "array", + "type": { + "$ref": "844" + }, + "value": [ + { + "$id": "2732", + "kind": "model", + "type": { + "$ref": "845" + }, + "value": { + "$id": "2733", + "key": { + "$id": "2734", + "kind": "string", + "type": { + "$ref": "847" + }, + "value": "e" + }, + "operator": { + "$id": "2735", + "kind": "string", + "type": { + "$ref": "104" + }, + "value": "In" + }, + "values": { + "$id": "2736", + "kind": "array", + "type": { + "$ref": "854" + }, + "value": [ + { + "$id": "2737", + "kind": "string", + "type": { + "$ref": "855" + }, + "value": "slmpajlywqvuyknipgztsonqyybt" + } + ] + } + } + } + ] + }, + "matchLabels": { + "$id": "2738", + "kind": "dict", + "type": { + "$ref": "861" + }, + "value": { + "$id": "2739", + "key6673": { + "$id": "2740", + "kind": "string", + "type": { + "$ref": "863" + }, + "value": "wlngfalznwxnurzpgxomcxhbqefpr" + } + } + } + } + } + } + } + } + }, + "generateResourceLimits": { + "$id": "2741", + "kind": "model", + "type": { + "$ref": "876" + }, + "value": { + "$id": "2742", + "cpu": { + "$id": "2743", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + } + } + }, + "memoryProfile": { + "$id": "2744", + "kind": "string", + "type": { + "$ref": "114" + }, + "value": "Tiny" + } + } + }, + "extendedLocation": { + "$id": "2745", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "2746", + "name": { + "$id": "2747", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "2748", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "2749", + "response": { + "$ref": "2467" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2750", + "kind": "model", + "type": { + "$ref": "603" + }, + "value": { + "$id": "2751", + "properties": { + "$id": "2752", + "kind": "model", + "type": { + "$ref": "606" + }, + "value": { + "$id": "2753", + "advanced": { + "$id": "2754", + "kind": "model", + "type": { + "$ref": "608" + }, + "value": { + "$id": "2755", + "clients": { + "$id": "2756", + "kind": "model", + "type": { + "$ref": "610" + }, + "value": { + "$id": "2757", + "maxSessionExpirySeconds": { + "$id": "2758", + "kind": "number", + "type": { + "$ref": "612" + }, + "value": 3859 + }, + "maxMessageExpirySeconds": { + "$id": "2759", + "kind": "number", + "type": { + "$ref": "616" + }, + "value": 3263 + }, + "maxPacketSizeBytes": { + "$id": "2760", + "kind": "number", + "type": { + "$ref": "620" + }, + "value": 3029 + }, + "subscriberQueueLimit": { + "$id": "2761", + "kind": "model", + "type": { + "$ref": "624" + }, + "value": { + "$id": "2762", + "length": { + "$id": "2763", + "kind": "number", + "type": { + "$ref": "626" + }, + "value": 6 + }, + "strategy": { + "$id": "2764", + "kind": "string", + "type": { + "$ref": "76" + }, + "value": "None" + } + } + }, + "maxReceiveMaximum": { + "$id": "2765", + "kind": "number", + "type": { + "$ref": "635" + }, + "value": 2365 + }, + "maxKeepAliveSeconds": { + "$id": "2766", + "kind": "number", + "type": { + "$ref": "639" + }, + "value": 3744 + } + } + }, + "encryptInternalTraffic": { + "$id": "2767", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "internalCerts": { + "$id": "2768", + "kind": "model", + "type": { + "$ref": "648" + }, + "value": { + "$id": "2769", + "duration": { + "$id": "2770", + "kind": "string", + "type": { + "$ref": "650" + }, + "value": "bchrc" + }, + "renewBefore": { + "$id": "2771", + "kind": "string", + "type": { + "$ref": "654" + }, + "value": "xkafmpgjfifkwwrhkswtopdnne" + }, + "privateKey": { + "$id": "2772", + "kind": "model", + "type": { + "$ref": "658" + }, + "value": { + "$id": "2773", + "algorithm": { + "$id": "2774", + "kind": "string", + "type": { + "$ref": "82" + }, + "value": "Ec256" + }, + "rotationPolicy": { + "$id": "2775", + "kind": "string", + "type": { + "$ref": "98" + }, + "value": "Always" + } + } + } + } + } + } + }, + "cardinality": { + "$id": "2776", + "kind": "model", + "type": { + "$ref": "672" + }, + "value": { + "$id": "2777", + "backendChain": { + "$id": "2778", + "kind": "model", + "type": { + "$ref": "674" + }, + "value": { + "$id": "2779", + "partitions": { + "$id": "2780", + "kind": "number", + "type": { + "$ref": "676" + }, + "value": 11 + }, + "redundancyFactor": { + "$id": "2781", + "kind": "number", + "type": { + "$ref": "680" + }, + "value": 5 + }, + "workers": { + "$id": "2782", + "kind": "number", + "type": { + "$ref": "684" + }, + "value": 15 + } + } + }, + "frontend": { + "$id": "2783", + "kind": "model", + "type": { + "$ref": "690" + }, + "value": { + "$id": "2784", + "replicas": { + "$id": "2785", + "kind": "number", + "type": { + "$ref": "692" + }, + "value": 2 + }, + "workers": { + "$id": "2786", + "kind": "number", + "type": { + "$ref": "696" + }, + "value": 6 + } + } + } + } + }, + "diagnostics": { + "$id": "2787", + "kind": "model", + "type": { + "$ref": "704" + }, + "value": { + "$id": "2788", + "logs": { + "$id": "2789", + "kind": "model", + "type": { + "$ref": "706" + }, + "value": { + "$id": "2790", + "level": { + "$id": "2791", + "kind": "string", + "type": { + "$ref": "708" + }, + "value": "rnmwokumdmebpmfxxxzvvjfdywotav" + } + } + }, + "metrics": { + "$id": "2792", + "kind": "model", + "type": { + "$ref": "714" + }, + "value": { + "$id": "2793", + "prometheusPort": { + "$id": "2794", + "kind": "number", + "type": { + "$ref": "716" + }, + "value": 7581 + } + } + }, + "selfCheck": { + "$id": "2795", + "kind": "model", + "type": { + "$ref": "722" + }, + "value": { + "$id": "2796", + "mode": { + "$id": "2797", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "intervalSeconds": { + "$id": "2798", + "kind": "number", + "type": { + "$ref": "727" + }, + "value": 158 + }, + "timeoutSeconds": { + "$id": "2799", + "kind": "number", + "type": { + "$ref": "731" + }, + "value": 14 + } + } + }, + "traces": { + "$id": "2800", + "kind": "model", + "type": { + "$ref": "737" + }, + "value": { + "$id": "2801", + "mode": { + "$id": "2802", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "cacheSizeMegabytes": { + "$id": "2803", + "kind": "number", + "type": { + "$ref": "742" + }, + "value": 28 + }, + "selfTracing": { + "$id": "2804", + "kind": "model", + "type": { + "$ref": "746" + }, + "value": { + "$id": "2805", + "mode": { + "$id": "2806", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "intervalSeconds": { + "$id": "2807", + "kind": "number", + "type": { + "$ref": "751" + }, + "value": 22 + } + } + }, + "spanChannelCapacity": { + "$id": "2808", + "kind": "number", + "type": { + "$ref": "757" + }, + "value": 1000 + } + } + } + } + }, + "diskBackedMessageBuffer": { + "$id": "2809", + "kind": "model", + "type": { + "$ref": "765" + }, + "value": { + "$id": "2810", + "maxSize": { + "$id": "2811", + "kind": "string", + "type": { + "$ref": "767" + }, + "value": "500M" + }, + "ephemeralVolumeClaimSpec": { + "$id": "2812", + "kind": "model", + "type": { + "$ref": "771" + }, + "value": { + "$id": "2813", + "volumeName": { + "$id": "2814", + "kind": "string", + "type": { + "$ref": "773" + }, + "value": "c" + }, + "volumeMode": { + "$id": "2815", + "kind": "string", + "type": { + "$ref": "777" + }, + "value": "rxvpksjuuugqnqzeiprocknbn" + }, + "storageClassName": { + "$id": "2816", + "kind": "string", + "type": { + "$ref": "781" + }, + "value": "sseyhrjptkhrqvpdpjmornkqvon" + }, + "accessModes": { + "$id": "2817", + "kind": "array", + "type": { + "$ref": "785" + }, + "value": [ + { + "$id": "2818", + "kind": "string", + "type": { + "$ref": "786" + }, + "value": "nuluhigrbb" + } + ] + }, + "dataSource": { + "$id": "2819", + "kind": "model", + "type": { + "$ref": "790" + }, + "value": { + "$id": "2820", + "apiGroup": { + "$id": "2821", + "kind": "string", + "type": { + "$ref": "792" + }, + "value": "npqapyksvvpkohujx" + }, + "kind": { + "$id": "2822", + "kind": "string", + "type": { + "$ref": "796" + }, + "value": "wazgyb" + }, + "name": { + "$id": "2823", + "kind": "string", + "type": { + "$ref": "800" + }, + "value": "cwhsgxxcxsyppoefm" + } + } + }, + "dataSourceRef": { + "$id": "2824", + "kind": "model", + "type": { + "$ref": "806" + }, + "value": { + "$id": "2825", + "apiGroup": { + "$id": "2826", + "kind": "string", + "type": { + "$ref": "808" + }, + "value": "mnfnykznjjsoqpfsgdqioupt" + }, + "kind": { + "$id": "2827", + "kind": "string", + "type": { + "$ref": "812" + }, + "value": "odynqzekfzsnawrctaxg" + }, + "name": { + "$id": "2828", + "kind": "string", + "type": { + "$ref": "816" + }, + "value": "envszivbbmixbyddzg" + }, + "namespace": { + "$id": "2829", + "kind": "string", + "type": { + "$ref": "820" + }, + "value": "etcfzvxqd" + } + } + }, + "resources": { + "$id": "2830", + "kind": "model", + "type": { + "$ref": "826" + }, + "value": { + "$id": "2831", + "limits": { + "$id": "2832", + "kind": "dict", + "type": { + "$ref": "828" + }, + "value": { + "$id": "2833", + "key2719": { + "$id": "2834", + "kind": "string", + "type": { + "$ref": "830" + }, + "value": "hmphcrgctu" + } + } + }, + "requests": { + "$id": "2835", + "kind": "dict", + "type": { + "$ref": "834" + }, + "value": { + "$id": "2836", + "key2909": { + "$id": "2837", + "kind": "string", + "type": { + "$ref": "836" + }, + "value": "txocprnyrsgvhfrg" + } + } + } + } + }, + "selector": { + "$id": "2838", + "kind": "model", + "type": { + "$ref": "842" + }, + "value": { + "$id": "2839", + "matchExpressions": { + "$id": "2840", + "kind": "array", + "type": { + "$ref": "844" + }, + "value": [ + { + "$id": "2841", + "kind": "model", + "type": { + "$ref": "845" + }, + "value": { + "$id": "2842", + "key": { + "$id": "2843", + "kind": "string", + "type": { + "$ref": "847" + }, + "value": "e" + }, + "operator": { + "$id": "2844", + "kind": "string", + "type": { + "$ref": "104" + }, + "value": "In" + }, + "values": { + "$id": "2845", + "kind": "array", + "type": { + "$ref": "854" + }, + "value": [ + { + "$id": "2846", + "kind": "string", + "type": { + "$ref": "855" + }, + "value": "slmpajlywqvuyknipgztsonqyybt" + } + ] + } + } + } + ] + }, + "matchLabels": { + "$id": "2847", + "kind": "dict", + "type": { + "$ref": "861" + }, + "value": { + "$id": "2848", + "key6673": { + "$id": "2849", + "kind": "string", + "type": { + "$ref": "863" + }, + "value": "wlngfalznwxnurzpgxomcxhbqefpr" + } + } + } + } + } + } + }, + "persistentVolumeClaimSpec": { + "$id": "2850", + "kind": "model", + "type": { + "$ref": "771" + }, + "value": { + "$id": "2851", + "volumeName": { + "$id": "2852", + "kind": "string", + "type": { + "$ref": "773" + }, + "value": "c" + }, + "volumeMode": { + "$id": "2853", + "kind": "string", + "type": { + "$ref": "777" + }, + "value": "rxvpksjuuugqnqzeiprocknbn" + }, + "storageClassName": { + "$id": "2854", + "kind": "string", + "type": { + "$ref": "781" + }, + "value": "sseyhrjptkhrqvpdpjmornkqvon" + }, + "accessModes": { + "$id": "2855", + "kind": "array", + "type": { + "$ref": "785" + }, + "value": [ + { + "$id": "2856", + "kind": "string", + "type": { + "$ref": "786" + }, + "value": "nuluhigrbb" + } + ] + }, + "dataSource": { + "$id": "2857", + "kind": "model", + "type": { + "$ref": "790" + }, + "value": { + "$id": "2858", + "apiGroup": { + "$id": "2859", + "kind": "string", + "type": { + "$ref": "792" + }, + "value": "npqapyksvvpkohujx" + }, + "kind": { + "$id": "2860", + "kind": "string", + "type": { + "$ref": "796" + }, + "value": "wazgyb" + }, + "name": { + "$id": "2861", + "kind": "string", + "type": { + "$ref": "800" + }, + "value": "cwhsgxxcxsyppoefm" + } + } + }, + "dataSourceRef": { + "$id": "2862", + "kind": "model", + "type": { + "$ref": "806" + }, + "value": { + "$id": "2863", + "apiGroup": { + "$id": "2864", + "kind": "string", + "type": { + "$ref": "808" + }, + "value": "mnfnykznjjsoqpfsgdqioupt" + }, + "kind": { + "$id": "2865", + "kind": "string", + "type": { + "$ref": "812" + }, + "value": "odynqzekfzsnawrctaxg" + }, + "name": { + "$id": "2866", + "kind": "string", + "type": { + "$ref": "816" + }, + "value": "envszivbbmixbyddzg" + }, + "namespace": { + "$id": "2867", + "kind": "string", + "type": { + "$ref": "820" + }, + "value": "etcfzvxqd" + } + } + }, + "resources": { + "$id": "2868", + "kind": "model", + "type": { + "$ref": "826" + }, + "value": { + "$id": "2869", + "limits": { + "$id": "2870", + "kind": "dict", + "type": { + "$ref": "828" + }, + "value": { + "$id": "2871", + "key2719": { + "$id": "2872", + "kind": "string", + "type": { + "$ref": "830" + }, + "value": "hmphcrgctu" + } + } + }, + "requests": { + "$id": "2873", + "kind": "dict", + "type": { + "$ref": "834" + }, + "value": { + "$id": "2874", + "key2909": { + "$id": "2875", + "kind": "string", + "type": { + "$ref": "836" + }, + "value": "txocprnyrsgvhfrg" + } + } + } + } + }, + "selector": { + "$id": "2876", + "kind": "model", + "type": { + "$ref": "842" + }, + "value": { + "$id": "2877", + "matchExpressions": { + "$id": "2878", + "kind": "array", + "type": { + "$ref": "844" + }, + "value": [ + { + "$id": "2879", + "kind": "model", + "type": { + "$ref": "845" + }, + "value": { + "$id": "2880", + "key": { + "$id": "2881", + "kind": "string", + "type": { + "$ref": "847" + }, + "value": "e" + }, + "operator": { + "$id": "2882", + "kind": "string", + "type": { + "$ref": "104" + }, + "value": "In" + }, + "values": { + "$id": "2883", + "kind": "array", + "type": { + "$ref": "854" + }, + "value": [ + { + "$id": "2884", + "kind": "string", + "type": { + "$ref": "855" + }, + "value": "slmpajlywqvuyknipgztsonqyybt" + } + ] + } + } + } + ] + }, + "matchLabels": { + "$id": "2885", + "kind": "dict", + "type": { + "$ref": "861" + }, + "value": { + "$id": "2886", + "key6673": { + "$id": "2887", + "kind": "string", + "type": { + "$ref": "863" + }, + "value": "wlngfalznwxnurzpgxomcxhbqefpr" + } + } + } + } + } + } + } + } + }, + "generateResourceLimits": { + "$id": "2888", + "kind": "model", + "type": { + "$ref": "876" + }, + "value": { + "$id": "2889", + "cpu": { + "$id": "2890", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + } + } + }, + "memoryProfile": { + "$id": "2891", + "kind": "string", + "type": { + "$ref": "114" + }, + "value": "Tiny" + }, + "provisioningState": { + "$id": "2892", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "2893", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "2894", + "name": { + "$id": "2895", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "2896", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "2897", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123" + }, + "name": { + "$id": "2898", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "dowrkel" + }, + "type": { + "$id": "2899", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "xshjnsdgadygb" + }, + "systemData": { + "$id": "2900", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "2901", + "createdBy": { + "$id": "2902", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "2903", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "2904", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "2905", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "2906", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "2907", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "2908", + "response": { + "$ref": "2468" + }, + "statusCode": 201, + "bodyValue": { + "$id": "2909", + "kind": "model", + "type": { + "$ref": "603" + }, + "value": { + "$id": "2910", + "properties": { + "$id": "2911", + "kind": "model", + "type": { + "$ref": "606" + }, + "value": { + "$id": "2912", + "advanced": { + "$id": "2913", + "kind": "model", + "type": { + "$ref": "608" + }, + "value": { + "$id": "2914", + "clients": { + "$id": "2915", + "kind": "model", + "type": { + "$ref": "610" + }, + "value": { + "$id": "2916", + "maxSessionExpirySeconds": { + "$id": "2917", + "kind": "number", + "type": { + "$ref": "612" + }, + "value": 3859 + }, + "maxMessageExpirySeconds": { + "$id": "2918", + "kind": "number", + "type": { + "$ref": "616" + }, + "value": 3263 + }, + "maxPacketSizeBytes": { + "$id": "2919", + "kind": "number", + "type": { + "$ref": "620" + }, + "value": 3029 + }, + "subscriberQueueLimit": { + "$id": "2920", + "kind": "model", + "type": { + "$ref": "624" + }, + "value": { + "$id": "2921", + "length": { + "$id": "2922", + "kind": "number", + "type": { + "$ref": "626" + }, + "value": 6 + }, + "strategy": { + "$id": "2923", + "kind": "string", + "type": { + "$ref": "76" + }, + "value": "None" + } + } + }, + "maxReceiveMaximum": { + "$id": "2924", + "kind": "number", + "type": { + "$ref": "635" + }, + "value": 2365 + }, + "maxKeepAliveSeconds": { + "$id": "2925", + "kind": "number", + "type": { + "$ref": "639" + }, + "value": 3744 + } + } + }, + "encryptInternalTraffic": { + "$id": "2926", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "internalCerts": { + "$id": "2927", + "kind": "model", + "type": { + "$ref": "648" + }, + "value": { + "$id": "2928", + "duration": { + "$id": "2929", + "kind": "string", + "type": { + "$ref": "650" + }, + "value": "bchrc" + }, + "renewBefore": { + "$id": "2930", + "kind": "string", + "type": { + "$ref": "654" + }, + "value": "xkafmpgjfifkwwrhkswtopdnne" + }, + "privateKey": { + "$id": "2931", + "kind": "model", + "type": { + "$ref": "658" + }, + "value": { + "$id": "2932", + "algorithm": { + "$id": "2933", + "kind": "string", + "type": { + "$ref": "82" + }, + "value": "Ec256" + }, + "rotationPolicy": { + "$id": "2934", + "kind": "string", + "type": { + "$ref": "98" + }, + "value": "Always" + } + } + } + } + } + } + }, + "cardinality": { + "$id": "2935", + "kind": "model", + "type": { + "$ref": "672" + }, + "value": { + "$id": "2936", + "backendChain": { + "$id": "2937", + "kind": "model", + "type": { + "$ref": "674" + }, + "value": { + "$id": "2938", + "partitions": { + "$id": "2939", + "kind": "number", + "type": { + "$ref": "676" + }, + "value": 11 + }, + "redundancyFactor": { + "$id": "2940", + "kind": "number", + "type": { + "$ref": "680" + }, + "value": 5 + }, + "workers": { + "$id": "2941", + "kind": "number", + "type": { + "$ref": "684" + }, + "value": 15 + } + } + }, + "frontend": { + "$id": "2942", + "kind": "model", + "type": { + "$ref": "690" + }, + "value": { + "$id": "2943", + "replicas": { + "$id": "2944", + "kind": "number", + "type": { + "$ref": "692" + }, + "value": 2 + }, + "workers": { + "$id": "2945", + "kind": "number", + "type": { + "$ref": "696" + }, + "value": 6 + } + } + } + } + }, + "diagnostics": { + "$id": "2946", + "kind": "model", + "type": { + "$ref": "704" + }, + "value": { + "$id": "2947", + "logs": { + "$id": "2948", + "kind": "model", + "type": { + "$ref": "706" + }, + "value": { + "$id": "2949", + "level": { + "$id": "2950", + "kind": "string", + "type": { + "$ref": "708" + }, + "value": "rnmwokumdmebpmfxxxzvvjfdywotav" + } + } + }, + "metrics": { + "$id": "2951", + "kind": "model", + "type": { + "$ref": "714" + }, + "value": { + "$id": "2952", + "prometheusPort": { + "$id": "2953", + "kind": "number", + "type": { + "$ref": "716" + }, + "value": 7581 + } + } + }, + "selfCheck": { + "$id": "2954", + "kind": "model", + "type": { + "$ref": "722" + }, + "value": { + "$id": "2955", + "mode": { + "$id": "2956", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "intervalSeconds": { + "$id": "2957", + "kind": "number", + "type": { + "$ref": "727" + }, + "value": 158 + }, + "timeoutSeconds": { + "$id": "2958", + "kind": "number", + "type": { + "$ref": "731" + }, + "value": 14 + } + } + }, + "traces": { + "$id": "2959", + "kind": "model", + "type": { + "$ref": "737" + }, + "value": { + "$id": "2960", + "mode": { + "$id": "2961", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "cacheSizeMegabytes": { + "$id": "2962", + "kind": "number", + "type": { + "$ref": "742" + }, + "value": 28 + }, + "selfTracing": { + "$id": "2963", + "kind": "model", + "type": { + "$ref": "746" + }, + "value": { + "$id": "2964", + "mode": { + "$id": "2965", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "intervalSeconds": { + "$id": "2966", + "kind": "number", + "type": { + "$ref": "751" + }, + "value": 22 + } + } + }, + "spanChannelCapacity": { + "$id": "2967", + "kind": "number", + "type": { + "$ref": "757" + }, + "value": 1000 + } + } + } + } + }, + "diskBackedMessageBuffer": { + "$id": "2968", + "kind": "model", + "type": { + "$ref": "765" + }, + "value": { + "$id": "2969", + "maxSize": { + "$id": "2970", + "kind": "string", + "type": { + "$ref": "767" + }, + "value": "500M" + }, + "ephemeralVolumeClaimSpec": { + "$id": "2971", + "kind": "model", + "type": { + "$ref": "771" + }, + "value": { + "$id": "2972", + "volumeName": { + "$id": "2973", + "kind": "string", + "type": { + "$ref": "773" + }, + "value": "c" + }, + "volumeMode": { + "$id": "2974", + "kind": "string", + "type": { + "$ref": "777" + }, + "value": "rxvpksjuuugqnqzeiprocknbn" + }, + "storageClassName": { + "$id": "2975", + "kind": "string", + "type": { + "$ref": "781" + }, + "value": "sseyhrjptkhrqvpdpjmornkqvon" + }, + "accessModes": { + "$id": "2976", + "kind": "array", + "type": { + "$ref": "785" + }, + "value": [ + { + "$id": "2977", + "kind": "string", + "type": { + "$ref": "786" + }, + "value": "nuluhigrbb" + } + ] + }, + "dataSource": { + "$id": "2978", + "kind": "model", + "type": { + "$ref": "790" + }, + "value": { + "$id": "2979", + "apiGroup": { + "$id": "2980", + "kind": "string", + "type": { + "$ref": "792" + }, + "value": "npqapyksvvpkohujx" + }, + "kind": { + "$id": "2981", + "kind": "string", + "type": { + "$ref": "796" + }, + "value": "wazgyb" + }, + "name": { + "$id": "2982", + "kind": "string", + "type": { + "$ref": "800" + }, + "value": "cwhsgxxcxsyppoefm" + } + } + }, + "dataSourceRef": { + "$id": "2983", + "kind": "model", + "type": { + "$ref": "806" + }, + "value": { + "$id": "2984", + "apiGroup": { + "$id": "2985", + "kind": "string", + "type": { + "$ref": "808" + }, + "value": "mnfnykznjjsoqpfsgdqioupt" + }, + "kind": { + "$id": "2986", + "kind": "string", + "type": { + "$ref": "812" + }, + "value": "odynqzekfzsnawrctaxg" + }, + "name": { + "$id": "2987", + "kind": "string", + "type": { + "$ref": "816" + }, + "value": "envszivbbmixbyddzg" + }, + "namespace": { + "$id": "2988", + "kind": "string", + "type": { + "$ref": "820" + }, + "value": "etcfzvxqd" + } + } + }, + "resources": { + "$id": "2989", + "kind": "model", + "type": { + "$ref": "826" + }, + "value": { + "$id": "2990", + "limits": { + "$id": "2991", + "kind": "dict", + "type": { + "$ref": "828" + }, + "value": { + "$id": "2992", + "key2719": { + "$id": "2993", + "kind": "string", + "type": { + "$ref": "830" + }, + "value": "hmphcrgctu" + } + } + }, + "requests": { + "$id": "2994", + "kind": "dict", + "type": { + "$ref": "834" + }, + "value": { + "$id": "2995", + "key2909": { + "$id": "2996", + "kind": "string", + "type": { + "$ref": "836" + }, + "value": "txocprnyrsgvhfrg" + } + } + } + } + }, + "selector": { + "$id": "2997", + "kind": "model", + "type": { + "$ref": "842" + }, + "value": { + "$id": "2998", + "matchExpressions": { + "$id": "2999", + "kind": "array", + "type": { + "$ref": "844" + }, + "value": [ + { + "$id": "3000", + "kind": "model", + "type": { + "$ref": "845" + }, + "value": { + "$id": "3001", + "key": { + "$id": "3002", + "kind": "string", + "type": { + "$ref": "847" + }, + "value": "e" + }, + "operator": { + "$id": "3003", + "kind": "string", + "type": { + "$ref": "104" + }, + "value": "In" + }, + "values": { + "$id": "3004", + "kind": "array", + "type": { + "$ref": "854" + }, + "value": [ + { + "$id": "3005", + "kind": "string", + "type": { + "$ref": "855" + }, + "value": "slmpajlywqvuyknipgztsonqyybt" + } + ] + } + } + } + ] + }, + "matchLabels": { + "$id": "3006", + "kind": "dict", + "type": { + "$ref": "861" + }, + "value": { + "$id": "3007", + "key6673": { + "$id": "3008", + "kind": "string", + "type": { + "$ref": "863" + }, + "value": "wlngfalznwxnurzpgxomcxhbqefpr" + } + } + } + } + } + } + }, + "persistentVolumeClaimSpec": { + "$id": "3009", + "kind": "model", + "type": { + "$ref": "771" + }, + "value": { + "$id": "3010", + "volumeName": { + "$id": "3011", + "kind": "string", + "type": { + "$ref": "773" + }, + "value": "c" + }, + "volumeMode": { + "$id": "3012", + "kind": "string", + "type": { + "$ref": "777" + }, + "value": "rxvpksjuuugqnqzeiprocknbn" + }, + "storageClassName": { + "$id": "3013", + "kind": "string", + "type": { + "$ref": "781" + }, + "value": "sseyhrjptkhrqvpdpjmornkqvon" + }, + "accessModes": { + "$id": "3014", + "kind": "array", + "type": { + "$ref": "785" + }, + "value": [ + { + "$id": "3015", + "kind": "string", + "type": { + "$ref": "786" + }, + "value": "nuluhigrbb" + } + ] + }, + "dataSource": { + "$id": "3016", + "kind": "model", + "type": { + "$ref": "790" + }, + "value": { + "$id": "3017", + "apiGroup": { + "$id": "3018", + "kind": "string", + "type": { + "$ref": "792" + }, + "value": "npqapyksvvpkohujx" + }, + "kind": { + "$id": "3019", + "kind": "string", + "type": { + "$ref": "796" + }, + "value": "wazgyb" + }, + "name": { + "$id": "3020", + "kind": "string", + "type": { + "$ref": "800" + }, + "value": "cwhsgxxcxsyppoefm" + } + } + }, + "dataSourceRef": { + "$id": "3021", + "kind": "model", + "type": { + "$ref": "806" + }, + "value": { + "$id": "3022", + "apiGroup": { + "$id": "3023", + "kind": "string", + "type": { + "$ref": "808" + }, + "value": "mnfnykznjjsoqpfsgdqioupt" + }, + "kind": { + "$id": "3024", + "kind": "string", + "type": { + "$ref": "812" + }, + "value": "odynqzekfzsnawrctaxg" + }, + "name": { + "$id": "3025", + "kind": "string", + "type": { + "$ref": "816" + }, + "value": "envszivbbmixbyddzg" + }, + "namespace": { + "$id": "3026", + "kind": "string", + "type": { + "$ref": "820" + }, + "value": "etcfzvxqd" + } + } + }, + "resources": { + "$id": "3027", + "kind": "model", + "type": { + "$ref": "826" + }, + "value": { + "$id": "3028", + "limits": { + "$id": "3029", + "kind": "dict", + "type": { + "$ref": "828" + }, + "value": { + "$id": "3030", + "key2719": { + "$id": "3031", + "kind": "string", + "type": { + "$ref": "830" + }, + "value": "hmphcrgctu" + } + } + }, + "requests": { + "$id": "3032", + "kind": "dict", + "type": { + "$ref": "834" + }, + "value": { + "$id": "3033", + "key2909": { + "$id": "3034", + "kind": "string", + "type": { + "$ref": "836" + }, + "value": "txocprnyrsgvhfrg" + } + } + } + } + }, + "selector": { + "$id": "3035", + "kind": "model", + "type": { + "$ref": "842" + }, + "value": { + "$id": "3036", + "matchExpressions": { + "$id": "3037", + "kind": "array", + "type": { + "$ref": "844" + }, + "value": [ + { + "$id": "3038", + "kind": "model", + "type": { + "$ref": "845" + }, + "value": { + "$id": "3039", + "key": { + "$id": "3040", + "kind": "string", + "type": { + "$ref": "847" + }, + "value": "e" + }, + "operator": { + "$id": "3041", + "kind": "string", + "type": { + "$ref": "104" + }, + "value": "In" + }, + "values": { + "$id": "3042", + "kind": "array", + "type": { + "$ref": "854" + }, + "value": [ + { + "$id": "3043", + "kind": "string", + "type": { + "$ref": "855" + }, + "value": "slmpajlywqvuyknipgztsonqyybt" + } + ] + } + } + } + ] + }, + "matchLabels": { + "$id": "3044", + "kind": "dict", + "type": { + "$ref": "861" + }, + "value": { + "$id": "3045", + "key6673": { + "$id": "3046", + "kind": "string", + "type": { + "$ref": "863" + }, + "value": "wlngfalznwxnurzpgxomcxhbqefpr" + } + } + } + } + } + } + } + } + }, + "generateResourceLimits": { + "$id": "3047", + "kind": "model", + "type": { + "$ref": "876" + }, + "value": { + "$id": "3048", + "cpu": { + "$id": "3049", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + } + } + }, + "memoryProfile": { + "$id": "3050", + "kind": "string", + "type": { + "$ref": "114" + }, + "value": "Tiny" + }, + "provisioningState": { + "$id": "3051", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "3052", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "3053", + "name": { + "$id": "3054", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "3055", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "3056", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123" + }, + "name": { + "$id": "3057", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "dowrkel" + }, + "type": { + "$id": "3058", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "xshjnsdgadygb" + }, + "systemData": { + "$id": "3059", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "3060", + "createdBy": { + "$id": "3061", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "3062", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "3063", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "3064", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "3065", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "3066", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + }, + { + "$id": "3067", + "kind": "http", + "name": "Broker_CreateOrUpdate_Minimal", + "description": "Broker_CreateOrUpdate_Minimal", + "filePath": "2025-04-01/Broker_CreateOrUpdate_Minimal.json", + "parameters": [ + { + "$id": "3068", + "parameter": { + "$ref": "2447" + }, + "value": { + "$id": "3069", + "kind": "string", + "type": { + "$ref": "2448" + }, + "value": "2025-04-01" + } + }, + { + "$id": "3070", + "parameter": { + "$ref": "2451" + }, + "value": { + "$id": "3071", + "kind": "string", + "type": { + "$ref": "2452" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "3072", + "parameter": { + "$ref": "2454" + }, + "value": { + "$id": "3073", + "kind": "string", + "type": { + "$ref": "2455" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "3074", + "parameter": { + "$ref": "2456" + }, + "value": { + "$id": "3075", + "kind": "string", + "type": { + "$ref": "2457" + }, + "value": "resource-name123" + } + }, + { + "$id": "3076", + "parameter": { + "$ref": "2458" + }, + "value": { + "$id": "3077", + "kind": "string", + "type": { + "$ref": "2459" + }, + "value": "resource-name123" + } + }, + { + "$id": "3078", + "parameter": { + "$ref": "2466" + }, + "value": { + "$id": "3079", + "kind": "model", + "type": { + "$ref": "603" + }, + "value": { + "$id": "3080", + "properties": { + "$id": "3081", + "kind": "model", + "type": { + "$ref": "606" + }, + "value": { + "$id": "3082", + "memoryProfile": { + "$id": "3083", + "kind": "string", + "type": { + "$ref": "114" + }, + "value": "Tiny" + } + } + }, + "extendedLocation": { + "$id": "3084", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "3085", + "name": { + "$id": "3086", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "3087", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "3088", + "response": { + "$ref": "2467" + }, + "statusCode": 200, + "bodyValue": { + "$id": "3089", + "kind": "model", + "type": { + "$ref": "603" + }, + "value": { + "$id": "3090", + "properties": { + "$id": "3091", + "kind": "model", + "type": { + "$ref": "606" + }, + "value": { + "$id": "3092", + "advanced": { + "$id": "3093", + "kind": "model", + "type": { + "$ref": "608" + }, + "value": { + "$id": "3094", + "clients": { + "$id": "3095", + "kind": "model", + "type": { + "$ref": "610" + }, + "value": { + "$id": "3096", + "maxSessionExpirySeconds": { + "$id": "3097", + "kind": "number", + "type": { + "$ref": "612" + }, + "value": 3859 + }, + "maxMessageExpirySeconds": { + "$id": "3098", + "kind": "number", + "type": { + "$ref": "616" + }, + "value": 3263 + }, + "maxPacketSizeBytes": { + "$id": "3099", + "kind": "number", + "type": { + "$ref": "620" + }, + "value": 3029 + }, + "subscriberQueueLimit": { + "$id": "3100", + "kind": "model", + "type": { + "$ref": "624" + }, + "value": { + "$id": "3101", + "length": { + "$id": "3102", + "kind": "number", + "type": { + "$ref": "626" + }, + "value": 6 + }, + "strategy": { + "$id": "3103", + "kind": "string", + "type": { + "$ref": "76" + }, + "value": "None" + } + } + }, + "maxReceiveMaximum": { + "$id": "3104", + "kind": "number", + "type": { + "$ref": "635" + }, + "value": 2365 + }, + "maxKeepAliveSeconds": { + "$id": "3105", + "kind": "number", + "type": { + "$ref": "639" + }, + "value": 3744 + } + } + }, + "encryptInternalTraffic": { + "$id": "3106", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "internalCerts": { + "$id": "3107", + "kind": "model", + "type": { + "$ref": "648" + }, + "value": { + "$id": "3108", + "duration": { + "$id": "3109", + "kind": "string", + "type": { + "$ref": "650" + }, + "value": "bchrc" + }, + "renewBefore": { + "$id": "3110", + "kind": "string", + "type": { + "$ref": "654" + }, + "value": "xkafmpgjfifkwwrhkswtopdnne" + }, + "privateKey": { + "$id": "3111", + "kind": "model", + "type": { + "$ref": "658" + }, + "value": { + "$id": "3112", + "algorithm": { + "$id": "3113", + "kind": "string", + "type": { + "$ref": "82" + }, + "value": "Ec256" + }, + "rotationPolicy": { + "$id": "3114", + "kind": "string", + "type": { + "$ref": "98" + }, + "value": "Always" + } + } + } + } + } + } + }, + "cardinality": { + "$id": "3115", + "kind": "model", + "type": { + "$ref": "672" + }, + "value": { + "$id": "3116", + "backendChain": { + "$id": "3117", + "kind": "model", + "type": { + "$ref": "674" + }, + "value": { + "$id": "3118", + "partitions": { + "$id": "3119", + "kind": "number", + "type": { + "$ref": "676" + }, + "value": 11 + }, + "redundancyFactor": { + "$id": "3120", + "kind": "number", + "type": { + "$ref": "680" + }, + "value": 5 + }, + "workers": { + "$id": "3121", + "kind": "number", + "type": { + "$ref": "684" + }, + "value": 15 + } + } + }, + "frontend": { + "$id": "3122", + "kind": "model", + "type": { + "$ref": "690" + }, + "value": { + "$id": "3123", + "replicas": { + "$id": "3124", + "kind": "number", + "type": { + "$ref": "692" + }, + "value": 2 + }, + "workers": { + "$id": "3125", + "kind": "number", + "type": { + "$ref": "696" + }, + "value": 6 + } + } + } + } + }, + "diagnostics": { + "$id": "3126", + "kind": "model", + "type": { + "$ref": "704" + }, + "value": { + "$id": "3127", + "logs": { + "$id": "3128", + "kind": "model", + "type": { + "$ref": "706" + }, + "value": { + "$id": "3129", + "level": { + "$id": "3130", + "kind": "string", + "type": { + "$ref": "708" + }, + "value": "rnmwokumdmebpmfxxxzvvjfdywotav" + } + } + }, + "metrics": { + "$id": "3131", + "kind": "model", + "type": { + "$ref": "714" + }, + "value": { + "$id": "3132", + "prometheusPort": { + "$id": "3133", + "kind": "number", + "type": { + "$ref": "716" + }, + "value": 7581 + } + } + }, + "selfCheck": { + "$id": "3134", + "kind": "model", + "type": { + "$ref": "722" + }, + "value": { + "$id": "3135", + "mode": { + "$id": "3136", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "intervalSeconds": { + "$id": "3137", + "kind": "number", + "type": { + "$ref": "727" + }, + "value": 158 + }, + "timeoutSeconds": { + "$id": "3138", + "kind": "number", + "type": { + "$ref": "731" + }, + "value": 14 + } + } + }, + "traces": { + "$id": "3139", + "kind": "model", + "type": { + "$ref": "737" + }, + "value": { + "$id": "3140", + "mode": { + "$id": "3141", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "cacheSizeMegabytes": { + "$id": "3142", + "kind": "number", + "type": { + "$ref": "742" + }, + "value": 28 + }, + "selfTracing": { + "$id": "3143", + "kind": "model", + "type": { + "$ref": "746" + }, + "value": { + "$id": "3144", + "mode": { + "$id": "3145", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "intervalSeconds": { + "$id": "3146", + "kind": "number", + "type": { + "$ref": "751" + }, + "value": 22 + } + } + }, + "spanChannelCapacity": { + "$id": "3147", + "kind": "number", + "type": { + "$ref": "757" + }, + "value": 1000 + } + } + } + } + }, + "diskBackedMessageBuffer": { + "$id": "3148", + "kind": "model", + "type": { + "$ref": "765" + }, + "value": { + "$id": "3149", + "maxSize": { + "$id": "3150", + "kind": "string", + "type": { + "$ref": "767" + }, + "value": "500M" + }, + "ephemeralVolumeClaimSpec": { + "$id": "3151", + "kind": "model", + "type": { + "$ref": "771" + }, + "value": { + "$id": "3152", + "volumeName": { + "$id": "3153", + "kind": "string", + "type": { + "$ref": "773" + }, + "value": "c" + }, + "volumeMode": { + "$id": "3154", + "kind": "string", + "type": { + "$ref": "777" + }, + "value": "rxvpksjuuugqnqzeiprocknbn" + }, + "storageClassName": { + "$id": "3155", + "kind": "string", + "type": { + "$ref": "781" + }, + "value": "sseyhrjptkhrqvpdpjmornkqvon" + }, + "accessModes": { + "$id": "3156", + "kind": "array", + "type": { + "$ref": "785" + }, + "value": [ + { + "$id": "3157", + "kind": "string", + "type": { + "$ref": "786" + }, + "value": "nuluhigrbb" + } + ] + }, + "dataSource": { + "$id": "3158", + "kind": "model", + "type": { + "$ref": "790" + }, + "value": { + "$id": "3159", + "apiGroup": { + "$id": "3160", + "kind": "string", + "type": { + "$ref": "792" + }, + "value": "npqapyksvvpkohujx" + }, + "kind": { + "$id": "3161", + "kind": "string", + "type": { + "$ref": "796" + }, + "value": "wazgyb" + }, + "name": { + "$id": "3162", + "kind": "string", + "type": { + "$ref": "800" + }, + "value": "cwhsgxxcxsyppoefm" + } + } + }, + "dataSourceRef": { + "$id": "3163", + "kind": "model", + "type": { + "$ref": "806" + }, + "value": { + "$id": "3164", + "apiGroup": { + "$id": "3165", + "kind": "string", + "type": { + "$ref": "808" + }, + "value": "mnfnykznjjsoqpfsgdqioupt" + }, + "kind": { + "$id": "3166", + "kind": "string", + "type": { + "$ref": "812" + }, + "value": "odynqzekfzsnawrctaxg" + }, + "name": { + "$id": "3167", + "kind": "string", + "type": { + "$ref": "816" + }, + "value": "envszivbbmixbyddzg" + }, + "namespace": { + "$id": "3168", + "kind": "string", + "type": { + "$ref": "820" + }, + "value": "etcfzvxqd" + } + } + }, + "resources": { + "$id": "3169", + "kind": "model", + "type": { + "$ref": "826" + }, + "value": { + "$id": "3170", + "limits": { + "$id": "3171", + "kind": "dict", + "type": { + "$ref": "828" + }, + "value": { + "$id": "3172", + "key2719": { + "$id": "3173", + "kind": "string", + "type": { + "$ref": "830" + }, + "value": "hmphcrgctu" + } + } + }, + "requests": { + "$id": "3174", + "kind": "dict", + "type": { + "$ref": "834" + }, + "value": { + "$id": "3175", + "key2909": { + "$id": "3176", + "kind": "string", + "type": { + "$ref": "836" + }, + "value": "txocprnyrsgvhfrg" + } + } + } + } + }, + "selector": { + "$id": "3177", + "kind": "model", + "type": { + "$ref": "842" + }, + "value": { + "$id": "3178", + "matchExpressions": { + "$id": "3179", + "kind": "array", + "type": { + "$ref": "844" + }, + "value": [ + { + "$id": "3180", + "kind": "model", + "type": { + "$ref": "845" + }, + "value": { + "$id": "3181", + "key": { + "$id": "3182", + "kind": "string", + "type": { + "$ref": "847" + }, + "value": "e" + }, + "operator": { + "$id": "3183", + "kind": "string", + "type": { + "$ref": "104" + }, + "value": "In" + }, + "values": { + "$id": "3184", + "kind": "array", + "type": { + "$ref": "854" + }, + "value": [ + { + "$id": "3185", + "kind": "string", + "type": { + "$ref": "855" + }, + "value": "slmpajlywqvuyknipgztsonqyybt" + } + ] + } + } + } + ] + }, + "matchLabels": { + "$id": "3186", + "kind": "dict", + "type": { + "$ref": "861" + }, + "value": { + "$id": "3187", + "key6673": { + "$id": "3188", + "kind": "string", + "type": { + "$ref": "863" + }, + "value": "wlngfalznwxnurzpgxomcxhbqefpr" + } + } + } + } + } + } + }, + "persistentVolumeClaimSpec": { + "$id": "3189", + "kind": "model", + "type": { + "$ref": "771" + }, + "value": { + "$id": "3190", + "volumeName": { + "$id": "3191", + "kind": "string", + "type": { + "$ref": "773" + }, + "value": "c" + }, + "volumeMode": { + "$id": "3192", + "kind": "string", + "type": { + "$ref": "777" + }, + "value": "rxvpksjuuugqnqzeiprocknbn" + }, + "storageClassName": { + "$id": "3193", + "kind": "string", + "type": { + "$ref": "781" + }, + "value": "sseyhrjptkhrqvpdpjmornkqvon" + }, + "accessModes": { + "$id": "3194", + "kind": "array", + "type": { + "$ref": "785" + }, + "value": [ + { + "$id": "3195", + "kind": "string", + "type": { + "$ref": "786" + }, + "value": "nuluhigrbb" + } + ] + }, + "dataSource": { + "$id": "3196", + "kind": "model", + "type": { + "$ref": "790" + }, + "value": { + "$id": "3197", + "apiGroup": { + "$id": "3198", + "kind": "string", + "type": { + "$ref": "792" + }, + "value": "npqapyksvvpkohujx" + }, + "kind": { + "$id": "3199", + "kind": "string", + "type": { + "$ref": "796" + }, + "value": "wazgyb" + }, + "name": { + "$id": "3200", + "kind": "string", + "type": { + "$ref": "800" + }, + "value": "cwhsgxxcxsyppoefm" + } + } + }, + "dataSourceRef": { + "$id": "3201", + "kind": "model", + "type": { + "$ref": "806" + }, + "value": { + "$id": "3202", + "apiGroup": { + "$id": "3203", + "kind": "string", + "type": { + "$ref": "808" + }, + "value": "mnfnykznjjsoqpfsgdqioupt" + }, + "kind": { + "$id": "3204", + "kind": "string", + "type": { + "$ref": "812" + }, + "value": "odynqzekfzsnawrctaxg" + }, + "name": { + "$id": "3205", + "kind": "string", + "type": { + "$ref": "816" + }, + "value": "envszivbbmixbyddzg" + }, + "namespace": { + "$id": "3206", + "kind": "string", + "type": { + "$ref": "820" + }, + "value": "etcfzvxqd" + } + } + }, + "resources": { + "$id": "3207", + "kind": "model", + "type": { + "$ref": "826" + }, + "value": { + "$id": "3208", + "limits": { + "$id": "3209", + "kind": "dict", + "type": { + "$ref": "828" + }, + "value": { + "$id": "3210", + "key2719": { + "$id": "3211", + "kind": "string", + "type": { + "$ref": "830" + }, + "value": "hmphcrgctu" + } + } + }, + "requests": { + "$id": "3212", + "kind": "dict", + "type": { + "$ref": "834" + }, + "value": { + "$id": "3213", + "key2909": { + "$id": "3214", + "kind": "string", + "type": { + "$ref": "836" + }, + "value": "txocprnyrsgvhfrg" + } + } + } + } + }, + "selector": { + "$id": "3215", + "kind": "model", + "type": { + "$ref": "842" + }, + "value": { + "$id": "3216", + "matchExpressions": { + "$id": "3217", + "kind": "array", + "type": { + "$ref": "844" + }, + "value": [ + { + "$id": "3218", + "kind": "model", + "type": { + "$ref": "845" + }, + "value": { + "$id": "3219", + "key": { + "$id": "3220", + "kind": "string", + "type": { + "$ref": "847" + }, + "value": "e" + }, + "operator": { + "$id": "3221", + "kind": "string", + "type": { + "$ref": "104" + }, + "value": "In" + }, + "values": { + "$id": "3222", + "kind": "array", + "type": { + "$ref": "854" + }, + "value": [ + { + "$id": "3223", + "kind": "string", + "type": { + "$ref": "855" + }, + "value": "slmpajlywqvuyknipgztsonqyybt" + } + ] + } + } + } + ] + }, + "matchLabels": { + "$id": "3224", + "kind": "dict", + "type": { + "$ref": "861" + }, + "value": { + "$id": "3225", + "key6673": { + "$id": "3226", + "kind": "string", + "type": { + "$ref": "863" + }, + "value": "wlngfalznwxnurzpgxomcxhbqefpr" + } + } + } + } + } + } + } + } + }, + "generateResourceLimits": { + "$id": "3227", + "kind": "model", + "type": { + "$ref": "876" + }, + "value": { + "$id": "3228", + "cpu": { + "$id": "3229", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + } + } + }, + "memoryProfile": { + "$id": "3230", + "kind": "string", + "type": { + "$ref": "114" + }, + "value": "Tiny" + }, + "provisioningState": { + "$id": "3231", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "3232", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "3233", + "name": { + "$id": "3234", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "3235", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "3236", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123" + }, + "name": { + "$id": "3237", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "dowrkel" + }, + "type": { + "$id": "3238", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "xshjnsdgadygb" + }, + "systemData": { + "$id": "3239", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "3240", + "createdBy": { + "$id": "3241", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "3242", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "3243", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "3244", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "3245", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "3246", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "3247", + "response": { + "$ref": "2468" + }, + "statusCode": 201, + "bodyValue": { + "$id": "3248", + "kind": "model", + "type": { + "$ref": "603" + }, + "value": { + "$id": "3249", + "properties": { + "$id": "3250", + "kind": "model", + "type": { + "$ref": "606" + }, + "value": { + "$id": "3251", + "advanced": { + "$id": "3252", + "kind": "model", + "type": { + "$ref": "608" + }, + "value": { + "$id": "3253", + "clients": { + "$id": "3254", + "kind": "model", + "type": { + "$ref": "610" + }, + "value": { + "$id": "3255", + "maxSessionExpirySeconds": { + "$id": "3256", + "kind": "number", + "type": { + "$ref": "612" + }, + "value": 3859 + }, + "maxMessageExpirySeconds": { + "$id": "3257", + "kind": "number", + "type": { + "$ref": "616" + }, + "value": 3263 + }, + "maxPacketSizeBytes": { + "$id": "3258", + "kind": "number", + "type": { + "$ref": "620" + }, + "value": 3029 + }, + "subscriberQueueLimit": { + "$id": "3259", + "kind": "model", + "type": { + "$ref": "624" + }, + "value": { + "$id": "3260", + "length": { + "$id": "3261", + "kind": "number", + "type": { + "$ref": "626" + }, + "value": 6 + }, + "strategy": { + "$id": "3262", + "kind": "string", + "type": { + "$ref": "76" + }, + "value": "None" + } + } + }, + "maxReceiveMaximum": { + "$id": "3263", + "kind": "number", + "type": { + "$ref": "635" + }, + "value": 2365 + }, + "maxKeepAliveSeconds": { + "$id": "3264", + "kind": "number", + "type": { + "$ref": "639" + }, + "value": 3744 + } + } + }, + "encryptInternalTraffic": { + "$id": "3265", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "internalCerts": { + "$id": "3266", + "kind": "model", + "type": { + "$ref": "648" + }, + "value": { + "$id": "3267", + "duration": { + "$id": "3268", + "kind": "string", + "type": { + "$ref": "650" + }, + "value": "bchrc" + }, + "renewBefore": { + "$id": "3269", + "kind": "string", + "type": { + "$ref": "654" + }, + "value": "xkafmpgjfifkwwrhkswtopdnne" + }, + "privateKey": { + "$id": "3270", + "kind": "model", + "type": { + "$ref": "658" + }, + "value": { + "$id": "3271", + "algorithm": { + "$id": "3272", + "kind": "string", + "type": { + "$ref": "82" + }, + "value": "Ec256" + }, + "rotationPolicy": { + "$id": "3273", + "kind": "string", + "type": { + "$ref": "98" + }, + "value": "Always" + } + } + } + } + } + } + }, + "cardinality": { + "$id": "3274", + "kind": "model", + "type": { + "$ref": "672" + }, + "value": { + "$id": "3275", + "backendChain": { + "$id": "3276", + "kind": "model", + "type": { + "$ref": "674" + }, + "value": { + "$id": "3277", + "partitions": { + "$id": "3278", + "kind": "number", + "type": { + "$ref": "676" + }, + "value": 11 + }, + "redundancyFactor": { + "$id": "3279", + "kind": "number", + "type": { + "$ref": "680" + }, + "value": 5 + }, + "workers": { + "$id": "3280", + "kind": "number", + "type": { + "$ref": "684" + }, + "value": 15 + } + } + }, + "frontend": { + "$id": "3281", + "kind": "model", + "type": { + "$ref": "690" + }, + "value": { + "$id": "3282", + "replicas": { + "$id": "3283", + "kind": "number", + "type": { + "$ref": "692" + }, + "value": 2 + }, + "workers": { + "$id": "3284", + "kind": "number", + "type": { + "$ref": "696" + }, + "value": 6 + } + } + } + } + }, + "diagnostics": { + "$id": "3285", + "kind": "model", + "type": { + "$ref": "704" + }, + "value": { + "$id": "3286", + "logs": { + "$id": "3287", + "kind": "model", + "type": { + "$ref": "706" + }, + "value": { + "$id": "3288", + "level": { + "$id": "3289", + "kind": "string", + "type": { + "$ref": "708" + }, + "value": "rnmwokumdmebpmfxxxzvvjfdywotav" + } + } + }, + "metrics": { + "$id": "3290", + "kind": "model", + "type": { + "$ref": "714" + }, + "value": { + "$id": "3291", + "prometheusPort": { + "$id": "3292", + "kind": "number", + "type": { + "$ref": "716" + }, + "value": 7581 + } + } + }, + "selfCheck": { + "$id": "3293", + "kind": "model", + "type": { + "$ref": "722" + }, + "value": { + "$id": "3294", + "mode": { + "$id": "3295", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "intervalSeconds": { + "$id": "3296", + "kind": "number", + "type": { + "$ref": "727" + }, + "value": 158 + }, + "timeoutSeconds": { + "$id": "3297", + "kind": "number", + "type": { + "$ref": "731" + }, + "value": 14 + } + } + }, + "traces": { + "$id": "3298", + "kind": "model", + "type": { + "$ref": "737" + }, + "value": { + "$id": "3299", + "mode": { + "$id": "3300", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "cacheSizeMegabytes": { + "$id": "3301", + "kind": "number", + "type": { + "$ref": "742" + }, + "value": 28 + }, + "selfTracing": { + "$id": "3302", + "kind": "model", + "type": { + "$ref": "746" + }, + "value": { + "$id": "3303", + "mode": { + "$id": "3304", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "intervalSeconds": { + "$id": "3305", + "kind": "number", + "type": { + "$ref": "751" + }, + "value": 22 + } + } + }, + "spanChannelCapacity": { + "$id": "3306", + "kind": "number", + "type": { + "$ref": "757" + }, + "value": 1000 + } + } + } + } + }, + "diskBackedMessageBuffer": { + "$id": "3307", + "kind": "model", + "type": { + "$ref": "765" + }, + "value": { + "$id": "3308", + "maxSize": { + "$id": "3309", + "kind": "string", + "type": { + "$ref": "767" + }, + "value": "500M" + }, + "ephemeralVolumeClaimSpec": { + "$id": "3310", + "kind": "model", + "type": { + "$ref": "771" + }, + "value": { + "$id": "3311", + "volumeName": { + "$id": "3312", + "kind": "string", + "type": { + "$ref": "773" + }, + "value": "c" + }, + "volumeMode": { + "$id": "3313", + "kind": "string", + "type": { + "$ref": "777" + }, + "value": "rxvpksjuuugqnqzeiprocknbn" + }, + "storageClassName": { + "$id": "3314", + "kind": "string", + "type": { + "$ref": "781" + }, + "value": "sseyhrjptkhrqvpdpjmornkqvon" + }, + "accessModes": { + "$id": "3315", + "kind": "array", + "type": { + "$ref": "785" + }, + "value": [ + { + "$id": "3316", + "kind": "string", + "type": { + "$ref": "786" + }, + "value": "nuluhigrbb" + } + ] + }, + "dataSource": { + "$id": "3317", + "kind": "model", + "type": { + "$ref": "790" + }, + "value": { + "$id": "3318", + "apiGroup": { + "$id": "3319", + "kind": "string", + "type": { + "$ref": "792" + }, + "value": "npqapyksvvpkohujx" + }, + "kind": { + "$id": "3320", + "kind": "string", + "type": { + "$ref": "796" + }, + "value": "wazgyb" + }, + "name": { + "$id": "3321", + "kind": "string", + "type": { + "$ref": "800" + }, + "value": "cwhsgxxcxsyppoefm" + } + } + }, + "dataSourceRef": { + "$id": "3322", + "kind": "model", + "type": { + "$ref": "806" + }, + "value": { + "$id": "3323", + "apiGroup": { + "$id": "3324", + "kind": "string", + "type": { + "$ref": "808" + }, + "value": "mnfnykznjjsoqpfsgdqioupt" + }, + "kind": { + "$id": "3325", + "kind": "string", + "type": { + "$ref": "812" + }, + "value": "odynqzekfzsnawrctaxg" + }, + "name": { + "$id": "3326", + "kind": "string", + "type": { + "$ref": "816" + }, + "value": "envszivbbmixbyddzg" + }, + "namespace": { + "$id": "3327", + "kind": "string", + "type": { + "$ref": "820" + }, + "value": "etcfzvxqd" + } + } + }, + "resources": { + "$id": "3328", + "kind": "model", + "type": { + "$ref": "826" + }, + "value": { + "$id": "3329", + "limits": { + "$id": "3330", + "kind": "dict", + "type": { + "$ref": "828" + }, + "value": { + "$id": "3331", + "key2719": { + "$id": "3332", + "kind": "string", + "type": { + "$ref": "830" + }, + "value": "hmphcrgctu" + } + } + }, + "requests": { + "$id": "3333", + "kind": "dict", + "type": { + "$ref": "834" + }, + "value": { + "$id": "3334", + "key2909": { + "$id": "3335", + "kind": "string", + "type": { + "$ref": "836" + }, + "value": "txocprnyrsgvhfrg" + } + } + } + } + }, + "selector": { + "$id": "3336", + "kind": "model", + "type": { + "$ref": "842" + }, + "value": { + "$id": "3337", + "matchExpressions": { + "$id": "3338", + "kind": "array", + "type": { + "$ref": "844" + }, + "value": [ + { + "$id": "3339", + "kind": "model", + "type": { + "$ref": "845" + }, + "value": { + "$id": "3340", + "key": { + "$id": "3341", + "kind": "string", + "type": { + "$ref": "847" + }, + "value": "e" + }, + "operator": { + "$id": "3342", + "kind": "string", + "type": { + "$ref": "104" + }, + "value": "In" + }, + "values": { + "$id": "3343", + "kind": "array", + "type": { + "$ref": "854" + }, + "value": [ + { + "$id": "3344", + "kind": "string", + "type": { + "$ref": "855" + }, + "value": "slmpajlywqvuyknipgztsonqyybt" + } + ] + } + } + } + ] + }, + "matchLabels": { + "$id": "3345", + "kind": "dict", + "type": { + "$ref": "861" + }, + "value": { + "$id": "3346", + "key6673": { + "$id": "3347", + "kind": "string", + "type": { + "$ref": "863" + }, + "value": "wlngfalznwxnurzpgxomcxhbqefpr" + } + } + } + } + } + } + }, + "persistentVolumeClaimSpec": { + "$id": "3348", + "kind": "model", + "type": { + "$ref": "771" + }, + "value": { + "$id": "3349", + "volumeName": { + "$id": "3350", + "kind": "string", + "type": { + "$ref": "773" + }, + "value": "c" + }, + "volumeMode": { + "$id": "3351", + "kind": "string", + "type": { + "$ref": "777" + }, + "value": "rxvpksjuuugqnqzeiprocknbn" + }, + "storageClassName": { + "$id": "3352", + "kind": "string", + "type": { + "$ref": "781" + }, + "value": "sseyhrjptkhrqvpdpjmornkqvon" + }, + "accessModes": { + "$id": "3353", + "kind": "array", + "type": { + "$ref": "785" + }, + "value": [ + { + "$id": "3354", + "kind": "string", + "type": { + "$ref": "786" + }, + "value": "nuluhigrbb" + } + ] + }, + "dataSource": { + "$id": "3355", + "kind": "model", + "type": { + "$ref": "790" + }, + "value": { + "$id": "3356", + "apiGroup": { + "$id": "3357", + "kind": "string", + "type": { + "$ref": "792" + }, + "value": "npqapyksvvpkohujx" + }, + "kind": { + "$id": "3358", + "kind": "string", + "type": { + "$ref": "796" + }, + "value": "wazgyb" + }, + "name": { + "$id": "3359", + "kind": "string", + "type": { + "$ref": "800" + }, + "value": "cwhsgxxcxsyppoefm" + } + } + }, + "dataSourceRef": { + "$id": "3360", + "kind": "model", + "type": { + "$ref": "806" + }, + "value": { + "$id": "3361", + "apiGroup": { + "$id": "3362", + "kind": "string", + "type": { + "$ref": "808" + }, + "value": "mnfnykznjjsoqpfsgdqioupt" + }, + "kind": { + "$id": "3363", + "kind": "string", + "type": { + "$ref": "812" + }, + "value": "odynqzekfzsnawrctaxg" + }, + "name": { + "$id": "3364", + "kind": "string", + "type": { + "$ref": "816" + }, + "value": "envszivbbmixbyddzg" + }, + "namespace": { + "$id": "3365", + "kind": "string", + "type": { + "$ref": "820" + }, + "value": "etcfzvxqd" + } + } + }, + "resources": { + "$id": "3366", + "kind": "model", + "type": { + "$ref": "826" + }, + "value": { + "$id": "3367", + "limits": { + "$id": "3368", + "kind": "dict", + "type": { + "$ref": "828" + }, + "value": { + "$id": "3369", + "key2719": { + "$id": "3370", + "kind": "string", + "type": { + "$ref": "830" + }, + "value": "hmphcrgctu" + } + } + }, + "requests": { + "$id": "3371", + "kind": "dict", + "type": { + "$ref": "834" + }, + "value": { + "$id": "3372", + "key2909": { + "$id": "3373", + "kind": "string", + "type": { + "$ref": "836" + }, + "value": "txocprnyrsgvhfrg" + } + } + } + } + }, + "selector": { + "$id": "3374", + "kind": "model", + "type": { + "$ref": "842" + }, + "value": { + "$id": "3375", + "matchExpressions": { + "$id": "3376", + "kind": "array", + "type": { + "$ref": "844" + }, + "value": [ + { + "$id": "3377", + "kind": "model", + "type": { + "$ref": "845" + }, + "value": { + "$id": "3378", + "key": { + "$id": "3379", + "kind": "string", + "type": { + "$ref": "847" + }, + "value": "e" + }, + "operator": { + "$id": "3380", + "kind": "string", + "type": { + "$ref": "104" + }, + "value": "In" + }, + "values": { + "$id": "3381", + "kind": "array", + "type": { + "$ref": "854" + }, + "value": [ + { + "$id": "3382", + "kind": "string", + "type": { + "$ref": "855" + }, + "value": "slmpajlywqvuyknipgztsonqyybt" + } + ] + } + } + } + ] + }, + "matchLabels": { + "$id": "3383", + "kind": "dict", + "type": { + "$ref": "861" + }, + "value": { + "$id": "3384", + "key6673": { + "$id": "3385", + "kind": "string", + "type": { + "$ref": "863" + }, + "value": "wlngfalznwxnurzpgxomcxhbqefpr" + } + } + } + } + } + } + } + } + }, + "generateResourceLimits": { + "$id": "3386", + "kind": "model", + "type": { + "$ref": "876" + }, + "value": { + "$id": "3387", + "cpu": { + "$id": "3388", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + } + } + }, + "memoryProfile": { + "$id": "3389", + "kind": "string", + "type": { + "$ref": "114" + }, + "value": "Tiny" + }, + "provisioningState": { + "$id": "3390", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "3391", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "3392", + "name": { + "$id": "3393", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "3394", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "3395", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123" + }, + "name": { + "$id": "3396", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "dowrkel" + }, + "type": { + "$id": "3397", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "xshjnsdgadygb" + }, + "systemData": { + "$id": "3398", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "3399", + "createdBy": { + "$id": "3400", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "3401", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "3402", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "3403", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "3404", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "3405", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + }, + { + "$id": "3406", + "kind": "http", + "name": "Broker_CreateOrUpdate_Simple", + "description": "Broker_CreateOrUpdate_Simple", + "filePath": "2025-04-01/Broker_CreateOrUpdate_Simple.json", + "parameters": [ + { + "$id": "3407", + "parameter": { + "$ref": "2447" + }, + "value": { + "$id": "3408", + "kind": "string", + "type": { + "$ref": "2448" + }, + "value": "2025-04-01" + } + }, + { + "$id": "3409", + "parameter": { + "$ref": "2451" + }, + "value": { + "$id": "3410", + "kind": "string", + "type": { + "$ref": "2452" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "3411", + "parameter": { + "$ref": "2454" + }, + "value": { + "$id": "3412", + "kind": "string", + "type": { + "$ref": "2455" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "3413", + "parameter": { + "$ref": "2456" + }, + "value": { + "$id": "3414", + "kind": "string", + "type": { + "$ref": "2457" + }, + "value": "resource-name123" + } + }, + { + "$id": "3415", + "parameter": { + "$ref": "2458" + }, + "value": { + "$id": "3416", + "kind": "string", + "type": { + "$ref": "2459" + }, + "value": "resource-name123" + } + }, + { + "$id": "3417", + "parameter": { + "$ref": "2466" + }, + "value": { + "$id": "3418", + "kind": "model", + "type": { + "$ref": "603" + }, + "value": { + "$id": "3419", + "properties": { + "$id": "3420", + "kind": "model", + "type": { + "$ref": "606" + }, + "value": { + "$id": "3421", + "cardinality": { + "$id": "3422", + "kind": "model", + "type": { + "$ref": "672" + }, + "value": { + "$id": "3423", + "backendChain": { + "$id": "3424", + "kind": "model", + "type": { + "$ref": "674" + }, + "value": { + "$id": "3425", + "partitions": { + "$id": "3426", + "kind": "number", + "type": { + "$ref": "676" + }, + "value": 2 + }, + "redundancyFactor": { + "$id": "3427", + "kind": "number", + "type": { + "$ref": "680" + }, + "value": 2 + }, + "workers": { + "$id": "3428", + "kind": "number", + "type": { + "$ref": "684" + }, + "value": 2 + } + } + }, + "frontend": { + "$id": "3429", + "kind": "model", + "type": { + "$ref": "690" + }, + "value": { + "$id": "3430", + "replicas": { + "$id": "3431", + "kind": "number", + "type": { + "$ref": "692" + }, + "value": 2 + }, + "workers": { + "$id": "3432", + "kind": "number", + "type": { + "$ref": "696" + }, + "value": 2 + } + } + } + } + }, + "generateResourceLimits": { + "$id": "3433", + "kind": "model", + "type": { + "$ref": "876" + }, + "value": { + "$id": "3434", + "cpu": { + "$id": "3435", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + } + } + }, + "memoryProfile": { + "$id": "3436", + "kind": "string", + "type": { + "$ref": "114" + }, + "value": "Low" + } + } + }, + "extendedLocation": { + "$id": "3437", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "3438", + "name": { + "$id": "3439", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "3440", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "3441", + "response": { + "$ref": "2467" + }, + "statusCode": 200, + "bodyValue": { + "$id": "3442", + "kind": "model", + "type": { + "$ref": "603" + }, + "value": { + "$id": "3443", + "properties": { + "$id": "3444", + "kind": "model", + "type": { + "$ref": "606" + }, + "value": { + "$id": "3445", + "advanced": { + "$id": "3446", + "kind": "model", + "type": { + "$ref": "608" + }, + "value": { + "$id": "3447", + "clients": { + "$id": "3448", + "kind": "model", + "type": { + "$ref": "610" + }, + "value": { + "$id": "3449", + "maxSessionExpirySeconds": { + "$id": "3450", + "kind": "number", + "type": { + "$ref": "612" + }, + "value": 3859 + }, + "maxMessageExpirySeconds": { + "$id": "3451", + "kind": "number", + "type": { + "$ref": "616" + }, + "value": 3263 + }, + "maxPacketSizeBytes": { + "$id": "3452", + "kind": "number", + "type": { + "$ref": "620" + }, + "value": 3029 + }, + "subscriberQueueLimit": { + "$id": "3453", + "kind": "model", + "type": { + "$ref": "624" + }, + "value": { + "$id": "3454", + "length": { + "$id": "3455", + "kind": "number", + "type": { + "$ref": "626" + }, + "value": 6 + }, + "strategy": { + "$id": "3456", + "kind": "string", + "type": { + "$ref": "76" + }, + "value": "None" + } + } + }, + "maxReceiveMaximum": { + "$id": "3457", + "kind": "number", + "type": { + "$ref": "635" + }, + "value": 2365 + }, + "maxKeepAliveSeconds": { + "$id": "3458", + "kind": "number", + "type": { + "$ref": "639" + }, + "value": 3744 + } + } + }, + "encryptInternalTraffic": { + "$id": "3459", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "internalCerts": { + "$id": "3460", + "kind": "model", + "type": { + "$ref": "648" + }, + "value": { + "$id": "3461", + "duration": { + "$id": "3462", + "kind": "string", + "type": { + "$ref": "650" + }, + "value": "bchrc" + }, + "renewBefore": { + "$id": "3463", + "kind": "string", + "type": { + "$ref": "654" + }, + "value": "xkafmpgjfifkwwrhkswtopdnne" + }, + "privateKey": { + "$id": "3464", + "kind": "model", + "type": { + "$ref": "658" + }, + "value": { + "$id": "3465", + "algorithm": { + "$id": "3466", + "kind": "string", + "type": { + "$ref": "82" + }, + "value": "Ec256" + }, + "rotationPolicy": { + "$id": "3467", + "kind": "string", + "type": { + "$ref": "98" + }, + "value": "Always" + } + } + } + } + } + } + }, + "cardinality": { + "$id": "3468", + "kind": "model", + "type": { + "$ref": "672" + }, + "value": { + "$id": "3469", + "backendChain": { + "$id": "3470", + "kind": "model", + "type": { + "$ref": "674" + }, + "value": { + "$id": "3471", + "partitions": { + "$id": "3472", + "kind": "number", + "type": { + "$ref": "676" + }, + "value": 11 + }, + "redundancyFactor": { + "$id": "3473", + "kind": "number", + "type": { + "$ref": "680" + }, + "value": 5 + }, + "workers": { + "$id": "3474", + "kind": "number", + "type": { + "$ref": "684" + }, + "value": 15 + } + } + }, + "frontend": { + "$id": "3475", + "kind": "model", + "type": { + "$ref": "690" + }, + "value": { + "$id": "3476", + "replicas": { + "$id": "3477", + "kind": "number", + "type": { + "$ref": "692" + }, + "value": 2 + }, + "workers": { + "$id": "3478", + "kind": "number", + "type": { + "$ref": "696" + }, + "value": 6 + } + } + } + } + }, + "diagnostics": { + "$id": "3479", + "kind": "model", + "type": { + "$ref": "704" + }, + "value": { + "$id": "3480", + "logs": { + "$id": "3481", + "kind": "model", + "type": { + "$ref": "706" + }, + "value": { + "$id": "3482", + "level": { + "$id": "3483", + "kind": "string", + "type": { + "$ref": "708" + }, + "value": "rnmwokumdmebpmfxxxzvvjfdywotav" + } + } + }, + "metrics": { + "$id": "3484", + "kind": "model", + "type": { + "$ref": "714" + }, + "value": { + "$id": "3485", + "prometheusPort": { + "$id": "3486", + "kind": "number", + "type": { + "$ref": "716" + }, + "value": 7581 + } + } + }, + "selfCheck": { + "$id": "3487", + "kind": "model", + "type": { + "$ref": "722" + }, + "value": { + "$id": "3488", + "mode": { + "$id": "3489", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "intervalSeconds": { + "$id": "3490", + "kind": "number", + "type": { + "$ref": "727" + }, + "value": 158 + }, + "timeoutSeconds": { + "$id": "3491", + "kind": "number", + "type": { + "$ref": "731" + }, + "value": 14 + } + } + }, + "traces": { + "$id": "3492", + "kind": "model", + "type": { + "$ref": "737" + }, + "value": { + "$id": "3493", + "mode": { + "$id": "3494", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "cacheSizeMegabytes": { + "$id": "3495", + "kind": "number", + "type": { + "$ref": "742" + }, + "value": 28 + }, + "selfTracing": { + "$id": "3496", + "kind": "model", + "type": { + "$ref": "746" + }, + "value": { + "$id": "3497", + "mode": { + "$id": "3498", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "intervalSeconds": { + "$id": "3499", + "kind": "number", + "type": { + "$ref": "751" + }, + "value": 22 + } + } + }, + "spanChannelCapacity": { + "$id": "3500", + "kind": "number", + "type": { + "$ref": "757" + }, + "value": 1000 + } + } + } + } + }, + "diskBackedMessageBuffer": { + "$id": "3501", + "kind": "model", + "type": { + "$ref": "765" + }, + "value": { + "$id": "3502", + "maxSize": { + "$id": "3503", + "kind": "string", + "type": { + "$ref": "767" + }, + "value": "500M" + }, + "ephemeralVolumeClaimSpec": { + "$id": "3504", + "kind": "model", + "type": { + "$ref": "771" + }, + "value": { + "$id": "3505", + "volumeName": { + "$id": "3506", + "kind": "string", + "type": { + "$ref": "773" + }, + "value": "c" + }, + "volumeMode": { + "$id": "3507", + "kind": "string", + "type": { + "$ref": "777" + }, + "value": "rxvpksjuuugqnqzeiprocknbn" + }, + "storageClassName": { + "$id": "3508", + "kind": "string", + "type": { + "$ref": "781" + }, + "value": "sseyhrjptkhrqvpdpjmornkqvon" + }, + "accessModes": { + "$id": "3509", + "kind": "array", + "type": { + "$ref": "785" + }, + "value": [ + { + "$id": "3510", + "kind": "string", + "type": { + "$ref": "786" + }, + "value": "nuluhigrbb" + } + ] + }, + "dataSource": { + "$id": "3511", + "kind": "model", + "type": { + "$ref": "790" + }, + "value": { + "$id": "3512", + "apiGroup": { + "$id": "3513", + "kind": "string", + "type": { + "$ref": "792" + }, + "value": "npqapyksvvpkohujx" + }, + "kind": { + "$id": "3514", + "kind": "string", + "type": { + "$ref": "796" + }, + "value": "wazgyb" + }, + "name": { + "$id": "3515", + "kind": "string", + "type": { + "$ref": "800" + }, + "value": "cwhsgxxcxsyppoefm" + } + } + }, + "dataSourceRef": { + "$id": "3516", + "kind": "model", + "type": { + "$ref": "806" + }, + "value": { + "$id": "3517", + "apiGroup": { + "$id": "3518", + "kind": "string", + "type": { + "$ref": "808" + }, + "value": "mnfnykznjjsoqpfsgdqioupt" + }, + "kind": { + "$id": "3519", + "kind": "string", + "type": { + "$ref": "812" + }, + "value": "odynqzekfzsnawrctaxg" + }, + "name": { + "$id": "3520", + "kind": "string", + "type": { + "$ref": "816" + }, + "value": "envszivbbmixbyddzg" + }, + "namespace": { + "$id": "3521", + "kind": "string", + "type": { + "$ref": "820" + }, + "value": "etcfzvxqd" + } + } + }, + "resources": { + "$id": "3522", + "kind": "model", + "type": { + "$ref": "826" + }, + "value": { + "$id": "3523", + "limits": { + "$id": "3524", + "kind": "dict", + "type": { + "$ref": "828" + }, + "value": { + "$id": "3525", + "key2719": { + "$id": "3526", + "kind": "string", + "type": { + "$ref": "830" + }, + "value": "hmphcrgctu" + } + } + }, + "requests": { + "$id": "3527", + "kind": "dict", + "type": { + "$ref": "834" + }, + "value": { + "$id": "3528", + "key2909": { + "$id": "3529", + "kind": "string", + "type": { + "$ref": "836" + }, + "value": "txocprnyrsgvhfrg" + } + } + } + } + }, + "selector": { + "$id": "3530", + "kind": "model", + "type": { + "$ref": "842" + }, + "value": { + "$id": "3531", + "matchExpressions": { + "$id": "3532", + "kind": "array", + "type": { + "$ref": "844" + }, + "value": [ + { + "$id": "3533", + "kind": "model", + "type": { + "$ref": "845" + }, + "value": { + "$id": "3534", + "key": { + "$id": "3535", + "kind": "string", + "type": { + "$ref": "847" + }, + "value": "e" + }, + "operator": { + "$id": "3536", + "kind": "string", + "type": { + "$ref": "104" + }, + "value": "In" + }, + "values": { + "$id": "3537", + "kind": "array", + "type": { + "$ref": "854" + }, + "value": [ + { + "$id": "3538", + "kind": "string", + "type": { + "$ref": "855" + }, + "value": "slmpajlywqvuyknipgztsonqyybt" + } + ] + } + } + } + ] + }, + "matchLabels": { + "$id": "3539", + "kind": "dict", + "type": { + "$ref": "861" + }, + "value": { + "$id": "3540", + "key6673": { + "$id": "3541", + "kind": "string", + "type": { + "$ref": "863" + }, + "value": "wlngfalznwxnurzpgxomcxhbqefpr" + } + } + } + } + } + } + }, + "persistentVolumeClaimSpec": { + "$id": "3542", + "kind": "model", + "type": { + "$ref": "771" + }, + "value": { + "$id": "3543", + "volumeName": { + "$id": "3544", + "kind": "string", + "type": { + "$ref": "773" + }, + "value": "c" + }, + "volumeMode": { + "$id": "3545", + "kind": "string", + "type": { + "$ref": "777" + }, + "value": "rxvpksjuuugqnqzeiprocknbn" + }, + "storageClassName": { + "$id": "3546", + "kind": "string", + "type": { + "$ref": "781" + }, + "value": "sseyhrjptkhrqvpdpjmornkqvon" + }, + "accessModes": { + "$id": "3547", + "kind": "array", + "type": { + "$ref": "785" + }, + "value": [ + { + "$id": "3548", + "kind": "string", + "type": { + "$ref": "786" + }, + "value": "nuluhigrbb" + } + ] + }, + "dataSource": { + "$id": "3549", + "kind": "model", + "type": { + "$ref": "790" + }, + "value": { + "$id": "3550", + "apiGroup": { + "$id": "3551", + "kind": "string", + "type": { + "$ref": "792" + }, + "value": "npqapyksvvpkohujx" + }, + "kind": { + "$id": "3552", + "kind": "string", + "type": { + "$ref": "796" + }, + "value": "wazgyb" + }, + "name": { + "$id": "3553", + "kind": "string", + "type": { + "$ref": "800" + }, + "value": "cwhsgxxcxsyppoefm" + } + } + }, + "dataSourceRef": { + "$id": "3554", + "kind": "model", + "type": { + "$ref": "806" + }, + "value": { + "$id": "3555", + "apiGroup": { + "$id": "3556", + "kind": "string", + "type": { + "$ref": "808" + }, + "value": "mnfnykznjjsoqpfsgdqioupt" + }, + "kind": { + "$id": "3557", + "kind": "string", + "type": { + "$ref": "812" + }, + "value": "odynqzekfzsnawrctaxg" + }, + "name": { + "$id": "3558", + "kind": "string", + "type": { + "$ref": "816" + }, + "value": "envszivbbmixbyddzg" + }, + "namespace": { + "$id": "3559", + "kind": "string", + "type": { + "$ref": "820" + }, + "value": "etcfzvxqd" + } + } + }, + "resources": { + "$id": "3560", + "kind": "model", + "type": { + "$ref": "826" + }, + "value": { + "$id": "3561", + "limits": { + "$id": "3562", + "kind": "dict", + "type": { + "$ref": "828" + }, + "value": { + "$id": "3563", + "key2719": { + "$id": "3564", + "kind": "string", + "type": { + "$ref": "830" + }, + "value": "hmphcrgctu" + } + } + }, + "requests": { + "$id": "3565", + "kind": "dict", + "type": { + "$ref": "834" + }, + "value": { + "$id": "3566", + "key2909": { + "$id": "3567", + "kind": "string", + "type": { + "$ref": "836" + }, + "value": "txocprnyrsgvhfrg" + } + } + } + } + }, + "selector": { + "$id": "3568", + "kind": "model", + "type": { + "$ref": "842" + }, + "value": { + "$id": "3569", + "matchExpressions": { + "$id": "3570", + "kind": "array", + "type": { + "$ref": "844" + }, + "value": [ + { + "$id": "3571", + "kind": "model", + "type": { + "$ref": "845" + }, + "value": { + "$id": "3572", + "key": { + "$id": "3573", + "kind": "string", + "type": { + "$ref": "847" + }, + "value": "e" + }, + "operator": { + "$id": "3574", + "kind": "string", + "type": { + "$ref": "104" + }, + "value": "In" + }, + "values": { + "$id": "3575", + "kind": "array", + "type": { + "$ref": "854" + }, + "value": [ + { + "$id": "3576", + "kind": "string", + "type": { + "$ref": "855" + }, + "value": "slmpajlywqvuyknipgztsonqyybt" + } + ] + } + } + } + ] + }, + "matchLabels": { + "$id": "3577", + "kind": "dict", + "type": { + "$ref": "861" + }, + "value": { + "$id": "3578", + "key6673": { + "$id": "3579", + "kind": "string", + "type": { + "$ref": "863" + }, + "value": "wlngfalznwxnurzpgxomcxhbqefpr" + } + } + } + } + } + } + } + } + }, + "generateResourceLimits": { + "$id": "3580", + "kind": "model", + "type": { + "$ref": "876" + }, + "value": { + "$id": "3581", + "cpu": { + "$id": "3582", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + } + } + }, + "memoryProfile": { + "$id": "3583", + "kind": "string", + "type": { + "$ref": "114" + }, + "value": "Tiny" + }, + "provisioningState": { + "$id": "3584", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "3585", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "3586", + "name": { + "$id": "3587", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "3588", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "3589", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123" + }, + "name": { + "$id": "3590", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "dowrkel" + }, + "type": { + "$id": "3591", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "xshjnsdgadygb" + }, + "systemData": { + "$id": "3592", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "3593", + "createdBy": { + "$id": "3594", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "3595", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "3596", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "3597", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "3598", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "3599", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "3600", + "response": { + "$ref": "2468" + }, + "statusCode": 201, + "bodyValue": { + "$id": "3601", + "kind": "model", + "type": { + "$ref": "603" + }, + "value": { + "$id": "3602", + "properties": { + "$id": "3603", + "kind": "model", + "type": { + "$ref": "606" + }, + "value": { + "$id": "3604", + "advanced": { + "$id": "3605", + "kind": "model", + "type": { + "$ref": "608" + }, + "value": { + "$id": "3606", + "clients": { + "$id": "3607", + "kind": "model", + "type": { + "$ref": "610" + }, + "value": { + "$id": "3608", + "maxSessionExpirySeconds": { + "$id": "3609", + "kind": "number", + "type": { + "$ref": "612" + }, + "value": 3859 + }, + "maxMessageExpirySeconds": { + "$id": "3610", + "kind": "number", + "type": { + "$ref": "616" + }, + "value": 3263 + }, + "maxPacketSizeBytes": { + "$id": "3611", + "kind": "number", + "type": { + "$ref": "620" + }, + "value": 3029 + }, + "subscriberQueueLimit": { + "$id": "3612", + "kind": "model", + "type": { + "$ref": "624" + }, + "value": { + "$id": "3613", + "length": { + "$id": "3614", + "kind": "number", + "type": { + "$ref": "626" + }, + "value": 6 + }, + "strategy": { + "$id": "3615", + "kind": "string", + "type": { + "$ref": "76" + }, + "value": "None" + } + } + }, + "maxReceiveMaximum": { + "$id": "3616", + "kind": "number", + "type": { + "$ref": "635" + }, + "value": 2365 + }, + "maxKeepAliveSeconds": { + "$id": "3617", + "kind": "number", + "type": { + "$ref": "639" + }, + "value": 3744 + } + } + }, + "encryptInternalTraffic": { + "$id": "3618", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "internalCerts": { + "$id": "3619", + "kind": "model", + "type": { + "$ref": "648" + }, + "value": { + "$id": "3620", + "duration": { + "$id": "3621", + "kind": "string", + "type": { + "$ref": "650" + }, + "value": "bchrc" + }, + "renewBefore": { + "$id": "3622", + "kind": "string", + "type": { + "$ref": "654" + }, + "value": "xkafmpgjfifkwwrhkswtopdnne" + }, + "privateKey": { + "$id": "3623", + "kind": "model", + "type": { + "$ref": "658" + }, + "value": { + "$id": "3624", + "algorithm": { + "$id": "3625", + "kind": "string", + "type": { + "$ref": "82" + }, + "value": "Ec256" + }, + "rotationPolicy": { + "$id": "3626", + "kind": "string", + "type": { + "$ref": "98" + }, + "value": "Always" + } + } + } + } + } + } + }, + "cardinality": { + "$id": "3627", + "kind": "model", + "type": { + "$ref": "672" + }, + "value": { + "$id": "3628", + "backendChain": { + "$id": "3629", + "kind": "model", + "type": { + "$ref": "674" + }, + "value": { + "$id": "3630", + "partitions": { + "$id": "3631", + "kind": "number", + "type": { + "$ref": "676" + }, + "value": 11 + }, + "redundancyFactor": { + "$id": "3632", + "kind": "number", + "type": { + "$ref": "680" + }, + "value": 5 + }, + "workers": { + "$id": "3633", + "kind": "number", + "type": { + "$ref": "684" + }, + "value": 15 + } + } + }, + "frontend": { + "$id": "3634", + "kind": "model", + "type": { + "$ref": "690" + }, + "value": { + "$id": "3635", + "replicas": { + "$id": "3636", + "kind": "number", + "type": { + "$ref": "692" + }, + "value": 2 + }, + "workers": { + "$id": "3637", + "kind": "number", + "type": { + "$ref": "696" + }, + "value": 6 + } + } + } + } + }, + "diagnostics": { + "$id": "3638", + "kind": "model", + "type": { + "$ref": "704" + }, + "value": { + "$id": "3639", + "logs": { + "$id": "3640", + "kind": "model", + "type": { + "$ref": "706" + }, + "value": { + "$id": "3641", + "level": { + "$id": "3642", + "kind": "string", + "type": { + "$ref": "708" + }, + "value": "rnmwokumdmebpmfxxxzvvjfdywotav" + } + } + }, + "metrics": { + "$id": "3643", + "kind": "model", + "type": { + "$ref": "714" + }, + "value": { + "$id": "3644", + "prometheusPort": { + "$id": "3645", + "kind": "number", + "type": { + "$ref": "716" + }, + "value": 7581 + } + } + }, + "selfCheck": { + "$id": "3646", + "kind": "model", + "type": { + "$ref": "722" + }, + "value": { + "$id": "3647", + "mode": { + "$id": "3648", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "intervalSeconds": { + "$id": "3649", + "kind": "number", + "type": { + "$ref": "727" + }, + "value": 158 + }, + "timeoutSeconds": { + "$id": "3650", + "kind": "number", + "type": { + "$ref": "731" + }, + "value": 14 + } + } + }, + "traces": { + "$id": "3651", + "kind": "model", + "type": { + "$ref": "737" + }, + "value": { + "$id": "3652", + "mode": { + "$id": "3653", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "cacheSizeMegabytes": { + "$id": "3654", + "kind": "number", + "type": { + "$ref": "742" + }, + "value": 28 + }, + "selfTracing": { + "$id": "3655", + "kind": "model", + "type": { + "$ref": "746" + }, + "value": { + "$id": "3656", + "mode": { + "$id": "3657", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "intervalSeconds": { + "$id": "3658", + "kind": "number", + "type": { + "$ref": "751" + }, + "value": 22 + } + } + }, + "spanChannelCapacity": { + "$id": "3659", + "kind": "number", + "type": { + "$ref": "757" + }, + "value": 1000 + } + } + } + } + }, + "diskBackedMessageBuffer": { + "$id": "3660", + "kind": "model", + "type": { + "$ref": "765" + }, + "value": { + "$id": "3661", + "maxSize": { + "$id": "3662", + "kind": "string", + "type": { + "$ref": "767" + }, + "value": "500M" + }, + "ephemeralVolumeClaimSpec": { + "$id": "3663", + "kind": "model", + "type": { + "$ref": "771" + }, + "value": { + "$id": "3664", + "volumeName": { + "$id": "3665", + "kind": "string", + "type": { + "$ref": "773" + }, + "value": "c" + }, + "volumeMode": { + "$id": "3666", + "kind": "string", + "type": { + "$ref": "777" + }, + "value": "rxvpksjuuugqnqzeiprocknbn" + }, + "storageClassName": { + "$id": "3667", + "kind": "string", + "type": { + "$ref": "781" + }, + "value": "sseyhrjptkhrqvpdpjmornkqvon" + }, + "accessModes": { + "$id": "3668", + "kind": "array", + "type": { + "$ref": "785" + }, + "value": [ + { + "$id": "3669", + "kind": "string", + "type": { + "$ref": "786" + }, + "value": "nuluhigrbb" + } + ] + }, + "dataSource": { + "$id": "3670", + "kind": "model", + "type": { + "$ref": "790" + }, + "value": { + "$id": "3671", + "apiGroup": { + "$id": "3672", + "kind": "string", + "type": { + "$ref": "792" + }, + "value": "npqapyksvvpkohujx" + }, + "kind": { + "$id": "3673", + "kind": "string", + "type": { + "$ref": "796" + }, + "value": "wazgyb" + }, + "name": { + "$id": "3674", + "kind": "string", + "type": { + "$ref": "800" + }, + "value": "cwhsgxxcxsyppoefm" + } + } + }, + "dataSourceRef": { + "$id": "3675", + "kind": "model", + "type": { + "$ref": "806" + }, + "value": { + "$id": "3676", + "apiGroup": { + "$id": "3677", + "kind": "string", + "type": { + "$ref": "808" + }, + "value": "mnfnykznjjsoqpfsgdqioupt" + }, + "kind": { + "$id": "3678", + "kind": "string", + "type": { + "$ref": "812" + }, + "value": "odynqzekfzsnawrctaxg" + }, + "name": { + "$id": "3679", + "kind": "string", + "type": { + "$ref": "816" + }, + "value": "envszivbbmixbyddzg" + }, + "namespace": { + "$id": "3680", + "kind": "string", + "type": { + "$ref": "820" + }, + "value": "etcfzvxqd" + } + } + }, + "resources": { + "$id": "3681", + "kind": "model", + "type": { + "$ref": "826" + }, + "value": { + "$id": "3682", + "limits": { + "$id": "3683", + "kind": "dict", + "type": { + "$ref": "828" + }, + "value": { + "$id": "3684", + "key2719": { + "$id": "3685", + "kind": "string", + "type": { + "$ref": "830" + }, + "value": "hmphcrgctu" + } + } + }, + "requests": { + "$id": "3686", + "kind": "dict", + "type": { + "$ref": "834" + }, + "value": { + "$id": "3687", + "key2909": { + "$id": "3688", + "kind": "string", + "type": { + "$ref": "836" + }, + "value": "txocprnyrsgvhfrg" + } + } + } + } + }, + "selector": { + "$id": "3689", + "kind": "model", + "type": { + "$ref": "842" + }, + "value": { + "$id": "3690", + "matchExpressions": { + "$id": "3691", + "kind": "array", + "type": { + "$ref": "844" + }, + "value": [ + { + "$id": "3692", + "kind": "model", + "type": { + "$ref": "845" + }, + "value": { + "$id": "3693", + "key": { + "$id": "3694", + "kind": "string", + "type": { + "$ref": "847" + }, + "value": "e" + }, + "operator": { + "$id": "3695", + "kind": "string", + "type": { + "$ref": "104" + }, + "value": "In" + }, + "values": { + "$id": "3696", + "kind": "array", + "type": { + "$ref": "854" + }, + "value": [ + { + "$id": "3697", + "kind": "string", + "type": { + "$ref": "855" + }, + "value": "slmpajlywqvuyknipgztsonqyybt" + } + ] + } + } + } + ] + }, + "matchLabels": { + "$id": "3698", + "kind": "dict", + "type": { + "$ref": "861" + }, + "value": { + "$id": "3699", + "key6673": { + "$id": "3700", + "kind": "string", + "type": { + "$ref": "863" + }, + "value": "wlngfalznwxnurzpgxomcxhbqefpr" + } + } + } + } + } + } + }, + "persistentVolumeClaimSpec": { + "$id": "3701", + "kind": "model", + "type": { + "$ref": "771" + }, + "value": { + "$id": "3702", + "volumeName": { + "$id": "3703", + "kind": "string", + "type": { + "$ref": "773" + }, + "value": "c" + }, + "volumeMode": { + "$id": "3704", + "kind": "string", + "type": { + "$ref": "777" + }, + "value": "rxvpksjuuugqnqzeiprocknbn" + }, + "storageClassName": { + "$id": "3705", + "kind": "string", + "type": { + "$ref": "781" + }, + "value": "sseyhrjptkhrqvpdpjmornkqvon" + }, + "accessModes": { + "$id": "3706", + "kind": "array", + "type": { + "$ref": "785" + }, + "value": [ + { + "$id": "3707", + "kind": "string", + "type": { + "$ref": "786" + }, + "value": "nuluhigrbb" + } + ] + }, + "dataSource": { + "$id": "3708", + "kind": "model", + "type": { + "$ref": "790" + }, + "value": { + "$id": "3709", + "apiGroup": { + "$id": "3710", + "kind": "string", + "type": { + "$ref": "792" + }, + "value": "npqapyksvvpkohujx" + }, + "kind": { + "$id": "3711", + "kind": "string", + "type": { + "$ref": "796" + }, + "value": "wazgyb" + }, + "name": { + "$id": "3712", + "kind": "string", + "type": { + "$ref": "800" + }, + "value": "cwhsgxxcxsyppoefm" + } + } + }, + "dataSourceRef": { + "$id": "3713", + "kind": "model", + "type": { + "$ref": "806" + }, + "value": { + "$id": "3714", + "apiGroup": { + "$id": "3715", + "kind": "string", + "type": { + "$ref": "808" + }, + "value": "mnfnykznjjsoqpfsgdqioupt" + }, + "kind": { + "$id": "3716", + "kind": "string", + "type": { + "$ref": "812" + }, + "value": "odynqzekfzsnawrctaxg" + }, + "name": { + "$id": "3717", + "kind": "string", + "type": { + "$ref": "816" + }, + "value": "envszivbbmixbyddzg" + }, + "namespace": { + "$id": "3718", + "kind": "string", + "type": { + "$ref": "820" + }, + "value": "etcfzvxqd" + } + } + }, + "resources": { + "$id": "3719", + "kind": "model", + "type": { + "$ref": "826" + }, + "value": { + "$id": "3720", + "limits": { + "$id": "3721", + "kind": "dict", + "type": { + "$ref": "828" + }, + "value": { + "$id": "3722", + "key2719": { + "$id": "3723", + "kind": "string", + "type": { + "$ref": "830" + }, + "value": "hmphcrgctu" + } + } + }, + "requests": { + "$id": "3724", + "kind": "dict", + "type": { + "$ref": "834" + }, + "value": { + "$id": "3725", + "key2909": { + "$id": "3726", + "kind": "string", + "type": { + "$ref": "836" + }, + "value": "txocprnyrsgvhfrg" + } + } + } + } + }, + "selector": { + "$id": "3727", + "kind": "model", + "type": { + "$ref": "842" + }, + "value": { + "$id": "3728", + "matchExpressions": { + "$id": "3729", + "kind": "array", + "type": { + "$ref": "844" + }, + "value": [ + { + "$id": "3730", + "kind": "model", + "type": { + "$ref": "845" + }, + "value": { + "$id": "3731", + "key": { + "$id": "3732", + "kind": "string", + "type": { + "$ref": "847" + }, + "value": "e" + }, + "operator": { + "$id": "3733", + "kind": "string", + "type": { + "$ref": "104" + }, + "value": "In" + }, + "values": { + "$id": "3734", + "kind": "array", + "type": { + "$ref": "854" + }, + "value": [ + { + "$id": "3735", + "kind": "string", + "type": { + "$ref": "855" + }, + "value": "slmpajlywqvuyknipgztsonqyybt" + } + ] + } + } + } + ] + }, + "matchLabels": { + "$id": "3736", + "kind": "dict", + "type": { + "$ref": "861" + }, + "value": { + "$id": "3737", + "key6673": { + "$id": "3738", + "kind": "string", + "type": { + "$ref": "863" + }, + "value": "wlngfalznwxnurzpgxomcxhbqefpr" + } + } + } + } + } + } + } + } + }, + "generateResourceLimits": { + "$id": "3739", + "kind": "model", + "type": { + "$ref": "876" + }, + "value": { + "$id": "3740", + "cpu": { + "$id": "3741", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + } + } + }, + "memoryProfile": { + "$id": "3742", + "kind": "string", + "type": { + "$ref": "114" + }, + "value": "Tiny" + }, + "provisioningState": { + "$id": "3743", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "3744", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "3745", + "name": { + "$id": "3746", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "3747", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "3748", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123" + }, + "name": { + "$id": "3749", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "dowrkel" + }, + "type": { + "$id": "3750", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "xshjnsdgadygb" + }, + "systemData": { + "$id": "3751", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "3752", + "createdBy": { + "$id": "3753", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "3754", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "3755", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "3756", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "3757", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "3758", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "3759", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3760", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3761", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "3762", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3763", + "name": "brokerName", + "nameInRequest": "brokerName", + "doc": "Name of broker.", + "type": { + "$id": "3764", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3765", + "name": "resource", + "nameInRequest": "resource", + "doc": "Resource create parameters.", + "type": { + "$ref": "603" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3766", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "3767", + "kind": "constant", + "valueType": { + "$id": "3768", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3769", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "3770", + "kind": "constant", + "valueType": { + "$id": "3771", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "3772", + "type": { + "$ref": "603" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Broker.createOrUpdate" + }, + { + "$id": "3773", + "kind": "lro", + "name": "delete", + "accessibility": "public", + "apiVersions": [ + "2024-11-01", + "2025-04-01" + ], + "doc": "Delete a BrokerResource", + "operation": { + "$id": "3774", + "name": "delete", + "resourceName": "BrokerResource", + "doc": "Delete a BrokerResource", + "accessibility": "public", + "parameters": [ + { + "$id": "3775", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "3776", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "3777", + "type": { + "$id": "3778", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-04-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3779", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "3780", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "3781", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3782", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3783", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3784", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "3785", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3786", + "name": "brokerName", + "nameInRequest": "brokerName", + "doc": "Name of broker.", + "type": { + "$id": "3787", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3788", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "3789", + "kind": "constant", + "valueType": { + "$id": "3790", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "3791", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "3792", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "3793", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "3794", + "name": "retryAfter", + "nameInResponse": "Retry-After", + "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "type": { + "$id": "3795", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false + }, + { + "$id": "3796", + "statusCodes": [ + 204 + ], + "headers": [], + "isErrorResponse": false + } + ], + "httpMethod": "DELETE", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/brokers/{brokerName}", + "bufferResponse": true, + "longRunning": { + "$id": "3797", + "finalStateVia": 1, + "finalResponse": { + "$id": "3798", + "statusCodes": [ + 204 + ] + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Broker.delete", + "decorators": [], + "examples": [ + { + "$id": "3799", + "kind": "http", + "name": "Broker_Delete", + "description": "Broker_Delete", + "filePath": "2025-04-01/Broker_Delete_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "3800", + "parameter": { + "$ref": "3775" + }, + "value": { + "$id": "3801", + "kind": "string", + "type": { + "$ref": "3776" + }, + "value": "2025-04-01" + } + }, + { + "$id": "3802", + "parameter": { + "$ref": "3779" + }, + "value": { + "$id": "3803", + "kind": "string", + "type": { + "$ref": "3780" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "3804", + "parameter": { + "$ref": "3782" + }, + "value": { + "$id": "3805", + "kind": "string", + "type": { + "$ref": "3783" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "3806", + "parameter": { + "$ref": "3784" + }, + "value": { + "$id": "3807", + "kind": "string", + "type": { + "$ref": "3785" + }, + "value": "resource-name123" + } + }, + { + "$id": "3808", + "parameter": { + "$ref": "3786" + }, + "value": { + "$id": "3809", + "kind": "string", + "type": { + "$ref": "3787" + }, + "value": "resource-name123" + } + } + ], + "responses": [ + { + "$id": "3810", + "response": { + "$ref": "3791" + }, + "statusCode": 202 + }, + { + "$id": "3811", + "response": { + "$ref": "3796" + }, + "statusCode": 204 + } + ] + } + ] + }, + "parameters": [ + { + "$id": "3812", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3813", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3814", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "3815", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3816", + "name": "brokerName", + "nameInRequest": "brokerName", + "doc": "Name of broker.", + "type": { + "$id": "3817", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3818", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "3819", + "kind": "constant", + "valueType": { + "$id": "3820", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "3821" + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Broker.delete" + }, + { + "$id": "3822", + "kind": "paging", + "name": "listByResourceGroup", + "accessibility": "public", + "apiVersions": [ + "2024-11-01", + "2025-04-01" + ], + "doc": "List BrokerResource resources by InstanceResource", + "operation": { + "$id": "3823", + "name": "listByResourceGroup", + "resourceName": "BrokerResource", + "doc": "List BrokerResource resources by InstanceResource", + "accessibility": "public", + "parameters": [ + { + "$id": "3824", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "3825", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "3826", + "type": { + "$id": "3827", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-04-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3828", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "3829", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "3830", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3831", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3832", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3833", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "3834", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3835", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "3836", + "kind": "constant", + "valueType": { + "$id": "3837", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "3838", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "895" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/brokers", + "bufferResponse": true, + "paging": { + "$id": "3839", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "3840", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Broker.listByResourceGroup", + "decorators": [], + "examples": [ + { + "$id": "3841", + "kind": "http", + "name": "Broker_ListByResourceGroup", + "description": "Broker_ListByResourceGroup", + "filePath": "2025-04-01/Broker_ListByResourceGroup_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "3842", + "parameter": { + "$ref": "3824" + }, + "value": { + "$id": "3843", + "kind": "string", + "type": { + "$ref": "3825" + }, + "value": "2025-04-01" + } + }, + { + "$id": "3844", + "parameter": { + "$ref": "3828" + }, + "value": { + "$id": "3845", + "kind": "string", + "type": { + "$ref": "3829" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "3846", + "parameter": { + "$ref": "3831" + }, + "value": { + "$id": "3847", + "kind": "string", + "type": { + "$ref": "3832" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "3848", + "parameter": { + "$ref": "3833" + }, + "value": { + "$id": "3849", + "kind": "string", + "type": { + "$ref": "3834" + }, + "value": "resource-name123" + } + } + ], + "responses": [ + { + "$id": "3850", + "response": { + "$ref": "3838" + }, + "statusCode": 200, + "bodyValue": { + "$id": "3851", + "kind": "model", + "type": { + "$ref": "895" + }, + "value": { + "$id": "3852", + "value": { + "$id": "3853", + "kind": "array", + "type": { + "$ref": "897" + }, + "value": [ + { + "$id": "3854", + "kind": "model", + "type": { + "$ref": "603" + }, + "value": { + "$id": "3855", + "properties": { + "$id": "3856", + "kind": "model", + "type": { + "$ref": "606" + }, + "value": { + "$id": "3857", + "advanced": { + "$id": "3858", + "kind": "model", + "type": { + "$ref": "608" + }, + "value": { + "$id": "3859", + "clients": { + "$id": "3860", + "kind": "model", + "type": { + "$ref": "610" + }, + "value": { + "$id": "3861", + "maxSessionExpirySeconds": { + "$id": "3862", + "kind": "number", + "type": { + "$ref": "612" + }, + "value": 3859 + }, + "maxMessageExpirySeconds": { + "$id": "3863", + "kind": "number", + "type": { + "$ref": "616" + }, + "value": 3263 + }, + "maxPacketSizeBytes": { + "$id": "3864", + "kind": "number", + "type": { + "$ref": "620" + }, + "value": 3029 + }, + "subscriberQueueLimit": { + "$id": "3865", + "kind": "model", + "type": { + "$ref": "624" + }, + "value": { + "$id": "3866", + "length": { + "$id": "3867", + "kind": "number", + "type": { + "$ref": "626" + }, + "value": 6 + }, + "strategy": { + "$id": "3868", + "kind": "string", + "type": { + "$ref": "76" + }, + "value": "None" + } + } + }, + "maxReceiveMaximum": { + "$id": "3869", + "kind": "number", + "type": { + "$ref": "635" + }, + "value": 2365 + }, + "maxKeepAliveSeconds": { + "$id": "3870", + "kind": "number", + "type": { + "$ref": "639" + }, + "value": 3744 + } + } + }, + "encryptInternalTraffic": { + "$id": "3871", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "internalCerts": { + "$id": "3872", + "kind": "model", + "type": { + "$ref": "648" + }, + "value": { + "$id": "3873", + "duration": { + "$id": "3874", + "kind": "string", + "type": { + "$ref": "650" + }, + "value": "bchrc" + }, + "renewBefore": { + "$id": "3875", + "kind": "string", + "type": { + "$ref": "654" + }, + "value": "xkafmpgjfifkwwrhkswtopdnne" + }, + "privateKey": { + "$id": "3876", + "kind": "model", + "type": { + "$ref": "658" + }, + "value": { + "$id": "3877", + "algorithm": { + "$id": "3878", + "kind": "string", + "type": { + "$ref": "82" + }, + "value": "Ec256" + }, + "rotationPolicy": { + "$id": "3879", + "kind": "string", + "type": { + "$ref": "98" + }, + "value": "Always" + } + } + } + } + } + } + }, + "cardinality": { + "$id": "3880", + "kind": "model", + "type": { + "$ref": "672" + }, + "value": { + "$id": "3881", + "backendChain": { + "$id": "3882", + "kind": "model", + "type": { + "$ref": "674" + }, + "value": { + "$id": "3883", + "partitions": { + "$id": "3884", + "kind": "number", + "type": { + "$ref": "676" + }, + "value": 11 + }, + "redundancyFactor": { + "$id": "3885", + "kind": "number", + "type": { + "$ref": "680" + }, + "value": 5 + }, + "workers": { + "$id": "3886", + "kind": "number", + "type": { + "$ref": "684" + }, + "value": 15 + } + } + }, + "frontend": { + "$id": "3887", + "kind": "model", + "type": { + "$ref": "690" + }, + "value": { + "$id": "3888", + "replicas": { + "$id": "3889", + "kind": "number", + "type": { + "$ref": "692" + }, + "value": 2 + }, + "workers": { + "$id": "3890", + "kind": "number", + "type": { + "$ref": "696" + }, + "value": 6 + } + } + } + } + }, + "diagnostics": { + "$id": "3891", + "kind": "model", + "type": { + "$ref": "704" + }, + "value": { + "$id": "3892", + "logs": { + "$id": "3893", + "kind": "model", + "type": { + "$ref": "706" + }, + "value": { + "$id": "3894", + "level": { + "$id": "3895", + "kind": "string", + "type": { + "$ref": "708" + }, + "value": "rnmwokumdmebpmfxxxzvvjfdywotav" + } + } + }, + "metrics": { + "$id": "3896", + "kind": "model", + "type": { + "$ref": "714" + }, + "value": { + "$id": "3897", + "prometheusPort": { + "$id": "3898", + "kind": "number", + "type": { + "$ref": "716" + }, + "value": 7581 + } + } + }, + "selfCheck": { + "$id": "3899", + "kind": "model", + "type": { + "$ref": "722" + }, + "value": { + "$id": "3900", + "mode": { + "$id": "3901", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "intervalSeconds": { + "$id": "3902", + "kind": "number", + "type": { + "$ref": "727" + }, + "value": 158 + }, + "timeoutSeconds": { + "$id": "3903", + "kind": "number", + "type": { + "$ref": "731" + }, + "value": 14 + } + } + }, + "traces": { + "$id": "3904", + "kind": "model", + "type": { + "$ref": "737" + }, + "value": { + "$id": "3905", + "mode": { + "$id": "3906", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "cacheSizeMegabytes": { + "$id": "3907", + "kind": "number", + "type": { + "$ref": "742" + }, + "value": 28 + }, + "selfTracing": { + "$id": "3908", + "kind": "model", + "type": { + "$ref": "746" + }, + "value": { + "$id": "3909", + "mode": { + "$id": "3910", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "intervalSeconds": { + "$id": "3911", + "kind": "number", + "type": { + "$ref": "751" + }, + "value": 22 + } + } + }, + "spanChannelCapacity": { + "$id": "3912", + "kind": "number", + "type": { + "$ref": "757" + }, + "value": 1000 + } + } + } + } + }, + "diskBackedMessageBuffer": { + "$id": "3913", + "kind": "model", + "type": { + "$ref": "765" + }, + "value": { + "$id": "3914", + "maxSize": { + "$id": "3915", + "kind": "string", + "type": { + "$ref": "767" + }, + "value": "500M" + }, + "ephemeralVolumeClaimSpec": { + "$id": "3916", + "kind": "model", + "type": { + "$ref": "771" + }, + "value": { + "$id": "3917", + "volumeName": { + "$id": "3918", + "kind": "string", + "type": { + "$ref": "773" + }, + "value": "c" + }, + "volumeMode": { + "$id": "3919", + "kind": "string", + "type": { + "$ref": "777" + }, + "value": "rxvpksjuuugqnqzeiprocknbn" + }, + "storageClassName": { + "$id": "3920", + "kind": "string", + "type": { + "$ref": "781" + }, + "value": "sseyhrjptkhrqvpdpjmornkqvon" + }, + "accessModes": { + "$id": "3921", + "kind": "array", + "type": { + "$ref": "785" + }, + "value": [ + { + "$id": "3922", + "kind": "string", + "type": { + "$ref": "786" + }, + "value": "nuluhigrbb" + } + ] + }, + "dataSource": { + "$id": "3923", + "kind": "model", + "type": { + "$ref": "790" + }, + "value": { + "$id": "3924", + "apiGroup": { + "$id": "3925", + "kind": "string", + "type": { + "$ref": "792" + }, + "value": "npqapyksvvpkohujx" + }, + "kind": { + "$id": "3926", + "kind": "string", + "type": { + "$ref": "796" + }, + "value": "wazgyb" + }, + "name": { + "$id": "3927", + "kind": "string", + "type": { + "$ref": "800" + }, + "value": "cwhsgxxcxsyppoefm" + } + } + }, + "dataSourceRef": { + "$id": "3928", + "kind": "model", + "type": { + "$ref": "806" + }, + "value": { + "$id": "3929", + "apiGroup": { + "$id": "3930", + "kind": "string", + "type": { + "$ref": "808" + }, + "value": "mnfnykznjjsoqpfsgdqioupt" + }, + "kind": { + "$id": "3931", + "kind": "string", + "type": { + "$ref": "812" + }, + "value": "odynqzekfzsnawrctaxg" + }, + "name": { + "$id": "3932", + "kind": "string", + "type": { + "$ref": "816" + }, + "value": "envszivbbmixbyddzg" + }, + "namespace": { + "$id": "3933", + "kind": "string", + "type": { + "$ref": "820" + }, + "value": "etcfzvxqd" + } + } + }, + "resources": { + "$id": "3934", + "kind": "model", + "type": { + "$ref": "826" + }, + "value": { + "$id": "3935", + "limits": { + "$id": "3936", + "kind": "dict", + "type": { + "$ref": "828" + }, + "value": { + "$id": "3937", + "key2719": { + "$id": "3938", + "kind": "string", + "type": { + "$ref": "830" + }, + "value": "hmphcrgctu" + } + } + }, + "requests": { + "$id": "3939", + "kind": "dict", + "type": { + "$ref": "834" + }, + "value": { + "$id": "3940", + "key2909": { + "$id": "3941", + "kind": "string", + "type": { + "$ref": "836" + }, + "value": "txocprnyrsgvhfrg" + } + } + } + } + }, + "selector": { + "$id": "3942", + "kind": "model", + "type": { + "$ref": "842" + }, + "value": { + "$id": "3943", + "matchExpressions": { + "$id": "3944", + "kind": "array", + "type": { + "$ref": "844" + }, + "value": [ + { + "$id": "3945", + "kind": "model", + "type": { + "$ref": "845" + }, + "value": { + "$id": "3946", + "key": { + "$id": "3947", + "kind": "string", + "type": { + "$ref": "847" + }, + "value": "e" + }, + "operator": { + "$id": "3948", + "kind": "string", + "type": { + "$ref": "104" + }, + "value": "In" + }, + "values": { + "$id": "3949", + "kind": "array", + "type": { + "$ref": "854" + }, + "value": [ + { + "$id": "3950", + "kind": "string", + "type": { + "$ref": "855" + }, + "value": "slmpajlywqvuyknipgztsonqyybt" + } + ] + } + } + } + ] + }, + "matchLabels": { + "$id": "3951", + "kind": "dict", + "type": { + "$ref": "861" + }, + "value": { + "$id": "3952", + "key6673": { + "$id": "3953", + "kind": "string", + "type": { + "$ref": "863" + }, + "value": "wlngfalznwxnurzpgxomcxhbqefpr" + } + } + } + } + } + } + }, + "persistentVolumeClaimSpec": { + "$id": "3954", + "kind": "model", + "type": { + "$ref": "771" + }, + "value": { + "$id": "3955", + "volumeName": { + "$id": "3956", + "kind": "string", + "type": { + "$ref": "773" + }, + "value": "c" + }, + "volumeMode": { + "$id": "3957", + "kind": "string", + "type": { + "$ref": "777" + }, + "value": "rxvpksjuuugqnqzeiprocknbn" + }, + "storageClassName": { + "$id": "3958", + "kind": "string", + "type": { + "$ref": "781" + }, + "value": "sseyhrjptkhrqvpdpjmornkqvon" + }, + "accessModes": { + "$id": "3959", + "kind": "array", + "type": { + "$ref": "785" + }, + "value": [ + { + "$id": "3960", + "kind": "string", + "type": { + "$ref": "786" + }, + "value": "nuluhigrbb" + } + ] + }, + "dataSource": { + "$id": "3961", + "kind": "model", + "type": { + "$ref": "790" + }, + "value": { + "$id": "3962", + "apiGroup": { + "$id": "3963", + "kind": "string", + "type": { + "$ref": "792" + }, + "value": "npqapyksvvpkohujx" + }, + "kind": { + "$id": "3964", + "kind": "string", + "type": { + "$ref": "796" + }, + "value": "wazgyb" + }, + "name": { + "$id": "3965", + "kind": "string", + "type": { + "$ref": "800" + }, + "value": "cwhsgxxcxsyppoefm" + } + } + }, + "dataSourceRef": { + "$id": "3966", + "kind": "model", + "type": { + "$ref": "806" + }, + "value": { + "$id": "3967", + "apiGroup": { + "$id": "3968", + "kind": "string", + "type": { + "$ref": "808" + }, + "value": "mnfnykznjjsoqpfsgdqioupt" + }, + "kind": { + "$id": "3969", + "kind": "string", + "type": { + "$ref": "812" + }, + "value": "odynqzekfzsnawrctaxg" + }, + "name": { + "$id": "3970", + "kind": "string", + "type": { + "$ref": "816" + }, + "value": "envszivbbmixbyddzg" + }, + "namespace": { + "$id": "3971", + "kind": "string", + "type": { + "$ref": "820" + }, + "value": "etcfzvxqd" + } + } + }, + "resources": { + "$id": "3972", + "kind": "model", + "type": { + "$ref": "826" + }, + "value": { + "$id": "3973", + "limits": { + "$id": "3974", + "kind": "dict", + "type": { + "$ref": "828" + }, + "value": { + "$id": "3975", + "key2719": { + "$id": "3976", + "kind": "string", + "type": { + "$ref": "830" + }, + "value": "hmphcrgctu" + } + } + }, + "requests": { + "$id": "3977", + "kind": "dict", + "type": { + "$ref": "834" + }, + "value": { + "$id": "3978", + "key2909": { + "$id": "3979", + "kind": "string", + "type": { + "$ref": "836" + }, + "value": "txocprnyrsgvhfrg" + } + } + } + } + }, + "selector": { + "$id": "3980", + "kind": "model", + "type": { + "$ref": "842" + }, + "value": { + "$id": "3981", + "matchExpressions": { + "$id": "3982", + "kind": "array", + "type": { + "$ref": "844" + }, + "value": [ + { + "$id": "3983", + "kind": "model", + "type": { + "$ref": "845" + }, + "value": { + "$id": "3984", + "key": { + "$id": "3985", + "kind": "string", + "type": { + "$ref": "847" + }, + "value": "e" + }, + "operator": { + "$id": "3986", + "kind": "string", + "type": { + "$ref": "104" + }, + "value": "In" + }, + "values": { + "$id": "3987", + "kind": "array", + "type": { + "$ref": "854" + }, + "value": [ + { + "$id": "3988", + "kind": "string", + "type": { + "$ref": "855" + }, + "value": "slmpajlywqvuyknipgztsonqyybt" + } + ] + } + } + } + ] + }, + "matchLabels": { + "$id": "3989", + "kind": "dict", + "type": { + "$ref": "861" + }, + "value": { + "$id": "3990", + "key6673": { + "$id": "3991", + "kind": "string", + "type": { + "$ref": "863" + }, + "value": "wlngfalznwxnurzpgxomcxhbqefpr" + } + } + } + } + } + } + } + } + }, + "generateResourceLimits": { + "$id": "3992", + "kind": "model", + "type": { + "$ref": "876" + }, + "value": { + "$id": "3993", + "cpu": { + "$id": "3994", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + } + } + }, + "memoryProfile": { + "$id": "3995", + "kind": "string", + "type": { + "$ref": "114" + }, + "value": "Tiny" + }, + "provisioningState": { + "$id": "3996", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "3997", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "3998", + "name": { + "$id": "3999", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "4000", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "4001", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123" + }, + "name": { + "$id": "4002", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "dowrkel" + }, + "type": { + "$id": "4003", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "xshjnsdgadygb" + }, + "systemData": { + "$id": "4004", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "4005", + "createdBy": { + "$id": "4006", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "4007", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "4008", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "4009", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "4010", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "4011", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + ] + }, + "nextLink": { + "$id": "4012", + "kind": "string", + "type": { + "$ref": "901" + }, + "value": "https://microsoft.com/a" + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "4013", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "4014", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4015", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "4016", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4017", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "3836" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "4018", + "type": { + "$id": "4019", + "kind": "array", + "name": "ArrayBrokerResource", + "valueType": { + "$ref": "603" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "resultSegments": [ + "value" + ] + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Broker.listByResourceGroup" + } + ], + "parameters": [ + { + "$id": "4020", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "4021", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "location": "Uri", + "isApiVersion": false, + "isContentType": false, + "isRequired": true, + "isEndpoint": true, + "skipUrlEncoding": false, + "explode": false, + "kind": "Client", + "defaultValue": { + "$id": "4022", + "type": { + "$id": "4023", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "4024", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "4025" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Broker", + "apiVersions": [ + "2024-11-01", + "2025-04-01" + ], + "parent": { + "$ref": "1710" + } + }, + { + "$id": "4026", + "kind": "client", + "name": "BrokerListener", + "namespace": "Azure.ResourceManager.IotOperations", + "methods": [ + { + "$id": "4027", + "kind": "basic", + "name": "get", + "accessibility": "public", + "apiVersions": [ + "2024-11-01", + "2025-04-01" + ], + "doc": "Get a BrokerListenerResource", + "operation": { + "$id": "4028", + "name": "get", + "resourceName": "BrokerListenerResource", + "doc": "Get a BrokerListenerResource", + "accessibility": "public", + "parameters": [ + { + "$id": "4029", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "4030", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "4031", + "type": { + "$id": "4032", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-04-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4033", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "4034", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "4035", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4036", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "4037", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4038", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "4039", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4040", + "name": "brokerName", + "nameInRequest": "brokerName", + "doc": "Name of broker.", + "type": { + "$id": "4041", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4042", + "name": "listenerName", + "nameInRequest": "listenerName", + "doc": "Name of Instance broker listener resource", + "type": { + "$id": "4043", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4044", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "4045", + "kind": "constant", + "valueType": { + "$id": "4046", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "4047", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "905" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/brokers/{brokerName}/listeners/{listenerName}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerListener.get", + "decorators": [], + "examples": [ + { + "$id": "4048", + "kind": "http", + "name": "BrokerListener_Get", + "description": "BrokerListener_Get", + "filePath": "2025-04-01/BrokerListener_Get_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "4049", + "parameter": { + "$ref": "4029" + }, + "value": { + "$id": "4050", + "kind": "string", + "type": { + "$ref": "4030" + }, + "value": "2025-04-01" + } + }, + { + "$id": "4051", + "parameter": { + "$ref": "4033" + }, + "value": { + "$id": "4052", + "kind": "string", + "type": { + "$ref": "4034" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "4053", + "parameter": { + "$ref": "4036" + }, + "value": { + "$id": "4054", + "kind": "string", + "type": { + "$ref": "4037" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "4055", + "parameter": { + "$ref": "4038" + }, + "value": { + "$id": "4056", + "kind": "string", + "type": { + "$ref": "4039" + }, + "value": "resource-name123" + } + }, + { + "$id": "4057", + "parameter": { + "$ref": "4040" + }, + "value": { + "$id": "4058", + "kind": "string", + "type": { + "$ref": "4041" + }, + "value": "resource-name123" + } + }, + { + "$id": "4059", + "parameter": { + "$ref": "4042" + }, + "value": { + "$id": "4060", + "kind": "string", + "type": { + "$ref": "4043" + }, + "value": "resource-name123" + } + } + ], + "responses": [ + { + "$id": "4061", + "response": { + "$ref": "4047" + }, + "statusCode": 200, + "bodyValue": { + "$id": "4062", + "kind": "model", + "type": { + "$ref": "905" + }, + "value": { + "$id": "4063", + "properties": { + "$id": "4064", + "kind": "model", + "type": { + "$ref": "907" + }, + "value": { + "$id": "4065", + "serviceName": { + "$id": "4066", + "kind": "string", + "type": { + "$ref": "909" + }, + "value": "tpfiszlapdpxktx" + }, + "ports": { + "$id": "4067", + "kind": "array", + "type": { + "$ref": "913" + }, + "value": [ + { + "$id": "4068", + "kind": "model", + "type": { + "$ref": "914" + }, + "value": { + "$id": "4069", + "authenticationRef": { + "$id": "4070", + "kind": "string", + "type": { + "$ref": "916" + }, + "value": "tjvdroaqqy" + }, + "authorizationRef": { + "$id": "4071", + "kind": "string", + "type": { + "$ref": "920" + }, + "value": "inxhvxnwswyrvt" + }, + "nodePort": { + "$id": "4072", + "kind": "number", + "type": { + "$ref": "924" + }, + "value": 7281 + }, + "port": { + "$id": "4073", + "kind": "number", + "type": { + "$ref": "928" + }, + "value": 1268 + }, + "protocol": { + "$id": "4074", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "Mqtt" + }, + "tls": { + "$id": "4075", + "kind": "model", + "type": { + "$ref": "935" + }, + "value": { + "$id": "4076", + "mode": { + "$id": "4077", + "kind": "string", + "type": { + "$ref": "130" + }, + "value": "Automatic" + }, + "certManagerCertificateSpec": { + "$id": "4078", + "kind": "model", + "type": { + "$ref": "940" + }, + "value": { + "$id": "4079", + "duration": { + "$id": "4080", + "kind": "string", + "type": { + "$ref": "942" + }, + "value": "qmpeffoksron" + }, + "secretName": { + "$id": "4081", + "kind": "string", + "type": { + "$ref": "946" + }, + "value": "oagi" + }, + "renewBefore": { + "$id": "4082", + "kind": "string", + "type": { + "$ref": "950" + }, + "value": "hutno" + }, + "issuerRef": { + "$id": "4083", + "kind": "model", + "type": { + "$ref": "954" + }, + "value": { + "$id": "4084", + "group": { + "$id": "4085", + "kind": "string", + "type": { + "$ref": "956" + }, + "value": "jtmuladdkpasfpoyvewekmiy" + }, + "kind": { + "$id": "4086", + "kind": "string", + "type": { + "$ref": "136" + }, + "value": "Issuer" + }, + "name": { + "$id": "4087", + "kind": "string", + "type": { + "$ref": "963" + }, + "value": "ocwoqpgucvjrsuudtjhb" + } + } + }, + "privateKey": { + "$id": "4088", + "kind": "model", + "type": { + "$ref": "658" + }, + "value": { + "$id": "4089", + "algorithm": { + "$id": "4090", + "kind": "string", + "type": { + "$ref": "82" + }, + "value": "Ec256" + }, + "rotationPolicy": { + "$id": "4091", + "kind": "string", + "type": { + "$ref": "98" + }, + "value": "Always" + } + } + }, + "san": { + "$id": "4092", + "kind": "model", + "type": { + "$ref": "972" + }, + "value": { + "$id": "4093", + "dns": { + "$id": "4094", + "kind": "array", + "type": { + "$ref": "974" + }, + "value": [ + { + "$id": "4095", + "kind": "string", + "type": { + "$ref": "975" + }, + "value": "xhvmhrrhgfsapocjeebqtnzarlj" + } + ] + }, + "ip": { + "$id": "4096", + "kind": "array", + "type": { + "$ref": "979" + }, + "value": [ + { + "$id": "4097", + "kind": "string", + "type": { + "$ref": "980" + }, + "value": "zbgugfzcgsmegevzktsnibyuyp" + } + ] + } + } + } + } + }, + "manual": { + "$id": "4098", + "kind": "model", + "type": { + "$ref": "988" + }, + "value": { + "$id": "4099", + "secretRef": { + "$id": "4100", + "kind": "string", + "type": { + "$ref": "990" + }, + "value": "secret-name" + } + } + } + } + } + } + } + ] + }, + "serviceType": { + "$id": "4101", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "ClusterIp" + }, + "provisioningState": { + "$id": "4102", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "4103", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "4104", + "name": { + "$id": "4105", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "4106", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "4107", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123/listeners/resource-name123" + }, + "name": { + "$id": "4108", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "hoqjaachratt" + }, + "type": { + "$id": "4109", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "hizbknwegcdaeh" + }, + "systemData": { + "$id": "4110", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "4111", + "createdBy": { + "$id": "4112", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "4113", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "4114", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "4115", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "4116", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "4117", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "4118", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "4119", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4120", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "4121", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4122", + "name": "brokerName", + "nameInRequest": "brokerName", + "doc": "Name of broker.", + "type": { + "$id": "4123", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4124", + "name": "listenerName", + "nameInRequest": "listenerName", + "doc": "Name of Instance broker listener resource", + "type": { + "$id": "4125", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4126", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "4045" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "4127", + "type": { + "$ref": "905" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerListener.get" + }, + { + "$id": "4128", + "kind": "lro", + "name": "createOrUpdate", + "accessibility": "public", + "apiVersions": [ + "2024-11-01", + "2025-04-01" + ], + "doc": "Create a BrokerListenerResource", + "operation": { + "$id": "4129", + "name": "createOrUpdate", + "resourceName": "BrokerListenerResource", + "doc": "Create a BrokerListenerResource", + "accessibility": "public", + "parameters": [ + { + "$id": "4130", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "4131", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "4132", + "type": { + "$id": "4133", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-04-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4134", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "4135", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "4136", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4137", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "4138", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4139", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "4140", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4141", + "name": "brokerName", + "nameInRequest": "brokerName", + "doc": "Name of broker.", + "type": { + "$id": "4142", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4143", + "name": "listenerName", + "nameInRequest": "listenerName", + "doc": "Name of Instance broker listener resource", + "type": { + "$id": "4144", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4145", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "4146", + "kind": "constant", + "valueType": { + "$id": "4147", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4148", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "4149", + "kind": "constant", + "valueType": { + "$id": "4150", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4151", + "name": "resource", + "nameInRequest": "resource", + "doc": "Resource create parameters.", + "type": { + "$ref": "905" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "4152", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "905" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + { + "$id": "4153", + "statusCodes": [ + 201 + ], + "bodyType": { + "$ref": "905" + }, + "headers": [ + { + "$id": "4154", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "4155", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "4156", + "name": "retryAfter", + "nameInResponse": "Retry-After", + "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "type": { + "$id": "4157", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "PUT", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/brokers/{brokerName}/listeners/{listenerName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "longRunning": { + "$id": "4158", + "finalStateVia": 0, + "finalResponse": { + "$id": "4159", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "905" + } + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerListener.createOrUpdate", + "decorators": [], + "examples": [ + { + "$id": "4160", + "kind": "http", + "name": "BrokerListener_CreateOrUpdate_Complex", + "description": "BrokerListener_CreateOrUpdate_Complex", + "filePath": "2025-04-01/BrokerListener_CreateOrUpdate_Complex.json", + "parameters": [ + { + "$id": "4161", + "parameter": { + "$ref": "4130" + }, + "value": { + "$id": "4162", + "kind": "string", + "type": { + "$ref": "4131" + }, + "value": "2025-04-01" + } + }, + { + "$id": "4163", + "parameter": { + "$ref": "4134" + }, + "value": { + "$id": "4164", + "kind": "string", + "type": { + "$ref": "4135" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "4165", + "parameter": { + "$ref": "4137" + }, + "value": { + "$id": "4166", + "kind": "string", + "type": { + "$ref": "4138" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "4167", + "parameter": { + "$ref": "4139" + }, + "value": { + "$id": "4168", + "kind": "string", + "type": { + "$ref": "4140" + }, + "value": "resource-name123" + } + }, + { + "$id": "4169", + "parameter": { + "$ref": "4141" + }, + "value": { + "$id": "4170", + "kind": "string", + "type": { + "$ref": "4142" + }, + "value": "resource-name123" + } + }, + { + "$id": "4171", + "parameter": { + "$ref": "4143" + }, + "value": { + "$id": "4172", + "kind": "string", + "type": { + "$ref": "4144" + }, + "value": "resource-name123" + } + }, + { + "$id": "4173", + "parameter": { + "$ref": "4151" + }, + "value": { + "$id": "4174", + "kind": "model", + "type": { + "$ref": "905" + }, + "value": { + "$id": "4175", + "properties": { + "$id": "4176", + "kind": "model", + "type": { + "$ref": "907" + }, + "value": { + "$id": "4177", + "serviceType": { + "$id": "4178", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "LoadBalancer" + }, + "ports": { + "$id": "4179", + "kind": "array", + "type": { + "$ref": "913" + }, + "value": [ + { + "$id": "4180", + "kind": "model", + "type": { + "$ref": "914" + }, + "value": { + "$id": "4181", + "port": { + "$id": "4182", + "kind": "number", + "type": { + "$ref": "928" + }, + "value": 8080 + }, + "authenticationRef": { + "$id": "4183", + "kind": "string", + "type": { + "$ref": "916" + }, + "value": "example-authentication" + }, + "protocol": { + "$id": "4184", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "WebSockets" + } + } + }, + { + "$id": "4185", + "kind": "model", + "type": { + "$ref": "914" + }, + "value": { + "$id": "4186", + "port": { + "$id": "4187", + "kind": "number", + "type": { + "$ref": "928" + }, + "value": 8443 + }, + "authenticationRef": { + "$id": "4188", + "kind": "string", + "type": { + "$ref": "916" + }, + "value": "example-authentication" + }, + "protocol": { + "$id": "4189", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "WebSockets" + }, + "tls": { + "$id": "4190", + "kind": "model", + "type": { + "$ref": "935" + }, + "value": { + "$id": "4191", + "mode": { + "$id": "4192", + "kind": "string", + "type": { + "$ref": "130" + }, + "value": "Automatic" + }, + "certManagerCertificateSpec": { + "$id": "4193", + "kind": "model", + "type": { + "$ref": "940" + }, + "value": { + "$id": "4194", + "issuerRef": { + "$id": "4195", + "kind": "model", + "type": { + "$ref": "954" + }, + "value": { + "$id": "4196", + "group": { + "$id": "4197", + "kind": "string", + "type": { + "$ref": "956" + }, + "value": "jtmuladdkpasfpoyvewekmiy" + }, + "name": { + "$id": "4198", + "kind": "string", + "type": { + "$ref": "963" + }, + "value": "example-issuer" + }, + "kind": { + "$id": "4199", + "kind": "string", + "type": { + "$ref": "136" + }, + "value": "Issuer" + } + } + } + } + } + } + } + } + }, + { + "$id": "4200", + "kind": "model", + "type": { + "$ref": "914" + }, + "value": { + "$id": "4201", + "port": { + "$id": "4202", + "kind": "number", + "type": { + "$ref": "928" + }, + "value": 1883 + }, + "authenticationRef": { + "$id": "4203", + "kind": "string", + "type": { + "$ref": "916" + }, + "value": "example-authentication" + } + } + }, + { + "$id": "4204", + "kind": "model", + "type": { + "$ref": "914" + }, + "value": { + "$id": "4205", + "port": { + "$id": "4206", + "kind": "number", + "type": { + "$ref": "928" + }, + "value": 8883 + }, + "authenticationRef": { + "$id": "4207", + "kind": "string", + "type": { + "$ref": "916" + }, + "value": "example-authentication" + }, + "tls": { + "$id": "4208", + "kind": "model", + "type": { + "$ref": "935" + }, + "value": { + "$id": "4209", + "mode": { + "$id": "4210", + "kind": "string", + "type": { + "$ref": "130" + }, + "value": "Manual" + }, + "manual": { + "$id": "4211", + "kind": "model", + "type": { + "$ref": "988" + }, + "value": { + "$id": "4212", + "secretRef": { + "$id": "4213", + "kind": "string", + "type": { + "$ref": "990" + }, + "value": "example-secret" + } + } + } + } + } + } + } + ] + } + } + }, + "extendedLocation": { + "$id": "4214", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "4215", + "name": { + "$id": "4216", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "4217", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "4218", + "response": { + "$ref": "4152" + }, + "statusCode": 200, + "bodyValue": { + "$id": "4219", + "kind": "model", + "type": { + "$ref": "905" + }, + "value": { + "$id": "4220", + "properties": { + "$id": "4221", + "kind": "model", + "type": { + "$ref": "907" + }, + "value": { + "$id": "4222", + "serviceName": { + "$id": "4223", + "kind": "string", + "type": { + "$ref": "909" + }, + "value": "tpfiszlapdpxktx" + }, + "serviceType": { + "$id": "4224", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "LoadBalancer" + }, + "ports": { + "$id": "4225", + "kind": "array", + "type": { + "$ref": "913" + }, + "value": [ + { + "$id": "4226", + "kind": "model", + "type": { + "$ref": "914" + }, + "value": { + "$id": "4227", + "port": { + "$id": "4228", + "kind": "number", + "type": { + "$ref": "928" + }, + "value": 8080 + }, + "authenticationRef": { + "$id": "4229", + "kind": "string", + "type": { + "$ref": "916" + }, + "value": "example-authentication" + }, + "protocol": { + "$id": "4230", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "WebSockets" + } + } + }, + { + "$id": "4231", + "kind": "model", + "type": { + "$ref": "914" + }, + "value": { + "$id": "4232", + "port": { + "$id": "4233", + "kind": "number", + "type": { + "$ref": "928" + }, + "value": 8443 + }, + "authenticationRef": { + "$id": "4234", + "kind": "string", + "type": { + "$ref": "916" + }, + "value": "example-authentication" + }, + "protocol": { + "$id": "4235", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "WebSockets" + }, + "tls": { + "$id": "4236", + "kind": "model", + "type": { + "$ref": "935" + }, + "value": { + "$id": "4237", + "mode": { + "$id": "4238", + "kind": "string", + "type": { + "$ref": "130" + }, + "value": "Automatic" + }, + "certManagerCertificateSpec": { + "$id": "4239", + "kind": "model", + "type": { + "$ref": "940" + }, + "value": { + "$id": "4240", + "issuerRef": { + "$id": "4241", + "kind": "model", + "type": { + "$ref": "954" + }, + "value": { + "$id": "4242", + "group": { + "$id": "4243", + "kind": "string", + "type": { + "$ref": "956" + }, + "value": "jtmuladdkpasfpoyvewekmiy" + }, + "name": { + "$id": "4244", + "kind": "string", + "type": { + "$ref": "963" + }, + "value": "example-issuer" + }, + "kind": { + "$id": "4245", + "kind": "string", + "type": { + "$ref": "136" + }, + "value": "Issuer" + } + } + } + } + } + } + } + } + }, + { + "$id": "4246", + "kind": "model", + "type": { + "$ref": "914" + }, + "value": { + "$id": "4247", + "port": { + "$id": "4248", + "kind": "number", + "type": { + "$ref": "928" + }, + "value": 1883 + }, + "authenticationRef": { + "$id": "4249", + "kind": "string", + "type": { + "$ref": "916" + }, + "value": "example-authentication" + } + } + }, + { + "$id": "4250", + "kind": "model", + "type": { + "$ref": "914" + }, + "value": { + "$id": "4251", + "port": { + "$id": "4252", + "kind": "number", + "type": { + "$ref": "928" + }, + "value": 8883 + }, + "authenticationRef": { + "$id": "4253", + "kind": "string", + "type": { + "$ref": "916" + }, + "value": "example-authentication" + }, + "tls": { + "$id": "4254", + "kind": "model", + "type": { + "$ref": "935" + }, + "value": { + "$id": "4255", + "mode": { + "$id": "4256", + "kind": "string", + "type": { + "$ref": "130" + }, + "value": "Manual" + }, + "manual": { + "$id": "4257", + "kind": "model", + "type": { + "$ref": "988" + }, + "value": { + "$id": "4258", + "secretRef": { + "$id": "4259", + "kind": "string", + "type": { + "$ref": "990" + }, + "value": "example-secret" + } + } + } + } + } + } + } + ] + }, + "provisioningState": { + "$id": "4260", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "4261", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "4262", + "name": { + "$id": "4263", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "4264", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "4265", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123/listeners/resource-name123" + }, + "name": { + "$id": "4266", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "hoqjaachratt" + }, + "type": { + "$id": "4267", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "hizbknwegcdaeh" + }, + "systemData": { + "$id": "4268", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "4269", + "createdBy": { + "$id": "4270", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "4271", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "4272", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "4273", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "4274", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "4275", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "4276", + "response": { + "$ref": "4153" + }, + "statusCode": 201, + "bodyValue": { + "$id": "4277", + "kind": "model", + "type": { + "$ref": "905" + }, + "value": { + "$id": "4278", + "properties": { + "$id": "4279", + "kind": "model", + "type": { + "$ref": "907" + }, + "value": { + "$id": "4280", + "serviceName": { + "$id": "4281", + "kind": "string", + "type": { + "$ref": "909" + }, + "value": "tpfiszlapdpxktx" + }, + "serviceType": { + "$id": "4282", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "LoadBalancer" + }, + "ports": { + "$id": "4283", + "kind": "array", + "type": { + "$ref": "913" + }, + "value": [ + { + "$id": "4284", + "kind": "model", + "type": { + "$ref": "914" + }, + "value": { + "$id": "4285", + "port": { + "$id": "4286", + "kind": "number", + "type": { + "$ref": "928" + }, + "value": 8080 + }, + "authenticationRef": { + "$id": "4287", + "kind": "string", + "type": { + "$ref": "916" + }, + "value": "example-authentication" + }, + "protocol": { + "$id": "4288", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "WebSockets" + } + } + }, + { + "$id": "4289", + "kind": "model", + "type": { + "$ref": "914" + }, + "value": { + "$id": "4290", + "port": { + "$id": "4291", + "kind": "number", + "type": { + "$ref": "928" + }, + "value": 8443 + }, + "authenticationRef": { + "$id": "4292", + "kind": "string", + "type": { + "$ref": "916" + }, + "value": "example-authentication" + }, + "protocol": { + "$id": "4293", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "WebSockets" + }, + "tls": { + "$id": "4294", + "kind": "model", + "type": { + "$ref": "935" + }, + "value": { + "$id": "4295", + "mode": { + "$id": "4296", + "kind": "string", + "type": { + "$ref": "130" + }, + "value": "Automatic" + }, + "certManagerCertificateSpec": { + "$id": "4297", + "kind": "model", + "type": { + "$ref": "940" + }, + "value": { + "$id": "4298", + "issuerRef": { + "$id": "4299", + "kind": "model", + "type": { + "$ref": "954" + }, + "value": { + "$id": "4300", + "group": { + "$id": "4301", + "kind": "string", + "type": { + "$ref": "956" + }, + "value": "jtmuladdkpasfpoyvewekmiy" + }, + "name": { + "$id": "4302", + "kind": "string", + "type": { + "$ref": "963" + }, + "value": "example-issuer" + }, + "kind": { + "$id": "4303", + "kind": "string", + "type": { + "$ref": "136" + }, + "value": "Issuer" + } + } + } + } + } + } + } + } + }, + { + "$id": "4304", + "kind": "model", + "type": { + "$ref": "914" + }, + "value": { + "$id": "4305", + "port": { + "$id": "4306", + "kind": "number", + "type": { + "$ref": "928" + }, + "value": 1883 + }, + "authenticationRef": { + "$id": "4307", + "kind": "string", + "type": { + "$ref": "916" + }, + "value": "example-authentication" + } + } + }, + { + "$id": "4308", + "kind": "model", + "type": { + "$ref": "914" + }, + "value": { + "$id": "4309", + "port": { + "$id": "4310", + "kind": "number", + "type": { + "$ref": "928" + }, + "value": 8883 + }, + "authenticationRef": { + "$id": "4311", + "kind": "string", + "type": { + "$ref": "916" + }, + "value": "example-authentication" + }, + "tls": { + "$id": "4312", + "kind": "model", + "type": { + "$ref": "935" + }, + "value": { + "$id": "4313", + "mode": { + "$id": "4314", + "kind": "string", + "type": { + "$ref": "130" + }, + "value": "Manual" + }, + "manual": { + "$id": "4315", + "kind": "model", + "type": { + "$ref": "988" + }, + "value": { + "$id": "4316", + "secretRef": { + "$id": "4317", + "kind": "string", + "type": { + "$ref": "990" + }, + "value": "example-secret" + } + } + } + } + } + } + } + ] + }, + "provisioningState": { + "$id": "4318", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "4319", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "4320", + "name": { + "$id": "4321", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "4322", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "4323", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123/listeners/resource-name123" + }, + "name": { + "$id": "4324", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "hoqjaachratt" + }, + "type": { + "$id": "4325", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "hizbknwegcdaeh" + }, + "systemData": { + "$id": "4326", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "4327", + "createdBy": { + "$id": "4328", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "4329", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "4330", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "4331", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "4332", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "4333", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + }, + { + "$id": "4334", + "kind": "http", + "name": "BrokerListener_CreateOrUpdate", + "description": "BrokerListener_CreateOrUpdate", + "filePath": "2025-04-01/BrokerListener_CreateOrUpdate_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "4335", + "parameter": { + "$ref": "4130" + }, + "value": { + "$id": "4336", + "kind": "string", + "type": { + "$ref": "4131" + }, + "value": "2025-04-01" + } + }, + { + "$id": "4337", + "parameter": { + "$ref": "4134" + }, + "value": { + "$id": "4338", + "kind": "string", + "type": { + "$ref": "4135" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "4339", + "parameter": { + "$ref": "4137" + }, + "value": { + "$id": "4340", + "kind": "string", + "type": { + "$ref": "4138" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "4341", + "parameter": { + "$ref": "4139" + }, + "value": { + "$id": "4342", + "kind": "string", + "type": { + "$ref": "4140" + }, + "value": "resource-name123" + } + }, + { + "$id": "4343", + "parameter": { + "$ref": "4141" + }, + "value": { + "$id": "4344", + "kind": "string", + "type": { + "$ref": "4142" + }, + "value": "resource-name123" + } + }, + { + "$id": "4345", + "parameter": { + "$ref": "4143" + }, + "value": { + "$id": "4346", + "kind": "string", + "type": { + "$ref": "4144" + }, + "value": "resource-name123" + } + }, + { + "$id": "4347", + "parameter": { + "$ref": "4151" + }, + "value": { + "$id": "4348", + "kind": "model", + "type": { + "$ref": "905" + }, + "value": { + "$id": "4349", + "properties": { + "$id": "4350", + "kind": "model", + "type": { + "$ref": "907" + }, + "value": { + "$id": "4351", + "serviceName": { + "$id": "4352", + "kind": "string", + "type": { + "$ref": "909" + }, + "value": "tpfiszlapdpxktx" + }, + "ports": { + "$id": "4353", + "kind": "array", + "type": { + "$ref": "913" + }, + "value": [ + { + "$id": "4354", + "kind": "model", + "type": { + "$ref": "914" + }, + "value": { + "$id": "4355", + "authenticationRef": { + "$id": "4356", + "kind": "string", + "type": { + "$ref": "916" + }, + "value": "tjvdroaqqy" + }, + "authorizationRef": { + "$id": "4357", + "kind": "string", + "type": { + "$ref": "920" + }, + "value": "inxhvxnwswyrvt" + }, + "nodePort": { + "$id": "4358", + "kind": "number", + "type": { + "$ref": "924" + }, + "value": 7281 + }, + "port": { + "$id": "4359", + "kind": "number", + "type": { + "$ref": "928" + }, + "value": 1268 + }, + "protocol": { + "$id": "4360", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "Mqtt" + }, + "tls": { + "$id": "4361", + "kind": "model", + "type": { + "$ref": "935" + }, + "value": { + "$id": "4362", + "mode": { + "$id": "4363", + "kind": "string", + "type": { + "$ref": "130" + }, + "value": "Automatic" + }, + "certManagerCertificateSpec": { + "$id": "4364", + "kind": "model", + "type": { + "$ref": "940" + }, + "value": { + "$id": "4365", + "duration": { + "$id": "4366", + "kind": "string", + "type": { + "$ref": "942" + }, + "value": "qmpeffoksron" + }, + "secretName": { + "$id": "4367", + "kind": "string", + "type": { + "$ref": "946" + }, + "value": "oagi" + }, + "renewBefore": { + "$id": "4368", + "kind": "string", + "type": { + "$ref": "950" + }, + "value": "hutno" + }, + "issuerRef": { + "$id": "4369", + "kind": "model", + "type": { + "$ref": "954" + }, + "value": { + "$id": "4370", + "group": { + "$id": "4371", + "kind": "string", + "type": { + "$ref": "956" + }, + "value": "jtmuladdkpasfpoyvewekmiy" + }, + "kind": { + "$id": "4372", + "kind": "string", + "type": { + "$ref": "136" + }, + "value": "Issuer" + }, + "name": { + "$id": "4373", + "kind": "string", + "type": { + "$ref": "963" + }, + "value": "ocwoqpgucvjrsuudtjhb" + } + } + }, + "privateKey": { + "$id": "4374", + "kind": "model", + "type": { + "$ref": "658" + }, + "value": { + "$id": "4375", + "algorithm": { + "$id": "4376", + "kind": "string", + "type": { + "$ref": "82" + }, + "value": "Ec256" + }, + "rotationPolicy": { + "$id": "4377", + "kind": "string", + "type": { + "$ref": "98" + }, + "value": "Always" + } + } + }, + "san": { + "$id": "4378", + "kind": "model", + "type": { + "$ref": "972" + }, + "value": { + "$id": "4379", + "dns": { + "$id": "4380", + "kind": "array", + "type": { + "$ref": "974" + }, + "value": [ + { + "$id": "4381", + "kind": "string", + "type": { + "$ref": "975" + }, + "value": "xhvmhrrhgfsapocjeebqtnzarlj" + } + ] + }, + "ip": { + "$id": "4382", + "kind": "array", + "type": { + "$ref": "979" + }, + "value": [ + { + "$id": "4383", + "kind": "string", + "type": { + "$ref": "980" + }, + "value": "zbgugfzcgsmegevzktsnibyuyp" + } + ] + } + } + } + } + }, + "manual": { + "$id": "4384", + "kind": "model", + "type": { + "$ref": "988" + }, + "value": { + "$id": "4385", + "secretRef": { + "$id": "4386", + "kind": "string", + "type": { + "$ref": "990" + }, + "value": "secret-name" + } + } + } + } + } + } + } + ] + }, + "serviceType": { + "$id": "4387", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "ClusterIp" + } + } + }, + "extendedLocation": { + "$id": "4388", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "4389", + "name": { + "$id": "4390", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "4391", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "4392", + "response": { + "$ref": "4152" + }, + "statusCode": 200, + "bodyValue": { + "$id": "4393", + "kind": "model", + "type": { + "$ref": "905" + }, + "value": { + "$id": "4394", + "properties": { + "$id": "4395", + "kind": "model", + "type": { + "$ref": "907" + }, + "value": { + "$id": "4396", + "serviceName": { + "$id": "4397", + "kind": "string", + "type": { + "$ref": "909" + }, + "value": "tpfiszlapdpxktx" + }, + "ports": { + "$id": "4398", + "kind": "array", + "type": { + "$ref": "913" + }, + "value": [ + { + "$id": "4399", + "kind": "model", + "type": { + "$ref": "914" + }, + "value": { + "$id": "4400", + "authenticationRef": { + "$id": "4401", + "kind": "string", + "type": { + "$ref": "916" + }, + "value": "tjvdroaqqy" + }, + "authorizationRef": { + "$id": "4402", + "kind": "string", + "type": { + "$ref": "920" + }, + "value": "inxhvxnwswyrvt" + }, + "nodePort": { + "$id": "4403", + "kind": "number", + "type": { + "$ref": "924" + }, + "value": 7281 + }, + "port": { + "$id": "4404", + "kind": "number", + "type": { + "$ref": "928" + }, + "value": 1268 + }, + "protocol": { + "$id": "4405", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "Mqtt" + }, + "tls": { + "$id": "4406", + "kind": "model", + "type": { + "$ref": "935" + }, + "value": { + "$id": "4407", + "mode": { + "$id": "4408", + "kind": "string", + "type": { + "$ref": "130" + }, + "value": "Automatic" + }, + "certManagerCertificateSpec": { + "$id": "4409", + "kind": "model", + "type": { + "$ref": "940" + }, + "value": { + "$id": "4410", + "duration": { + "$id": "4411", + "kind": "string", + "type": { + "$ref": "942" + }, + "value": "qmpeffoksron" + }, + "secretName": { + "$id": "4412", + "kind": "string", + "type": { + "$ref": "946" + }, + "value": "oagi" + }, + "renewBefore": { + "$id": "4413", + "kind": "string", + "type": { + "$ref": "950" + }, + "value": "hutno" + }, + "issuerRef": { + "$id": "4414", + "kind": "model", + "type": { + "$ref": "954" + }, + "value": { + "$id": "4415", + "group": { + "$id": "4416", + "kind": "string", + "type": { + "$ref": "956" + }, + "value": "jtmuladdkpasfpoyvewekmiy" + }, + "kind": { + "$id": "4417", + "kind": "string", + "type": { + "$ref": "136" + }, + "value": "Issuer" + }, + "name": { + "$id": "4418", + "kind": "string", + "type": { + "$ref": "963" + }, + "value": "ocwoqpgucvjrsuudtjhb" + } + } + }, + "privateKey": { + "$id": "4419", + "kind": "model", + "type": { + "$ref": "658" + }, + "value": { + "$id": "4420", + "algorithm": { + "$id": "4421", + "kind": "string", + "type": { + "$ref": "82" + }, + "value": "Ec256" + }, + "rotationPolicy": { + "$id": "4422", + "kind": "string", + "type": { + "$ref": "98" + }, + "value": "Always" + } + } + }, + "san": { + "$id": "4423", + "kind": "model", + "type": { + "$ref": "972" + }, + "value": { + "$id": "4424", + "dns": { + "$id": "4425", + "kind": "array", + "type": { + "$ref": "974" + }, + "value": [ + { + "$id": "4426", + "kind": "string", + "type": { + "$ref": "975" + }, + "value": "xhvmhrrhgfsapocjeebqtnzarlj" + } + ] + }, + "ip": { + "$id": "4427", + "kind": "array", + "type": { + "$ref": "979" + }, + "value": [ + { + "$id": "4428", + "kind": "string", + "type": { + "$ref": "980" + }, + "value": "zbgugfzcgsmegevzktsnibyuyp" + } + ] + } + } + } + } + }, + "manual": { + "$id": "4429", + "kind": "model", + "type": { + "$ref": "988" + }, + "value": { + "$id": "4430", + "secretRef": { + "$id": "4431", + "kind": "string", + "type": { + "$ref": "990" + }, + "value": "secret-name" + } + } + } + } + } + } + } + ] + }, + "serviceType": { + "$id": "4432", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "ClusterIp" + }, + "provisioningState": { + "$id": "4433", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "4434", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "4435", + "name": { + "$id": "4436", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "4437", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "4438", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123/listeners/resource-name123" + }, + "name": { + "$id": "4439", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "hoqjaachratt" + }, + "type": { + "$id": "4440", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "hizbknwegcdaeh" + }, + "systemData": { + "$id": "4441", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "4442", + "createdBy": { + "$id": "4443", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "4444", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "4445", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "4446", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "4447", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "4448", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "4449", + "response": { + "$ref": "4153" + }, + "statusCode": 201, + "bodyValue": { + "$id": "4450", + "kind": "model", + "type": { + "$ref": "905" + }, + "value": { + "$id": "4451", + "properties": { + "$id": "4452", + "kind": "model", + "type": { + "$ref": "907" + }, + "value": { + "$id": "4453", + "serviceName": { + "$id": "4454", + "kind": "string", + "type": { + "$ref": "909" + }, + "value": "tpfiszlapdpxktx" + }, + "ports": { + "$id": "4455", + "kind": "array", + "type": { + "$ref": "913" + }, + "value": [ + { + "$id": "4456", + "kind": "model", + "type": { + "$ref": "914" + }, + "value": { + "$id": "4457", + "authenticationRef": { + "$id": "4458", + "kind": "string", + "type": { + "$ref": "916" + }, + "value": "tjvdroaqqy" + }, + "authorizationRef": { + "$id": "4459", + "kind": "string", + "type": { + "$ref": "920" + }, + "value": "inxhvxnwswyrvt" + }, + "nodePort": { + "$id": "4460", + "kind": "number", + "type": { + "$ref": "924" + }, + "value": 7281 + }, + "port": { + "$id": "4461", + "kind": "number", + "type": { + "$ref": "928" + }, + "value": 1268 + }, + "protocol": { + "$id": "4462", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "Mqtt" + }, + "tls": { + "$id": "4463", + "kind": "model", + "type": { + "$ref": "935" + }, + "value": { + "$id": "4464", + "mode": { + "$id": "4465", + "kind": "string", + "type": { + "$ref": "130" + }, + "value": "Automatic" + }, + "certManagerCertificateSpec": { + "$id": "4466", + "kind": "model", + "type": { + "$ref": "940" + }, + "value": { + "$id": "4467", + "duration": { + "$id": "4468", + "kind": "string", + "type": { + "$ref": "942" + }, + "value": "qmpeffoksron" + }, + "secretName": { + "$id": "4469", + "kind": "string", + "type": { + "$ref": "946" + }, + "value": "oagi" + }, + "renewBefore": { + "$id": "4470", + "kind": "string", + "type": { + "$ref": "950" + }, + "value": "hutno" + }, + "issuerRef": { + "$id": "4471", + "kind": "model", + "type": { + "$ref": "954" + }, + "value": { + "$id": "4472", + "group": { + "$id": "4473", + "kind": "string", + "type": { + "$ref": "956" + }, + "value": "jtmuladdkpasfpoyvewekmiy" + }, + "kind": { + "$id": "4474", + "kind": "string", + "type": { + "$ref": "136" + }, + "value": "Issuer" + }, + "name": { + "$id": "4475", + "kind": "string", + "type": { + "$ref": "963" + }, + "value": "ocwoqpgucvjrsuudtjhb" + } + } + }, + "privateKey": { + "$id": "4476", + "kind": "model", + "type": { + "$ref": "658" + }, + "value": { + "$id": "4477", + "algorithm": { + "$id": "4478", + "kind": "string", + "type": { + "$ref": "82" + }, + "value": "Ec256" + }, + "rotationPolicy": { + "$id": "4479", + "kind": "string", + "type": { + "$ref": "98" + }, + "value": "Always" + } + } + }, + "san": { + "$id": "4480", + "kind": "model", + "type": { + "$ref": "972" + }, + "value": { + "$id": "4481", + "dns": { + "$id": "4482", + "kind": "array", + "type": { + "$ref": "974" + }, + "value": [ + { + "$id": "4483", + "kind": "string", + "type": { + "$ref": "975" + }, + "value": "xhvmhrrhgfsapocjeebqtnzarlj" + } + ] + }, + "ip": { + "$id": "4484", + "kind": "array", + "type": { + "$ref": "979" + }, + "value": [ + { + "$id": "4485", + "kind": "string", + "type": { + "$ref": "980" + }, + "value": "zbgugfzcgsmegevzktsnibyuyp" + } + ] + } + } + } + } + }, + "manual": { + "$id": "4486", + "kind": "model", + "type": { + "$ref": "988" + }, + "value": { + "$id": "4487", + "secretRef": { + "$id": "4488", + "kind": "string", + "type": { + "$ref": "990" + }, + "value": "secret-name" + } + } + } + } + } + } + } + ] + }, + "serviceType": { + "$id": "4489", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "ClusterIp" + }, + "provisioningState": { + "$id": "4490", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "4491", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "4492", + "name": { + "$id": "4493", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "4494", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "4495", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123/listeners/resource-name123" + }, + "name": { + "$id": "4496", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "hoqjaachratt" + }, + "type": { + "$id": "4497", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "hizbknwegcdaeh" + }, + "systemData": { + "$id": "4498", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "4499", + "createdBy": { + "$id": "4500", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "4501", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "4502", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "4503", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "4504", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "4505", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + }, + { + "$id": "4506", + "kind": "http", + "name": "BrokerListener_CreateOrUpdate_Simple", + "description": "BrokerListener_CreateOrUpdate_Simple", + "filePath": "2025-04-01/BrokerListener_CreateOrUpdate_Simple.json", + "parameters": [ + { + "$id": "4507", + "parameter": { + "$ref": "4130" + }, + "value": { + "$id": "4508", + "kind": "string", + "type": { + "$ref": "4131" + }, + "value": "2025-04-01" + } + }, + { + "$id": "4509", + "parameter": { + "$ref": "4134" + }, + "value": { + "$id": "4510", + "kind": "string", + "type": { + "$ref": "4135" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "4511", + "parameter": { + "$ref": "4137" + }, + "value": { + "$id": "4512", + "kind": "string", + "type": { + "$ref": "4138" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "4513", + "parameter": { + "$ref": "4139" + }, + "value": { + "$id": "4514", + "kind": "string", + "type": { + "$ref": "4140" + }, + "value": "resource-name123" + } + }, + { + "$id": "4515", + "parameter": { + "$ref": "4141" + }, + "value": { + "$id": "4516", + "kind": "string", + "type": { + "$ref": "4142" + }, + "value": "resource-name123" + } + }, + { + "$id": "4517", + "parameter": { + "$ref": "4143" + }, + "value": { + "$id": "4518", + "kind": "string", + "type": { + "$ref": "4144" + }, + "value": "resource-name123" + } + }, + { + "$id": "4519", + "parameter": { + "$ref": "4151" + }, + "value": { + "$id": "4520", + "kind": "model", + "type": { + "$ref": "905" + }, + "value": { + "$id": "4521", + "properties": { + "$id": "4522", + "kind": "model", + "type": { + "$ref": "907" + }, + "value": { + "$id": "4523", + "ports": { + "$id": "4524", + "kind": "array", + "type": { + "$ref": "913" + }, + "value": [ + { + "$id": "4525", + "kind": "model", + "type": { + "$ref": "914" + }, + "value": { + "$id": "4526", + "port": { + "$id": "4527", + "kind": "number", + "type": { + "$ref": "928" + }, + "value": 1883 + } + } + } + ] + } + } + }, + "extendedLocation": { + "$id": "4528", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "4529", + "name": { + "$id": "4530", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "4531", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "4532", + "response": { + "$ref": "4152" + }, + "statusCode": 200, + "bodyValue": { + "$id": "4533", + "kind": "model", + "type": { + "$ref": "905" + }, + "value": { + "$id": "4534", + "properties": { + "$id": "4535", + "kind": "model", + "type": { + "$ref": "907" + }, + "value": { + "$id": "4536", + "serviceName": { + "$id": "4537", + "kind": "string", + "type": { + "$ref": "909" + }, + "value": "tpfiszlapdpxktx" + }, + "serviceType": { + "$id": "4538", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "LoadBalancer" + }, + "ports": { + "$id": "4539", + "kind": "array", + "type": { + "$ref": "913" + }, + "value": [ + { + "$id": "4540", + "kind": "model", + "type": { + "$ref": "914" + }, + "value": { + "$id": "4541", + "port": { + "$id": "4542", + "kind": "number", + "type": { + "$ref": "928" + }, + "value": 1883 + } + } + } + ] + }, + "provisioningState": { + "$id": "4543", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "4544", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "4545", + "name": { + "$id": "4546", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "4547", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "4548", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123/listeners/resource-name123" + }, + "name": { + "$id": "4549", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "hoqjaachratt" + }, + "type": { + "$id": "4550", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "hizbknwegcdaeh" + }, + "systemData": { + "$id": "4551", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "4552", + "createdBy": { + "$id": "4553", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "4554", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "4555", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "4556", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "4557", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "4558", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "4559", + "response": { + "$ref": "4153" + }, + "statusCode": 201, + "bodyValue": { + "$id": "4560", + "kind": "model", + "type": { + "$ref": "905" + }, + "value": { + "$id": "4561", + "properties": { + "$id": "4562", + "kind": "model", + "type": { + "$ref": "907" + }, + "value": { + "$id": "4563", + "serviceName": { + "$id": "4564", + "kind": "string", + "type": { + "$ref": "909" + }, + "value": "tpfiszlapdpxktx" + }, + "serviceType": { + "$id": "4565", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "LoadBalancer" + }, + "ports": { + "$id": "4566", + "kind": "array", + "type": { + "$ref": "913" + }, + "value": [ + { + "$id": "4567", + "kind": "model", + "type": { + "$ref": "914" + }, + "value": { + "$id": "4568", + "port": { + "$id": "4569", + "kind": "number", + "type": { + "$ref": "928" + }, + "value": 1883 + } + } + } + ] + }, + "provisioningState": { + "$id": "4570", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "4571", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "4572", + "name": { + "$id": "4573", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "4574", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "4575", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123/listeners/resource-name123" + }, + "name": { + "$id": "4576", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "hoqjaachratt" + }, + "type": { + "$id": "4577", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "hizbknwegcdaeh" + }, + "systemData": { + "$id": "4578", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "4579", + "createdBy": { + "$id": "4580", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "4581", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "4582", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "4583", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "4584", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "4585", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "4586", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "4587", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4588", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "4589", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4590", + "name": "brokerName", + "nameInRequest": "brokerName", + "doc": "Name of broker.", + "type": { + "$id": "4591", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4592", + "name": "listenerName", + "nameInRequest": "listenerName", + "doc": "Name of Instance broker listener resource", + "type": { + "$id": "4593", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4594", + "name": "resource", + "nameInRequest": "resource", + "doc": "Resource create parameters.", + "type": { + "$ref": "905" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4595", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "4596", + "kind": "constant", + "valueType": { + "$id": "4597", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4598", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "4599", + "kind": "constant", + "valueType": { + "$id": "4600", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "4601", + "type": { + "$ref": "905" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerListener.createOrUpdate" + }, + { + "$id": "4602", + "kind": "lro", + "name": "delete", + "accessibility": "public", + "apiVersions": [ + "2024-11-01", + "2025-04-01" + ], + "doc": "Delete a BrokerListenerResource", + "operation": { + "$id": "4603", + "name": "delete", + "resourceName": "BrokerListenerResource", + "doc": "Delete a BrokerListenerResource", + "accessibility": "public", + "parameters": [ + { + "$id": "4604", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "4605", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "4606", + "type": { + "$id": "4607", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-04-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4608", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "4609", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "4610", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4611", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "4612", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4613", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "4614", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4615", + "name": "brokerName", + "nameInRequest": "brokerName", + "doc": "Name of broker.", + "type": { + "$id": "4616", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4617", + "name": "listenerName", + "nameInRequest": "listenerName", + "doc": "Name of Instance broker listener resource", + "type": { + "$id": "4618", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4619", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "4620", + "kind": "constant", + "valueType": { + "$id": "4621", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "4622", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "4623", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "4624", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "4625", + "name": "retryAfter", + "nameInResponse": "Retry-After", + "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "type": { + "$id": "4626", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false + }, + { + "$id": "4627", + "statusCodes": [ + 204 + ], + "headers": [], + "isErrorResponse": false + } + ], + "httpMethod": "DELETE", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/brokers/{brokerName}/listeners/{listenerName}", + "bufferResponse": true, + "longRunning": { + "$id": "4628", + "finalStateVia": 1, + "finalResponse": { + "$id": "4629", + "statusCodes": [ + 204 + ] + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerListener.delete", + "decorators": [], + "examples": [ + { + "$id": "4630", + "kind": "http", + "name": "BrokerListener_Delete", + "description": "BrokerListener_Delete", + "filePath": "2025-04-01/BrokerListener_Delete_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "4631", + "parameter": { + "$ref": "4604" + }, + "value": { + "$id": "4632", + "kind": "string", + "type": { + "$ref": "4605" + }, + "value": "2025-04-01" + } + }, + { + "$id": "4633", + "parameter": { + "$ref": "4608" + }, + "value": { + "$id": "4634", + "kind": "string", + "type": { + "$ref": "4609" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "4635", + "parameter": { + "$ref": "4611" + }, + "value": { + "$id": "4636", + "kind": "string", + "type": { + "$ref": "4612" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "4637", + "parameter": { + "$ref": "4613" + }, + "value": { + "$id": "4638", + "kind": "string", + "type": { + "$ref": "4614" + }, + "value": "resource-name123" + } + }, + { + "$id": "4639", + "parameter": { + "$ref": "4615" + }, + "value": { + "$id": "4640", + "kind": "string", + "type": { + "$ref": "4616" + }, + "value": "resource-name123" + } + }, + { + "$id": "4641", + "parameter": { + "$ref": "4617" + }, + "value": { + "$id": "4642", + "kind": "string", + "type": { + "$ref": "4618" + }, + "value": "resource-name123" + } + } + ], + "responses": [ + { + "$id": "4643", + "response": { + "$ref": "4622" + }, + "statusCode": 202 + }, + { + "$id": "4644", + "response": { + "$ref": "4627" + }, + "statusCode": 204 + } + ] + } + ] + }, + "parameters": [ + { + "$id": "4645", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "4646", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4647", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "4648", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4649", + "name": "brokerName", + "nameInRequest": "brokerName", + "doc": "Name of broker.", + "type": { + "$id": "4650", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4651", + "name": "listenerName", + "nameInRequest": "listenerName", + "doc": "Name of Instance broker listener resource", + "type": { + "$id": "4652", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4653", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "4654", + "kind": "constant", + "valueType": { + "$id": "4655", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "4656" + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerListener.delete" + }, + { + "$id": "4657", + "kind": "paging", + "name": "listByResourceGroup", + "accessibility": "public", + "apiVersions": [ + "2024-11-01", + "2025-04-01" + ], + "doc": "List BrokerListenerResource resources by BrokerResource", + "operation": { + "$id": "4658", + "name": "listByResourceGroup", + "resourceName": "BrokerListenerResource", + "doc": "List BrokerListenerResource resources by BrokerResource", + "accessibility": "public", + "parameters": [ + { + "$id": "4659", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "4660", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "4661", + "type": { + "$id": "4662", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-04-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4663", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "4664", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "4665", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4666", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "4667", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4668", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "4669", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4670", + "name": "brokerName", + "nameInRequest": "brokerName", + "doc": "Name of broker.", + "type": { + "$id": "4671", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4672", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "4673", + "kind": "constant", + "valueType": { + "$id": "4674", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "4675", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1012" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/brokers/{brokerName}/listeners", + "bufferResponse": true, + "paging": { + "$id": "4676", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "4677", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerListener.listByResourceGroup", + "decorators": [], + "examples": [ + { + "$id": "4678", + "kind": "http", + "name": "BrokerListener_ListByResourceGroup", + "description": "BrokerListener_ListByResourceGroup", + "filePath": "2025-04-01/BrokerListener_ListByResourceGroup_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "4679", + "parameter": { + "$ref": "4659" + }, + "value": { + "$id": "4680", + "kind": "string", + "type": { + "$ref": "4660" + }, + "value": "2025-04-01" + } + }, + { + "$id": "4681", + "parameter": { + "$ref": "4663" + }, + "value": { + "$id": "4682", + "kind": "string", + "type": { + "$ref": "4664" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "4683", + "parameter": { + "$ref": "4666" + }, + "value": { + "$id": "4684", + "kind": "string", + "type": { + "$ref": "4667" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "4685", + "parameter": { + "$ref": "4668" + }, + "value": { + "$id": "4686", + "kind": "string", + "type": { + "$ref": "4669" + }, + "value": "resource-name123" + } + }, + { + "$id": "4687", + "parameter": { + "$ref": "4670" + }, + "value": { + "$id": "4688", + "kind": "string", + "type": { + "$ref": "4671" + }, + "value": "resource-name123" + } + } + ], + "responses": [ + { + "$id": "4689", + "response": { + "$ref": "4675" + }, + "statusCode": 200, + "bodyValue": { + "$id": "4690", + "kind": "model", + "type": { + "$ref": "1012" + }, + "value": { + "$id": "4691", + "value": { + "$id": "4692", + "kind": "array", + "type": { + "$ref": "1014" + }, + "value": [ + { + "$id": "4693", + "kind": "model", + "type": { + "$ref": "905" + }, + "value": { + "$id": "4694", + "properties": { + "$id": "4695", + "kind": "model", + "type": { + "$ref": "907" + }, + "value": { + "$id": "4696", + "serviceName": { + "$id": "4697", + "kind": "string", + "type": { + "$ref": "909" + }, + "value": "tpfiszlapdpxktx" + }, + "ports": { + "$id": "4698", + "kind": "array", + "type": { + "$ref": "913" + }, + "value": [ + { + "$id": "4699", + "kind": "model", + "type": { + "$ref": "914" + }, + "value": { + "$id": "4700", + "authenticationRef": { + "$id": "4701", + "kind": "string", + "type": { + "$ref": "916" + }, + "value": "tjvdroaqqy" + }, + "authorizationRef": { + "$id": "4702", + "kind": "string", + "type": { + "$ref": "920" + }, + "value": "inxhvxnwswyrvt" + }, + "nodePort": { + "$id": "4703", + "kind": "number", + "type": { + "$ref": "924" + }, + "value": 7281 + }, + "port": { + "$id": "4704", + "kind": "number", + "type": { + "$ref": "928" + }, + "value": 1268 + }, + "protocol": { + "$id": "4705", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "Mqtt" + }, + "tls": { + "$id": "4706", + "kind": "model", + "type": { + "$ref": "935" + }, + "value": { + "$id": "4707", + "mode": { + "$id": "4708", + "kind": "string", + "type": { + "$ref": "130" + }, + "value": "Automatic" + }, + "certManagerCertificateSpec": { + "$id": "4709", + "kind": "model", + "type": { + "$ref": "940" + }, + "value": { + "$id": "4710", + "duration": { + "$id": "4711", + "kind": "string", + "type": { + "$ref": "942" + }, + "value": "qmpeffoksron" + }, + "secretName": { + "$id": "4712", + "kind": "string", + "type": { + "$ref": "946" + }, + "value": "oagi" + }, + "renewBefore": { + "$id": "4713", + "kind": "string", + "type": { + "$ref": "950" + }, + "value": "hutno" + }, + "issuerRef": { + "$id": "4714", + "kind": "model", + "type": { + "$ref": "954" + }, + "value": { + "$id": "4715", + "group": { + "$id": "4716", + "kind": "string", + "type": { + "$ref": "956" + }, + "value": "jtmuladdkpasfpoyvewekmiy" + }, + "kind": { + "$id": "4717", + "kind": "string", + "type": { + "$ref": "136" + }, + "value": "Issuer" + }, + "name": { + "$id": "4718", + "kind": "string", + "type": { + "$ref": "963" + }, + "value": "ocwoqpgucvjrsuudtjhb" + } + } + }, + "privateKey": { + "$id": "4719", + "kind": "model", + "type": { + "$ref": "658" + }, + "value": { + "$id": "4720", + "algorithm": { + "$id": "4721", + "kind": "string", + "type": { + "$ref": "82" + }, + "value": "Ec256" + }, + "rotationPolicy": { + "$id": "4722", + "kind": "string", + "type": { + "$ref": "98" + }, + "value": "Always" + } + } + }, + "san": { + "$id": "4723", + "kind": "model", + "type": { + "$ref": "972" + }, + "value": { + "$id": "4724", + "dns": { + "$id": "4725", + "kind": "array", + "type": { + "$ref": "974" + }, + "value": [ + { + "$id": "4726", + "kind": "string", + "type": { + "$ref": "975" + }, + "value": "xhvmhrrhgfsapocjeebqtnzarlj" + } + ] + }, + "ip": { + "$id": "4727", + "kind": "array", + "type": { + "$ref": "979" + }, + "value": [ + { + "$id": "4728", + "kind": "string", + "type": { + "$ref": "980" + }, + "value": "zbgugfzcgsmegevzktsnibyuyp" + } + ] + } + } + } + } + }, + "manual": { + "$id": "4729", + "kind": "model", + "type": { + "$ref": "988" + }, + "value": { + "$id": "4730", + "secretRef": { + "$id": "4731", + "kind": "string", + "type": { + "$ref": "990" + }, + "value": "secret-name" + } + } + } + } + } + } + } + ] + }, + "serviceType": { + "$id": "4732", + "kind": "string", + "type": { + "$ref": "142" + }, + "value": "ClusterIp" + }, + "provisioningState": { + "$id": "4733", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "4734", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "4735", + "name": { + "$id": "4736", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "4737", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "4738", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123/listeners/resource-name123" + }, + "name": { + "$id": "4739", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "hoqjaachratt" + }, + "type": { + "$id": "4740", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "hizbknwegcdaeh" + }, + "systemData": { + "$id": "4741", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "4742", + "createdBy": { + "$id": "4743", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "4744", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "4745", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "4746", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "4747", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "4748", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + ] + }, + "nextLink": { + "$id": "4749", + "kind": "string", + "type": { + "$ref": "1018" + }, + "value": "https://microsoft.com/a" + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "4750", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "4751", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4752", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "4753", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4754", + "name": "brokerName", + "nameInRequest": "brokerName", + "doc": "Name of broker.", + "type": { + "$id": "4755", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4756", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "4673" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "4757", + "type": { + "$id": "4758", + "kind": "array", + "name": "ArrayBrokerListenerResource", + "valueType": { + "$ref": "905" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "resultSegments": [ + "value" + ] + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerListener.listByResourceGroup" + } + ], + "parameters": [ + { + "$id": "4759", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "4760", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "location": "Uri", + "isApiVersion": false, + "isContentType": false, + "isRequired": true, + "isEndpoint": true, + "skipUrlEncoding": false, + "explode": false, + "kind": "Client", + "defaultValue": { + "$id": "4761", + "type": { + "$id": "4762", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "4763", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "4764" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerListener", + "apiVersions": [ + "2024-11-01", + "2025-04-01" + ], + "parent": { + "$ref": "1710" + } + }, + { + "$id": "4765", + "kind": "client", + "name": "BrokerAuthentication", + "namespace": "Azure.ResourceManager.IotOperations", + "methods": [ + { + "$id": "4766", + "kind": "basic", + "name": "get", + "accessibility": "public", + "apiVersions": [ + "2024-11-01", + "2025-04-01" + ], + "doc": "Get a BrokerAuthenticationResource", + "operation": { + "$id": "4767", + "name": "get", + "resourceName": "BrokerAuthenticationResource", + "doc": "Get a BrokerAuthenticationResource", + "accessibility": "public", + "parameters": [ + { + "$id": "4768", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "4769", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "4770", + "type": { + "$id": "4771", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-04-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4772", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "4773", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "4774", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4775", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "4776", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4777", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "4778", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4779", + "name": "brokerName", + "nameInRequest": "brokerName", + "doc": "Name of broker.", + "type": { + "$id": "4780", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4781", + "name": "authenticationName", + "nameInRequest": "authenticationName", + "doc": "Name of Instance broker authentication resource", + "type": { + "$id": "4782", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4783", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "4784", + "kind": "constant", + "valueType": { + "$id": "4785", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "4786", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1022" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/brokers/{brokerName}/authentications/{authenticationName}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthentication.get", + "decorators": [], + "examples": [ + { + "$id": "4787", + "kind": "http", + "name": "BrokerAuthentication_Get", + "description": "BrokerAuthentication_Get", + "filePath": "2025-04-01/BrokerAuthentication_Get_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "4788", + "parameter": { + "$ref": "4768" + }, + "value": { + "$id": "4789", + "kind": "string", + "type": { + "$ref": "4769" + }, + "value": "2025-04-01" + } + }, + { + "$id": "4790", + "parameter": { + "$ref": "4772" + }, + "value": { + "$id": "4791", + "kind": "string", + "type": { + "$ref": "4773" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "4792", + "parameter": { + "$ref": "4775" + }, + "value": { + "$id": "4793", + "kind": "string", + "type": { + "$ref": "4776" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "4794", + "parameter": { + "$ref": "4777" + }, + "value": { + "$id": "4795", + "kind": "string", + "type": { + "$ref": "4778" + }, + "value": "resource-name123" + } + }, + { + "$id": "4796", + "parameter": { + "$ref": "4779" + }, + "value": { + "$id": "4797", + "kind": "string", + "type": { + "$ref": "4780" + }, + "value": "resource-name123" + } + }, + { + "$id": "4798", + "parameter": { + "$ref": "4781" + }, + "value": { + "$id": "4799", + "kind": "string", + "type": { + "$ref": "4782" + }, + "value": "resource-name123" + } + } + ], + "responses": [ + { + "$id": "4800", + "response": { + "$ref": "4786" + }, + "statusCode": 200, + "bodyValue": { + "$id": "4801", + "kind": "model", + "type": { + "$ref": "1022" + }, + "value": { + "$id": "4802", + "properties": { + "$id": "4803", + "kind": "model", + "type": { + "$ref": "1024" + }, + "value": { + "$id": "4804", + "authenticationMethods": { + "$id": "4805", + "kind": "array", + "type": { + "$ref": "1026" + }, + "value": [ + { + "$id": "4806", + "kind": "model", + "type": { + "$ref": "1027" + }, + "value": { + "$id": "4807", + "method": { + "$id": "4808", + "kind": "string", + "type": { + "$ref": "150" + }, + "value": "Custom" + }, + "customSettings": { + "$id": "4809", + "kind": "model", + "type": { + "$ref": "1032" + }, + "value": { + "$id": "4810", + "auth": { + "$id": "4811", + "kind": "model", + "type": { + "$ref": "1034" + }, + "value": { + "$id": "4812", + "x509": { + "$id": "4813", + "kind": "model", + "type": { + "$ref": "988" + }, + "value": { + "$id": "4814", + "secretRef": { + "$id": "4815", + "kind": "string", + "type": { + "$ref": "990" + }, + "value": "secret-name" + } + } + } + } + }, + "caCertConfigMap": { + "$id": "4816", + "kind": "string", + "type": { + "$ref": "1041" + }, + "value": "pdecudefqyolvncbus" + }, + "endpoint": { + "$id": "4817", + "kind": "string", + "type": { + "$ref": "1045" + }, + "value": "https://www.example.com" + }, + "headers": { + "$id": "4818", + "kind": "dict", + "type": { + "$ref": "1049" + }, + "value": { + "$id": "4819", + "key8518": { + "$id": "4820", + "kind": "string", + "type": { + "$ref": "1051" + }, + "value": "bwityjy" + } + } + } + } + }, + "serviceAccountTokenSettings": { + "$id": "4821", + "kind": "model", + "type": { + "$ref": "1057" + }, + "value": { + "$id": "4822", + "audiences": { + "$id": "4823", + "kind": "array", + "type": { + "$ref": "1059" + }, + "value": [ + { + "$id": "4824", + "kind": "string", + "type": { + "$ref": "1060" + }, + "value": "jqyhyqatuydg" + } + ] + } + } + }, + "x509Settings": { + "$id": "4825", + "kind": "model", + "type": { + "$ref": "1066" + }, + "value": { + "$id": "4826", + "authorizationAttributes": { + "$id": "4827", + "kind": "dict", + "type": { + "$ref": "1068" + }, + "value": { + "$id": "4828", + "key3384": { + "$id": "4829", + "kind": "model", + "type": { + "$ref": "1070" + }, + "value": { + "$id": "4830", + "attributes": { + "$id": "4831", + "kind": "dict", + "type": { + "$ref": "1072" + }, + "value": { + "$id": "4832", + "key186": { + "$id": "4833", + "kind": "string", + "type": { + "$ref": "1074" + }, + "value": "ucpajramsz" + } + } + }, + "subject": { + "$id": "4834", + "kind": "string", + "type": { + "$ref": "1078" + }, + "value": "jpgwctfeixitptfgfnqhua" + } + } + } + } + }, + "trustedClientCaCert": { + "$id": "4835", + "kind": "string", + "type": { + "$ref": "1084" + }, + "value": "vlctsqddl" + } + } + } + } + } + ] + }, + "provisioningState": { + "$id": "4836", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "4837", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "4838", + "name": { + "$id": "4839", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "4840", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "4841", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123/authentications/resource-name123" + }, + "name": { + "$id": "4842", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "lwucizfvtsdpx" + }, + "type": { + "$id": "4843", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "kvtilkgcxanlfozrd" + }, + "systemData": { + "$id": "4844", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "4845", + "createdBy": { + "$id": "4846", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "4847", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "4848", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "4849", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "4850", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "4851", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "4852", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "4853", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4854", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "4855", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4856", + "name": "brokerName", + "nameInRequest": "brokerName", + "doc": "Name of broker.", + "type": { + "$id": "4857", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4858", + "name": "authenticationName", + "nameInRequest": "authenticationName", + "doc": "Name of Instance broker authentication resource", + "type": { + "$id": "4859", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4860", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "4784" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "4861", + "type": { + "$ref": "1022" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthentication.get" + }, + { + "$id": "4862", + "kind": "lro", + "name": "createOrUpdate", + "accessibility": "public", + "apiVersions": [ + "2024-11-01", + "2025-04-01" + ], + "doc": "Create a BrokerAuthenticationResource", + "operation": { + "$id": "4863", + "name": "createOrUpdate", + "resourceName": "BrokerAuthenticationResource", + "doc": "Create a BrokerAuthenticationResource", + "accessibility": "public", + "parameters": [ + { + "$id": "4864", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "4865", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "4866", + "type": { + "$id": "4867", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-04-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4868", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "4869", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "4870", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4871", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "4872", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4873", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "4874", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4875", + "name": "brokerName", + "nameInRequest": "brokerName", + "doc": "Name of broker.", + "type": { + "$id": "4876", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4877", + "name": "authenticationName", + "nameInRequest": "authenticationName", + "doc": "Name of Instance broker authentication resource", + "type": { + "$id": "4878", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4879", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "4880", + "kind": "constant", + "valueType": { + "$id": "4881", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4882", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "4883", + "kind": "constant", + "valueType": { + "$id": "4884", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4885", + "name": "resource", + "nameInRequest": "resource", + "doc": "Resource create parameters.", + "type": { + "$ref": "1022" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "4886", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1022" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + { + "$id": "4887", + "statusCodes": [ + 201 + ], + "bodyType": { + "$ref": "1022" + }, + "headers": [ + { + "$id": "4888", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "4889", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "4890", + "name": "retryAfter", + "nameInResponse": "Retry-After", + "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "type": { + "$id": "4891", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "PUT", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/brokers/{brokerName}/authentications/{authenticationName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "longRunning": { + "$id": "4892", + "finalStateVia": 0, + "finalResponse": { + "$id": "4893", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1022" + } + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthentication.createOrUpdate", + "decorators": [], + "examples": [ + { + "$id": "4894", + "kind": "http", + "name": "BrokerAuthentication_CreateOrUpdate_Complex", + "description": "BrokerAuthentication_CreateOrUpdate_Complex", + "filePath": "2025-04-01/BrokerAuthentication_CreateOrUpdate_Complex.json", + "parameters": [ + { + "$id": "4895", + "parameter": { + "$ref": "4864" + }, + "value": { + "$id": "4896", + "kind": "string", + "type": { + "$ref": "4865" + }, + "value": "2025-04-01" + } + }, + { + "$id": "4897", + "parameter": { + "$ref": "4868" + }, + "value": { + "$id": "4898", + "kind": "string", + "type": { + "$ref": "4869" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "4899", + "parameter": { + "$ref": "4871" + }, + "value": { + "$id": "4900", + "kind": "string", + "type": { + "$ref": "4872" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "4901", + "parameter": { + "$ref": "4873" + }, + "value": { + "$id": "4902", + "kind": "string", + "type": { + "$ref": "4874" + }, + "value": "resource-name123" + } + }, + { + "$id": "4903", + "parameter": { + "$ref": "4875" + }, + "value": { + "$id": "4904", + "kind": "string", + "type": { + "$ref": "4876" + }, + "value": "resource-name123" + } + }, + { + "$id": "4905", + "parameter": { + "$ref": "4877" + }, + "value": { + "$id": "4906", + "kind": "string", + "type": { + "$ref": "4878" + }, + "value": "resource-name123" + } + }, + { + "$id": "4907", + "parameter": { + "$ref": "4885" + }, + "value": { + "$id": "4908", + "kind": "model", + "type": { + "$ref": "1022" + }, + "value": { + "$id": "4909", + "properties": { + "$id": "4910", + "kind": "model", + "type": { + "$ref": "1024" + }, + "value": { + "$id": "4911", + "authenticationMethods": { + "$id": "4912", + "kind": "array", + "type": { + "$ref": "1026" + }, + "value": [ + { + "$id": "4913", + "kind": "model", + "type": { + "$ref": "1027" + }, + "value": { + "$id": "4914", + "method": { + "$id": "4915", + "kind": "string", + "type": { + "$ref": "150" + }, + "value": "ServiceAccountToken" + }, + "serviceAccountTokenSettings": { + "$id": "4916", + "kind": "model", + "type": { + "$ref": "1057" + }, + "value": { + "$id": "4917", + "audiences": { + "$id": "4918", + "kind": "array", + "type": { + "$ref": "1059" + }, + "value": [ + { + "$id": "4919", + "kind": "string", + "type": { + "$ref": "1060" + }, + "value": "aio-internal" + } + ] + } + } + } + } + }, + { + "$id": "4920", + "kind": "model", + "type": { + "$ref": "1027" + }, + "value": { + "$id": "4921", + "method": { + "$id": "4922", + "kind": "string", + "type": { + "$ref": "150" + }, + "value": "X509" + }, + "x509Settings": { + "$id": "4923", + "kind": "model", + "type": { + "$ref": "1066" + }, + "value": { + "$id": "4924", + "trustedClientCaCert": { + "$id": "4925", + "kind": "string", + "type": { + "$ref": "1084" + }, + "value": "my-ca" + }, + "authorizationAttributes": { + "$id": "4926", + "kind": "dict", + "type": { + "$ref": "1068" + }, + "value": { + "$id": "4927", + "root": { + "$id": "4928", + "kind": "model", + "type": { + "$ref": "1070" + }, + "value": { + "$id": "4929", + "subject": { + "$id": "4930", + "kind": "string", + "type": { + "$ref": "1078" + }, + "value": "CN = Contoso Root CA Cert, OU = Engineering, C = US" + }, + "attributes": { + "$id": "4931", + "kind": "dict", + "type": { + "$ref": "1072" + }, + "value": { + "$id": "4932", + "organization": { + "$id": "4933", + "kind": "string", + "type": { + "$ref": "1074" + }, + "value": "contoso" + } + } + } + } + }, + "intermediate": { + "$id": "4934", + "kind": "model", + "type": { + "$ref": "1070" + }, + "value": { + "$id": "4935", + "subject": { + "$id": "4936", + "kind": "string", + "type": { + "$ref": "1078" + }, + "value": "CN = Contoso Intermediate CA" + }, + "attributes": { + "$id": "4937", + "kind": "dict", + "type": { + "$ref": "1072" + }, + "value": { + "$id": "4938", + "city": { + "$id": "4939", + "kind": "string", + "type": { + "$ref": "1074" + }, + "value": "seattle" + }, + "foo": { + "$id": "4940", + "kind": "string", + "type": { + "$ref": "1074" + }, + "value": "bar" + } + } + } + } + }, + "smart-fan": { + "$id": "4941", + "kind": "model", + "type": { + "$ref": "1070" + }, + "value": { + "$id": "4942", + "subject": { + "$id": "4943", + "kind": "string", + "type": { + "$ref": "1078" + }, + "value": "CN = smart-fan" + }, + "attributes": { + "$id": "4944", + "kind": "dict", + "type": { + "$ref": "1072" + }, + "value": { + "$id": "4945", + "building": { + "$id": "4946", + "kind": "string", + "type": { + "$ref": "1074" + }, + "value": "17" + } + } + } + } + } + } + } + } + } + } + } + ] + } + } + }, + "extendedLocation": { + "$id": "4947", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "4948", + "name": { + "$id": "4949", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "4950", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "4951", + "response": { + "$ref": "4886" + }, + "statusCode": 200, + "bodyValue": { + "$id": "4952", + "kind": "model", + "type": { + "$ref": "1022" + }, + "value": { + "$id": "4953", + "properties": { + "$id": "4954", + "kind": "model", + "type": { + "$ref": "1024" + }, + "value": { + "$id": "4955", + "authenticationMethods": { + "$id": "4956", + "kind": "array", + "type": { + "$ref": "1026" + }, + "value": [ + { + "$id": "4957", + "kind": "model", + "type": { + "$ref": "1027" + }, + "value": { + "$id": "4958", + "method": { + "$id": "4959", + "kind": "string", + "type": { + "$ref": "150" + }, + "value": "ServiceAccountToken" + }, + "serviceAccountTokenSettings": { + "$id": "4960", + "kind": "model", + "type": { + "$ref": "1057" + }, + "value": { + "$id": "4961", + "audiences": { + "$id": "4962", + "kind": "array", + "type": { + "$ref": "1059" + }, + "value": [ + { + "$id": "4963", + "kind": "string", + "type": { + "$ref": "1060" + }, + "value": "aio-internal" + } + ] + } + } + } + } + }, + { + "$id": "4964", + "kind": "model", + "type": { + "$ref": "1027" + }, + "value": { + "$id": "4965", + "method": { + "$id": "4966", + "kind": "string", + "type": { + "$ref": "150" + }, + "value": "X509" + }, + "x509Settings": { + "$id": "4967", + "kind": "model", + "type": { + "$ref": "1066" + }, + "value": { + "$id": "4968", + "trustedClientCaCert": { + "$id": "4969", + "kind": "string", + "type": { + "$ref": "1084" + }, + "value": "my-ca" + }, + "authorizationAttributes": { + "$id": "4970", + "kind": "dict", + "type": { + "$ref": "1068" + }, + "value": { + "$id": "4971", + "root": { + "$id": "4972", + "kind": "model", + "type": { + "$ref": "1070" + }, + "value": { + "$id": "4973", + "subject": { + "$id": "4974", + "kind": "string", + "type": { + "$ref": "1078" + }, + "value": "CN = Contoso Root CA Cert, OU = Engineering, C = US" + }, + "attributes": { + "$id": "4975", + "kind": "dict", + "type": { + "$ref": "1072" + }, + "value": { + "$id": "4976", + "organization": { + "$id": "4977", + "kind": "string", + "type": { + "$ref": "1074" + }, + "value": "contoso" + } + } + } + } + }, + "intermediate": { + "$id": "4978", + "kind": "model", + "type": { + "$ref": "1070" + }, + "value": { + "$id": "4979", + "subject": { + "$id": "4980", + "kind": "string", + "type": { + "$ref": "1078" + }, + "value": "CN = Contoso Intermediate CA" + }, + "attributes": { + "$id": "4981", + "kind": "dict", + "type": { + "$ref": "1072" + }, + "value": { + "$id": "4982", + "city": { + "$id": "4983", + "kind": "string", + "type": { + "$ref": "1074" + }, + "value": "seattle" + }, + "foo": { + "$id": "4984", + "kind": "string", + "type": { + "$ref": "1074" + }, + "value": "bar" + } + } + } + } + }, + "smart-fan": { + "$id": "4985", + "kind": "model", + "type": { + "$ref": "1070" + }, + "value": { + "$id": "4986", + "subject": { + "$id": "4987", + "kind": "string", + "type": { + "$ref": "1078" + }, + "value": "CN = smart-fan" + }, + "attributes": { + "$id": "4988", + "kind": "dict", + "type": { + "$ref": "1072" + }, + "value": { + "$id": "4989", + "building": { + "$id": "4990", + "kind": "string", + "type": { + "$ref": "1074" + }, + "value": "17" + } + } + } + } + } + } + } + } + } + } + } + ] + }, + "provisioningState": { + "$id": "4991", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "4992", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "4993", + "name": { + "$id": "4994", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "4995", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "4996", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123/authentications/resource-name123" + }, + "name": { + "$id": "4997", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "lwucizfvtsdpx" + }, + "type": { + "$id": "4998", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "kvtilkgcxanlfozrd" + }, + "systemData": { + "$id": "4999", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "5000", + "createdBy": { + "$id": "5001", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "5002", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "5003", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "5004", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "5005", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "5006", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "5007", + "response": { + "$ref": "4887" + }, + "statusCode": 201, + "bodyValue": { + "$id": "5008", + "kind": "model", + "type": { + "$ref": "1022" + }, + "value": { + "$id": "5009", + "properties": { + "$id": "5010", + "kind": "model", + "type": { + "$ref": "1024" + }, + "value": { + "$id": "5011", + "authenticationMethods": { + "$id": "5012", + "kind": "array", + "type": { + "$ref": "1026" + }, + "value": [ + { + "$id": "5013", + "kind": "model", + "type": { + "$ref": "1027" + }, + "value": { + "$id": "5014", + "method": { + "$id": "5015", + "kind": "string", + "type": { + "$ref": "150" + }, + "value": "ServiceAccountToken" + }, + "serviceAccountTokenSettings": { + "$id": "5016", + "kind": "model", + "type": { + "$ref": "1057" + }, + "value": { + "$id": "5017", + "audiences": { + "$id": "5018", + "kind": "array", + "type": { + "$ref": "1059" + }, + "value": [ + { + "$id": "5019", + "kind": "string", + "type": { + "$ref": "1060" + }, + "value": "aio-internal" + } + ] + } + } + } + } + }, + { + "$id": "5020", + "kind": "model", + "type": { + "$ref": "1027" + }, + "value": { + "$id": "5021", + "method": { + "$id": "5022", + "kind": "string", + "type": { + "$ref": "150" + }, + "value": "X509" + }, + "x509Settings": { + "$id": "5023", + "kind": "model", + "type": { + "$ref": "1066" + }, + "value": { + "$id": "5024", + "trustedClientCaCert": { + "$id": "5025", + "kind": "string", + "type": { + "$ref": "1084" + }, + "value": "my-ca" + }, + "authorizationAttributes": { + "$id": "5026", + "kind": "dict", + "type": { + "$ref": "1068" + }, + "value": { + "$id": "5027", + "root": { + "$id": "5028", + "kind": "model", + "type": { + "$ref": "1070" + }, + "value": { + "$id": "5029", + "subject": { + "$id": "5030", + "kind": "string", + "type": { + "$ref": "1078" + }, + "value": "CN = Contoso Root CA Cert, OU = Engineering, C = US" + }, + "attributes": { + "$id": "5031", + "kind": "dict", + "type": { + "$ref": "1072" + }, + "value": { + "$id": "5032", + "organization": { + "$id": "5033", + "kind": "string", + "type": { + "$ref": "1074" + }, + "value": "contoso" + } + } + } + } + }, + "intermediate": { + "$id": "5034", + "kind": "model", + "type": { + "$ref": "1070" + }, + "value": { + "$id": "5035", + "subject": { + "$id": "5036", + "kind": "string", + "type": { + "$ref": "1078" + }, + "value": "CN = Contoso Intermediate CA" + }, + "attributes": { + "$id": "5037", + "kind": "dict", + "type": { + "$ref": "1072" + }, + "value": { + "$id": "5038", + "city": { + "$id": "5039", + "kind": "string", + "type": { + "$ref": "1074" + }, + "value": "seattle" + }, + "foo": { + "$id": "5040", + "kind": "string", + "type": { + "$ref": "1074" + }, + "value": "bar" + } + } + } + } + }, + "smart-fan": { + "$id": "5041", + "kind": "model", + "type": { + "$ref": "1070" + }, + "value": { + "$id": "5042", + "subject": { + "$id": "5043", + "kind": "string", + "type": { + "$ref": "1078" + }, + "value": "CN = smart-fan" + }, + "attributes": { + "$id": "5044", + "kind": "dict", + "type": { + "$ref": "1072" + }, + "value": { + "$id": "5045", + "building": { + "$id": "5046", + "kind": "string", + "type": { + "$ref": "1074" + }, + "value": "17" + } + } + } + } + } + } + } + } + } + } + } + ] + }, + "provisioningState": { + "$id": "5047", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "5048", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "5049", + "name": { + "$id": "5050", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "5051", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "5052", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123/authentications/resource-name123" + }, + "name": { + "$id": "5053", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "lwucizfvtsdpx" + }, + "type": { + "$id": "5054", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "kvtilkgcxanlfozrd" + }, + "systemData": { + "$id": "5055", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "5056", + "createdBy": { + "$id": "5057", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "5058", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "5059", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "5060", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "5061", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "5062", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + }, + { + "$id": "5063", + "kind": "http", + "name": "BrokerAuthentication_CreateOrUpdate", + "description": "BrokerAuthentication_CreateOrUpdate", + "filePath": "2025-04-01/BrokerAuthentication_CreateOrUpdate_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "5064", + "parameter": { + "$ref": "4864" + }, + "value": { + "$id": "5065", + "kind": "string", + "type": { + "$ref": "4865" + }, + "value": "2025-04-01" + } + }, + { + "$id": "5066", + "parameter": { + "$ref": "4868" + }, + "value": { + "$id": "5067", + "kind": "string", + "type": { + "$ref": "4869" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "5068", + "parameter": { + "$ref": "4871" + }, + "value": { + "$id": "5069", + "kind": "string", + "type": { + "$ref": "4872" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "5070", + "parameter": { + "$ref": "4873" + }, + "value": { + "$id": "5071", + "kind": "string", + "type": { + "$ref": "4874" + }, + "value": "resource-name123" + } + }, + { + "$id": "5072", + "parameter": { + "$ref": "4875" + }, + "value": { + "$id": "5073", + "kind": "string", + "type": { + "$ref": "4876" + }, + "value": "resource-name123" + } + }, + { + "$id": "5074", + "parameter": { + "$ref": "4877" + }, + "value": { + "$id": "5075", + "kind": "string", + "type": { + "$ref": "4878" + }, + "value": "resource-name123" + } + }, + { + "$id": "5076", + "parameter": { + "$ref": "4885" + }, + "value": { + "$id": "5077", + "kind": "model", + "type": { + "$ref": "1022" + }, + "value": { + "$id": "5078", + "properties": { + "$id": "5079", + "kind": "model", + "type": { + "$ref": "1024" + }, + "value": { + "$id": "5080", + "authenticationMethods": { + "$id": "5081", + "kind": "array", + "type": { + "$ref": "1026" + }, + "value": [ + { + "$id": "5082", + "kind": "model", + "type": { + "$ref": "1027" + }, + "value": { + "$id": "5083", + "method": { + "$id": "5084", + "kind": "string", + "type": { + "$ref": "150" + }, + "value": "Custom" + }, + "customSettings": { + "$id": "5085", + "kind": "model", + "type": { + "$ref": "1032" + }, + "value": { + "$id": "5086", + "auth": { + "$id": "5087", + "kind": "model", + "type": { + "$ref": "1034" + }, + "value": { + "$id": "5088", + "x509": { + "$id": "5089", + "kind": "model", + "type": { + "$ref": "988" + }, + "value": { + "$id": "5090", + "secretRef": { + "$id": "5091", + "kind": "string", + "type": { + "$ref": "990" + }, + "value": "secret-name" + } + } + } + } + }, + "caCertConfigMap": { + "$id": "5092", + "kind": "string", + "type": { + "$ref": "1041" + }, + "value": "pdecudefqyolvncbus" + }, + "endpoint": { + "$id": "5093", + "kind": "string", + "type": { + "$ref": "1045" + }, + "value": "https://www.example.com" + }, + "headers": { + "$id": "5094", + "kind": "dict", + "type": { + "$ref": "1049" + }, + "value": { + "$id": "5095", + "key8518": { + "$id": "5096", + "kind": "string", + "type": { + "$ref": "1051" + }, + "value": "bwityjy" + } + } + } + } + }, + "serviceAccountTokenSettings": { + "$id": "5097", + "kind": "model", + "type": { + "$ref": "1057" + }, + "value": { + "$id": "5098", + "audiences": { + "$id": "5099", + "kind": "array", + "type": { + "$ref": "1059" + }, + "value": [ + { + "$id": "5100", + "kind": "string", + "type": { + "$ref": "1060" + }, + "value": "jqyhyqatuydg" + } + ] + } + } + }, + "x509Settings": { + "$id": "5101", + "kind": "model", + "type": { + "$ref": "1066" + }, + "value": { + "$id": "5102", + "authorizationAttributes": { + "$id": "5103", + "kind": "dict", + "type": { + "$ref": "1068" + }, + "value": { + "$id": "5104", + "key3384": { + "$id": "5105", + "kind": "model", + "type": { + "$ref": "1070" + }, + "value": { + "$id": "5106", + "attributes": { + "$id": "5107", + "kind": "dict", + "type": { + "$ref": "1072" + }, + "value": { + "$id": "5108", + "key186": { + "$id": "5109", + "kind": "string", + "type": { + "$ref": "1074" + }, + "value": "ucpajramsz" + } + } + }, + "subject": { + "$id": "5110", + "kind": "string", + "type": { + "$ref": "1078" + }, + "value": "jpgwctfeixitptfgfnqhua" + } + } + } + } + }, + "trustedClientCaCert": { + "$id": "5111", + "kind": "string", + "type": { + "$ref": "1084" + }, + "value": "vlctsqddl" + } + } + } + } + } + ] + } + } + }, + "extendedLocation": { + "$id": "5112", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "5113", + "name": { + "$id": "5114", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "5115", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "5116", + "response": { + "$ref": "4886" + }, + "statusCode": 200, + "bodyValue": { + "$id": "5117", + "kind": "model", + "type": { + "$ref": "1022" + }, + "value": { + "$id": "5118", + "properties": { + "$id": "5119", + "kind": "model", + "type": { + "$ref": "1024" + }, + "value": { + "$id": "5120", + "authenticationMethods": { + "$id": "5121", + "kind": "array", + "type": { + "$ref": "1026" + }, + "value": [ + { + "$id": "5122", + "kind": "model", + "type": { + "$ref": "1027" + }, + "value": { + "$id": "5123", + "method": { + "$id": "5124", + "kind": "string", + "type": { + "$ref": "150" + }, + "value": "Custom" + }, + "customSettings": { + "$id": "5125", + "kind": "model", + "type": { + "$ref": "1032" + }, + "value": { + "$id": "5126", + "auth": { + "$id": "5127", + "kind": "model", + "type": { + "$ref": "1034" + }, + "value": { + "$id": "5128", + "x509": { + "$id": "5129", + "kind": "model", + "type": { + "$ref": "988" + }, + "value": { + "$id": "5130", + "secretRef": { + "$id": "5131", + "kind": "string", + "type": { + "$ref": "990" + }, + "value": "secret-name" + } + } + } + } + }, + "caCertConfigMap": { + "$id": "5132", + "kind": "string", + "type": { + "$ref": "1041" + }, + "value": "pdecudefqyolvncbus" + }, + "endpoint": { + "$id": "5133", + "kind": "string", + "type": { + "$ref": "1045" + }, + "value": "https://www.example.com" + }, + "headers": { + "$id": "5134", + "kind": "dict", + "type": { + "$ref": "1049" + }, + "value": { + "$id": "5135", + "key8518": { + "$id": "5136", + "kind": "string", + "type": { + "$ref": "1051" + }, + "value": "bwityjy" + } + } + } + } + }, + "serviceAccountTokenSettings": { + "$id": "5137", + "kind": "model", + "type": { + "$ref": "1057" + }, + "value": { + "$id": "5138", + "audiences": { + "$id": "5139", + "kind": "array", + "type": { + "$ref": "1059" + }, + "value": [ + { + "$id": "5140", + "kind": "string", + "type": { + "$ref": "1060" + }, + "value": "jqyhyqatuydg" + } + ] + } + } + }, + "x509Settings": { + "$id": "5141", + "kind": "model", + "type": { + "$ref": "1066" + }, + "value": { + "$id": "5142", + "authorizationAttributes": { + "$id": "5143", + "kind": "dict", + "type": { + "$ref": "1068" + }, + "value": { + "$id": "5144", + "key3384": { + "$id": "5145", + "kind": "model", + "type": { + "$ref": "1070" + }, + "value": { + "$id": "5146", + "attributes": { + "$id": "5147", + "kind": "dict", + "type": { + "$ref": "1072" + }, + "value": { + "$id": "5148", + "key186": { + "$id": "5149", + "kind": "string", + "type": { + "$ref": "1074" + }, + "value": "ucpajramsz" + } + } + }, + "subject": { + "$id": "5150", + "kind": "string", + "type": { + "$ref": "1078" + }, + "value": "jpgwctfeixitptfgfnqhua" + } + } + } + } + }, + "trustedClientCaCert": { + "$id": "5151", + "kind": "string", + "type": { + "$ref": "1084" + }, + "value": "vlctsqddl" + } + } + } + } + } + ] + }, + "provisioningState": { + "$id": "5152", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "5153", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "5154", + "name": { + "$id": "5155", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "5156", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "5157", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123/authentications/resource-name123" + }, + "name": { + "$id": "5158", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "lwucizfvtsdpx" + }, + "type": { + "$id": "5159", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "kvtilkgcxanlfozrd" + }, + "systemData": { + "$id": "5160", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "5161", + "createdBy": { + "$id": "5162", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "5163", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "5164", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "5165", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "5166", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "5167", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "5168", + "response": { + "$ref": "4887" + }, + "statusCode": 201, + "bodyValue": { + "$id": "5169", + "kind": "model", + "type": { + "$ref": "1022" + }, + "value": { + "$id": "5170", + "properties": { + "$id": "5171", + "kind": "model", + "type": { + "$ref": "1024" + }, + "value": { + "$id": "5172", + "authenticationMethods": { + "$id": "5173", + "kind": "array", + "type": { + "$ref": "1026" + }, + "value": [ + { + "$id": "5174", + "kind": "model", + "type": { + "$ref": "1027" + }, + "value": { + "$id": "5175", + "method": { + "$id": "5176", + "kind": "string", + "type": { + "$ref": "150" + }, + "value": "Custom" + }, + "customSettings": { + "$id": "5177", + "kind": "model", + "type": { + "$ref": "1032" + }, + "value": { + "$id": "5178", + "auth": { + "$id": "5179", + "kind": "model", + "type": { + "$ref": "1034" + }, + "value": { + "$id": "5180", + "x509": { + "$id": "5181", + "kind": "model", + "type": { + "$ref": "988" + }, + "value": { + "$id": "5182", + "secretRef": { + "$id": "5183", + "kind": "string", + "type": { + "$ref": "990" + }, + "value": "secret-name" + } + } + } + } + }, + "caCertConfigMap": { + "$id": "5184", + "kind": "string", + "type": { + "$ref": "1041" + }, + "value": "pdecudefqyolvncbus" + }, + "endpoint": { + "$id": "5185", + "kind": "string", + "type": { + "$ref": "1045" + }, + "value": "https://www.example.com" + }, + "headers": { + "$id": "5186", + "kind": "dict", + "type": { + "$ref": "1049" + }, + "value": { + "$id": "5187", + "key8518": { + "$id": "5188", + "kind": "string", + "type": { + "$ref": "1051" + }, + "value": "bwityjy" + } + } + } + } + }, + "serviceAccountTokenSettings": { + "$id": "5189", + "kind": "model", + "type": { + "$ref": "1057" + }, + "value": { + "$id": "5190", + "audiences": { + "$id": "5191", + "kind": "array", + "type": { + "$ref": "1059" + }, + "value": [ + { + "$id": "5192", + "kind": "string", + "type": { + "$ref": "1060" + }, + "value": "jqyhyqatuydg" + } + ] + } + } + }, + "x509Settings": { + "$id": "5193", + "kind": "model", + "type": { + "$ref": "1066" + }, + "value": { + "$id": "5194", + "authorizationAttributes": { + "$id": "5195", + "kind": "dict", + "type": { + "$ref": "1068" + }, + "value": { + "$id": "5196", + "key3384": { + "$id": "5197", + "kind": "model", + "type": { + "$ref": "1070" + }, + "value": { + "$id": "5198", + "attributes": { + "$id": "5199", + "kind": "dict", + "type": { + "$ref": "1072" + }, + "value": { + "$id": "5200", + "key186": { + "$id": "5201", + "kind": "string", + "type": { + "$ref": "1074" + }, + "value": "ucpajramsz" + } + } + }, + "subject": { + "$id": "5202", + "kind": "string", + "type": { + "$ref": "1078" + }, + "value": "jpgwctfeixitptfgfnqhua" + } + } + } + } + }, + "trustedClientCaCert": { + "$id": "5203", + "kind": "string", + "type": { + "$ref": "1084" + }, + "value": "vlctsqddl" + } + } + } + } + } + ] + }, + "provisioningState": { + "$id": "5204", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "5205", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "5206", + "name": { + "$id": "5207", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "5208", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "5209", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123/authentications/resource-name123" + }, + "name": { + "$id": "5210", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "lwucizfvtsdpx" + }, + "type": { + "$id": "5211", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "kvtilkgcxanlfozrd" + }, + "systemData": { + "$id": "5212", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "5213", + "createdBy": { + "$id": "5214", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "5215", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "5216", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "5217", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "5218", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "5219", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "5220", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "5221", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5222", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "5223", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5224", + "name": "brokerName", + "nameInRequest": "brokerName", + "doc": "Name of broker.", + "type": { + "$id": "5225", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5226", + "name": "authenticationName", + "nameInRequest": "authenticationName", + "doc": "Name of Instance broker authentication resource", + "type": { + "$id": "5227", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5228", + "name": "resource", + "nameInRequest": "resource", + "doc": "Resource create parameters.", + "type": { + "$ref": "1022" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5229", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "5230", + "kind": "constant", + "valueType": { + "$id": "5231", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5232", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "5233", + "kind": "constant", + "valueType": { + "$id": "5234", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "5235", + "type": { + "$ref": "1022" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthentication.createOrUpdate" + }, + { + "$id": "5236", + "kind": "lro", + "name": "delete", + "accessibility": "public", + "apiVersions": [ + "2024-11-01", + "2025-04-01" + ], + "doc": "Delete a BrokerAuthenticationResource", + "operation": { + "$id": "5237", + "name": "delete", + "resourceName": "BrokerAuthenticationResource", + "doc": "Delete a BrokerAuthenticationResource", + "accessibility": "public", + "parameters": [ + { + "$id": "5238", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "5239", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "5240", + "type": { + "$id": "5241", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-04-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5242", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "5243", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "5244", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5245", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "5246", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5247", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "5248", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5249", + "name": "brokerName", + "nameInRequest": "brokerName", + "doc": "Name of broker.", + "type": { + "$id": "5250", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5251", + "name": "authenticationName", + "nameInRequest": "authenticationName", + "doc": "Name of Instance broker authentication resource", + "type": { + "$id": "5252", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5253", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "5254", + "kind": "constant", + "valueType": { + "$id": "5255", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "5256", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "5257", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "5258", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "5259", + "name": "retryAfter", + "nameInResponse": "Retry-After", + "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "type": { + "$id": "5260", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false + }, + { + "$id": "5261", + "statusCodes": [ + 204 + ], + "headers": [], + "isErrorResponse": false + } + ], + "httpMethod": "DELETE", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/brokers/{brokerName}/authentications/{authenticationName}", + "bufferResponse": true, + "longRunning": { + "$id": "5262", + "finalStateVia": 1, + "finalResponse": { + "$id": "5263", + "statusCodes": [ + 204 + ] + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthentication.delete", + "decorators": [], + "examples": [ + { + "$id": "5264", + "kind": "http", + "name": "BrokerAuthentication_Delete", + "description": "BrokerAuthentication_Delete", + "filePath": "2025-04-01/BrokerAuthentication_Delete_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "5265", + "parameter": { + "$ref": "5238" + }, + "value": { + "$id": "5266", + "kind": "string", + "type": { + "$ref": "5239" + }, + "value": "2025-04-01" + } + }, + { + "$id": "5267", + "parameter": { + "$ref": "5242" + }, + "value": { + "$id": "5268", + "kind": "string", + "type": { + "$ref": "5243" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "5269", + "parameter": { + "$ref": "5245" + }, + "value": { + "$id": "5270", + "kind": "string", + "type": { + "$ref": "5246" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "5271", + "parameter": { + "$ref": "5247" + }, + "value": { + "$id": "5272", + "kind": "string", + "type": { + "$ref": "5248" + }, + "value": "resource-name123" + } + }, + { + "$id": "5273", + "parameter": { + "$ref": "5249" + }, + "value": { + "$id": "5274", + "kind": "string", + "type": { + "$ref": "5250" + }, + "value": "resource-name123" + } + }, + { + "$id": "5275", + "parameter": { + "$ref": "5251" + }, + "value": { + "$id": "5276", + "kind": "string", + "type": { + "$ref": "5252" + }, + "value": "resource-name123" + } + } + ], + "responses": [ + { + "$id": "5277", + "response": { + "$ref": "5256" + }, + "statusCode": 202 + }, + { + "$id": "5278", + "response": { + "$ref": "5261" + }, + "statusCode": 204 + } + ] + } + ] + }, + "parameters": [ + { + "$id": "5279", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "5280", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5281", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "5282", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5283", + "name": "brokerName", + "nameInRequest": "brokerName", + "doc": "Name of broker.", + "type": { + "$id": "5284", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5285", + "name": "authenticationName", + "nameInRequest": "authenticationName", + "doc": "Name of Instance broker authentication resource", + "type": { + "$id": "5286", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5287", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "5288", + "kind": "constant", + "valueType": { + "$id": "5289", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "5290" + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthentication.delete" + }, + { + "$id": "5291", + "kind": "paging", + "name": "listByResourceGroup", + "accessibility": "public", + "apiVersions": [ + "2024-11-01", + "2025-04-01" + ], + "doc": "List BrokerAuthenticationResource resources by BrokerResource", + "operation": { + "$id": "5292", + "name": "listByResourceGroup", + "resourceName": "BrokerAuthenticationResource", + "doc": "List BrokerAuthenticationResource resources by BrokerResource", + "accessibility": "public", + "parameters": [ + { + "$id": "5293", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "5294", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "5295", + "type": { + "$id": "5296", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-04-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5297", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "5298", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "5299", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5300", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "5301", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5302", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "5303", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5304", + "name": "brokerName", + "nameInRequest": "brokerName", + "doc": "Name of broker.", + "type": { + "$id": "5305", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5306", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "5307", + "kind": "constant", + "valueType": { + "$id": "5308", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "5309", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1101" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/brokers/{brokerName}/authentications", + "bufferResponse": true, + "paging": { + "$id": "5310", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "5311", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthentication.listByResourceGroup", + "decorators": [], + "examples": [ + { + "$id": "5312", + "kind": "http", + "name": "BrokerAuthentication_ListByResourceGroup", + "description": "BrokerAuthentication_ListByResourceGroup", + "filePath": "2025-04-01/BrokerAuthentication_ListByResourceGroup_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "5313", + "parameter": { + "$ref": "5293" + }, + "value": { + "$id": "5314", + "kind": "string", + "type": { + "$ref": "5294" + }, + "value": "2025-04-01" + } + }, + { + "$id": "5315", + "parameter": { + "$ref": "5297" + }, + "value": { + "$id": "5316", + "kind": "string", + "type": { + "$ref": "5298" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "5317", + "parameter": { + "$ref": "5300" + }, + "value": { + "$id": "5318", + "kind": "string", + "type": { + "$ref": "5301" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "5319", + "parameter": { + "$ref": "5302" + }, + "value": { + "$id": "5320", + "kind": "string", + "type": { + "$ref": "5303" + }, + "value": "resource-name123" + } + }, + { + "$id": "5321", + "parameter": { + "$ref": "5304" + }, + "value": { + "$id": "5322", + "kind": "string", + "type": { + "$ref": "5305" + }, + "value": "resource-name123" + } + } + ], + "responses": [ + { + "$id": "5323", + "response": { + "$ref": "5309" + }, + "statusCode": 200, + "bodyValue": { + "$id": "5324", + "kind": "model", + "type": { + "$ref": "1101" + }, + "value": { + "$id": "5325", + "value": { + "$id": "5326", + "kind": "array", + "type": { + "$ref": "1103" + }, + "value": [ + { + "$id": "5327", + "kind": "model", + "type": { + "$ref": "1022" + }, + "value": { + "$id": "5328", + "properties": { + "$id": "5329", + "kind": "model", + "type": { + "$ref": "1024" + }, + "value": { + "$id": "5330", + "authenticationMethods": { + "$id": "5331", + "kind": "array", + "type": { + "$ref": "1026" + }, + "value": [ + { + "$id": "5332", + "kind": "model", + "type": { + "$ref": "1027" + }, + "value": { + "$id": "5333", + "method": { + "$id": "5334", + "kind": "string", + "type": { + "$ref": "150" + }, + "value": "Custom" + }, + "customSettings": { + "$id": "5335", + "kind": "model", + "type": { + "$ref": "1032" + }, + "value": { + "$id": "5336", + "auth": { + "$id": "5337", + "kind": "model", + "type": { + "$ref": "1034" + }, + "value": { + "$id": "5338", + "x509": { + "$id": "5339", + "kind": "model", + "type": { + "$ref": "988" + }, + "value": { + "$id": "5340", + "secretRef": { + "$id": "5341", + "kind": "string", + "type": { + "$ref": "990" + }, + "value": "secret-name" + } + } + } + } + }, + "caCertConfigMap": { + "$id": "5342", + "kind": "string", + "type": { + "$ref": "1041" + }, + "value": "pdecudefqyolvncbus" + }, + "endpoint": { + "$id": "5343", + "kind": "string", + "type": { + "$ref": "1045" + }, + "value": "https://www.example.com" + }, + "headers": { + "$id": "5344", + "kind": "dict", + "type": { + "$ref": "1049" + }, + "value": { + "$id": "5345", + "key8518": { + "$id": "5346", + "kind": "string", + "type": { + "$ref": "1051" + }, + "value": "bwityjy" + } + } + } + } + }, + "serviceAccountTokenSettings": { + "$id": "5347", + "kind": "model", + "type": { + "$ref": "1057" + }, + "value": { + "$id": "5348", + "audiences": { + "$id": "5349", + "kind": "array", + "type": { + "$ref": "1059" + }, + "value": [ + { + "$id": "5350", + "kind": "string", + "type": { + "$ref": "1060" + }, + "value": "jqyhyqatuydg" + } + ] + } + } + }, + "x509Settings": { + "$id": "5351", + "kind": "model", + "type": { + "$ref": "1066" + }, + "value": { + "$id": "5352", + "authorizationAttributes": { + "$id": "5353", + "kind": "dict", + "type": { + "$ref": "1068" + }, + "value": { + "$id": "5354", + "key3384": { + "$id": "5355", + "kind": "model", + "type": { + "$ref": "1070" + }, + "value": { + "$id": "5356", + "attributes": { + "$id": "5357", + "kind": "dict", + "type": { + "$ref": "1072" + }, + "value": { + "$id": "5358", + "key186": { + "$id": "5359", + "kind": "string", + "type": { + "$ref": "1074" + }, + "value": "ucpajramsz" + } + } + }, + "subject": { + "$id": "5360", + "kind": "string", + "type": { + "$ref": "1078" + }, + "value": "jpgwctfeixitptfgfnqhua" + } + } + } + } + }, + "trustedClientCaCert": { + "$id": "5361", + "kind": "string", + "type": { + "$ref": "1084" + }, + "value": "vlctsqddl" + } + } + } + } + } + ] + }, + "provisioningState": { + "$id": "5362", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "5363", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "5364", + "name": { + "$id": "5365", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "5366", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "5367", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123/authentications/resource-name123" + }, + "name": { + "$id": "5368", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "lwucizfvtsdpx" + }, + "type": { + "$id": "5369", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "kvtilkgcxanlfozrd" + }, + "systemData": { + "$id": "5370", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "5371", + "createdBy": { + "$id": "5372", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "5373", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "5374", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "5375", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "5376", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "5377", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + ] + }, + "nextLink": { + "$id": "5378", + "kind": "string", + "type": { + "$ref": "1107" + }, + "value": "https://microsoft.com/a" + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "5379", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "5380", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5381", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "5382", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5383", + "name": "brokerName", + "nameInRequest": "brokerName", + "doc": "Name of broker.", + "type": { + "$id": "5384", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5385", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "5307" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "5386", + "type": { + "$id": "5387", + "kind": "array", + "name": "ArrayBrokerAuthenticationResource", + "valueType": { + "$ref": "1022" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "resultSegments": [ + "value" + ] + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthentication.listByResourceGroup" + } + ], + "parameters": [ + { + "$id": "5388", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "5389", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "location": "Uri", + "isApiVersion": false, + "isContentType": false, + "isRequired": true, + "isEndpoint": true, + "skipUrlEncoding": false, + "explode": false, + "kind": "Client", + "defaultValue": { + "$id": "5390", + "type": { + "$id": "5391", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "5392", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "5393" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthentication", + "apiVersions": [ + "2024-11-01", + "2025-04-01" + ], + "parent": { + "$ref": "1710" + } + }, + { + "$id": "5394", + "kind": "client", + "name": "BrokerAuthorization", + "namespace": "Azure.ResourceManager.IotOperations", + "methods": [ + { + "$id": "5395", + "kind": "basic", + "name": "get", + "accessibility": "public", + "apiVersions": [ + "2024-11-01", + "2025-04-01" + ], + "doc": "Get a BrokerAuthorizationResource", + "operation": { + "$id": "5396", + "name": "get", + "resourceName": "BrokerAuthorizationResource", + "doc": "Get a BrokerAuthorizationResource", + "accessibility": "public", + "parameters": [ + { + "$id": "5397", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "5398", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "5399", + "type": { + "$id": "5400", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-04-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5401", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "5402", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "5403", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5404", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "5405", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5406", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "5407", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5408", + "name": "brokerName", + "nameInRequest": "brokerName", + "doc": "Name of broker.", + "type": { + "$id": "5409", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5410", + "name": "authorizationName", + "nameInRequest": "authorizationName", + "doc": "Name of Instance broker authorization resource", + "type": { + "$id": "5411", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5412", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "5413", + "kind": "constant", + "valueType": { + "$id": "5414", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "5415", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1111" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/brokers/{brokerName}/authorizations/{authorizationName}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthorization.get", + "decorators": [], + "examples": [ + { + "$id": "5416", + "kind": "http", + "name": "BrokerAuthorization_Get", + "description": "BrokerAuthorization_Get", + "filePath": "2025-04-01/BrokerAuthorization_Get_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "5417", + "parameter": { + "$ref": "5397" + }, + "value": { + "$id": "5418", + "kind": "string", + "type": { + "$ref": "5398" + }, + "value": "2025-04-01" + } + }, + { + "$id": "5419", + "parameter": { + "$ref": "5401" + }, + "value": { + "$id": "5420", + "kind": "string", + "type": { + "$ref": "5402" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "5421", + "parameter": { + "$ref": "5404" + }, + "value": { + "$id": "5422", + "kind": "string", + "type": { + "$ref": "5405" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "5423", + "parameter": { + "$ref": "5406" + }, + "value": { + "$id": "5424", + "kind": "string", + "type": { + "$ref": "5407" + }, + "value": "resource-name123" + } + }, + { + "$id": "5425", + "parameter": { + "$ref": "5408" + }, + "value": { + "$id": "5426", + "kind": "string", + "type": { + "$ref": "5409" + }, + "value": "resource-name123" + } + }, + { + "$id": "5427", + "parameter": { + "$ref": "5410" + }, + "value": { + "$id": "5428", + "kind": "string", + "type": { + "$ref": "5411" + }, + "value": "resource-name123" + } + } + ], + "responses": [ + { + "$id": "5429", + "response": { + "$ref": "5415" + }, + "statusCode": 200, + "bodyValue": { + "$id": "5430", + "kind": "model", + "type": { + "$ref": "1111" + }, + "value": { + "$id": "5431", + "properties": { + "$id": "5432", + "kind": "model", + "type": { + "$ref": "1113" + }, + "value": { + "$id": "5433", + "authorizationPolicies": { + "$id": "5434", + "kind": "model", + "type": { + "$ref": "1115" + }, + "value": { + "$id": "5435", + "cache": { + "$id": "5436", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "rules": { + "$id": "5437", + "kind": "array", + "type": { + "$ref": "1120" + }, + "value": [ + { + "$id": "5438", + "kind": "model", + "type": { + "$ref": "1121" + }, + "value": { + "$id": "5439", + "brokerResources": { + "$id": "5440", + "kind": "array", + "type": { + "$ref": "1123" + }, + "value": [ + { + "$id": "5441", + "kind": "model", + "type": { + "$ref": "1124" + }, + "value": { + "$id": "5442", + "method": { + "$id": "5443", + "kind": "string", + "type": { + "$ref": "158" + }, + "value": "Connect" + }, + "clientIds": { + "$id": "5444", + "kind": "array", + "type": { + "$ref": "1129" + }, + "value": [ + { + "$id": "5445", + "kind": "string", + "type": { + "$ref": "1130" + }, + "value": "nlc" + } + ] + }, + "topics": { + "$id": "5446", + "kind": "array", + "type": { + "$ref": "1134" + }, + "value": [ + { + "$id": "5447", + "kind": "string", + "type": { + "$ref": "1135" + }, + "value": "wvuca" + } + ] + } + } + } + ] + }, + "principals": { + "$id": "5448", + "kind": "model", + "type": { + "$ref": "1141" + }, + "value": { + "$id": "5449", + "attributes": { + "$id": "5450", + "kind": "array", + "type": { + "$ref": "1143" + }, + "value": [ + { + "$id": "5451", + "kind": "dict", + "type": { + "$ref": "1144" + }, + "value": { + "$id": "5452", + "key5526": { + "$id": "5453", + "kind": "string", + "type": { + "$ref": "1146" + }, + "value": "nydhzdhbldygqcn" + } + } + } + ] + }, + "clientIds": { + "$id": "5454", + "kind": "array", + "type": { + "$ref": "1150" + }, + "value": [ + { + "$id": "5455", + "kind": "string", + "type": { + "$ref": "1151" + }, + "value": "smopeaeddsygz" + } + ] + }, + "usernames": { + "$id": "5456", + "kind": "array", + "type": { + "$ref": "1155" + }, + "value": [ + { + "$id": "5457", + "kind": "string", + "type": { + "$ref": "1156" + }, + "value": "iozngyqndrteikszkbasinzdjtm" + } + ] + } + } + }, + "stateStoreResources": { + "$id": "5458", + "kind": "array", + "type": { + "$ref": "1162" + }, + "value": [ + { + "$id": "5459", + "kind": "model", + "type": { + "$ref": "1163" + }, + "value": { + "$id": "5460", + "keyType": { + "$id": "5461", + "kind": "string", + "type": { + "$ref": "166" + }, + "value": "Pattern" + }, + "keys": { + "$id": "5462", + "kind": "array", + "type": { + "$ref": "1168" + }, + "value": [ + { + "$id": "5463", + "kind": "string", + "type": { + "$ref": "1169" + }, + "value": "tkounsqtwvzyaklxjqoerpu" + } + ] + }, + "method": { + "$id": "5464", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "Read" + } + } + } + ] + } + } + } + ] + } + } + }, + "provisioningState": { + "$id": "5465", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "5466", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "5467", + "name": { + "$id": "5468", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "5469", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "5470", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123/authorizations/resource-name123" + }, + "name": { + "$id": "5471", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "anqrqsvrjmlvzkrbuav" + }, + "type": { + "$id": "5472", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "yjlsfarshqoxojvgmy" + }, + "systemData": { + "$id": "5473", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "5474", + "createdBy": { + "$id": "5475", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "5476", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "5477", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "5478", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "5479", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "5480", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "5481", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "5482", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5483", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "5484", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5485", + "name": "brokerName", + "nameInRequest": "brokerName", + "doc": "Name of broker.", + "type": { + "$id": "5486", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5487", + "name": "authorizationName", + "nameInRequest": "authorizationName", + "doc": "Name of Instance broker authorization resource", + "type": { + "$id": "5488", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5489", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "5413" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "5490", + "type": { + "$ref": "1111" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthorization.get" + }, + { + "$id": "5491", + "kind": "lro", + "name": "createOrUpdate", + "accessibility": "public", + "apiVersions": [ + "2024-11-01", + "2025-04-01" + ], + "doc": "Create a BrokerAuthorizationResource", + "operation": { + "$id": "5492", + "name": "createOrUpdate", + "resourceName": "BrokerAuthorizationResource", + "doc": "Create a BrokerAuthorizationResource", + "accessibility": "public", + "parameters": [ + { + "$id": "5493", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "5494", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "5495", + "type": { + "$id": "5496", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-04-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5497", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "5498", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "5499", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5500", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "5501", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5502", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "5503", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5504", + "name": "brokerName", + "nameInRequest": "brokerName", + "doc": "Name of broker.", + "type": { + "$id": "5505", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5506", + "name": "authorizationName", + "nameInRequest": "authorizationName", + "doc": "Name of Instance broker authorization resource", + "type": { + "$id": "5507", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5508", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "5509", + "kind": "constant", + "valueType": { + "$id": "5510", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5511", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "5512", + "kind": "constant", + "valueType": { + "$id": "5513", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5514", + "name": "resource", + "nameInRequest": "resource", + "doc": "Resource create parameters.", + "type": { + "$ref": "1111" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "5515", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1111" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + { + "$id": "5516", + "statusCodes": [ + 201 + ], + "bodyType": { + "$ref": "1111" + }, + "headers": [ + { + "$id": "5517", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "5518", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "5519", + "name": "retryAfter", + "nameInResponse": "Retry-After", + "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "type": { + "$id": "5520", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "PUT", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/brokers/{brokerName}/authorizations/{authorizationName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "longRunning": { + "$id": "5521", + "finalStateVia": 0, + "finalResponse": { + "$id": "5522", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1111" + } + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthorization.createOrUpdate", + "decorators": [], + "examples": [ + { + "$id": "5523", + "kind": "http", + "name": "BrokerAuthorization_CreateOrUpdate_Complex", + "description": "BrokerAuthorization_CreateOrUpdate_Complex", + "filePath": "2025-04-01/BrokerAuthorization_CreateOrUpdate_Complex.json", + "parameters": [ + { + "$id": "5524", + "parameter": { + "$ref": "5493" + }, + "value": { + "$id": "5525", + "kind": "string", + "type": { + "$ref": "5494" + }, + "value": "2025-04-01" + } + }, + { + "$id": "5526", + "parameter": { + "$ref": "5497" + }, + "value": { + "$id": "5527", + "kind": "string", + "type": { + "$ref": "5498" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "5528", + "parameter": { + "$ref": "5500" + }, + "value": { + "$id": "5529", + "kind": "string", + "type": { + "$ref": "5501" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "5530", + "parameter": { + "$ref": "5502" + }, + "value": { + "$id": "5531", + "kind": "string", + "type": { + "$ref": "5503" + }, + "value": "resource-name123" + } + }, + { + "$id": "5532", + "parameter": { + "$ref": "5504" + }, + "value": { + "$id": "5533", + "kind": "string", + "type": { + "$ref": "5505" + }, + "value": "resource-name123" + } + }, + { + "$id": "5534", + "parameter": { + "$ref": "5506" + }, + "value": { + "$id": "5535", + "kind": "string", + "type": { + "$ref": "5507" + }, + "value": "resource-name123" + } + }, + { + "$id": "5536", + "parameter": { + "$ref": "5514" + }, + "value": { + "$id": "5537", + "kind": "model", + "type": { + "$ref": "1111" + }, + "value": { + "$id": "5538", + "properties": { + "$id": "5539", + "kind": "model", + "type": { + "$ref": "1113" + }, + "value": { + "$id": "5540", + "authorizationPolicies": { + "$id": "5541", + "kind": "model", + "type": { + "$ref": "1115" + }, + "value": { + "$id": "5542", + "cache": { + "$id": "5543", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "rules": { + "$id": "5544", + "kind": "array", + "type": { + "$ref": "1120" + }, + "value": [ + { + "$id": "5545", + "kind": "model", + "type": { + "$ref": "1121" + }, + "value": { + "$id": "5546", + "principals": { + "$id": "5547", + "kind": "model", + "type": { + "$ref": "1141" + }, + "value": { + "$id": "5548", + "usernames": { + "$id": "5549", + "kind": "array", + "type": { + "$ref": "1155" + }, + "value": [ + { + "$id": "5550", + "kind": "string", + "type": { + "$ref": "1156" + }, + "value": "temperature-sensor" + }, + { + "$id": "5551", + "kind": "string", + "type": { + "$ref": "1156" + }, + "value": "humidity-sensor" + } + ] + }, + "attributes": { + "$id": "5552", + "kind": "array", + "type": { + "$ref": "1143" + }, + "value": [ + { + "$id": "5553", + "kind": "dict", + "type": { + "$ref": "1144" + }, + "value": { + "$id": "5554", + "building": { + "$id": "5555", + "kind": "string", + "type": { + "$ref": "1146" + }, + "value": "17" + }, + "organization": { + "$id": "5556", + "kind": "string", + "type": { + "$ref": "1146" + }, + "value": "contoso" + } + } + } + ] + } + } + }, + "brokerResources": { + "$id": "5557", + "kind": "array", + "type": { + "$ref": "1123" + }, + "value": [ + { + "$id": "5558", + "kind": "model", + "type": { + "$ref": "1124" + }, + "value": { + "$id": "5559", + "method": { + "$id": "5560", + "kind": "string", + "type": { + "$ref": "158" + }, + "value": "Connect" + }, + "clientIds": { + "$id": "5561", + "kind": "array", + "type": { + "$ref": "1129" + }, + "value": [ + { + "$id": "5562", + "kind": "string", + "type": { + "$ref": "1130" + }, + "value": "{principal.attributes.building}*" + } + ] + } + } + }, + { + "$id": "5563", + "kind": "model", + "type": { + "$ref": "1124" + }, + "value": { + "$id": "5564", + "method": { + "$id": "5565", + "kind": "string", + "type": { + "$ref": "158" + }, + "value": "Publish" + }, + "topics": { + "$id": "5566", + "kind": "array", + "type": { + "$ref": "1134" + }, + "value": [ + { + "$id": "5567", + "kind": "string", + "type": { + "$ref": "1135" + }, + "value": "sensors/{principal.attributes.building}/{principal.clientId}/telemetry/*" + } + ] + } + } + }, + { + "$id": "5568", + "kind": "model", + "type": { + "$ref": "1124" + }, + "value": { + "$id": "5569", + "method": { + "$id": "5570", + "kind": "string", + "type": { + "$ref": "158" + }, + "value": "Subscribe" + }, + "topics": { + "$id": "5571", + "kind": "array", + "type": { + "$ref": "1134" + }, + "value": [ + { + "$id": "5572", + "kind": "string", + "type": { + "$ref": "1135" + }, + "value": "commands/{principal.attributes.organization}" + } + ] + } + } + } + ] + }, + "stateStoreResources": { + "$id": "5573", + "kind": "array", + "type": { + "$ref": "1162" + }, + "value": [ + { + "$id": "5574", + "kind": "model", + "type": { + "$ref": "1163" + }, + "value": { + "$id": "5575", + "method": { + "$id": "5576", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "Read" + }, + "keyType": { + "$id": "5577", + "kind": "string", + "type": { + "$ref": "166" + }, + "value": "Pattern" + }, + "keys": { + "$id": "5578", + "kind": "array", + "type": { + "$ref": "1168" + }, + "value": [ + { + "$id": "5579", + "kind": "string", + "type": { + "$ref": "1169" + }, + "value": "myreadkey" + }, + { + "$id": "5580", + "kind": "string", + "type": { + "$ref": "1169" + }, + "value": "myotherkey?" + }, + { + "$id": "5581", + "kind": "string", + "type": { + "$ref": "1169" + }, + "value": "mynumerickeysuffix[0-9]" + }, + { + "$id": "5582", + "kind": "string", + "type": { + "$ref": "1169" + }, + "value": "clients:{principal.clientId}:*" + } + ] + } + } + }, + { + "$id": "5583", + "kind": "model", + "type": { + "$ref": "1163" + }, + "value": { + "$id": "5584", + "method": { + "$id": "5585", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "ReadWrite" + }, + "keyType": { + "$id": "5586", + "kind": "string", + "type": { + "$ref": "166" + }, + "value": "Binary" + }, + "keys": { + "$id": "5587", + "kind": "array", + "type": { + "$ref": "1168" + }, + "value": [ + { + "$id": "5588", + "kind": "string", + "type": { + "$ref": "1169" + }, + "value": "MTE2IDEwMSAxMTUgMTE2" + } + ] + } + } + } + ] + } + } + } + ] + } + } + } + } + }, + "extendedLocation": { + "$id": "5589", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "5590", + "name": { + "$id": "5591", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "5592", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "5593", + "response": { + "$ref": "5515" + }, + "statusCode": 200, + "bodyValue": { + "$id": "5594", + "kind": "model", + "type": { + "$ref": "1111" + }, + "value": { + "$id": "5595", + "properties": { + "$id": "5596", + "kind": "model", + "type": { + "$ref": "1113" + }, + "value": { + "$id": "5597", + "authorizationPolicies": { + "$id": "5598", + "kind": "model", + "type": { + "$ref": "1115" + }, + "value": { + "$id": "5599", + "cache": { + "$id": "5600", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "rules": { + "$id": "5601", + "kind": "array", + "type": { + "$ref": "1120" + }, + "value": [ + { + "$id": "5602", + "kind": "model", + "type": { + "$ref": "1121" + }, + "value": { + "$id": "5603", + "principals": { + "$id": "5604", + "kind": "model", + "type": { + "$ref": "1141" + }, + "value": { + "$id": "5605", + "usernames": { + "$id": "5606", + "kind": "array", + "type": { + "$ref": "1155" + }, + "value": [ + { + "$id": "5607", + "kind": "string", + "type": { + "$ref": "1156" + }, + "value": "temperature-sensor" + }, + { + "$id": "5608", + "kind": "string", + "type": { + "$ref": "1156" + }, + "value": "humidity-sensor" + } + ] + }, + "attributes": { + "$id": "5609", + "kind": "array", + "type": { + "$ref": "1143" + }, + "value": [ + { + "$id": "5610", + "kind": "dict", + "type": { + "$ref": "1144" + }, + "value": { + "$id": "5611", + "building": { + "$id": "5612", + "kind": "string", + "type": { + "$ref": "1146" + }, + "value": "17" + }, + "organization": { + "$id": "5613", + "kind": "string", + "type": { + "$ref": "1146" + }, + "value": "contoso" + } + } + } + ] + } + } + }, + "brokerResources": { + "$id": "5614", + "kind": "array", + "type": { + "$ref": "1123" + }, + "value": [ + { + "$id": "5615", + "kind": "model", + "type": { + "$ref": "1124" + }, + "value": { + "$id": "5616", + "method": { + "$id": "5617", + "kind": "string", + "type": { + "$ref": "158" + }, + "value": "Connect" + }, + "clientIds": { + "$id": "5618", + "kind": "array", + "type": { + "$ref": "1129" + }, + "value": [ + { + "$id": "5619", + "kind": "string", + "type": { + "$ref": "1130" + }, + "value": "{principal.attributes.building}*" + } + ] + } + } + }, + { + "$id": "5620", + "kind": "model", + "type": { + "$ref": "1124" + }, + "value": { + "$id": "5621", + "method": { + "$id": "5622", + "kind": "string", + "type": { + "$ref": "158" + }, + "value": "Publish" + }, + "topics": { + "$id": "5623", + "kind": "array", + "type": { + "$ref": "1134" + }, + "value": [ + { + "$id": "5624", + "kind": "string", + "type": { + "$ref": "1135" + }, + "value": "sensors/{principal.attributes.building}/{principal.clientId}/telemetry/*" + } + ] + } + } + }, + { + "$id": "5625", + "kind": "model", + "type": { + "$ref": "1124" + }, + "value": { + "$id": "5626", + "method": { + "$id": "5627", + "kind": "string", + "type": { + "$ref": "158" + }, + "value": "Subscribe" + }, + "topics": { + "$id": "5628", + "kind": "array", + "type": { + "$ref": "1134" + }, + "value": [ + { + "$id": "5629", + "kind": "string", + "type": { + "$ref": "1135" + }, + "value": "commands/{principal.attributes.organization}" + } + ] + } + } + } + ] + }, + "stateStoreResources": { + "$id": "5630", + "kind": "array", + "type": { + "$ref": "1162" + }, + "value": [ + { + "$id": "5631", + "kind": "model", + "type": { + "$ref": "1163" + }, + "value": { + "$id": "5632", + "method": { + "$id": "5633", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "Read" + }, + "keyType": { + "$id": "5634", + "kind": "string", + "type": { + "$ref": "166" + }, + "value": "Pattern" + }, + "keys": { + "$id": "5635", + "kind": "array", + "type": { + "$ref": "1168" + }, + "value": [ + { + "$id": "5636", + "kind": "string", + "type": { + "$ref": "1169" + }, + "value": "myreadkey" + }, + { + "$id": "5637", + "kind": "string", + "type": { + "$ref": "1169" + }, + "value": "myotherkey?" + }, + { + "$id": "5638", + "kind": "string", + "type": { + "$ref": "1169" + }, + "value": "mynumerickeysuffix[0-9]" + }, + { + "$id": "5639", + "kind": "string", + "type": { + "$ref": "1169" + }, + "value": "clients:{principal.clientId}:*" + } + ] + } + } + }, + { + "$id": "5640", + "kind": "model", + "type": { + "$ref": "1163" + }, + "value": { + "$id": "5641", + "method": { + "$id": "5642", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "ReadWrite" + }, + "keyType": { + "$id": "5643", + "kind": "string", + "type": { + "$ref": "166" + }, + "value": "Binary" + }, + "keys": { + "$id": "5644", + "kind": "array", + "type": { + "$ref": "1168" + }, + "value": [ + { + "$id": "5645", + "kind": "string", + "type": { + "$ref": "1169" + }, + "value": "MTE2IDEwMSAxMTUgMTE2" + } + ] + } + } + } + ] + } + } + } + ] + } + } + }, + "provisioningState": { + "$id": "5646", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "5647", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "5648", + "name": { + "$id": "5649", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "5650", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "5651", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123/authorizations/resource-name123" + }, + "name": { + "$id": "5652", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "anqrqsvrjmlvzkrbuav" + }, + "type": { + "$id": "5653", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "yjlsfarshqoxojvgmy" + }, + "systemData": { + "$id": "5654", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "5655", + "createdBy": { + "$id": "5656", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "5657", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "5658", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "5659", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "5660", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "5661", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "5662", + "response": { + "$ref": "5516" + }, + "statusCode": 201, + "bodyValue": { + "$id": "5663", + "kind": "model", + "type": { + "$ref": "1111" + }, + "value": { + "$id": "5664", + "properties": { + "$id": "5665", + "kind": "model", + "type": { + "$ref": "1113" + }, + "value": { + "$id": "5666", + "authorizationPolicies": { + "$id": "5667", + "kind": "model", + "type": { + "$ref": "1115" + }, + "value": { + "$id": "5668", + "cache": { + "$id": "5669", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "rules": { + "$id": "5670", + "kind": "array", + "type": { + "$ref": "1120" + }, + "value": [ + { + "$id": "5671", + "kind": "model", + "type": { + "$ref": "1121" + }, + "value": { + "$id": "5672", + "principals": { + "$id": "5673", + "kind": "model", + "type": { + "$ref": "1141" + }, + "value": { + "$id": "5674", + "usernames": { + "$id": "5675", + "kind": "array", + "type": { + "$ref": "1155" + }, + "value": [ + { + "$id": "5676", + "kind": "string", + "type": { + "$ref": "1156" + }, + "value": "temperature-sensor" + }, + { + "$id": "5677", + "kind": "string", + "type": { + "$ref": "1156" + }, + "value": "humidity-sensor" + } + ] + }, + "attributes": { + "$id": "5678", + "kind": "array", + "type": { + "$ref": "1143" + }, + "value": [ + { + "$id": "5679", + "kind": "dict", + "type": { + "$ref": "1144" + }, + "value": { + "$id": "5680", + "building": { + "$id": "5681", + "kind": "string", + "type": { + "$ref": "1146" + }, + "value": "17" + }, + "organization": { + "$id": "5682", + "kind": "string", + "type": { + "$ref": "1146" + }, + "value": "contoso" + } + } + } + ] + } + } + }, + "brokerResources": { + "$id": "5683", + "kind": "array", + "type": { + "$ref": "1123" + }, + "value": [ + { + "$id": "5684", + "kind": "model", + "type": { + "$ref": "1124" + }, + "value": { + "$id": "5685", + "method": { + "$id": "5686", + "kind": "string", + "type": { + "$ref": "158" + }, + "value": "Connect" + }, + "clientIds": { + "$id": "5687", + "kind": "array", + "type": { + "$ref": "1129" + }, + "value": [ + { + "$id": "5688", + "kind": "string", + "type": { + "$ref": "1130" + }, + "value": "{principal.attributes.building}*" + } + ] + } + } + }, + { + "$id": "5689", + "kind": "model", + "type": { + "$ref": "1124" + }, + "value": { + "$id": "5690", + "method": { + "$id": "5691", + "kind": "string", + "type": { + "$ref": "158" + }, + "value": "Publish" + }, + "topics": { + "$id": "5692", + "kind": "array", + "type": { + "$ref": "1134" + }, + "value": [ + { + "$id": "5693", + "kind": "string", + "type": { + "$ref": "1135" + }, + "value": "sensors/{principal.attributes.building}/{principal.clientId}/telemetry/*" + } + ] + } + } + }, + { + "$id": "5694", + "kind": "model", + "type": { + "$ref": "1124" + }, + "value": { + "$id": "5695", + "method": { + "$id": "5696", + "kind": "string", + "type": { + "$ref": "158" + }, + "value": "Subscribe" + }, + "topics": { + "$id": "5697", + "kind": "array", + "type": { + "$ref": "1134" + }, + "value": [ + { + "$id": "5698", + "kind": "string", + "type": { + "$ref": "1135" + }, + "value": "commands/{principal.attributes.organization}" + } + ] + } + } + } + ] + }, + "stateStoreResources": { + "$id": "5699", + "kind": "array", + "type": { + "$ref": "1162" + }, + "value": [ + { + "$id": "5700", + "kind": "model", + "type": { + "$ref": "1163" + }, + "value": { + "$id": "5701", + "method": { + "$id": "5702", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "Read" + }, + "keyType": { + "$id": "5703", + "kind": "string", + "type": { + "$ref": "166" + }, + "value": "Pattern" + }, + "keys": { + "$id": "5704", + "kind": "array", + "type": { + "$ref": "1168" + }, + "value": [ + { + "$id": "5705", + "kind": "string", + "type": { + "$ref": "1169" + }, + "value": "myreadkey" + }, + { + "$id": "5706", + "kind": "string", + "type": { + "$ref": "1169" + }, + "value": "myotherkey?" + }, + { + "$id": "5707", + "kind": "string", + "type": { + "$ref": "1169" + }, + "value": "mynumerickeysuffix[0-9]" + }, + { + "$id": "5708", + "kind": "string", + "type": { + "$ref": "1169" + }, + "value": "clients:{principal.clientId}:*" + } + ] + } + } + }, + { + "$id": "5709", + "kind": "model", + "type": { + "$ref": "1163" + }, + "value": { + "$id": "5710", + "method": { + "$id": "5711", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "ReadWrite" + }, + "keyType": { + "$id": "5712", + "kind": "string", + "type": { + "$ref": "166" + }, + "value": "Binary" + }, + "keys": { + "$id": "5713", + "kind": "array", + "type": { + "$ref": "1168" + }, + "value": [ + { + "$id": "5714", + "kind": "string", + "type": { + "$ref": "1169" + }, + "value": "MTE2IDEwMSAxMTUgMTE2" + } + ] + } + } + } + ] + } + } + } + ] + } + } + }, + "provisioningState": { + "$id": "5715", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "5716", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "5717", + "name": { + "$id": "5718", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "5719", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "5720", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123/authorizations/resource-name123" + }, + "name": { + "$id": "5721", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "anqrqsvrjmlvzkrbuav" + }, + "type": { + "$id": "5722", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "yjlsfarshqoxojvgmy" + }, + "systemData": { + "$id": "5723", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "5724", + "createdBy": { + "$id": "5725", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "5726", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "5727", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "5728", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "5729", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "5730", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + }, + { + "$id": "5731", + "kind": "http", + "name": "BrokerAuthorization_CreateOrUpdate", + "description": "BrokerAuthorization_CreateOrUpdate", + "filePath": "2025-04-01/BrokerAuthorization_CreateOrUpdate_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "5732", + "parameter": { + "$ref": "5493" + }, + "value": { + "$id": "5733", + "kind": "string", + "type": { + "$ref": "5494" + }, + "value": "2025-04-01" + } + }, + { + "$id": "5734", + "parameter": { + "$ref": "5497" + }, + "value": { + "$id": "5735", + "kind": "string", + "type": { + "$ref": "5498" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "5736", + "parameter": { + "$ref": "5500" + }, + "value": { + "$id": "5737", + "kind": "string", + "type": { + "$ref": "5501" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "5738", + "parameter": { + "$ref": "5502" + }, + "value": { + "$id": "5739", + "kind": "string", + "type": { + "$ref": "5503" + }, + "value": "resource-name123" + } + }, + { + "$id": "5740", + "parameter": { + "$ref": "5504" + }, + "value": { + "$id": "5741", + "kind": "string", + "type": { + "$ref": "5505" + }, + "value": "resource-name123" + } + }, + { + "$id": "5742", + "parameter": { + "$ref": "5506" + }, + "value": { + "$id": "5743", + "kind": "string", + "type": { + "$ref": "5507" + }, + "value": "resource-name123" + } + }, + { + "$id": "5744", + "parameter": { + "$ref": "5514" + }, + "value": { + "$id": "5745", + "kind": "model", + "type": { + "$ref": "1111" + }, + "value": { + "$id": "5746", + "properties": { + "$id": "5747", + "kind": "model", + "type": { + "$ref": "1113" + }, + "value": { + "$id": "5748", + "authorizationPolicies": { + "$id": "5749", + "kind": "model", + "type": { + "$ref": "1115" + }, + "value": { + "$id": "5750", + "cache": { + "$id": "5751", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "rules": { + "$id": "5752", + "kind": "array", + "type": { + "$ref": "1120" + }, + "value": [ + { + "$id": "5753", + "kind": "model", + "type": { + "$ref": "1121" + }, + "value": { + "$id": "5754", + "brokerResources": { + "$id": "5755", + "kind": "array", + "type": { + "$ref": "1123" + }, + "value": [ + { + "$id": "5756", + "kind": "model", + "type": { + "$ref": "1124" + }, + "value": { + "$id": "5757", + "method": { + "$id": "5758", + "kind": "string", + "type": { + "$ref": "158" + }, + "value": "Connect" + }, + "clientIds": { + "$id": "5759", + "kind": "array", + "type": { + "$ref": "1129" + }, + "value": [ + { + "$id": "5760", + "kind": "string", + "type": { + "$ref": "1130" + }, + "value": "nlc" + } + ] + }, + "topics": { + "$id": "5761", + "kind": "array", + "type": { + "$ref": "1134" + }, + "value": [ + { + "$id": "5762", + "kind": "string", + "type": { + "$ref": "1135" + }, + "value": "wvuca" + } + ] + } + } + } + ] + }, + "principals": { + "$id": "5763", + "kind": "model", + "type": { + "$ref": "1141" + }, + "value": { + "$id": "5764", + "attributes": { + "$id": "5765", + "kind": "array", + "type": { + "$ref": "1143" + }, + "value": [ + { + "$id": "5766", + "kind": "dict", + "type": { + "$ref": "1144" + }, + "value": { + "$id": "5767", + "key5526": { + "$id": "5768", + "kind": "string", + "type": { + "$ref": "1146" + }, + "value": "nydhzdhbldygqcn" + } + } + } + ] + }, + "clientIds": { + "$id": "5769", + "kind": "array", + "type": { + "$ref": "1150" + }, + "value": [ + { + "$id": "5770", + "kind": "string", + "type": { + "$ref": "1151" + }, + "value": "smopeaeddsygz" + } + ] + }, + "usernames": { + "$id": "5771", + "kind": "array", + "type": { + "$ref": "1155" + }, + "value": [ + { + "$id": "5772", + "kind": "string", + "type": { + "$ref": "1156" + }, + "value": "iozngyqndrteikszkbasinzdjtm" + } + ] + } + } + }, + "stateStoreResources": { + "$id": "5773", + "kind": "array", + "type": { + "$ref": "1162" + }, + "value": [ + { + "$id": "5774", + "kind": "model", + "type": { + "$ref": "1163" + }, + "value": { + "$id": "5775", + "keyType": { + "$id": "5776", + "kind": "string", + "type": { + "$ref": "166" + }, + "value": "Pattern" + }, + "keys": { + "$id": "5777", + "kind": "array", + "type": { + "$ref": "1168" + }, + "value": [ + { + "$id": "5778", + "kind": "string", + "type": { + "$ref": "1169" + }, + "value": "tkounsqtwvzyaklxjqoerpu" + } + ] + }, + "method": { + "$id": "5779", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "Read" + } + } + } + ] + } + } + } + ] + } + } + } + } + }, + "extendedLocation": { + "$id": "5780", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "5781", + "name": { + "$id": "5782", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "5783", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "5784", + "response": { + "$ref": "5515" + }, + "statusCode": 200, + "bodyValue": { + "$id": "5785", + "kind": "model", + "type": { + "$ref": "1111" + }, + "value": { + "$id": "5786", + "properties": { + "$id": "5787", + "kind": "model", + "type": { + "$ref": "1113" + }, + "value": { + "$id": "5788", + "authorizationPolicies": { + "$id": "5789", + "kind": "model", + "type": { + "$ref": "1115" + }, + "value": { + "$id": "5790", + "cache": { + "$id": "5791", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "rules": { + "$id": "5792", + "kind": "array", + "type": { + "$ref": "1120" + }, + "value": [ + { + "$id": "5793", + "kind": "model", + "type": { + "$ref": "1121" + }, + "value": { + "$id": "5794", + "brokerResources": { + "$id": "5795", + "kind": "array", + "type": { + "$ref": "1123" + }, + "value": [ + { + "$id": "5796", + "kind": "model", + "type": { + "$ref": "1124" + }, + "value": { + "$id": "5797", + "method": { + "$id": "5798", + "kind": "string", + "type": { + "$ref": "158" + }, + "value": "Connect" + }, + "clientIds": { + "$id": "5799", + "kind": "array", + "type": { + "$ref": "1129" + }, + "value": [ + { + "$id": "5800", + "kind": "string", + "type": { + "$ref": "1130" + }, + "value": "nlc" + } + ] + }, + "topics": { + "$id": "5801", + "kind": "array", + "type": { + "$ref": "1134" + }, + "value": [ + { + "$id": "5802", + "kind": "string", + "type": { + "$ref": "1135" + }, + "value": "wvuca" + } + ] + } + } + } + ] + }, + "principals": { + "$id": "5803", + "kind": "model", + "type": { + "$ref": "1141" + }, + "value": { + "$id": "5804", + "attributes": { + "$id": "5805", + "kind": "array", + "type": { + "$ref": "1143" + }, + "value": [ + { + "$id": "5806", + "kind": "dict", + "type": { + "$ref": "1144" + }, + "value": { + "$id": "5807", + "key5526": { + "$id": "5808", + "kind": "string", + "type": { + "$ref": "1146" + }, + "value": "nydhzdhbldygqcn" + } + } + } + ] + }, + "clientIds": { + "$id": "5809", + "kind": "array", + "type": { + "$ref": "1150" + }, + "value": [ + { + "$id": "5810", + "kind": "string", + "type": { + "$ref": "1151" + }, + "value": "smopeaeddsygz" + } + ] + }, + "usernames": { + "$id": "5811", + "kind": "array", + "type": { + "$ref": "1155" + }, + "value": [ + { + "$id": "5812", + "kind": "string", + "type": { + "$ref": "1156" + }, + "value": "iozngyqndrteikszkbasinzdjtm" + } + ] + } + } + }, + "stateStoreResources": { + "$id": "5813", + "kind": "array", + "type": { + "$ref": "1162" + }, + "value": [ + { + "$id": "5814", + "kind": "model", + "type": { + "$ref": "1163" + }, + "value": { + "$id": "5815", + "keyType": { + "$id": "5816", + "kind": "string", + "type": { + "$ref": "166" + }, + "value": "Pattern" + }, + "keys": { + "$id": "5817", + "kind": "array", + "type": { + "$ref": "1168" + }, + "value": [ + { + "$id": "5818", + "kind": "string", + "type": { + "$ref": "1169" + }, + "value": "tkounsqtwvzyaklxjqoerpu" + } + ] + }, + "method": { + "$id": "5819", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "Read" + } + } + } + ] + } + } + } + ] + } + } + }, + "provisioningState": { + "$id": "5820", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "5821", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "5822", + "name": { + "$id": "5823", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "5824", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "5825", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123/authorizations/resource-name123" + }, + "name": { + "$id": "5826", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "anqrqsvrjmlvzkrbuav" + }, + "type": { + "$id": "5827", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "yjlsfarshqoxojvgmy" + }, + "systemData": { + "$id": "5828", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "5829", + "createdBy": { + "$id": "5830", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "5831", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "5832", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "5833", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "5834", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "5835", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "5836", + "response": { + "$ref": "5516" + }, + "statusCode": 201, + "bodyValue": { + "$id": "5837", + "kind": "model", + "type": { + "$ref": "1111" + }, + "value": { + "$id": "5838", + "properties": { + "$id": "5839", + "kind": "model", + "type": { + "$ref": "1113" + }, + "value": { + "$id": "5840", + "authorizationPolicies": { + "$id": "5841", + "kind": "model", + "type": { + "$ref": "1115" + }, + "value": { + "$id": "5842", + "cache": { + "$id": "5843", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "rules": { + "$id": "5844", + "kind": "array", + "type": { + "$ref": "1120" + }, + "value": [ + { + "$id": "5845", + "kind": "model", + "type": { + "$ref": "1121" + }, + "value": { + "$id": "5846", + "brokerResources": { + "$id": "5847", + "kind": "array", + "type": { + "$ref": "1123" + }, + "value": [ + { + "$id": "5848", + "kind": "model", + "type": { + "$ref": "1124" + }, + "value": { + "$id": "5849", + "method": { + "$id": "5850", + "kind": "string", + "type": { + "$ref": "158" + }, + "value": "Connect" + }, + "clientIds": { + "$id": "5851", + "kind": "array", + "type": { + "$ref": "1129" + }, + "value": [ + { + "$id": "5852", + "kind": "string", + "type": { + "$ref": "1130" + }, + "value": "nlc" + } + ] + }, + "topics": { + "$id": "5853", + "kind": "array", + "type": { + "$ref": "1134" + }, + "value": [ + { + "$id": "5854", + "kind": "string", + "type": { + "$ref": "1135" + }, + "value": "wvuca" + } + ] + } + } + } + ] + }, + "principals": { + "$id": "5855", + "kind": "model", + "type": { + "$ref": "1141" + }, + "value": { + "$id": "5856", + "attributes": { + "$id": "5857", + "kind": "array", + "type": { + "$ref": "1143" + }, + "value": [ + { + "$id": "5858", + "kind": "dict", + "type": { + "$ref": "1144" + }, + "value": { + "$id": "5859", + "key5526": { + "$id": "5860", + "kind": "string", + "type": { + "$ref": "1146" + }, + "value": "nydhzdhbldygqcn" + } + } + } + ] + }, + "clientIds": { + "$id": "5861", + "kind": "array", + "type": { + "$ref": "1150" + }, + "value": [ + { + "$id": "5862", + "kind": "string", + "type": { + "$ref": "1151" + }, + "value": "smopeaeddsygz" + } + ] + }, + "usernames": { + "$id": "5863", + "kind": "array", + "type": { + "$ref": "1155" + }, + "value": [ + { + "$id": "5864", + "kind": "string", + "type": { + "$ref": "1156" + }, + "value": "iozngyqndrteikszkbasinzdjtm" + } + ] + } + } + }, + "stateStoreResources": { + "$id": "5865", + "kind": "array", + "type": { + "$ref": "1162" + }, + "value": [ + { + "$id": "5866", + "kind": "model", + "type": { + "$ref": "1163" + }, + "value": { + "$id": "5867", + "keyType": { + "$id": "5868", + "kind": "string", + "type": { + "$ref": "166" + }, + "value": "Pattern" + }, + "keys": { + "$id": "5869", + "kind": "array", + "type": { + "$ref": "1168" + }, + "value": [ + { + "$id": "5870", + "kind": "string", + "type": { + "$ref": "1169" + }, + "value": "tkounsqtwvzyaklxjqoerpu" + } + ] + }, + "method": { + "$id": "5871", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "Read" + } + } + } + ] + } + } + } + ] + } + } + }, + "provisioningState": { + "$id": "5872", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "5873", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "5874", + "name": { + "$id": "5875", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "5876", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "5877", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123/authorizations/resource-name123" + }, + "name": { + "$id": "5878", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "anqrqsvrjmlvzkrbuav" + }, + "type": { + "$id": "5879", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "yjlsfarshqoxojvgmy" + }, + "systemData": { + "$id": "5880", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "5881", + "createdBy": { + "$id": "5882", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "5883", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "5884", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "5885", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "5886", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "5887", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + }, + { + "$id": "5888", + "kind": "http", + "name": "BrokerAuthorization_CreateOrUpdate_Simple", + "description": "BrokerAuthorization_CreateOrUpdate_Simple", + "filePath": "2025-04-01/BrokerAuthorization_CreateOrUpdate_Simple.json", + "parameters": [ + { + "$id": "5889", + "parameter": { + "$ref": "5493" + }, + "value": { + "$id": "5890", + "kind": "string", + "type": { + "$ref": "5494" + }, + "value": "2025-04-01" + } + }, + { + "$id": "5891", + "parameter": { + "$ref": "5497" + }, + "value": { + "$id": "5892", + "kind": "string", + "type": { + "$ref": "5498" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "5893", + "parameter": { + "$ref": "5500" + }, + "value": { + "$id": "5894", + "kind": "string", + "type": { + "$ref": "5501" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "5895", + "parameter": { + "$ref": "5502" + }, + "value": { + "$id": "5896", + "kind": "string", + "type": { + "$ref": "5503" + }, + "value": "resource-name123" + } + }, + { + "$id": "5897", + "parameter": { + "$ref": "5504" + }, + "value": { + "$id": "5898", + "kind": "string", + "type": { + "$ref": "5505" + }, + "value": "resource-name123" + } + }, + { + "$id": "5899", + "parameter": { + "$ref": "5506" + }, + "value": { + "$id": "5900", + "kind": "string", + "type": { + "$ref": "5507" + }, + "value": "resource-name123" + } + }, + { + "$id": "5901", + "parameter": { + "$ref": "5514" + }, + "value": { + "$id": "5902", + "kind": "model", + "type": { + "$ref": "1111" + }, + "value": { + "$id": "5903", + "properties": { + "$id": "5904", + "kind": "model", + "type": { + "$ref": "1113" + }, + "value": { + "$id": "5905", + "authorizationPolicies": { + "$id": "5906", + "kind": "model", + "type": { + "$ref": "1115" + }, + "value": { + "$id": "5907", + "cache": { + "$id": "5908", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "rules": { + "$id": "5909", + "kind": "array", + "type": { + "$ref": "1120" + }, + "value": [ + { + "$id": "5910", + "kind": "model", + "type": { + "$ref": "1121" + }, + "value": { + "$id": "5911", + "principals": { + "$id": "5912", + "kind": "model", + "type": { + "$ref": "1141" + }, + "value": { + "$id": "5913", + "clientIds": { + "$id": "5914", + "kind": "array", + "type": { + "$ref": "1150" + }, + "value": [ + { + "$id": "5915", + "kind": "string", + "type": { + "$ref": "1151" + }, + "value": "my-client-id" + } + ] + }, + "attributes": { + "$id": "5916", + "kind": "array", + "type": { + "$ref": "1143" + }, + "value": [ + { + "$id": "5917", + "kind": "dict", + "type": { + "$ref": "1144" + }, + "value": { + "$id": "5918", + "floor": { + "$id": "5919", + "kind": "string", + "type": { + "$ref": "1146" + }, + "value": "floor1" + }, + "site": { + "$id": "5920", + "kind": "string", + "type": { + "$ref": "1146" + }, + "value": "site1" + } + } + } + ] + } + } + }, + "brokerResources": { + "$id": "5921", + "kind": "array", + "type": { + "$ref": "1123" + }, + "value": [ + { + "$id": "5922", + "kind": "model", + "type": { + "$ref": "1124" + }, + "value": { + "$id": "5923", + "method": { + "$id": "5924", + "kind": "string", + "type": { + "$ref": "158" + }, + "value": "Connect" + } + } + }, + { + "$id": "5925", + "kind": "model", + "type": { + "$ref": "1124" + }, + "value": { + "$id": "5926", + "method": { + "$id": "5927", + "kind": "string", + "type": { + "$ref": "158" + }, + "value": "Subscribe" + }, + "topics": { + "$id": "5928", + "kind": "array", + "type": { + "$ref": "1134" + }, + "value": [ + { + "$id": "5929", + "kind": "string", + "type": { + "$ref": "1135" + }, + "value": "topic" + }, + { + "$id": "5930", + "kind": "string", + "type": { + "$ref": "1135" + }, + "value": "topic/with/wildcard/#" + } + ] + } + } + } + ] + }, + "stateStoreResources": { + "$id": "5931", + "kind": "array", + "type": { + "$ref": "1162" + }, + "value": [ + { + "$id": "5932", + "kind": "model", + "type": { + "$ref": "1163" + }, + "value": { + "$id": "5933", + "method": { + "$id": "5934", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "ReadWrite" + }, + "keyType": { + "$id": "5935", + "kind": "string", + "type": { + "$ref": "166" + }, + "value": "Pattern" + }, + "keys": { + "$id": "5936", + "kind": "array", + "type": { + "$ref": "1168" + }, + "value": [ + { + "$id": "5937", + "kind": "string", + "type": { + "$ref": "1169" + }, + "value": "*" + } + ] + } + } + } + ] + } + } + } + ] + } + } + } + } + }, + "extendedLocation": { + "$id": "5938", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "5939", + "name": { + "$id": "5940", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "5941", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "5942", + "response": { + "$ref": "5515" + }, + "statusCode": 200, + "bodyValue": { + "$id": "5943", + "kind": "model", + "type": { + "$ref": "1111" + }, + "value": { + "$id": "5944", + "properties": { + "$id": "5945", + "kind": "model", + "type": { + "$ref": "1113" + }, + "value": { + "$id": "5946", + "authorizationPolicies": { + "$id": "5947", + "kind": "model", + "type": { + "$ref": "1115" + }, + "value": { + "$id": "5948", + "cache": { + "$id": "5949", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "rules": { + "$id": "5950", + "kind": "array", + "type": { + "$ref": "1120" + }, + "value": [ + { + "$id": "5951", + "kind": "model", + "type": { + "$ref": "1121" + }, + "value": { + "$id": "5952", + "principals": { + "$id": "5953", + "kind": "model", + "type": { + "$ref": "1141" + }, + "value": { + "$id": "5954", + "clientIds": { + "$id": "5955", + "kind": "array", + "type": { + "$ref": "1150" + }, + "value": [ + { + "$id": "5956", + "kind": "string", + "type": { + "$ref": "1151" + }, + "value": "my-client-id" + } + ] + }, + "attributes": { + "$id": "5957", + "kind": "array", + "type": { + "$ref": "1143" + }, + "value": [ + { + "$id": "5958", + "kind": "dict", + "type": { + "$ref": "1144" + }, + "value": { + "$id": "5959", + "floor": { + "$id": "5960", + "kind": "string", + "type": { + "$ref": "1146" + }, + "value": "floor1" + }, + "site": { + "$id": "5961", + "kind": "string", + "type": { + "$ref": "1146" + }, + "value": "site1" + } + } + } + ] + } + } + }, + "brokerResources": { + "$id": "5962", + "kind": "array", + "type": { + "$ref": "1123" + }, + "value": [ + { + "$id": "5963", + "kind": "model", + "type": { + "$ref": "1124" + }, + "value": { + "$id": "5964", + "method": { + "$id": "5965", + "kind": "string", + "type": { + "$ref": "158" + }, + "value": "Connect" + } + } + }, + { + "$id": "5966", + "kind": "model", + "type": { + "$ref": "1124" + }, + "value": { + "$id": "5967", + "method": { + "$id": "5968", + "kind": "string", + "type": { + "$ref": "158" + }, + "value": "Subscribe" + }, + "topics": { + "$id": "5969", + "kind": "array", + "type": { + "$ref": "1134" + }, + "value": [ + { + "$id": "5970", + "kind": "string", + "type": { + "$ref": "1135" + }, + "value": "topic" + }, + { + "$id": "5971", + "kind": "string", + "type": { + "$ref": "1135" + }, + "value": "topic/with/wildcard/#" + } + ] + } + } + } + ] + }, + "stateStoreResources": { + "$id": "5972", + "kind": "array", + "type": { + "$ref": "1162" + }, + "value": [ + { + "$id": "5973", + "kind": "model", + "type": { + "$ref": "1163" + }, + "value": { + "$id": "5974", + "method": { + "$id": "5975", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "ReadWrite" + }, + "keyType": { + "$id": "5976", + "kind": "string", + "type": { + "$ref": "166" + }, + "value": "Pattern" + }, + "keys": { + "$id": "5977", + "kind": "array", + "type": { + "$ref": "1168" + }, + "value": [ + { + "$id": "5978", + "kind": "string", + "type": { + "$ref": "1169" + }, + "value": "*" + } + ] + } + } + } + ] + } + } + } + ] + } + } + }, + "provisioningState": { + "$id": "5979", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "5980", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "5981", + "name": { + "$id": "5982", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "5983", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "5984", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123/authorizations/resource-name123" + }, + "name": { + "$id": "5985", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "anqrqsvrjmlvzkrbuav" + }, + "type": { + "$id": "5986", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "yjlsfarshqoxojvgmy" + }, + "systemData": { + "$id": "5987", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "5988", + "createdBy": { + "$id": "5989", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "5990", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "5991", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "5992", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "5993", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "5994", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "5995", + "response": { + "$ref": "5516" + }, + "statusCode": 201, + "bodyValue": { + "$id": "5996", + "kind": "model", + "type": { + "$ref": "1111" + }, + "value": { + "$id": "5997", + "properties": { + "$id": "5998", + "kind": "model", + "type": { + "$ref": "1113" + }, + "value": { + "$id": "5999", + "authorizationPolicies": { + "$id": "6000", + "kind": "model", + "type": { + "$ref": "1115" + }, + "value": { + "$id": "6001", + "cache": { + "$id": "6002", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "rules": { + "$id": "6003", + "kind": "array", + "type": { + "$ref": "1120" + }, + "value": [ + { + "$id": "6004", + "kind": "model", + "type": { + "$ref": "1121" + }, + "value": { + "$id": "6005", + "principals": { + "$id": "6006", + "kind": "model", + "type": { + "$ref": "1141" + }, + "value": { + "$id": "6007", + "clientIds": { + "$id": "6008", + "kind": "array", + "type": { + "$ref": "1150" + }, + "value": [ + { + "$id": "6009", + "kind": "string", + "type": { + "$ref": "1151" + }, + "value": "my-client-id" + } + ] + }, + "attributes": { + "$id": "6010", + "kind": "array", + "type": { + "$ref": "1143" + }, + "value": [ + { + "$id": "6011", + "kind": "dict", + "type": { + "$ref": "1144" + }, + "value": { + "$id": "6012", + "floor": { + "$id": "6013", + "kind": "string", + "type": { + "$ref": "1146" + }, + "value": "floor1" + }, + "site": { + "$id": "6014", + "kind": "string", + "type": { + "$ref": "1146" + }, + "value": "site1" + } + } + } + ] + } + } + }, + "brokerResources": { + "$id": "6015", + "kind": "array", + "type": { + "$ref": "1123" + }, + "value": [ + { + "$id": "6016", + "kind": "model", + "type": { + "$ref": "1124" + }, + "value": { + "$id": "6017", + "method": { + "$id": "6018", + "kind": "string", + "type": { + "$ref": "158" + }, + "value": "Connect" + } + } + }, + { + "$id": "6019", + "kind": "model", + "type": { + "$ref": "1124" + }, + "value": { + "$id": "6020", + "method": { + "$id": "6021", + "kind": "string", + "type": { + "$ref": "158" + }, + "value": "Subscribe" + }, + "topics": { + "$id": "6022", + "kind": "array", + "type": { + "$ref": "1134" + }, + "value": [ + { + "$id": "6023", + "kind": "string", + "type": { + "$ref": "1135" + }, + "value": "topic" + }, + { + "$id": "6024", + "kind": "string", + "type": { + "$ref": "1135" + }, + "value": "topic/with/wildcard/#" + } + ] + } + } + } + ] + }, + "stateStoreResources": { + "$id": "6025", + "kind": "array", + "type": { + "$ref": "1162" + }, + "value": [ + { + "$id": "6026", + "kind": "model", + "type": { + "$ref": "1163" + }, + "value": { + "$id": "6027", + "method": { + "$id": "6028", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "ReadWrite" + }, + "keyType": { + "$id": "6029", + "kind": "string", + "type": { + "$ref": "166" + }, + "value": "Pattern" + }, + "keys": { + "$id": "6030", + "kind": "array", + "type": { + "$ref": "1168" + }, + "value": [ + { + "$id": "6031", + "kind": "string", + "type": { + "$ref": "1169" + }, + "value": "*" + } + ] + } + } + } + ] + } + } + } + ] + } + } + }, + "provisioningState": { + "$id": "6032", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "6033", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "6034", + "name": { + "$id": "6035", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "6036", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "6037", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123/authorizations/resource-name123" + }, + "name": { + "$id": "6038", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "anqrqsvrjmlvzkrbuav" + }, + "type": { + "$id": "6039", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "yjlsfarshqoxojvgmy" + }, + "systemData": { + "$id": "6040", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "6041", + "createdBy": { + "$id": "6042", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "6043", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "6044", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "6045", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "6046", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "6047", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "6048", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "6049", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6050", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "6051", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6052", + "name": "brokerName", + "nameInRequest": "brokerName", + "doc": "Name of broker.", + "type": { + "$id": "6053", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6054", + "name": "authorizationName", + "nameInRequest": "authorizationName", + "doc": "Name of Instance broker authorization resource", + "type": { + "$id": "6055", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6056", + "name": "resource", + "nameInRequest": "resource", + "doc": "Resource create parameters.", + "type": { + "$ref": "1111" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6057", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "6058", + "kind": "constant", + "valueType": { + "$id": "6059", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6060", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "6061", + "kind": "constant", + "valueType": { + "$id": "6062", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "6063", + "type": { + "$ref": "1111" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthorization.createOrUpdate" + }, + { + "$id": "6064", + "kind": "lro", + "name": "delete", + "accessibility": "public", + "apiVersions": [ + "2024-11-01", + "2025-04-01" + ], + "doc": "Delete a BrokerAuthorizationResource", + "operation": { + "$id": "6065", + "name": "delete", + "resourceName": "BrokerAuthorizationResource", + "doc": "Delete a BrokerAuthorizationResource", + "accessibility": "public", + "parameters": [ + { + "$id": "6066", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "6067", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "6068", + "type": { + "$id": "6069", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-04-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6070", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "6071", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "6072", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6073", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "6074", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6075", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "6076", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6077", + "name": "brokerName", + "nameInRequest": "brokerName", + "doc": "Name of broker.", + "type": { + "$id": "6078", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6079", + "name": "authorizationName", + "nameInRequest": "authorizationName", + "doc": "Name of Instance broker authorization resource", + "type": { + "$id": "6080", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6081", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "6082", + "kind": "constant", + "valueType": { + "$id": "6083", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "6084", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "6085", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "6086", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "6087", + "name": "retryAfter", + "nameInResponse": "Retry-After", + "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "type": { + "$id": "6088", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false + }, + { + "$id": "6089", + "statusCodes": [ + 204 + ], + "headers": [], + "isErrorResponse": false + } + ], + "httpMethod": "DELETE", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/brokers/{brokerName}/authorizations/{authorizationName}", + "bufferResponse": true, + "longRunning": { + "$id": "6090", + "finalStateVia": 1, + "finalResponse": { + "$id": "6091", + "statusCodes": [ + 204 + ] + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthorization.delete", + "decorators": [], + "examples": [ + { + "$id": "6092", + "kind": "http", + "name": "BrokerAuthorization_Delete", + "description": "BrokerAuthorization_Delete", + "filePath": "2025-04-01/BrokerAuthorization_Delete_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "6093", + "parameter": { + "$ref": "6066" + }, + "value": { + "$id": "6094", + "kind": "string", + "type": { + "$ref": "6067" + }, + "value": "2025-04-01" + } + }, + { + "$id": "6095", + "parameter": { + "$ref": "6070" + }, + "value": { + "$id": "6096", + "kind": "string", + "type": { + "$ref": "6071" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "6097", + "parameter": { + "$ref": "6073" + }, + "value": { + "$id": "6098", + "kind": "string", + "type": { + "$ref": "6074" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "6099", + "parameter": { + "$ref": "6075" + }, + "value": { + "$id": "6100", + "kind": "string", + "type": { + "$ref": "6076" + }, + "value": "resource-name123" + } + }, + { + "$id": "6101", + "parameter": { + "$ref": "6077" + }, + "value": { + "$id": "6102", + "kind": "string", + "type": { + "$ref": "6078" + }, + "value": "resource-name123" + } + }, + { + "$id": "6103", + "parameter": { + "$ref": "6079" + }, + "value": { + "$id": "6104", + "kind": "string", + "type": { + "$ref": "6080" + }, + "value": "resource-name123" + } + } + ], + "responses": [ + { + "$id": "6105", + "response": { + "$ref": "6084" + }, + "statusCode": 202 + }, + { + "$id": "6106", + "response": { + "$ref": "6089" + }, + "statusCode": 204 + } + ] + } + ] + }, + "parameters": [ + { + "$id": "6107", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "6108", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6109", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "6110", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6111", + "name": "brokerName", + "nameInRequest": "brokerName", + "doc": "Name of broker.", + "type": { + "$id": "6112", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6113", + "name": "authorizationName", + "nameInRequest": "authorizationName", + "doc": "Name of Instance broker authorization resource", + "type": { + "$id": "6114", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6115", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "6116", + "kind": "constant", + "valueType": { + "$id": "6117", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "6118" + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthorization.delete" + }, + { + "$id": "6119", + "kind": "paging", + "name": "listByResourceGroup", + "accessibility": "public", + "apiVersions": [ + "2024-11-01", + "2025-04-01" + ], + "doc": "List BrokerAuthorizationResource resources by BrokerResource", + "operation": { + "$id": "6120", + "name": "listByResourceGroup", + "resourceName": "BrokerAuthorizationResource", + "doc": "List BrokerAuthorizationResource resources by BrokerResource", + "accessibility": "public", + "parameters": [ + { + "$id": "6121", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "6122", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "6123", + "type": { + "$id": "6124", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-04-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6125", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "6126", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "6127", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6128", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "6129", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6130", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "6131", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6132", + "name": "brokerName", + "nameInRequest": "brokerName", + "doc": "Name of broker.", + "type": { + "$id": "6133", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6134", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "6135", + "kind": "constant", + "valueType": { + "$id": "6136", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "6137", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1191" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/brokers/{brokerName}/authorizations", + "bufferResponse": true, + "paging": { + "$id": "6138", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "6139", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthorization.listByResourceGroup", + "decorators": [], + "examples": [ + { + "$id": "6140", + "kind": "http", + "name": "BrokerAuthorization_ListByResourceGroup", + "description": "BrokerAuthorization_ListByResourceGroup", + "filePath": "2025-04-01/BrokerAuthorization_ListByResourceGroup_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "6141", + "parameter": { + "$ref": "6121" + }, + "value": { + "$id": "6142", + "kind": "string", + "type": { + "$ref": "6122" + }, + "value": "2025-04-01" + } + }, + { + "$id": "6143", + "parameter": { + "$ref": "6125" + }, + "value": { + "$id": "6144", + "kind": "string", + "type": { + "$ref": "6126" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "6145", + "parameter": { + "$ref": "6128" + }, + "value": { + "$id": "6146", + "kind": "string", + "type": { + "$ref": "6129" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "6147", + "parameter": { + "$ref": "6130" + }, + "value": { + "$id": "6148", + "kind": "string", + "type": { + "$ref": "6131" + }, + "value": "resource-name123" + } + }, + { + "$id": "6149", + "parameter": { + "$ref": "6132" + }, + "value": { + "$id": "6150", + "kind": "string", + "type": { + "$ref": "6133" + }, + "value": "resource-name123" + } + } + ], + "responses": [ + { + "$id": "6151", + "response": { + "$ref": "6137" + }, + "statusCode": 200, + "bodyValue": { + "$id": "6152", + "kind": "model", + "type": { + "$ref": "1191" + }, + "value": { + "$id": "6153", + "value": { + "$id": "6154", + "kind": "array", + "type": { + "$ref": "1193" + }, + "value": [ + { + "$id": "6155", + "kind": "model", + "type": { + "$ref": "1111" + }, + "value": { + "$id": "6156", + "properties": { + "$id": "6157", + "kind": "model", + "type": { + "$ref": "1113" + }, + "value": { + "$id": "6158", + "authorizationPolicies": { + "$id": "6159", + "kind": "model", + "type": { + "$ref": "1115" + }, + "value": { + "$id": "6160", + "cache": { + "$id": "6161", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "rules": { + "$id": "6162", + "kind": "array", + "type": { + "$ref": "1120" + }, + "value": [ + { + "$id": "6163", + "kind": "model", + "type": { + "$ref": "1121" + }, + "value": { + "$id": "6164", + "brokerResources": { + "$id": "6165", + "kind": "array", + "type": { + "$ref": "1123" + }, + "value": [ + { + "$id": "6166", + "kind": "model", + "type": { + "$ref": "1124" + }, + "value": { + "$id": "6167", + "method": { + "$id": "6168", + "kind": "string", + "type": { + "$ref": "158" + }, + "value": "Connect" + }, + "clientIds": { + "$id": "6169", + "kind": "array", + "type": { + "$ref": "1129" + }, + "value": [ + { + "$id": "6170", + "kind": "string", + "type": { + "$ref": "1130" + }, + "value": "nlc" + } + ] + }, + "topics": { + "$id": "6171", + "kind": "array", + "type": { + "$ref": "1134" + }, + "value": [ + { + "$id": "6172", + "kind": "string", + "type": { + "$ref": "1135" + }, + "value": "wvuca" + } + ] + } + } + } + ] + }, + "principals": { + "$id": "6173", + "kind": "model", + "type": { + "$ref": "1141" + }, + "value": { + "$id": "6174", + "attributes": { + "$id": "6175", + "kind": "array", + "type": { + "$ref": "1143" + }, + "value": [ + { + "$id": "6176", + "kind": "dict", + "type": { + "$ref": "1144" + }, + "value": { + "$id": "6177", + "key5526": { + "$id": "6178", + "kind": "string", + "type": { + "$ref": "1146" + }, + "value": "nydhzdhbldygqcn" + } + } + } + ] + }, + "clientIds": { + "$id": "6179", + "kind": "array", + "type": { + "$ref": "1150" + }, + "value": [ + { + "$id": "6180", + "kind": "string", + "type": { + "$ref": "1151" + }, + "value": "smopeaeddsygz" + } + ] + }, + "usernames": { + "$id": "6181", + "kind": "array", + "type": { + "$ref": "1155" + }, + "value": [ + { + "$id": "6182", + "kind": "string", + "type": { + "$ref": "1156" + }, + "value": "iozngyqndrteikszkbasinzdjtm" + } + ] + } + } + }, + "stateStoreResources": { + "$id": "6183", + "kind": "array", + "type": { + "$ref": "1162" + }, + "value": [ + { + "$id": "6184", + "kind": "model", + "type": { + "$ref": "1163" + }, + "value": { + "$id": "6185", + "keyType": { + "$id": "6186", + "kind": "string", + "type": { + "$ref": "166" + }, + "value": "Pattern" + }, + "keys": { + "$id": "6187", + "kind": "array", + "type": { + "$ref": "1168" + }, + "value": [ + { + "$id": "6188", + "kind": "string", + "type": { + "$ref": "1169" + }, + "value": "tkounsqtwvzyaklxjqoerpu" + } + ] + }, + "method": { + "$id": "6189", + "kind": "string", + "type": { + "$ref": "174" + }, + "value": "Read" + } + } + } + ] + } + } + } + ] + } + } + }, + "provisioningState": { + "$id": "6190", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "6191", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "6192", + "name": { + "$id": "6193", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "6194", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "6195", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/brokers/resource-name123/authorizations/resource-name123" + }, + "name": { + "$id": "6196", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "anqrqsvrjmlvzkrbuav" + }, + "type": { + "$id": "6197", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "yjlsfarshqoxojvgmy" + }, + "systemData": { + "$id": "6198", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "6199", + "createdBy": { + "$id": "6200", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "6201", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "6202", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "6203", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "6204", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "6205", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + ] + }, + "nextLink": { + "$id": "6206", + "kind": "string", + "type": { + "$ref": "1197" + }, + "value": "https://microsoft.com/a" + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "6207", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "6208", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6209", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "6210", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6211", + "name": "brokerName", + "nameInRequest": "brokerName", + "doc": "Name of broker.", + "type": { + "$id": "6212", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6213", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "6135" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "6214", + "type": { + "$id": "6215", + "kind": "array", + "name": "ArrayBrokerAuthorizationResource", + "valueType": { + "$ref": "1111" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "resultSegments": [ + "value" + ] + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthorization.listByResourceGroup" + } + ], + "parameters": [ + { + "$id": "6216", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "6217", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "location": "Uri", + "isApiVersion": false, + "isContentType": false, + "isRequired": true, + "isEndpoint": true, + "skipUrlEncoding": false, + "explode": false, + "kind": "Client", + "defaultValue": { + "$id": "6218", + "type": { + "$id": "6219", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "6220", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "6221" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.BrokerAuthorization", + "apiVersions": [ + "2024-11-01", + "2025-04-01" + ], + "parent": { + "$ref": "1710" + } + }, + { + "$id": "6222", + "kind": "client", + "name": "DataflowProfile", + "namespace": "Azure.ResourceManager.IotOperations", + "methods": [ + { + "$id": "6223", + "kind": "basic", + "name": "get", + "accessibility": "public", + "apiVersions": [ + "2024-11-01", + "2025-04-01" + ], + "doc": "Get a DataflowProfileResource", + "operation": { + "$id": "6224", + "name": "get", + "resourceName": "DataflowProfileResource", + "doc": "Get a DataflowProfileResource", + "accessibility": "public", + "parameters": [ + { + "$id": "6225", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "6226", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "6227", + "type": { + "$id": "6228", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-04-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6229", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "6230", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "6231", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6232", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "6233", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6234", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "6235", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6236", + "name": "dataflowProfileName", + "nameInRequest": "dataflowProfileName", + "doc": "Name of Instance dataflowProfile resource", + "type": { + "$id": "6237", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6238", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "6239", + "kind": "constant", + "valueType": { + "$id": "6240", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "6241", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1201" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/dataflowProfiles/{dataflowProfileName}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowProfile.get", + "decorators": [], + "examples": [ + { + "$id": "6242", + "kind": "http", + "name": "DataflowProfile_Get", + "description": "DataflowProfile_Get", + "filePath": "2025-04-01/DataflowProfile_Get_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "6243", + "parameter": { + "$ref": "6225" + }, + "value": { + "$id": "6244", + "kind": "string", + "type": { + "$ref": "6226" + }, + "value": "2025-04-01" + } + }, + { + "$id": "6245", + "parameter": { + "$ref": "6229" + }, + "value": { + "$id": "6246", + "kind": "string", + "type": { + "$ref": "6230" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "6247", + "parameter": { + "$ref": "6232" + }, + "value": { + "$id": "6248", + "kind": "string", + "type": { + "$ref": "6233" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "6249", + "parameter": { + "$ref": "6234" + }, + "value": { + "$id": "6250", + "kind": "string", + "type": { + "$ref": "6235" + }, + "value": "resource-name123" + } + }, + { + "$id": "6251", + "parameter": { + "$ref": "6236" + }, + "value": { + "$id": "6252", + "kind": "string", + "type": { + "$ref": "6237" + }, + "value": "resource-name123" + } + } + ], + "responses": [ + { + "$id": "6253", + "response": { + "$ref": "6241" + }, + "statusCode": 200, + "bodyValue": { + "$id": "6254", + "kind": "model", + "type": { + "$ref": "1201" + }, + "value": { + "$id": "6255", + "properties": { + "$id": "6256", + "kind": "model", + "type": { + "$ref": "1203" + }, + "value": { + "$id": "6257", + "diagnostics": { + "$id": "6258", + "kind": "model", + "type": { + "$ref": "1205" + }, + "value": { + "$id": "6259", + "logs": { + "$id": "6260", + "kind": "model", + "type": { + "$ref": "706" + }, + "value": { + "$id": "6261", + "level": { + "$id": "6262", + "kind": "string", + "type": { + "$ref": "708" + }, + "value": "rnmwokumdmebpmfxxxzvvjfdywotav" + } + } + }, + "metrics": { + "$id": "6263", + "kind": "model", + "type": { + "$ref": "714" + }, + "value": { + "$id": "6264", + "prometheusPort": { + "$id": "6265", + "kind": "number", + "type": { + "$ref": "716" + }, + "value": 7581 + } + } + } + } + }, + "instanceCount": { + "$id": "6266", + "kind": "number", + "type": { + "$ref": "1215" + }, + "value": 14 + }, + "provisioningState": { + "$id": "6267", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "6268", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "6269", + "name": { + "$id": "6270", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "6271", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "6272", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123" + }, + "name": { + "$id": "6273", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "bwhcjsnnfnrmbixamyxjau" + }, + "type": { + "$id": "6274", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "ejvancsomtbapgztnerhlvx" + }, + "systemData": { + "$id": "6275", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "6276", + "createdBy": { + "$id": "6277", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "6278", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "6279", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "6280", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "6281", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "6282", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "6283", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "6284", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6285", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "6286", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6287", + "name": "dataflowProfileName", + "nameInRequest": "dataflowProfileName", + "doc": "Name of Instance dataflowProfile resource", + "type": { + "$id": "6288", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6289", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "6239" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "6290", + "type": { + "$ref": "1201" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowProfile.get" + }, + { + "$id": "6291", + "kind": "lro", + "name": "createOrUpdate", + "accessibility": "public", + "apiVersions": [ + "2024-11-01", + "2025-04-01" + ], + "doc": "Create a DataflowProfileResource", + "operation": { + "$id": "6292", + "name": "createOrUpdate", + "resourceName": "DataflowProfileResource", + "doc": "Create a DataflowProfileResource", + "accessibility": "public", + "parameters": [ + { + "$id": "6293", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "6294", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "6295", + "type": { + "$id": "6296", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-04-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6297", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "6298", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "6299", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6300", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "6301", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6302", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "6303", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6304", + "name": "dataflowProfileName", + "nameInRequest": "dataflowProfileName", + "doc": "Name of Instance dataflowProfile resource", + "type": { + "$id": "6305", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6306", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "6307", + "kind": "constant", + "valueType": { + "$id": "6308", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6309", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "6310", + "kind": "constant", + "valueType": { + "$id": "6311", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6312", + "name": "resource", + "nameInRequest": "resource", + "doc": "Resource create parameters.", + "type": { + "$ref": "1201" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "6313", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1201" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + { + "$id": "6314", + "statusCodes": [ + 201 + ], + "bodyType": { + "$ref": "1201" + }, + "headers": [ + { + "$id": "6315", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "6316", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "6317", + "name": "retryAfter", + "nameInResponse": "Retry-After", + "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "type": { + "$id": "6318", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "PUT", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/dataflowProfiles/{dataflowProfileName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "longRunning": { + "$id": "6319", + "finalStateVia": 0, + "finalResponse": { + "$id": "6320", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1201" + } + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowProfile.createOrUpdate", + "decorators": [], + "examples": [ + { + "$id": "6321", + "kind": "http", + "name": "DataflowProfile_CreateOrUpdate", + "description": "DataflowProfile_CreateOrUpdate", + "filePath": "2025-04-01/DataflowProfile_CreateOrUpdate_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "6322", + "parameter": { + "$ref": "6293" + }, + "value": { + "$id": "6323", + "kind": "string", + "type": { + "$ref": "6294" + }, + "value": "2025-04-01" + } + }, + { + "$id": "6324", + "parameter": { + "$ref": "6297" + }, + "value": { + "$id": "6325", + "kind": "string", + "type": { + "$ref": "6298" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "6326", + "parameter": { + "$ref": "6300" + }, + "value": { + "$id": "6327", + "kind": "string", + "type": { + "$ref": "6301" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "6328", + "parameter": { + "$ref": "6302" + }, + "value": { + "$id": "6329", + "kind": "string", + "type": { + "$ref": "6303" + }, + "value": "resource-name123" + } + }, + { + "$id": "6330", + "parameter": { + "$ref": "6304" + }, + "value": { + "$id": "6331", + "kind": "string", + "type": { + "$ref": "6305" + }, + "value": "resource-name123" + } + }, + { + "$id": "6332", + "parameter": { + "$ref": "6312" + }, + "value": { + "$id": "6333", + "kind": "model", + "type": { + "$ref": "1201" + }, + "value": { + "$id": "6334", + "properties": { + "$id": "6335", + "kind": "model", + "type": { + "$ref": "1203" + }, + "value": { + "$id": "6336", + "diagnostics": { + "$id": "6337", + "kind": "model", + "type": { + "$ref": "1205" + }, + "value": { + "$id": "6338", + "logs": { + "$id": "6339", + "kind": "model", + "type": { + "$ref": "706" + }, + "value": { + "$id": "6340", + "level": { + "$id": "6341", + "kind": "string", + "type": { + "$ref": "708" + }, + "value": "rnmwokumdmebpmfxxxzvvjfdywotav" + } + } + }, + "metrics": { + "$id": "6342", + "kind": "model", + "type": { + "$ref": "714" + }, + "value": { + "$id": "6343", + "prometheusPort": { + "$id": "6344", + "kind": "number", + "type": { + "$ref": "716" + }, + "value": 7581 + } + } + } + } + }, + "instanceCount": { + "$id": "6345", + "kind": "number", + "type": { + "$ref": "1215" + }, + "value": 14 + } + } + }, + "extendedLocation": { + "$id": "6346", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "6347", + "name": { + "$id": "6348", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "6349", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "6350", + "response": { + "$ref": "6313" + }, + "statusCode": 200, + "bodyValue": { + "$id": "6351", + "kind": "model", + "type": { + "$ref": "1201" + }, + "value": { + "$id": "6352", + "properties": { + "$id": "6353", + "kind": "model", + "type": { + "$ref": "1203" + }, + "value": { + "$id": "6354", + "diagnostics": { + "$id": "6355", + "kind": "model", + "type": { + "$ref": "1205" + }, + "value": { + "$id": "6356", + "logs": { + "$id": "6357", + "kind": "model", + "type": { + "$ref": "706" + }, + "value": { + "$id": "6358", + "level": { + "$id": "6359", + "kind": "string", + "type": { + "$ref": "708" + }, + "value": "rnmwokumdmebpmfxxxzvvjfdywotav" + } + } + }, + "metrics": { + "$id": "6360", + "kind": "model", + "type": { + "$ref": "714" + }, + "value": { + "$id": "6361", + "prometheusPort": { + "$id": "6362", + "kind": "number", + "type": { + "$ref": "716" + }, + "value": 7581 + } + } + } + } + }, + "instanceCount": { + "$id": "6363", + "kind": "number", + "type": { + "$ref": "1215" + }, + "value": 14 + }, + "provisioningState": { + "$id": "6364", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "6365", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "6366", + "name": { + "$id": "6367", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "6368", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "6369", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123" + }, + "name": { + "$id": "6370", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "bwhcjsnnfnrmbixamyxjau" + }, + "type": { + "$id": "6371", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "ejvancsomtbapgztnerhlvx" + }, + "systemData": { + "$id": "6372", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "6373", + "createdBy": { + "$id": "6374", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "6375", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "6376", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "6377", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "6378", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "6379", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "6380", + "response": { + "$ref": "6314" + }, + "statusCode": 201, + "bodyValue": { + "$id": "6381", + "kind": "model", + "type": { + "$ref": "1201" + }, + "value": { + "$id": "6382", + "properties": { + "$id": "6383", + "kind": "model", + "type": { + "$ref": "1203" + }, + "value": { + "$id": "6384", + "diagnostics": { + "$id": "6385", + "kind": "model", + "type": { + "$ref": "1205" + }, + "value": { + "$id": "6386", + "logs": { + "$id": "6387", + "kind": "model", + "type": { + "$ref": "706" + }, + "value": { + "$id": "6388", + "level": { + "$id": "6389", + "kind": "string", + "type": { + "$ref": "708" + }, + "value": "rnmwokumdmebpmfxxxzvvjfdywotav" + } + } + }, + "metrics": { + "$id": "6390", + "kind": "model", + "type": { + "$ref": "714" + }, + "value": { + "$id": "6391", + "prometheusPort": { + "$id": "6392", + "kind": "number", + "type": { + "$ref": "716" + }, + "value": 7581 + } + } + } + } + }, + "instanceCount": { + "$id": "6393", + "kind": "number", + "type": { + "$ref": "1215" + }, + "value": 14 + }, + "provisioningState": { + "$id": "6394", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "6395", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "6396", + "name": { + "$id": "6397", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "6398", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "6399", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123" + }, + "name": { + "$id": "6400", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "bwhcjsnnfnrmbixamyxjau" + }, + "type": { + "$id": "6401", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "ejvancsomtbapgztnerhlvx" + }, + "systemData": { + "$id": "6402", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "6403", + "createdBy": { + "$id": "6404", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "6405", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "6406", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "6407", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "6408", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "6409", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + }, + { + "$id": "6410", + "kind": "http", + "name": "DataflowProfile_CreateOrUpdate_Minimal", + "description": "DataflowProfile_CreateOrUpdate_Minimal", + "filePath": "2025-04-01/DataflowProfile_CreateOrUpdate_Minimal.json", + "parameters": [ + { + "$id": "6411", + "parameter": { + "$ref": "6293" + }, + "value": { + "$id": "6412", + "kind": "string", + "type": { + "$ref": "6294" + }, + "value": "2025-04-01" + } + }, + { + "$id": "6413", + "parameter": { + "$ref": "6297" + }, + "value": { + "$id": "6414", + "kind": "string", + "type": { + "$ref": "6298" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "6415", + "parameter": { + "$ref": "6300" + }, + "value": { + "$id": "6416", + "kind": "string", + "type": { + "$ref": "6301" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "6417", + "parameter": { + "$ref": "6302" + }, + "value": { + "$id": "6418", + "kind": "string", + "type": { + "$ref": "6303" + }, + "value": "resource-name123" + } + }, + { + "$id": "6419", + "parameter": { + "$ref": "6304" + }, + "value": { + "$id": "6420", + "kind": "string", + "type": { + "$ref": "6305" + }, + "value": "aio-dataflowprofile" + } + }, + { + "$id": "6421", + "parameter": { + "$ref": "6312" + }, + "value": { + "$id": "6422", + "kind": "model", + "type": { + "$ref": "1201" + }, + "value": { + "$id": "6423", + "properties": { + "$id": "6424", + "kind": "model", + "type": { + "$ref": "1203" + }, + "value": { + "$id": "6425", + "instanceCount": { + "$id": "6426", + "kind": "number", + "type": { + "$ref": "1215" + }, + "value": 1 + } + } + }, + "extendedLocation": { + "$id": "6427", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "6428", + "name": { + "$id": "6429", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "6430", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "6431", + "response": { + "$ref": "6313" + }, + "statusCode": 200, + "bodyValue": { + "$id": "6432", + "kind": "model", + "type": { + "$ref": "1201" + }, + "value": { + "$id": "6433", + "properties": { + "$id": "6434", + "kind": "model", + "type": { + "$ref": "1203" + }, + "value": { + "$id": "6435", + "instanceCount": { + "$id": "6436", + "kind": "number", + "type": { + "$ref": "1215" + }, + "value": 1 + }, + "provisioningState": { + "$id": "6437", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "6438", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "6439", + "name": { + "$id": "6440", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "6441", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "6442", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123" + }, + "name": { + "$id": "6443", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "bwhcjsnnfnrmbixamyxjau" + }, + "type": { + "$id": "6444", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "ejvancsomtbapgztnerhlvx" + }, + "systemData": { + "$id": "6445", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "6446", + "createdBy": { + "$id": "6447", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "6448", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "6449", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "6450", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "6451", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "6452", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "6453", + "response": { + "$ref": "6314" + }, + "statusCode": 201, + "bodyValue": { + "$id": "6454", + "kind": "model", + "type": { + "$ref": "1201" + }, + "value": { + "$id": "6455", + "properties": { + "$id": "6456", + "kind": "model", + "type": { + "$ref": "1203" + }, + "value": { + "$id": "6457", + "instanceCount": { + "$id": "6458", + "kind": "number", + "type": { + "$ref": "1215" + }, + "value": 1 + }, + "provisioningState": { + "$id": "6459", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "6460", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "6461", + "name": { + "$id": "6462", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "6463", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "6464", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123" + }, + "name": { + "$id": "6465", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "bwhcjsnnfnrmbixamyxjau" + }, + "type": { + "$id": "6466", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "ejvancsomtbapgztnerhlvx" + }, + "systemData": { + "$id": "6467", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "6468", + "createdBy": { + "$id": "6469", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "6470", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "6471", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "6472", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "6473", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "6474", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + }, + { + "$id": "6475", + "kind": "http", + "name": "DataflowProfile_CreateOrUpdate_Multi", + "description": "DataflowProfile_CreateOrUpdate_Multi", + "filePath": "2025-04-01/DataflowProfile_CreateOrUpdate_Multi.json", + "parameters": [ + { + "$id": "6476", + "parameter": { + "$ref": "6293" + }, + "value": { + "$id": "6477", + "kind": "string", + "type": { + "$ref": "6294" + }, + "value": "2025-04-01" + } + }, + { + "$id": "6478", + "parameter": { + "$ref": "6297" + }, + "value": { + "$id": "6479", + "kind": "string", + "type": { + "$ref": "6298" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "6480", + "parameter": { + "$ref": "6300" + }, + "value": { + "$id": "6481", + "kind": "string", + "type": { + "$ref": "6301" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "6482", + "parameter": { + "$ref": "6302" + }, + "value": { + "$id": "6483", + "kind": "string", + "type": { + "$ref": "6303" + }, + "value": "resource-name123" + } + }, + { + "$id": "6484", + "parameter": { + "$ref": "6304" + }, + "value": { + "$id": "6485", + "kind": "string", + "type": { + "$ref": "6305" + }, + "value": "aio-dataflowprofile" + } + }, + { + "$id": "6486", + "parameter": { + "$ref": "6312" + }, + "value": { + "$id": "6487", + "kind": "model", + "type": { + "$ref": "1201" + }, + "value": { + "$id": "6488", + "properties": { + "$id": "6489", + "kind": "model", + "type": { + "$ref": "1203" + }, + "value": { + "$id": "6490", + "instanceCount": { + "$id": "6491", + "kind": "number", + "type": { + "$ref": "1215" + }, + "value": 3 + } + } + }, + "extendedLocation": { + "$id": "6492", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "6493", + "name": { + "$id": "6494", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "6495", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "6496", + "response": { + "$ref": "6313" + }, + "statusCode": 200, + "bodyValue": { + "$id": "6497", + "kind": "model", + "type": { + "$ref": "1201" + }, + "value": { + "$id": "6498", + "properties": { + "$id": "6499", + "kind": "model", + "type": { + "$ref": "1203" + }, + "value": { + "$id": "6500", + "instanceCount": { + "$id": "6501", + "kind": "number", + "type": { + "$ref": "1215" + }, + "value": 3 + }, + "provisioningState": { + "$id": "6502", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "6503", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "6504", + "name": { + "$id": "6505", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "6506", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "6507", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123" + }, + "name": { + "$id": "6508", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "bwhcjsnnfnrmbixamyxjau" + }, + "type": { + "$id": "6509", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "ejvancsomtbapgztnerhlvx" + }, + "systemData": { + "$id": "6510", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "6511", + "createdBy": { + "$id": "6512", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "6513", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "6514", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "6515", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "6516", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "6517", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "6518", + "response": { + "$ref": "6314" + }, + "statusCode": 201, + "bodyValue": { + "$id": "6519", + "kind": "model", + "type": { + "$ref": "1201" + }, + "value": { + "$id": "6520", + "properties": { + "$id": "6521", + "kind": "model", + "type": { + "$ref": "1203" + }, + "value": { + "$id": "6522", + "instanceCount": { + "$id": "6523", + "kind": "number", + "type": { + "$ref": "1215" + }, + "value": 3 + }, + "provisioningState": { + "$id": "6524", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "6525", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "6526", + "name": { + "$id": "6527", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "6528", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "6529", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123" + }, + "name": { + "$id": "6530", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "bwhcjsnnfnrmbixamyxjau" + }, + "type": { + "$id": "6531", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "ejvancsomtbapgztnerhlvx" + }, + "systemData": { + "$id": "6532", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "6533", + "createdBy": { + "$id": "6534", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "6535", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "6536", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "6537", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "6538", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "6539", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "6540", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "6541", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6542", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "6543", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6544", + "name": "dataflowProfileName", + "nameInRequest": "dataflowProfileName", + "doc": "Name of Instance dataflowProfile resource", + "type": { + "$id": "6545", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6546", + "name": "resource", + "nameInRequest": "resource", + "doc": "Resource create parameters.", + "type": { + "$ref": "1201" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6547", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "6548", + "kind": "constant", + "valueType": { + "$id": "6549", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6550", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "6551", + "kind": "constant", + "valueType": { + "$id": "6552", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "6553", + "type": { + "$ref": "1201" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowProfile.createOrUpdate" + }, + { + "$id": "6554", + "kind": "lro", + "name": "delete", + "accessibility": "public", + "apiVersions": [ + "2024-11-01", + "2025-04-01" + ], + "doc": "Delete a DataflowProfileResource", + "operation": { + "$id": "6555", + "name": "delete", + "resourceName": "DataflowProfileResource", + "doc": "Delete a DataflowProfileResource", + "accessibility": "public", + "parameters": [ + { + "$id": "6556", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "6557", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "6558", + "type": { + "$id": "6559", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-04-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6560", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "6561", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "6562", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6563", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "6564", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6565", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "6566", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6567", + "name": "dataflowProfileName", + "nameInRequest": "dataflowProfileName", + "doc": "Name of Instance dataflowProfile resource", + "type": { + "$id": "6568", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6569", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "6570", + "kind": "constant", + "valueType": { + "$id": "6571", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "6572", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "6573", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "6574", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "6575", + "name": "retryAfter", + "nameInResponse": "Retry-After", + "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "type": { + "$id": "6576", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false + }, + { + "$id": "6577", + "statusCodes": [ + 204 + ], + "headers": [], + "isErrorResponse": false + } + ], + "httpMethod": "DELETE", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/dataflowProfiles/{dataflowProfileName}", + "bufferResponse": true, + "longRunning": { + "$id": "6578", + "finalStateVia": 1, + "finalResponse": { + "$id": "6579", + "statusCodes": [ + 204 + ] + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowProfile.delete", + "decorators": [], + "examples": [ + { + "$id": "6580", + "kind": "http", + "name": "DataflowProfile_Delete", + "description": "DataflowProfile_Delete", + "filePath": "2025-04-01/DataflowProfile_Delete_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "6581", + "parameter": { + "$ref": "6556" + }, + "value": { + "$id": "6582", + "kind": "string", + "type": { + "$ref": "6557" + }, + "value": "2025-04-01" + } + }, + { + "$id": "6583", + "parameter": { + "$ref": "6560" + }, + "value": { + "$id": "6584", + "kind": "string", + "type": { + "$ref": "6561" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "6585", + "parameter": { + "$ref": "6563" + }, + "value": { + "$id": "6586", + "kind": "string", + "type": { + "$ref": "6564" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "6587", + "parameter": { + "$ref": "6565" + }, + "value": { + "$id": "6588", + "kind": "string", + "type": { + "$ref": "6566" + }, + "value": "resource-name123" + } + }, + { + "$id": "6589", + "parameter": { + "$ref": "6567" + }, + "value": { + "$id": "6590", + "kind": "string", + "type": { + "$ref": "6568" + }, + "value": "resource-name123" + } + } + ], + "responses": [ + { + "$id": "6591", + "response": { + "$ref": "6572" + }, + "statusCode": 202 + }, + { + "$id": "6592", + "response": { + "$ref": "6577" + }, + "statusCode": 204 + } + ] + } + ] + }, + "parameters": [ + { + "$id": "6593", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "6594", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6595", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "6596", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6597", + "name": "dataflowProfileName", + "nameInRequest": "dataflowProfileName", + "doc": "Name of Instance dataflowProfile resource", + "type": { + "$id": "6598", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6599", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "6600", + "kind": "constant", + "valueType": { + "$id": "6601", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "6602" + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowProfile.delete" + }, + { + "$id": "6603", + "kind": "paging", + "name": "listByResourceGroup", + "accessibility": "public", + "apiVersions": [ + "2024-11-01", + "2025-04-01" + ], + "doc": "List DataflowProfileResource resources by InstanceResource", + "operation": { + "$id": "6604", + "name": "listByResourceGroup", + "resourceName": "DataflowProfileResource", + "doc": "List DataflowProfileResource resources by InstanceResource", + "accessibility": "public", + "parameters": [ + { + "$id": "6605", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "6606", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "6607", + "type": { + "$id": "6608", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-04-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6609", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "6610", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "6611", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6612", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "6613", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6614", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "6615", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6616", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "6617", + "kind": "constant", + "valueType": { + "$id": "6618", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "6619", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1228" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/dataflowProfiles", + "bufferResponse": true, + "paging": { + "$id": "6620", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "6621", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowProfile.listByResourceGroup", + "decorators": [], + "examples": [ + { + "$id": "6622", + "kind": "http", + "name": "DataflowProfile_ListByResourceGroup", + "description": "DataflowProfile_ListByResourceGroup", + "filePath": "2025-04-01/DataflowProfile_ListByResourceGroup_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "6623", + "parameter": { + "$ref": "6605" + }, + "value": { + "$id": "6624", + "kind": "string", + "type": { + "$ref": "6606" + }, + "value": "2025-04-01" + } + }, + { + "$id": "6625", + "parameter": { + "$ref": "6609" + }, + "value": { + "$id": "6626", + "kind": "string", + "type": { + "$ref": "6610" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "6627", + "parameter": { + "$ref": "6612" + }, + "value": { + "$id": "6628", + "kind": "string", + "type": { + "$ref": "6613" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "6629", + "parameter": { + "$ref": "6614" + }, + "value": { + "$id": "6630", + "kind": "string", + "type": { + "$ref": "6615" + }, + "value": "resource-name123" + } + } + ], + "responses": [ + { + "$id": "6631", + "response": { + "$ref": "6619" + }, + "statusCode": 200, + "bodyValue": { + "$id": "6632", + "kind": "model", + "type": { + "$ref": "1228" + }, + "value": { + "$id": "6633", + "value": { + "$id": "6634", + "kind": "array", + "type": { + "$ref": "1230" + }, + "value": [ + { + "$id": "6635", + "kind": "model", + "type": { + "$ref": "1201" + }, + "value": { + "$id": "6636", + "properties": { + "$id": "6637", + "kind": "model", + "type": { + "$ref": "1203" + }, + "value": { + "$id": "6638", + "diagnostics": { + "$id": "6639", + "kind": "model", + "type": { + "$ref": "1205" + }, + "value": { + "$id": "6640", + "logs": { + "$id": "6641", + "kind": "model", + "type": { + "$ref": "706" + }, + "value": { + "$id": "6642", + "level": { + "$id": "6643", + "kind": "string", + "type": { + "$ref": "708" + }, + "value": "rnmwokumdmebpmfxxxzvvjfdywotav" + } + } + }, + "metrics": { + "$id": "6644", + "kind": "model", + "type": { + "$ref": "714" + }, + "value": { + "$id": "6645", + "prometheusPort": { + "$id": "6646", + "kind": "number", + "type": { + "$ref": "716" + }, + "value": 7581 + } + } + } + } + }, + "instanceCount": { + "$id": "6647", + "kind": "number", + "type": { + "$ref": "1215" + }, + "value": 14 + }, + "provisioningState": { + "$id": "6648", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "6649", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "6650", + "name": { + "$id": "6651", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "6652", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "6653", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123" + }, + "name": { + "$id": "6654", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "bwhcjsnnfnrmbixamyxjau" + }, + "type": { + "$id": "6655", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "ejvancsomtbapgztnerhlvx" + }, + "systemData": { + "$id": "6656", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "6657", + "createdBy": { + "$id": "6658", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "6659", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "6660", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "6661", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "6662", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "6663", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + ] + }, + "nextLink": { + "$id": "6664", + "kind": "string", + "type": { + "$ref": "1234" + }, + "value": "https://microsoft.com/a" + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "6665", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "6666", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6667", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "6668", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6669", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "6617" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "6670", + "type": { + "$id": "6671", + "kind": "array", + "name": "ArrayDataflowProfileResource", + "valueType": { + "$ref": "1201" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "resultSegments": [ + "value" + ] + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowProfile.listByResourceGroup" + } + ], + "parameters": [ + { + "$id": "6672", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "6673", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "location": "Uri", + "isApiVersion": false, + "isContentType": false, + "isRequired": true, + "isEndpoint": true, + "skipUrlEncoding": false, + "explode": false, + "kind": "Client", + "defaultValue": { + "$id": "6674", + "type": { + "$id": "6675", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "6676", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "6677" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowProfile", + "apiVersions": [ + "2024-11-01", + "2025-04-01" + ], + "parent": { + "$ref": "1710" + } + }, + { + "$id": "6678", + "kind": "client", + "name": "Dataflow", + "namespace": "Azure.ResourceManager.IotOperations", + "methods": [ + { + "$id": "6679", + "kind": "basic", + "name": "get", + "accessibility": "public", + "apiVersions": [ + "2024-11-01", + "2025-04-01" + ], + "doc": "Get a DataflowResource", + "operation": { + "$id": "6680", + "name": "get", + "resourceName": "DataflowResource", + "doc": "Get a DataflowResource", + "accessibility": "public", + "parameters": [ + { + "$id": "6681", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "6682", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "6683", + "type": { + "$id": "6684", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-04-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6685", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "6686", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "6687", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6688", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "6689", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6690", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "6691", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6692", + "name": "dataflowProfileName", + "nameInRequest": "dataflowProfileName", + "doc": "Name of Instance dataflowProfile resource", + "type": { + "$id": "6693", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6694", + "name": "dataflowName", + "nameInRequest": "dataflowName", + "doc": "Name of Instance dataflowProfile dataflow resource", + "type": { + "$id": "6695", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6696", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "6697", + "kind": "constant", + "valueType": { + "$id": "6698", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "6699", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1238" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/dataflowProfiles/{dataflowProfileName}/dataflows/{dataflowName}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Dataflow.get", + "decorators": [], + "examples": [ + { + "$id": "6700", + "kind": "http", + "name": "Dataflow_Get", + "description": "Dataflow_Get", + "filePath": "2025-04-01/Dataflow_Get_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "6701", + "parameter": { + "$ref": "6681" + }, + "value": { + "$id": "6702", + "kind": "string", + "type": { + "$ref": "6682" + }, + "value": "2025-04-01" + } + }, + { + "$id": "6703", + "parameter": { + "$ref": "6685" + }, + "value": { + "$id": "6704", + "kind": "string", + "type": { + "$ref": "6686" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "6705", + "parameter": { + "$ref": "6688" + }, + "value": { + "$id": "6706", + "kind": "string", + "type": { + "$ref": "6689" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "6707", + "parameter": { + "$ref": "6690" + }, + "value": { + "$id": "6708", + "kind": "string", + "type": { + "$ref": "6691" + }, + "value": "resource-name123" + } + }, + { + "$id": "6709", + "parameter": { + "$ref": "6692" + }, + "value": { + "$id": "6710", + "kind": "string", + "type": { + "$ref": "6693" + }, + "value": "resource-name123" + } + }, + { + "$id": "6711", + "parameter": { + "$ref": "6694" + }, + "value": { + "$id": "6712", + "kind": "string", + "type": { + "$ref": "6695" + }, + "value": "resource-name123" + } + } + ], + "responses": [ + { + "$id": "6713", + "response": { + "$ref": "6699" + }, + "statusCode": 200, + "bodyValue": { + "$id": "6714", + "kind": "model", + "type": { + "$ref": "1238" + }, + "value": { + "$id": "6715", + "properties": { + "$id": "6716", + "kind": "model", + "type": { + "$ref": "1240" + }, + "value": { + "$id": "6717", + "mode": { + "$id": "6718", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "operations": { + "$id": "6719", + "kind": "array", + "type": { + "$ref": "1245" + }, + "value": [ + { + "$id": "6720", + "kind": "model", + "type": { + "$ref": "1246" + }, + "value": { + "$id": "6721", + "operationType": { + "$id": "6722", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Source" + }, + "name": { + "$id": "6723", + "kind": "string", + "type": { + "$ref": "1251" + }, + "value": "knnafvkwoeakm" + }, + "sourceSettings": { + "$id": "6724", + "kind": "model", + "type": { + "$ref": "1255" + }, + "value": { + "$id": "6725", + "endpointRef": { + "$id": "6726", + "kind": "string", + "type": { + "$ref": "1257" + }, + "value": "iixotodhvhkkfcfyrkoveslqig" + }, + "assetRef": { + "$id": "6727", + "kind": "string", + "type": { + "$ref": "1261" + }, + "value": "zayyykwmckaocywdkohmu" + }, + "serializationFormat": { + "$id": "6728", + "kind": "string", + "type": { + "$ref": "190" + }, + "value": "Json" + }, + "schemaRef": { + "$id": "6729", + "kind": "string", + "type": { + "$ref": "1268" + }, + "value": "pknmdzqll" + }, + "dataSources": { + "$id": "6730", + "kind": "array", + "type": { + "$ref": "1272" + }, + "value": [ + { + "$id": "6731", + "kind": "string", + "type": { + "$ref": "1273" + }, + "value": "chkkpymxhp" + } + ] + } + } + }, + "builtInTransformationSettings": { + "$id": "6732", + "kind": "model", + "type": { + "$ref": "1280" + }, + "value": { + "$id": "6733", + "serializationFormat": { + "$id": "6734", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "Delta" + }, + "schemaRef": { + "$id": "6735", + "kind": "string", + "type": { + "$ref": "1285" + }, + "value": "mcdc" + }, + "datasets": { + "$id": "6736", + "kind": "array", + "type": { + "$ref": "1289" + }, + "value": [ + { + "$id": "6737", + "kind": "model", + "type": { + "$ref": "1290" + }, + "value": { + "$id": "6738", + "key": { + "$id": "6739", + "kind": "string", + "type": { + "$ref": "1292" + }, + "value": "qsfqcgxaxnhfumrsdsokwyv" + }, + "description": { + "$id": "6740", + "kind": "string", + "type": { + "$ref": "1296" + }, + "value": "Lorem ipsum odor amet, consectetuer adipiscing elit." + }, + "schemaRef": { + "$id": "6741", + "kind": "string", + "type": { + "$ref": "1300" + }, + "value": "n" + }, + "inputs": { + "$id": "6742", + "kind": "array", + "type": { + "$ref": "1304" + }, + "value": [ + { + "$id": "6743", + "kind": "string", + "type": { + "$ref": "1305" + }, + "value": "mosffpsslifkq" + } + ] + }, + "expression": { + "$id": "6744", + "kind": "string", + "type": { + "$ref": "1309" + }, + "value": "aatbwomvflemsxialv" + } + } + } + ] + }, + "filter": { + "$id": "6745", + "kind": "array", + "type": { + "$ref": "1315" + }, + "value": [ + { + "$id": "6746", + "kind": "model", + "type": { + "$ref": "1316" + }, + "value": { + "$id": "6747", + "type": { + "$id": "6748", + "kind": "string", + "type": { + "$ref": "202" + }, + "value": "Filter" + }, + "description": { + "$id": "6749", + "kind": "string", + "type": { + "$ref": "1321" + }, + "value": "Lorem ipsum odor amet, consectetuer adipiscing elit." + }, + "inputs": { + "$id": "6750", + "kind": "array", + "type": { + "$ref": "1325" + }, + "value": [ + { + "$id": "6751", + "kind": "string", + "type": { + "$ref": "1326" + }, + "value": "sxmjkbntgb" + } + ] + }, + "expression": { + "$id": "6752", + "kind": "string", + "type": { + "$ref": "1330" + }, + "value": "n" + } + } + } + ] + }, + "map": { + "$id": "6753", + "kind": "array", + "type": { + "$ref": "1336" + }, + "value": [ + { + "$id": "6754", + "kind": "model", + "type": { + "$ref": "1337" + }, + "value": { + "$id": "6755", + "type": { + "$id": "6756", + "kind": "string", + "type": { + "$ref": "206" + }, + "value": "NewProperties" + }, + "description": { + "$id": "6757", + "kind": "string", + "type": { + "$ref": "1342" + }, + "value": "Lorem ipsum odor amet, consectetuer adipiscing elit." + }, + "inputs": { + "$id": "6758", + "kind": "array", + "type": { + "$ref": "1346" + }, + "value": [ + { + "$id": "6759", + "kind": "string", + "type": { + "$ref": "1347" + }, + "value": "xsbxuk" + } + ] + }, + "expression": { + "$id": "6760", + "kind": "string", + "type": { + "$ref": "1351" + }, + "value": "txoiltogsarwkzalsphvlmt" + }, + "output": { + "$id": "6761", + "kind": "string", + "type": { + "$ref": "1355" + }, + "value": "nvgtmkfl" + } + } + } + ] + } + } + }, + "destinationSettings": { + "$id": "6762", + "kind": "model", + "type": { + "$ref": "1363" + }, + "value": { + "$id": "6763", + "endpointRef": { + "$id": "6764", + "kind": "string", + "type": { + "$ref": "1365" + }, + "value": "kybkchnzimerguekuvqlqiqdvvrt" + }, + "dataDestination": { + "$id": "6765", + "kind": "string", + "type": { + "$ref": "1369" + }, + "value": "cbrh" + } + } + } + } + } + ] + }, + "provisioningState": { + "$id": "6766", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "6767", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "6768", + "name": { + "$id": "6769", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "6770", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "6771", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123/dataflows/resource-name123" + }, + "name": { + "$id": "6772", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "jxhcpwgfkxqasbexkookvxk" + }, + "type": { + "$id": "6773", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "zkuozvgjseokfchkscoswthzjdry" + }, + "systemData": { + "$id": "6774", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "6775", + "createdBy": { + "$id": "6776", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "6777", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "6778", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "6779", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "6780", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "6781", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "6782", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "6783", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6784", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "6785", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6786", + "name": "dataflowProfileName", + "nameInRequest": "dataflowProfileName", + "doc": "Name of Instance dataflowProfile resource", + "type": { + "$id": "6787", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6788", + "name": "dataflowName", + "nameInRequest": "dataflowName", + "doc": "Name of Instance dataflowProfile dataflow resource", + "type": { + "$id": "6789", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6790", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "6697" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "6791", + "type": { + "$ref": "1238" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Dataflow.get" + }, + { + "$id": "6792", + "kind": "lro", + "name": "createOrUpdate", + "accessibility": "public", + "apiVersions": [ + "2024-11-01", + "2025-04-01" + ], + "doc": "Create a DataflowResource", + "operation": { + "$id": "6793", + "name": "createOrUpdate", + "resourceName": "DataflowResource", + "doc": "Create a DataflowResource", + "accessibility": "public", + "parameters": [ + { + "$id": "6794", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "6795", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "6796", + "type": { + "$id": "6797", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-04-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6798", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "6799", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "6800", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6801", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "6802", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6803", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "6804", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6805", + "name": "dataflowProfileName", + "nameInRequest": "dataflowProfileName", + "doc": "Name of Instance dataflowProfile resource", + "type": { + "$id": "6806", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6807", + "name": "dataflowName", + "nameInRequest": "dataflowName", + "doc": "Name of Instance dataflowProfile dataflow resource", + "type": { + "$id": "6808", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6809", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "6810", + "kind": "constant", + "valueType": { + "$id": "6811", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6812", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "6813", + "kind": "constant", + "valueType": { + "$id": "6814", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6815", + "name": "resource", + "nameInRequest": "resource", + "doc": "Resource create parameters.", + "type": { + "$ref": "1238" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "6816", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1238" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + { + "$id": "6817", + "statusCodes": [ + 201 + ], + "bodyType": { + "$ref": "1238" + }, + "headers": [ + { + "$id": "6818", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "6819", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "6820", + "name": "retryAfter", + "nameInResponse": "Retry-After", + "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "type": { + "$id": "6821", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "PUT", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/dataflowProfiles/{dataflowProfileName}/dataflows/{dataflowName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "longRunning": { + "$id": "6822", + "finalStateVia": 0, + "finalResponse": { + "$id": "6823", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1238" + } + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Dataflow.createOrUpdate", + "decorators": [], + "examples": [ + { + "$id": "6824", + "kind": "http", + "name": "Dataflow_CreateOrUpdate_ComplexContextualization", + "description": "Dataflow_CreateOrUpdate_ComplexContextualization", + "filePath": "2025-04-01/Dataflow_CreateOrUpdate_ComplexContextualization.json", + "parameters": [ + { + "$id": "6825", + "parameter": { + "$ref": "6794" + }, + "value": { + "$id": "6826", + "kind": "string", + "type": { + "$ref": "6795" + }, + "value": "2025-04-01" + } + }, + { + "$id": "6827", + "parameter": { + "$ref": "6798" + }, + "value": { + "$id": "6828", + "kind": "string", + "type": { + "$ref": "6799" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "6829", + "parameter": { + "$ref": "6801" + }, + "value": { + "$id": "6830", + "kind": "string", + "type": { + "$ref": "6802" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "6831", + "parameter": { + "$ref": "6803" + }, + "value": { + "$id": "6832", + "kind": "string", + "type": { + "$ref": "6804" + }, + "value": "resource-name123" + } + }, + { + "$id": "6833", + "parameter": { + "$ref": "6805" + }, + "value": { + "$id": "6834", + "kind": "string", + "type": { + "$ref": "6806" + }, + "value": "resource-name123" + } + }, + { + "$id": "6835", + "parameter": { + "$ref": "6807" + }, + "value": { + "$id": "6836", + "kind": "string", + "type": { + "$ref": "6808" + }, + "value": "aio-to-adx-contexualized" + } + }, + { + "$id": "6837", + "parameter": { + "$ref": "6815" + }, + "value": { + "$id": "6838", + "kind": "model", + "type": { + "$ref": "1238" + }, + "value": { + "$id": "6839", + "properties": { + "$id": "6840", + "kind": "model", + "type": { + "$ref": "1240" + }, + "value": { + "$id": "6841", + "mode": { + "$id": "6842", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "operations": { + "$id": "6843", + "kind": "array", + "type": { + "$ref": "1245" + }, + "value": [ + { + "$id": "6844", + "kind": "model", + "type": { + "$ref": "1246" + }, + "value": { + "$id": "6845", + "operationType": { + "$id": "6846", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Source" + }, + "name": { + "$id": "6847", + "kind": "string", + "type": { + "$ref": "1251" + }, + "value": "source1" + }, + "sourceSettings": { + "$id": "6848", + "kind": "model", + "type": { + "$ref": "1255" + }, + "value": { + "$id": "6849", + "endpointRef": { + "$id": "6850", + "kind": "string", + "type": { + "$ref": "1257" + }, + "value": "aio-builtin-broker-endpoint" + }, + "dataSources": { + "$id": "6851", + "kind": "array", + "type": { + "$ref": "1272" + }, + "value": [ + { + "$id": "6852", + "kind": "string", + "type": { + "$ref": "1273" + }, + "value": "azure-iot-operations/data/thermostat" + } + ] + } + } + } + } + }, + { + "$id": "6853", + "kind": "model", + "type": { + "$ref": "1246" + }, + "value": { + "$id": "6854", + "operationType": { + "$id": "6855", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "BuiltInTransformation" + }, + "name": { + "$id": "6856", + "kind": "string", + "type": { + "$ref": "1251" + }, + "value": "transformation1" + }, + "builtInTransformationSettings": { + "$id": "6857", + "kind": "model", + "type": { + "$ref": "1280" + }, + "value": { + "$id": "6858", + "map": { + "$id": "6859", + "kind": "array", + "type": { + "$ref": "1336" + }, + "value": [ + { + "$id": "6860", + "kind": "model", + "type": { + "$ref": "1337" + }, + "value": { + "$id": "6861", + "inputs": { + "$id": "6862", + "kind": "array", + "type": { + "$ref": "1346" + }, + "value": [ + { + "$id": "6863", + "kind": "string", + "type": { + "$ref": "1347" + }, + "value": "*" + } + ] + }, + "output": { + "$id": "6864", + "kind": "string", + "type": { + "$ref": "1355" + }, + "value": "*" + } + } + }, + { + "$id": "6865", + "kind": "model", + "type": { + "$ref": "1337" + }, + "value": { + "$id": "6866", + "inputs": { + "$id": "6867", + "kind": "array", + "type": { + "$ref": "1346" + }, + "value": [ + { + "$id": "6868", + "kind": "string", + "type": { + "$ref": "1347" + }, + "value": "$context(quality).*" + } + ] + }, + "output": { + "$id": "6869", + "kind": "string", + "type": { + "$ref": "1355" + }, + "value": "enriched.*" + } + } + } + ] + }, + "datasets": { + "$id": "6870", + "kind": "array", + "type": { + "$ref": "1289" + }, + "value": [ + { + "$id": "6871", + "kind": "model", + "type": { + "$ref": "1290" + }, + "value": { + "$id": "6872", + "key": { + "$id": "6873", + "kind": "string", + "type": { + "$ref": "1292" + }, + "value": "quality" + }, + "inputs": { + "$id": "6874", + "kind": "array", + "type": { + "$ref": "1304" + }, + "value": [ + { + "$id": "6875", + "kind": "string", + "type": { + "$ref": "1305" + }, + "value": "$source.country" + }, + { + "$id": "6876", + "kind": "string", + "type": { + "$ref": "1305" + }, + "value": "$context.country" + } + ] + }, + "expression": { + "$id": "6877", + "kind": "string", + "type": { + "$ref": "1309" + }, + "value": "$1 == $2" + } + } + } + ] + } + } + } + } + }, + { + "$id": "6878", + "kind": "model", + "type": { + "$ref": "1246" + }, + "value": { + "$id": "6879", + "operationType": { + "$id": "6880", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Destination" + }, + "name": { + "$id": "6881", + "kind": "string", + "type": { + "$ref": "1251" + }, + "value": "destination1" + }, + "destinationSettings": { + "$id": "6882", + "kind": "model", + "type": { + "$ref": "1363" + }, + "value": { + "$id": "6883", + "endpointRef": { + "$id": "6884", + "kind": "string", + "type": { + "$ref": "1365" + }, + "value": "adx-endpoint" + }, + "dataDestination": { + "$id": "6885", + "kind": "string", + "type": { + "$ref": "1369" + }, + "value": "mytable" + } + } + } + } + } + ] + } + } + }, + "extendedLocation": { + "$id": "6886", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "6887", + "name": { + "$id": "6888", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "6889", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "6890", + "response": { + "$ref": "6816" + }, + "statusCode": 200, + "bodyValue": { + "$id": "6891", + "kind": "model", + "type": { + "$ref": "1238" + }, + "value": { + "$id": "6892", + "properties": { + "$id": "6893", + "kind": "model", + "type": { + "$ref": "1240" + }, + "value": { + "$id": "6894", + "mode": { + "$id": "6895", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "operations": { + "$id": "6896", + "kind": "array", + "type": { + "$ref": "1245" + }, + "value": [ + { + "$id": "6897", + "kind": "model", + "type": { + "$ref": "1246" + }, + "value": { + "$id": "6898", + "operationType": { + "$id": "6899", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Source" + }, + "name": { + "$id": "6900", + "kind": "string", + "type": { + "$ref": "1251" + }, + "value": "source1" + }, + "sourceSettings": { + "$id": "6901", + "kind": "model", + "type": { + "$ref": "1255" + }, + "value": { + "$id": "6902", + "endpointRef": { + "$id": "6903", + "kind": "string", + "type": { + "$ref": "1257" + }, + "value": "aio-builtin-broker-endpoint" + }, + "dataSources": { + "$id": "6904", + "kind": "array", + "type": { + "$ref": "1272" + }, + "value": [ + { + "$id": "6905", + "kind": "string", + "type": { + "$ref": "1273" + }, + "value": "azure-iot-operations/data/thermostat" + } + ] + } + } + } + } + }, + { + "$id": "6906", + "kind": "model", + "type": { + "$ref": "1246" + }, + "value": { + "$id": "6907", + "operationType": { + "$id": "6908", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "BuiltInTransformation" + }, + "name": { + "$id": "6909", + "kind": "string", + "type": { + "$ref": "1251" + }, + "value": "transformation1" + }, + "builtInTransformationSettings": { + "$id": "6910", + "kind": "model", + "type": { + "$ref": "1280" + }, + "value": { + "$id": "6911", + "map": { + "$id": "6912", + "kind": "array", + "type": { + "$ref": "1336" + }, + "value": [ + { + "$id": "6913", + "kind": "model", + "type": { + "$ref": "1337" + }, + "value": { + "$id": "6914", + "inputs": { + "$id": "6915", + "kind": "array", + "type": { + "$ref": "1346" + }, + "value": [ + { + "$id": "6916", + "kind": "string", + "type": { + "$ref": "1347" + }, + "value": "*" + } + ] + }, + "output": { + "$id": "6917", + "kind": "string", + "type": { + "$ref": "1355" + }, + "value": "*" + } + } + }, + { + "$id": "6918", + "kind": "model", + "type": { + "$ref": "1337" + }, + "value": { + "$id": "6919", + "inputs": { + "$id": "6920", + "kind": "array", + "type": { + "$ref": "1346" + }, + "value": [ + { + "$id": "6921", + "kind": "string", + "type": { + "$ref": "1347" + }, + "value": "$context(quality).*" + } + ] + }, + "output": { + "$id": "6922", + "kind": "string", + "type": { + "$ref": "1355" + }, + "value": "enriched.*" + } + } + } + ] + }, + "datasets": { + "$id": "6923", + "kind": "array", + "type": { + "$ref": "1289" + }, + "value": [ + { + "$id": "6924", + "kind": "model", + "type": { + "$ref": "1290" + }, + "value": { + "$id": "6925", + "key": { + "$id": "6926", + "kind": "string", + "type": { + "$ref": "1292" + }, + "value": "quality" + }, + "inputs": { + "$id": "6927", + "kind": "array", + "type": { + "$ref": "1304" + }, + "value": [ + { + "$id": "6928", + "kind": "string", + "type": { + "$ref": "1305" + }, + "value": "$source.country" + }, + { + "$id": "6929", + "kind": "string", + "type": { + "$ref": "1305" + }, + "value": "$context.country" + } + ] + }, + "expression": { + "$id": "6930", + "kind": "string", + "type": { + "$ref": "1309" + }, + "value": "$1 == $2" + } + } + } + ] + } + } + } + } + }, + { + "$id": "6931", + "kind": "model", + "type": { + "$ref": "1246" + }, + "value": { + "$id": "6932", + "operationType": { + "$id": "6933", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Destination" + }, + "name": { + "$id": "6934", + "kind": "string", + "type": { + "$ref": "1251" + }, + "value": "destination1" + }, + "destinationSettings": { + "$id": "6935", + "kind": "model", + "type": { + "$ref": "1363" + }, + "value": { + "$id": "6936", + "endpointRef": { + "$id": "6937", + "kind": "string", + "type": { + "$ref": "1365" + }, + "value": "adx-endpoint" + }, + "dataDestination": { + "$id": "6938", + "kind": "string", + "type": { + "$ref": "1369" + }, + "value": "mytable" + } + } + } + } + } + ] + }, + "provisioningState": { + "$id": "6939", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "6940", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "6941", + "name": { + "$id": "6942", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "6943", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "6944", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123/dataflows/resource-name123" + }, + "name": { + "$id": "6945", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "jxhcpwgfkxqasbexkookvxk" + }, + "type": { + "$id": "6946", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "zkuozvgjseokfchkscoswthzjdry" + }, + "systemData": { + "$id": "6947", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "6948", + "createdBy": { + "$id": "6949", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "6950", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "6951", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "6952", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "6953", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "6954", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "6955", + "response": { + "$ref": "6817" + }, + "statusCode": 201, + "bodyValue": { + "$id": "6956", + "kind": "model", + "type": { + "$ref": "1238" + }, + "value": { + "$id": "6957", + "properties": { + "$id": "6958", + "kind": "model", + "type": { + "$ref": "1240" + }, + "value": { + "$id": "6959", + "mode": { + "$id": "6960", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "operations": { + "$id": "6961", + "kind": "array", + "type": { + "$ref": "1245" + }, + "value": [ + { + "$id": "6962", + "kind": "model", + "type": { + "$ref": "1246" + }, + "value": { + "$id": "6963", + "operationType": { + "$id": "6964", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Source" + }, + "name": { + "$id": "6965", + "kind": "string", + "type": { + "$ref": "1251" + }, + "value": "source1" + }, + "sourceSettings": { + "$id": "6966", + "kind": "model", + "type": { + "$ref": "1255" + }, + "value": { + "$id": "6967", + "endpointRef": { + "$id": "6968", + "kind": "string", + "type": { + "$ref": "1257" + }, + "value": "aio-builtin-broker-endpoint" + }, + "dataSources": { + "$id": "6969", + "kind": "array", + "type": { + "$ref": "1272" + }, + "value": [ + { + "$id": "6970", + "kind": "string", + "type": { + "$ref": "1273" + }, + "value": "azure-iot-operations/data/thermostat" + } + ] + } + } + } + } + }, + { + "$id": "6971", + "kind": "model", + "type": { + "$ref": "1246" + }, + "value": { + "$id": "6972", + "operationType": { + "$id": "6973", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "BuiltInTransformation" + }, + "name": { + "$id": "6974", + "kind": "string", + "type": { + "$ref": "1251" + }, + "value": "transformation1" + }, + "builtInTransformationSettings": { + "$id": "6975", + "kind": "model", + "type": { + "$ref": "1280" + }, + "value": { + "$id": "6976", + "map": { + "$id": "6977", + "kind": "array", + "type": { + "$ref": "1336" + }, + "value": [ + { + "$id": "6978", + "kind": "model", + "type": { + "$ref": "1337" + }, + "value": { + "$id": "6979", + "inputs": { + "$id": "6980", + "kind": "array", + "type": { + "$ref": "1346" + }, + "value": [ + { + "$id": "6981", + "kind": "string", + "type": { + "$ref": "1347" + }, + "value": "*" + } + ] + }, + "output": { + "$id": "6982", + "kind": "string", + "type": { + "$ref": "1355" + }, + "value": "*" + } + } + }, + { + "$id": "6983", + "kind": "model", + "type": { + "$ref": "1337" + }, + "value": { + "$id": "6984", + "inputs": { + "$id": "6985", + "kind": "array", + "type": { + "$ref": "1346" + }, + "value": [ + { + "$id": "6986", + "kind": "string", + "type": { + "$ref": "1347" + }, + "value": "$context(quality).*" + } + ] + }, + "output": { + "$id": "6987", + "kind": "string", + "type": { + "$ref": "1355" + }, + "value": "enriched.*" + } + } + } + ] + }, + "datasets": { + "$id": "6988", + "kind": "array", + "type": { + "$ref": "1289" + }, + "value": [ + { + "$id": "6989", + "kind": "model", + "type": { + "$ref": "1290" + }, + "value": { + "$id": "6990", + "key": { + "$id": "6991", + "kind": "string", + "type": { + "$ref": "1292" + }, + "value": "quality" + }, + "inputs": { + "$id": "6992", + "kind": "array", + "type": { + "$ref": "1304" + }, + "value": [ + { + "$id": "6993", + "kind": "string", + "type": { + "$ref": "1305" + }, + "value": "$source.country" + }, + { + "$id": "6994", + "kind": "string", + "type": { + "$ref": "1305" + }, + "value": "$context.country" + } + ] + }, + "expression": { + "$id": "6995", + "kind": "string", + "type": { + "$ref": "1309" + }, + "value": "$1 == $2" + } + } + } + ] + } + } + } + } + }, + { + "$id": "6996", + "kind": "model", + "type": { + "$ref": "1246" + }, + "value": { + "$id": "6997", + "operationType": { + "$id": "6998", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Destination" + }, + "name": { + "$id": "6999", + "kind": "string", + "type": { + "$ref": "1251" + }, + "value": "destination1" + }, + "destinationSettings": { + "$id": "7000", + "kind": "model", + "type": { + "$ref": "1363" + }, + "value": { + "$id": "7001", + "endpointRef": { + "$id": "7002", + "kind": "string", + "type": { + "$ref": "1365" + }, + "value": "adx-endpoint" + }, + "dataDestination": { + "$id": "7003", + "kind": "string", + "type": { + "$ref": "1369" + }, + "value": "mytable" + } + } + } + } + } + ] + }, + "provisioningState": { + "$id": "7004", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "7005", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "7006", + "name": { + "$id": "7007", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "7008", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "7009", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123/dataflows/resource-name123" + }, + "name": { + "$id": "7010", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "jxhcpwgfkxqasbexkookvxk" + }, + "type": { + "$id": "7011", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "zkuozvgjseokfchkscoswthzjdry" + }, + "systemData": { + "$id": "7012", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "7013", + "createdBy": { + "$id": "7014", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "7015", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "7016", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "7017", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "7018", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "7019", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + }, + { + "$id": "7020", + "kind": "http", + "name": "Dataflow_CreateOrUpdate_ComplexEventHub", + "description": "Dataflow_CreateOrUpdate_ComplexEventHub", + "filePath": "2025-04-01/Dataflow_CreateOrUpdate_ComplexEventHub.json", + "parameters": [ + { + "$id": "7021", + "parameter": { + "$ref": "6794" + }, + "value": { + "$id": "7022", + "kind": "string", + "type": { + "$ref": "6795" + }, + "value": "2025-04-01" + } + }, + { + "$id": "7023", + "parameter": { + "$ref": "6798" + }, + "value": { + "$id": "7024", + "kind": "string", + "type": { + "$ref": "6799" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "7025", + "parameter": { + "$ref": "6801" + }, + "value": { + "$id": "7026", + "kind": "string", + "type": { + "$ref": "6802" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "7027", + "parameter": { + "$ref": "6803" + }, + "value": { + "$id": "7028", + "kind": "string", + "type": { + "$ref": "6804" + }, + "value": "resource-name123" + } + }, + { + "$id": "7029", + "parameter": { + "$ref": "6805" + }, + "value": { + "$id": "7030", + "kind": "string", + "type": { + "$ref": "6806" + }, + "value": "resource-name123" + } + }, + { + "$id": "7031", + "parameter": { + "$ref": "6807" + }, + "value": { + "$id": "7032", + "kind": "string", + "type": { + "$ref": "6808" + }, + "value": "aio-to-event-hub-transformed" + } + }, + { + "$id": "7033", + "parameter": { + "$ref": "6815" + }, + "value": { + "$id": "7034", + "kind": "model", + "type": { + "$ref": "1238" + }, + "value": { + "$id": "7035", + "properties": { + "$id": "7036", + "kind": "model", + "type": { + "$ref": "1240" + }, + "value": { + "$id": "7037", + "mode": { + "$id": "7038", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "operations": { + "$id": "7039", + "kind": "array", + "type": { + "$ref": "1245" + }, + "value": [ + { + "$id": "7040", + "kind": "model", + "type": { + "$ref": "1246" + }, + "value": { + "$id": "7041", + "operationType": { + "$id": "7042", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Source" + }, + "name": { + "$id": "7043", + "kind": "string", + "type": { + "$ref": "1251" + }, + "value": "source1" + }, + "sourceSettings": { + "$id": "7044", + "kind": "model", + "type": { + "$ref": "1255" + }, + "value": { + "$id": "7045", + "endpointRef": { + "$id": "7046", + "kind": "string", + "type": { + "$ref": "1257" + }, + "value": "aio-builtin-broker-endpoint" + }, + "dataSources": { + "$id": "7047", + "kind": "array", + "type": { + "$ref": "1272" + }, + "value": [ + { + "$id": "7048", + "kind": "string", + "type": { + "$ref": "1273" + }, + "value": "azure-iot-operations/data/thermostat" + } + ] + } + } + } + } + }, + { + "$id": "7049", + "kind": "model", + "type": { + "$ref": "1246" + }, + "value": { + "$id": "7050", + "operationType": { + "$id": "7051", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "BuiltInTransformation" + }, + "builtInTransformationSettings": { + "$id": "7052", + "kind": "model", + "type": { + "$ref": "1280" + }, + "value": { + "$id": "7053", + "filter": { + "$id": "7054", + "kind": "array", + "type": { + "$ref": "1315" + }, + "value": [ + { + "$id": "7055", + "kind": "model", + "type": { + "$ref": "1316" + }, + "value": { + "$id": "7056", + "inputs": { + "$id": "7057", + "kind": "array", + "type": { + "$ref": "1325" + }, + "value": [ + { + "$id": "7058", + "kind": "string", + "type": { + "$ref": "1326" + }, + "value": "temperature.Value" + }, + { + "$id": "7059", + "kind": "string", + "type": { + "$ref": "1326" + }, + "value": "\"Tag 10\".Value" + } + ] + }, + "expression": { + "$id": "7060", + "kind": "string", + "type": { + "$ref": "1330" + }, + "value": "$1 > 9000 && $2 >= 8000" + } + } + } + ] + }, + "map": { + "$id": "7061", + "kind": "array", + "type": { + "$ref": "1336" + }, + "value": [ + { + "$id": "7062", + "kind": "model", + "type": { + "$ref": "1337" + }, + "value": { + "$id": "7063", + "inputs": { + "$id": "7064", + "kind": "array", + "type": { + "$ref": "1346" + }, + "value": [ + { + "$id": "7065", + "kind": "string", + "type": { + "$ref": "1347" + }, + "value": "*" + } + ] + }, + "output": { + "$id": "7066", + "kind": "string", + "type": { + "$ref": "1355" + }, + "value": "*" + } + } + }, + { + "$id": "7067", + "kind": "model", + "type": { + "$ref": "1337" + }, + "value": { + "$id": "7068", + "inputs": { + "$id": "7069", + "kind": "array", + "type": { + "$ref": "1346" + }, + "value": [ + { + "$id": "7070", + "kind": "string", + "type": { + "$ref": "1347" + }, + "value": "temperature.Value" + }, + { + "$id": "7071", + "kind": "string", + "type": { + "$ref": "1347" + }, + "value": "\"Tag 10\".Value" + } + ] + }, + "expression": { + "$id": "7072", + "kind": "string", + "type": { + "$ref": "1351" + }, + "value": "($1+$2)/2" + }, + "output": { + "$id": "7073", + "kind": "string", + "type": { + "$ref": "1355" + }, + "value": "AvgTemp.Value" + } + } + }, + { + "$id": "7074", + "kind": "model", + "type": { + "$ref": "1337" + }, + "value": { + "$id": "7075", + "inputs": { + "$id": "7076", + "kind": "array", + "type": { + "$ref": "1346" + }, + "value": [] + }, + "expression": { + "$id": "7077", + "kind": "string", + "type": { + "$ref": "1351" + }, + "value": "true" + }, + "output": { + "$id": "7078", + "kind": "string", + "type": { + "$ref": "1355" + }, + "value": "dataflow-processed" + } + } + }, + { + "$id": "7079", + "kind": "model", + "type": { + "$ref": "1337" + }, + "value": { + "$id": "7080", + "inputs": { + "$id": "7081", + "kind": "array", + "type": { + "$ref": "1346" + }, + "value": [ + { + "$id": "7082", + "kind": "string", + "type": { + "$ref": "1347" + }, + "value": "temperature.SourceTimestamp" + } + ] + }, + "expression": { + "$id": "7083", + "kind": "string", + "type": { + "$ref": "1351" + }, + "value": "" + }, + "output": { + "$id": "7084", + "kind": "string", + "type": { + "$ref": "1355" + }, + "value": "" + } + } + }, + { + "$id": "7085", + "kind": "model", + "type": { + "$ref": "1337" + }, + "value": { + "$id": "7086", + "inputs": { + "$id": "7087", + "kind": "array", + "type": { + "$ref": "1346" + }, + "value": [ + { + "$id": "7088", + "kind": "string", + "type": { + "$ref": "1347" + }, + "value": "\"Tag 10\"" + } + ] + }, + "expression": { + "$id": "7089", + "kind": "string", + "type": { + "$ref": "1351" + }, + "value": "" + }, + "output": { + "$id": "7090", + "kind": "string", + "type": { + "$ref": "1355" + }, + "value": "pressure" + } + } + }, + { + "$id": "7091", + "kind": "model", + "type": { + "$ref": "1337" + }, + "value": { + "$id": "7092", + "inputs": { + "$id": "7093", + "kind": "array", + "type": { + "$ref": "1346" + }, + "value": [ + { + "$id": "7094", + "kind": "string", + "type": { + "$ref": "1347" + }, + "value": "temperature.Value" + } + ] + }, + "expression": { + "$id": "7095", + "kind": "string", + "type": { + "$ref": "1351" + }, + "value": "cToF($1)" + }, + "output": { + "$id": "7096", + "kind": "string", + "type": { + "$ref": "1355" + }, + "value": "temperatureF.Value" + } + } + }, + { + "$id": "7097", + "kind": "model", + "type": { + "$ref": "1337" + }, + "value": { + "$id": "7098", + "inputs": { + "$id": "7099", + "kind": "array", + "type": { + "$ref": "1346" + }, + "value": [ + { + "$id": "7100", + "kind": "string", + "type": { + "$ref": "1347" + }, + "value": "\"Tag 10\".Value" + } + ] + }, + "expression": { + "$id": "7101", + "kind": "string", + "type": { + "$ref": "1351" + }, + "value": "scale ($1,0,10,0,100)" + }, + "output": { + "$id": "7102", + "kind": "string", + "type": { + "$ref": "1355" + }, + "value": "\"Scale Tag 10\".Value" + } + } + } + ] + } + } + } + } + }, + { + "$id": "7103", + "kind": "model", + "type": { + "$ref": "1246" + }, + "value": { + "$id": "7104", + "operationType": { + "$id": "7105", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Destination" + }, + "name": { + "$id": "7106", + "kind": "string", + "type": { + "$ref": "1251" + }, + "value": "destination1" + }, + "destinationSettings": { + "$id": "7107", + "kind": "model", + "type": { + "$ref": "1363" + }, + "value": { + "$id": "7108", + "endpointRef": { + "$id": "7109", + "kind": "string", + "type": { + "$ref": "1365" + }, + "value": "event-hub-endpoint" + }, + "dataDestination": { + "$id": "7110", + "kind": "string", + "type": { + "$ref": "1369" + }, + "value": "myuniqueeventhub" + } + } + } + } + } + ] + } + } + }, + "extendedLocation": { + "$id": "7111", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "7112", + "name": { + "$id": "7113", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "7114", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "7115", + "response": { + "$ref": "6816" + }, + "statusCode": 200, + "bodyValue": { + "$id": "7116", + "kind": "model", + "type": { + "$ref": "1238" + }, + "value": { + "$id": "7117", + "properties": { + "$id": "7118", + "kind": "model", + "type": { + "$ref": "1240" + }, + "value": { + "$id": "7119", + "mode": { + "$id": "7120", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "operations": { + "$id": "7121", + "kind": "array", + "type": { + "$ref": "1245" + }, + "value": [ + { + "$id": "7122", + "kind": "model", + "type": { + "$ref": "1246" + }, + "value": { + "$id": "7123", + "operationType": { + "$id": "7124", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Source" + }, + "name": { + "$id": "7125", + "kind": "string", + "type": { + "$ref": "1251" + }, + "value": "source1" + }, + "sourceSettings": { + "$id": "7126", + "kind": "model", + "type": { + "$ref": "1255" + }, + "value": { + "$id": "7127", + "endpointRef": { + "$id": "7128", + "kind": "string", + "type": { + "$ref": "1257" + }, + "value": "aio-builtin-broker-endpoint" + }, + "dataSources": { + "$id": "7129", + "kind": "array", + "type": { + "$ref": "1272" + }, + "value": [ + { + "$id": "7130", + "kind": "string", + "type": { + "$ref": "1273" + }, + "value": "azure-iot-operations/data/thermostat" + } + ] + } + } + } + } + }, + { + "$id": "7131", + "kind": "model", + "type": { + "$ref": "1246" + }, + "value": { + "$id": "7132", + "operationType": { + "$id": "7133", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "BuiltInTransformation" + }, + "name": { + "$id": "7134", + "kind": "string", + "type": { + "$ref": "1251" + }, + "value": "transformation1" + }, + "builtInTransformationSettings": { + "$id": "7135", + "kind": "model", + "type": { + "$ref": "1280" + }, + "value": { + "$id": "7136", + "map": { + "$id": "7137", + "kind": "array", + "type": { + "$ref": "1336" + }, + "value": [ + { + "$id": "7138", + "kind": "model", + "type": { + "$ref": "1337" + }, + "value": { + "$id": "7139", + "inputs": { + "$id": "7140", + "kind": "array", + "type": { + "$ref": "1346" + }, + "value": [ + { + "$id": "7141", + "kind": "string", + "type": { + "$ref": "1347" + }, + "value": "*" + } + ] + }, + "output": { + "$id": "7142", + "kind": "string", + "type": { + "$ref": "1355" + }, + "value": "*" + } + } + }, + { + "$id": "7143", + "kind": "model", + "type": { + "$ref": "1337" + }, + "value": { + "$id": "7144", + "inputs": { + "$id": "7145", + "kind": "array", + "type": { + "$ref": "1346" + }, + "value": [ + { + "$id": "7146", + "kind": "string", + "type": { + "$ref": "1347" + }, + "value": "$context(quality).*" + } + ] + }, + "output": { + "$id": "7147", + "kind": "string", + "type": { + "$ref": "1355" + }, + "value": "enriched.*" + } + } + } + ] + }, + "datasets": { + "$id": "7148", + "kind": "array", + "type": { + "$ref": "1289" + }, + "value": [ + { + "$id": "7149", + "kind": "model", + "type": { + "$ref": "1290" + }, + "value": { + "$id": "7150", + "key": { + "$id": "7151", + "kind": "string", + "type": { + "$ref": "1292" + }, + "value": "quality" + }, + "inputs": { + "$id": "7152", + "kind": "array", + "type": { + "$ref": "1304" + }, + "value": [ + { + "$id": "7153", + "kind": "string", + "type": { + "$ref": "1305" + }, + "value": "$source.country" + }, + { + "$id": "7154", + "kind": "string", + "type": { + "$ref": "1305" + }, + "value": "$context.country" + } + ] + }, + "expression": { + "$id": "7155", + "kind": "string", + "type": { + "$ref": "1309" + }, + "value": "$1 == $2" + } + } + } + ] + } + } + } + } + }, + { + "$id": "7156", + "kind": "model", + "type": { + "$ref": "1246" + }, + "value": { + "$id": "7157", + "operationType": { + "$id": "7158", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Destination" + }, + "name": { + "$id": "7159", + "kind": "string", + "type": { + "$ref": "1251" + }, + "value": "destination1" + }, + "destinationSettings": { + "$id": "7160", + "kind": "model", + "type": { + "$ref": "1363" + }, + "value": { + "$id": "7161", + "endpointRef": { + "$id": "7162", + "kind": "string", + "type": { + "$ref": "1365" + }, + "value": "adx-endpoint" + }, + "dataDestination": { + "$id": "7163", + "kind": "string", + "type": { + "$ref": "1369" + }, + "value": "mytable" + } + } + } + } + } + ] + }, + "provisioningState": { + "$id": "7164", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "7165", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "7166", + "name": { + "$id": "7167", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "7168", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "7169", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123/dataflows/resource-name123" + }, + "name": { + "$id": "7170", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "jxhcpwgfkxqasbexkookvxk" + }, + "type": { + "$id": "7171", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "zkuozvgjseokfchkscoswthzjdry" + }, + "systemData": { + "$id": "7172", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "7173", + "createdBy": { + "$id": "7174", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "7175", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "7176", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "7177", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "7178", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "7179", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "7180", + "response": { + "$ref": "6817" + }, + "statusCode": 201, + "bodyValue": { + "$id": "7181", + "kind": "model", + "type": { + "$ref": "1238" + }, + "value": { + "$id": "7182", + "properties": { + "$id": "7183", + "kind": "model", + "type": { + "$ref": "1240" + }, + "value": { + "$id": "7184", + "mode": { + "$id": "7185", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "operations": { + "$id": "7186", + "kind": "array", + "type": { + "$ref": "1245" + }, + "value": [ + { + "$id": "7187", + "kind": "model", + "type": { + "$ref": "1246" + }, + "value": { + "$id": "7188", + "operationType": { + "$id": "7189", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Source" + }, + "name": { + "$id": "7190", + "kind": "string", + "type": { + "$ref": "1251" + }, + "value": "source1" + }, + "sourceSettings": { + "$id": "7191", + "kind": "model", + "type": { + "$ref": "1255" + }, + "value": { + "$id": "7192", + "endpointRef": { + "$id": "7193", + "kind": "string", + "type": { + "$ref": "1257" + }, + "value": "aio-builtin-broker-endpoint" + }, + "dataSources": { + "$id": "7194", + "kind": "array", + "type": { + "$ref": "1272" + }, + "value": [ + { + "$id": "7195", + "kind": "string", + "type": { + "$ref": "1273" + }, + "value": "azure-iot-operations/data/thermostat" + } + ] + } + } + } + } + }, + { + "$id": "7196", + "kind": "model", + "type": { + "$ref": "1246" + }, + "value": { + "$id": "7197", + "operationType": { + "$id": "7198", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "BuiltInTransformation" + }, + "name": { + "$id": "7199", + "kind": "string", + "type": { + "$ref": "1251" + }, + "value": "transformation1" + }, + "builtInTransformationSettings": { + "$id": "7200", + "kind": "model", + "type": { + "$ref": "1280" + }, + "value": { + "$id": "7201", + "map": { + "$id": "7202", + "kind": "array", + "type": { + "$ref": "1336" + }, + "value": [ + { + "$id": "7203", + "kind": "model", + "type": { + "$ref": "1337" + }, + "value": { + "$id": "7204", + "inputs": { + "$id": "7205", + "kind": "array", + "type": { + "$ref": "1346" + }, + "value": [ + { + "$id": "7206", + "kind": "string", + "type": { + "$ref": "1347" + }, + "value": "*" + } + ] + }, + "output": { + "$id": "7207", + "kind": "string", + "type": { + "$ref": "1355" + }, + "value": "*" + } + } + }, + { + "$id": "7208", + "kind": "model", + "type": { + "$ref": "1337" + }, + "value": { + "$id": "7209", + "inputs": { + "$id": "7210", + "kind": "array", + "type": { + "$ref": "1346" + }, + "value": [ + { + "$id": "7211", + "kind": "string", + "type": { + "$ref": "1347" + }, + "value": "$context(quality).*" + } + ] + }, + "output": { + "$id": "7212", + "kind": "string", + "type": { + "$ref": "1355" + }, + "value": "enriched.*" + } + } + } + ] + }, + "datasets": { + "$id": "7213", + "kind": "array", + "type": { + "$ref": "1289" + }, + "value": [ + { + "$id": "7214", + "kind": "model", + "type": { + "$ref": "1290" + }, + "value": { + "$id": "7215", + "key": { + "$id": "7216", + "kind": "string", + "type": { + "$ref": "1292" + }, + "value": "quality" + }, + "inputs": { + "$id": "7217", + "kind": "array", + "type": { + "$ref": "1304" + }, + "value": [ + { + "$id": "7218", + "kind": "string", + "type": { + "$ref": "1305" + }, + "value": "$source.country" + }, + { + "$id": "7219", + "kind": "string", + "type": { + "$ref": "1305" + }, + "value": "$context.country" + } + ] + }, + "expression": { + "$id": "7220", + "kind": "string", + "type": { + "$ref": "1309" + }, + "value": "$1 == $2" + } + } + } + ] + } + } + } + } + }, + { + "$id": "7221", + "kind": "model", + "type": { + "$ref": "1246" + }, + "value": { + "$id": "7222", + "operationType": { + "$id": "7223", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Destination" + }, + "name": { + "$id": "7224", + "kind": "string", + "type": { + "$ref": "1251" + }, + "value": "destination1" + }, + "destinationSettings": { + "$id": "7225", + "kind": "model", + "type": { + "$ref": "1363" + }, + "value": { + "$id": "7226", + "endpointRef": { + "$id": "7227", + "kind": "string", + "type": { + "$ref": "1365" + }, + "value": "adx-endpoint" + }, + "dataDestination": { + "$id": "7228", + "kind": "string", + "type": { + "$ref": "1369" + }, + "value": "mytable" + } + } + } + } + } + ] + }, + "provisioningState": { + "$id": "7229", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "7230", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "7231", + "name": { + "$id": "7232", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "7233", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "7234", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123/dataflows/resource-name123" + }, + "name": { + "$id": "7235", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "jxhcpwgfkxqasbexkookvxk" + }, + "type": { + "$id": "7236", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "zkuozvgjseokfchkscoswthzjdry" + }, + "systemData": { + "$id": "7237", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "7238", + "createdBy": { + "$id": "7239", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "7240", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "7241", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "7242", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "7243", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "7244", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + }, + { + "$id": "7245", + "kind": "http", + "name": "Dataflow_CreateOrUpdate_FilterToTopic", + "description": "Dataflow_CreateOrUpdate_FilterToTopic", + "filePath": "2025-04-01/Dataflow_CreateOrUpdate_FilterToTopic.json", + "parameters": [ + { + "$id": "7246", + "parameter": { + "$ref": "6794" + }, + "value": { + "$id": "7247", + "kind": "string", + "type": { + "$ref": "6795" + }, + "value": "2025-04-01" + } + }, + { + "$id": "7248", + "parameter": { + "$ref": "6798" + }, + "value": { + "$id": "7249", + "kind": "string", + "type": { + "$ref": "6799" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "7250", + "parameter": { + "$ref": "6801" + }, + "value": { + "$id": "7251", + "kind": "string", + "type": { + "$ref": "6802" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "7252", + "parameter": { + "$ref": "6803" + }, + "value": { + "$id": "7253", + "kind": "string", + "type": { + "$ref": "6804" + }, + "value": "resource-name123" + } + }, + { + "$id": "7254", + "parameter": { + "$ref": "6805" + }, + "value": { + "$id": "7255", + "kind": "string", + "type": { + "$ref": "6806" + }, + "value": "resource-name123" + } + }, + { + "$id": "7256", + "parameter": { + "$ref": "6807" + }, + "value": { + "$id": "7257", + "kind": "string", + "type": { + "$ref": "6808" + }, + "value": "mqtt-filter-to-topic" + } + }, + { + "$id": "7258", + "parameter": { + "$ref": "6815" + }, + "value": { + "$id": "7259", + "kind": "model", + "type": { + "$ref": "1238" + }, + "value": { + "$id": "7260", + "properties": { + "$id": "7261", + "kind": "model", + "type": { + "$ref": "1240" + }, + "value": { + "$id": "7262", + "mode": { + "$id": "7263", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "operations": { + "$id": "7264", + "kind": "array", + "type": { + "$ref": "1245" + }, + "value": [ + { + "$id": "7265", + "kind": "model", + "type": { + "$ref": "1246" + }, + "value": { + "$id": "7266", + "operationType": { + "$id": "7267", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Source" + }, + "name": { + "$id": "7268", + "kind": "string", + "type": { + "$ref": "1251" + }, + "value": "source1" + }, + "sourceSettings": { + "$id": "7269", + "kind": "model", + "type": { + "$ref": "1255" + }, + "value": { + "$id": "7270", + "endpointRef": { + "$id": "7271", + "kind": "string", + "type": { + "$ref": "1257" + }, + "value": "aio-builtin-broker-endpoint" + }, + "dataSources": { + "$id": "7272", + "kind": "array", + "type": { + "$ref": "1272" + }, + "value": [ + { + "$id": "7273", + "kind": "string", + "type": { + "$ref": "1273" + }, + "value": "azure-iot-operations/data/thermostat" + } + ] + } + } + } + } + }, + { + "$id": "7274", + "kind": "model", + "type": { + "$ref": "1246" + }, + "value": { + "$id": "7275", + "operationType": { + "$id": "7276", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "BuiltInTransformation" + }, + "name": { + "$id": "7277", + "kind": "string", + "type": { + "$ref": "1251" + }, + "value": "transformation1" + }, + "builtInTransformationSettings": { + "$id": "7278", + "kind": "model", + "type": { + "$ref": "1280" + }, + "value": { + "$id": "7279", + "filter": { + "$id": "7280", + "kind": "array", + "type": { + "$ref": "1315" + }, + "value": [ + { + "$id": "7281", + "kind": "model", + "type": { + "$ref": "1316" + }, + "value": { + "$id": "7282", + "type": { + "$id": "7283", + "kind": "string", + "type": { + "$ref": "202" + }, + "value": "Filter" + }, + "description": { + "$id": "7284", + "kind": "string", + "type": { + "$ref": "1321" + }, + "value": "filter-datapoint" + }, + "inputs": { + "$id": "7285", + "kind": "array", + "type": { + "$ref": "1325" + }, + "value": [ + { + "$id": "7286", + "kind": "string", + "type": { + "$ref": "1326" + }, + "value": "temperature.Value" + }, + { + "$id": "7287", + "kind": "string", + "type": { + "$ref": "1326" + }, + "value": "\"Tag 10\".Value" + } + ] + }, + "expression": { + "$id": "7288", + "kind": "string", + "type": { + "$ref": "1330" + }, + "value": "$1 > 9000 && $2 >= 8000" + } + } + } + ] + }, + "map": { + "$id": "7289", + "kind": "array", + "type": { + "$ref": "1336" + }, + "value": [ + { + "$id": "7290", + "kind": "model", + "type": { + "$ref": "1337" + }, + "value": { + "$id": "7291", + "type": { + "$id": "7292", + "kind": "string", + "type": { + "$ref": "206" + }, + "value": "PassThrough" + }, + "inputs": { + "$id": "7293", + "kind": "array", + "type": { + "$ref": "1346" + }, + "value": [ + { + "$id": "7294", + "kind": "string", + "type": { + "$ref": "1347" + }, + "value": "*" + } + ] + }, + "output": { + "$id": "7295", + "kind": "string", + "type": { + "$ref": "1355" + }, + "value": "*" + } + } + } + ] + } + } + } + } + }, + { + "$id": "7296", + "kind": "model", + "type": { + "$ref": "1246" + }, + "value": { + "$id": "7297", + "operationType": { + "$id": "7298", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Destination" + }, + "name": { + "$id": "7299", + "kind": "string", + "type": { + "$ref": "1251" + }, + "value": "destination1" + }, + "destinationSettings": { + "$id": "7300", + "kind": "model", + "type": { + "$ref": "1363" + }, + "value": { + "$id": "7301", + "endpointRef": { + "$id": "7302", + "kind": "string", + "type": { + "$ref": "1365" + }, + "value": "aio-builtin-broker-endpoint" + }, + "dataDestination": { + "$id": "7303", + "kind": "string", + "type": { + "$ref": "1369" + }, + "value": "data/filtered/thermostat" + } + } + } + } + } + ] + } + } + }, + "extendedLocation": { + "$id": "7304", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "7305", + "name": { + "$id": "7306", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "7307", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "7308", + "response": { + "$ref": "6816" + }, + "statusCode": 200, + "bodyValue": { + "$id": "7309", + "kind": "model", + "type": { + "$ref": "1238" + }, + "value": { + "$id": "7310", + "properties": { + "$id": "7311", + "kind": "model", + "type": { + "$ref": "1240" + }, + "value": { + "$id": "7312", + "mode": { + "$id": "7313", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "operations": { + "$id": "7314", + "kind": "array", + "type": { + "$ref": "1245" + }, + "value": [ + { + "$id": "7315", + "kind": "model", + "type": { + "$ref": "1246" + }, + "value": { + "$id": "7316", + "operationType": { + "$id": "7317", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Source" + }, + "name": { + "$id": "7318", + "kind": "string", + "type": { + "$ref": "1251" + }, + "value": "source1" + }, + "sourceSettings": { + "$id": "7319", + "kind": "model", + "type": { + "$ref": "1255" + }, + "value": { + "$id": "7320", + "endpointRef": { + "$id": "7321", + "kind": "string", + "type": { + "$ref": "1257" + }, + "value": "aio-builtin-broker-endpoint" + }, + "dataSources": { + "$id": "7322", + "kind": "array", + "type": { + "$ref": "1272" + }, + "value": [ + { + "$id": "7323", + "kind": "string", + "type": { + "$ref": "1273" + }, + "value": "azure-iot-operations/data/thermostat" + } + ] + } + } + } + } + }, + { + "$id": "7324", + "kind": "model", + "type": { + "$ref": "1246" + }, + "value": { + "$id": "7325", + "operationType": { + "$id": "7326", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "BuiltInTransformation" + }, + "name": { + "$id": "7327", + "kind": "string", + "type": { + "$ref": "1251" + }, + "value": "transformation1" + }, + "builtInTransformationSettings": { + "$id": "7328", + "kind": "model", + "type": { + "$ref": "1280" + }, + "value": { + "$id": "7329", + "filter": { + "$id": "7330", + "kind": "array", + "type": { + "$ref": "1315" + }, + "value": [ + { + "$id": "7331", + "kind": "model", + "type": { + "$ref": "1316" + }, + "value": { + "$id": "7332", + "type": { + "$id": "7333", + "kind": "string", + "type": { + "$ref": "202" + }, + "value": "Filter" + }, + "description": { + "$id": "7334", + "kind": "string", + "type": { + "$ref": "1321" + }, + "value": "filter-datapoint" + }, + "inputs": { + "$id": "7335", + "kind": "array", + "type": { + "$ref": "1325" + }, + "value": [ + { + "$id": "7336", + "kind": "string", + "type": { + "$ref": "1326" + }, + "value": "temperature.Value" + }, + { + "$id": "7337", + "kind": "string", + "type": { + "$ref": "1326" + }, + "value": "\"Tag 10\".Value" + } + ] + }, + "expression": { + "$id": "7338", + "kind": "string", + "type": { + "$ref": "1330" + }, + "value": "$1 > 9000 && $2 >= 8000" + } + } + } + ] + }, + "map": { + "$id": "7339", + "kind": "array", + "type": { + "$ref": "1336" + }, + "value": [ + { + "$id": "7340", + "kind": "model", + "type": { + "$ref": "1337" + }, + "value": { + "$id": "7341", + "type": { + "$id": "7342", + "kind": "string", + "type": { + "$ref": "206" + }, + "value": "PassThrough" + }, + "inputs": { + "$id": "7343", + "kind": "array", + "type": { + "$ref": "1346" + }, + "value": [ + { + "$id": "7344", + "kind": "string", + "type": { + "$ref": "1347" + }, + "value": "*" + } + ] + }, + "output": { + "$id": "7345", + "kind": "string", + "type": { + "$ref": "1355" + }, + "value": "*" + } + } + } + ] + } + } + } + } + }, + { + "$id": "7346", + "kind": "model", + "type": { + "$ref": "1246" + }, + "value": { + "$id": "7347", + "operationType": { + "$id": "7348", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Destination" + }, + "name": { + "$id": "7349", + "kind": "string", + "type": { + "$ref": "1251" + }, + "value": "destination1" + }, + "destinationSettings": { + "$id": "7350", + "kind": "model", + "type": { + "$ref": "1363" + }, + "value": { + "$id": "7351", + "endpointRef": { + "$id": "7352", + "kind": "string", + "type": { + "$ref": "1365" + }, + "value": "aio-builtin-broker-endpoint" + }, + "dataDestination": { + "$id": "7353", + "kind": "string", + "type": { + "$ref": "1369" + }, + "value": "data/filtered/thermostat" + } + } + } + } + } + ] + }, + "provisioningState": { + "$id": "7354", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "7355", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "7356", + "name": { + "$id": "7357", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "7358", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "7359", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123/dataflows/resource-name123" + }, + "name": { + "$id": "7360", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "jxhcpwgfkxqasbexkookvxk" + }, + "type": { + "$id": "7361", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "zkuozvgjseokfchkscoswthzjdry" + }, + "systemData": { + "$id": "7362", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "7363", + "createdBy": { + "$id": "7364", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "7365", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "7366", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "7367", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "7368", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "7369", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "7370", + "response": { + "$ref": "6817" + }, + "statusCode": 201, + "bodyValue": { + "$id": "7371", + "kind": "model", + "type": { + "$ref": "1238" + }, + "value": { + "$id": "7372", + "properties": { + "$id": "7373", + "kind": "model", + "type": { + "$ref": "1240" + }, + "value": { + "$id": "7374", + "mode": { + "$id": "7375", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "operations": { + "$id": "7376", + "kind": "array", + "type": { + "$ref": "1245" + }, + "value": [ + { + "$id": "7377", + "kind": "model", + "type": { + "$ref": "1246" + }, + "value": { + "$id": "7378", + "operationType": { + "$id": "7379", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Source" + }, + "name": { + "$id": "7380", + "kind": "string", + "type": { + "$ref": "1251" + }, + "value": "source1" + }, + "sourceSettings": { + "$id": "7381", + "kind": "model", + "type": { + "$ref": "1255" + }, + "value": { + "$id": "7382", + "endpointRef": { + "$id": "7383", + "kind": "string", + "type": { + "$ref": "1257" + }, + "value": "aio-builtin-broker-endpoint" + }, + "dataSources": { + "$id": "7384", + "kind": "array", + "type": { + "$ref": "1272" + }, + "value": [ + { + "$id": "7385", + "kind": "string", + "type": { + "$ref": "1273" + }, + "value": "azure-iot-operations/data/thermostat" + } + ] + } + } + } + } + }, + { + "$id": "7386", + "kind": "model", + "type": { + "$ref": "1246" + }, + "value": { + "$id": "7387", + "operationType": { + "$id": "7388", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "BuiltInTransformation" + }, + "name": { + "$id": "7389", + "kind": "string", + "type": { + "$ref": "1251" + }, + "value": "transformation1" + }, + "builtInTransformationSettings": { + "$id": "7390", + "kind": "model", + "type": { + "$ref": "1280" + }, + "value": { + "$id": "7391", + "filter": { + "$id": "7392", + "kind": "array", + "type": { + "$ref": "1315" + }, + "value": [ + { + "$id": "7393", + "kind": "model", + "type": { + "$ref": "1316" + }, + "value": { + "$id": "7394", + "type": { + "$id": "7395", + "kind": "string", + "type": { + "$ref": "202" + }, + "value": "Filter" + }, + "description": { + "$id": "7396", + "kind": "string", + "type": { + "$ref": "1321" + }, + "value": "filter-datapoint" + }, + "inputs": { + "$id": "7397", + "kind": "array", + "type": { + "$ref": "1325" + }, + "value": [ + { + "$id": "7398", + "kind": "string", + "type": { + "$ref": "1326" + }, + "value": "temperature.Value" + }, + { + "$id": "7399", + "kind": "string", + "type": { + "$ref": "1326" + }, + "value": "\"Tag 10\".Value" + } + ] + }, + "expression": { + "$id": "7400", + "kind": "string", + "type": { + "$ref": "1330" + }, + "value": "$1 > 9000 && $2 >= 8000" + } + } + } + ] + }, + "map": { + "$id": "7401", + "kind": "array", + "type": { + "$ref": "1336" + }, + "value": [ + { + "$id": "7402", + "kind": "model", + "type": { + "$ref": "1337" + }, + "value": { + "$id": "7403", + "type": { + "$id": "7404", + "kind": "string", + "type": { + "$ref": "206" + }, + "value": "PassThrough" + }, + "inputs": { + "$id": "7405", + "kind": "array", + "type": { + "$ref": "1346" + }, + "value": [ + { + "$id": "7406", + "kind": "string", + "type": { + "$ref": "1347" + }, + "value": "*" + } + ] + }, + "output": { + "$id": "7407", + "kind": "string", + "type": { + "$ref": "1355" + }, + "value": "*" + } + } + } + ] + } + } + } + } + }, + { + "$id": "7408", + "kind": "model", + "type": { + "$ref": "1246" + }, + "value": { + "$id": "7409", + "operationType": { + "$id": "7410", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Destination" + }, + "name": { + "$id": "7411", + "kind": "string", + "type": { + "$ref": "1251" + }, + "value": "destination1" + }, + "destinationSettings": { + "$id": "7412", + "kind": "model", + "type": { + "$ref": "1363" + }, + "value": { + "$id": "7413", + "endpointRef": { + "$id": "7414", + "kind": "string", + "type": { + "$ref": "1365" + }, + "value": "aio-builtin-broker-endpoint" + }, + "dataDestination": { + "$id": "7415", + "kind": "string", + "type": { + "$ref": "1369" + }, + "value": "data/filtered/thermostat" + } + } + } + } + } + ] + }, + "provisioningState": { + "$id": "7416", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "7417", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "7418", + "name": { + "$id": "7419", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "7420", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "7421", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123/dataflows/resource-name123" + }, + "name": { + "$id": "7422", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "jxhcpwgfkxqasbexkookvxk" + }, + "type": { + "$id": "7423", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "zkuozvgjseokfchkscoswthzjdry" + }, + "systemData": { + "$id": "7424", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "7425", + "createdBy": { + "$id": "7426", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "7427", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "7428", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "7429", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "7430", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "7431", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + }, + { + "$id": "7432", + "kind": "http", + "name": "Dataflow_CreateOrUpdate", + "description": "Dataflow_CreateOrUpdate", + "filePath": "2025-04-01/Dataflow_CreateOrUpdate_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "7433", + "parameter": { + "$ref": "6794" + }, + "value": { + "$id": "7434", + "kind": "string", + "type": { + "$ref": "6795" + }, + "value": "2025-04-01" + } + }, + { + "$id": "7435", + "parameter": { + "$ref": "6798" + }, + "value": { + "$id": "7436", + "kind": "string", + "type": { + "$ref": "6799" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "7437", + "parameter": { + "$ref": "6801" + }, + "value": { + "$id": "7438", + "kind": "string", + "type": { + "$ref": "6802" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "7439", + "parameter": { + "$ref": "6803" + }, + "value": { + "$id": "7440", + "kind": "string", + "type": { + "$ref": "6804" + }, + "value": "resource-name123" + } + }, + { + "$id": "7441", + "parameter": { + "$ref": "6805" + }, + "value": { + "$id": "7442", + "kind": "string", + "type": { + "$ref": "6806" + }, + "value": "resource-name123" + } + }, + { + "$id": "7443", + "parameter": { + "$ref": "6807" + }, + "value": { + "$id": "7444", + "kind": "string", + "type": { + "$ref": "6808" + }, + "value": "resource-name123" + } + }, + { + "$id": "7445", + "parameter": { + "$ref": "6815" + }, + "value": { + "$id": "7446", + "kind": "model", + "type": { + "$ref": "1238" + }, + "value": { + "$id": "7447", + "properties": { + "$id": "7448", + "kind": "model", + "type": { + "$ref": "1240" + }, + "value": { + "$id": "7449", + "mode": { + "$id": "7450", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "operations": { + "$id": "7451", + "kind": "array", + "type": { + "$ref": "1245" + }, + "value": [ + { + "$id": "7452", + "kind": "model", + "type": { + "$ref": "1246" + }, + "value": { + "$id": "7453", + "operationType": { + "$id": "7454", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Source" + }, + "name": { + "$id": "7455", + "kind": "string", + "type": { + "$ref": "1251" + }, + "value": "knnafvkwoeakm" + }, + "sourceSettings": { + "$id": "7456", + "kind": "model", + "type": { + "$ref": "1255" + }, + "value": { + "$id": "7457", + "endpointRef": { + "$id": "7458", + "kind": "string", + "type": { + "$ref": "1257" + }, + "value": "iixotodhvhkkfcfyrkoveslqig" + }, + "assetRef": { + "$id": "7459", + "kind": "string", + "type": { + "$ref": "1261" + }, + "value": "zayyykwmckaocywdkohmu" + }, + "serializationFormat": { + "$id": "7460", + "kind": "string", + "type": { + "$ref": "190" + }, + "value": "Json" + }, + "schemaRef": { + "$id": "7461", + "kind": "string", + "type": { + "$ref": "1268" + }, + "value": "pknmdzqll" + }, + "dataSources": { + "$id": "7462", + "kind": "array", + "type": { + "$ref": "1272" + }, + "value": [ + { + "$id": "7463", + "kind": "string", + "type": { + "$ref": "1273" + }, + "value": "chkkpymxhp" + } + ] + } + } + }, + "builtInTransformationSettings": { + "$id": "7464", + "kind": "model", + "type": { + "$ref": "1280" + }, + "value": { + "$id": "7465", + "serializationFormat": { + "$id": "7466", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "Delta" + }, + "schemaRef": { + "$id": "7467", + "kind": "string", + "type": { + "$ref": "1285" + }, + "value": "mcdc" + }, + "datasets": { + "$id": "7468", + "kind": "array", + "type": { + "$ref": "1289" + }, + "value": [ + { + "$id": "7469", + "kind": "model", + "type": { + "$ref": "1290" + }, + "value": { + "$id": "7470", + "key": { + "$id": "7471", + "kind": "string", + "type": { + "$ref": "1292" + }, + "value": "qsfqcgxaxnhfumrsdsokwyv" + }, + "description": { + "$id": "7472", + "kind": "string", + "type": { + "$ref": "1296" + }, + "value": "Lorem ipsum odor amet, consectetuer adipiscing elit." + }, + "schemaRef": { + "$id": "7473", + "kind": "string", + "type": { + "$ref": "1300" + }, + "value": "n" + }, + "inputs": { + "$id": "7474", + "kind": "array", + "type": { + "$ref": "1304" + }, + "value": [ + { + "$id": "7475", + "kind": "string", + "type": { + "$ref": "1305" + }, + "value": "mosffpsslifkq" + } + ] + }, + "expression": { + "$id": "7476", + "kind": "string", + "type": { + "$ref": "1309" + }, + "value": "aatbwomvflemsxialv" + } + } + } + ] + }, + "filter": { + "$id": "7477", + "kind": "array", + "type": { + "$ref": "1315" + }, + "value": [ + { + "$id": "7478", + "kind": "model", + "type": { + "$ref": "1316" + }, + "value": { + "$id": "7479", + "type": { + "$id": "7480", + "kind": "string", + "type": { + "$ref": "202" + }, + "value": "Filter" + }, + "description": { + "$id": "7481", + "kind": "string", + "type": { + "$ref": "1321" + }, + "value": "Lorem ipsum odor amet, consectetuer adipiscing elit." + }, + "inputs": { + "$id": "7482", + "kind": "array", + "type": { + "$ref": "1325" + }, + "value": [ + { + "$id": "7483", + "kind": "string", + "type": { + "$ref": "1326" + }, + "value": "sxmjkbntgb" + } + ] + }, + "expression": { + "$id": "7484", + "kind": "string", + "type": { + "$ref": "1330" + }, + "value": "n" + } + } + } + ] + }, + "map": { + "$id": "7485", + "kind": "array", + "type": { + "$ref": "1336" + }, + "value": [ + { + "$id": "7486", + "kind": "model", + "type": { + "$ref": "1337" + }, + "value": { + "$id": "7487", + "type": { + "$id": "7488", + "kind": "string", + "type": { + "$ref": "206" + }, + "value": "NewProperties" + }, + "description": { + "$id": "7489", + "kind": "string", + "type": { + "$ref": "1342" + }, + "value": "Lorem ipsum odor amet, consectetuer adipiscing elit." + }, + "inputs": { + "$id": "7490", + "kind": "array", + "type": { + "$ref": "1346" + }, + "value": [ + { + "$id": "7491", + "kind": "string", + "type": { + "$ref": "1347" + }, + "value": "xsbxuk" + } + ] + }, + "expression": { + "$id": "7492", + "kind": "string", + "type": { + "$ref": "1351" + }, + "value": "txoiltogsarwkzalsphvlmt" + }, + "output": { + "$id": "7493", + "kind": "string", + "type": { + "$ref": "1355" + }, + "value": "nvgtmkfl" + } + } + } + ] + } + } + }, + "destinationSettings": { + "$id": "7494", + "kind": "model", + "type": { + "$ref": "1363" + }, + "value": { + "$id": "7495", + "endpointRef": { + "$id": "7496", + "kind": "string", + "type": { + "$ref": "1365" + }, + "value": "kybkchnzimerguekuvqlqiqdvvrt" + }, + "dataDestination": { + "$id": "7497", + "kind": "string", + "type": { + "$ref": "1369" + }, + "value": "cbrh" + } + } + } + } + } + ] + } + } + }, + "extendedLocation": { + "$id": "7498", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "7499", + "name": { + "$id": "7500", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "7501", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "7502", + "response": { + "$ref": "6816" + }, + "statusCode": 200, + "bodyValue": { + "$id": "7503", + "kind": "model", + "type": { + "$ref": "1238" + }, + "value": { + "$id": "7504", + "properties": { + "$id": "7505", + "kind": "model", + "type": { + "$ref": "1240" + }, + "value": { + "$id": "7506", + "mode": { + "$id": "7507", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "operations": { + "$id": "7508", + "kind": "array", + "type": { + "$ref": "1245" + }, + "value": [ + { + "$id": "7509", + "kind": "model", + "type": { + "$ref": "1246" + }, + "value": { + "$id": "7510", + "operationType": { + "$id": "7511", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Source" + }, + "name": { + "$id": "7512", + "kind": "string", + "type": { + "$ref": "1251" + }, + "value": "knnafvkwoeakm" + }, + "sourceSettings": { + "$id": "7513", + "kind": "model", + "type": { + "$ref": "1255" + }, + "value": { + "$id": "7514", + "endpointRef": { + "$id": "7515", + "kind": "string", + "type": { + "$ref": "1257" + }, + "value": "iixotodhvhkkfcfyrkoveslqig" + }, + "assetRef": { + "$id": "7516", + "kind": "string", + "type": { + "$ref": "1261" + }, + "value": "zayyykwmckaocywdkohmu" + }, + "serializationFormat": { + "$id": "7517", + "kind": "string", + "type": { + "$ref": "190" + }, + "value": "Json" + }, + "schemaRef": { + "$id": "7518", + "kind": "string", + "type": { + "$ref": "1268" + }, + "value": "pknmdzqll" + }, + "dataSources": { + "$id": "7519", + "kind": "array", + "type": { + "$ref": "1272" + }, + "value": [ + { + "$id": "7520", + "kind": "string", + "type": { + "$ref": "1273" + }, + "value": "chkkpymxhp" + } + ] + } + } + }, + "builtInTransformationSettings": { + "$id": "7521", + "kind": "model", + "type": { + "$ref": "1280" + }, + "value": { + "$id": "7522", + "serializationFormat": { + "$id": "7523", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "Delta" + }, + "schemaRef": { + "$id": "7524", + "kind": "string", + "type": { + "$ref": "1285" + }, + "value": "mcdc" + }, + "datasets": { + "$id": "7525", + "kind": "array", + "type": { + "$ref": "1289" + }, + "value": [ + { + "$id": "7526", + "kind": "model", + "type": { + "$ref": "1290" + }, + "value": { + "$id": "7527", + "key": { + "$id": "7528", + "kind": "string", + "type": { + "$ref": "1292" + }, + "value": "qsfqcgxaxnhfumrsdsokwyv" + }, + "description": { + "$id": "7529", + "kind": "string", + "type": { + "$ref": "1296" + }, + "value": "Lorem ipsum odor amet, consectetuer adipiscing elit." + }, + "schemaRef": { + "$id": "7530", + "kind": "string", + "type": { + "$ref": "1300" + }, + "value": "n" + }, + "inputs": { + "$id": "7531", + "kind": "array", + "type": { + "$ref": "1304" + }, + "value": [ + { + "$id": "7532", + "kind": "string", + "type": { + "$ref": "1305" + }, + "value": "mosffpsslifkq" + } + ] + }, + "expression": { + "$id": "7533", + "kind": "string", + "type": { + "$ref": "1309" + }, + "value": "aatbwomvflemsxialv" + } + } + } + ] + }, + "filter": { + "$id": "7534", + "kind": "array", + "type": { + "$ref": "1315" + }, + "value": [ + { + "$id": "7535", + "kind": "model", + "type": { + "$ref": "1316" + }, + "value": { + "$id": "7536", + "type": { + "$id": "7537", + "kind": "string", + "type": { + "$ref": "202" + }, + "value": "Filter" + }, + "description": { + "$id": "7538", + "kind": "string", + "type": { + "$ref": "1321" + }, + "value": "Lorem ipsum odor amet, consectetuer adipiscing elit." + }, + "inputs": { + "$id": "7539", + "kind": "array", + "type": { + "$ref": "1325" + }, + "value": [ + { + "$id": "7540", + "kind": "string", + "type": { + "$ref": "1326" + }, + "value": "sxmjkbntgb" + } + ] + }, + "expression": { + "$id": "7541", + "kind": "string", + "type": { + "$ref": "1330" + }, + "value": "n" + } + } + } + ] + }, + "map": { + "$id": "7542", + "kind": "array", + "type": { + "$ref": "1336" + }, + "value": [ + { + "$id": "7543", + "kind": "model", + "type": { + "$ref": "1337" + }, + "value": { + "$id": "7544", + "type": { + "$id": "7545", + "kind": "string", + "type": { + "$ref": "206" + }, + "value": "NewProperties" + }, + "description": { + "$id": "7546", + "kind": "string", + "type": { + "$ref": "1342" + }, + "value": "Lorem ipsum odor amet, consectetuer adipiscing elit." + }, + "inputs": { + "$id": "7547", + "kind": "array", + "type": { + "$ref": "1346" + }, + "value": [ + { + "$id": "7548", + "kind": "string", + "type": { + "$ref": "1347" + }, + "value": "xsbxuk" + } + ] + }, + "expression": { + "$id": "7549", + "kind": "string", + "type": { + "$ref": "1351" + }, + "value": "txoiltogsarwkzalsphvlmt" + }, + "output": { + "$id": "7550", + "kind": "string", + "type": { + "$ref": "1355" + }, + "value": "nvgtmkfl" + } + } + } + ] + } + } + }, + "destinationSettings": { + "$id": "7551", + "kind": "model", + "type": { + "$ref": "1363" + }, + "value": { + "$id": "7552", + "endpointRef": { + "$id": "7553", + "kind": "string", + "type": { + "$ref": "1365" + }, + "value": "kybkchnzimerguekuvqlqiqdvvrt" + }, + "dataDestination": { + "$id": "7554", + "kind": "string", + "type": { + "$ref": "1369" + }, + "value": "cbrh" + } + } + } + } + } + ] + }, + "provisioningState": { + "$id": "7555", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "7556", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "7557", + "name": { + "$id": "7558", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "7559", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "7560", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123/dataflows/resource-name123" + }, + "name": { + "$id": "7561", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "jxhcpwgfkxqasbexkookvxk" + }, + "type": { + "$id": "7562", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "zkuozvgjseokfchkscoswthzjdry" + }, + "systemData": { + "$id": "7563", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "7564", + "createdBy": { + "$id": "7565", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "7566", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "7567", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "7568", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "7569", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "7570", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "7571", + "response": { + "$ref": "6817" + }, + "statusCode": 201, + "bodyValue": { + "$id": "7572", + "kind": "model", + "type": { + "$ref": "1238" + }, + "value": { + "$id": "7573", + "properties": { + "$id": "7574", + "kind": "model", + "type": { + "$ref": "1240" + }, + "value": { + "$id": "7575", + "mode": { + "$id": "7576", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "operations": { + "$id": "7577", + "kind": "array", + "type": { + "$ref": "1245" + }, + "value": [ + { + "$id": "7578", + "kind": "model", + "type": { + "$ref": "1246" + }, + "value": { + "$id": "7579", + "operationType": { + "$id": "7580", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Source" + }, + "name": { + "$id": "7581", + "kind": "string", + "type": { + "$ref": "1251" + }, + "value": "knnafvkwoeakm" + }, + "sourceSettings": { + "$id": "7582", + "kind": "model", + "type": { + "$ref": "1255" + }, + "value": { + "$id": "7583", + "endpointRef": { + "$id": "7584", + "kind": "string", + "type": { + "$ref": "1257" + }, + "value": "iixotodhvhkkfcfyrkoveslqig" + }, + "assetRef": { + "$id": "7585", + "kind": "string", + "type": { + "$ref": "1261" + }, + "value": "zayyykwmckaocywdkohmu" + }, + "serializationFormat": { + "$id": "7586", + "kind": "string", + "type": { + "$ref": "190" + }, + "value": "Json" + }, + "schemaRef": { + "$id": "7587", + "kind": "string", + "type": { + "$ref": "1268" + }, + "value": "pknmdzqll" + }, + "dataSources": { + "$id": "7588", + "kind": "array", + "type": { + "$ref": "1272" + }, + "value": [ + { + "$id": "7589", + "kind": "string", + "type": { + "$ref": "1273" + }, + "value": "chkkpymxhp" + } + ] + } + } + }, + "builtInTransformationSettings": { + "$id": "7590", + "kind": "model", + "type": { + "$ref": "1280" + }, + "value": { + "$id": "7591", + "serializationFormat": { + "$id": "7592", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "Delta" + }, + "schemaRef": { + "$id": "7593", + "kind": "string", + "type": { + "$ref": "1285" + }, + "value": "mcdc" + }, + "datasets": { + "$id": "7594", + "kind": "array", + "type": { + "$ref": "1289" + }, + "value": [ + { + "$id": "7595", + "kind": "model", + "type": { + "$ref": "1290" + }, + "value": { + "$id": "7596", + "key": { + "$id": "7597", + "kind": "string", + "type": { + "$ref": "1292" + }, + "value": "qsfqcgxaxnhfumrsdsokwyv" + }, + "description": { + "$id": "7598", + "kind": "string", + "type": { + "$ref": "1296" + }, + "value": "Lorem ipsum odor amet, consectetuer adipiscing elit." + }, + "schemaRef": { + "$id": "7599", + "kind": "string", + "type": { + "$ref": "1300" + }, + "value": "n" + }, + "inputs": { + "$id": "7600", + "kind": "array", + "type": { + "$ref": "1304" + }, + "value": [ + { + "$id": "7601", + "kind": "string", + "type": { + "$ref": "1305" + }, + "value": "mosffpsslifkq" + } + ] + }, + "expression": { + "$id": "7602", + "kind": "string", + "type": { + "$ref": "1309" + }, + "value": "aatbwomvflemsxialv" + } + } + } + ] + }, + "filter": { + "$id": "7603", + "kind": "array", + "type": { + "$ref": "1315" + }, + "value": [ + { + "$id": "7604", + "kind": "model", + "type": { + "$ref": "1316" + }, + "value": { + "$id": "7605", + "type": { + "$id": "7606", + "kind": "string", + "type": { + "$ref": "202" + }, + "value": "Filter" + }, + "description": { + "$id": "7607", + "kind": "string", + "type": { + "$ref": "1321" + }, + "value": "Lorem ipsum odor amet, consectetuer adipiscing elit." + }, + "inputs": { + "$id": "7608", + "kind": "array", + "type": { + "$ref": "1325" + }, + "value": [ + { + "$id": "7609", + "kind": "string", + "type": { + "$ref": "1326" + }, + "value": "sxmjkbntgb" + } + ] + }, + "expression": { + "$id": "7610", + "kind": "string", + "type": { + "$ref": "1330" + }, + "value": "n" + } + } + } + ] + }, + "map": { + "$id": "7611", + "kind": "array", + "type": { + "$ref": "1336" + }, + "value": [ + { + "$id": "7612", + "kind": "model", + "type": { + "$ref": "1337" + }, + "value": { + "$id": "7613", + "type": { + "$id": "7614", + "kind": "string", + "type": { + "$ref": "206" + }, + "value": "NewProperties" + }, + "description": { + "$id": "7615", + "kind": "string", + "type": { + "$ref": "1342" + }, + "value": "Lorem ipsum odor amet, consectetuer adipiscing elit." + }, + "inputs": { + "$id": "7616", + "kind": "array", + "type": { + "$ref": "1346" + }, + "value": [ + { + "$id": "7617", + "kind": "string", + "type": { + "$ref": "1347" + }, + "value": "xsbxuk" + } + ] + }, + "expression": { + "$id": "7618", + "kind": "string", + "type": { + "$ref": "1351" + }, + "value": "txoiltogsarwkzalsphvlmt" + }, + "output": { + "$id": "7619", + "kind": "string", + "type": { + "$ref": "1355" + }, + "value": "nvgtmkfl" + } + } + } + ] + } + } + }, + "destinationSettings": { + "$id": "7620", + "kind": "model", + "type": { + "$ref": "1363" + }, + "value": { + "$id": "7621", + "endpointRef": { + "$id": "7622", + "kind": "string", + "type": { + "$ref": "1365" + }, + "value": "kybkchnzimerguekuvqlqiqdvvrt" + }, + "dataDestination": { + "$id": "7623", + "kind": "string", + "type": { + "$ref": "1369" + }, + "value": "cbrh" + } + } + } + } + } + ] + }, + "provisioningState": { + "$id": "7624", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "7625", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "7626", + "name": { + "$id": "7627", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "7628", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "7629", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123/dataflows/resource-name123" + }, + "name": { + "$id": "7630", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "jxhcpwgfkxqasbexkookvxk" + }, + "type": { + "$id": "7631", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "zkuozvgjseokfchkscoswthzjdry" + }, + "systemData": { + "$id": "7632", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "7633", + "createdBy": { + "$id": "7634", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "7635", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "7636", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "7637", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "7638", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "7639", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + }, + { + "$id": "7640", + "kind": "http", + "name": "Dataflow_CreateOrUpdate_SimpleEventGrid", + "description": "Dataflow_CreateOrUpdate_SimpleEventGrid", + "filePath": "2025-04-01/Dataflow_CreateOrUpdate_SimpleEventGrid.json", + "parameters": [ + { + "$id": "7641", + "parameter": { + "$ref": "6794" + }, + "value": { + "$id": "7642", + "kind": "string", + "type": { + "$ref": "6795" + }, + "value": "2025-04-01" + } + }, + { + "$id": "7643", + "parameter": { + "$ref": "6798" + }, + "value": { + "$id": "7644", + "kind": "string", + "type": { + "$ref": "6799" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "7645", + "parameter": { + "$ref": "6801" + }, + "value": { + "$id": "7646", + "kind": "string", + "type": { + "$ref": "6802" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "7647", + "parameter": { + "$ref": "6803" + }, + "value": { + "$id": "7648", + "kind": "string", + "type": { + "$ref": "6804" + }, + "value": "resource-name123" + } + }, + { + "$id": "7649", + "parameter": { + "$ref": "6805" + }, + "value": { + "$id": "7650", + "kind": "string", + "type": { + "$ref": "6806" + }, + "value": "resource-name123" + } + }, + { + "$id": "7651", + "parameter": { + "$ref": "6807" + }, + "value": { + "$id": "7652", + "kind": "string", + "type": { + "$ref": "6808" + }, + "value": "aio-to-event-grid" + } + }, + { + "$id": "7653", + "parameter": { + "$ref": "6815" + }, + "value": { + "$id": "7654", + "kind": "model", + "type": { + "$ref": "1238" + }, + "value": { + "$id": "7655", + "properties": { + "$id": "7656", + "kind": "model", + "type": { + "$ref": "1240" + }, + "value": { + "$id": "7657", + "mode": { + "$id": "7658", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "operations": { + "$id": "7659", + "kind": "array", + "type": { + "$ref": "1245" + }, + "value": [ + { + "$id": "7660", + "kind": "model", + "type": { + "$ref": "1246" + }, + "value": { + "$id": "7661", + "operationType": { + "$id": "7662", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Source" + }, + "name": { + "$id": "7663", + "kind": "string", + "type": { + "$ref": "1251" + }, + "value": "source1" + }, + "sourceSettings": { + "$id": "7664", + "kind": "model", + "type": { + "$ref": "1255" + }, + "value": { + "$id": "7665", + "endpointRef": { + "$id": "7666", + "kind": "string", + "type": { + "$ref": "1257" + }, + "value": "aio-builtin-broker-endpoint" + }, + "dataSources": { + "$id": "7667", + "kind": "array", + "type": { + "$ref": "1272" + }, + "value": [ + { + "$id": "7668", + "kind": "string", + "type": { + "$ref": "1273" + }, + "value": "thermostats/+/telemetry/temperature/#" + } + ] + } + } + } + } + }, + { + "$id": "7669", + "kind": "model", + "type": { + "$ref": "1246" + }, + "value": { + "$id": "7670", + "operationType": { + "$id": "7671", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Destination" + }, + "name": { + "$id": "7672", + "kind": "string", + "type": { + "$ref": "1251" + }, + "value": "destination1" + }, + "destinationSettings": { + "$id": "7673", + "kind": "model", + "type": { + "$ref": "1363" + }, + "value": { + "$id": "7674", + "endpointRef": { + "$id": "7675", + "kind": "string", + "type": { + "$ref": "1365" + }, + "value": "event-grid-endpoint" + }, + "dataDestination": { + "$id": "7676", + "kind": "string", + "type": { + "$ref": "1369" + }, + "value": "factory/telemetry" + } + } + } + } + } + ] + } + } + }, + "extendedLocation": { + "$id": "7677", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "7678", + "name": { + "$id": "7679", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "7680", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "7681", + "response": { + "$ref": "6816" + }, + "statusCode": 200, + "bodyValue": { + "$id": "7682", + "kind": "model", + "type": { + "$ref": "1238" + }, + "value": { + "$id": "7683", + "properties": { + "$id": "7684", + "kind": "model", + "type": { + "$ref": "1240" + }, + "value": { + "$id": "7685", + "mode": { + "$id": "7686", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "operations": { + "$id": "7687", + "kind": "array", + "type": { + "$ref": "1245" + }, + "value": [ + { + "$id": "7688", + "kind": "model", + "type": { + "$ref": "1246" + }, + "value": { + "$id": "7689", + "operationType": { + "$id": "7690", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Source" + }, + "name": { + "$id": "7691", + "kind": "string", + "type": { + "$ref": "1251" + }, + "value": "source1" + }, + "sourceSettings": { + "$id": "7692", + "kind": "model", + "type": { + "$ref": "1255" + }, + "value": { + "$id": "7693", + "endpointRef": { + "$id": "7694", + "kind": "string", + "type": { + "$ref": "1257" + }, + "value": "aio-builtin-broker-endpoint" + }, + "dataSources": { + "$id": "7695", + "kind": "array", + "type": { + "$ref": "1272" + }, + "value": [ + { + "$id": "7696", + "kind": "string", + "type": { + "$ref": "1273" + }, + "value": "thermostats/+/telemetry/temperature/#" + } + ] + } + } + } + } + }, + { + "$id": "7697", + "kind": "model", + "type": { + "$ref": "1246" + }, + "value": { + "$id": "7698", + "operationType": { + "$id": "7699", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Destination" + }, + "name": { + "$id": "7700", + "kind": "string", + "type": { + "$ref": "1251" + }, + "value": "destination1" + }, + "destinationSettings": { + "$id": "7701", + "kind": "model", + "type": { + "$ref": "1363" + }, + "value": { + "$id": "7702", + "endpointRef": { + "$id": "7703", + "kind": "string", + "type": { + "$ref": "1365" + }, + "value": "event-grid-endpoint" + }, + "dataDestination": { + "$id": "7704", + "kind": "string", + "type": { + "$ref": "1369" + }, + "value": "factory/telemetry" + } + } + } + } + } + ] + }, + "provisioningState": { + "$id": "7705", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "7706", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "7707", + "name": { + "$id": "7708", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "7709", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "7710", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123/dataflows/resource-name123" + }, + "name": { + "$id": "7711", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "jxhcpwgfkxqasbexkookvxk" + }, + "type": { + "$id": "7712", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "zkuozvgjseokfchkscoswthzjdry" + }, + "systemData": { + "$id": "7713", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "7714", + "createdBy": { + "$id": "7715", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "7716", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "7717", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "7718", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "7719", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "7720", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "7721", + "response": { + "$ref": "6817" + }, + "statusCode": 201, + "bodyValue": { + "$id": "7722", + "kind": "model", + "type": { + "$ref": "1238" + }, + "value": { + "$id": "7723", + "properties": { + "$id": "7724", + "kind": "model", + "type": { + "$ref": "1240" + }, + "value": { + "$id": "7725", + "mode": { + "$id": "7726", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "operations": { + "$id": "7727", + "kind": "array", + "type": { + "$ref": "1245" + }, + "value": [ + { + "$id": "7728", + "kind": "model", + "type": { + "$ref": "1246" + }, + "value": { + "$id": "7729", + "operationType": { + "$id": "7730", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Source" + }, + "name": { + "$id": "7731", + "kind": "string", + "type": { + "$ref": "1251" + }, + "value": "source1" + }, + "sourceSettings": { + "$id": "7732", + "kind": "model", + "type": { + "$ref": "1255" + }, + "value": { + "$id": "7733", + "endpointRef": { + "$id": "7734", + "kind": "string", + "type": { + "$ref": "1257" + }, + "value": "aio-builtin-broker-endpoint" + }, + "dataSources": { + "$id": "7735", + "kind": "array", + "type": { + "$ref": "1272" + }, + "value": [ + { + "$id": "7736", + "kind": "string", + "type": { + "$ref": "1273" + }, + "value": "thermostats/+/telemetry/temperature/#" + } + ] + } + } + } + } + }, + { + "$id": "7737", + "kind": "model", + "type": { + "$ref": "1246" + }, + "value": { + "$id": "7738", + "operationType": { + "$id": "7739", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Destination" + }, + "name": { + "$id": "7740", + "kind": "string", + "type": { + "$ref": "1251" + }, + "value": "destination1" + }, + "destinationSettings": { + "$id": "7741", + "kind": "model", + "type": { + "$ref": "1363" + }, + "value": { + "$id": "7742", + "endpointRef": { + "$id": "7743", + "kind": "string", + "type": { + "$ref": "1365" + }, + "value": "event-grid-endpoint" + }, + "dataDestination": { + "$id": "7744", + "kind": "string", + "type": { + "$ref": "1369" + }, + "value": "factory/telemetry" + } + } + } + } + } + ] + }, + "provisioningState": { + "$id": "7745", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "7746", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "7747", + "name": { + "$id": "7748", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "7749", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "7750", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123/dataflows/resource-name123" + }, + "name": { + "$id": "7751", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "jxhcpwgfkxqasbexkookvxk" + }, + "type": { + "$id": "7752", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "zkuozvgjseokfchkscoswthzjdry" + }, + "systemData": { + "$id": "7753", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "7754", + "createdBy": { + "$id": "7755", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "7756", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "7757", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "7758", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "7759", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "7760", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + }, + { + "$id": "7761", + "kind": "http", + "name": "Dataflow_CreateOrUpdate_SimpleFabric", + "description": "Dataflow_CreateOrUpdate_SimpleFabric", + "filePath": "2025-04-01/Dataflow_CreateOrUpdate_SimpleFabric.json", + "parameters": [ + { + "$id": "7762", + "parameter": { + "$ref": "6794" + }, + "value": { + "$id": "7763", + "kind": "string", + "type": { + "$ref": "6795" + }, + "value": "2025-04-01" + } + }, + { + "$id": "7764", + "parameter": { + "$ref": "6798" + }, + "value": { + "$id": "7765", + "kind": "string", + "type": { + "$ref": "6799" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "7766", + "parameter": { + "$ref": "6801" + }, + "value": { + "$id": "7767", + "kind": "string", + "type": { + "$ref": "6802" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "7768", + "parameter": { + "$ref": "6803" + }, + "value": { + "$id": "7769", + "kind": "string", + "type": { + "$ref": "6804" + }, + "value": "resource-name123" + } + }, + { + "$id": "7770", + "parameter": { + "$ref": "6805" + }, + "value": { + "$id": "7771", + "kind": "string", + "type": { + "$ref": "6806" + }, + "value": "resource-name123" + } + }, + { + "$id": "7772", + "parameter": { + "$ref": "6807" + }, + "value": { + "$id": "7773", + "kind": "string", + "type": { + "$ref": "6808" + }, + "value": "aio-to-fabric" + } + }, + { + "$id": "7774", + "parameter": { + "$ref": "6815" + }, + "value": { + "$id": "7775", + "kind": "model", + "type": { + "$ref": "1238" + }, + "value": { + "$id": "7776", + "properties": { + "$id": "7777", + "kind": "model", + "type": { + "$ref": "1240" + }, + "value": { + "$id": "7778", + "mode": { + "$id": "7779", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "operations": { + "$id": "7780", + "kind": "array", + "type": { + "$ref": "1245" + }, + "value": [ + { + "$id": "7781", + "kind": "model", + "type": { + "$ref": "1246" + }, + "value": { + "$id": "7782", + "operationType": { + "$id": "7783", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Source" + }, + "name": { + "$id": "7784", + "kind": "string", + "type": { + "$ref": "1251" + }, + "value": "source1" + }, + "sourceSettings": { + "$id": "7785", + "kind": "model", + "type": { + "$ref": "1255" + }, + "value": { + "$id": "7786", + "endpointRef": { + "$id": "7787", + "kind": "string", + "type": { + "$ref": "1257" + }, + "value": "aio-builtin-broker-endpoint" + }, + "dataSources": { + "$id": "7788", + "kind": "array", + "type": { + "$ref": "1272" + }, + "value": [ + { + "$id": "7789", + "kind": "string", + "type": { + "$ref": "1273" + }, + "value": "azure-iot-operations/data/thermostat" + } + ] + } + } + } + } + }, + { + "$id": "7790", + "kind": "model", + "type": { + "$ref": "1246" + }, + "value": { + "$id": "7791", + "operationType": { + "$id": "7792", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "BuiltInTransformation" + }, + "builtInTransformationSettings": { + "$id": "7793", + "kind": "model", + "type": { + "$ref": "1280" + }, + "value": { + "$id": "7794", + "serializationFormat": { + "$id": "7795", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "Parquet" + }, + "schemaRef": { + "$id": "7796", + "kind": "string", + "type": { + "$ref": "1285" + }, + "value": "aio-sr://exampleNamespace/exmapleParquetSchema:1.0.0" + } + } + } + } + }, + { + "$id": "7797", + "kind": "model", + "type": { + "$ref": "1246" + }, + "value": { + "$id": "7798", + "operationType": { + "$id": "7799", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Destination" + }, + "name": { + "$id": "7800", + "kind": "string", + "type": { + "$ref": "1251" + }, + "value": "destination1" + }, + "destinationSettings": { + "$id": "7801", + "kind": "model", + "type": { + "$ref": "1363" + }, + "value": { + "$id": "7802", + "endpointRef": { + "$id": "7803", + "kind": "string", + "type": { + "$ref": "1365" + }, + "value": "fabric-endpoint" + }, + "dataDestination": { + "$id": "7804", + "kind": "string", + "type": { + "$ref": "1369" + }, + "value": "telemetryTable" + } + } + } + } + } + ] + } + } + }, + "extendedLocation": { + "$id": "7805", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "7806", + "name": { + "$id": "7807", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "7808", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "7809", + "response": { + "$ref": "6816" + }, + "statusCode": 200, + "bodyValue": { + "$id": "7810", + "kind": "model", + "type": { + "$ref": "1238" + }, + "value": { + "$id": "7811", + "properties": { + "$id": "7812", + "kind": "model", + "type": { + "$ref": "1240" + }, + "value": { + "$id": "7813", + "mode": { + "$id": "7814", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "operations": { + "$id": "7815", + "kind": "array", + "type": { + "$ref": "1245" + }, + "value": [ + { + "$id": "7816", + "kind": "model", + "type": { + "$ref": "1246" + }, + "value": { + "$id": "7817", + "operationType": { + "$id": "7818", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Source" + }, + "name": { + "$id": "7819", + "kind": "string", + "type": { + "$ref": "1251" + }, + "value": "source1" + }, + "sourceSettings": { + "$id": "7820", + "kind": "model", + "type": { + "$ref": "1255" + }, + "value": { + "$id": "7821", + "endpointRef": { + "$id": "7822", + "kind": "string", + "type": { + "$ref": "1257" + }, + "value": "aio-builtin-broker-endpoint" + }, + "dataSources": { + "$id": "7823", + "kind": "array", + "type": { + "$ref": "1272" + }, + "value": [ + { + "$id": "7824", + "kind": "string", + "type": { + "$ref": "1273" + }, + "value": "azure-iot-operations/data/thermostat" + } + ] + } + } + } + } + }, + { + "$id": "7825", + "kind": "model", + "type": { + "$ref": "1246" + }, + "value": { + "$id": "7826", + "operationType": { + "$id": "7827", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "BuiltInTransformation" + }, + "builtInTransformationSettings": { + "$id": "7828", + "kind": "model", + "type": { + "$ref": "1280" + }, + "value": { + "$id": "7829", + "serializationFormat": { + "$id": "7830", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "Parquet" + }, + "schemaRef": { + "$id": "7831", + "kind": "string", + "type": { + "$ref": "1285" + }, + "value": "aio-sr://exampleNamespace/exmapleParquetSchema:1.0.0" + } + } + } + } + }, + { + "$id": "7832", + "kind": "model", + "type": { + "$ref": "1246" + }, + "value": { + "$id": "7833", + "operationType": { + "$id": "7834", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Destination" + }, + "name": { + "$id": "7835", + "kind": "string", + "type": { + "$ref": "1251" + }, + "value": "destination1" + }, + "destinationSettings": { + "$id": "7836", + "kind": "model", + "type": { + "$ref": "1363" + }, + "value": { + "$id": "7837", + "endpointRef": { + "$id": "7838", + "kind": "string", + "type": { + "$ref": "1365" + }, + "value": "fabric-endpoint" + }, + "dataDestination": { + "$id": "7839", + "kind": "string", + "type": { + "$ref": "1369" + }, + "value": "telemetryTable" + } + } + } + } + } + ] + }, + "provisioningState": { + "$id": "7840", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "7841", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "7842", + "name": { + "$id": "7843", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "7844", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "7845", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123/dataflows/resource-name123" + }, + "name": { + "$id": "7846", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "jxhcpwgfkxqasbexkookvxk" + }, + "type": { + "$id": "7847", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "zkuozvgjseokfchkscoswthzjdry" + }, + "systemData": { + "$id": "7848", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "7849", + "createdBy": { + "$id": "7850", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "7851", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "7852", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "7853", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "7854", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "7855", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "7856", + "response": { + "$ref": "6817" + }, + "statusCode": 201, + "bodyValue": { + "$id": "7857", + "kind": "model", + "type": { + "$ref": "1238" + }, + "value": { + "$id": "7858", + "properties": { + "$id": "7859", + "kind": "model", + "type": { + "$ref": "1240" + }, + "value": { + "$id": "7860", + "mode": { + "$id": "7861", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "operations": { + "$id": "7862", + "kind": "array", + "type": { + "$ref": "1245" + }, + "value": [ + { + "$id": "7863", + "kind": "model", + "type": { + "$ref": "1246" + }, + "value": { + "$id": "7864", + "operationType": { + "$id": "7865", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Source" + }, + "name": { + "$id": "7866", + "kind": "string", + "type": { + "$ref": "1251" + }, + "value": "source1" + }, + "sourceSettings": { + "$id": "7867", + "kind": "model", + "type": { + "$ref": "1255" + }, + "value": { + "$id": "7868", + "endpointRef": { + "$id": "7869", + "kind": "string", + "type": { + "$ref": "1257" + }, + "value": "aio-builtin-broker-endpoint" + }, + "dataSources": { + "$id": "7870", + "kind": "array", + "type": { + "$ref": "1272" + }, + "value": [ + { + "$id": "7871", + "kind": "string", + "type": { + "$ref": "1273" + }, + "value": "azure-iot-operations/data/thermostat" + } + ] + } + } + } + } + }, + { + "$id": "7872", + "kind": "model", + "type": { + "$ref": "1246" + }, + "value": { + "$id": "7873", + "operationType": { + "$id": "7874", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "BuiltInTransformation" + }, + "builtInTransformationSettings": { + "$id": "7875", + "kind": "model", + "type": { + "$ref": "1280" + }, + "value": { + "$id": "7876", + "serializationFormat": { + "$id": "7877", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "Parquet" + }, + "schemaRef": { + "$id": "7878", + "kind": "string", + "type": { + "$ref": "1285" + }, + "value": "aio-sr://exampleNamespace/exmapleParquetSchema:1.0.0" + } + } + } + } + }, + { + "$id": "7879", + "kind": "model", + "type": { + "$ref": "1246" + }, + "value": { + "$id": "7880", + "operationType": { + "$id": "7881", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Destination" + }, + "name": { + "$id": "7882", + "kind": "string", + "type": { + "$ref": "1251" + }, + "value": "destination1" + }, + "destinationSettings": { + "$id": "7883", + "kind": "model", + "type": { + "$ref": "1363" + }, + "value": { + "$id": "7884", + "endpointRef": { + "$id": "7885", + "kind": "string", + "type": { + "$ref": "1365" + }, + "value": "fabric-endpoint" + }, + "dataDestination": { + "$id": "7886", + "kind": "string", + "type": { + "$ref": "1369" + }, + "value": "telemetryTable" + } + } + } + } + } + ] + }, + "provisioningState": { + "$id": "7887", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "7888", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "7889", + "name": { + "$id": "7890", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "7891", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "7892", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123/dataflows/resource-name123" + }, + "name": { + "$id": "7893", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "jxhcpwgfkxqasbexkookvxk" + }, + "type": { + "$id": "7894", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "zkuozvgjseokfchkscoswthzjdry" + }, + "systemData": { + "$id": "7895", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "7896", + "createdBy": { + "$id": "7897", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "7898", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "7899", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "7900", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "7901", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "7902", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "7903", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "7904", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7905", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "7906", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7907", + "name": "dataflowProfileName", + "nameInRequest": "dataflowProfileName", + "doc": "Name of Instance dataflowProfile resource", + "type": { + "$id": "7908", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7909", + "name": "dataflowName", + "nameInRequest": "dataflowName", + "doc": "Name of Instance dataflowProfile dataflow resource", + "type": { + "$id": "7910", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7911", + "name": "resource", + "nameInRequest": "resource", + "doc": "Resource create parameters.", + "type": { + "$ref": "1238" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7912", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "7913", + "kind": "constant", + "valueType": { + "$id": "7914", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7915", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "7916", + "kind": "constant", + "valueType": { + "$id": "7917", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "7918", + "type": { + "$ref": "1238" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Dataflow.createOrUpdate" + }, + { + "$id": "7919", + "kind": "lro", + "name": "delete", + "accessibility": "public", + "apiVersions": [ + "2024-11-01", + "2025-04-01" + ], + "doc": "Delete a DataflowResource", + "operation": { + "$id": "7920", + "name": "delete", + "resourceName": "DataflowResource", + "doc": "Delete a DataflowResource", + "accessibility": "public", + "parameters": [ + { + "$id": "7921", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "7922", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "7923", + "type": { + "$id": "7924", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-04-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7925", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "7926", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "7927", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7928", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "7929", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7930", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "7931", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7932", + "name": "dataflowProfileName", + "nameInRequest": "dataflowProfileName", + "doc": "Name of Instance dataflowProfile resource", + "type": { + "$id": "7933", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7934", + "name": "dataflowName", + "nameInRequest": "dataflowName", + "doc": "Name of Instance dataflowProfile dataflow resource", + "type": { + "$id": "7935", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7936", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "7937", + "kind": "constant", + "valueType": { + "$id": "7938", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "7939", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "7940", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "7941", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "7942", + "name": "retryAfter", + "nameInResponse": "Retry-After", + "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "type": { + "$id": "7943", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false + }, + { + "$id": "7944", + "statusCodes": [ + 204 + ], + "headers": [], + "isErrorResponse": false + } + ], + "httpMethod": "DELETE", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/dataflowProfiles/{dataflowProfileName}/dataflows/{dataflowName}", + "bufferResponse": true, + "longRunning": { + "$id": "7945", + "finalStateVia": 1, + "finalResponse": { + "$id": "7946", + "statusCodes": [ + 204 + ] + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Dataflow.delete", + "decorators": [], + "examples": [ + { + "$id": "7947", + "kind": "http", + "name": "Dataflow_Delete", + "description": "Dataflow_Delete", + "filePath": "2025-04-01/Dataflow_Delete_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "7948", + "parameter": { + "$ref": "7921" + }, + "value": { + "$id": "7949", + "kind": "string", + "type": { + "$ref": "7922" + }, + "value": "2025-04-01" + } + }, + { + "$id": "7950", + "parameter": { + "$ref": "7925" + }, + "value": { + "$id": "7951", + "kind": "string", + "type": { + "$ref": "7926" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "7952", + "parameter": { + "$ref": "7928" + }, + "value": { + "$id": "7953", + "kind": "string", + "type": { + "$ref": "7929" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "7954", + "parameter": { + "$ref": "7930" + }, + "value": { + "$id": "7955", + "kind": "string", + "type": { + "$ref": "7931" + }, + "value": "resource-name123" + } + }, + { + "$id": "7956", + "parameter": { + "$ref": "7932" + }, + "value": { + "$id": "7957", + "kind": "string", + "type": { + "$ref": "7933" + }, + "value": "resource-name123" + } + }, + { + "$id": "7958", + "parameter": { + "$ref": "7934" + }, + "value": { + "$id": "7959", + "kind": "string", + "type": { + "$ref": "7935" + }, + "value": "resource-name123" + } + } + ], + "responses": [ + { + "$id": "7960", + "response": { + "$ref": "7939" + }, + "statusCode": 202 + }, + { + "$id": "7961", + "response": { + "$ref": "7944" + }, + "statusCode": 204 + } + ] + } + ] + }, + "parameters": [ + { + "$id": "7962", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "7963", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7964", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "7965", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7966", + "name": "dataflowProfileName", + "nameInRequest": "dataflowProfileName", + "doc": "Name of Instance dataflowProfile resource", + "type": { + "$id": "7967", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7968", + "name": "dataflowName", + "nameInRequest": "dataflowName", + "doc": "Name of Instance dataflowProfile dataflow resource", + "type": { + "$id": "7969", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7970", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "7971", + "kind": "constant", + "valueType": { + "$id": "7972", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "7973" + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Dataflow.delete" + }, + { + "$id": "7974", + "kind": "paging", + "name": "listByResourceGroup", + "accessibility": "public", + "apiVersions": [ + "2024-11-01", + "2025-04-01" + ], + "doc": "List DataflowResource resources by DataflowProfileResource", + "operation": { + "$id": "7975", + "name": "listByResourceGroup", + "resourceName": "DataflowResource", + "doc": "List DataflowResource resources by DataflowProfileResource", + "accessibility": "public", + "parameters": [ + { + "$id": "7976", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "7977", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "7978", + "type": { + "$id": "7979", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-04-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7980", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "7981", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "7982", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7983", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "7984", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7985", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "7986", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7987", + "name": "dataflowProfileName", + "nameInRequest": "dataflowProfileName", + "doc": "Name of Instance dataflowProfile resource", + "type": { + "$id": "7988", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7989", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "7990", + "kind": "constant", + "valueType": { + "$id": "7991", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "7992", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1387" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/dataflowProfiles/{dataflowProfileName}/dataflows", + "bufferResponse": true, + "paging": { + "$id": "7993", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "7994", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Dataflow.listByResourceGroup", + "decorators": [], + "examples": [ + { + "$id": "7995", + "kind": "http", + "name": "Dataflow_ListByProfileResource", + "description": "Dataflow_ListByProfileResource", + "filePath": "2025-04-01/Dataflow_ListByProfileResource_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "7996", + "parameter": { + "$ref": "7976" + }, + "value": { + "$id": "7997", + "kind": "string", + "type": { + "$ref": "7977" + }, + "value": "2025-04-01" + } + }, + { + "$id": "7998", + "parameter": { + "$ref": "7980" + }, + "value": { + "$id": "7999", + "kind": "string", + "type": { + "$ref": "7981" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "8000", + "parameter": { + "$ref": "7983" + }, + "value": { + "$id": "8001", + "kind": "string", + "type": { + "$ref": "7984" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "8002", + "parameter": { + "$ref": "7985" + }, + "value": { + "$id": "8003", + "kind": "string", + "type": { + "$ref": "7986" + }, + "value": "resource-name123" + } + }, + { + "$id": "8004", + "parameter": { + "$ref": "7987" + }, + "value": { + "$id": "8005", + "kind": "string", + "type": { + "$ref": "7988" + }, + "value": "resource-name123" + } + } + ], + "responses": [ + { + "$id": "8006", + "response": { + "$ref": "7992" + }, + "statusCode": 200, + "bodyValue": { + "$id": "8007", + "kind": "model", + "type": { + "$ref": "1387" + }, + "value": { + "$id": "8008", + "value": { + "$id": "8009", + "kind": "array", + "type": { + "$ref": "1389" + }, + "value": [ + { + "$id": "8010", + "kind": "model", + "type": { + "$ref": "1238" + }, + "value": { + "$id": "8011", + "properties": { + "$id": "8012", + "kind": "model", + "type": { + "$ref": "1240" + }, + "value": { + "$id": "8013", + "mode": { + "$id": "8014", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "operations": { + "$id": "8015", + "kind": "array", + "type": { + "$ref": "1245" + }, + "value": [ + { + "$id": "8016", + "kind": "model", + "type": { + "$ref": "1246" + }, + "value": { + "$id": "8017", + "operationType": { + "$id": "8018", + "kind": "string", + "type": { + "$ref": "182" + }, + "value": "Source" + }, + "name": { + "$id": "8019", + "kind": "string", + "type": { + "$ref": "1251" + }, + "value": "knnafvkwoeakm" + }, + "sourceSettings": { + "$id": "8020", + "kind": "model", + "type": { + "$ref": "1255" + }, + "value": { + "$id": "8021", + "endpointRef": { + "$id": "8022", + "kind": "string", + "type": { + "$ref": "1257" + }, + "value": "iixotodhvhkkfcfyrkoveslqig" + }, + "assetRef": { + "$id": "8023", + "kind": "string", + "type": { + "$ref": "1261" + }, + "value": "zayyykwmckaocywdkohmu" + }, + "serializationFormat": { + "$id": "8024", + "kind": "string", + "type": { + "$ref": "190" + }, + "value": "Json" + }, + "schemaRef": { + "$id": "8025", + "kind": "string", + "type": { + "$ref": "1268" + }, + "value": "pknmdzqll" + }, + "dataSources": { + "$id": "8026", + "kind": "array", + "type": { + "$ref": "1272" + }, + "value": [ + { + "$id": "8027", + "kind": "string", + "type": { + "$ref": "1273" + }, + "value": "chkkpymxhp" + } + ] + } + } + }, + "builtInTransformationSettings": { + "$id": "8028", + "kind": "model", + "type": { + "$ref": "1280" + }, + "value": { + "$id": "8029", + "serializationFormat": { + "$id": "8030", + "kind": "string", + "type": { + "$ref": "194" + }, + "value": "Delta" + }, + "schemaRef": { + "$id": "8031", + "kind": "string", + "type": { + "$ref": "1285" + }, + "value": "mcdc" + }, + "datasets": { + "$id": "8032", + "kind": "array", + "type": { + "$ref": "1289" + }, + "value": [ + { + "$id": "8033", + "kind": "model", + "type": { + "$ref": "1290" + }, + "value": { + "$id": "8034", + "key": { + "$id": "8035", + "kind": "string", + "type": { + "$ref": "1292" + }, + "value": "qsfqcgxaxnhfumrsdsokwyv" + }, + "description": { + "$id": "8036", + "kind": "string", + "type": { + "$ref": "1296" + }, + "value": "Lorem ipsum odor amet, consectetuer adipiscing elit." + }, + "schemaRef": { + "$id": "8037", + "kind": "string", + "type": { + "$ref": "1300" + }, + "value": "n" + }, + "inputs": { + "$id": "8038", + "kind": "array", + "type": { + "$ref": "1304" + }, + "value": [ + { + "$id": "8039", + "kind": "string", + "type": { + "$ref": "1305" + }, + "value": "mosffpsslifkq" + } + ] + }, + "expression": { + "$id": "8040", + "kind": "string", + "type": { + "$ref": "1309" + }, + "value": "aatbwomvflemsxialv" + } + } + } + ] + }, + "filter": { + "$id": "8041", + "kind": "array", + "type": { + "$ref": "1315" + }, + "value": [ + { + "$id": "8042", + "kind": "model", + "type": { + "$ref": "1316" + }, + "value": { + "$id": "8043", + "type": { + "$id": "8044", + "kind": "string", + "type": { + "$ref": "202" + }, + "value": "Filter" + }, + "description": { + "$id": "8045", + "kind": "string", + "type": { + "$ref": "1321" + }, + "value": "Lorem ipsum odor amet, consectetuer adipiscing elit." + }, + "inputs": { + "$id": "8046", + "kind": "array", + "type": { + "$ref": "1325" + }, + "value": [ + { + "$id": "8047", + "kind": "string", + "type": { + "$ref": "1326" + }, + "value": "sxmjkbntgb" + } + ] + }, + "expression": { + "$id": "8048", + "kind": "string", + "type": { + "$ref": "1330" + }, + "value": "n" + } + } + } + ] + }, + "map": { + "$id": "8049", + "kind": "array", + "type": { + "$ref": "1336" + }, + "value": [ + { + "$id": "8050", + "kind": "model", + "type": { + "$ref": "1337" + }, + "value": { + "$id": "8051", + "type": { + "$id": "8052", + "kind": "string", + "type": { + "$ref": "206" + }, + "value": "NewProperties" + }, + "description": { + "$id": "8053", + "kind": "string", + "type": { + "$ref": "1342" + }, + "value": "Lorem ipsum odor amet, consectetuer adipiscing elit." + }, + "inputs": { + "$id": "8054", + "kind": "array", + "type": { + "$ref": "1346" + }, + "value": [ + { + "$id": "8055", + "kind": "string", + "type": { + "$ref": "1347" + }, + "value": "xsbxuk" + } + ] + }, + "expression": { + "$id": "8056", + "kind": "string", + "type": { + "$ref": "1351" + }, + "value": "txoiltogsarwkzalsphvlmt" + }, + "output": { + "$id": "8057", + "kind": "string", + "type": { + "$ref": "1355" + }, + "value": "nvgtmkfl" + } + } + } + ] + } + } + }, + "destinationSettings": { + "$id": "8058", + "kind": "model", + "type": { + "$ref": "1363" + }, + "value": { + "$id": "8059", + "endpointRef": { + "$id": "8060", + "kind": "string", + "type": { + "$ref": "1365" + }, + "value": "kybkchnzimerguekuvqlqiqdvvrt" + }, + "dataDestination": { + "$id": "8061", + "kind": "string", + "type": { + "$ref": "1369" + }, + "value": "cbrh" + } + } + } + } + } + ] + }, + "provisioningState": { + "$id": "8062", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "8063", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "8064", + "name": { + "$id": "8065", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "8066", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "8067", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowProfiles/resource-name123/dataflows/resource-name123" + }, + "name": { + "$id": "8068", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "jxhcpwgfkxqasbexkookvxk" + }, + "type": { + "$id": "8069", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "zkuozvgjseokfchkscoswthzjdry" + }, + "systemData": { + "$id": "8070", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "8071", + "createdBy": { + "$id": "8072", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "8073", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "8074", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "8075", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "8076", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "8077", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + ] + }, + "nextLink": { + "$id": "8078", + "kind": "string", + "type": { + "$ref": "1393" + }, + "value": "https://microsoft.com/a" + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "8079", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "8080", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "8081", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "8082", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "8083", + "name": "dataflowProfileName", + "nameInRequest": "dataflowProfileName", + "doc": "Name of Instance dataflowProfile resource", + "type": { + "$id": "8084", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "8085", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "7990" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "8086", + "type": { + "$id": "8087", + "kind": "array", + "name": "ArrayDataflowResource", + "valueType": { + "$ref": "1238" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "resultSegments": [ + "value" + ] + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Dataflow.listByResourceGroup" + } + ], + "parameters": [ + { + "$id": "8088", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "8089", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "location": "Uri", + "isApiVersion": false, + "isContentType": false, + "isRequired": true, + "isEndpoint": true, + "skipUrlEncoding": false, + "explode": false, + "kind": "Client", + "defaultValue": { + "$id": "8090", + "type": { + "$id": "8091", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "8092", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "8093" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.Dataflow", + "apiVersions": [ + "2024-11-01", + "2025-04-01" + ], + "parent": { + "$ref": "1710" + } + }, + { + "$id": "8094", + "kind": "client", + "name": "DataflowEndpoint", + "namespace": "Azure.ResourceManager.IotOperations", + "methods": [ + { + "$id": "8095", + "kind": "basic", + "name": "get", + "accessibility": "public", + "apiVersions": [ + "2024-11-01", + "2025-04-01" + ], + "doc": "Get a DataflowEndpointResource", + "operation": { + "$id": "8096", + "name": "get", + "resourceName": "DataflowEndpointResource", + "doc": "Get a DataflowEndpointResource", + "accessibility": "public", + "parameters": [ + { + "$id": "8097", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "8098", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "8099", + "type": { + "$id": "8100", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-04-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "8101", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "8102", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "8103", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "8104", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "8105", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "8106", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "8107", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "8108", + "name": "dataflowEndpointName", + "nameInRequest": "dataflowEndpointName", + "doc": "Name of Instance dataflowEndpoint resource", + "type": { + "$id": "8109", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "8110", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "8111", + "kind": "constant", + "valueType": { + "$id": "8112", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "8113", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1397" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/dataflowEndpoints/{dataflowEndpointName}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpoint.get", + "decorators": [], + "examples": [ + { + "$id": "8114", + "kind": "http", + "name": "DataflowEndpoint_Get", + "description": "DataflowEndpoint_Get", + "filePath": "2025-04-01/DataflowEndpoint_Get_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "8115", + "parameter": { + "$ref": "8097" + }, + "value": { + "$id": "8116", + "kind": "string", + "type": { + "$ref": "8098" + }, + "value": "2025-04-01" + } + }, + { + "$id": "8117", + "parameter": { + "$ref": "8101" + }, + "value": { + "$id": "8118", + "kind": "string", + "type": { + "$ref": "8102" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "8119", + "parameter": { + "$ref": "8104" + }, + "value": { + "$id": "8120", + "kind": "string", + "type": { + "$ref": "8105" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "8121", + "parameter": { + "$ref": "8106" + }, + "value": { + "$id": "8122", + "kind": "string", + "type": { + "$ref": "8107" + }, + "value": "resource-name123" + } + }, + { + "$id": "8123", + "parameter": { + "$ref": "8108" + }, + "value": { + "$id": "8124", + "kind": "string", + "type": { + "$ref": "8109" + }, + "value": "resource-name123" + } + } + ], + "responses": [ + { + "$id": "8125", + "response": { + "$ref": "8113" + }, + "statusCode": 200, + "bodyValue": { + "$id": "8126", + "kind": "model", + "type": { + "$ref": "1397" + }, + "value": { + "$id": "8127", + "properties": { + "$id": "8128", + "kind": "model", + "type": { + "$ref": "1399" + }, + "value": { + "$id": "8129", + "endpointType": { + "$id": "8130", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "DataExplorer" + }, + "dataExplorerSettings": { + "$id": "8131", + "kind": "model", + "type": { + "$ref": "1404" + }, + "value": { + "$id": "8132", + "authentication": { + "$id": "8133", + "kind": "model", + "type": { + "$ref": "1406" + }, + "value": { + "$id": "8134", + "method": { + "$id": "8135", + "kind": "string", + "type": { + "$ref": "232" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "8136", + "kind": "model", + "type": { + "$ref": "1411" + }, + "value": { + "$id": "8137", + "audience": { + "$id": "8138", + "kind": "string", + "type": { + "$ref": "1413" + }, + "value": "psxomrfbhoflycm" + } + } + }, + "userAssignedManagedIdentitySettings": { + "$id": "8139", + "kind": "model", + "type": { + "$ref": "1419" + }, + "value": { + "$id": "8140", + "clientId": { + "$id": "8141", + "kind": "string", + "type": { + "$ref": "1421" + }, + "value": "fb90f267-8872-431a-a76a-a1cec5d3c4d2" + }, + "scope": { + "$id": "8142", + "kind": "string", + "type": { + "$ref": "1425" + }, + "value": "zop" + }, + "tenantId": { + "$id": "8143", + "kind": "string", + "type": { + "$ref": "1429" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + } + } + }, + "database": { + "$id": "8144", + "kind": "string", + "type": { + "$ref": "1437" + }, + "value": "yqcdpjsifm" + }, + "host": { + "$id": "8145", + "kind": "string", + "type": { + "$ref": "1441" + }, + "value": "..kusto.windows.net" + }, + "batching": { + "$id": "8146", + "kind": "model", + "type": { + "$ref": "1445" + }, + "value": { + "$id": "8147", + "latencySeconds": { + "$id": "8148", + "kind": "number", + "type": { + "$ref": "1447" + }, + "value": 1228 + }, + "maxMessages": { + "$id": "8149", + "kind": "number", + "type": { + "$ref": "1451" + }, + "value": 171 + } + } + } + } + }, + "dataLakeStorageSettings": { + "$id": "8150", + "kind": "model", + "type": { + "$ref": "1459" + }, + "value": { + "$id": "8151", + "authentication": { + "$id": "8152", + "kind": "model", + "type": { + "$ref": "1461" + }, + "value": { + "$id": "8153", + "method": { + "$id": "8154", + "kind": "string", + "type": { + "$ref": "238" + }, + "value": "SystemAssignedManagedIdentity" + }, + "accessTokenSettings": { + "$id": "8155", + "kind": "model", + "type": { + "$ref": "1466" + }, + "value": { + "$id": "8156", + "secretRef": { + "$id": "8157", + "kind": "string", + "type": { + "$ref": "1468" + }, + "value": "sevriyphcvnlrnfudqzejecwa" + } + } + }, + "systemAssignedManagedIdentitySettings": { + "$id": "8158", + "kind": "model", + "type": { + "$ref": "1411" + }, + "value": { + "$id": "8159", + "audience": { + "$id": "8160", + "kind": "string", + "type": { + "$ref": "1413" + }, + "value": "psxomrfbhoflycm" + } + } + }, + "userAssignedManagedIdentitySettings": { + "$id": "8161", + "kind": "model", + "type": { + "$ref": "1419" + }, + "value": { + "$id": "8162", + "clientId": { + "$id": "8163", + "kind": "string", + "type": { + "$ref": "1421" + }, + "value": "fb90f267-8872-431a-a76a-a1cec5d3c4d2" + }, + "scope": { + "$id": "8164", + "kind": "string", + "type": { + "$ref": "1425" + }, + "value": "zop" + }, + "tenantId": { + "$id": "8165", + "kind": "string", + "type": { + "$ref": "1429" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + } + } + }, + "host": { + "$id": "8166", + "kind": "string", + "type": { + "$ref": "1482" + }, + "value": ".blob.core.windows.net" + }, + "batching": { + "$id": "8167", + "kind": "model", + "type": { + "$ref": "1445" + }, + "value": { + "$id": "8168", + "latencySeconds": { + "$id": "8169", + "kind": "number", + "type": { + "$ref": "1447" + }, + "value": 1228 + }, + "maxMessages": { + "$id": "8170", + "kind": "number", + "type": { + "$ref": "1451" + }, + "value": 171 + } + } + } + } + }, + "fabricOneLakeSettings": { + "$id": "8171", + "kind": "model", + "type": { + "$ref": "1491" + }, + "value": { + "$id": "8172", + "authentication": { + "$id": "8173", + "kind": "model", + "type": { + "$ref": "1493" + }, + "value": { + "$id": "8174", + "method": { + "$id": "8175", + "kind": "string", + "type": { + "$ref": "246" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "8176", + "kind": "model", + "type": { + "$ref": "1411" + }, + "value": { + "$id": "8177", + "audience": { + "$id": "8178", + "kind": "string", + "type": { + "$ref": "1413" + }, + "value": "psxomrfbhoflycm" + } + } + }, + "userAssignedManagedIdentitySettings": { + "$id": "8179", + "kind": "model", + "type": { + "$ref": "1419" + }, + "value": { + "$id": "8180", + "clientId": { + "$id": "8181", + "kind": "string", + "type": { + "$ref": "1421" + }, + "value": "fb90f267-8872-431a-a76a-a1cec5d3c4d2" + }, + "scope": { + "$id": "8182", + "kind": "string", + "type": { + "$ref": "1425" + }, + "value": "zop" + }, + "tenantId": { + "$id": "8183", + "kind": "string", + "type": { + "$ref": "1429" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + } + } + }, + "names": { + "$id": "8184", + "kind": "model", + "type": { + "$ref": "1506" + }, + "value": { + "$id": "8185", + "lakehouseName": { + "$id": "8186", + "kind": "string", + "type": { + "$ref": "1508" + }, + "value": "wpeathi" + }, + "workspaceName": { + "$id": "8187", + "kind": "string", + "type": { + "$ref": "1512" + }, + "value": "nwgmitkbljztgms" + } + } + }, + "oneLakePathType": { + "$id": "8188", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "Files" + }, + "host": { + "$id": "8189", + "kind": "string", + "type": { + "$ref": "1521" + }, + "value": "https://.fabric.microsoft.com" + }, + "batching": { + "$id": "8190", + "kind": "model", + "type": { + "$ref": "1445" + }, + "value": { + "$id": "8191", + "latencySeconds": { + "$id": "8192", + "kind": "number", + "type": { + "$ref": "1447" + }, + "value": 1228 + }, + "maxMessages": { + "$id": "8193", + "kind": "number", + "type": { + "$ref": "1451" + }, + "value": 171 + } + } + } + } + }, + "kafkaSettings": { + "$id": "8194", + "kind": "model", + "type": { + "$ref": "1530" + }, + "value": { + "$id": "8195", + "authentication": { + "$id": "8196", + "kind": "model", + "type": { + "$ref": "1532" + }, + "value": { + "$id": "8197", + "method": { + "$id": "8198", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "8199", + "kind": "model", + "type": { + "$ref": "1411" + }, + "value": { + "$id": "8200", + "audience": { + "$id": "8201", + "kind": "string", + "type": { + "$ref": "1413" + }, + "value": "psxomrfbhoflycm" + } + } + }, + "userAssignedManagedIdentitySettings": { + "$id": "8202", + "kind": "model", + "type": { + "$ref": "1419" + }, + "value": { + "$id": "8203", + "clientId": { + "$id": "8204", + "kind": "string", + "type": { + "$ref": "1421" + }, + "value": "fb90f267-8872-431a-a76a-a1cec5d3c4d2" + }, + "scope": { + "$id": "8205", + "kind": "string", + "type": { + "$ref": "1425" + }, + "value": "zop" + }, + "tenantId": { + "$id": "8206", + "kind": "string", + "type": { + "$ref": "1429" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + }, + "saslSettings": { + "$id": "8207", + "kind": "model", + "type": { + "$ref": "1543" + }, + "value": { + "$id": "8208", + "saslType": { + "$id": "8209", + "kind": "string", + "type": { + "$ref": "270" + }, + "value": "Plain" + }, + "secretRef": { + "$id": "8210", + "kind": "string", + "type": { + "$ref": "1548" + }, + "value": "visyxoztqnylvbyokhtmpdkwes" + } + } + }, + "x509CertificateSettings": { + "$id": "8211", + "kind": "model", + "type": { + "$ref": "1554" + }, + "value": { + "$id": "8212", + "secretRef": { + "$id": "8213", + "kind": "string", + "type": { + "$ref": "1556" + }, + "value": "afwizrystfslkfqd" + } + } + } + } + }, + "consumerGroupId": { + "$id": "8214", + "kind": "string", + "type": { + "$ref": "1564" + }, + "value": "ukkzcjiyenhxokat" + }, + "host": { + "$id": "8215", + "kind": "string", + "type": { + "$ref": "1568" + }, + "value": "pwcqfiqclcgneolpewnyavoulbip" + }, + "batching": { + "$id": "8216", + "kind": "model", + "type": { + "$ref": "1572" + }, + "value": { + "$id": "8217", + "mode": { + "$id": "8218", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "latencyMs": { + "$id": "8219", + "kind": "number", + "type": { + "$ref": "1577" + }, + "value": 3679 + }, + "maxBytes": { + "$id": "8220", + "kind": "number", + "type": { + "$ref": "1581" + }, + "value": 8887 + }, + "maxMessages": { + "$id": "8221", + "kind": "number", + "type": { + "$ref": "1585" + }, + "value": 2174 + } + } + }, + "copyMqttProperties": { + "$id": "8222", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "compression": { + "$id": "8223", + "kind": "string", + "type": { + "$ref": "278" + }, + "value": "None" + }, + "kafkaAcks": { + "$id": "8224", + "kind": "string", + "type": { + "$ref": "288" + }, + "value": "Zero" + }, + "partitionStrategy": { + "$id": "8225", + "kind": "string", + "type": { + "$ref": "296" + }, + "value": "Default" + }, + "tls": { + "$id": "8226", + "kind": "model", + "type": { + "$ref": "1603" + }, + "value": { + "$id": "8227", + "mode": { + "$id": "8228", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "trustedCaCertificateConfigMapRef": { + "$id": "8229", + "kind": "string", + "type": { + "$ref": "1608" + }, + "value": "tectjjvukvelsreihwadh" + } + } + }, + "cloudEventAttributes": { + "$id": "8230", + "kind": "string", + "type": { + "$ref": "306" + }, + "value": "PassThrough" + } + } + }, + "localStorageSettings": { + "$id": "8231", + "kind": "model", + "type": { + "$ref": "1619" + }, + "value": { + "$id": "8232", + "persistentVolumeClaimRef": { + "$id": "8233", + "kind": "string", + "type": { + "$ref": "1621" + }, + "value": "jjwqwvd" + } + } + }, + "mqttSettings": { + "$id": "8234", + "kind": "model", + "type": { + "$ref": "1627" + }, + "value": { + "$id": "8235", + "authentication": { + "$id": "8236", + "kind": "model", + "type": { + "$ref": "1629" + }, + "value": { + "$id": "8237", + "method": { + "$id": "8238", + "kind": "string", + "type": { + "$ref": "312" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "8239", + "kind": "model", + "type": { + "$ref": "1411" + }, + "value": { + "$id": "8240", + "audience": { + "$id": "8241", + "kind": "string", + "type": { + "$ref": "1413" + }, + "value": "psxomrfbhoflycm" + } + } + }, + "userAssignedManagedIdentitySettings": { + "$id": "8242", + "kind": "model", + "type": { + "$ref": "1419" + }, + "value": { + "$id": "8243", + "clientId": { + "$id": "8244", + "kind": "string", + "type": { + "$ref": "1421" + }, + "value": "fb90f267-8872-431a-a76a-a1cec5d3c4d2" + }, + "scope": { + "$id": "8245", + "kind": "string", + "type": { + "$ref": "1425" + }, + "value": "zop" + }, + "tenantId": { + "$id": "8246", + "kind": "string", + "type": { + "$ref": "1429" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + }, + "serviceAccountTokenSettings": { + "$id": "8247", + "kind": "model", + "type": { + "$ref": "1640" + }, + "value": { + "$id": "8248", + "audience": { + "$id": "8249", + "kind": "string", + "type": { + "$ref": "1642" + }, + "value": "ejbklrbxgjaqleoycgpje" + } + } + }, + "x509CertificateSettings": { + "$id": "8250", + "kind": "model", + "type": { + "$ref": "1554" + }, + "value": { + "$id": "8251", + "secretRef": { + "$id": "8252", + "kind": "string", + "type": { + "$ref": "1556" + }, + "value": "afwizrystfslkfqd" + } + } + } + } + }, + "clientIdPrefix": { + "$id": "8253", + "kind": "string", + "type": { + "$ref": "1653" + }, + "value": "kkljsdxdirfhwxtkavldekeqhv" + }, + "host": { + "$id": "8254", + "kind": "string", + "type": { + "$ref": "1657" + }, + "value": "nyhnxqnbspstctl" + }, + "protocol": { + "$id": "8255", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "Mqtt" + }, + "keepAliveSeconds": { + "$id": "8256", + "kind": "number", + "type": { + "$ref": "1664" + }, + "value": 0 + }, + "retain": { + "$id": "8257", + "kind": "string", + "type": { + "$ref": "324" + }, + "value": "Keep" + }, + "maxInflightMessages": { + "$id": "8258", + "kind": "number", + "type": { + "$ref": "1671" + }, + "value": 0 + }, + "qos": { + "$id": "8259", + "kind": "number", + "type": { + "$ref": "1675" + }, + "value": 1 + }, + "sessionExpirySeconds": { + "$id": "8260", + "kind": "number", + "type": { + "$ref": "1679" + }, + "value": 0 + }, + "tls": { + "$id": "8261", + "kind": "model", + "type": { + "$ref": "1603" + }, + "value": { + "$id": "8262", + "mode": { + "$id": "8263", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "trustedCaCertificateConfigMapRef": { + "$id": "8264", + "kind": "string", + "type": { + "$ref": "1608" + }, + "value": "tectjjvukvelsreihwadh" + } + } + }, + "cloudEventAttributes": { + "$id": "8265", + "kind": "string", + "type": { + "$ref": "306" + }, + "value": "PassThrough" + } + } + }, + "provisioningState": { + "$id": "8266", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "8267", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "8268", + "name": { + "$id": "8269", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "8270", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "8271", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowEndpoints/resource-name123" + }, + "name": { + "$id": "8272", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "zyhxscudobzfacetvgyjiav" + }, + "type": { + "$id": "8273", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "iay" + }, + "systemData": { + "$id": "8274", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "8275", + "createdBy": { + "$id": "8276", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "8277", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "8278", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "8279", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "8280", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "8281", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "8282", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "8283", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "8284", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "8285", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "8286", + "name": "dataflowEndpointName", + "nameInRequest": "dataflowEndpointName", + "doc": "Name of Instance dataflowEndpoint resource", + "type": { + "$id": "8287", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "8288", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "8111" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "8289", + "type": { + "$ref": "1397" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpoint.get" + }, + { + "$id": "8290", + "kind": "lro", + "name": "createOrUpdate", + "accessibility": "public", + "apiVersions": [ + "2024-11-01", + "2025-04-01" + ], + "doc": "Create a DataflowEndpointResource", + "operation": { + "$id": "8291", + "name": "createOrUpdate", + "resourceName": "DataflowEndpointResource", + "doc": "Create a DataflowEndpointResource", + "accessibility": "public", + "parameters": [ + { + "$id": "8292", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "8293", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "8294", + "type": { + "$id": "8295", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-04-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "8296", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "8297", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "8298", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "8299", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "8300", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "8301", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "8302", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "8303", + "name": "dataflowEndpointName", + "nameInRequest": "dataflowEndpointName", + "doc": "Name of Instance dataflowEndpoint resource", + "type": { + "$id": "8304", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "8305", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "8306", + "kind": "constant", + "valueType": { + "$id": "8307", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "8308", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "8309", + "kind": "constant", + "valueType": { + "$id": "8310", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "8311", + "name": "resource", + "nameInRequest": "resource", + "doc": "Resource create parameters.", + "type": { + "$ref": "1397" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "8312", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1397" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + { + "$id": "8313", + "statusCodes": [ + 201 + ], + "bodyType": { + "$ref": "1397" + }, + "headers": [ + { + "$id": "8314", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "8315", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "8316", + "name": "retryAfter", + "nameInResponse": "Retry-After", + "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "type": { + "$id": "8317", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "PUT", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/dataflowEndpoints/{dataflowEndpointName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "longRunning": { + "$id": "8318", + "finalStateVia": 0, + "finalResponse": { + "$id": "8319", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1397" + } + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpoint.createOrUpdate", + "decorators": [], + "examples": [ + { + "$id": "8320", + "kind": "http", + "name": "DataflowEndpoint_CreateOrUpdate_ADLSv2", + "description": "DataflowEndpoint_CreateOrUpdate_ADLSv2", + "filePath": "2025-04-01/DataflowEndpoint_CreateOrUpdate_ADLSv2.json", + "parameters": [ + { + "$id": "8321", + "parameter": { + "$ref": "8292" + }, + "value": { + "$id": "8322", + "kind": "string", + "type": { + "$ref": "8293" + }, + "value": "2025-04-01" + } + }, + { + "$id": "8323", + "parameter": { + "$ref": "8296" + }, + "value": { + "$id": "8324", + "kind": "string", + "type": { + "$ref": "8297" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "8325", + "parameter": { + "$ref": "8299" + }, + "value": { + "$id": "8326", + "kind": "string", + "type": { + "$ref": "8300" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "8327", + "parameter": { + "$ref": "8301" + }, + "value": { + "$id": "8328", + "kind": "string", + "type": { + "$ref": "8302" + }, + "value": "resource-name123" + } + }, + { + "$id": "8329", + "parameter": { + "$ref": "8303" + }, + "value": { + "$id": "8330", + "kind": "string", + "type": { + "$ref": "8304" + }, + "value": "adlsv2-endpoint" + } + }, + { + "$id": "8331", + "parameter": { + "$ref": "8311" + }, + "value": { + "$id": "8332", + "kind": "model", + "type": { + "$ref": "1397" + }, + "value": { + "$id": "8333", + "properties": { + "$id": "8334", + "kind": "model", + "type": { + "$ref": "1399" + }, + "value": { + "$id": "8335", + "endpointType": { + "$id": "8336", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "DataLakeStorage" + }, + "dataLakeStorageSettings": { + "$id": "8337", + "kind": "model", + "type": { + "$ref": "1459" + }, + "value": { + "$id": "8338", + "host": { + "$id": "8339", + "kind": "string", + "type": { + "$ref": "1482" + }, + "value": "example.blob.core.windows.net" + }, + "authentication": { + "$id": "8340", + "kind": "model", + "type": { + "$ref": "1461" + }, + "value": { + "$id": "8341", + "method": { + "$id": "8342", + "kind": "string", + "type": { + "$ref": "238" + }, + "value": "AccessToken" + }, + "accessTokenSettings": { + "$id": "8343", + "kind": "model", + "type": { + "$ref": "1466" + }, + "value": { + "$id": "8344", + "secretRef": { + "$id": "8345", + "kind": "string", + "type": { + "$ref": "1468" + }, + "value": "my-secret" + } + } + } + } + } + } + } + } + }, + "extendedLocation": { + "$id": "8346", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "8347", + "name": { + "$id": "8348", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "8349", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "8350", + "response": { + "$ref": "8312" + }, + "statusCode": 200, + "bodyValue": { + "$id": "8351", + "kind": "model", + "type": { + "$ref": "1397" + }, + "value": { + "$id": "8352", + "properties": { + "$id": "8353", + "kind": "model", + "type": { + "$ref": "1399" + }, + "value": { + "$id": "8354", + "endpointType": { + "$id": "8355", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "DataLakeStorage" + }, + "dataLakeStorageSettings": { + "$id": "8356", + "kind": "model", + "type": { + "$ref": "1459" + }, + "value": { + "$id": "8357", + "host": { + "$id": "8358", + "kind": "string", + "type": { + "$ref": "1482" + }, + "value": "example.blob.core.windows.net" + }, + "authentication": { + "$id": "8359", + "kind": "model", + "type": { + "$ref": "1461" + }, + "value": { + "$id": "8360", + "method": { + "$id": "8361", + "kind": "string", + "type": { + "$ref": "238" + }, + "value": "AccessToken" + }, + "accessTokenSettings": { + "$id": "8362", + "kind": "model", + "type": { + "$ref": "1466" + }, + "value": { + "$id": "8363", + "secretRef": { + "$id": "8364", + "kind": "string", + "type": { + "$ref": "1468" + }, + "value": "my-secret" + } + } + } + } + } + } + }, + "provisioningState": { + "$id": "8365", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "8366", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "8367", + "name": { + "$id": "8368", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "8369", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "8370", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowEndpoints/resource-name123" + }, + "name": { + "$id": "8371", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "zyhxscudobzfacetvgyjiav" + }, + "type": { + "$id": "8372", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "iay" + }, + "systemData": { + "$id": "8373", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "8374", + "createdBy": { + "$id": "8375", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "8376", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "8377", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "8378", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "8379", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "8380", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "8381", + "response": { + "$ref": "8313" + }, + "statusCode": 201, + "bodyValue": { + "$id": "8382", + "kind": "model", + "type": { + "$ref": "1397" + }, + "value": { + "$id": "8383", + "properties": { + "$id": "8384", + "kind": "model", + "type": { + "$ref": "1399" + }, + "value": { + "$id": "8385", + "endpointType": { + "$id": "8386", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "DataLakeStorage" + }, + "dataLakeStorageSettings": { + "$id": "8387", + "kind": "model", + "type": { + "$ref": "1459" + }, + "value": { + "$id": "8388", + "host": { + "$id": "8389", + "kind": "string", + "type": { + "$ref": "1482" + }, + "value": "example.blob.core.windows.net" + }, + "authentication": { + "$id": "8390", + "kind": "model", + "type": { + "$ref": "1461" + }, + "value": { + "$id": "8391", + "method": { + "$id": "8392", + "kind": "string", + "type": { + "$ref": "238" + }, + "value": "AccessToken" + }, + "accessTokenSettings": { + "$id": "8393", + "kind": "model", + "type": { + "$ref": "1466" + }, + "value": { + "$id": "8394", + "secretRef": { + "$id": "8395", + "kind": "string", + "type": { + "$ref": "1468" + }, + "value": "my-secret" + } + } + } + } + } + } + }, + "provisioningState": { + "$id": "8396", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "8397", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "8398", + "name": { + "$id": "8399", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "8400", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "8401", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowEndpoints/resource-name123" + }, + "name": { + "$id": "8402", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "zyhxscudobzfacetvgyjiav" + }, + "type": { + "$id": "8403", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "iay" + }, + "systemData": { + "$id": "8404", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "8405", + "createdBy": { + "$id": "8406", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "8407", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "8408", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "8409", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "8410", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "8411", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + }, + { + "$id": "8412", + "kind": "http", + "name": "DataflowEndpoint_CreateOrUpdate_ADX", + "description": "DataflowEndpoint_CreateOrUpdate_ADX", + "filePath": "2025-04-01/DataflowEndpoint_CreateOrUpdate_ADX.json", + "parameters": [ + { + "$id": "8413", + "parameter": { + "$ref": "8292" + }, + "value": { + "$id": "8414", + "kind": "string", + "type": { + "$ref": "8293" + }, + "value": "2025-04-01" + } + }, + { + "$id": "8415", + "parameter": { + "$ref": "8296" + }, + "value": { + "$id": "8416", + "kind": "string", + "type": { + "$ref": "8297" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "8417", + "parameter": { + "$ref": "8299" + }, + "value": { + "$id": "8418", + "kind": "string", + "type": { + "$ref": "8300" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "8419", + "parameter": { + "$ref": "8301" + }, + "value": { + "$id": "8420", + "kind": "string", + "type": { + "$ref": "8302" + }, + "value": "resource-name123" + } + }, + { + "$id": "8421", + "parameter": { + "$ref": "8303" + }, + "value": { + "$id": "8422", + "kind": "string", + "type": { + "$ref": "8304" + }, + "value": "adx-endpoint" + } + }, + { + "$id": "8423", + "parameter": { + "$ref": "8311" + }, + "value": { + "$id": "8424", + "kind": "model", + "type": { + "$ref": "1397" + }, + "value": { + "$id": "8425", + "properties": { + "$id": "8426", + "kind": "model", + "type": { + "$ref": "1399" + }, + "value": { + "$id": "8427", + "endpointType": { + "$id": "8428", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "DataExplorer" + }, + "dataExplorerSettings": { + "$id": "8429", + "kind": "model", + "type": { + "$ref": "1404" + }, + "value": { + "$id": "8430", + "host": { + "$id": "8431", + "kind": "string", + "type": { + "$ref": "1441" + }, + "value": "example.westeurope.kusto.windows.net" + }, + "authentication": { + "$id": "8432", + "kind": "model", + "type": { + "$ref": "1406" + }, + "value": { + "$id": "8433", + "method": { + "$id": "8434", + "kind": "string", + "type": { + "$ref": "232" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "8435", + "kind": "model", + "type": { + "$ref": "1411" + }, + "value": { + "$id": "8436" + } + } + } + }, + "database": { + "$id": "8437", + "kind": "string", + "type": { + "$ref": "1437" + }, + "value": "example-database" + }, + "batching": { + "$id": "8438", + "kind": "model", + "type": { + "$ref": "1445" + }, + "value": { + "$id": "8439", + "latencySeconds": { + "$id": "8440", + "kind": "number", + "type": { + "$ref": "1447" + }, + "value": 9312 + }, + "maxMessages": { + "$id": "8441", + "kind": "number", + "type": { + "$ref": "1451" + }, + "value": 9028 + } + } + } + } + } + } + }, + "extendedLocation": { + "$id": "8442", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "8443", + "name": { + "$id": "8444", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "8445", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "8446", + "response": { + "$ref": "8312" + }, + "statusCode": 200, + "bodyValue": { + "$id": "8447", + "kind": "model", + "type": { + "$ref": "1397" + }, + "value": { + "$id": "8448", + "properties": { + "$id": "8449", + "kind": "model", + "type": { + "$ref": "1399" + }, + "value": { + "$id": "8450", + "endpointType": { + "$id": "8451", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "DataExplorer" + }, + "dataExplorerSettings": { + "$id": "8452", + "kind": "model", + "type": { + "$ref": "1404" + }, + "value": { + "$id": "8453", + "host": { + "$id": "8454", + "kind": "string", + "type": { + "$ref": "1441" + }, + "value": "example.westeurope.kusto.windows.net" + }, + "authentication": { + "$id": "8455", + "kind": "model", + "type": { + "$ref": "1406" + }, + "value": { + "$id": "8456", + "method": { + "$id": "8457", + "kind": "string", + "type": { + "$ref": "232" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "8458", + "kind": "model", + "type": { + "$ref": "1411" + }, + "value": { + "$id": "8459" + } + } + } + }, + "database": { + "$id": "8460", + "kind": "string", + "type": { + "$ref": "1437" + }, + "value": "example-database" + }, + "batching": { + "$id": "8461", + "kind": "model", + "type": { + "$ref": "1445" + }, + "value": { + "$id": "8462", + "latencySeconds": { + "$id": "8463", + "kind": "number", + "type": { + "$ref": "1447" + }, + "value": 9312 + }, + "maxMessages": { + "$id": "8464", + "kind": "number", + "type": { + "$ref": "1451" + }, + "value": 9028 + } + } + } + } + }, + "provisioningState": { + "$id": "8465", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "8466", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "8467", + "name": { + "$id": "8468", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "8469", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "8470", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowEndpoints/resource-name123" + }, + "name": { + "$id": "8471", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "zyhxscudobzfacetvgyjiav" + }, + "type": { + "$id": "8472", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "iay" + }, + "systemData": { + "$id": "8473", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "8474", + "createdBy": { + "$id": "8475", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "8476", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "8477", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "8478", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "8479", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "8480", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "8481", + "response": { + "$ref": "8313" + }, + "statusCode": 201, + "bodyValue": { + "$id": "8482", + "kind": "model", + "type": { + "$ref": "1397" + }, + "value": { + "$id": "8483", + "properties": { + "$id": "8484", + "kind": "model", + "type": { + "$ref": "1399" + }, + "value": { + "$id": "8485", + "endpointType": { + "$id": "8486", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "DataExplorer" + }, + "dataExplorerSettings": { + "$id": "8487", + "kind": "model", + "type": { + "$ref": "1404" + }, + "value": { + "$id": "8488", + "host": { + "$id": "8489", + "kind": "string", + "type": { + "$ref": "1441" + }, + "value": "example.westeurope.kusto.windows.net" + }, + "authentication": { + "$id": "8490", + "kind": "model", + "type": { + "$ref": "1406" + }, + "value": { + "$id": "8491", + "method": { + "$id": "8492", + "kind": "string", + "type": { + "$ref": "232" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "8493", + "kind": "model", + "type": { + "$ref": "1411" + }, + "value": { + "$id": "8494" + } + } + } + }, + "database": { + "$id": "8495", + "kind": "string", + "type": { + "$ref": "1437" + }, + "value": "example-database" + }, + "batching": { + "$id": "8496", + "kind": "model", + "type": { + "$ref": "1445" + }, + "value": { + "$id": "8497", + "latencySeconds": { + "$id": "8498", + "kind": "number", + "type": { + "$ref": "1447" + }, + "value": 9312 + }, + "maxMessages": { + "$id": "8499", + "kind": "number", + "type": { + "$ref": "1451" + }, + "value": 9028 + } + } + } + } + }, + "provisioningState": { + "$id": "8500", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "8501", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "8502", + "name": { + "$id": "8503", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "8504", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "8505", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowEndpoints/resource-name123" + }, + "name": { + "$id": "8506", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "zyhxscudobzfacetvgyjiav" + }, + "type": { + "$id": "8507", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "iay" + }, + "systemData": { + "$id": "8508", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "8509", + "createdBy": { + "$id": "8510", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "8511", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "8512", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "8513", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "8514", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "8515", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + }, + { + "$id": "8516", + "kind": "http", + "name": "DataflowEndpoint_CreateOrUpdate_AIO", + "description": "DataflowEndpoint_CreateOrUpdate_AIO", + "filePath": "2025-04-01/DataflowEndpoint_CreateOrUpdate_AIO.json", + "parameters": [ + { + "$id": "8517", + "parameter": { + "$ref": "8292" + }, + "value": { + "$id": "8518", + "kind": "string", + "type": { + "$ref": "8293" + }, + "value": "2025-04-01" + } + }, + { + "$id": "8519", + "parameter": { + "$ref": "8296" + }, + "value": { + "$id": "8520", + "kind": "string", + "type": { + "$ref": "8297" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "8521", + "parameter": { + "$ref": "8299" + }, + "value": { + "$id": "8522", + "kind": "string", + "type": { + "$ref": "8300" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "8523", + "parameter": { + "$ref": "8301" + }, + "value": { + "$id": "8524", + "kind": "string", + "type": { + "$ref": "8302" + }, + "value": "resource-name123" + } + }, + { + "$id": "8525", + "parameter": { + "$ref": "8303" + }, + "value": { + "$id": "8526", + "kind": "string", + "type": { + "$ref": "8304" + }, + "value": "aio-builtin-broker-endpoint" + } + }, + { + "$id": "8527", + "parameter": { + "$ref": "8311" + }, + "value": { + "$id": "8528", + "kind": "model", + "type": { + "$ref": "1397" + }, + "value": { + "$id": "8529", + "properties": { + "$id": "8530", + "kind": "model", + "type": { + "$ref": "1399" + }, + "value": { + "$id": "8531", + "endpointType": { + "$id": "8532", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "Mqtt" + }, + "mqttSettings": { + "$id": "8533", + "kind": "model", + "type": { + "$ref": "1627" + }, + "value": { + "$id": "8534", + "host": { + "$id": "8535", + "kind": "string", + "type": { + "$ref": "1657" + }, + "value": "aio-broker:18883" + }, + "authentication": { + "$id": "8536", + "kind": "model", + "type": { + "$ref": "1629" + }, + "value": { + "$id": "8537", + "method": { + "$id": "8538", + "kind": "string", + "type": { + "$ref": "312" + }, + "value": "Kubernetes" + }, + "serviceAccountTokenSettings": { + "$id": "8539", + "kind": "model", + "type": { + "$ref": "1640" + }, + "value": { + "$id": "8540", + "audience": { + "$id": "8541", + "kind": "string", + "type": { + "$ref": "1642" + }, + "value": "aio-internal" + } + } + } + } + }, + "tls": { + "$id": "8542", + "kind": "model", + "type": { + "$ref": "1603" + }, + "value": { + "$id": "8543", + "mode": { + "$id": "8544", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "trustedCaCertificateConfigMapRef": { + "$id": "8545", + "kind": "string", + "type": { + "$ref": "1608" + }, + "value": "aio-ca-trust-bundle-test-only" + } + } + } + } + } + } + }, + "extendedLocation": { + "$id": "8546", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "8547", + "name": { + "$id": "8548", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "8549", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "8550", + "response": { + "$ref": "8312" + }, + "statusCode": 200, + "bodyValue": { + "$id": "8551", + "kind": "model", + "type": { + "$ref": "1397" + }, + "value": { + "$id": "8552", + "properties": { + "$id": "8553", + "kind": "model", + "type": { + "$ref": "1399" + }, + "value": { + "$id": "8554", + "endpointType": { + "$id": "8555", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "Mqtt" + }, + "mqttSettings": { + "$id": "8556", + "kind": "model", + "type": { + "$ref": "1627" + }, + "value": { + "$id": "8557", + "host": { + "$id": "8558", + "kind": "string", + "type": { + "$ref": "1657" + }, + "value": "aio-broker:18883" + }, + "authentication": { + "$id": "8559", + "kind": "model", + "type": { + "$ref": "1629" + }, + "value": { + "$id": "8560", + "method": { + "$id": "8561", + "kind": "string", + "type": { + "$ref": "312" + }, + "value": "Kubernetes" + }, + "serviceAccountTokenSettings": { + "$id": "8562", + "kind": "model", + "type": { + "$ref": "1640" + }, + "value": { + "$id": "8563", + "audience": { + "$id": "8564", + "kind": "string", + "type": { + "$ref": "1642" + }, + "value": "aio-internal" + } + } + } + } + }, + "tls": { + "$id": "8565", + "kind": "model", + "type": { + "$ref": "1603" + }, + "value": { + "$id": "8566", + "mode": { + "$id": "8567", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "trustedCaCertificateConfigMapRef": { + "$id": "8568", + "kind": "string", + "type": { + "$ref": "1608" + }, + "value": "aio-ca-trust-bundle-test-only" + } + } + } + } + }, + "provisioningState": { + "$id": "8569", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "8570", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "8571", + "name": { + "$id": "8572", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "8573", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "8574", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowEndpoints/resource-name123" + }, + "name": { + "$id": "8575", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "zyhxscudobzfacetvgyjiav" + }, + "type": { + "$id": "8576", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "iay" + }, + "systemData": { + "$id": "8577", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "8578", + "createdBy": { + "$id": "8579", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "8580", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "8581", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "8582", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "8583", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "8584", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "8585", + "response": { + "$ref": "8313" + }, + "statusCode": 201, + "bodyValue": { + "$id": "8586", + "kind": "model", + "type": { + "$ref": "1397" + }, + "value": { + "$id": "8587", + "properties": { + "$id": "8588", + "kind": "model", + "type": { + "$ref": "1399" + }, + "value": { + "$id": "8589", + "endpointType": { + "$id": "8590", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "Mqtt" + }, + "mqttSettings": { + "$id": "8591", + "kind": "model", + "type": { + "$ref": "1627" + }, + "value": { + "$id": "8592", + "host": { + "$id": "8593", + "kind": "string", + "type": { + "$ref": "1657" + }, + "value": "aio-broker:18883" + }, + "authentication": { + "$id": "8594", + "kind": "model", + "type": { + "$ref": "1629" + }, + "value": { + "$id": "8595", + "method": { + "$id": "8596", + "kind": "string", + "type": { + "$ref": "312" + }, + "value": "Kubernetes" + }, + "serviceAccountTokenSettings": { + "$id": "8597", + "kind": "model", + "type": { + "$ref": "1640" + }, + "value": { + "$id": "8598", + "audience": { + "$id": "8599", + "kind": "string", + "type": { + "$ref": "1642" + }, + "value": "aio-internal" + } + } + } + } + }, + "tls": { + "$id": "8600", + "kind": "model", + "type": { + "$ref": "1603" + }, + "value": { + "$id": "8601", + "mode": { + "$id": "8602", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "trustedCaCertificateConfigMapRef": { + "$id": "8603", + "kind": "string", + "type": { + "$ref": "1608" + }, + "value": "aio-ca-trust-bundle-test-only" + } + } + } + } + }, + "provisioningState": { + "$id": "8604", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "8605", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "8606", + "name": { + "$id": "8607", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "8608", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "8609", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowEndpoints/resource-name123" + }, + "name": { + "$id": "8610", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "zyhxscudobzfacetvgyjiav" + }, + "type": { + "$id": "8611", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "iay" + }, + "systemData": { + "$id": "8612", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "8613", + "createdBy": { + "$id": "8614", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "8615", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "8616", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "8617", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "8618", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "8619", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + }, + { + "$id": "8620", + "kind": "http", + "name": "DataflowEndpoint_CreateOrUpdate_EventGrid", + "description": "DataflowEndpoint_CreateOrUpdate_EventGrid", + "filePath": "2025-04-01/DataflowEndpoint_CreateOrUpdate_EventGrid.json", + "parameters": [ + { + "$id": "8621", + "parameter": { + "$ref": "8292" + }, + "value": { + "$id": "8622", + "kind": "string", + "type": { + "$ref": "8293" + }, + "value": "2025-04-01" + } + }, + { + "$id": "8623", + "parameter": { + "$ref": "8296" + }, + "value": { + "$id": "8624", + "kind": "string", + "type": { + "$ref": "8297" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "8625", + "parameter": { + "$ref": "8299" + }, + "value": { + "$id": "8626", + "kind": "string", + "type": { + "$ref": "8300" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "8627", + "parameter": { + "$ref": "8301" + }, + "value": { + "$id": "8628", + "kind": "string", + "type": { + "$ref": "8302" + }, + "value": "resource-name123" + } + }, + { + "$id": "8629", + "parameter": { + "$ref": "8303" + }, + "value": { + "$id": "8630", + "kind": "string", + "type": { + "$ref": "8304" + }, + "value": "event-grid-endpoint" + } + }, + { + "$id": "8631", + "parameter": { + "$ref": "8311" + }, + "value": { + "$id": "8632", + "kind": "model", + "type": { + "$ref": "1397" + }, + "value": { + "$id": "8633", + "properties": { + "$id": "8634", + "kind": "model", + "type": { + "$ref": "1399" + }, + "value": { + "$id": "8635", + "endpointType": { + "$id": "8636", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "Mqtt" + }, + "mqttSettings": { + "$id": "8637", + "kind": "model", + "type": { + "$ref": "1627" + }, + "value": { + "$id": "8638", + "host": { + "$id": "8639", + "kind": "string", + "type": { + "$ref": "1657" + }, + "value": "example.westeurope-1.ts.eventgrid.azure.net:8883" + }, + "authentication": { + "$id": "8640", + "kind": "model", + "type": { + "$ref": "1629" + }, + "value": { + "$id": "8641", + "method": { + "$id": "8642", + "kind": "string", + "type": { + "$ref": "312" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "8643", + "kind": "model", + "type": { + "$ref": "1411" + }, + "value": { + "$id": "8644" + } + } + } + }, + "tls": { + "$id": "8645", + "kind": "model", + "type": { + "$ref": "1603" + }, + "value": { + "$id": "8646", + "mode": { + "$id": "8647", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + } + } + } + } + } + } + }, + "extendedLocation": { + "$id": "8648", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "8649", + "name": { + "$id": "8650", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "8651", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "8652", + "response": { + "$ref": "8312" + }, + "statusCode": 200, + "bodyValue": { + "$id": "8653", + "kind": "model", + "type": { + "$ref": "1397" + }, + "value": { + "$id": "8654", + "properties": { + "$id": "8655", + "kind": "model", + "type": { + "$ref": "1399" + }, + "value": { + "$id": "8656", + "endpointType": { + "$id": "8657", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "Mqtt" + }, + "mqttSettings": { + "$id": "8658", + "kind": "model", + "type": { + "$ref": "1627" + }, + "value": { + "$id": "8659", + "host": { + "$id": "8660", + "kind": "string", + "type": { + "$ref": "1657" + }, + "value": "example.westeurope-1.ts.eventgrid.azure.net:8883" + }, + "authentication": { + "$id": "8661", + "kind": "model", + "type": { + "$ref": "1629" + }, + "value": { + "$id": "8662", + "method": { + "$id": "8663", + "kind": "string", + "type": { + "$ref": "312" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "8664", + "kind": "model", + "type": { + "$ref": "1411" + }, + "value": { + "$id": "8665" + } + } + } + }, + "tls": { + "$id": "8666", + "kind": "model", + "type": { + "$ref": "1603" + }, + "value": { + "$id": "8667", + "mode": { + "$id": "8668", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + } + } + } + } + }, + "provisioningState": { + "$id": "8669", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "8670", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "8671", + "name": { + "$id": "8672", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "8673", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "8674", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowEndpoints/resource-name123" + }, + "name": { + "$id": "8675", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "zyhxscudobzfacetvgyjiav" + }, + "type": { + "$id": "8676", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "iay" + }, + "systemData": { + "$id": "8677", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "8678", + "createdBy": { + "$id": "8679", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "8680", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "8681", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "8682", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "8683", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "8684", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "8685", + "response": { + "$ref": "8313" + }, + "statusCode": 201, + "bodyValue": { + "$id": "8686", + "kind": "model", + "type": { + "$ref": "1397" + }, + "value": { + "$id": "8687", + "properties": { + "$id": "8688", + "kind": "model", + "type": { + "$ref": "1399" + }, + "value": { + "$id": "8689", + "endpointType": { + "$id": "8690", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "Mqtt" + }, + "mqttSettings": { + "$id": "8691", + "kind": "model", + "type": { + "$ref": "1627" + }, + "value": { + "$id": "8692", + "host": { + "$id": "8693", + "kind": "string", + "type": { + "$ref": "1657" + }, + "value": "example.westeurope-1.ts.eventgrid.azure.net:8883" + }, + "authentication": { + "$id": "8694", + "kind": "model", + "type": { + "$ref": "1629" + }, + "value": { + "$id": "8695", + "method": { + "$id": "8696", + "kind": "string", + "type": { + "$ref": "312" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "8697", + "kind": "model", + "type": { + "$ref": "1411" + }, + "value": { + "$id": "8698" + } + } + } + }, + "tls": { + "$id": "8699", + "kind": "model", + "type": { + "$ref": "1603" + }, + "value": { + "$id": "8700", + "mode": { + "$id": "8701", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + } + } + } + } + }, + "provisioningState": { + "$id": "8702", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "8703", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "8704", + "name": { + "$id": "8705", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "8706", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "8707", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowEndpoints/resource-name123" + }, + "name": { + "$id": "8708", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "zyhxscudobzfacetvgyjiav" + }, + "type": { + "$id": "8709", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "iay" + }, + "systemData": { + "$id": "8710", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "8711", + "createdBy": { + "$id": "8712", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "8713", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "8714", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "8715", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "8716", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "8717", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + }, + { + "$id": "8718", + "kind": "http", + "name": "DataflowEndpoint_CreateOrUpdate_EventHub", + "description": "DataflowEndpoint_CreateOrUpdate_EventHub", + "filePath": "2025-04-01/DataflowEndpoint_CreateOrUpdate_EventHub.json", + "parameters": [ + { + "$id": "8719", + "parameter": { + "$ref": "8292" + }, + "value": { + "$id": "8720", + "kind": "string", + "type": { + "$ref": "8293" + }, + "value": "2025-04-01" + } + }, + { + "$id": "8721", + "parameter": { + "$ref": "8296" + }, + "value": { + "$id": "8722", + "kind": "string", + "type": { + "$ref": "8297" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "8723", + "parameter": { + "$ref": "8299" + }, + "value": { + "$id": "8724", + "kind": "string", + "type": { + "$ref": "8300" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "8725", + "parameter": { + "$ref": "8301" + }, + "value": { + "$id": "8726", + "kind": "string", + "type": { + "$ref": "8302" + }, + "value": "resource-name123" + } + }, + { + "$id": "8727", + "parameter": { + "$ref": "8303" + }, + "value": { + "$id": "8728", + "kind": "string", + "type": { + "$ref": "8304" + }, + "value": "event-hub-endpoint" + } + }, + { + "$id": "8729", + "parameter": { + "$ref": "8311" + }, + "value": { + "$id": "8730", + "kind": "model", + "type": { + "$ref": "1397" + }, + "value": { + "$id": "8731", + "properties": { + "$id": "8732", + "kind": "model", + "type": { + "$ref": "1399" + }, + "value": { + "$id": "8733", + "endpointType": { + "$id": "8734", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "Kafka" + }, + "kafkaSettings": { + "$id": "8735", + "kind": "model", + "type": { + "$ref": "1530" + }, + "value": { + "$id": "8736", + "host": { + "$id": "8737", + "kind": "string", + "type": { + "$ref": "1568" + }, + "value": "example.servicebus.windows.net:9093" + }, + "authentication": { + "$id": "8738", + "kind": "model", + "type": { + "$ref": "1532" + }, + "value": { + "$id": "8739", + "method": { + "$id": "8740", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "8741", + "kind": "model", + "type": { + "$ref": "1411" + }, + "value": { + "$id": "8742" + } + } + } + }, + "tls": { + "$id": "8743", + "kind": "model", + "type": { + "$ref": "1603" + }, + "value": { + "$id": "8744", + "mode": { + "$id": "8745", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + } + } + }, + "consumerGroupId": { + "$id": "8746", + "kind": "string", + "type": { + "$ref": "1564" + }, + "value": "aiodataflows" + } + } + } + } + }, + "extendedLocation": { + "$id": "8747", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "8748", + "name": { + "$id": "8749", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "8750", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "8751", + "response": { + "$ref": "8312" + }, + "statusCode": 200, + "bodyValue": { + "$id": "8752", + "kind": "model", + "type": { + "$ref": "1397" + }, + "value": { + "$id": "8753", + "properties": { + "$id": "8754", + "kind": "model", + "type": { + "$ref": "1399" + }, + "value": { + "$id": "8755", + "endpointType": { + "$id": "8756", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "Kafka" + }, + "kafkaSettings": { + "$id": "8757", + "kind": "model", + "type": { + "$ref": "1530" + }, + "value": { + "$id": "8758", + "host": { + "$id": "8759", + "kind": "string", + "type": { + "$ref": "1568" + }, + "value": "example.servicebus.windows.net:9093" + }, + "authentication": { + "$id": "8760", + "kind": "model", + "type": { + "$ref": "1532" + }, + "value": { + "$id": "8761", + "method": { + "$id": "8762", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "8763", + "kind": "model", + "type": { + "$ref": "1411" + }, + "value": { + "$id": "8764" + } + } + } + }, + "tls": { + "$id": "8765", + "kind": "model", + "type": { + "$ref": "1603" + }, + "value": { + "$id": "8766", + "mode": { + "$id": "8767", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + } + } + }, + "consumerGroupId": { + "$id": "8768", + "kind": "string", + "type": { + "$ref": "1564" + }, + "value": "aiodataflows" + } + } + }, + "provisioningState": { + "$id": "8769", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "8770", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "8771", + "name": { + "$id": "8772", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "8773", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "8774", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowEndpoints/resource-name123" + }, + "name": { + "$id": "8775", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "zyhxscudobzfacetvgyjiav" + }, + "type": { + "$id": "8776", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "iay" + }, + "systemData": { + "$id": "8777", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "8778", + "createdBy": { + "$id": "8779", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "8780", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "8781", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "8782", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "8783", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "8784", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "8785", + "response": { + "$ref": "8313" + }, + "statusCode": 201, + "bodyValue": { + "$id": "8786", + "kind": "model", + "type": { + "$ref": "1397" + }, + "value": { + "$id": "8787", + "properties": { + "$id": "8788", + "kind": "model", + "type": { + "$ref": "1399" + }, + "value": { + "$id": "8789", + "endpointType": { + "$id": "8790", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "Kafka" + }, + "kafkaSettings": { + "$id": "8791", + "kind": "model", + "type": { + "$ref": "1530" + }, + "value": { + "$id": "8792", + "host": { + "$id": "8793", + "kind": "string", + "type": { + "$ref": "1568" + }, + "value": "example.servicebus.windows.net:9093" + }, + "authentication": { + "$id": "8794", + "kind": "model", + "type": { + "$ref": "1532" + }, + "value": { + "$id": "8795", + "method": { + "$id": "8796", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "8797", + "kind": "model", + "type": { + "$ref": "1411" + }, + "value": { + "$id": "8798" + } + } + } + }, + "tls": { + "$id": "8799", + "kind": "model", + "type": { + "$ref": "1603" + }, + "value": { + "$id": "8800", + "mode": { + "$id": "8801", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + } + } + }, + "consumerGroupId": { + "$id": "8802", + "kind": "string", + "type": { + "$ref": "1564" + }, + "value": "aiodataflows" + } + } + }, + "provisioningState": { + "$id": "8803", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "8804", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "8805", + "name": { + "$id": "8806", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "8807", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "8808", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowEndpoints/resource-name123" + }, + "name": { + "$id": "8809", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "zyhxscudobzfacetvgyjiav" + }, + "type": { + "$id": "8810", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "iay" + }, + "systemData": { + "$id": "8811", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "8812", + "createdBy": { + "$id": "8813", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "8814", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "8815", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "8816", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "8817", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "8818", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + }, + { + "$id": "8819", + "kind": "http", + "name": "DataflowEndpoint_CreateOrUpdate_Fabric", + "description": "DataflowEndpoint_CreateOrUpdate_Fabric", + "filePath": "2025-04-01/DataflowEndpoint_CreateOrUpdate_Fabric.json", + "parameters": [ + { + "$id": "8820", + "parameter": { + "$ref": "8292" + }, + "value": { + "$id": "8821", + "kind": "string", + "type": { + "$ref": "8293" + }, + "value": "2025-04-01" + } + }, + { + "$id": "8822", + "parameter": { + "$ref": "8296" + }, + "value": { + "$id": "8823", + "kind": "string", + "type": { + "$ref": "8297" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "8824", + "parameter": { + "$ref": "8299" + }, + "value": { + "$id": "8825", + "kind": "string", + "type": { + "$ref": "8300" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "8826", + "parameter": { + "$ref": "8301" + }, + "value": { + "$id": "8827", + "kind": "string", + "type": { + "$ref": "8302" + }, + "value": "resource-name123" + } + }, + { + "$id": "8828", + "parameter": { + "$ref": "8303" + }, + "value": { + "$id": "8829", + "kind": "string", + "type": { + "$ref": "8304" + }, + "value": "fabric-endpoint" + } + }, + { + "$id": "8830", + "parameter": { + "$ref": "8311" + }, + "value": { + "$id": "8831", + "kind": "model", + "type": { + "$ref": "1397" + }, + "value": { + "$id": "8832", + "properties": { + "$id": "8833", + "kind": "model", + "type": { + "$ref": "1399" + }, + "value": { + "$id": "8834", + "endpointType": { + "$id": "8835", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "FabricOneLake" + }, + "fabricOneLakeSettings": { + "$id": "8836", + "kind": "model", + "type": { + "$ref": "1491" + }, + "value": { + "$id": "8837", + "host": { + "$id": "8838", + "kind": "string", + "type": { + "$ref": "1521" + }, + "value": "onelake.dfs.fabric.microsoft.com" + }, + "authentication": { + "$id": "8839", + "kind": "model", + "type": { + "$ref": "1493" + }, + "value": { + "$id": "8840", + "method": { + "$id": "8841", + "kind": "string", + "type": { + "$ref": "246" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "8842", + "kind": "model", + "type": { + "$ref": "1411" + }, + "value": { + "$id": "8843" + } + } + } + }, + "names": { + "$id": "8844", + "kind": "model", + "type": { + "$ref": "1506" + }, + "value": { + "$id": "8845", + "workspaceName": { + "$id": "8846", + "kind": "string", + "type": { + "$ref": "1512" + }, + "value": "example-workspace" + }, + "lakehouseName": { + "$id": "8847", + "kind": "string", + "type": { + "$ref": "1508" + }, + "value": "example-lakehouse" + } + } + }, + "oneLakePathType": { + "$id": "8848", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "Tables" + } + } + } + } + }, + "extendedLocation": { + "$id": "8849", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "8850", + "name": { + "$id": "8851", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "8852", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "8853", + "response": { + "$ref": "8312" + }, + "statusCode": 200, + "bodyValue": { + "$id": "8854", + "kind": "model", + "type": { + "$ref": "1397" + }, + "value": { + "$id": "8855", + "properties": { + "$id": "8856", + "kind": "model", + "type": { + "$ref": "1399" + }, + "value": { + "$id": "8857", + "endpointType": { + "$id": "8858", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "FabricOneLake" + }, + "fabricOneLakeSettings": { + "$id": "8859", + "kind": "model", + "type": { + "$ref": "1491" + }, + "value": { + "$id": "8860", + "host": { + "$id": "8861", + "kind": "string", + "type": { + "$ref": "1521" + }, + "value": "onelake.dfs.fabric.microsoft.com" + }, + "authentication": { + "$id": "8862", + "kind": "model", + "type": { + "$ref": "1493" + }, + "value": { + "$id": "8863", + "method": { + "$id": "8864", + "kind": "string", + "type": { + "$ref": "246" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "8865", + "kind": "model", + "type": { + "$ref": "1411" + }, + "value": { + "$id": "8866" + } + } + } + }, + "names": { + "$id": "8867", + "kind": "model", + "type": { + "$ref": "1506" + }, + "value": { + "$id": "8868", + "workspaceName": { + "$id": "8869", + "kind": "string", + "type": { + "$ref": "1512" + }, + "value": "example-workspace" + }, + "lakehouseName": { + "$id": "8870", + "kind": "string", + "type": { + "$ref": "1508" + }, + "value": "example-lakehouse" + } + } + }, + "oneLakePathType": { + "$id": "8871", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "Tables" + } + } + }, + "provisioningState": { + "$id": "8872", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "8873", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "8874", + "name": { + "$id": "8875", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "8876", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "8877", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowEndpoints/resource-name123" + }, + "name": { + "$id": "8878", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "zyhxscudobzfacetvgyjiav" + }, + "type": { + "$id": "8879", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "iay" + }, + "systemData": { + "$id": "8880", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "8881", + "createdBy": { + "$id": "8882", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "8883", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "8884", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "8885", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "8886", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "8887", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "8888", + "response": { + "$ref": "8313" + }, + "statusCode": 201, + "bodyValue": { + "$id": "8889", + "kind": "model", + "type": { + "$ref": "1397" + }, + "value": { + "$id": "8890", + "properties": { + "$id": "8891", + "kind": "model", + "type": { + "$ref": "1399" + }, + "value": { + "$id": "8892", + "endpointType": { + "$id": "8893", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "FabricOneLake" + }, + "fabricOneLakeSettings": { + "$id": "8894", + "kind": "model", + "type": { + "$ref": "1491" + }, + "value": { + "$id": "8895", + "host": { + "$id": "8896", + "kind": "string", + "type": { + "$ref": "1521" + }, + "value": "onelake.dfs.fabric.microsoft.com" + }, + "authentication": { + "$id": "8897", + "kind": "model", + "type": { + "$ref": "1493" + }, + "value": { + "$id": "8898", + "method": { + "$id": "8899", + "kind": "string", + "type": { + "$ref": "246" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "8900", + "kind": "model", + "type": { + "$ref": "1411" + }, + "value": { + "$id": "8901" + } + } + } + }, + "names": { + "$id": "8902", + "kind": "model", + "type": { + "$ref": "1506" + }, + "value": { + "$id": "8903", + "workspaceName": { + "$id": "8904", + "kind": "string", + "type": { + "$ref": "1512" + }, + "value": "example-workspace" + }, + "lakehouseName": { + "$id": "8905", + "kind": "string", + "type": { + "$ref": "1508" + }, + "value": "example-lakehouse" + } + } + }, + "oneLakePathType": { + "$id": "8906", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "Tables" + } + } + }, + "provisioningState": { + "$id": "8907", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "8908", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "8909", + "name": { + "$id": "8910", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "8911", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "8912", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowEndpoints/resource-name123" + }, + "name": { + "$id": "8913", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "zyhxscudobzfacetvgyjiav" + }, + "type": { + "$id": "8914", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "iay" + }, + "systemData": { + "$id": "8915", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "8916", + "createdBy": { + "$id": "8917", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "8918", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "8919", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "8920", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "8921", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "8922", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + }, + { + "$id": "8923", + "kind": "http", + "name": "DataflowEndpoint_CreateOrUpdate_Kafka", + "description": "DataflowEndpoint_CreateOrUpdate_Kafka", + "filePath": "2025-04-01/DataflowEndpoint_CreateOrUpdate_Kafka.json", + "parameters": [ + { + "$id": "8924", + "parameter": { + "$ref": "8292" + }, + "value": { + "$id": "8925", + "kind": "string", + "type": { + "$ref": "8293" + }, + "value": "2025-04-01" + } + }, + { + "$id": "8926", + "parameter": { + "$ref": "8296" + }, + "value": { + "$id": "8927", + "kind": "string", + "type": { + "$ref": "8297" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "8928", + "parameter": { + "$ref": "8299" + }, + "value": { + "$id": "8929", + "kind": "string", + "type": { + "$ref": "8300" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "8930", + "parameter": { + "$ref": "8301" + }, + "value": { + "$id": "8931", + "kind": "string", + "type": { + "$ref": "8302" + }, + "value": "resource-name123" + } + }, + { + "$id": "8932", + "parameter": { + "$ref": "8303" + }, + "value": { + "$id": "8933", + "kind": "string", + "type": { + "$ref": "8304" + }, + "value": "generic-kafka-endpoint" + } + }, + { + "$id": "8934", + "parameter": { + "$ref": "8311" + }, + "value": { + "$id": "8935", + "kind": "model", + "type": { + "$ref": "1397" + }, + "value": { + "$id": "8936", + "properties": { + "$id": "8937", + "kind": "model", + "type": { + "$ref": "1399" + }, + "value": { + "$id": "8938", + "endpointType": { + "$id": "8939", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "Kafka" + }, + "kafkaSettings": { + "$id": "8940", + "kind": "model", + "type": { + "$ref": "1530" + }, + "value": { + "$id": "8941", + "host": { + "$id": "8942", + "kind": "string", + "type": { + "$ref": "1568" + }, + "value": "example.kafka.local:9093" + }, + "authentication": { + "$id": "8943", + "kind": "model", + "type": { + "$ref": "1532" + }, + "value": { + "$id": "8944", + "method": { + "$id": "8945", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "Sasl" + }, + "saslSettings": { + "$id": "8946", + "kind": "model", + "type": { + "$ref": "1543" + }, + "value": { + "$id": "8947", + "saslType": { + "$id": "8948", + "kind": "string", + "type": { + "$ref": "270" + }, + "value": "Plain" + }, + "secretRef": { + "$id": "8949", + "kind": "string", + "type": { + "$ref": "1548" + }, + "value": "my-secret" + } + } + } + } + }, + "tls": { + "$id": "8950", + "kind": "model", + "type": { + "$ref": "1603" + }, + "value": { + "$id": "8951", + "mode": { + "$id": "8952", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "trustedCaCertificateConfigMapRef": { + "$id": "8953", + "kind": "string", + "type": { + "$ref": "1608" + }, + "value": "ca-certificates" + } + } + }, + "consumerGroupId": { + "$id": "8954", + "kind": "string", + "type": { + "$ref": "1564" + }, + "value": "dataflows" + }, + "compression": { + "$id": "8955", + "kind": "string", + "type": { + "$ref": "278" + }, + "value": "Gzip" + }, + "batching": { + "$id": "8956", + "kind": "model", + "type": { + "$ref": "1572" + }, + "value": { + "$id": "8957", + "mode": { + "$id": "8958", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "latencyMs": { + "$id": "8959", + "kind": "number", + "type": { + "$ref": "1577" + }, + "value": 5 + }, + "maxBytes": { + "$id": "8960", + "kind": "number", + "type": { + "$ref": "1581" + }, + "value": 1000000 + }, + "maxMessages": { + "$id": "8961", + "kind": "number", + "type": { + "$ref": "1585" + }, + "value": 100000 + } + } + }, + "partitionStrategy": { + "$id": "8962", + "kind": "string", + "type": { + "$ref": "296" + }, + "value": "Default" + }, + "kafkaAcks": { + "$id": "8963", + "kind": "string", + "type": { + "$ref": "288" + }, + "value": "All" + }, + "copyMqttProperties": { + "$id": "8964", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "cloudEventAttributes": { + "$id": "8965", + "kind": "string", + "type": { + "$ref": "306" + }, + "value": "Propagate" + } + } + } + } + }, + "extendedLocation": { + "$id": "8966", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "8967", + "name": { + "$id": "8968", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "8969", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "8970", + "response": { + "$ref": "8312" + }, + "statusCode": 200, + "bodyValue": { + "$id": "8971", + "kind": "model", + "type": { + "$ref": "1397" + }, + "value": { + "$id": "8972", + "properties": { + "$id": "8973", + "kind": "model", + "type": { + "$ref": "1399" + }, + "value": { + "$id": "8974", + "endpointType": { + "$id": "8975", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "Kafka" + }, + "kafkaSettings": { + "$id": "8976", + "kind": "model", + "type": { + "$ref": "1530" + }, + "value": { + "$id": "8977", + "host": { + "$id": "8978", + "kind": "string", + "type": { + "$ref": "1568" + }, + "value": "example.kafka.local:9093" + }, + "authentication": { + "$id": "8979", + "kind": "model", + "type": { + "$ref": "1532" + }, + "value": { + "$id": "8980", + "method": { + "$id": "8981", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "Sasl" + }, + "saslSettings": { + "$id": "8982", + "kind": "model", + "type": { + "$ref": "1543" + }, + "value": { + "$id": "8983", + "saslType": { + "$id": "8984", + "kind": "string", + "type": { + "$ref": "270" + }, + "value": "Plain" + }, + "secretRef": { + "$id": "8985", + "kind": "string", + "type": { + "$ref": "1548" + }, + "value": "my-secret" + } + } + } + } + }, + "tls": { + "$id": "8986", + "kind": "model", + "type": { + "$ref": "1603" + }, + "value": { + "$id": "8987", + "mode": { + "$id": "8988", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "trustedCaCertificateConfigMapRef": { + "$id": "8989", + "kind": "string", + "type": { + "$ref": "1608" + }, + "value": "ca-certificates" + } + } + }, + "consumerGroupId": { + "$id": "8990", + "kind": "string", + "type": { + "$ref": "1564" + }, + "value": "dataflows" + }, + "compression": { + "$id": "8991", + "kind": "string", + "type": { + "$ref": "278" + }, + "value": "Gzip" + }, + "batching": { + "$id": "8992", + "kind": "model", + "type": { + "$ref": "1572" + }, + "value": { + "$id": "8993", + "mode": { + "$id": "8994", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "latencyMs": { + "$id": "8995", + "kind": "number", + "type": { + "$ref": "1577" + }, + "value": 5 + }, + "maxBytes": { + "$id": "8996", + "kind": "number", + "type": { + "$ref": "1581" + }, + "value": 1000000 + }, + "maxMessages": { + "$id": "8997", + "kind": "number", + "type": { + "$ref": "1585" + }, + "value": 100000 + } + } + }, + "partitionStrategy": { + "$id": "8998", + "kind": "string", + "type": { + "$ref": "296" + }, + "value": "Default" + }, + "kafkaAcks": { + "$id": "8999", + "kind": "string", + "type": { + "$ref": "288" + }, + "value": "All" + }, + "copyMqttProperties": { + "$id": "9000", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "cloudEventAttributes": { + "$id": "9001", + "kind": "string", + "type": { + "$ref": "306" + }, + "value": "Propagate" + } + } + }, + "provisioningState": { + "$id": "9002", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "9003", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "9004", + "name": { + "$id": "9005", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "9006", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "9007", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowEndpoints/resource-name123" + }, + "name": { + "$id": "9008", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "zyhxscudobzfacetvgyjiav" + }, + "type": { + "$id": "9009", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "iay" + }, + "systemData": { + "$id": "9010", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "9011", + "createdBy": { + "$id": "9012", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "9013", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "9014", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "9015", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "9016", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "9017", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "9018", + "response": { + "$ref": "8313" + }, + "statusCode": 201, + "bodyValue": { + "$id": "9019", + "kind": "model", + "type": { + "$ref": "1397" + }, + "value": { + "$id": "9020", + "properties": { + "$id": "9021", + "kind": "model", + "type": { + "$ref": "1399" + }, + "value": { + "$id": "9022", + "endpointType": { + "$id": "9023", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "Kafka" + }, + "kafkaSettings": { + "$id": "9024", + "kind": "model", + "type": { + "$ref": "1530" + }, + "value": { + "$id": "9025", + "host": { + "$id": "9026", + "kind": "string", + "type": { + "$ref": "1568" + }, + "value": "example.kafka.local:9093" + }, + "authentication": { + "$id": "9027", + "kind": "model", + "type": { + "$ref": "1532" + }, + "value": { + "$id": "9028", + "method": { + "$id": "9029", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "Sasl" + }, + "saslSettings": { + "$id": "9030", + "kind": "model", + "type": { + "$ref": "1543" + }, + "value": { + "$id": "9031", + "saslType": { + "$id": "9032", + "kind": "string", + "type": { + "$ref": "270" + }, + "value": "Plain" + }, + "secretRef": { + "$id": "9033", + "kind": "string", + "type": { + "$ref": "1548" + }, + "value": "my-secret" + } + } + } + } + }, + "tls": { + "$id": "9034", + "kind": "model", + "type": { + "$ref": "1603" + }, + "value": { + "$id": "9035", + "mode": { + "$id": "9036", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "trustedCaCertificateConfigMapRef": { + "$id": "9037", + "kind": "string", + "type": { + "$ref": "1608" + }, + "value": "ca-certificates" + } + } + }, + "consumerGroupId": { + "$id": "9038", + "kind": "string", + "type": { + "$ref": "1564" + }, + "value": "dataflows" + }, + "compression": { + "$id": "9039", + "kind": "string", + "type": { + "$ref": "278" + }, + "value": "Gzip" + }, + "batching": { + "$id": "9040", + "kind": "model", + "type": { + "$ref": "1572" + }, + "value": { + "$id": "9041", + "mode": { + "$id": "9042", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "latencyMs": { + "$id": "9043", + "kind": "number", + "type": { + "$ref": "1577" + }, + "value": 5 + }, + "maxBytes": { + "$id": "9044", + "kind": "number", + "type": { + "$ref": "1581" + }, + "value": 1000000 + }, + "maxMessages": { + "$id": "9045", + "kind": "number", + "type": { + "$ref": "1585" + }, + "value": 100000 + } + } + }, + "partitionStrategy": { + "$id": "9046", + "kind": "string", + "type": { + "$ref": "296" + }, + "value": "Default" + }, + "kafkaAcks": { + "$id": "9047", + "kind": "string", + "type": { + "$ref": "288" + }, + "value": "All" + }, + "copyMqttProperties": { + "$id": "9048", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "cloudEventAttributes": { + "$id": "9049", + "kind": "string", + "type": { + "$ref": "306" + }, + "value": "Propagate" + } + } + }, + "provisioningState": { + "$id": "9050", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "9051", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "9052", + "name": { + "$id": "9053", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "9054", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "9055", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowEndpoints/resource-name123" + }, + "name": { + "$id": "9056", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "zyhxscudobzfacetvgyjiav" + }, + "type": { + "$id": "9057", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "iay" + }, + "systemData": { + "$id": "9058", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "9059", + "createdBy": { + "$id": "9060", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "9061", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "9062", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "9063", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "9064", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "9065", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + }, + { + "$id": "9066", + "kind": "http", + "name": "DataflowEndpoint_CreateOrUpdate_LocalStorage", + "description": "DataflowEndpoint_CreateOrUpdate_LocalStorage", + "filePath": "2025-04-01/DataflowEndpoint_CreateOrUpdate_LocalStorage.json", + "parameters": [ + { + "$id": "9067", + "parameter": { + "$ref": "8292" + }, + "value": { + "$id": "9068", + "kind": "string", + "type": { + "$ref": "8293" + }, + "value": "2025-04-01" + } + }, + { + "$id": "9069", + "parameter": { + "$ref": "8296" + }, + "value": { + "$id": "9070", + "kind": "string", + "type": { + "$ref": "8297" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "9071", + "parameter": { + "$ref": "8299" + }, + "value": { + "$id": "9072", + "kind": "string", + "type": { + "$ref": "8300" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "9073", + "parameter": { + "$ref": "8301" + }, + "value": { + "$id": "9074", + "kind": "string", + "type": { + "$ref": "8302" + }, + "value": "resource-name123" + } + }, + { + "$id": "9075", + "parameter": { + "$ref": "8303" + }, + "value": { + "$id": "9076", + "kind": "string", + "type": { + "$ref": "8304" + }, + "value": "local-storage-endpoint" + } + }, + { + "$id": "9077", + "parameter": { + "$ref": "8311" + }, + "value": { + "$id": "9078", + "kind": "model", + "type": { + "$ref": "1397" + }, + "value": { + "$id": "9079", + "properties": { + "$id": "9080", + "kind": "model", + "type": { + "$ref": "1399" + }, + "value": { + "$id": "9081", + "endpointType": { + "$id": "9082", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "LocalStorage" + }, + "localStorageSettings": { + "$id": "9083", + "kind": "model", + "type": { + "$ref": "1619" + }, + "value": { + "$id": "9084", + "persistentVolumeClaimRef": { + "$id": "9085", + "kind": "string", + "type": { + "$ref": "1621" + }, + "value": "example-pvc" + } + } + } + } + }, + "extendedLocation": { + "$id": "9086", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "9087", + "name": { + "$id": "9088", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "9089", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "9090", + "response": { + "$ref": "8312" + }, + "statusCode": 200, + "bodyValue": { + "$id": "9091", + "kind": "model", + "type": { + "$ref": "1397" + }, + "value": { + "$id": "9092", + "properties": { + "$id": "9093", + "kind": "model", + "type": { + "$ref": "1399" + }, + "value": { + "$id": "9094", + "endpointType": { + "$id": "9095", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "LocalStorage" + }, + "localStorageSettings": { + "$id": "9096", + "kind": "model", + "type": { + "$ref": "1619" + }, + "value": { + "$id": "9097", + "persistentVolumeClaimRef": { + "$id": "9098", + "kind": "string", + "type": { + "$ref": "1621" + }, + "value": "example-pvc" + } + } + }, + "provisioningState": { + "$id": "9099", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "9100", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "9101", + "name": { + "$id": "9102", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "9103", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "9104", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowEndpoints/resource-name123" + }, + "name": { + "$id": "9105", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "zyhxscudobzfacetvgyjiav" + }, + "type": { + "$id": "9106", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "iay" + }, + "systemData": { + "$id": "9107", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "9108", + "createdBy": { + "$id": "9109", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "9110", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "9111", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "9112", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "9113", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "9114", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "9115", + "response": { + "$ref": "8313" + }, + "statusCode": 201, + "bodyValue": { + "$id": "9116", + "kind": "model", + "type": { + "$ref": "1397" + }, + "value": { + "$id": "9117", + "properties": { + "$id": "9118", + "kind": "model", + "type": { + "$ref": "1399" + }, + "value": { + "$id": "9119", + "endpointType": { + "$id": "9120", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "LocalStorage" + }, + "localStorageSettings": { + "$id": "9121", + "kind": "model", + "type": { + "$ref": "1619" + }, + "value": { + "$id": "9122", + "persistentVolumeClaimRef": { + "$id": "9123", + "kind": "string", + "type": { + "$ref": "1621" + }, + "value": "example-pvc" + } + } + }, + "provisioningState": { + "$id": "9124", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "9125", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "9126", + "name": { + "$id": "9127", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "9128", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "9129", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowEndpoints/resource-name123" + }, + "name": { + "$id": "9130", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "zyhxscudobzfacetvgyjiav" + }, + "type": { + "$id": "9131", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "iay" + }, + "systemData": { + "$id": "9132", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "9133", + "createdBy": { + "$id": "9134", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "9135", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "9136", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "9137", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "9138", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "9139", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + }, + { + "$id": "9140", + "kind": "http", + "name": "DataflowEndpoint_CreateOrUpdate_MQTT", + "description": "DataflowEndpoint_CreateOrUpdate_MQTT", + "filePath": "2025-04-01/DataflowEndpoint_CreateOrUpdate_MQTT.json", + "parameters": [ + { + "$id": "9141", + "parameter": { + "$ref": "8292" + }, + "value": { + "$id": "9142", + "kind": "string", + "type": { + "$ref": "8293" + }, + "value": "2025-04-01" + } + }, + { + "$id": "9143", + "parameter": { + "$ref": "8296" + }, + "value": { + "$id": "9144", + "kind": "string", + "type": { + "$ref": "8297" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "9145", + "parameter": { + "$ref": "8299" + }, + "value": { + "$id": "9146", + "kind": "string", + "type": { + "$ref": "8300" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "9147", + "parameter": { + "$ref": "8301" + }, + "value": { + "$id": "9148", + "kind": "string", + "type": { + "$ref": "8302" + }, + "value": "resource-name123" + } + }, + { + "$id": "9149", + "parameter": { + "$ref": "8303" + }, + "value": { + "$id": "9150", + "kind": "string", + "type": { + "$ref": "8304" + }, + "value": "generic-mqtt-broker-endpoint" + } + }, + { + "$id": "9151", + "parameter": { + "$ref": "8311" + }, + "value": { + "$id": "9152", + "kind": "model", + "type": { + "$ref": "1397" + }, + "value": { + "$id": "9153", + "properties": { + "$id": "9154", + "kind": "model", + "type": { + "$ref": "1399" + }, + "value": { + "$id": "9155", + "endpointType": { + "$id": "9156", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "Mqtt" + }, + "mqttSettings": { + "$id": "9157", + "kind": "model", + "type": { + "$ref": "1627" + }, + "value": { + "$id": "9158", + "host": { + "$id": "9159", + "kind": "string", + "type": { + "$ref": "1657" + }, + "value": "example.broker.local:1883" + }, + "authentication": { + "$id": "9160", + "kind": "model", + "type": { + "$ref": "1629" + }, + "value": { + "$id": "9161", + "method": { + "$id": "9162", + "kind": "string", + "type": { + "$ref": "312" + }, + "value": "X509Certificate" + }, + "x509CertificateSettings": { + "$id": "9163", + "kind": "model", + "type": { + "$ref": "1554" + }, + "value": { + "$id": "9164", + "secretRef": { + "$id": "9165", + "kind": "string", + "type": { + "$ref": "1556" + }, + "value": "example-secret" + } + } + } + } + }, + "tls": { + "$id": "9166", + "kind": "model", + "type": { + "$ref": "1603" + }, + "value": { + "$id": "9167", + "mode": { + "$id": "9168", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Disabled" + } + } + }, + "clientIdPrefix": { + "$id": "9169", + "kind": "string", + "type": { + "$ref": "1653" + }, + "value": "factory-gateway" + }, + "retain": { + "$id": "9170", + "kind": "string", + "type": { + "$ref": "324" + }, + "value": "Keep" + }, + "sessionExpirySeconds": { + "$id": "9171", + "kind": "number", + "type": { + "$ref": "1679" + }, + "value": 3600 + }, + "qos": { + "$id": "9172", + "kind": "number", + "type": { + "$ref": "1675" + }, + "value": 1 + }, + "protocol": { + "$id": "9173", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "WebSockets" + }, + "maxInflightMessages": { + "$id": "9174", + "kind": "number", + "type": { + "$ref": "1671" + }, + "value": 100 + }, + "keepAliveSeconds": { + "$id": "9175", + "kind": "number", + "type": { + "$ref": "1664" + }, + "value": 60 + } + } + } + } + }, + "extendedLocation": { + "$id": "9176", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "9177", + "name": { + "$id": "9178", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "9179", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "9180", + "response": { + "$ref": "8312" + }, + "statusCode": 200, + "bodyValue": { + "$id": "9181", + "kind": "model", + "type": { + "$ref": "1397" + }, + "value": { + "$id": "9182", + "properties": { + "$id": "9183", + "kind": "model", + "type": { + "$ref": "1399" + }, + "value": { + "$id": "9184", + "endpointType": { + "$id": "9185", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "Mqtt" + }, + "mqttSettings": { + "$id": "9186", + "kind": "model", + "type": { + "$ref": "1627" + }, + "value": { + "$id": "9187", + "host": { + "$id": "9188", + "kind": "string", + "type": { + "$ref": "1657" + }, + "value": "example.broker.local:1883" + }, + "authentication": { + "$id": "9189", + "kind": "model", + "type": { + "$ref": "1629" + }, + "value": { + "$id": "9190", + "method": { + "$id": "9191", + "kind": "string", + "type": { + "$ref": "312" + }, + "value": "X509Certificate" + }, + "x509CertificateSettings": { + "$id": "9192", + "kind": "model", + "type": { + "$ref": "1554" + }, + "value": { + "$id": "9193", + "secretRef": { + "$id": "9194", + "kind": "string", + "type": { + "$ref": "1556" + }, + "value": "example-secret" + } + } + } + } + }, + "tls": { + "$id": "9195", + "kind": "model", + "type": { + "$ref": "1603" + }, + "value": { + "$id": "9196", + "mode": { + "$id": "9197", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Disabled" + } + } + }, + "clientIdPrefix": { + "$id": "9198", + "kind": "string", + "type": { + "$ref": "1653" + }, + "value": "factory-gateway" + }, + "retain": { + "$id": "9199", + "kind": "string", + "type": { + "$ref": "324" + }, + "value": "Keep" + }, + "sessionExpirySeconds": { + "$id": "9200", + "kind": "number", + "type": { + "$ref": "1679" + }, + "value": 3600 + }, + "qos": { + "$id": "9201", + "kind": "number", + "type": { + "$ref": "1675" + }, + "value": 1 + }, + "protocol": { + "$id": "9202", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "WebSockets" + }, + "maxInflightMessages": { + "$id": "9203", + "kind": "number", + "type": { + "$ref": "1671" + }, + "value": 100 + }, + "keepAliveSeconds": { + "$id": "9204", + "kind": "number", + "type": { + "$ref": "1664" + }, + "value": 60 + } + } + }, + "provisioningState": { + "$id": "9205", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "9206", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "9207", + "name": { + "$id": "9208", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "9209", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "9210", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowEndpoints/resource-name123" + }, + "name": { + "$id": "9211", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "zyhxscudobzfacetvgyjiav" + }, + "type": { + "$id": "9212", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "iay" + }, + "systemData": { + "$id": "9213", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "9214", + "createdBy": { + "$id": "9215", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "9216", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "9217", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "9218", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "9219", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "9220", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "9221", + "response": { + "$ref": "8313" + }, + "statusCode": 201, + "bodyValue": { + "$id": "9222", + "kind": "model", + "type": { + "$ref": "1397" + }, + "value": { + "$id": "9223", + "properties": { + "$id": "9224", + "kind": "model", + "type": { + "$ref": "1399" + }, + "value": { + "$id": "9225", + "endpointType": { + "$id": "9226", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "Mqtt" + }, + "mqttSettings": { + "$id": "9227", + "kind": "model", + "type": { + "$ref": "1627" + }, + "value": { + "$id": "9228", + "host": { + "$id": "9229", + "kind": "string", + "type": { + "$ref": "1657" + }, + "value": "example.broker.local:1883" + }, + "authentication": { + "$id": "9230", + "kind": "model", + "type": { + "$ref": "1629" + }, + "value": { + "$id": "9231", + "method": { + "$id": "9232", + "kind": "string", + "type": { + "$ref": "312" + }, + "value": "X509Certificate" + }, + "x509CertificateSettings": { + "$id": "9233", + "kind": "model", + "type": { + "$ref": "1554" + }, + "value": { + "$id": "9234", + "secretRef": { + "$id": "9235", + "kind": "string", + "type": { + "$ref": "1556" + }, + "value": "example-secret" + } + } + } + } + }, + "tls": { + "$id": "9236", + "kind": "model", + "type": { + "$ref": "1603" + }, + "value": { + "$id": "9237", + "mode": { + "$id": "9238", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Disabled" + } + } + }, + "clientIdPrefix": { + "$id": "9239", + "kind": "string", + "type": { + "$ref": "1653" + }, + "value": "factory-gateway" + }, + "retain": { + "$id": "9240", + "kind": "string", + "type": { + "$ref": "324" + }, + "value": "Keep" + }, + "sessionExpirySeconds": { + "$id": "9241", + "kind": "number", + "type": { + "$ref": "1679" + }, + "value": 3600 + }, + "qos": { + "$id": "9242", + "kind": "number", + "type": { + "$ref": "1675" + }, + "value": 1 + }, + "protocol": { + "$id": "9243", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "WebSockets" + }, + "maxInflightMessages": { + "$id": "9244", + "kind": "number", + "type": { + "$ref": "1671" + }, + "value": 100 + }, + "keepAliveSeconds": { + "$id": "9245", + "kind": "number", + "type": { + "$ref": "1664" + }, + "value": 60 + } + } + }, + "provisioningState": { + "$id": "9246", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "9247", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "9248", + "name": { + "$id": "9249", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "9250", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "9251", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowEndpoints/resource-name123" + }, + "name": { + "$id": "9252", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "zyhxscudobzfacetvgyjiav" + }, + "type": { + "$id": "9253", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "iay" + }, + "systemData": { + "$id": "9254", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "9255", + "createdBy": { + "$id": "9256", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "9257", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "9258", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "9259", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "9260", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "9261", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + }, + { + "$id": "9262", + "kind": "http", + "name": "DataflowEndpoint_CreateOrUpdate", + "description": "DataflowEndpoint_CreateOrUpdate", + "filePath": "2025-04-01/DataflowEndpoint_CreateOrUpdate_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "9263", + "parameter": { + "$ref": "8292" + }, + "value": { + "$id": "9264", + "kind": "string", + "type": { + "$ref": "8293" + }, + "value": "2025-04-01" + } + }, + { + "$id": "9265", + "parameter": { + "$ref": "8296" + }, + "value": { + "$id": "9266", + "kind": "string", + "type": { + "$ref": "8297" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "9267", + "parameter": { + "$ref": "8299" + }, + "value": { + "$id": "9268", + "kind": "string", + "type": { + "$ref": "8300" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "9269", + "parameter": { + "$ref": "8301" + }, + "value": { + "$id": "9270", + "kind": "string", + "type": { + "$ref": "8302" + }, + "value": "resource-name123" + } + }, + { + "$id": "9271", + "parameter": { + "$ref": "8303" + }, + "value": { + "$id": "9272", + "kind": "string", + "type": { + "$ref": "8304" + }, + "value": "resource-name123" + } + }, + { + "$id": "9273", + "parameter": { + "$ref": "8311" + }, + "value": { + "$id": "9274", + "kind": "model", + "type": { + "$ref": "1397" + }, + "value": { + "$id": "9275", + "properties": { + "$id": "9276", + "kind": "model", + "type": { + "$ref": "1399" + }, + "value": { + "$id": "9277", + "endpointType": { + "$id": "9278", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "DataExplorer" + }, + "dataExplorerSettings": { + "$id": "9279", + "kind": "model", + "type": { + "$ref": "1404" + }, + "value": { + "$id": "9280", + "authentication": { + "$id": "9281", + "kind": "model", + "type": { + "$ref": "1406" + }, + "value": { + "$id": "9282", + "method": { + "$id": "9283", + "kind": "string", + "type": { + "$ref": "232" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "9284", + "kind": "model", + "type": { + "$ref": "1411" + }, + "value": { + "$id": "9285", + "audience": { + "$id": "9286", + "kind": "string", + "type": { + "$ref": "1413" + }, + "value": "psxomrfbhoflycm" + } + } + }, + "userAssignedManagedIdentitySettings": { + "$id": "9287", + "kind": "model", + "type": { + "$ref": "1419" + }, + "value": { + "$id": "9288", + "clientId": { + "$id": "9289", + "kind": "string", + "type": { + "$ref": "1421" + }, + "value": "fb90f267-8872-431a-a76a-a1cec5d3c4d2" + }, + "scope": { + "$id": "9290", + "kind": "string", + "type": { + "$ref": "1425" + }, + "value": "zop" + }, + "tenantId": { + "$id": "9291", + "kind": "string", + "type": { + "$ref": "1429" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + } + } + }, + "database": { + "$id": "9292", + "kind": "string", + "type": { + "$ref": "1437" + }, + "value": "yqcdpjsifm" + }, + "host": { + "$id": "9293", + "kind": "string", + "type": { + "$ref": "1441" + }, + "value": "..kusto.windows.net" + }, + "batching": { + "$id": "9294", + "kind": "model", + "type": { + "$ref": "1445" + }, + "value": { + "$id": "9295", + "latencySeconds": { + "$id": "9296", + "kind": "number", + "type": { + "$ref": "1447" + }, + "value": 9312 + }, + "maxMessages": { + "$id": "9297", + "kind": "number", + "type": { + "$ref": "1451" + }, + "value": 9028 + } + } + } + } + }, + "dataLakeStorageSettings": { + "$id": "9298", + "kind": "model", + "type": { + "$ref": "1459" + }, + "value": { + "$id": "9299", + "authentication": { + "$id": "9300", + "kind": "model", + "type": { + "$ref": "1461" + }, + "value": { + "$id": "9301", + "method": { + "$id": "9302", + "kind": "string", + "type": { + "$ref": "238" + }, + "value": "SystemAssignedManagedIdentity" + }, + "accessTokenSettings": { + "$id": "9303", + "kind": "model", + "type": { + "$ref": "1466" + }, + "value": { + "$id": "9304", + "secretRef": { + "$id": "9305", + "kind": "string", + "type": { + "$ref": "1468" + }, + "value": "sevriyphcvnlrnfudqzejecwa" + } + } + }, + "systemAssignedManagedIdentitySettings": { + "$id": "9306", + "kind": "model", + "type": { + "$ref": "1411" + }, + "value": { + "$id": "9307", + "audience": { + "$id": "9308", + "kind": "string", + "type": { + "$ref": "1413" + }, + "value": "psxomrfbhoflycm" + } + } + }, + "userAssignedManagedIdentitySettings": { + "$id": "9309", + "kind": "model", + "type": { + "$ref": "1419" + }, + "value": { + "$id": "9310", + "clientId": { + "$id": "9311", + "kind": "string", + "type": { + "$ref": "1421" + }, + "value": "fb90f267-8872-431a-a76a-a1cec5d3c4d2" + }, + "scope": { + "$id": "9312", + "kind": "string", + "type": { + "$ref": "1425" + }, + "value": "zop" + }, + "tenantId": { + "$id": "9313", + "kind": "string", + "type": { + "$ref": "1429" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + } + } + }, + "host": { + "$id": "9314", + "kind": "string", + "type": { + "$ref": "1482" + }, + "value": ".blob.core.windows.net" + }, + "batching": { + "$id": "9315", + "kind": "model", + "type": { + "$ref": "1445" + }, + "value": { + "$id": "9316", + "latencySeconds": { + "$id": "9317", + "kind": "number", + "type": { + "$ref": "1447" + }, + "value": 9312 + }, + "maxMessages": { + "$id": "9318", + "kind": "number", + "type": { + "$ref": "1451" + }, + "value": 9028 + } + } + } + } + }, + "fabricOneLakeSettings": { + "$id": "9319", + "kind": "model", + "type": { + "$ref": "1491" + }, + "value": { + "$id": "9320", + "authentication": { + "$id": "9321", + "kind": "model", + "type": { + "$ref": "1493" + }, + "value": { + "$id": "9322", + "method": { + "$id": "9323", + "kind": "string", + "type": { + "$ref": "246" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "9324", + "kind": "model", + "type": { + "$ref": "1411" + }, + "value": { + "$id": "9325", + "audience": { + "$id": "9326", + "kind": "string", + "type": { + "$ref": "1413" + }, + "value": "psxomrfbhoflycm" + } + } + }, + "userAssignedManagedIdentitySettings": { + "$id": "9327", + "kind": "model", + "type": { + "$ref": "1419" + }, + "value": { + "$id": "9328", + "clientId": { + "$id": "9329", + "kind": "string", + "type": { + "$ref": "1421" + }, + "value": "fb90f267-8872-431a-a76a-a1cec5d3c4d2" + }, + "scope": { + "$id": "9330", + "kind": "string", + "type": { + "$ref": "1425" + }, + "value": "zop" + }, + "tenantId": { + "$id": "9331", + "kind": "string", + "type": { + "$ref": "1429" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + } + } + }, + "names": { + "$id": "9332", + "kind": "model", + "type": { + "$ref": "1506" + }, + "value": { + "$id": "9333", + "lakehouseName": { + "$id": "9334", + "kind": "string", + "type": { + "$ref": "1508" + }, + "value": "wpeathi" + }, + "workspaceName": { + "$id": "9335", + "kind": "string", + "type": { + "$ref": "1512" + }, + "value": "nwgmitkbljztgms" + } + } + }, + "oneLakePathType": { + "$id": "9336", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "Files" + }, + "host": { + "$id": "9337", + "kind": "string", + "type": { + "$ref": "1521" + }, + "value": "https://.fabric.microsoft.com" + }, + "batching": { + "$id": "9338", + "kind": "model", + "type": { + "$ref": "1445" + }, + "value": { + "$id": "9339", + "latencySeconds": { + "$id": "9340", + "kind": "number", + "type": { + "$ref": "1447" + }, + "value": 9312 + }, + "maxMessages": { + "$id": "9341", + "kind": "number", + "type": { + "$ref": "1451" + }, + "value": 9028 + } + } + } + } + }, + "kafkaSettings": { + "$id": "9342", + "kind": "model", + "type": { + "$ref": "1530" + }, + "value": { + "$id": "9343", + "authentication": { + "$id": "9344", + "kind": "model", + "type": { + "$ref": "1532" + }, + "value": { + "$id": "9345", + "method": { + "$id": "9346", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "9347", + "kind": "model", + "type": { + "$ref": "1411" + }, + "value": { + "$id": "9348", + "audience": { + "$id": "9349", + "kind": "string", + "type": { + "$ref": "1413" + }, + "value": "psxomrfbhoflycm" + } + } + }, + "userAssignedManagedIdentitySettings": { + "$id": "9350", + "kind": "model", + "type": { + "$ref": "1419" + }, + "value": { + "$id": "9351", + "clientId": { + "$id": "9352", + "kind": "string", + "type": { + "$ref": "1421" + }, + "value": "fb90f267-8872-431a-a76a-a1cec5d3c4d2" + }, + "scope": { + "$id": "9353", + "kind": "string", + "type": { + "$ref": "1425" + }, + "value": "zop" + }, + "tenantId": { + "$id": "9354", + "kind": "string", + "type": { + "$ref": "1429" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + }, + "saslSettings": { + "$id": "9355", + "kind": "model", + "type": { + "$ref": "1543" + }, + "value": { + "$id": "9356", + "saslType": { + "$id": "9357", + "kind": "string", + "type": { + "$ref": "270" + }, + "value": "Plain" + }, + "secretRef": { + "$id": "9358", + "kind": "string", + "type": { + "$ref": "1548" + }, + "value": "visyxoztqnylvbyokhtmpdkwes" + } + } + }, + "x509CertificateSettings": { + "$id": "9359", + "kind": "model", + "type": { + "$ref": "1554" + }, + "value": { + "$id": "9360", + "secretRef": { + "$id": "9361", + "kind": "string", + "type": { + "$ref": "1556" + }, + "value": "afwizrystfslkfqd" + } + } + } + } + }, + "consumerGroupId": { + "$id": "9362", + "kind": "string", + "type": { + "$ref": "1564" + }, + "value": "ukkzcjiyenhxokat" + }, + "host": { + "$id": "9363", + "kind": "string", + "type": { + "$ref": "1568" + }, + "value": "pwcqfiqclcgneolpewnyavoulbip" + }, + "batching": { + "$id": "9364", + "kind": "model", + "type": { + "$ref": "1572" + }, + "value": { + "$id": "9365", + "mode": { + "$id": "9366", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "latencyMs": { + "$id": "9367", + "kind": "number", + "type": { + "$ref": "1577" + }, + "value": 3679 + }, + "maxBytes": { + "$id": "9368", + "kind": "number", + "type": { + "$ref": "1581" + }, + "value": 8887 + }, + "maxMessages": { + "$id": "9369", + "kind": "number", + "type": { + "$ref": "1585" + }, + "value": 2174 + } + } + }, + "copyMqttProperties": { + "$id": "9370", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "compression": { + "$id": "9371", + "kind": "string", + "type": { + "$ref": "278" + }, + "value": "None" + }, + "kafkaAcks": { + "$id": "9372", + "kind": "string", + "type": { + "$ref": "288" + }, + "value": "Zero" + }, + "partitionStrategy": { + "$id": "9373", + "kind": "string", + "type": { + "$ref": "296" + }, + "value": "Default" + }, + "tls": { + "$id": "9374", + "kind": "model", + "type": { + "$ref": "1603" + }, + "value": { + "$id": "9375", + "mode": { + "$id": "9376", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "trustedCaCertificateConfigMapRef": { + "$id": "9377", + "kind": "string", + "type": { + "$ref": "1608" + }, + "value": "tectjjvukvelsreihwadh" + } + } + }, + "cloudEventAttributes": { + "$id": "9378", + "kind": "string", + "type": { + "$ref": "306" + }, + "value": "PassThrough" + } + } + }, + "localStorageSettings": { + "$id": "9379", + "kind": "model", + "type": { + "$ref": "1619" + }, + "value": { + "$id": "9380", + "persistentVolumeClaimRef": { + "$id": "9381", + "kind": "string", + "type": { + "$ref": "1621" + }, + "value": "jjwqwvd" + } + } + }, + "mqttSettings": { + "$id": "9382", + "kind": "model", + "type": { + "$ref": "1627" + }, + "value": { + "$id": "9383", + "authentication": { + "$id": "9384", + "kind": "model", + "type": { + "$ref": "1629" + }, + "value": { + "$id": "9385", + "method": { + "$id": "9386", + "kind": "string", + "type": { + "$ref": "312" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "9387", + "kind": "model", + "type": { + "$ref": "1411" + }, + "value": { + "$id": "9388", + "audience": { + "$id": "9389", + "kind": "string", + "type": { + "$ref": "1413" + }, + "value": "psxomrfbhoflycm" + } + } + }, + "userAssignedManagedIdentitySettings": { + "$id": "9390", + "kind": "model", + "type": { + "$ref": "1419" + }, + "value": { + "$id": "9391", + "clientId": { + "$id": "9392", + "kind": "string", + "type": { + "$ref": "1421" + }, + "value": "fb90f267-8872-431a-a76a-a1cec5d3c4d2" + }, + "scope": { + "$id": "9393", + "kind": "string", + "type": { + "$ref": "1425" + }, + "value": "zop" + }, + "tenantId": { + "$id": "9394", + "kind": "string", + "type": { + "$ref": "1429" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + }, + "serviceAccountTokenSettings": { + "$id": "9395", + "kind": "model", + "type": { + "$ref": "1640" + }, + "value": { + "$id": "9396", + "audience": { + "$id": "9397", + "kind": "string", + "type": { + "$ref": "1642" + }, + "value": "ejbklrbxgjaqleoycgpje" + } + } + }, + "x509CertificateSettings": { + "$id": "9398", + "kind": "model", + "type": { + "$ref": "1554" + }, + "value": { + "$id": "9399", + "secretRef": { + "$id": "9400", + "kind": "string", + "type": { + "$ref": "1556" + }, + "value": "afwizrystfslkfqd" + } + } + } + } + }, + "clientIdPrefix": { + "$id": "9401", + "kind": "string", + "type": { + "$ref": "1653" + }, + "value": "kkljsdxdirfhwxtkavldekeqhv" + }, + "host": { + "$id": "9402", + "kind": "string", + "type": { + "$ref": "1657" + }, + "value": "nyhnxqnbspstctl" + }, + "protocol": { + "$id": "9403", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "Mqtt" + }, + "keepAliveSeconds": { + "$id": "9404", + "kind": "number", + "type": { + "$ref": "1664" + }, + "value": 0 + }, + "retain": { + "$id": "9405", + "kind": "string", + "type": { + "$ref": "324" + }, + "value": "Keep" + }, + "maxInflightMessages": { + "$id": "9406", + "kind": "number", + "type": { + "$ref": "1671" + }, + "value": 0 + }, + "qos": { + "$id": "9407", + "kind": "number", + "type": { + "$ref": "1675" + }, + "value": 1 + }, + "sessionExpirySeconds": { + "$id": "9408", + "kind": "number", + "type": { + "$ref": "1679" + }, + "value": 0 + }, + "tls": { + "$id": "9409", + "kind": "model", + "type": { + "$ref": "1603" + }, + "value": { + "$id": "9410", + "mode": { + "$id": "9411", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "trustedCaCertificateConfigMapRef": { + "$id": "9412", + "kind": "string", + "type": { + "$ref": "1608" + }, + "value": "tectjjvukvelsreihwadh" + } + } + }, + "cloudEventAttributes": { + "$id": "9413", + "kind": "string", + "type": { + "$ref": "306" + }, + "value": "PassThrough" + } + } + } + } + }, + "extendedLocation": { + "$id": "9414", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "9415", + "name": { + "$id": "9416", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "9417", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "9418", + "response": { + "$ref": "8312" + }, + "statusCode": 200, + "bodyValue": { + "$id": "9419", + "kind": "model", + "type": { + "$ref": "1397" + }, + "value": { + "$id": "9420", + "properties": { + "$id": "9421", + "kind": "model", + "type": { + "$ref": "1399" + }, + "value": { + "$id": "9422", + "endpointType": { + "$id": "9423", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "DataExplorer" + }, + "dataExplorerSettings": { + "$id": "9424", + "kind": "model", + "type": { + "$ref": "1404" + }, + "value": { + "$id": "9425", + "authentication": { + "$id": "9426", + "kind": "model", + "type": { + "$ref": "1406" + }, + "value": { + "$id": "9427", + "method": { + "$id": "9428", + "kind": "string", + "type": { + "$ref": "232" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "9429", + "kind": "model", + "type": { + "$ref": "1411" + }, + "value": { + "$id": "9430", + "audience": { + "$id": "9431", + "kind": "string", + "type": { + "$ref": "1413" + }, + "value": "psxomrfbhoflycm" + } + } + }, + "userAssignedManagedIdentitySettings": { + "$id": "9432", + "kind": "model", + "type": { + "$ref": "1419" + }, + "value": { + "$id": "9433", + "clientId": { + "$id": "9434", + "kind": "string", + "type": { + "$ref": "1421" + }, + "value": "fb90f267-8872-431a-a76a-a1cec5d3c4d2" + }, + "scope": { + "$id": "9435", + "kind": "string", + "type": { + "$ref": "1425" + }, + "value": "zop" + }, + "tenantId": { + "$id": "9436", + "kind": "string", + "type": { + "$ref": "1429" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + } + } + }, + "database": { + "$id": "9437", + "kind": "string", + "type": { + "$ref": "1437" + }, + "value": "yqcdpjsifm" + }, + "host": { + "$id": "9438", + "kind": "string", + "type": { + "$ref": "1441" + }, + "value": "..kusto.windows.net" + }, + "batching": { + "$id": "9439", + "kind": "model", + "type": { + "$ref": "1445" + }, + "value": { + "$id": "9440", + "latencySeconds": { + "$id": "9441", + "kind": "number", + "type": { + "$ref": "1447" + }, + "value": 1228 + }, + "maxMessages": { + "$id": "9442", + "kind": "number", + "type": { + "$ref": "1451" + }, + "value": 171 + } + } + } + } + }, + "dataLakeStorageSettings": { + "$id": "9443", + "kind": "model", + "type": { + "$ref": "1459" + }, + "value": { + "$id": "9444", + "authentication": { + "$id": "9445", + "kind": "model", + "type": { + "$ref": "1461" + }, + "value": { + "$id": "9446", + "method": { + "$id": "9447", + "kind": "string", + "type": { + "$ref": "238" + }, + "value": "SystemAssignedManagedIdentity" + }, + "accessTokenSettings": { + "$id": "9448", + "kind": "model", + "type": { + "$ref": "1466" + }, + "value": { + "$id": "9449", + "secretRef": { + "$id": "9450", + "kind": "string", + "type": { + "$ref": "1468" + }, + "value": "sevriyphcvnlrnfudqzejecwa" + } + } + }, + "systemAssignedManagedIdentitySettings": { + "$id": "9451", + "kind": "model", + "type": { + "$ref": "1411" + }, + "value": { + "$id": "9452", + "audience": { + "$id": "9453", + "kind": "string", + "type": { + "$ref": "1413" + }, + "value": "psxomrfbhoflycm" + } + } + }, + "userAssignedManagedIdentitySettings": { + "$id": "9454", + "kind": "model", + "type": { + "$ref": "1419" + }, + "value": { + "$id": "9455", + "clientId": { + "$id": "9456", + "kind": "string", + "type": { + "$ref": "1421" + }, + "value": "fb90f267-8872-431a-a76a-a1cec5d3c4d2" + }, + "scope": { + "$id": "9457", + "kind": "string", + "type": { + "$ref": "1425" + }, + "value": "zop" + }, + "tenantId": { + "$id": "9458", + "kind": "string", + "type": { + "$ref": "1429" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + } + } + }, + "host": { + "$id": "9459", + "kind": "string", + "type": { + "$ref": "1482" + }, + "value": ".blob.core.windows.net" + }, + "batching": { + "$id": "9460", + "kind": "model", + "type": { + "$ref": "1445" + }, + "value": { + "$id": "9461", + "latencySeconds": { + "$id": "9462", + "kind": "number", + "type": { + "$ref": "1447" + }, + "value": 1228 + }, + "maxMessages": { + "$id": "9463", + "kind": "number", + "type": { + "$ref": "1451" + }, + "value": 171 + } + } + } + } + }, + "fabricOneLakeSettings": { + "$id": "9464", + "kind": "model", + "type": { + "$ref": "1491" + }, + "value": { + "$id": "9465", + "authentication": { + "$id": "9466", + "kind": "model", + "type": { + "$ref": "1493" + }, + "value": { + "$id": "9467", + "method": { + "$id": "9468", + "kind": "string", + "type": { + "$ref": "246" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "9469", + "kind": "model", + "type": { + "$ref": "1411" + }, + "value": { + "$id": "9470", + "audience": { + "$id": "9471", + "kind": "string", + "type": { + "$ref": "1413" + }, + "value": "psxomrfbhoflycm" + } + } + }, + "userAssignedManagedIdentitySettings": { + "$id": "9472", + "kind": "model", + "type": { + "$ref": "1419" + }, + "value": { + "$id": "9473", + "clientId": { + "$id": "9474", + "kind": "string", + "type": { + "$ref": "1421" + }, + "value": "fb90f267-8872-431a-a76a-a1cec5d3c4d2" + }, + "scope": { + "$id": "9475", + "kind": "string", + "type": { + "$ref": "1425" + }, + "value": "zop" + }, + "tenantId": { + "$id": "9476", + "kind": "string", + "type": { + "$ref": "1429" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + } + } + }, + "names": { + "$id": "9477", + "kind": "model", + "type": { + "$ref": "1506" + }, + "value": { + "$id": "9478", + "lakehouseName": { + "$id": "9479", + "kind": "string", + "type": { + "$ref": "1508" + }, + "value": "wpeathi" + }, + "workspaceName": { + "$id": "9480", + "kind": "string", + "type": { + "$ref": "1512" + }, + "value": "nwgmitkbljztgms" + } + } + }, + "oneLakePathType": { + "$id": "9481", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "Files" + }, + "host": { + "$id": "9482", + "kind": "string", + "type": { + "$ref": "1521" + }, + "value": "https://.fabric.microsoft.com" + }, + "batching": { + "$id": "9483", + "kind": "model", + "type": { + "$ref": "1445" + }, + "value": { + "$id": "9484", + "latencySeconds": { + "$id": "9485", + "kind": "number", + "type": { + "$ref": "1447" + }, + "value": 1228 + }, + "maxMessages": { + "$id": "9486", + "kind": "number", + "type": { + "$ref": "1451" + }, + "value": 171 + } + } + } + } + }, + "kafkaSettings": { + "$id": "9487", + "kind": "model", + "type": { + "$ref": "1530" + }, + "value": { + "$id": "9488", + "authentication": { + "$id": "9489", + "kind": "model", + "type": { + "$ref": "1532" + }, + "value": { + "$id": "9490", + "method": { + "$id": "9491", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "9492", + "kind": "model", + "type": { + "$ref": "1411" + }, + "value": { + "$id": "9493", + "audience": { + "$id": "9494", + "kind": "string", + "type": { + "$ref": "1413" + }, + "value": "psxomrfbhoflycm" + } + } + }, + "userAssignedManagedIdentitySettings": { + "$id": "9495", + "kind": "model", + "type": { + "$ref": "1419" + }, + "value": { + "$id": "9496", + "clientId": { + "$id": "9497", + "kind": "string", + "type": { + "$ref": "1421" + }, + "value": "fb90f267-8872-431a-a76a-a1cec5d3c4d2" + }, + "scope": { + "$id": "9498", + "kind": "string", + "type": { + "$ref": "1425" + }, + "value": "zop" + }, + "tenantId": { + "$id": "9499", + "kind": "string", + "type": { + "$ref": "1429" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + }, + "saslSettings": { + "$id": "9500", + "kind": "model", + "type": { + "$ref": "1543" + }, + "value": { + "$id": "9501", + "saslType": { + "$id": "9502", + "kind": "string", + "type": { + "$ref": "270" + }, + "value": "Plain" + }, + "secretRef": { + "$id": "9503", + "kind": "string", + "type": { + "$ref": "1548" + }, + "value": "visyxoztqnylvbyokhtmpdkwes" + } + } + }, + "x509CertificateSettings": { + "$id": "9504", + "kind": "model", + "type": { + "$ref": "1554" + }, + "value": { + "$id": "9505", + "secretRef": { + "$id": "9506", + "kind": "string", + "type": { + "$ref": "1556" + }, + "value": "afwizrystfslkfqd" + } + } + } + } + }, + "consumerGroupId": { + "$id": "9507", + "kind": "string", + "type": { + "$ref": "1564" + }, + "value": "ukkzcjiyenhxokat" + }, + "host": { + "$id": "9508", + "kind": "string", + "type": { + "$ref": "1568" + }, + "value": "pwcqfiqclcgneolpewnyavoulbip" + }, + "batching": { + "$id": "9509", + "kind": "model", + "type": { + "$ref": "1572" + }, + "value": { + "$id": "9510", + "mode": { + "$id": "9511", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "latencyMs": { + "$id": "9512", + "kind": "number", + "type": { + "$ref": "1577" + }, + "value": 3679 + }, + "maxBytes": { + "$id": "9513", + "kind": "number", + "type": { + "$ref": "1581" + }, + "value": 8887 + }, + "maxMessages": { + "$id": "9514", + "kind": "number", + "type": { + "$ref": "1585" + }, + "value": 2174 + } + } + }, + "copyMqttProperties": { + "$id": "9515", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "compression": { + "$id": "9516", + "kind": "string", + "type": { + "$ref": "278" + }, + "value": "None" + }, + "kafkaAcks": { + "$id": "9517", + "kind": "string", + "type": { + "$ref": "288" + }, + "value": "Zero" + }, + "partitionStrategy": { + "$id": "9518", + "kind": "string", + "type": { + "$ref": "296" + }, + "value": "Default" + }, + "tls": { + "$id": "9519", + "kind": "model", + "type": { + "$ref": "1603" + }, + "value": { + "$id": "9520", + "mode": { + "$id": "9521", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "trustedCaCertificateConfigMapRef": { + "$id": "9522", + "kind": "string", + "type": { + "$ref": "1608" + }, + "value": "tectjjvukvelsreihwadh" + } + } + }, + "cloudEventAttributes": { + "$id": "9523", + "kind": "string", + "type": { + "$ref": "306" + }, + "value": "PassThrough" + } + } + }, + "localStorageSettings": { + "$id": "9524", + "kind": "model", + "type": { + "$ref": "1619" + }, + "value": { + "$id": "9525", + "persistentVolumeClaimRef": { + "$id": "9526", + "kind": "string", + "type": { + "$ref": "1621" + }, + "value": "jjwqwvd" + } + } + }, + "mqttSettings": { + "$id": "9527", + "kind": "model", + "type": { + "$ref": "1627" + }, + "value": { + "$id": "9528", + "authentication": { + "$id": "9529", + "kind": "model", + "type": { + "$ref": "1629" + }, + "value": { + "$id": "9530", + "method": { + "$id": "9531", + "kind": "string", + "type": { + "$ref": "312" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "9532", + "kind": "model", + "type": { + "$ref": "1411" + }, + "value": { + "$id": "9533", + "audience": { + "$id": "9534", + "kind": "string", + "type": { + "$ref": "1413" + }, + "value": "psxomrfbhoflycm" + } + } + }, + "userAssignedManagedIdentitySettings": { + "$id": "9535", + "kind": "model", + "type": { + "$ref": "1419" + }, + "value": { + "$id": "9536", + "clientId": { + "$id": "9537", + "kind": "string", + "type": { + "$ref": "1421" + }, + "value": "fb90f267-8872-431a-a76a-a1cec5d3c4d2" + }, + "scope": { + "$id": "9538", + "kind": "string", + "type": { + "$ref": "1425" + }, + "value": "zop" + }, + "tenantId": { + "$id": "9539", + "kind": "string", + "type": { + "$ref": "1429" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + }, + "serviceAccountTokenSettings": { + "$id": "9540", + "kind": "model", + "type": { + "$ref": "1640" + }, + "value": { + "$id": "9541", + "audience": { + "$id": "9542", + "kind": "string", + "type": { + "$ref": "1642" + }, + "value": "ejbklrbxgjaqleoycgpje" + } + } + }, + "x509CertificateSettings": { + "$id": "9543", + "kind": "model", + "type": { + "$ref": "1554" + }, + "value": { + "$id": "9544", + "secretRef": { + "$id": "9545", + "kind": "string", + "type": { + "$ref": "1556" + }, + "value": "afwizrystfslkfqd" + } + } + } + } + }, + "clientIdPrefix": { + "$id": "9546", + "kind": "string", + "type": { + "$ref": "1653" + }, + "value": "kkljsdxdirfhwxtkavldekeqhv" + }, + "host": { + "$id": "9547", + "kind": "string", + "type": { + "$ref": "1657" + }, + "value": "nyhnxqnbspstctl" + }, + "protocol": { + "$id": "9548", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "Mqtt" + }, + "keepAliveSeconds": { + "$id": "9549", + "kind": "number", + "type": { + "$ref": "1664" + }, + "value": 0 + }, + "retain": { + "$id": "9550", + "kind": "string", + "type": { + "$ref": "324" + }, + "value": "Keep" + }, + "maxInflightMessages": { + "$id": "9551", + "kind": "number", + "type": { + "$ref": "1671" + }, + "value": 0 + }, + "qos": { + "$id": "9552", + "kind": "number", + "type": { + "$ref": "1675" + }, + "value": 1 + }, + "sessionExpirySeconds": { + "$id": "9553", + "kind": "number", + "type": { + "$ref": "1679" + }, + "value": 0 + }, + "tls": { + "$id": "9554", + "kind": "model", + "type": { + "$ref": "1603" + }, + "value": { + "$id": "9555", + "mode": { + "$id": "9556", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "trustedCaCertificateConfigMapRef": { + "$id": "9557", + "kind": "string", + "type": { + "$ref": "1608" + }, + "value": "tectjjvukvelsreihwadh" + } + } + }, + "cloudEventAttributes": { + "$id": "9558", + "kind": "string", + "type": { + "$ref": "306" + }, + "value": "PassThrough" + } + } + }, + "provisioningState": { + "$id": "9559", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "9560", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "9561", + "name": { + "$id": "9562", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "9563", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "9564", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowEndpoints/resource-name123" + }, + "name": { + "$id": "9565", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "zyhxscudobzfacetvgyjiav" + }, + "type": { + "$id": "9566", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "iay" + }, + "systemData": { + "$id": "9567", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "9568", + "createdBy": { + "$id": "9569", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "9570", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "9571", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "9572", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "9573", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "9574", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + }, + { + "$id": "9575", + "response": { + "$ref": "8313" + }, + "statusCode": 201, + "bodyValue": { + "$id": "9576", + "kind": "model", + "type": { + "$ref": "1397" + }, + "value": { + "$id": "9577", + "properties": { + "$id": "9578", + "kind": "model", + "type": { + "$ref": "1399" + }, + "value": { + "$id": "9579", + "endpointType": { + "$id": "9580", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "DataExplorer" + }, + "dataExplorerSettings": { + "$id": "9581", + "kind": "model", + "type": { + "$ref": "1404" + }, + "value": { + "$id": "9582", + "authentication": { + "$id": "9583", + "kind": "model", + "type": { + "$ref": "1406" + }, + "value": { + "$id": "9584", + "method": { + "$id": "9585", + "kind": "string", + "type": { + "$ref": "232" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "9586", + "kind": "model", + "type": { + "$ref": "1411" + }, + "value": { + "$id": "9587", + "audience": { + "$id": "9588", + "kind": "string", + "type": { + "$ref": "1413" + }, + "value": "psxomrfbhoflycm" + } + } + }, + "userAssignedManagedIdentitySettings": { + "$id": "9589", + "kind": "model", + "type": { + "$ref": "1419" + }, + "value": { + "$id": "9590", + "clientId": { + "$id": "9591", + "kind": "string", + "type": { + "$ref": "1421" + }, + "value": "fb90f267-8872-431a-a76a-a1cec5d3c4d2" + }, + "scope": { + "$id": "9592", + "kind": "string", + "type": { + "$ref": "1425" + }, + "value": "zop" + }, + "tenantId": { + "$id": "9593", + "kind": "string", + "type": { + "$ref": "1429" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + } + } + }, + "database": { + "$id": "9594", + "kind": "string", + "type": { + "$ref": "1437" + }, + "value": "yqcdpjsifm" + }, + "host": { + "$id": "9595", + "kind": "string", + "type": { + "$ref": "1441" + }, + "value": "..kusto.windows.net" + }, + "batching": { + "$id": "9596", + "kind": "model", + "type": { + "$ref": "1445" + }, + "value": { + "$id": "9597", + "latencySeconds": { + "$id": "9598", + "kind": "number", + "type": { + "$ref": "1447" + }, + "value": 1228 + }, + "maxMessages": { + "$id": "9599", + "kind": "number", + "type": { + "$ref": "1451" + }, + "value": 171 + } + } + } + } + }, + "dataLakeStorageSettings": { + "$id": "9600", + "kind": "model", + "type": { + "$ref": "1459" + }, + "value": { + "$id": "9601", + "authentication": { + "$id": "9602", + "kind": "model", + "type": { + "$ref": "1461" + }, + "value": { + "$id": "9603", + "method": { + "$id": "9604", + "kind": "string", + "type": { + "$ref": "238" + }, + "value": "SystemAssignedManagedIdentity" + }, + "accessTokenSettings": { + "$id": "9605", + "kind": "model", + "type": { + "$ref": "1466" + }, + "value": { + "$id": "9606", + "secretRef": { + "$id": "9607", + "kind": "string", + "type": { + "$ref": "1468" + }, + "value": "sevriyphcvnlrnfudqzejecwa" + } + } + }, + "systemAssignedManagedIdentitySettings": { + "$id": "9608", + "kind": "model", + "type": { + "$ref": "1411" + }, + "value": { + "$id": "9609", + "audience": { + "$id": "9610", + "kind": "string", + "type": { + "$ref": "1413" + }, + "value": "psxomrfbhoflycm" + } + } + }, + "userAssignedManagedIdentitySettings": { + "$id": "9611", + "kind": "model", + "type": { + "$ref": "1419" + }, + "value": { + "$id": "9612", + "clientId": { + "$id": "9613", + "kind": "string", + "type": { + "$ref": "1421" + }, + "value": "fb90f267-8872-431a-a76a-a1cec5d3c4d2" + }, + "scope": { + "$id": "9614", + "kind": "string", + "type": { + "$ref": "1425" + }, + "value": "zop" + }, + "tenantId": { + "$id": "9615", + "kind": "string", + "type": { + "$ref": "1429" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + } + } + }, + "host": { + "$id": "9616", + "kind": "string", + "type": { + "$ref": "1482" + }, + "value": ".blob.core.windows.net" + }, + "batching": { + "$id": "9617", + "kind": "model", + "type": { + "$ref": "1445" + }, + "value": { + "$id": "9618", + "latencySeconds": { + "$id": "9619", + "kind": "number", + "type": { + "$ref": "1447" + }, + "value": 1228 + }, + "maxMessages": { + "$id": "9620", + "kind": "number", + "type": { + "$ref": "1451" + }, + "value": 171 + } + } + } + } + }, + "fabricOneLakeSettings": { + "$id": "9621", + "kind": "model", + "type": { + "$ref": "1491" + }, + "value": { + "$id": "9622", + "authentication": { + "$id": "9623", + "kind": "model", + "type": { + "$ref": "1493" + }, + "value": { + "$id": "9624", + "method": { + "$id": "9625", + "kind": "string", + "type": { + "$ref": "246" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "9626", + "kind": "model", + "type": { + "$ref": "1411" + }, + "value": { + "$id": "9627", + "audience": { + "$id": "9628", + "kind": "string", + "type": { + "$ref": "1413" + }, + "value": "psxomrfbhoflycm" + } + } + }, + "userAssignedManagedIdentitySettings": { + "$id": "9629", + "kind": "model", + "type": { + "$ref": "1419" + }, + "value": { + "$id": "9630", + "clientId": { + "$id": "9631", + "kind": "string", + "type": { + "$ref": "1421" + }, + "value": "fb90f267-8872-431a-a76a-a1cec5d3c4d2" + }, + "scope": { + "$id": "9632", + "kind": "string", + "type": { + "$ref": "1425" + }, + "value": "zop" + }, + "tenantId": { + "$id": "9633", + "kind": "string", + "type": { + "$ref": "1429" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + } + } + }, + "names": { + "$id": "9634", + "kind": "model", + "type": { + "$ref": "1506" + }, + "value": { + "$id": "9635", + "lakehouseName": { + "$id": "9636", + "kind": "string", + "type": { + "$ref": "1508" + }, + "value": "wpeathi" + }, + "workspaceName": { + "$id": "9637", + "kind": "string", + "type": { + "$ref": "1512" + }, + "value": "nwgmitkbljztgms" + } + } + }, + "oneLakePathType": { + "$id": "9638", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "Files" + }, + "host": { + "$id": "9639", + "kind": "string", + "type": { + "$ref": "1521" + }, + "value": "https://.fabric.microsoft.com" + }, + "batching": { + "$id": "9640", + "kind": "model", + "type": { + "$ref": "1445" + }, + "value": { + "$id": "9641", + "latencySeconds": { + "$id": "9642", + "kind": "number", + "type": { + "$ref": "1447" + }, + "value": 1228 + }, + "maxMessages": { + "$id": "9643", + "kind": "number", + "type": { + "$ref": "1451" + }, + "value": 171 + } + } + } + } + }, + "kafkaSettings": { + "$id": "9644", + "kind": "model", + "type": { + "$ref": "1530" + }, + "value": { + "$id": "9645", + "authentication": { + "$id": "9646", + "kind": "model", + "type": { + "$ref": "1532" + }, + "value": { + "$id": "9647", + "method": { + "$id": "9648", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "9649", + "kind": "model", + "type": { + "$ref": "1411" + }, + "value": { + "$id": "9650", + "audience": { + "$id": "9651", + "kind": "string", + "type": { + "$ref": "1413" + }, + "value": "psxomrfbhoflycm" + } + } + }, + "userAssignedManagedIdentitySettings": { + "$id": "9652", + "kind": "model", + "type": { + "$ref": "1419" + }, + "value": { + "$id": "9653", + "clientId": { + "$id": "9654", + "kind": "string", + "type": { + "$ref": "1421" + }, + "value": "fb90f267-8872-431a-a76a-a1cec5d3c4d2" + }, + "scope": { + "$id": "9655", + "kind": "string", + "type": { + "$ref": "1425" + }, + "value": "zop" + }, + "tenantId": { + "$id": "9656", + "kind": "string", + "type": { + "$ref": "1429" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + }, + "saslSettings": { + "$id": "9657", + "kind": "model", + "type": { + "$ref": "1543" + }, + "value": { + "$id": "9658", + "saslType": { + "$id": "9659", + "kind": "string", + "type": { + "$ref": "270" + }, + "value": "Plain" + }, + "secretRef": { + "$id": "9660", + "kind": "string", + "type": { + "$ref": "1548" + }, + "value": "visyxoztqnylvbyokhtmpdkwes" + } + } + }, + "x509CertificateSettings": { + "$id": "9661", + "kind": "model", + "type": { + "$ref": "1554" + }, + "value": { + "$id": "9662", + "secretRef": { + "$id": "9663", + "kind": "string", + "type": { + "$ref": "1556" + }, + "value": "afwizrystfslkfqd" + } + } + } + } + }, + "consumerGroupId": { + "$id": "9664", + "kind": "string", + "type": { + "$ref": "1564" + }, + "value": "ukkzcjiyenhxokat" + }, + "host": { + "$id": "9665", + "kind": "string", + "type": { + "$ref": "1568" + }, + "value": "pwcqfiqclcgneolpewnyavoulbip" + }, + "batching": { + "$id": "9666", + "kind": "model", + "type": { + "$ref": "1572" + }, + "value": { + "$id": "9667", + "mode": { + "$id": "9668", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "latencyMs": { + "$id": "9669", + "kind": "number", + "type": { + "$ref": "1577" + }, + "value": 3679 + }, + "maxBytes": { + "$id": "9670", + "kind": "number", + "type": { + "$ref": "1581" + }, + "value": 8887 + }, + "maxMessages": { + "$id": "9671", + "kind": "number", + "type": { + "$ref": "1585" + }, + "value": 2174 + } + } + }, + "copyMqttProperties": { + "$id": "9672", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "compression": { + "$id": "9673", + "kind": "string", + "type": { + "$ref": "278" + }, + "value": "None" + }, + "kafkaAcks": { + "$id": "9674", + "kind": "string", + "type": { + "$ref": "288" + }, + "value": "Zero" + }, + "partitionStrategy": { + "$id": "9675", + "kind": "string", + "type": { + "$ref": "296" + }, + "value": "Default" + }, + "tls": { + "$id": "9676", + "kind": "model", + "type": { + "$ref": "1603" + }, + "value": { + "$id": "9677", + "mode": { + "$id": "9678", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "trustedCaCertificateConfigMapRef": { + "$id": "9679", + "kind": "string", + "type": { + "$ref": "1608" + }, + "value": "tectjjvukvelsreihwadh" + } + } + }, + "cloudEventAttributes": { + "$id": "9680", + "kind": "string", + "type": { + "$ref": "306" + }, + "value": "PassThrough" + } + } + }, + "localStorageSettings": { + "$id": "9681", + "kind": "model", + "type": { + "$ref": "1619" + }, + "value": { + "$id": "9682", + "persistentVolumeClaimRef": { + "$id": "9683", + "kind": "string", + "type": { + "$ref": "1621" + }, + "value": "jjwqwvd" + } + } + }, + "mqttSettings": { + "$id": "9684", + "kind": "model", + "type": { + "$ref": "1627" + }, + "value": { + "$id": "9685", + "authentication": { + "$id": "9686", + "kind": "model", + "type": { + "$ref": "1629" + }, + "value": { + "$id": "9687", + "method": { + "$id": "9688", + "kind": "string", + "type": { + "$ref": "312" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "9689", + "kind": "model", + "type": { + "$ref": "1411" + }, + "value": { + "$id": "9690", + "audience": { + "$id": "9691", + "kind": "string", + "type": { + "$ref": "1413" + }, + "value": "psxomrfbhoflycm" + } + } + }, + "userAssignedManagedIdentitySettings": { + "$id": "9692", + "kind": "model", + "type": { + "$ref": "1419" + }, + "value": { + "$id": "9693", + "clientId": { + "$id": "9694", + "kind": "string", + "type": { + "$ref": "1421" + }, + "value": "fb90f267-8872-431a-a76a-a1cec5d3c4d2" + }, + "scope": { + "$id": "9695", + "kind": "string", + "type": { + "$ref": "1425" + }, + "value": "zop" + }, + "tenantId": { + "$id": "9696", + "kind": "string", + "type": { + "$ref": "1429" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + }, + "serviceAccountTokenSettings": { + "$id": "9697", + "kind": "model", + "type": { + "$ref": "1640" + }, + "value": { + "$id": "9698", + "audience": { + "$id": "9699", + "kind": "string", + "type": { + "$ref": "1642" + }, + "value": "ejbklrbxgjaqleoycgpje" + } + } + }, + "x509CertificateSettings": { + "$id": "9700", + "kind": "model", + "type": { + "$ref": "1554" + }, + "value": { + "$id": "9701", + "secretRef": { + "$id": "9702", + "kind": "string", + "type": { + "$ref": "1556" + }, + "value": "afwizrystfslkfqd" + } + } + } + } + }, + "clientIdPrefix": { + "$id": "9703", + "kind": "string", + "type": { + "$ref": "1653" + }, + "value": "kkljsdxdirfhwxtkavldekeqhv" + }, + "host": { + "$id": "9704", + "kind": "string", + "type": { + "$ref": "1657" + }, + "value": "nyhnxqnbspstctl" + }, + "protocol": { + "$id": "9705", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "Mqtt" + }, + "keepAliveSeconds": { + "$id": "9706", + "kind": "number", + "type": { + "$ref": "1664" + }, + "value": 0 + }, + "retain": { + "$id": "9707", + "kind": "string", + "type": { + "$ref": "324" + }, + "value": "Keep" + }, + "maxInflightMessages": { + "$id": "9708", + "kind": "number", + "type": { + "$ref": "1671" + }, + "value": 0 + }, + "qos": { + "$id": "9709", + "kind": "number", + "type": { + "$ref": "1675" + }, + "value": 1 + }, + "sessionExpirySeconds": { + "$id": "9710", + "kind": "number", + "type": { + "$ref": "1679" + }, + "value": 0 + }, + "tls": { + "$id": "9711", + "kind": "model", + "type": { + "$ref": "1603" + }, + "value": { + "$id": "9712", + "mode": { + "$id": "9713", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "trustedCaCertificateConfigMapRef": { + "$id": "9714", + "kind": "string", + "type": { + "$ref": "1608" + }, + "value": "tectjjvukvelsreihwadh" + } + } + }, + "cloudEventAttributes": { + "$id": "9715", + "kind": "string", + "type": { + "$ref": "306" + }, + "value": "PassThrough" + } + } + }, + "provisioningState": { + "$id": "9716", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "9717", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "9718", + "name": { + "$id": "9719", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "9720", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "9721", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowEndpoints/resource-name123" + }, + "name": { + "$id": "9722", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "zyhxscudobzfacetvgyjiav" + }, + "type": { + "$id": "9723", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "iay" + }, + "systemData": { + "$id": "9724", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "9725", + "createdBy": { + "$id": "9726", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "9727", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "9728", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "9729", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "9730", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "9731", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "9732", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "9733", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "9734", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "9735", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "9736", + "name": "dataflowEndpointName", + "nameInRequest": "dataflowEndpointName", + "doc": "Name of Instance dataflowEndpoint resource", + "type": { + "$id": "9737", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "9738", + "name": "resource", + "nameInRequest": "resource", + "doc": "Resource create parameters.", + "type": { + "$ref": "1397" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "9739", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "9740", + "kind": "constant", + "valueType": { + "$id": "9741", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "9742", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "9743", + "kind": "constant", + "valueType": { + "$id": "9744", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "9745", + "type": { + "$ref": "1397" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpoint.createOrUpdate" + }, + { + "$id": "9746", + "kind": "lro", + "name": "delete", + "accessibility": "public", + "apiVersions": [ + "2024-11-01", + "2025-04-01" + ], + "doc": "Delete a DataflowEndpointResource", + "operation": { + "$id": "9747", + "name": "delete", + "resourceName": "DataflowEndpointResource", + "doc": "Delete a DataflowEndpointResource", + "accessibility": "public", + "parameters": [ + { + "$id": "9748", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "9749", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "9750", + "type": { + "$id": "9751", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-04-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "9752", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "9753", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "9754", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "9755", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "9756", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "9757", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "9758", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "9759", + "name": "dataflowEndpointName", + "nameInRequest": "dataflowEndpointName", + "doc": "Name of Instance dataflowEndpoint resource", + "type": { + "$id": "9760", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "9761", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "9762", + "kind": "constant", + "valueType": { + "$id": "9763", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "9764", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "9765", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "9766", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "9767", + "name": "retryAfter", + "nameInResponse": "Retry-After", + "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "type": { + "$id": "9768", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false + }, + { + "$id": "9769", + "statusCodes": [ + 204 + ], + "headers": [], + "isErrorResponse": false + } + ], + "httpMethod": "DELETE", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/dataflowEndpoints/{dataflowEndpointName}", + "bufferResponse": true, + "longRunning": { + "$id": "9770", + "finalStateVia": 1, + "finalResponse": { + "$id": "9771", + "statusCodes": [ + 204 + ] + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpoint.delete", + "decorators": [], + "examples": [ + { + "$id": "9772", + "kind": "http", + "name": "DataflowEndpoint_Delete", + "description": "DataflowEndpoint_Delete", + "filePath": "2025-04-01/DataflowEndpoint_Delete_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "9773", + "parameter": { + "$ref": "9748" + }, + "value": { + "$id": "9774", + "kind": "string", + "type": { + "$ref": "9749" + }, + "value": "2025-04-01" + } + }, + { + "$id": "9775", + "parameter": { + "$ref": "9752" + }, + "value": { + "$id": "9776", + "kind": "string", + "type": { + "$ref": "9753" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "9777", + "parameter": { + "$ref": "9755" + }, + "value": { + "$id": "9778", + "kind": "string", + "type": { + "$ref": "9756" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "9779", + "parameter": { + "$ref": "9757" + }, + "value": { + "$id": "9780", + "kind": "string", + "type": { + "$ref": "9758" + }, + "value": "resource-name123" + } + }, + { + "$id": "9781", + "parameter": { + "$ref": "9759" + }, + "value": { + "$id": "9782", + "kind": "string", + "type": { + "$ref": "9760" + }, + "value": "resource-name123" + } + } + ], + "responses": [ + { + "$id": "9783", + "response": { + "$ref": "9764" + }, + "statusCode": 202 + }, + { + "$id": "9784", + "response": { + "$ref": "9769" + }, + "statusCode": 204 + } + ] + } + ] + }, + "parameters": [ + { + "$id": "9785", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "9786", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "9787", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "9788", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "9789", + "name": "dataflowEndpointName", + "nameInRequest": "dataflowEndpointName", + "doc": "Name of Instance dataflowEndpoint resource", + "type": { + "$id": "9790", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "9791", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "9792", + "kind": "constant", + "valueType": { + "$id": "9793", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "9794" + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpoint.delete" + }, + { + "$id": "9795", + "kind": "paging", + "name": "listByResourceGroup", + "accessibility": "public", + "apiVersions": [ + "2024-11-01", + "2025-04-01" + ], + "doc": "List DataflowEndpointResource resources by InstanceResource", + "operation": { + "$id": "9796", + "name": "listByResourceGroup", + "resourceName": "DataflowEndpointResource", + "doc": "List DataflowEndpointResource resources by InstanceResource", + "accessibility": "public", + "parameters": [ + { + "$id": "9797", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "9798", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "9799", + "type": { + "$id": "9800", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-04-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "9801", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "9802", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "9803", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "9804", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "9805", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "9806", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "9807", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "9808", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "9809", + "kind": "constant", + "valueType": { + "$id": "9810", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "9811", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1700" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/dataflowEndpoints", + "bufferResponse": true, + "paging": { + "$id": "9812", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "9813", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpoint.listByResourceGroup", + "decorators": [], + "examples": [ + { + "$id": "9814", + "kind": "http", + "name": "DataflowEndpoint_ListByResourceGroup", + "description": "DataflowEndpoint_ListByResourceGroup", + "filePath": "2025-04-01/DataflowEndpoint_ListByResourceGroup_MaximumSet_Gen.json", + "parameters": [ + { + "$id": "9815", + "parameter": { + "$ref": "9797" + }, + "value": { + "$id": "9816", + "kind": "string", + "type": { + "$ref": "9798" + }, + "value": "2025-04-01" + } + }, + { + "$id": "9817", + "parameter": { + "$ref": "9801" + }, + "value": { + "$id": "9818", + "kind": "string", + "type": { + "$ref": "9802" + }, + "value": "F8C729F9-DF9C-4743-848F-96EE433D8E53" + } + }, + { + "$id": "9819", + "parameter": { + "$ref": "9804" + }, + "value": { + "$id": "9820", + "kind": "string", + "type": { + "$ref": "9805" + }, + "value": "rgiotoperations" + } + }, + { + "$id": "9821", + "parameter": { + "$ref": "9806" + }, + "value": { + "$id": "9822", + "kind": "string", + "type": { + "$ref": "9807" + }, + "value": "resource-name123" + } + } + ], + "responses": [ + { + "$id": "9823", + "response": { + "$ref": "9811" + }, + "statusCode": 200, + "bodyValue": { + "$id": "9824", + "kind": "model", + "type": { + "$ref": "1700" + }, + "value": { + "$id": "9825", + "value": { + "$id": "9826", + "kind": "array", + "type": { + "$ref": "1702" + }, + "value": [ + { + "$id": "9827", + "kind": "model", + "type": { + "$ref": "1397" + }, + "value": { + "$id": "9828", + "properties": { + "$id": "9829", + "kind": "model", + "type": { + "$ref": "1399" + }, + "value": { + "$id": "9830", + "endpointType": { + "$id": "9831", + "kind": "string", + "type": { + "$ref": "218" + }, + "value": "DataExplorer" + }, + "dataExplorerSettings": { + "$id": "9832", + "kind": "model", + "type": { + "$ref": "1404" + }, + "value": { + "$id": "9833", + "authentication": { + "$id": "9834", + "kind": "model", + "type": { + "$ref": "1406" + }, + "value": { + "$id": "9835", + "method": { + "$id": "9836", + "kind": "string", + "type": { + "$ref": "232" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "9837", + "kind": "model", + "type": { + "$ref": "1411" + }, + "value": { + "$id": "9838", + "audience": { + "$id": "9839", + "kind": "string", + "type": { + "$ref": "1413" + }, + "value": "psxomrfbhoflycm" + } + } + }, + "userAssignedManagedIdentitySettings": { + "$id": "9840", + "kind": "model", + "type": { + "$ref": "1419" + }, + "value": { + "$id": "9841", + "clientId": { + "$id": "9842", + "kind": "string", + "type": { + "$ref": "1421" + }, + "value": "fb90f267-8872-431a-a76a-a1cec5d3c4d2" + }, + "scope": { + "$id": "9843", + "kind": "string", + "type": { + "$ref": "1425" + }, + "value": "zop" + }, + "tenantId": { + "$id": "9844", + "kind": "string", + "type": { + "$ref": "1429" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + } + } + }, + "database": { + "$id": "9845", + "kind": "string", + "type": { + "$ref": "1437" + }, + "value": "yqcdpjsifm" + }, + "host": { + "$id": "9846", + "kind": "string", + "type": { + "$ref": "1441" + }, + "value": "..kusto.windows.net" + }, + "batching": { + "$id": "9847", + "kind": "model", + "type": { + "$ref": "1445" + }, + "value": { + "$id": "9848", + "latencySeconds": { + "$id": "9849", + "kind": "number", + "type": { + "$ref": "1447" + }, + "value": 1228 + }, + "maxMessages": { + "$id": "9850", + "kind": "number", + "type": { + "$ref": "1451" + }, + "value": 171 + } + } + } + } + }, + "dataLakeStorageSettings": { + "$id": "9851", + "kind": "model", + "type": { + "$ref": "1459" + }, + "value": { + "$id": "9852", + "authentication": { + "$id": "9853", + "kind": "model", + "type": { + "$ref": "1461" + }, + "value": { + "$id": "9854", + "method": { + "$id": "9855", + "kind": "string", + "type": { + "$ref": "238" + }, + "value": "SystemAssignedManagedIdentity" + }, + "accessTokenSettings": { + "$id": "9856", + "kind": "model", + "type": { + "$ref": "1466" + }, + "value": { + "$id": "9857", + "secretRef": { + "$id": "9858", + "kind": "string", + "type": { + "$ref": "1468" + }, + "value": "sevriyphcvnlrnfudqzejecwa" + } + } + }, + "systemAssignedManagedIdentitySettings": { + "$id": "9859", + "kind": "model", + "type": { + "$ref": "1411" + }, + "value": { + "$id": "9860", + "audience": { + "$id": "9861", + "kind": "string", + "type": { + "$ref": "1413" + }, + "value": "psxomrfbhoflycm" + } + } + }, + "userAssignedManagedIdentitySettings": { + "$id": "9862", + "kind": "model", + "type": { + "$ref": "1419" + }, + "value": { + "$id": "9863", + "clientId": { + "$id": "9864", + "kind": "string", + "type": { + "$ref": "1421" + }, + "value": "fb90f267-8872-431a-a76a-a1cec5d3c4d2" + }, + "scope": { + "$id": "9865", + "kind": "string", + "type": { + "$ref": "1425" + }, + "value": "zop" + }, + "tenantId": { + "$id": "9866", + "kind": "string", + "type": { + "$ref": "1429" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + } + } + }, + "host": { + "$id": "9867", + "kind": "string", + "type": { + "$ref": "1482" + }, + "value": ".blob.core.windows.net" + }, + "batching": { + "$id": "9868", + "kind": "model", + "type": { + "$ref": "1445" + }, + "value": { + "$id": "9869", + "latencySeconds": { + "$id": "9870", + "kind": "number", + "type": { + "$ref": "1447" + }, + "value": 1228 + }, + "maxMessages": { + "$id": "9871", + "kind": "number", + "type": { + "$ref": "1451" + }, + "value": 171 + } + } + } + } + }, + "fabricOneLakeSettings": { + "$id": "9872", + "kind": "model", + "type": { + "$ref": "1491" + }, + "value": { + "$id": "9873", + "authentication": { + "$id": "9874", + "kind": "model", + "type": { + "$ref": "1493" + }, + "value": { + "$id": "9875", + "method": { + "$id": "9876", + "kind": "string", + "type": { + "$ref": "246" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "9877", + "kind": "model", + "type": { + "$ref": "1411" + }, + "value": { + "$id": "9878", + "audience": { + "$id": "9879", + "kind": "string", + "type": { + "$ref": "1413" + }, + "value": "psxomrfbhoflycm" + } + } + }, + "userAssignedManagedIdentitySettings": { + "$id": "9880", + "kind": "model", + "type": { + "$ref": "1419" + }, + "value": { + "$id": "9881", + "clientId": { + "$id": "9882", + "kind": "string", + "type": { + "$ref": "1421" + }, + "value": "fb90f267-8872-431a-a76a-a1cec5d3c4d2" + }, + "scope": { + "$id": "9883", + "kind": "string", + "type": { + "$ref": "1425" + }, + "value": "zop" + }, + "tenantId": { + "$id": "9884", + "kind": "string", + "type": { + "$ref": "1429" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + } + } + }, + "names": { + "$id": "9885", + "kind": "model", + "type": { + "$ref": "1506" + }, + "value": { + "$id": "9886", + "lakehouseName": { + "$id": "9887", + "kind": "string", + "type": { + "$ref": "1508" + }, + "value": "wpeathi" + }, + "workspaceName": { + "$id": "9888", + "kind": "string", + "type": { + "$ref": "1512" + }, + "value": "nwgmitkbljztgms" + } + } + }, + "oneLakePathType": { + "$id": "9889", + "kind": "string", + "type": { + "$ref": "252" + }, + "value": "Files" + }, + "host": { + "$id": "9890", + "kind": "string", + "type": { + "$ref": "1521" + }, + "value": "https://.fabric.microsoft.com" + }, + "batching": { + "$id": "9891", + "kind": "model", + "type": { + "$ref": "1445" + }, + "value": { + "$id": "9892", + "latencySeconds": { + "$id": "9893", + "kind": "number", + "type": { + "$ref": "1447" + }, + "value": 1228 + }, + "maxMessages": { + "$id": "9894", + "kind": "number", + "type": { + "$ref": "1451" + }, + "value": 171 + } + } + } + } + }, + "kafkaSettings": { + "$id": "9895", + "kind": "model", + "type": { + "$ref": "1530" + }, + "value": { + "$id": "9896", + "authentication": { + "$id": "9897", + "kind": "model", + "type": { + "$ref": "1532" + }, + "value": { + "$id": "9898", + "method": { + "$id": "9899", + "kind": "string", + "type": { + "$ref": "258" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "9900", + "kind": "model", + "type": { + "$ref": "1411" + }, + "value": { + "$id": "9901", + "audience": { + "$id": "9902", + "kind": "string", + "type": { + "$ref": "1413" + }, + "value": "psxomrfbhoflycm" + } + } + }, + "userAssignedManagedIdentitySettings": { + "$id": "9903", + "kind": "model", + "type": { + "$ref": "1419" + }, + "value": { + "$id": "9904", + "clientId": { + "$id": "9905", + "kind": "string", + "type": { + "$ref": "1421" + }, + "value": "fb90f267-8872-431a-a76a-a1cec5d3c4d2" + }, + "scope": { + "$id": "9906", + "kind": "string", + "type": { + "$ref": "1425" + }, + "value": "zop" + }, + "tenantId": { + "$id": "9907", + "kind": "string", + "type": { + "$ref": "1429" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + }, + "saslSettings": { + "$id": "9908", + "kind": "model", + "type": { + "$ref": "1543" + }, + "value": { + "$id": "9909", + "saslType": { + "$id": "9910", + "kind": "string", + "type": { + "$ref": "270" + }, + "value": "Plain" + }, + "secretRef": { + "$id": "9911", + "kind": "string", + "type": { + "$ref": "1548" + }, + "value": "visyxoztqnylvbyokhtmpdkwes" + } + } + }, + "x509CertificateSettings": { + "$id": "9912", + "kind": "model", + "type": { + "$ref": "1554" + }, + "value": { + "$id": "9913", + "secretRef": { + "$id": "9914", + "kind": "string", + "type": { + "$ref": "1556" + }, + "value": "afwizrystfslkfqd" + } + } + } + } + }, + "consumerGroupId": { + "$id": "9915", + "kind": "string", + "type": { + "$ref": "1564" + }, + "value": "ukkzcjiyenhxokat" + }, + "host": { + "$id": "9916", + "kind": "string", + "type": { + "$ref": "1568" + }, + "value": "pwcqfiqclcgneolpewnyavoulbip" + }, + "batching": { + "$id": "9917", + "kind": "model", + "type": { + "$ref": "1572" + }, + "value": { + "$id": "9918", + "mode": { + "$id": "9919", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "latencyMs": { + "$id": "9920", + "kind": "number", + "type": { + "$ref": "1577" + }, + "value": 3679 + }, + "maxBytes": { + "$id": "9921", + "kind": "number", + "type": { + "$ref": "1581" + }, + "value": 8887 + }, + "maxMessages": { + "$id": "9922", + "kind": "number", + "type": { + "$ref": "1585" + }, + "value": 2174 + } + } + }, + "copyMqttProperties": { + "$id": "9923", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "compression": { + "$id": "9924", + "kind": "string", + "type": { + "$ref": "278" + }, + "value": "None" + }, + "kafkaAcks": { + "$id": "9925", + "kind": "string", + "type": { + "$ref": "288" + }, + "value": "Zero" + }, + "partitionStrategy": { + "$id": "9926", + "kind": "string", + "type": { + "$ref": "296" + }, + "value": "Default" + }, + "tls": { + "$id": "9927", + "kind": "model", + "type": { + "$ref": "1603" + }, + "value": { + "$id": "9928", + "mode": { + "$id": "9929", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "trustedCaCertificateConfigMapRef": { + "$id": "9930", + "kind": "string", + "type": { + "$ref": "1608" + }, + "value": "tectjjvukvelsreihwadh" + } + } + }, + "cloudEventAttributes": { + "$id": "9931", + "kind": "string", + "type": { + "$ref": "306" + }, + "value": "PassThrough" + } + } + }, + "localStorageSettings": { + "$id": "9932", + "kind": "model", + "type": { + "$ref": "1619" + }, + "value": { + "$id": "9933", + "persistentVolumeClaimRef": { + "$id": "9934", + "kind": "string", + "type": { + "$ref": "1621" + }, + "value": "jjwqwvd" + } + } + }, + "mqttSettings": { + "$id": "9935", + "kind": "model", + "type": { + "$ref": "1627" + }, + "value": { + "$id": "9936", + "authentication": { + "$id": "9937", + "kind": "model", + "type": { + "$ref": "1629" + }, + "value": { + "$id": "9938", + "method": { + "$id": "9939", + "kind": "string", + "type": { + "$ref": "312" + }, + "value": "SystemAssignedManagedIdentity" + }, + "systemAssignedManagedIdentitySettings": { + "$id": "9940", + "kind": "model", + "type": { + "$ref": "1411" + }, + "value": { + "$id": "9941", + "audience": { + "$id": "9942", + "kind": "string", + "type": { + "$ref": "1413" + }, + "value": "psxomrfbhoflycm" + } + } + }, + "userAssignedManagedIdentitySettings": { + "$id": "9943", + "kind": "model", + "type": { + "$ref": "1419" + }, + "value": { + "$id": "9944", + "clientId": { + "$id": "9945", + "kind": "string", + "type": { + "$ref": "1421" + }, + "value": "fb90f267-8872-431a-a76a-a1cec5d3c4d2" + }, + "scope": { + "$id": "9946", + "kind": "string", + "type": { + "$ref": "1425" + }, + "value": "zop" + }, + "tenantId": { + "$id": "9947", + "kind": "string", + "type": { + "$ref": "1429" + }, + "value": "ed060aa2-71ff-4d3f-99c4-a9138356fdec" + } + } + }, + "serviceAccountTokenSettings": { + "$id": "9948", + "kind": "model", + "type": { + "$ref": "1640" + }, + "value": { + "$id": "9949", + "audience": { + "$id": "9950", + "kind": "string", + "type": { + "$ref": "1642" + }, + "value": "ejbklrbxgjaqleoycgpje" + } + } + }, + "x509CertificateSettings": { + "$id": "9951", + "kind": "model", + "type": { + "$ref": "1554" + }, + "value": { + "$id": "9952", + "secretRef": { + "$id": "9953", + "kind": "string", + "type": { + "$ref": "1556" + }, + "value": "afwizrystfslkfqd" + } + } + } + } + }, + "clientIdPrefix": { + "$id": "9954", + "kind": "string", + "type": { + "$ref": "1653" + }, + "value": "kkljsdxdirfhwxtkavldekeqhv" + }, + "host": { + "$id": "9955", + "kind": "string", + "type": { + "$ref": "1657" + }, + "value": "nyhnxqnbspstctl" + }, + "protocol": { + "$id": "9956", + "kind": "string", + "type": { + "$ref": "124" + }, + "value": "Mqtt" + }, + "keepAliveSeconds": { + "$id": "9957", + "kind": "number", + "type": { + "$ref": "1664" + }, + "value": 0 + }, + "retain": { + "$id": "9958", + "kind": "string", + "type": { + "$ref": "324" + }, + "value": "Keep" + }, + "maxInflightMessages": { + "$id": "9959", + "kind": "number", + "type": { + "$ref": "1671" + }, + "value": 0 + }, + "qos": { + "$id": "9960", + "kind": "number", + "type": { + "$ref": "1675" + }, + "value": 1 + }, + "sessionExpirySeconds": { + "$id": "9961", + "kind": "number", + "type": { + "$ref": "1679" + }, + "value": 0 + }, + "tls": { + "$id": "9962", + "kind": "model", + "type": { + "$ref": "1603" + }, + "value": { + "$id": "9963", + "mode": { + "$id": "9964", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Enabled" + }, + "trustedCaCertificateConfigMapRef": { + "$id": "9965", + "kind": "string", + "type": { + "$ref": "1608" + }, + "value": "tectjjvukvelsreihwadh" + } + } + }, + "cloudEventAttributes": { + "$id": "9966", + "kind": "string", + "type": { + "$ref": "306" + }, + "value": "PassThrough" + } + } + }, + "provisioningState": { + "$id": "9967", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Succeeded" + } + } + }, + "extendedLocation": { + "$id": "9968", + "kind": "model", + "type": { + "$ref": "512" + }, + "value": { + "$id": "9969", + "name": { + "$id": "9970", + "kind": "string", + "type": { + "$ref": "514" + }, + "value": "qmbrfwcpwwhggszhrdjv" + }, + "type": { + "$id": "9971", + "kind": "string", + "type": { + "$ref": "44" + }, + "value": "CustomLocation" + } + } + }, + "id": { + "$id": "9972", + "kind": "string", + "type": { + "$ref": "419" + }, + "value": "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup123/providers/Microsoft.IoTOperations/instances/resource-name123/dataflowEndpoints/resource-name123" + }, + "name": { + "$id": "9973", + "kind": "string", + "type": { + "$ref": "424" + }, + "value": "zyhxscudobzfacetvgyjiav" + }, + "type": { + "$id": "9974", + "kind": "string", + "type": { + "$ref": "428" + }, + "value": "iay" + }, + "systemData": { + "$id": "9975", + "kind": "model", + "type": { + "$ref": "433" + }, + "value": { + "$id": "9976", + "createdBy": { + "$id": "9977", + "kind": "string", + "type": { + "$ref": "435" + }, + "value": "ssvaslsmudloholronopqyxjcu" + }, + "createdByType": { + "$id": "9978", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "createdAt": { + "$id": "9979", + "kind": "string", + "type": { + "$ref": "442" + }, + "value": "2024-08-09T18:13:29.389Z" + }, + "lastModifiedBy": { + "$id": "9980", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "gnicpuszwd" + }, + "lastModifiedByType": { + "$id": "9981", + "kind": "string", + "type": { + "$ref": "58" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "9982", + "kind": "string", + "type": { + "$ref": "454" + }, + "value": "2024-08-09T18:13:29.389Z" + } + } + } + } + } + ] + }, + "nextLink": { + "$id": "9983", + "kind": "string", + "type": { + "$ref": "1706" + }, + "value": "https://microsoft.com/a" + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "9984", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "9985", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "9986", + "name": "instanceName", + "nameInRequest": "instanceName", + "doc": "Name of instance.", + "type": { + "$id": "9987", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "9988", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "9809" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "9989", + "type": { + "$id": "9990", + "kind": "array", + "name": "ArrayDataflowEndpointResource", + "valueType": { + "$ref": "1397" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "resultSegments": [ + "value" + ] + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpoint.listByResourceGroup" + } + ], + "parameters": [ + { + "$id": "9991", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "9992", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "location": "Uri", + "isApiVersion": false, + "isContentType": false, + "isRequired": true, + "isEndpoint": true, + "skipUrlEncoding": false, + "explode": false, + "kind": "Client", + "defaultValue": { + "$id": "9993", + "type": { + "$id": "9994", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "9995", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "9996" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.IoTOperations.DataflowEndpoint", + "apiVersions": [ + "2024-11-01", + "2025-04-01" + ], + "parent": { + "$ref": "1710" + } + } + ] + } + ], + "auth": { + "$id": "9997", + "oAuth2": { + "$id": "9998", + "scopes": [ + "user_impersonation" + ] + } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/api/Azure.ResourceManager.NeonPostgres.net8.0.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/api/Azure.ResourceManager.NeonPostgres.net8.0.cs index f6e35086e51c..1243878c8c01 100644 --- a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/api/Azure.ResourceManager.NeonPostgres.net8.0.cs +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/api/Azure.ResourceManager.NeonPostgres.net8.0.cs @@ -1,5 +1,205 @@ namespace Azure.ResourceManager.NeonPostgres { + public partial class BranchCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected BranchCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string branchName, Azure.ResourceManager.NeonPostgres.BranchData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string branchName, Azure.ResourceManager.NeonPostgres.BranchData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string branchName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string branchName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string branchName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string branchName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string branchName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string branchName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class BranchData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BranchData() { } + public Azure.ResourceManager.NeonPostgres.Models.BranchProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.BranchData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.BranchData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BranchResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected BranchResource() { } + public virtual Azure.ResourceManager.NeonPostgres.BranchData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetCompute(string computeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetComputeAsync(string computeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.NeonPostgres.ComputeCollection GetComputes() { throw null; } + public virtual Azure.Response GetEndpoint(string endpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEndpointAsync(string endpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.NeonPostgres.EndpointCollection GetEndpoints() { throw null; } + public virtual Azure.Response GetNeonDatabase(string neonDatabaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetNeonDatabaseAsync(string neonDatabaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.NeonPostgres.NeonDatabaseCollection GetNeonDatabases() { throw null; } + public virtual Azure.Response GetNeonRole(string neonRoleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetNeonRoleAsync(string neonRoleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.NeonPostgres.NeonRoleCollection GetNeonRoles() { throw null; } + Azure.ResourceManager.NeonPostgres.BranchData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.BranchData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.NeonPostgres.BranchData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NeonPostgres.BranchData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class ComputeCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ComputeCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string computeName, Azure.ResourceManager.NeonPostgres.ComputeData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string computeName, Azure.ResourceManager.NeonPostgres.ComputeData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string computeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string computeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string computeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string computeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string computeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string computeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class ComputeData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ComputeData() { } + public Azure.ResourceManager.NeonPostgres.Models.ComputeProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.ComputeData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.ComputeData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ComputeResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ComputeResource() { } + public virtual Azure.ResourceManager.NeonPostgres.ComputeData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string computeName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.NeonPostgres.ComputeData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.ComputeData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.NeonPostgres.ComputeData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NeonPostgres.ComputeData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class EndpointCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected EndpointCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string endpointName, Azure.ResourceManager.NeonPostgres.EndpointData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string endpointName, Azure.ResourceManager.NeonPostgres.EndpointData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string endpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string endpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string endpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string endpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string endpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string endpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class EndpointData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EndpointData() { } + public Azure.ResourceManager.NeonPostgres.Models.EndpointProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.EndpointData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.EndpointData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class EndpointResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected EndpointResource() { } + public virtual Azure.ResourceManager.NeonPostgres.EndpointData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string endpointName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.NeonPostgres.EndpointData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.EndpointData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.NeonPostgres.EndpointData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NeonPostgres.EndpointData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class NeonDatabaseCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected NeonDatabaseCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string neonDatabaseName, Azure.ResourceManager.NeonPostgres.NeonDatabaseData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string neonDatabaseName, Azure.ResourceManager.NeonPostgres.NeonDatabaseData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string neonDatabaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string neonDatabaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string neonDatabaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string neonDatabaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string neonDatabaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string neonDatabaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class NeonDatabaseData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NeonDatabaseData() { } + public Azure.ResourceManager.NeonPostgres.Models.NeonDatabaseProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.NeonDatabaseData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.NeonDatabaseData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class NeonDatabaseResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected NeonDatabaseResource() { } + public virtual Azure.ResourceManager.NeonPostgres.NeonDatabaseData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string neonDatabaseName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.NeonPostgres.NeonDatabaseData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.NeonDatabaseData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.NeonPostgres.NeonDatabaseData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NeonPostgres.NeonDatabaseData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class NeonOrganizationCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected NeonOrganizationCollection() { } @@ -41,6 +241,9 @@ protected NeonOrganizationResource() { } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetProject(string projectName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetProjectAsync(string projectName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.NeonPostgres.ProjectCollection GetProjects() { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -55,12 +258,119 @@ protected NeonOrganizationResource() { } } public static partial class NeonPostgresExtensions { + public static Azure.ResourceManager.NeonPostgres.BranchResource GetBranchResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.NeonPostgres.ComputeResource GetComputeResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.NeonPostgres.EndpointResource GetEndpointResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.NeonPostgres.NeonDatabaseResource GetNeonDatabaseResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Response GetNeonOrganization(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string organizationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetNeonOrganizationAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string organizationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.NeonPostgres.NeonOrganizationResource GetNeonOrganizationResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.NeonPostgres.NeonOrganizationCollection GetNeonOrganizations(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } public static Azure.Pageable GetNeonOrganizations(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.AsyncPageable GetNeonOrganizationsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.NeonPostgres.NeonRoleResource GetNeonRoleResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Response GetPostgresVersionsOrganization(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, Azure.ResourceManager.NeonPostgres.Models.PgVersion pgVersion = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetPostgresVersionsOrganizationAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, Azure.ResourceManager.NeonPostgres.Models.PgVersion pgVersion = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.NeonPostgres.ProjectResource GetProjectResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + } + public partial class NeonRoleCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected NeonRoleCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string neonRoleName, Azure.ResourceManager.NeonPostgres.NeonRoleData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string neonRoleName, Azure.ResourceManager.NeonPostgres.NeonRoleData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string neonRoleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string neonRoleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string neonRoleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string neonRoleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string neonRoleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string neonRoleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class NeonRoleData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NeonRoleData() { } + public Azure.ResourceManager.NeonPostgres.Models.NeonRoleProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.NeonRoleData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.NeonRoleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class NeonRoleResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected NeonRoleResource() { } + public virtual Azure.ResourceManager.NeonPostgres.NeonRoleData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string neonRoleName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.NeonPostgres.NeonRoleData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.NeonRoleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.NeonPostgres.NeonRoleData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NeonPostgres.NeonRoleData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class ProjectCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ProjectCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string projectName, Azure.ResourceManager.NeonPostgres.ProjectData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string projectName, Azure.ResourceManager.NeonPostgres.ProjectData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string projectName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string projectName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string projectName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string projectName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string projectName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string projectName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class ProjectData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ProjectData() { } + public Azure.ResourceManager.NeonPostgres.Models.ProjectProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.ProjectData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.ProjectData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ProjectResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ProjectResource() { } + public virtual Azure.ResourceManager.NeonPostgres.ProjectData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string organizationName, string projectName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetBranch(string branchName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetBranchAsync(string branchName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.NeonPostgres.BranchCollection GetBranches() { throw null; } + public virtual Azure.Response GetConnectionUri(Azure.ResourceManager.NeonPostgres.Models.ConnectionUriProperties connectionUriParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetConnectionUriAsync(Azure.ResourceManager.NeonPostgres.Models.ConnectionUriProperties connectionUriParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.NeonPostgres.ProjectData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.ProjectData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.NeonPostgres.ProjectData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NeonPostgres.ProjectData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } } namespace Azure.ResourceManager.NeonPostgres.Mocking @@ -68,7 +378,13 @@ namespace Azure.ResourceManager.NeonPostgres.Mocking public partial class MockableNeonPostgresArmClient : Azure.ResourceManager.ArmResource { protected MockableNeonPostgresArmClient() { } + public virtual Azure.ResourceManager.NeonPostgres.BranchResource GetBranchResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.NeonPostgres.ComputeResource GetComputeResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.NeonPostgres.EndpointResource GetEndpointResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.NeonPostgres.NeonDatabaseResource GetNeonDatabaseResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.NeonPostgres.NeonOrganizationResource GetNeonOrganizationResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.NeonPostgres.NeonRoleResource GetNeonRoleResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.NeonPostgres.ProjectResource GetProjectResource(Azure.Core.ResourceIdentifier id) { throw null; } } public partial class MockableNeonPostgresResourceGroupResource : Azure.ResourceManager.ArmResource { @@ -76,6 +392,8 @@ protected MockableNeonPostgresResourceGroupResource() { } public virtual Azure.Response GetNeonOrganization(string organizationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetNeonOrganizationAsync(string organizationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.NeonPostgres.NeonOrganizationCollection GetNeonOrganizations() { throw null; } + public virtual Azure.Response GetPostgresVersionsOrganization(Azure.ResourceManager.NeonPostgres.Models.PgVersion pgVersion = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetPostgresVersionsOrganizationAsync(Azure.ResourceManager.NeonPostgres.Models.PgVersion pgVersion = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class MockableNeonPostgresSubscriptionResource : Azure.ResourceManager.ArmResource { @@ -88,8 +406,140 @@ namespace Azure.ResourceManager.NeonPostgres.Models { public static partial class ArmNeonPostgresModelFactory { + public static Azure.ResourceManager.NeonPostgres.BranchData BranchData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.NeonPostgres.Models.BranchProperties properties = null) { throw null; } + public static Azure.ResourceManager.NeonPostgres.Models.BranchProperties BranchProperties(string entityId = null, string entityName = null, string createdAt = null, Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState? provisioningState = default(Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState?), System.Collections.Generic.IEnumerable attributes = null, string projectId = null, string parentId = null, string roleName = null, string databaseName = null, System.Collections.Generic.IEnumerable roles = null, System.Collections.Generic.IEnumerable databases = null, System.Collections.Generic.IEnumerable endpoints = null) { throw null; } + public static Azure.ResourceManager.NeonPostgres.ComputeData ComputeData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.NeonPostgres.Models.ComputeProperties properties = null) { throw null; } + public static Azure.ResourceManager.NeonPostgres.Models.ComputeProperties ComputeProperties(string entityId = null, string entityName = null, string createdAt = null, Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState? provisioningState = default(Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState?), System.Collections.Generic.IEnumerable attributes = null, string region = null, int? cpuCores = default(int?), int? memory = default(int?), string status = null) { throw null; } + public static Azure.ResourceManager.NeonPostgres.Models.ConnectionUriProperties ConnectionUriProperties(string projectId = null, string branchId = null, string databaseName = null, string roleName = null, string endpointId = null, bool? isPooled = default(bool?), string connectionStringUri = null) { throw null; } + public static Azure.ResourceManager.NeonPostgres.EndpointData EndpointData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.NeonPostgres.Models.EndpointProperties properties = null) { throw null; } + public static Azure.ResourceManager.NeonPostgres.Models.EndpointProperties EndpointProperties(string entityId = null, string entityName = null, string createdAt = null, Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState? provisioningState = default(Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState?), System.Collections.Generic.IEnumerable attributes = null, string projectId = null, string branchId = null, Azure.ResourceManager.NeonPostgres.Models.EndpointType? endpointType = default(Azure.ResourceManager.NeonPostgres.Models.EndpointType?)) { throw null; } + public static Azure.ResourceManager.NeonPostgres.NeonDatabaseData NeonDatabaseData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.NeonPostgres.Models.NeonDatabaseProperties properties = null) { throw null; } + public static Azure.ResourceManager.NeonPostgres.Models.NeonDatabaseProperties NeonDatabaseProperties(string entityId = null, string entityName = null, string createdAt = null, Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState? provisioningState = default(Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState?), System.Collections.Generic.IEnumerable attributes = null, string branchId = null, string ownerName = null) { throw null; } public static Azure.ResourceManager.NeonPostgres.NeonOrganizationData NeonOrganizationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.NeonPostgres.Models.NeonOrganizationProperties properties = null) { throw null; } - public static Azure.ResourceManager.NeonPostgres.Models.NeonOrganizationProperties NeonOrganizationProperties(Azure.ResourceManager.NeonPostgres.Models.NeonMarketplaceDetails marketplaceDetails = null, Azure.ResourceManager.NeonPostgres.Models.NeonUserDetails userDetails = null, Azure.ResourceManager.NeonPostgres.Models.NeonCompanyDetails companyDetails = null, Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState? provisioningState = default(Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState?), Azure.ResourceManager.NeonPostgres.Models.PartnerOrganizationProperties partnerOrganizationProperties = null) { throw null; } + public static Azure.ResourceManager.NeonPostgres.Models.NeonOrganizationProperties NeonOrganizationProperties(Azure.ResourceManager.NeonPostgres.Models.NeonMarketplaceDetails marketplaceDetails = null, Azure.ResourceManager.NeonPostgres.Models.NeonUserDetails userDetails = null, Azure.ResourceManager.NeonPostgres.Models.NeonCompanyDetails companyDetails = null, Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState? provisioningState = default(Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState?), Azure.ResourceManager.NeonPostgres.Models.PartnerOrganizationProperties partnerOrganizationProperties = null, Azure.ResourceManager.NeonPostgres.Models.ProjectProperties projectProperties = null) { throw null; } + public static Azure.ResourceManager.NeonPostgres.NeonRoleData NeonRoleData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.NeonPostgres.Models.NeonRoleProperties properties = null) { throw null; } + public static Azure.ResourceManager.NeonPostgres.Models.NeonRoleProperties NeonRoleProperties(string entityId = null, string entityName = null, string createdAt = null, Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState? provisioningState = default(Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState?), System.Collections.Generic.IEnumerable attributes = null, string branchId = null, System.Collections.Generic.IEnumerable permissions = null, bool? isSuperUser = default(bool?)) { throw null; } + public static Azure.ResourceManager.NeonPostgres.Models.PgVersionsResult PgVersionsResult(System.Collections.Generic.IEnumerable versions = null) { throw null; } + public static Azure.ResourceManager.NeonPostgres.ProjectData ProjectData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.NeonPostgres.Models.ProjectProperties properties = null) { throw null; } + public static Azure.ResourceManager.NeonPostgres.Models.ProjectProperties ProjectProperties(string entityId = null, string entityName = null, string createdAt = null, Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState? provisioningState = default(Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState?), System.Collections.Generic.IEnumerable attributes = null, string regionId = null, long? storage = default(long?), int? pgVersion = default(int?), int? historyRetention = default(int?), Azure.ResourceManager.NeonPostgres.Models.DefaultEndpointSettings defaultEndpointSettings = null, Azure.ResourceManager.NeonPostgres.Models.BranchProperties branch = null, System.Collections.Generic.IEnumerable roles = null, System.Collections.Generic.IEnumerable databases = null, System.Collections.Generic.IEnumerable endpoints = null) { throw null; } + } + public partial class Attributes : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public Attributes(string name, string value) { } + public string Name { get { throw null; } set { } } + public string Value { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.Attributes System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.Attributes System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BranchProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BranchProperties() { } + public System.Collections.Generic.IList Attributes { get { throw null; } } + public string CreatedAt { get { throw null; } } + public string DatabaseName { get { throw null; } set { } } + public System.Collections.Generic.IList Databases { get { throw null; } } + public System.Collections.Generic.IList Endpoints { get { throw null; } } + public string EntityId { get { throw null; } } + public string EntityName { get { throw null; } set { } } + public string ParentId { get { throw null; } set { } } + public string ProjectId { get { throw null; } set { } } + public Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState? ProvisioningState { get { throw null; } } + public string RoleName { get { throw null; } set { } } + public System.Collections.Generic.IList Roles { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.BranchProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.BranchProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ComputeProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ComputeProperties() { } + public System.Collections.Generic.IList Attributes { get { throw null; } } + public int? CpuCores { get { throw null; } set { } } + public string CreatedAt { get { throw null; } } + public string EntityId { get { throw null; } } + public string EntityName { get { throw null; } set { } } + public int? Memory { get { throw null; } set { } } + public Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState? ProvisioningState { get { throw null; } } + public string Region { get { throw null; } set { } } + public string Status { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.ComputeProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.ComputeProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ConnectionUriProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ConnectionUriProperties() { } + public string BranchId { get { throw null; } set { } } + public string ConnectionStringUri { get { throw null; } } + public string DatabaseName { get { throw null; } set { } } + public string EndpointId { get { throw null; } set { } } + public bool? IsPooled { get { throw null; } set { } } + public string ProjectId { get { throw null; } set { } } + public string RoleName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.ConnectionUriProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.ConnectionUriProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DefaultEndpointSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DefaultEndpointSettings(float autoscalingLimitMinCu, float autoscalingLimitMaxCu) { } + public float AutoscalingLimitMaxCu { get { throw null; } set { } } + public float AutoscalingLimitMinCu { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.DefaultEndpointSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.DefaultEndpointSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class EndpointProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EndpointProperties() { } + public System.Collections.Generic.IList Attributes { get { throw null; } } + public string BranchId { get { throw null; } set { } } + public string CreatedAt { get { throw null; } } + public Azure.ResourceManager.NeonPostgres.Models.EndpointType? EndpointType { get { throw null; } set { } } + public string EntityId { get { throw null; } } + public string EntityName { get { throw null; } set { } } + public string ProjectId { get { throw null; } set { } } + public Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState? ProvisioningState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.EndpointProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.EndpointProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct EndpointType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public EndpointType(string value) { throw null; } + public static Azure.ResourceManager.NeonPostgres.Models.EndpointType ReadOnly { get { throw null; } } + public static Azure.ResourceManager.NeonPostgres.Models.EndpointType ReadWrite { get { throw null; } } + public bool Equals(Azure.ResourceManager.NeonPostgres.Models.EndpointType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NeonPostgres.Models.EndpointType left, Azure.ResourceManager.NeonPostgres.Models.EndpointType right) { throw null; } + public static implicit operator Azure.ResourceManager.NeonPostgres.Models.EndpointType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NeonPostgres.Models.EndpointType left, Azure.ResourceManager.NeonPostgres.Models.EndpointType right) { throw null; } + public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct MarketplaceSubscriptionStatus : System.IEquatable @@ -127,6 +577,23 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class NeonDatabaseProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NeonDatabaseProperties() { } + public System.Collections.Generic.IList Attributes { get { throw null; } } + public string BranchId { get { throw null; } set { } } + public string CreatedAt { get { throw null; } } + public string EntityId { get { throw null; } } + public string EntityName { get { throw null; } set { } } + public string OwnerName { get { throw null; } set { } } + public Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState? ProvisioningState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.NeonDatabaseProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.NeonDatabaseProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class NeonMarketplaceDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public NeonMarketplaceDetails(Azure.ResourceManager.NeonPostgres.Models.NeonOfferDetails offerDetails) { } @@ -162,6 +629,7 @@ public NeonOrganizationProperties(Azure.ResourceManager.NeonPostgres.Models.Neon public Azure.ResourceManager.NeonPostgres.Models.NeonCompanyDetails CompanyDetails { get { throw null; } set { } } public Azure.ResourceManager.NeonPostgres.Models.NeonMarketplaceDetails MarketplaceDetails { get { throw null; } set { } } public Azure.ResourceManager.NeonPostgres.Models.PartnerOrganizationProperties PartnerOrganizationProperties { get { throw null; } set { } } + public Azure.ResourceManager.NeonPostgres.Models.ProjectProperties ProjectProperties { get { throw null; } set { } } public Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.NeonPostgres.Models.NeonUserDetails UserDetails { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -190,6 +658,24 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState left, Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState right) { throw null; } public override string ToString() { throw null; } } + public partial class NeonRoleProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NeonRoleProperties() { } + public System.Collections.Generic.IList Attributes { get { throw null; } } + public string BranchId { get { throw null; } set { } } + public string CreatedAt { get { throw null; } } + public string EntityId { get { throw null; } } + public string EntityName { get { throw null; } set { } } + public bool? IsSuperUser { get { throw null; } set { } } + public System.Collections.Generic.IList Permissions { get { throw null; } } + public Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState? ProvisioningState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.NeonRoleProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.NeonRoleProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class NeonSingleSignOnProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public NeonSingleSignOnProperties() { } @@ -251,4 +737,50 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class PgVersion : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PgVersion() { } + public int? Version { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.PgVersion System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.PgVersion System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PgVersionsResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PgVersionsResult() { } + public System.Collections.Generic.IReadOnlyList Versions { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.PgVersionsResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.PgVersionsResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ProjectProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ProjectProperties() { } + public System.Collections.Generic.IList Attributes { get { throw null; } } + public Azure.ResourceManager.NeonPostgres.Models.BranchProperties Branch { get { throw null; } set { } } + public string CreatedAt { get { throw null; } } + public System.Collections.Generic.IList Databases { get { throw null; } } + public Azure.ResourceManager.NeonPostgres.Models.DefaultEndpointSettings DefaultEndpointSettings { get { throw null; } set { } } + public System.Collections.Generic.IList Endpoints { get { throw null; } } + public string EntityId { get { throw null; } } + public string EntityName { get { throw null; } set { } } + public int? HistoryRetention { get { throw null; } set { } } + public int? PgVersion { get { throw null; } set { } } + public Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState? ProvisioningState { get { throw null; } } + public string RegionId { get { throw null; } set { } } + public System.Collections.Generic.IList Roles { get { throw null; } } + public long? Storage { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.ProjectProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.ProjectProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } } diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/api/Azure.ResourceManager.NeonPostgres.netstandard2.0.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/api/Azure.ResourceManager.NeonPostgres.netstandard2.0.cs index f6e35086e51c..1243878c8c01 100644 --- a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/api/Azure.ResourceManager.NeonPostgres.netstandard2.0.cs +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/api/Azure.ResourceManager.NeonPostgres.netstandard2.0.cs @@ -1,5 +1,205 @@ namespace Azure.ResourceManager.NeonPostgres { + public partial class BranchCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected BranchCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string branchName, Azure.ResourceManager.NeonPostgres.BranchData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string branchName, Azure.ResourceManager.NeonPostgres.BranchData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string branchName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string branchName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string branchName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string branchName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string branchName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string branchName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class BranchData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BranchData() { } + public Azure.ResourceManager.NeonPostgres.Models.BranchProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.BranchData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.BranchData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BranchResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected BranchResource() { } + public virtual Azure.ResourceManager.NeonPostgres.BranchData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetCompute(string computeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetComputeAsync(string computeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.NeonPostgres.ComputeCollection GetComputes() { throw null; } + public virtual Azure.Response GetEndpoint(string endpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEndpointAsync(string endpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.NeonPostgres.EndpointCollection GetEndpoints() { throw null; } + public virtual Azure.Response GetNeonDatabase(string neonDatabaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetNeonDatabaseAsync(string neonDatabaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.NeonPostgres.NeonDatabaseCollection GetNeonDatabases() { throw null; } + public virtual Azure.Response GetNeonRole(string neonRoleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetNeonRoleAsync(string neonRoleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.NeonPostgres.NeonRoleCollection GetNeonRoles() { throw null; } + Azure.ResourceManager.NeonPostgres.BranchData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.BranchData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.NeonPostgres.BranchData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NeonPostgres.BranchData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class ComputeCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ComputeCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string computeName, Azure.ResourceManager.NeonPostgres.ComputeData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string computeName, Azure.ResourceManager.NeonPostgres.ComputeData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string computeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string computeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string computeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string computeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string computeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string computeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class ComputeData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ComputeData() { } + public Azure.ResourceManager.NeonPostgres.Models.ComputeProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.ComputeData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.ComputeData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ComputeResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ComputeResource() { } + public virtual Azure.ResourceManager.NeonPostgres.ComputeData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string computeName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.NeonPostgres.ComputeData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.ComputeData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.NeonPostgres.ComputeData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NeonPostgres.ComputeData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class EndpointCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected EndpointCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string endpointName, Azure.ResourceManager.NeonPostgres.EndpointData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string endpointName, Azure.ResourceManager.NeonPostgres.EndpointData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string endpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string endpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string endpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string endpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string endpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string endpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class EndpointData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EndpointData() { } + public Azure.ResourceManager.NeonPostgres.Models.EndpointProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.EndpointData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.EndpointData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class EndpointResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected EndpointResource() { } + public virtual Azure.ResourceManager.NeonPostgres.EndpointData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string endpointName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.NeonPostgres.EndpointData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.EndpointData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.NeonPostgres.EndpointData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NeonPostgres.EndpointData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class NeonDatabaseCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected NeonDatabaseCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string neonDatabaseName, Azure.ResourceManager.NeonPostgres.NeonDatabaseData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string neonDatabaseName, Azure.ResourceManager.NeonPostgres.NeonDatabaseData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string neonDatabaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string neonDatabaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string neonDatabaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string neonDatabaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string neonDatabaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string neonDatabaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class NeonDatabaseData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NeonDatabaseData() { } + public Azure.ResourceManager.NeonPostgres.Models.NeonDatabaseProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.NeonDatabaseData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.NeonDatabaseData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class NeonDatabaseResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected NeonDatabaseResource() { } + public virtual Azure.ResourceManager.NeonPostgres.NeonDatabaseData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string neonDatabaseName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.NeonPostgres.NeonDatabaseData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.NeonDatabaseData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.NeonPostgres.NeonDatabaseData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NeonPostgres.NeonDatabaseData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class NeonOrganizationCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected NeonOrganizationCollection() { } @@ -41,6 +241,9 @@ protected NeonOrganizationResource() { } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetProject(string projectName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetProjectAsync(string projectName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.NeonPostgres.ProjectCollection GetProjects() { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -55,12 +258,119 @@ protected NeonOrganizationResource() { } } public static partial class NeonPostgresExtensions { + public static Azure.ResourceManager.NeonPostgres.BranchResource GetBranchResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.NeonPostgres.ComputeResource GetComputeResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.NeonPostgres.EndpointResource GetEndpointResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.NeonPostgres.NeonDatabaseResource GetNeonDatabaseResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Response GetNeonOrganization(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string organizationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetNeonOrganizationAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string organizationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.NeonPostgres.NeonOrganizationResource GetNeonOrganizationResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.NeonPostgres.NeonOrganizationCollection GetNeonOrganizations(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } public static Azure.Pageable GetNeonOrganizations(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.AsyncPageable GetNeonOrganizationsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.NeonPostgres.NeonRoleResource GetNeonRoleResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Response GetPostgresVersionsOrganization(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, Azure.ResourceManager.NeonPostgres.Models.PgVersion pgVersion = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetPostgresVersionsOrganizationAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, Azure.ResourceManager.NeonPostgres.Models.PgVersion pgVersion = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.NeonPostgres.ProjectResource GetProjectResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + } + public partial class NeonRoleCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected NeonRoleCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string neonRoleName, Azure.ResourceManager.NeonPostgres.NeonRoleData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string neonRoleName, Azure.ResourceManager.NeonPostgres.NeonRoleData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string neonRoleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string neonRoleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string neonRoleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string neonRoleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string neonRoleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string neonRoleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class NeonRoleData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NeonRoleData() { } + public Azure.ResourceManager.NeonPostgres.Models.NeonRoleProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.NeonRoleData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.NeonRoleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class NeonRoleResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected NeonRoleResource() { } + public virtual Azure.ResourceManager.NeonPostgres.NeonRoleData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string neonRoleName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.NeonPostgres.NeonRoleData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.NeonRoleData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.NeonPostgres.NeonRoleData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NeonPostgres.NeonRoleData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class ProjectCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ProjectCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string projectName, Azure.ResourceManager.NeonPostgres.ProjectData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string projectName, Azure.ResourceManager.NeonPostgres.ProjectData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string projectName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string projectName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string projectName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string projectName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string projectName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string projectName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class ProjectData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ProjectData() { } + public Azure.ResourceManager.NeonPostgres.Models.ProjectProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.ProjectData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.ProjectData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ProjectResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ProjectResource() { } + public virtual Azure.ResourceManager.NeonPostgres.ProjectData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string organizationName, string projectName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetBranch(string branchName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetBranchAsync(string branchName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.NeonPostgres.BranchCollection GetBranches() { throw null; } + public virtual Azure.Response GetConnectionUri(Azure.ResourceManager.NeonPostgres.Models.ConnectionUriProperties connectionUriParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetConnectionUriAsync(Azure.ResourceManager.NeonPostgres.Models.ConnectionUriProperties connectionUriParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.NeonPostgres.ProjectData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.ProjectData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.NeonPostgres.ProjectData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NeonPostgres.ProjectData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } } namespace Azure.ResourceManager.NeonPostgres.Mocking @@ -68,7 +378,13 @@ namespace Azure.ResourceManager.NeonPostgres.Mocking public partial class MockableNeonPostgresArmClient : Azure.ResourceManager.ArmResource { protected MockableNeonPostgresArmClient() { } + public virtual Azure.ResourceManager.NeonPostgres.BranchResource GetBranchResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.NeonPostgres.ComputeResource GetComputeResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.NeonPostgres.EndpointResource GetEndpointResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.NeonPostgres.NeonDatabaseResource GetNeonDatabaseResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.NeonPostgres.NeonOrganizationResource GetNeonOrganizationResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.NeonPostgres.NeonRoleResource GetNeonRoleResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.NeonPostgres.ProjectResource GetProjectResource(Azure.Core.ResourceIdentifier id) { throw null; } } public partial class MockableNeonPostgresResourceGroupResource : Azure.ResourceManager.ArmResource { @@ -76,6 +392,8 @@ protected MockableNeonPostgresResourceGroupResource() { } public virtual Azure.Response GetNeonOrganization(string organizationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetNeonOrganizationAsync(string organizationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.NeonPostgres.NeonOrganizationCollection GetNeonOrganizations() { throw null; } + public virtual Azure.Response GetPostgresVersionsOrganization(Azure.ResourceManager.NeonPostgres.Models.PgVersion pgVersion = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetPostgresVersionsOrganizationAsync(Azure.ResourceManager.NeonPostgres.Models.PgVersion pgVersion = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class MockableNeonPostgresSubscriptionResource : Azure.ResourceManager.ArmResource { @@ -88,8 +406,140 @@ namespace Azure.ResourceManager.NeonPostgres.Models { public static partial class ArmNeonPostgresModelFactory { + public static Azure.ResourceManager.NeonPostgres.BranchData BranchData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.NeonPostgres.Models.BranchProperties properties = null) { throw null; } + public static Azure.ResourceManager.NeonPostgres.Models.BranchProperties BranchProperties(string entityId = null, string entityName = null, string createdAt = null, Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState? provisioningState = default(Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState?), System.Collections.Generic.IEnumerable attributes = null, string projectId = null, string parentId = null, string roleName = null, string databaseName = null, System.Collections.Generic.IEnumerable roles = null, System.Collections.Generic.IEnumerable databases = null, System.Collections.Generic.IEnumerable endpoints = null) { throw null; } + public static Azure.ResourceManager.NeonPostgres.ComputeData ComputeData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.NeonPostgres.Models.ComputeProperties properties = null) { throw null; } + public static Azure.ResourceManager.NeonPostgres.Models.ComputeProperties ComputeProperties(string entityId = null, string entityName = null, string createdAt = null, Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState? provisioningState = default(Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState?), System.Collections.Generic.IEnumerable attributes = null, string region = null, int? cpuCores = default(int?), int? memory = default(int?), string status = null) { throw null; } + public static Azure.ResourceManager.NeonPostgres.Models.ConnectionUriProperties ConnectionUriProperties(string projectId = null, string branchId = null, string databaseName = null, string roleName = null, string endpointId = null, bool? isPooled = default(bool?), string connectionStringUri = null) { throw null; } + public static Azure.ResourceManager.NeonPostgres.EndpointData EndpointData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.NeonPostgres.Models.EndpointProperties properties = null) { throw null; } + public static Azure.ResourceManager.NeonPostgres.Models.EndpointProperties EndpointProperties(string entityId = null, string entityName = null, string createdAt = null, Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState? provisioningState = default(Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState?), System.Collections.Generic.IEnumerable attributes = null, string projectId = null, string branchId = null, Azure.ResourceManager.NeonPostgres.Models.EndpointType? endpointType = default(Azure.ResourceManager.NeonPostgres.Models.EndpointType?)) { throw null; } + public static Azure.ResourceManager.NeonPostgres.NeonDatabaseData NeonDatabaseData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.NeonPostgres.Models.NeonDatabaseProperties properties = null) { throw null; } + public static Azure.ResourceManager.NeonPostgres.Models.NeonDatabaseProperties NeonDatabaseProperties(string entityId = null, string entityName = null, string createdAt = null, Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState? provisioningState = default(Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState?), System.Collections.Generic.IEnumerable attributes = null, string branchId = null, string ownerName = null) { throw null; } public static Azure.ResourceManager.NeonPostgres.NeonOrganizationData NeonOrganizationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.NeonPostgres.Models.NeonOrganizationProperties properties = null) { throw null; } - public static Azure.ResourceManager.NeonPostgres.Models.NeonOrganizationProperties NeonOrganizationProperties(Azure.ResourceManager.NeonPostgres.Models.NeonMarketplaceDetails marketplaceDetails = null, Azure.ResourceManager.NeonPostgres.Models.NeonUserDetails userDetails = null, Azure.ResourceManager.NeonPostgres.Models.NeonCompanyDetails companyDetails = null, Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState? provisioningState = default(Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState?), Azure.ResourceManager.NeonPostgres.Models.PartnerOrganizationProperties partnerOrganizationProperties = null) { throw null; } + public static Azure.ResourceManager.NeonPostgres.Models.NeonOrganizationProperties NeonOrganizationProperties(Azure.ResourceManager.NeonPostgres.Models.NeonMarketplaceDetails marketplaceDetails = null, Azure.ResourceManager.NeonPostgres.Models.NeonUserDetails userDetails = null, Azure.ResourceManager.NeonPostgres.Models.NeonCompanyDetails companyDetails = null, Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState? provisioningState = default(Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState?), Azure.ResourceManager.NeonPostgres.Models.PartnerOrganizationProperties partnerOrganizationProperties = null, Azure.ResourceManager.NeonPostgres.Models.ProjectProperties projectProperties = null) { throw null; } + public static Azure.ResourceManager.NeonPostgres.NeonRoleData NeonRoleData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.NeonPostgres.Models.NeonRoleProperties properties = null) { throw null; } + public static Azure.ResourceManager.NeonPostgres.Models.NeonRoleProperties NeonRoleProperties(string entityId = null, string entityName = null, string createdAt = null, Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState? provisioningState = default(Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState?), System.Collections.Generic.IEnumerable attributes = null, string branchId = null, System.Collections.Generic.IEnumerable permissions = null, bool? isSuperUser = default(bool?)) { throw null; } + public static Azure.ResourceManager.NeonPostgres.Models.PgVersionsResult PgVersionsResult(System.Collections.Generic.IEnumerable versions = null) { throw null; } + public static Azure.ResourceManager.NeonPostgres.ProjectData ProjectData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.NeonPostgres.Models.ProjectProperties properties = null) { throw null; } + public static Azure.ResourceManager.NeonPostgres.Models.ProjectProperties ProjectProperties(string entityId = null, string entityName = null, string createdAt = null, Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState? provisioningState = default(Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState?), System.Collections.Generic.IEnumerable attributes = null, string regionId = null, long? storage = default(long?), int? pgVersion = default(int?), int? historyRetention = default(int?), Azure.ResourceManager.NeonPostgres.Models.DefaultEndpointSettings defaultEndpointSettings = null, Azure.ResourceManager.NeonPostgres.Models.BranchProperties branch = null, System.Collections.Generic.IEnumerable roles = null, System.Collections.Generic.IEnumerable databases = null, System.Collections.Generic.IEnumerable endpoints = null) { throw null; } + } + public partial class Attributes : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public Attributes(string name, string value) { } + public string Name { get { throw null; } set { } } + public string Value { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.Attributes System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.Attributes System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BranchProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BranchProperties() { } + public System.Collections.Generic.IList Attributes { get { throw null; } } + public string CreatedAt { get { throw null; } } + public string DatabaseName { get { throw null; } set { } } + public System.Collections.Generic.IList Databases { get { throw null; } } + public System.Collections.Generic.IList Endpoints { get { throw null; } } + public string EntityId { get { throw null; } } + public string EntityName { get { throw null; } set { } } + public string ParentId { get { throw null; } set { } } + public string ProjectId { get { throw null; } set { } } + public Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState? ProvisioningState { get { throw null; } } + public string RoleName { get { throw null; } set { } } + public System.Collections.Generic.IList Roles { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.BranchProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.BranchProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ComputeProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ComputeProperties() { } + public System.Collections.Generic.IList Attributes { get { throw null; } } + public int? CpuCores { get { throw null; } set { } } + public string CreatedAt { get { throw null; } } + public string EntityId { get { throw null; } } + public string EntityName { get { throw null; } set { } } + public int? Memory { get { throw null; } set { } } + public Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState? ProvisioningState { get { throw null; } } + public string Region { get { throw null; } set { } } + public string Status { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.ComputeProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.ComputeProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ConnectionUriProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ConnectionUriProperties() { } + public string BranchId { get { throw null; } set { } } + public string ConnectionStringUri { get { throw null; } } + public string DatabaseName { get { throw null; } set { } } + public string EndpointId { get { throw null; } set { } } + public bool? IsPooled { get { throw null; } set { } } + public string ProjectId { get { throw null; } set { } } + public string RoleName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.ConnectionUriProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.ConnectionUriProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DefaultEndpointSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DefaultEndpointSettings(float autoscalingLimitMinCu, float autoscalingLimitMaxCu) { } + public float AutoscalingLimitMaxCu { get { throw null; } set { } } + public float AutoscalingLimitMinCu { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.DefaultEndpointSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.DefaultEndpointSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class EndpointProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EndpointProperties() { } + public System.Collections.Generic.IList Attributes { get { throw null; } } + public string BranchId { get { throw null; } set { } } + public string CreatedAt { get { throw null; } } + public Azure.ResourceManager.NeonPostgres.Models.EndpointType? EndpointType { get { throw null; } set { } } + public string EntityId { get { throw null; } } + public string EntityName { get { throw null; } set { } } + public string ProjectId { get { throw null; } set { } } + public Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState? ProvisioningState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.EndpointProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.EndpointProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct EndpointType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public EndpointType(string value) { throw null; } + public static Azure.ResourceManager.NeonPostgres.Models.EndpointType ReadOnly { get { throw null; } } + public static Azure.ResourceManager.NeonPostgres.Models.EndpointType ReadWrite { get { throw null; } } + public bool Equals(Azure.ResourceManager.NeonPostgres.Models.EndpointType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.NeonPostgres.Models.EndpointType left, Azure.ResourceManager.NeonPostgres.Models.EndpointType right) { throw null; } + public static implicit operator Azure.ResourceManager.NeonPostgres.Models.EndpointType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.NeonPostgres.Models.EndpointType left, Azure.ResourceManager.NeonPostgres.Models.EndpointType right) { throw null; } + public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct MarketplaceSubscriptionStatus : System.IEquatable @@ -127,6 +577,23 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class NeonDatabaseProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NeonDatabaseProperties() { } + public System.Collections.Generic.IList Attributes { get { throw null; } } + public string BranchId { get { throw null; } set { } } + public string CreatedAt { get { throw null; } } + public string EntityId { get { throw null; } } + public string EntityName { get { throw null; } set { } } + public string OwnerName { get { throw null; } set { } } + public Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState? ProvisioningState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.NeonDatabaseProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.NeonDatabaseProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class NeonMarketplaceDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public NeonMarketplaceDetails(Azure.ResourceManager.NeonPostgres.Models.NeonOfferDetails offerDetails) { } @@ -162,6 +629,7 @@ public NeonOrganizationProperties(Azure.ResourceManager.NeonPostgres.Models.Neon public Azure.ResourceManager.NeonPostgres.Models.NeonCompanyDetails CompanyDetails { get { throw null; } set { } } public Azure.ResourceManager.NeonPostgres.Models.NeonMarketplaceDetails MarketplaceDetails { get { throw null; } set { } } public Azure.ResourceManager.NeonPostgres.Models.PartnerOrganizationProperties PartnerOrganizationProperties { get { throw null; } set { } } + public Azure.ResourceManager.NeonPostgres.Models.ProjectProperties ProjectProperties { get { throw null; } set { } } public Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.NeonPostgres.Models.NeonUserDetails UserDetails { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -190,6 +658,24 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState left, Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState right) { throw null; } public override string ToString() { throw null; } } + public partial class NeonRoleProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NeonRoleProperties() { } + public System.Collections.Generic.IList Attributes { get { throw null; } } + public string BranchId { get { throw null; } set { } } + public string CreatedAt { get { throw null; } } + public string EntityId { get { throw null; } } + public string EntityName { get { throw null; } set { } } + public bool? IsSuperUser { get { throw null; } set { } } + public System.Collections.Generic.IList Permissions { get { throw null; } } + public Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState? ProvisioningState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.NeonRoleProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.NeonRoleProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class NeonSingleSignOnProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public NeonSingleSignOnProperties() { } @@ -251,4 +737,50 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class PgVersion : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PgVersion() { } + public int? Version { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.PgVersion System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.PgVersion System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PgVersionsResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PgVersionsResult() { } + public System.Collections.Generic.IReadOnlyList Versions { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.PgVersionsResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.PgVersionsResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ProjectProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ProjectProperties() { } + public System.Collections.Generic.IList Attributes { get { throw null; } } + public Azure.ResourceManager.NeonPostgres.Models.BranchProperties Branch { get { throw null; } set { } } + public string CreatedAt { get { throw null; } } + public System.Collections.Generic.IList Databases { get { throw null; } } + public Azure.ResourceManager.NeonPostgres.Models.DefaultEndpointSettings DefaultEndpointSettings { get { throw null; } set { } } + public System.Collections.Generic.IList Endpoints { get { throw null; } } + public string EntityId { get { throw null; } } + public string EntityName { get { throw null; } set { } } + public int? HistoryRetention { get { throw null; } set { } } + public int? PgVersion { get { throw null; } set { } } + public Azure.ResourceManager.NeonPostgres.Models.NeonResourceProvisioningState? ProvisioningState { get { throw null; } } + public string RegionId { get { throw null; } set { } } + public System.Collections.Generic.IList Roles { get { throw null; } } + public long? Storage { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.ProjectProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.NeonPostgres.Models.ProjectProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } } diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/ArmNeonPostgresModelFactory.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/ArmNeonPostgresModelFactory.cs index 3c3215cb7d69..eff34655bf2c 100644 --- a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/ArmNeonPostgresModelFactory.cs +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/ArmNeonPostgresModelFactory.cs @@ -45,9 +45,10 @@ public static NeonOrganizationData NeonOrganizationData(ResourceIdentifier id = /// Details of the user. /// Details of the company. /// Provisioning state of the resource. - /// Organization properties. + /// Neon Organization properties. + /// Neon Project Properties. /// A new instance for mocking. - public static NeonOrganizationProperties NeonOrganizationProperties(NeonMarketplaceDetails marketplaceDetails = null, NeonUserDetails userDetails = null, NeonCompanyDetails companyDetails = null, NeonResourceProvisioningState? provisioningState = null, PartnerOrganizationProperties partnerOrganizationProperties = null) + public static NeonOrganizationProperties NeonOrganizationProperties(NeonMarketplaceDetails marketplaceDetails = null, NeonUserDetails userDetails = null, NeonCompanyDetails companyDetails = null, NeonResourceProvisioningState? provisioningState = null, PartnerOrganizationProperties partnerOrganizationProperties = null, ProjectProperties projectProperties = null) { return new NeonOrganizationProperties( marketplaceDetails, @@ -55,6 +56,330 @@ public static NeonOrganizationProperties NeonOrganizationProperties(NeonMarketpl companyDetails, provisioningState, partnerOrganizationProperties, + projectProperties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Unique identifier for the entity. + /// Name of the resource. + /// Timestamp indicating when the entity was created. + /// Provisioning state of the resource. + /// Additional attributes for the entity. + /// Region where the project is created. + /// Data Storage bytes per hour for the project. + /// Postgres version for the project. + /// The retention period for project history in seconds. + /// Default endpoint settings for the project. + /// The Branch properties of the project. This is optional. + /// Roles associated with the project. + /// Neon Databases associated with the project. + /// Endpoints associated with the project. + /// A new instance for mocking. + public static ProjectProperties ProjectProperties(string entityId = null, string entityName = null, string createdAt = null, NeonResourceProvisioningState? provisioningState = null, IEnumerable attributes = null, string regionId = null, long? storage = null, int? pgVersion = null, int? historyRetention = null, DefaultEndpointSettings defaultEndpointSettings = null, BranchProperties branch = null, IEnumerable roles = null, IEnumerable databases = null, IEnumerable endpoints = null) + { + attributes ??= new List(); + roles ??= new List(); + databases ??= new List(); + endpoints ??= new List(); + + return new ProjectProperties( + entityId, + entityName, + createdAt, + provisioningState, + attributes?.ToList(), + regionId, + storage, + pgVersion, + historyRetention, + defaultEndpointSettings, + branch, + roles?.ToList(), + databases?.ToList(), + endpoints?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Unique identifier for the entity. + /// Name of the resource. + /// Timestamp indicating when the entity was created. + /// Provisioning state of the resource. + /// Additional attributes for the entity. + /// The ID of the project this branch belongs to. + /// The ID of the parent branch. + /// Role name associated with the branch. + /// Database name associated with the branch. + /// Roles associated with the branch. + /// Neon Databases associated with the branch. + /// Endpoints associated with the branch. + /// A new instance for mocking. + public static BranchProperties BranchProperties(string entityId = null, string entityName = null, string createdAt = null, NeonResourceProvisioningState? provisioningState = null, IEnumerable attributes = null, string projectId = null, string parentId = null, string roleName = null, string databaseName = null, IEnumerable roles = null, IEnumerable databases = null, IEnumerable endpoints = null) + { + attributes ??= new List(); + roles ??= new List(); + databases ??= new List(); + endpoints ??= new List(); + + return new BranchProperties( + entityId, + entityName, + createdAt, + provisioningState, + attributes?.ToList(), + projectId, + parentId, + roleName, + databaseName, + roles?.ToList(), + databases?.ToList(), + endpoints?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Unique identifier for the entity. + /// Name of the resource. + /// Timestamp indicating when the entity was created. + /// Provisioning state of the resource. + /// Additional attributes for the entity. + /// The ID of the branch this role belongs to. + /// Permissions assigned to the role. + /// Indicates whether the role has superuser privileges. + /// A new instance for mocking. + public static NeonRoleProperties NeonRoleProperties(string entityId = null, string entityName = null, string createdAt = null, NeonResourceProvisioningState? provisioningState = null, IEnumerable attributes = null, string branchId = null, IEnumerable permissions = null, bool? isSuperUser = null) + { + attributes ??= new List(); + permissions ??= new List(); + + return new NeonRoleProperties( + entityId, + entityName, + createdAt, + provisioningState, + attributes?.ToList(), + branchId, + permissions?.ToList(), + isSuperUser, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Unique identifier for the entity. + /// Name of the resource. + /// Timestamp indicating when the entity was created. + /// Provisioning state of the resource. + /// Additional attributes for the entity. + /// The ID of the branch this database belongs to. + /// The name of the role that owns the database. + /// A new instance for mocking. + public static NeonDatabaseProperties NeonDatabaseProperties(string entityId = null, string entityName = null, string createdAt = null, NeonResourceProvisioningState? provisioningState = null, IEnumerable attributes = null, string branchId = null, string ownerName = null) + { + attributes ??= new List(); + + return new NeonDatabaseProperties( + entityId, + entityName, + createdAt, + provisioningState, + attributes?.ToList(), + branchId, + ownerName, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Unique identifier for the entity. + /// Name of the resource. + /// Timestamp indicating when the entity was created. + /// Provisioning state of the resource. + /// Additional attributes for the entity. + /// The ID of the project this endpoint belongs to. + /// The ID of the branch this endpoint belongs to. + /// The type of the endpoint. + /// A new instance for mocking. + public static EndpointProperties EndpointProperties(string entityId = null, string entityName = null, string createdAt = null, NeonResourceProvisioningState? provisioningState = null, IEnumerable attributes = null, string projectId = null, string branchId = null, EndpointType? endpointType = null) + { + attributes ??= new List(); + + return new EndpointProperties( + entityId, + entityName, + createdAt, + provisioningState, + attributes?.ToList(), + projectId, + branchId, + endpointType, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// List of PostgreSQL versions. + /// A new instance for mocking. + public static PgVersionsResult PgVersionsResult(IEnumerable versions = null) + { + versions ??= new List(); + + return new PgVersionsResult(versions?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static ProjectData ProjectData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ProjectProperties properties = null) + { + return new ProjectData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Project Id associated with this connection. + /// Branch Id associated with this connection. + /// Database name associated with this connection. + /// The role name used for authentication. + /// the endpoint Id with this connection. + /// Indicates if the connection is pooled. + /// connection uri returned for the database. + /// A new instance for mocking. + public static ConnectionUriProperties ConnectionUriProperties(string projectId = null, string branchId = null, string databaseName = null, string roleName = null, string endpointId = null, bool? isPooled = null, string connectionStringUri = null) + { + return new ConnectionUriProperties( + projectId, + branchId, + databaseName, + roleName, + endpointId, + isPooled, + connectionStringUri, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static BranchData BranchData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, BranchProperties properties = null) + { + return new BranchData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static ComputeData ComputeData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ComputeProperties properties = null) + { + return new ComputeData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Unique identifier for the entity. + /// Name of the resource. + /// Timestamp indicating when the entity was created. + /// Provisioning state of the resource. + /// Additional attributes for the entity. + /// Region where the compute instance is located. + /// Number of allocated CPU cores. + /// Memory allocated in GB. + /// Current status of the compute instance. + /// A new instance for mocking. + public static ComputeProperties ComputeProperties(string entityId = null, string entityName = null, string createdAt = null, NeonResourceProvisioningState? provisioningState = null, IEnumerable attributes = null, string region = null, int? cpuCores = null, int? memory = null, string status = null) + { + attributes ??= new List(); + + return new ComputeProperties( + entityId, + entityName, + createdAt, + provisioningState, + attributes?.ToList(), + region, + cpuCores, + memory, + status, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static NeonDatabaseData NeonDatabaseData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, NeonDatabaseProperties properties = null) + { + return new NeonDatabaseData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static NeonRoleData NeonRoleData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, NeonRoleProperties properties = null) + { + return new NeonRoleData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static EndpointData EndpointData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, EndpointProperties properties = null) + { + return new EndpointData( + id, + name, + resourceType, + systemData, + properties, serializedAdditionalRawData: null); } } diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/BranchCollection.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/BranchCollection.cs new file mode 100644 index 000000000000..c71300f0428f --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/BranchCollection.cs @@ -0,0 +1,493 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.NeonPostgres +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetBranches method from an instance of . + /// + public partial class BranchCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _branchClientDiagnostics; + private readonly BranchesRestOperations _branchRestClient; + + /// Initializes a new instance of the class for mocking. + protected BranchCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal BranchCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _branchClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.NeonPostgres", BranchResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(BranchResource.ResourceType, out string branchApiVersion); + _branchRestClient = new BranchesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, branchApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ProjectResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ProjectResource.ResourceType), nameof(id)); + } + + /// + /// Create a Branch + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName} + /// + /// + /// Operation Id + /// Branch_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the Branch. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string branchName, BranchData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _branchClientDiagnostics.CreateScope("BranchCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _branchRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, branchName, data, cancellationToken).ConfigureAwait(false); + var operation = new NeonPostgresArmOperation(new BranchOperationSource(Client), _branchClientDiagnostics, Pipeline, _branchRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, branchName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a Branch + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName} + /// + /// + /// Operation Id + /// Branch_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the Branch. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string branchName, BranchData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _branchClientDiagnostics.CreateScope("BranchCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _branchRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, branchName, data, cancellationToken); + var operation = new NeonPostgresArmOperation(new BranchOperationSource(Client), _branchClientDiagnostics, Pipeline, _branchRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, branchName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Branch + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName} + /// + /// + /// Operation Id + /// Branch_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Branch. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string branchName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + + using var scope = _branchClientDiagnostics.CreateScope("BranchCollection.Get"); + scope.Start(); + try + { + var response = await _branchRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, branchName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new BranchResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Branch + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName} + /// + /// + /// Operation Id + /// Branch_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Branch. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string branchName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + + using var scope = _branchClientDiagnostics.CreateScope("BranchCollection.Get"); + scope.Start(); + try + { + var response = _branchRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, branchName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new BranchResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List Branch resources by Project + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches + /// + /// + /// Operation Id + /// Branch_List + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _branchRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _branchRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new BranchResource(Client, BranchData.DeserializeBranchData(e)), _branchClientDiagnostics, Pipeline, "BranchCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List Branch resources by Project + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches + /// + /// + /// Operation Id + /// Branch_List + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _branchRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _branchRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new BranchResource(Client, BranchData.DeserializeBranchData(e)), _branchClientDiagnostics, Pipeline, "BranchCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName} + /// + /// + /// Operation Id + /// Branch_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Branch. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string branchName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + + using var scope = _branchClientDiagnostics.CreateScope("BranchCollection.Exists"); + scope.Start(); + try + { + var response = await _branchRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, branchName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName} + /// + /// + /// Operation Id + /// Branch_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Branch. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string branchName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + + using var scope = _branchClientDiagnostics.CreateScope("BranchCollection.Exists"); + scope.Start(); + try + { + var response = _branchRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, branchName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName} + /// + /// + /// Operation Id + /// Branch_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Branch. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string branchName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + + using var scope = _branchClientDiagnostics.CreateScope("BranchCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _branchRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, branchName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new BranchResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName} + /// + /// + /// Operation Id + /// Branch_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Branch. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string branchName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + + using var scope = _branchClientDiagnostics.CreateScope("BranchCollection.GetIfExists"); + scope.Start(); + try + { + var response = _branchRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, branchName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new BranchResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/BranchData.Serialization.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/BranchData.Serialization.cs new file mode 100644 index 000000000000..69d2168ac85c --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/BranchData.Serialization.cs @@ -0,0 +1,155 @@ +// 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.Models; +using Azure.ResourceManager.NeonPostgres.Models; + +namespace Azure.ResourceManager.NeonPostgres +{ + public partial class BranchData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BranchData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + BranchData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BranchData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBranchData(document.RootElement, options); + } + + internal static BranchData DeserializeBranchData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + BranchProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = BranchProperties.DeserializeBranchProperties(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BranchData( + id, + name, + type, + systemData, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BranchData)} does not support writing '{options.Format}' format."); + } + } + + BranchData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeBranchData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BranchData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/BranchData.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/BranchData.cs new file mode 100644 index 000000000000..4c2fc0bffd98 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/BranchData.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.NeonPostgres.Models; + +namespace Azure.ResourceManager.NeonPostgres +{ + /// + /// A class representing the Branch data model. + /// The Branch resource type. + /// + public partial class BranchData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public BranchData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal BranchData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, BranchProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public BranchProperties Properties { get; set; } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/BranchResource.Serialization.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/BranchResource.Serialization.cs new file mode 100644 index 000000000000..8745b3ad778d --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/BranchResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.NeonPostgres +{ + public partial class BranchResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + BranchData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + BranchData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/BranchResource.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/BranchResource.cs new file mode 100644 index 000000000000..f9896f3d0323 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/BranchResource.cs @@ -0,0 +1,628 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.NeonPostgres +{ + /// + /// A Class representing a Branch along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetBranchResource method. + /// Otherwise you can get one from its parent resource using the GetBranch method. + /// + public partial class BranchResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The organizationName. + /// The projectName. + /// The branchName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _branchClientDiagnostics; + private readonly BranchesRestOperations _branchRestClient; + private readonly BranchData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Neon.Postgres/organizations/projects/branches"; + + /// Initializes a new instance of the class for mocking. + protected BranchResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal BranchResource(ArmClient client, BranchData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal BranchResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _branchClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.NeonPostgres", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string branchApiVersion); + _branchRestClient = new BranchesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, branchApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual BranchData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// Gets a collection of ComputeResources in the Branch. + /// An object representing collection of ComputeResources and their operations over a ComputeResource. + public virtual ComputeCollection GetComputes() + { + return GetCachedClient(client => new ComputeCollection(client, Id)); + } + + /// + /// Get a Compute + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/computes/{computeName} + /// + /// + /// Operation Id + /// Compute_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Compute. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetComputeAsync(string computeName, CancellationToken cancellationToken = default) + { + return await GetComputes().GetAsync(computeName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a Compute + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/computes/{computeName} + /// + /// + /// Operation Id + /// Compute_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Compute. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetCompute(string computeName, CancellationToken cancellationToken = default) + { + return GetComputes().Get(computeName, cancellationToken); + } + + /// Gets a collection of NeonDatabaseResources in the Branch. + /// An object representing collection of NeonDatabaseResources and their operations over a NeonDatabaseResource. + public virtual NeonDatabaseCollection GetNeonDatabases() + { + return GetCachedClient(client => new NeonDatabaseCollection(client, Id)); + } + + /// + /// Get a NeonDatabase + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonDatabases/{neonDatabaseName} + /// + /// + /// Operation Id + /// NeonDatabase_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the NeonDatabase. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetNeonDatabaseAsync(string neonDatabaseName, CancellationToken cancellationToken = default) + { + return await GetNeonDatabases().GetAsync(neonDatabaseName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a NeonDatabase + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonDatabases/{neonDatabaseName} + /// + /// + /// Operation Id + /// NeonDatabase_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the NeonDatabase. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetNeonDatabase(string neonDatabaseName, CancellationToken cancellationToken = default) + { + return GetNeonDatabases().Get(neonDatabaseName, cancellationToken); + } + + /// Gets a collection of NeonRoleResources in the Branch. + /// An object representing collection of NeonRoleResources and their operations over a NeonRoleResource. + public virtual NeonRoleCollection GetNeonRoles() + { + return GetCachedClient(client => new NeonRoleCollection(client, Id)); + } + + /// + /// Get a NeonRole + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonRoles/{neonRoleName} + /// + /// + /// Operation Id + /// NeonRole_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the NeonRole. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetNeonRoleAsync(string neonRoleName, CancellationToken cancellationToken = default) + { + return await GetNeonRoles().GetAsync(neonRoleName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a NeonRole + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonRoles/{neonRoleName} + /// + /// + /// Operation Id + /// NeonRole_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the NeonRole. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetNeonRole(string neonRoleName, CancellationToken cancellationToken = default) + { + return GetNeonRoles().Get(neonRoleName, cancellationToken); + } + + /// Gets a collection of EndpointResources in the Branch. + /// An object representing collection of EndpointResources and their operations over a EndpointResource. + public virtual EndpointCollection GetEndpoints() + { + return GetCachedClient(client => new EndpointCollection(client, Id)); + } + + /// + /// Get a Endpoint + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/endpoints/{endpointName} + /// + /// + /// Operation Id + /// Endpoint_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Endpoint. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetEndpointAsync(string endpointName, CancellationToken cancellationToken = default) + { + return await GetEndpoints().GetAsync(endpointName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a Endpoint + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/endpoints/{endpointName} + /// + /// + /// Operation Id + /// Endpoint_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Endpoint. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetEndpoint(string endpointName, CancellationToken cancellationToken = default) + { + return GetEndpoints().Get(endpointName, cancellationToken); + } + + /// + /// Get a Branch + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName} + /// + /// + /// Operation Id + /// Branch_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _branchClientDiagnostics.CreateScope("BranchResource.Get"); + scope.Start(); + try + { + var response = await _branchRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new BranchResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Branch + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName} + /// + /// + /// Operation Id + /// Branch_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _branchClientDiagnostics.CreateScope("BranchResource.Get"); + scope.Start(); + try + { + var response = _branchRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new BranchResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a Branch + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName} + /// + /// + /// Operation Id + /// Branch_Delete + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _branchClientDiagnostics.CreateScope("BranchResource.Delete"); + scope.Start(); + try + { + var response = await _branchRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var uri = _branchRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new NeonPostgresArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a Branch + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName} + /// + /// + /// Operation Id + /// Branch_Delete + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _branchClientDiagnostics.CreateScope("BranchResource.Delete"); + scope.Start(); + try + { + var response = _branchRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var uri = _branchRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new NeonPostgresArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a Branch + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName} + /// + /// + /// Operation Id + /// Branch_Update + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, BranchData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _branchClientDiagnostics.CreateScope("BranchResource.Update"); + scope.Start(); + try + { + var response = await _branchRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new NeonPostgresArmOperation(new BranchOperationSource(Client), _branchClientDiagnostics, Pipeline, _branchRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a Branch + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName} + /// + /// + /// Operation Id + /// Branch_Update + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, BranchData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _branchClientDiagnostics.CreateScope("BranchResource.Update"); + scope.Start(); + try + { + var response = _branchRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new NeonPostgresArmOperation(new BranchOperationSource(Client), _branchClientDiagnostics, Pipeline, _branchRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/ComputeCollection.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/ComputeCollection.cs new file mode 100644 index 000000000000..6bb9c42be75a --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/ComputeCollection.cs @@ -0,0 +1,493 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.NeonPostgres +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetComputes method from an instance of . + /// + public partial class ComputeCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _computeClientDiagnostics; + private readonly ComputesRestOperations _computeRestClient; + + /// Initializes a new instance of the class for mocking. + protected ComputeCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal ComputeCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _computeClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.NeonPostgres", ComputeResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ComputeResource.ResourceType, out string computeApiVersion); + _computeRestClient = new ComputesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, computeApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != BranchResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, BranchResource.ResourceType), nameof(id)); + } + + /// + /// Create a Compute + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/computes/{computeName} + /// + /// + /// Operation Id + /// Compute_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the Compute. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string computeName, ComputeData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(computeName, nameof(computeName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _computeClientDiagnostics.CreateScope("ComputeCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _computeRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, computeName, data, cancellationToken).ConfigureAwait(false); + var operation = new NeonPostgresArmOperation(new ComputeOperationSource(Client), _computeClientDiagnostics, Pipeline, _computeRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, computeName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a Compute + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/computes/{computeName} + /// + /// + /// Operation Id + /// Compute_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the Compute. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string computeName, ComputeData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(computeName, nameof(computeName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _computeClientDiagnostics.CreateScope("ComputeCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _computeRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, computeName, data, cancellationToken); + var operation = new NeonPostgresArmOperation(new ComputeOperationSource(Client), _computeClientDiagnostics, Pipeline, _computeRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, computeName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Compute + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/computes/{computeName} + /// + /// + /// Operation Id + /// Compute_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Compute. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string computeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(computeName, nameof(computeName)); + + using var scope = _computeClientDiagnostics.CreateScope("ComputeCollection.Get"); + scope.Start(); + try + { + var response = await _computeRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, computeName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ComputeResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Compute + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/computes/{computeName} + /// + /// + /// Operation Id + /// Compute_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Compute. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string computeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(computeName, nameof(computeName)); + + using var scope = _computeClientDiagnostics.CreateScope("ComputeCollection.Get"); + scope.Start(); + try + { + var response = _computeRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, computeName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ComputeResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List Compute resources by Branch + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/computes + /// + /// + /// Operation Id + /// Compute_List + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _computeRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _computeRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ComputeResource(Client, ComputeData.DeserializeComputeData(e)), _computeClientDiagnostics, Pipeline, "ComputeCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List Compute resources by Branch + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/computes + /// + /// + /// Operation Id + /// Compute_List + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _computeRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _computeRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ComputeResource(Client, ComputeData.DeserializeComputeData(e)), _computeClientDiagnostics, Pipeline, "ComputeCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/computes/{computeName} + /// + /// + /// Operation Id + /// Compute_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Compute. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string computeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(computeName, nameof(computeName)); + + using var scope = _computeClientDiagnostics.CreateScope("ComputeCollection.Exists"); + scope.Start(); + try + { + var response = await _computeRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, computeName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/computes/{computeName} + /// + /// + /// Operation Id + /// Compute_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Compute. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string computeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(computeName, nameof(computeName)); + + using var scope = _computeClientDiagnostics.CreateScope("ComputeCollection.Exists"); + scope.Start(); + try + { + var response = _computeRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, computeName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/computes/{computeName} + /// + /// + /// Operation Id + /// Compute_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Compute. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string computeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(computeName, nameof(computeName)); + + using var scope = _computeClientDiagnostics.CreateScope("ComputeCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _computeRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, computeName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ComputeResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/computes/{computeName} + /// + /// + /// Operation Id + /// Compute_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Compute. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string computeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(computeName, nameof(computeName)); + + using var scope = _computeClientDiagnostics.CreateScope("ComputeCollection.GetIfExists"); + scope.Start(); + try + { + var response = _computeRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, computeName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ComputeResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/ComputeData.Serialization.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/ComputeData.Serialization.cs new file mode 100644 index 000000000000..bcfed354ff83 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/ComputeData.Serialization.cs @@ -0,0 +1,155 @@ +// 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.Models; +using Azure.ResourceManager.NeonPostgres.Models; + +namespace Azure.ResourceManager.NeonPostgres +{ + public partial class ComputeData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ComputeData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + ComputeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ComputeData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeComputeData(document.RootElement, options); + } + + internal static ComputeData DeserializeComputeData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ComputeProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = ComputeProperties.DeserializeComputeProperties(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ComputeData( + id, + name, + type, + systemData, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ComputeData)} does not support writing '{options.Format}' format."); + } + } + + ComputeData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeComputeData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ComputeData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/ComputeData.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/ComputeData.cs new file mode 100644 index 000000000000..68cb9c0b20cf --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/ComputeData.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.NeonPostgres.Models; + +namespace Azure.ResourceManager.NeonPostgres +{ + /// + /// A class representing the Compute data model. + /// The Compute resource type. + /// + public partial class ComputeData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ComputeData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal ComputeData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ComputeProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public ComputeProperties Properties { get; set; } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/ComputeResource.Serialization.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/ComputeResource.Serialization.cs new file mode 100644 index 000000000000..9c710e176b72 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/ComputeResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.NeonPostgres +{ + public partial class ComputeResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + ComputeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + ComputeData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/ComputeResource.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/ComputeResource.cs new file mode 100644 index 000000000000..24ae7eac9236 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/ComputeResource.cs @@ -0,0 +1,353 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.NeonPostgres +{ + /// + /// A Class representing a Compute along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetComputeResource method. + /// Otherwise you can get one from its parent resource using the GetCompute method. + /// + public partial class ComputeResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The organizationName. + /// The projectName. + /// The branchName. + /// The computeName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string computeName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/computes/{computeName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _computeClientDiagnostics; + private readonly ComputesRestOperations _computeRestClient; + private readonly ComputeData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Neon.Postgres/organizations/projects/branches/computes"; + + /// Initializes a new instance of the class for mocking. + protected ComputeResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal ComputeResource(ArmClient client, ComputeData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal ComputeResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _computeClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.NeonPostgres", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string computeApiVersion); + _computeRestClient = new ComputesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, computeApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual ComputeData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get a Compute + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/computes/{computeName} + /// + /// + /// Operation Id + /// Compute_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _computeClientDiagnostics.CreateScope("ComputeResource.Get"); + scope.Start(); + try + { + var response = await _computeRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ComputeResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Compute + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/computes/{computeName} + /// + /// + /// Operation Id + /// Compute_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _computeClientDiagnostics.CreateScope("ComputeResource.Get"); + scope.Start(); + try + { + var response = _computeRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ComputeResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a Compute + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/computes/{computeName} + /// + /// + /// Operation Id + /// Compute_Delete + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _computeClientDiagnostics.CreateScope("ComputeResource.Delete"); + scope.Start(); + try + { + var response = await _computeRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var uri = _computeRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new NeonPostgresArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a Compute + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/computes/{computeName} + /// + /// + /// Operation Id + /// Compute_Delete + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _computeClientDiagnostics.CreateScope("ComputeResource.Delete"); + scope.Start(); + try + { + var response = _computeRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var uri = _computeRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new NeonPostgresArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a Compute + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/computes/{computeName} + /// + /// + /// Operation Id + /// Compute_Update + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, ComputeData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _computeClientDiagnostics.CreateScope("ComputeResource.Update"); + scope.Start(); + try + { + var response = await _computeRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new NeonPostgresArmOperation(new ComputeOperationSource(Client), _computeClientDiagnostics, Pipeline, _computeRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a Compute + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/computes/{computeName} + /// + /// + /// Operation Id + /// Compute_Update + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, ComputeData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _computeClientDiagnostics.CreateScope("ComputeResource.Update"); + scope.Start(); + try + { + var response = _computeRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new NeonPostgresArmOperation(new ComputeOperationSource(Client), _computeClientDiagnostics, Pipeline, _computeRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/EndpointCollection.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/EndpointCollection.cs new file mode 100644 index 000000000000..685bc88c86b9 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/EndpointCollection.cs @@ -0,0 +1,493 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.NeonPostgres +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get an instance call the GetEndpoints method from an instance of . + /// + public partial class EndpointCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _endpointClientDiagnostics; + private readonly EndpointsRestOperations _endpointRestClient; + + /// Initializes a new instance of the class for mocking. + protected EndpointCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal EndpointCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _endpointClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.NeonPostgres", EndpointResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(EndpointResource.ResourceType, out string endpointApiVersion); + _endpointRestClient = new EndpointsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, endpointApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != BranchResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, BranchResource.ResourceType), nameof(id)); + } + + /// + /// Create a Endpoint + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/endpoints/{endpointName} + /// + /// + /// Operation Id + /// Endpoint_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the Endpoint. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string endpointName, EndpointData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _endpointClientDiagnostics.CreateScope("EndpointCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _endpointRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, endpointName, data, cancellationToken).ConfigureAwait(false); + var operation = new NeonPostgresArmOperation(new EndpointOperationSource(Client), _endpointClientDiagnostics, Pipeline, _endpointRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, endpointName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a Endpoint + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/endpoints/{endpointName} + /// + /// + /// Operation Id + /// Endpoint_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the Endpoint. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string endpointName, EndpointData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _endpointClientDiagnostics.CreateScope("EndpointCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _endpointRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, endpointName, data, cancellationToken); + var operation = new NeonPostgresArmOperation(new EndpointOperationSource(Client), _endpointClientDiagnostics, Pipeline, _endpointRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, endpointName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Endpoint + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/endpoints/{endpointName} + /// + /// + /// Operation Id + /// Endpoint_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Endpoint. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string endpointName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); + + using var scope = _endpointClientDiagnostics.CreateScope("EndpointCollection.Get"); + scope.Start(); + try + { + var response = await _endpointRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, endpointName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EndpointResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Endpoint + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/endpoints/{endpointName} + /// + /// + /// Operation Id + /// Endpoint_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Endpoint. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string endpointName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); + + using var scope = _endpointClientDiagnostics.CreateScope("EndpointCollection.Get"); + scope.Start(); + try + { + var response = _endpointRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, endpointName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EndpointResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List Endpoint resources by Branch + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/endpoints + /// + /// + /// Operation Id + /// Endpoint_List + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _endpointRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _endpointRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new EndpointResource(Client, EndpointData.DeserializeEndpointData(e)), _endpointClientDiagnostics, Pipeline, "EndpointCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List Endpoint resources by Branch + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/endpoints + /// + /// + /// Operation Id + /// Endpoint_List + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _endpointRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _endpointRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new EndpointResource(Client, EndpointData.DeserializeEndpointData(e)), _endpointClientDiagnostics, Pipeline, "EndpointCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/endpoints/{endpointName} + /// + /// + /// Operation Id + /// Endpoint_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Endpoint. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string endpointName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); + + using var scope = _endpointClientDiagnostics.CreateScope("EndpointCollection.Exists"); + scope.Start(); + try + { + var response = await _endpointRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, endpointName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/endpoints/{endpointName} + /// + /// + /// Operation Id + /// Endpoint_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Endpoint. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string endpointName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); + + using var scope = _endpointClientDiagnostics.CreateScope("EndpointCollection.Exists"); + scope.Start(); + try + { + var response = _endpointRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, endpointName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/endpoints/{endpointName} + /// + /// + /// Operation Id + /// Endpoint_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Endpoint. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string endpointName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); + + using var scope = _endpointClientDiagnostics.CreateScope("EndpointCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _endpointRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, endpointName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new EndpointResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/endpoints/{endpointName} + /// + /// + /// Operation Id + /// Endpoint_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Endpoint. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string endpointName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); + + using var scope = _endpointClientDiagnostics.CreateScope("EndpointCollection.GetIfExists"); + scope.Start(); + try + { + var response = _endpointRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, endpointName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new EndpointResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/EndpointData.Serialization.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/EndpointData.Serialization.cs new file mode 100644 index 000000000000..2c65b28b3aa2 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/EndpointData.Serialization.cs @@ -0,0 +1,155 @@ +// 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.Models; +using Azure.ResourceManager.NeonPostgres.Models; + +namespace Azure.ResourceManager.NeonPostgres +{ + public partial class EndpointData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EndpointData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + EndpointData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EndpointData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEndpointData(document.RootElement, options); + } + + internal static EndpointData DeserializeEndpointData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + EndpointProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = EndpointProperties.DeserializeEndpointProperties(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EndpointData( + id, + name, + type, + systemData, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(EndpointData)} does not support writing '{options.Format}' format."); + } + } + + EndpointData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeEndpointData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EndpointData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/EndpointData.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/EndpointData.cs new file mode 100644 index 000000000000..215adf9f9384 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/EndpointData.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.NeonPostgres.Models; + +namespace Azure.ResourceManager.NeonPostgres +{ + /// + /// A class representing the Endpoint data model. + /// The Neon compute endpoint resource type. + /// + public partial class EndpointData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public EndpointData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal EndpointData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, EndpointProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public EndpointProperties Properties { get; set; } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/EndpointResource.Serialization.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/EndpointResource.Serialization.cs new file mode 100644 index 000000000000..cd1b4e5bae4a --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/EndpointResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.NeonPostgres +{ + public partial class EndpointResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + EndpointData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + EndpointData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/EndpointResource.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/EndpointResource.cs new file mode 100644 index 000000000000..bb5a489144f1 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/EndpointResource.cs @@ -0,0 +1,353 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.NeonPostgres +{ + /// + /// A Class representing an Endpoint along with the instance operations that can be performed on it. + /// If you have a you can construct an + /// from an instance of using the GetEndpointResource method. + /// Otherwise you can get one from its parent resource using the GetEndpoint method. + /// + public partial class EndpointResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The organizationName. + /// The projectName. + /// The branchName. + /// The endpointName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string endpointName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/endpoints/{endpointName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _endpointClientDiagnostics; + private readonly EndpointsRestOperations _endpointRestClient; + private readonly EndpointData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Neon.Postgres/organizations/projects/branches/endpoints"; + + /// Initializes a new instance of the class for mocking. + protected EndpointResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal EndpointResource(ArmClient client, EndpointData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal EndpointResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _endpointClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.NeonPostgres", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string endpointApiVersion); + _endpointRestClient = new EndpointsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, endpointApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual EndpointData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get a Endpoint + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/endpoints/{endpointName} + /// + /// + /// Operation Id + /// Endpoint_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _endpointClientDiagnostics.CreateScope("EndpointResource.Get"); + scope.Start(); + try + { + var response = await _endpointRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EndpointResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Endpoint + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/endpoints/{endpointName} + /// + /// + /// Operation Id + /// Endpoint_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _endpointClientDiagnostics.CreateScope("EndpointResource.Get"); + scope.Start(); + try + { + var response = _endpointRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new EndpointResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a Endpoint + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/endpoints/{endpointName} + /// + /// + /// Operation Id + /// Endpoint_Delete + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _endpointClientDiagnostics.CreateScope("EndpointResource.Delete"); + scope.Start(); + try + { + var response = await _endpointRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var uri = _endpointRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new NeonPostgresArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a Endpoint + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/endpoints/{endpointName} + /// + /// + /// Operation Id + /// Endpoint_Delete + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _endpointClientDiagnostics.CreateScope("EndpointResource.Delete"); + scope.Start(); + try + { + var response = _endpointRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var uri = _endpointRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new NeonPostgresArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a Endpoint + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/endpoints/{endpointName} + /// + /// + /// Operation Id + /// Endpoint_Update + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, EndpointData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _endpointClientDiagnostics.CreateScope("EndpointResource.Update"); + scope.Start(); + try + { + var response = await _endpointRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new NeonPostgresArmOperation(new EndpointOperationSource(Client), _endpointClientDiagnostics, Pipeline, _endpointRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a Endpoint + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/endpoints/{endpointName} + /// + /// + /// Operation Id + /// Endpoint_Update + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, EndpointData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _endpointClientDiagnostics.CreateScope("EndpointResource.Update"); + scope.Start(); + try + { + var response = _endpointRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new NeonPostgresArmOperation(new EndpointOperationSource(Client), _endpointClientDiagnostics, Pipeline, _endpointRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Extensions/MockableNeonPostgresArmClient.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Extensions/MockableNeonPostgresArmClient.cs index 5a92c8fc6b3a..9771deb7e5d0 100644 --- a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Extensions/MockableNeonPostgresArmClient.cs +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Extensions/MockableNeonPostgresArmClient.cs @@ -45,5 +45,77 @@ public virtual NeonOrganizationResource GetNeonOrganizationResource(ResourceIden NeonOrganizationResource.ValidateResourceId(id); return new NeonOrganizationResource(Client, id); } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual ProjectResource GetProjectResource(ResourceIdentifier id) + { + ProjectResource.ValidateResourceId(id); + return new ProjectResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual BranchResource GetBranchResource(ResourceIdentifier id) + { + BranchResource.ValidateResourceId(id); + return new BranchResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual ComputeResource GetComputeResource(ResourceIdentifier id) + { + ComputeResource.ValidateResourceId(id); + return new ComputeResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual NeonDatabaseResource GetNeonDatabaseResource(ResourceIdentifier id) + { + NeonDatabaseResource.ValidateResourceId(id); + return new NeonDatabaseResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual NeonRoleResource GetNeonRoleResource(ResourceIdentifier id) + { + NeonRoleResource.ValidateResourceId(id); + return new NeonRoleResource(Client, id); + } + + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual EndpointResource GetEndpointResource(ResourceIdentifier id) + { + EndpointResource.ValidateResourceId(id); + return new EndpointResource(Client, id); + } } } diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Extensions/MockableNeonPostgresResourceGroupResource.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Extensions/MockableNeonPostgresResourceGroupResource.cs index 54b0de3692f3..8c33caacd526 100644 --- a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Extensions/MockableNeonPostgresResourceGroupResource.cs +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Extensions/MockableNeonPostgresResourceGroupResource.cs @@ -9,12 +9,17 @@ using System.Threading; using System.Threading.Tasks; using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.NeonPostgres.Models; namespace Azure.ResourceManager.NeonPostgres.Mocking { /// A class to add extension methods to ResourceGroupResource. public partial class MockableNeonPostgresResourceGroupResource : ArmResource { + private ClientDiagnostics _neonOrganizationOrganizationsClientDiagnostics; + private OrganizationsRestOperations _neonOrganizationOrganizationsRestClient; + /// Initializes a new instance of the class for mocking. protected MockableNeonPostgresResourceGroupResource() { @@ -27,6 +32,9 @@ internal MockableNeonPostgresResourceGroupResource(ArmClient client, ResourceIde { } + private ClientDiagnostics NeonOrganizationOrganizationsClientDiagnostics => _neonOrganizationOrganizationsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.NeonPostgres", NeonOrganizationResource.ResourceType.Namespace, Diagnostics); + private OrganizationsRestOperations NeonOrganizationOrganizationsRestClient => _neonOrganizationOrganizationsRestClient ??= new OrganizationsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(NeonOrganizationResource.ResourceType)); + private string GetApiVersionOrNull(ResourceType resourceType) { TryGetApiVersion(resourceType, out string apiVersion); @@ -53,7 +61,7 @@ public virtual NeonOrganizationCollection GetNeonOrganizations() /// /// /// Default Api Version - /// 2024-08-01-preview + /// 2025-03-01 /// /// /// Resource @@ -84,7 +92,7 @@ public virtual async Task> GetNeonOrganizatio /// /// /// Default Api Version - /// 2024-08-01-preview + /// 2025-03-01 /// /// /// Resource @@ -101,5 +109,83 @@ public virtual Response GetNeonOrganization(string org { return GetNeonOrganizations().Get(organizationName, cancellationToken); } + + /// + /// Action to retrieve the PostgreSQL versions. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/getPostgresVersions + /// + /// + /// Operation Id + /// Organizations_GetPostgresVersions + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Post Action to retrieve the PostgreSQL versions. + /// The cancellation token to use. + public virtual async Task> GetPostgresVersionsOrganizationAsync(PgVersion pgVersion = null, CancellationToken cancellationToken = default) + { + using var scope = NeonOrganizationOrganizationsClientDiagnostics.CreateScope("MockableNeonPostgresResourceGroupResource.GetPostgresVersionsOrganization"); + scope.Start(); + try + { + var response = await NeonOrganizationOrganizationsRestClient.GetPostgresVersionsAsync(Id.SubscriptionId, Id.ResourceGroupName, pgVersion, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Action to retrieve the PostgreSQL versions. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/getPostgresVersions + /// + /// + /// Operation Id + /// Organizations_GetPostgresVersions + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Post Action to retrieve the PostgreSQL versions. + /// The cancellation token to use. + public virtual Response GetPostgresVersionsOrganization(PgVersion pgVersion = null, CancellationToken cancellationToken = default) + { + using var scope = NeonOrganizationOrganizationsClientDiagnostics.CreateScope("MockableNeonPostgresResourceGroupResource.GetPostgresVersionsOrganization"); + scope.Start(); + try + { + var response = NeonOrganizationOrganizationsRestClient.GetPostgresVersions(Id.SubscriptionId, Id.ResourceGroupName, pgVersion, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } } } diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Extensions/MockableNeonPostgresSubscriptionResource.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Extensions/MockableNeonPostgresSubscriptionResource.cs index abc57a2d6f31..71ebd2216522 100644 --- a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Extensions/MockableNeonPostgresSubscriptionResource.cs +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Extensions/MockableNeonPostgresSubscriptionResource.cs @@ -52,7 +52,7 @@ private string GetApiVersionOrNull(ResourceType resourceType) /// /// /// Default Api Version - /// 2024-08-01-preview + /// 2025-03-01 /// /// /// Resource @@ -82,7 +82,7 @@ public virtual AsyncPageable GetNeonOrganizationsAsync /// /// /// Default Api Version - /// 2024-08-01-preview + /// 2025-03-01 /// /// /// Resource diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Extensions/NeonPostgresExtensions.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Extensions/NeonPostgresExtensions.cs index 9037e7c839eb..07ff05441fb8 100644 --- a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Extensions/NeonPostgresExtensions.cs +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Extensions/NeonPostgresExtensions.cs @@ -10,6 +10,7 @@ using System.Threading.Tasks; using Azure.Core; using Azure.ResourceManager.NeonPostgres.Mocking; +using Azure.ResourceManager.NeonPostgres.Models; using Azure.ResourceManager.Resources; namespace Azure.ResourceManager.NeonPostgres @@ -51,6 +52,120 @@ public static NeonOrganizationResource GetNeonOrganizationResource(this ArmClien return GetMockableNeonPostgresArmClient(client).GetNeonOrganizationResource(id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static ProjectResource GetProjectResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableNeonPostgresArmClient(client).GetProjectResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static BranchResource GetBranchResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableNeonPostgresArmClient(client).GetBranchResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static ComputeResource GetComputeResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableNeonPostgresArmClient(client).GetComputeResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static NeonDatabaseResource GetNeonDatabaseResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableNeonPostgresArmClient(client).GetNeonDatabaseResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static NeonRoleResource GetNeonRoleResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableNeonPostgresArmClient(client).GetNeonRoleResource(id); + } + + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static EndpointResource GetEndpointResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableNeonPostgresArmClient(client).GetEndpointResource(id); + } + /// /// Gets a collection of NeonOrganizationResources in the ResourceGroupResource. /// @@ -81,7 +196,7 @@ public static NeonOrganizationCollection GetNeonOrganizations(this ResourceGroup /// /// /// Default Api Version - /// 2024-08-01-preview + /// 2025-03-01 /// /// /// Resource @@ -119,7 +234,7 @@ public static async Task> GetNeonOrganization /// /// /// Default Api Version - /// 2024-08-01-preview + /// 2025-03-01 /// /// /// Resource @@ -144,6 +259,78 @@ public static Response GetNeonOrganization(this Resour return GetMockableNeonPostgresResourceGroupResource(resourceGroupResource).GetNeonOrganization(organizationName, cancellationToken); } + /// + /// Action to retrieve the PostgreSQL versions. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/getPostgresVersions + /// + /// + /// Operation Id + /// Organizations_GetPostgresVersions + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// Post Action to retrieve the PostgreSQL versions. + /// The cancellation token to use. + /// is null. + public static async Task> GetPostgresVersionsOrganizationAsync(this ResourceGroupResource resourceGroupResource, PgVersion pgVersion = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return await GetMockableNeonPostgresResourceGroupResource(resourceGroupResource).GetPostgresVersionsOrganizationAsync(pgVersion, cancellationToken).ConfigureAwait(false); + } + + /// + /// Action to retrieve the PostgreSQL versions. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/getPostgresVersions + /// + /// + /// Operation Id + /// Organizations_GetPostgresVersions + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// Post Action to retrieve the PostgreSQL versions. + /// The cancellation token to use. + /// is null. + public static Response GetPostgresVersionsOrganization(this ResourceGroupResource resourceGroupResource, PgVersion pgVersion = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableNeonPostgresResourceGroupResource(resourceGroupResource).GetPostgresVersionsOrganization(pgVersion, cancellationToken); + } + /// /// List OrganizationResource resources by subscription ID /// @@ -157,7 +344,7 @@ public static Response GetNeonOrganization(this Resour /// /// /// Default Api Version - /// 2024-08-01-preview + /// 2025-03-01 /// /// /// Resource @@ -193,7 +380,7 @@ public static AsyncPageable GetNeonOrganizationsAsync( /// /// /// Default Api Version - /// 2024-08-01-preview + /// 2025-03-01 /// /// /// Resource diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/LongRunningOperation/BranchOperationSource.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/LongRunningOperation/BranchOperationSource.cs new file mode 100644 index 000000000000..e4baf5ec50eb --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/LongRunningOperation/BranchOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.NeonPostgres +{ + internal class BranchOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal BranchOperationSource(ArmClient client) + { + _client = client; + } + + BranchResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return new BranchResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return await Task.FromResult(new BranchResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/LongRunningOperation/ComputeOperationSource.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/LongRunningOperation/ComputeOperationSource.cs new file mode 100644 index 000000000000..6bc57eba36f5 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/LongRunningOperation/ComputeOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.NeonPostgres +{ + internal class ComputeOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal ComputeOperationSource(ArmClient client) + { + _client = client; + } + + ComputeResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return new ComputeResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return await Task.FromResult(new ComputeResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/LongRunningOperation/EndpointOperationSource.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/LongRunningOperation/EndpointOperationSource.cs new file mode 100644 index 000000000000..26483546690a --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/LongRunningOperation/EndpointOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.NeonPostgres +{ + internal class EndpointOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal EndpointOperationSource(ArmClient client) + { + _client = client; + } + + EndpointResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return new EndpointResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return await Task.FromResult(new EndpointResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/LongRunningOperation/NeonDatabaseOperationSource.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/LongRunningOperation/NeonDatabaseOperationSource.cs new file mode 100644 index 000000000000..4a137f0d87d7 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/LongRunningOperation/NeonDatabaseOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.NeonPostgres +{ + internal class NeonDatabaseOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal NeonDatabaseOperationSource(ArmClient client) + { + _client = client; + } + + NeonDatabaseResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return new NeonDatabaseResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return await Task.FromResult(new NeonDatabaseResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/LongRunningOperation/NeonRoleOperationSource.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/LongRunningOperation/NeonRoleOperationSource.cs new file mode 100644 index 000000000000..6c7a4cb58057 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/LongRunningOperation/NeonRoleOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.NeonPostgres +{ + internal class NeonRoleOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal NeonRoleOperationSource(ArmClient client) + { + _client = client; + } + + NeonRoleResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return new NeonRoleResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return await Task.FromResult(new NeonRoleResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/LongRunningOperation/ProjectOperationSource.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/LongRunningOperation/ProjectOperationSource.cs new file mode 100644 index 000000000000..75d0702c7378 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/LongRunningOperation/ProjectOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.NeonPostgres +{ + internal class ProjectOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal ProjectOperationSource(ArmClient client) + { + _client = client; + } + + ProjectResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return new ProjectResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return await Task.FromResult(new ProjectResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/Attributes.Serialization.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/Attributes.Serialization.cs new file mode 100644 index 000000000000..49b17d0dc60b --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/Attributes.Serialization.cs @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NeonPostgres.Models +{ + public partial class Attributes : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(Attributes)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + writer.WritePropertyName("value"u8); + writer.WriteStringValue(Value); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + Attributes IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(Attributes)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAttributes(document.RootElement, options); + } + + internal static Attributes DeserializeAttributes(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + string value = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("value"u8)) + { + value = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new Attributes(name, value, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(Attributes)} does not support writing '{options.Format}' format."); + } + } + + Attributes IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAttributes(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(Attributes)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/Attributes.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/Attributes.cs new file mode 100644 index 000000000000..31082f4bd0ba --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/Attributes.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NeonPostgres.Models +{ + /// Additional attributes specific to Neon Resources. + public partial class Attributes + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Name of the attribute. + /// Value of the attribute. + /// or is null. + public Attributes(string name, string value) + { + Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(value, nameof(value)); + + Name = name; + Value = value; + } + + /// Initializes a new instance of . + /// Name of the attribute. + /// Value of the attribute. + /// Keeps track of any properties unknown to the library. + internal Attributes(string name, string value, IDictionary serializedAdditionalRawData) + { + Name = name; + Value = value; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal Attributes() + { + } + + /// Name of the attribute. + public string Name { get; set; } + /// Value of the attribute. + public string Value { get; set; } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/BranchListResult.Serialization.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/BranchListResult.Serialization.cs new file mode 100644 index 000000000000..102dc1d72766 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/BranchListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NeonPostgres.Models +{ + internal partial class BranchListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BranchListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + BranchListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BranchListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBranchListResult(document.RootElement, options); + } + + internal static BranchListResult DeserializeBranchListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(BranchData.DeserializeBranchData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BranchListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BranchListResult)} does not support writing '{options.Format}' format."); + } + } + + BranchListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeBranchListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BranchListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/BranchListResult.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/BranchListResult.cs new file mode 100644 index 000000000000..a02461bcf393 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/BranchListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.NeonPostgres.Models +{ + /// The response of a Branch list operation. + internal partial class BranchListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The Branch items on this page. + /// is null. + internal BranchListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The Branch items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal BranchListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal BranchListResult() + { + } + + /// The Branch items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/BranchProperties.Serialization.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/BranchProperties.Serialization.cs new file mode 100644 index 000000000000..ff30821dc250 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/BranchProperties.Serialization.cs @@ -0,0 +1,323 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NeonPostgres.Models +{ + public partial class BranchProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BranchProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(EntityId)) + { + writer.WritePropertyName("entityId"u8); + writer.WriteStringValue(EntityId); + } + if (Optional.IsDefined(EntityName)) + { + writer.WritePropertyName("entityName"u8); + writer.WriteStringValue(EntityName); + } + if (options.Format != "W" && Optional.IsDefined(CreatedAt)) + { + writer.WritePropertyName("createdAt"u8); + writer.WriteStringValue(CreatedAt); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (Optional.IsCollectionDefined(Attributes)) + { + writer.WritePropertyName("attributes"u8); + writer.WriteStartArray(); + foreach (var item in Attributes) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(ProjectId)) + { + writer.WritePropertyName("projectId"u8); + writer.WriteStringValue(ProjectId); + } + if (Optional.IsDefined(ParentId)) + { + writer.WritePropertyName("parentId"u8); + writer.WriteStringValue(ParentId); + } + if (Optional.IsDefined(RoleName)) + { + writer.WritePropertyName("roleName"u8); + writer.WriteStringValue(RoleName); + } + if (Optional.IsDefined(DatabaseName)) + { + writer.WritePropertyName("databaseName"u8); + writer.WriteStringValue(DatabaseName); + } + if (Optional.IsCollectionDefined(Roles)) + { + writer.WritePropertyName("roles"u8); + writer.WriteStartArray(); + foreach (var item in Roles) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Databases)) + { + writer.WritePropertyName("databases"u8); + writer.WriteStartArray(); + foreach (var item in Databases) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Endpoints)) + { + writer.WritePropertyName("endpoints"u8); + writer.WriteStartArray(); + foreach (var item in Endpoints) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + BranchProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BranchProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBranchProperties(document.RootElement, options); + } + + internal static BranchProperties DeserializeBranchProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string entityId = default; + string entityName = default; + string createdAt = default; + NeonResourceProvisioningState? provisioningState = default; + IList attributes = default; + string projectId = default; + string parentId = default; + string roleName = default; + string databaseName = default; + IList roles = default; + IList databases = default; + IList endpoints = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("entityId"u8)) + { + entityId = property.Value.GetString(); + continue; + } + if (property.NameEquals("entityName"u8)) + { + entityName = property.Value.GetString(); + continue; + } + if (property.NameEquals("createdAt"u8)) + { + createdAt = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new NeonResourceProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("attributes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(Models.Attributes.DeserializeAttributes(item, options)); + } + attributes = array; + continue; + } + if (property.NameEquals("projectId"u8)) + { + projectId = property.Value.GetString(); + continue; + } + if (property.NameEquals("parentId"u8)) + { + parentId = property.Value.GetString(); + continue; + } + if (property.NameEquals("roleName"u8)) + { + roleName = property.Value.GetString(); + continue; + } + if (property.NameEquals("databaseName"u8)) + { + databaseName = property.Value.GetString(); + continue; + } + if (property.NameEquals("roles"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(NeonRoleProperties.DeserializeNeonRoleProperties(item, options)); + } + roles = array; + continue; + } + if (property.NameEquals("databases"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(NeonDatabaseProperties.DeserializeNeonDatabaseProperties(item, options)); + } + databases = array; + continue; + } + if (property.NameEquals("endpoints"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(EndpointProperties.DeserializeEndpointProperties(item, options)); + } + endpoints = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BranchProperties( + entityId, + entityName, + createdAt, + provisioningState, + attributes ?? new ChangeTrackingList(), + projectId, + parentId, + roleName, + databaseName, + roles ?? new ChangeTrackingList(), + databases ?? new ChangeTrackingList(), + endpoints ?? new ChangeTrackingList(), + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(BranchProperties)} does not support writing '{options.Format}' format."); + } + } + + BranchProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeBranchProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BranchProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/BranchProperties.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/BranchProperties.cs new file mode 100644 index 000000000000..758a2eb9f576 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/BranchProperties.cs @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NeonPostgres.Models +{ + /// Properties specific to Branch. + public partial class BranchProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public BranchProperties() + { + Attributes = new ChangeTrackingList(); + Roles = new ChangeTrackingList(); + Databases = new ChangeTrackingList(); + Endpoints = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Unique identifier for the entity. + /// Name of the resource. + /// Timestamp indicating when the entity was created. + /// Provisioning state of the resource. + /// Additional attributes for the entity. + /// The ID of the project this branch belongs to. + /// The ID of the parent branch. + /// Role name associated with the branch. + /// Database name associated with the branch. + /// Roles associated with the branch. + /// Neon Databases associated with the branch. + /// Endpoints associated with the branch. + /// Keeps track of any properties unknown to the library. + internal BranchProperties(string entityId, string entityName, string createdAt, NeonResourceProvisioningState? provisioningState, IList attributes, string projectId, string parentId, string roleName, string databaseName, IList roles, IList databases, IList endpoints, IDictionary serializedAdditionalRawData) + { + EntityId = entityId; + EntityName = entityName; + CreatedAt = createdAt; + ProvisioningState = provisioningState; + Attributes = attributes; + ProjectId = projectId; + ParentId = parentId; + RoleName = roleName; + DatabaseName = databaseName; + Roles = roles; + Databases = databases; + Endpoints = endpoints; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Unique identifier for the entity. + public string EntityId { get; } + /// Name of the resource. + public string EntityName { get; set; } + /// Timestamp indicating when the entity was created. + public string CreatedAt { get; } + /// Provisioning state of the resource. + public NeonResourceProvisioningState? ProvisioningState { get; } + /// Additional attributes for the entity. + public IList Attributes { get; } + /// The ID of the project this branch belongs to. + public string ProjectId { get; set; } + /// The ID of the parent branch. + public string ParentId { get; set; } + /// Role name associated with the branch. + public string RoleName { get; set; } + /// Database name associated with the branch. + public string DatabaseName { get; set; } + /// Roles associated with the branch. + public IList Roles { get; } + /// Neon Databases associated with the branch. + public IList Databases { get; } + /// Endpoints associated with the branch. + public IList Endpoints { get; } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/ComputeListResult.Serialization.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/ComputeListResult.Serialization.cs new file mode 100644 index 000000000000..b65a7c1810cd --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/ComputeListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NeonPostgres.Models +{ + internal partial class ComputeListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ComputeListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ComputeListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ComputeListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeComputeListResult(document.RootElement, options); + } + + internal static ComputeListResult DeserializeComputeListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ComputeData.DeserializeComputeData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ComputeListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ComputeListResult)} does not support writing '{options.Format}' format."); + } + } + + ComputeListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeComputeListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ComputeListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/ComputeListResult.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/ComputeListResult.cs new file mode 100644 index 000000000000..03aa9c0f3709 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/ComputeListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.NeonPostgres.Models +{ + /// The response of a Compute list operation. + internal partial class ComputeListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The Compute items on this page. + /// is null. + internal ComputeListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The Compute items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal ComputeListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ComputeListResult() + { + } + + /// The Compute items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/ComputeProperties.Serialization.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/ComputeProperties.Serialization.cs new file mode 100644 index 000000000000..cb49bd16ed83 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/ComputeProperties.Serialization.cs @@ -0,0 +1,253 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NeonPostgres.Models +{ + public partial class ComputeProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ComputeProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(EntityId)) + { + writer.WritePropertyName("entityId"u8); + writer.WriteStringValue(EntityId); + } + if (Optional.IsDefined(EntityName)) + { + writer.WritePropertyName("entityName"u8); + writer.WriteStringValue(EntityName); + } + if (options.Format != "W" && Optional.IsDefined(CreatedAt)) + { + writer.WritePropertyName("createdAt"u8); + writer.WriteStringValue(CreatedAt); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (Optional.IsCollectionDefined(Attributes)) + { + writer.WritePropertyName("attributes"u8); + writer.WriteStartArray(); + foreach (var item in Attributes) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Region)) + { + writer.WritePropertyName("region"u8); + writer.WriteStringValue(Region); + } + if (Optional.IsDefined(CpuCores)) + { + writer.WritePropertyName("cpuCores"u8); + writer.WriteNumberValue(CpuCores.Value); + } + if (Optional.IsDefined(Memory)) + { + writer.WritePropertyName("memory"u8); + writer.WriteNumberValue(Memory.Value); + } + if (Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ComputeProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ComputeProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeComputeProperties(document.RootElement, options); + } + + internal static ComputeProperties DeserializeComputeProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string entityId = default; + string entityName = default; + string createdAt = default; + NeonResourceProvisioningState? provisioningState = default; + IList attributes = default; + string region = default; + int? cpuCores = default; + int? memory = default; + string status = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("entityId"u8)) + { + entityId = property.Value.GetString(); + continue; + } + if (property.NameEquals("entityName"u8)) + { + entityName = property.Value.GetString(); + continue; + } + if (property.NameEquals("createdAt"u8)) + { + createdAt = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new NeonResourceProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("attributes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(Models.Attributes.DeserializeAttributes(item, options)); + } + attributes = array; + continue; + } + if (property.NameEquals("region"u8)) + { + region = property.Value.GetString(); + continue; + } + if (property.NameEquals("cpuCores"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + cpuCores = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("memory"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + memory = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("status"u8)) + { + status = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ComputeProperties( + entityId, + entityName, + createdAt, + provisioningState, + attributes ?? new ChangeTrackingList(), + region, + cpuCores, + memory, + status, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ComputeProperties)} does not support writing '{options.Format}' format."); + } + } + + ComputeProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeComputeProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ComputeProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/ComputeProperties.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/ComputeProperties.cs new file mode 100644 index 000000000000..be9fd44e721c --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/ComputeProperties.cs @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NeonPostgres.Models +{ + /// Properties specific to Compute. + public partial class ComputeProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ComputeProperties() + { + Attributes = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Unique identifier for the entity. + /// Name of the resource. + /// Timestamp indicating when the entity was created. + /// Provisioning state of the resource. + /// Additional attributes for the entity. + /// Region where the compute instance is located. + /// Number of allocated CPU cores. + /// Memory allocated in GB. + /// Current status of the compute instance. + /// Keeps track of any properties unknown to the library. + internal ComputeProperties(string entityId, string entityName, string createdAt, NeonResourceProvisioningState? provisioningState, IList attributes, string region, int? cpuCores, int? memory, string status, IDictionary serializedAdditionalRawData) + { + EntityId = entityId; + EntityName = entityName; + CreatedAt = createdAt; + ProvisioningState = provisioningState; + Attributes = attributes; + Region = region; + CpuCores = cpuCores; + Memory = memory; + Status = status; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Unique identifier for the entity. + public string EntityId { get; } + /// Name of the resource. + public string EntityName { get; set; } + /// Timestamp indicating when the entity was created. + public string CreatedAt { get; } + /// Provisioning state of the resource. + public NeonResourceProvisioningState? ProvisioningState { get; } + /// Additional attributes for the entity. + public IList Attributes { get; } + /// Region where the compute instance is located. + public string Region { get; set; } + /// Number of allocated CPU cores. + public int? CpuCores { get; set; } + /// Memory allocated in GB. + public int? Memory { get; set; } + /// Current status of the compute instance. + public string Status { get; set; } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/ConnectionUriProperties.Serialization.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/ConnectionUriProperties.Serialization.cs new file mode 100644 index 000000000000..c4623a1eb444 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/ConnectionUriProperties.Serialization.cs @@ -0,0 +1,207 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NeonPostgres.Models +{ + public partial class ConnectionUriProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConnectionUriProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(ProjectId)) + { + writer.WritePropertyName("projectId"u8); + writer.WriteStringValue(ProjectId); + } + if (Optional.IsDefined(BranchId)) + { + writer.WritePropertyName("branchId"u8); + writer.WriteStringValue(BranchId); + } + if (Optional.IsDefined(DatabaseName)) + { + writer.WritePropertyName("databaseName"u8); + writer.WriteStringValue(DatabaseName); + } + if (Optional.IsDefined(RoleName)) + { + writer.WritePropertyName("roleName"u8); + writer.WriteStringValue(RoleName); + } + if (Optional.IsDefined(EndpointId)) + { + writer.WritePropertyName("endpointId"u8); + writer.WriteStringValue(EndpointId); + } + if (Optional.IsDefined(IsPooled)) + { + writer.WritePropertyName("isPooled"u8); + writer.WriteBooleanValue(IsPooled.Value); + } + if (options.Format != "W" && Optional.IsDefined(ConnectionStringUri)) + { + writer.WritePropertyName("connectionStringUri"u8); + writer.WriteStringValue(ConnectionStringUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ConnectionUriProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConnectionUriProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConnectionUriProperties(document.RootElement, options); + } + + internal static ConnectionUriProperties DeserializeConnectionUriProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string projectId = default; + string branchId = default; + string databaseName = default; + string roleName = default; + string endpointId = default; + bool? isPooled = default; + string connectionStringUri = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("projectId"u8)) + { + projectId = property.Value.GetString(); + continue; + } + if (property.NameEquals("branchId"u8)) + { + branchId = property.Value.GetString(); + continue; + } + if (property.NameEquals("databaseName"u8)) + { + databaseName = property.Value.GetString(); + continue; + } + if (property.NameEquals("roleName"u8)) + { + roleName = property.Value.GetString(); + continue; + } + if (property.NameEquals("endpointId"u8)) + { + endpointId = property.Value.GetString(); + continue; + } + if (property.NameEquals("isPooled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isPooled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("connectionStringUri"u8)) + { + connectionStringUri = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ConnectionUriProperties( + projectId, + branchId, + databaseName, + roleName, + endpointId, + isPooled, + connectionStringUri, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConnectionUriProperties)} does not support writing '{options.Format}' format."); + } + } + + ConnectionUriProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeConnectionUriProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConnectionUriProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/ConnectionUriProperties.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/ConnectionUriProperties.cs new file mode 100644 index 000000000000..3de24453b5ac --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/ConnectionUriProperties.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; + +namespace Azure.ResourceManager.NeonPostgres.Models +{ + /// Connection uri parameters for the associated database. + public partial class ConnectionUriProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ConnectionUriProperties() + { + } + + /// Initializes a new instance of . + /// Project Id associated with this connection. + /// Branch Id associated with this connection. + /// Database name associated with this connection. + /// The role name used for authentication. + /// the endpoint Id with this connection. + /// Indicates if the connection is pooled. + /// connection uri returned for the database. + /// Keeps track of any properties unknown to the library. + internal ConnectionUriProperties(string projectId, string branchId, string databaseName, string roleName, string endpointId, bool? isPooled, string connectionStringUri, IDictionary serializedAdditionalRawData) + { + ProjectId = projectId; + BranchId = branchId; + DatabaseName = databaseName; + RoleName = roleName; + EndpointId = endpointId; + IsPooled = isPooled; + ConnectionStringUri = connectionStringUri; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Project Id associated with this connection. + public string ProjectId { get; set; } + /// Branch Id associated with this connection. + public string BranchId { get; set; } + /// Database name associated with this connection. + public string DatabaseName { get; set; } + /// The role name used for authentication. + public string RoleName { get; set; } + /// the endpoint Id with this connection. + public string EndpointId { get; set; } + /// Indicates if the connection is pooled. + public bool? IsPooled { get; set; } + /// connection uri returned for the database. + public string ConnectionStringUri { get; } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/DefaultEndpointSettings.Serialization.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/DefaultEndpointSettings.Serialization.cs new file mode 100644 index 000000000000..8002a758b0a9 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/DefaultEndpointSettings.Serialization.cs @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NeonPostgres.Models +{ + public partial class DefaultEndpointSettings : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DefaultEndpointSettings)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("autoscalingLimitMinCu"u8); + writer.WriteNumberValue(AutoscalingLimitMinCu); + writer.WritePropertyName("autoscalingLimitMaxCu"u8); + writer.WriteNumberValue(AutoscalingLimitMaxCu); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DefaultEndpointSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DefaultEndpointSettings)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDefaultEndpointSettings(document.RootElement, options); + } + + internal static DefaultEndpointSettings DeserializeDefaultEndpointSettings(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + float autoscalingLimitMinCu = default; + float autoscalingLimitMaxCu = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("autoscalingLimitMinCu"u8)) + { + autoscalingLimitMinCu = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("autoscalingLimitMaxCu"u8)) + { + autoscalingLimitMaxCu = property.Value.GetSingle(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DefaultEndpointSettings(autoscalingLimitMinCu, autoscalingLimitMaxCu, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DefaultEndpointSettings)} does not support writing '{options.Format}' format."); + } + } + + DefaultEndpointSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDefaultEndpointSettings(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DefaultEndpointSettings)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/DefaultEndpointSettings.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/DefaultEndpointSettings.cs new file mode 100644 index 000000000000..ea7accff0b69 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/DefaultEndpointSettings.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NeonPostgres.Models +{ + /// Default Endpoint Settings for the project. + public partial class DefaultEndpointSettings + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Minimum compute units for autoscaling. + /// Maximum compute units for autoscaling. + public DefaultEndpointSettings(float autoscalingLimitMinCu, float autoscalingLimitMaxCu) + { + AutoscalingLimitMinCu = autoscalingLimitMinCu; + AutoscalingLimitMaxCu = autoscalingLimitMaxCu; + } + + /// Initializes a new instance of . + /// Minimum compute units for autoscaling. + /// Maximum compute units for autoscaling. + /// Keeps track of any properties unknown to the library. + internal DefaultEndpointSettings(float autoscalingLimitMinCu, float autoscalingLimitMaxCu, IDictionary serializedAdditionalRawData) + { + AutoscalingLimitMinCu = autoscalingLimitMinCu; + AutoscalingLimitMaxCu = autoscalingLimitMaxCu; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DefaultEndpointSettings() + { + } + + /// Minimum compute units for autoscaling. + public float AutoscalingLimitMinCu { get; set; } + /// Maximum compute units for autoscaling. + public float AutoscalingLimitMaxCu { get; set; } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/EndpointListResult.Serialization.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/EndpointListResult.Serialization.cs new file mode 100644 index 000000000000..0ea58d5338da --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/EndpointListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NeonPostgres.Models +{ + internal partial class EndpointListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EndpointListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + EndpointListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EndpointListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEndpointListResult(document.RootElement, options); + } + + internal static EndpointListResult DeserializeEndpointListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(EndpointData.DeserializeEndpointData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EndpointListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(EndpointListResult)} does not support writing '{options.Format}' format."); + } + } + + EndpointListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeEndpointListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EndpointListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/EndpointListResult.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/EndpointListResult.cs new file mode 100644 index 000000000000..b8475a400a97 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/EndpointListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.NeonPostgres.Models +{ + /// The response of a Endpoint list operation. + internal partial class EndpointListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The Endpoint items on this page. + /// is null. + internal EndpointListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The Endpoint items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal EndpointListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal EndpointListResult() + { + } + + /// The Endpoint items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/EndpointProperties.Serialization.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/EndpointProperties.Serialization.cs new file mode 100644 index 000000000000..aa501d932dd8 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/EndpointProperties.Serialization.cs @@ -0,0 +1,237 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NeonPostgres.Models +{ + public partial class EndpointProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EndpointProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(EntityId)) + { + writer.WritePropertyName("entityId"u8); + writer.WriteStringValue(EntityId); + } + if (Optional.IsDefined(EntityName)) + { + writer.WritePropertyName("entityName"u8); + writer.WriteStringValue(EntityName); + } + if (options.Format != "W" && Optional.IsDefined(CreatedAt)) + { + writer.WritePropertyName("createdAt"u8); + writer.WriteStringValue(CreatedAt); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (Optional.IsCollectionDefined(Attributes)) + { + writer.WritePropertyName("attributes"u8); + writer.WriteStartArray(); + foreach (var item in Attributes) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(ProjectId)) + { + writer.WritePropertyName("projectId"u8); + writer.WriteStringValue(ProjectId); + } + if (Optional.IsDefined(BranchId)) + { + writer.WritePropertyName("branchId"u8); + writer.WriteStringValue(BranchId); + } + if (Optional.IsDefined(EndpointType)) + { + writer.WritePropertyName("endpointType"u8); + writer.WriteStringValue(EndpointType.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + EndpointProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EndpointProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEndpointProperties(document.RootElement, options); + } + + internal static EndpointProperties DeserializeEndpointProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string entityId = default; + string entityName = default; + string createdAt = default; + NeonResourceProvisioningState? provisioningState = default; + IList attributes = default; + string projectId = default; + string branchId = default; + EndpointType? endpointType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("entityId"u8)) + { + entityId = property.Value.GetString(); + continue; + } + if (property.NameEquals("entityName"u8)) + { + entityName = property.Value.GetString(); + continue; + } + if (property.NameEquals("createdAt"u8)) + { + createdAt = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new NeonResourceProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("attributes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(Models.Attributes.DeserializeAttributes(item, options)); + } + attributes = array; + continue; + } + if (property.NameEquals("projectId"u8)) + { + projectId = property.Value.GetString(); + continue; + } + if (property.NameEquals("branchId"u8)) + { + branchId = property.Value.GetString(); + continue; + } + if (property.NameEquals("endpointType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endpointType = new EndpointType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EndpointProperties( + entityId, + entityName, + createdAt, + provisioningState, + attributes ?? new ChangeTrackingList(), + projectId, + branchId, + endpointType, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(EndpointProperties)} does not support writing '{options.Format}' format."); + } + } + + EndpointProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeEndpointProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EndpointProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/EndpointProperties.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/EndpointProperties.cs new file mode 100644 index 000000000000..77cd2eb4a655 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/EndpointProperties.cs @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NeonPostgres.Models +{ + /// Properties specific to Endpoints. + public partial class EndpointProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public EndpointProperties() + { + Attributes = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Unique identifier for the entity. + /// Name of the resource. + /// Timestamp indicating when the entity was created. + /// Provisioning state of the resource. + /// Additional attributes for the entity. + /// The ID of the project this endpoint belongs to. + /// The ID of the branch this endpoint belongs to. + /// The type of the endpoint. + /// Keeps track of any properties unknown to the library. + internal EndpointProperties(string entityId, string entityName, string createdAt, NeonResourceProvisioningState? provisioningState, IList attributes, string projectId, string branchId, EndpointType? endpointType, IDictionary serializedAdditionalRawData) + { + EntityId = entityId; + EntityName = entityName; + CreatedAt = createdAt; + ProvisioningState = provisioningState; + Attributes = attributes; + ProjectId = projectId; + BranchId = branchId; + EndpointType = endpointType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Unique identifier for the entity. + public string EntityId { get; } + /// Name of the resource. + public string EntityName { get; set; } + /// Timestamp indicating when the entity was created. + public string CreatedAt { get; } + /// Provisioning state of the resource. + public NeonResourceProvisioningState? ProvisioningState { get; } + /// Additional attributes for the entity. + public IList Attributes { get; } + /// The ID of the project this endpoint belongs to. + public string ProjectId { get; set; } + /// The ID of the branch this endpoint belongs to. + public string BranchId { get; set; } + /// The type of the endpoint. + public EndpointType? EndpointType { get; set; } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/EndpointType.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/EndpointType.cs new file mode 100644 index 000000000000..eeffb601434b --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/EndpointType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.NeonPostgres.Models +{ + /// The compute endpoint type. Either read_write or read_only. + public readonly partial struct EndpointType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public EndpointType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ReadOnlyValue = "read_only"; + private const string ReadWriteValue = "read_write"; + + /// ReadOnly compute endpoint type. + public static EndpointType ReadOnly { get; } = new EndpointType(ReadOnlyValue); + /// ReadWrite compute endpoint type. + public static EndpointType ReadWrite { get; } = new EndpointType(ReadWriteValue); + /// Determines if two values are the same. + public static bool operator ==(EndpointType left, EndpointType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(EndpointType left, EndpointType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator EndpointType(string value) => new EndpointType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is EndpointType other && Equals(other); + /// + public bool Equals(EndpointType 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/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/NeonDatabaseListResult.Serialization.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/NeonDatabaseListResult.Serialization.cs new file mode 100644 index 000000000000..ad8612b934b4 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/NeonDatabaseListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NeonPostgres.Models +{ + internal partial class NeonDatabaseListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NeonDatabaseListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + NeonDatabaseListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NeonDatabaseListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNeonDatabaseListResult(document.RootElement, options); + } + + internal static NeonDatabaseListResult DeserializeNeonDatabaseListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(NeonDatabaseData.DeserializeNeonDatabaseData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NeonDatabaseListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(NeonDatabaseListResult)} does not support writing '{options.Format}' format."); + } + } + + NeonDatabaseListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeNeonDatabaseListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NeonDatabaseListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/NeonDatabaseListResult.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/NeonDatabaseListResult.cs new file mode 100644 index 000000000000..40a7670ee975 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/NeonDatabaseListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.NeonPostgres.Models +{ + /// The response of a NeonDatabase list operation. + internal partial class NeonDatabaseListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The NeonDatabase items on this page. + /// is null. + internal NeonDatabaseListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The NeonDatabase items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal NeonDatabaseListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal NeonDatabaseListResult() + { + } + + /// The NeonDatabase items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/NeonDatabaseProperties.Serialization.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/NeonDatabaseProperties.Serialization.cs new file mode 100644 index 000000000000..9a9fb45a241e --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/NeonDatabaseProperties.Serialization.cs @@ -0,0 +1,221 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NeonPostgres.Models +{ + public partial class NeonDatabaseProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NeonDatabaseProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(EntityId)) + { + writer.WritePropertyName("entityId"u8); + writer.WriteStringValue(EntityId); + } + if (Optional.IsDefined(EntityName)) + { + writer.WritePropertyName("entityName"u8); + writer.WriteStringValue(EntityName); + } + if (options.Format != "W" && Optional.IsDefined(CreatedAt)) + { + writer.WritePropertyName("createdAt"u8); + writer.WriteStringValue(CreatedAt); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (Optional.IsCollectionDefined(Attributes)) + { + writer.WritePropertyName("attributes"u8); + writer.WriteStartArray(); + foreach (var item in Attributes) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(BranchId)) + { + writer.WritePropertyName("branchId"u8); + writer.WriteStringValue(BranchId); + } + if (Optional.IsDefined(OwnerName)) + { + writer.WritePropertyName("ownerName"u8); + writer.WriteStringValue(OwnerName); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + NeonDatabaseProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NeonDatabaseProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNeonDatabaseProperties(document.RootElement, options); + } + + internal static NeonDatabaseProperties DeserializeNeonDatabaseProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string entityId = default; + string entityName = default; + string createdAt = default; + NeonResourceProvisioningState? provisioningState = default; + IList attributes = default; + string branchId = default; + string ownerName = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("entityId"u8)) + { + entityId = property.Value.GetString(); + continue; + } + if (property.NameEquals("entityName"u8)) + { + entityName = property.Value.GetString(); + continue; + } + if (property.NameEquals("createdAt"u8)) + { + createdAt = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new NeonResourceProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("attributes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(Models.Attributes.DeserializeAttributes(item, options)); + } + attributes = array; + continue; + } + if (property.NameEquals("branchId"u8)) + { + branchId = property.Value.GetString(); + continue; + } + if (property.NameEquals("ownerName"u8)) + { + ownerName = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NeonDatabaseProperties( + entityId, + entityName, + createdAt, + provisioningState, + attributes ?? new ChangeTrackingList(), + branchId, + ownerName, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(NeonDatabaseProperties)} does not support writing '{options.Format}' format."); + } + } + + NeonDatabaseProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeNeonDatabaseProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NeonDatabaseProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/NeonDatabaseProperties.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/NeonDatabaseProperties.cs new file mode 100644 index 000000000000..c156854ffa74 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/NeonDatabaseProperties.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; + +namespace Azure.ResourceManager.NeonPostgres.Models +{ + /// Properties specific to Databases. + public partial class NeonDatabaseProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public NeonDatabaseProperties() + { + Attributes = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Unique identifier for the entity. + /// Name of the resource. + /// Timestamp indicating when the entity was created. + /// Provisioning state of the resource. + /// Additional attributes for the entity. + /// The ID of the branch this database belongs to. + /// The name of the role that owns the database. + /// Keeps track of any properties unknown to the library. + internal NeonDatabaseProperties(string entityId, string entityName, string createdAt, NeonResourceProvisioningState? provisioningState, IList attributes, string branchId, string ownerName, IDictionary serializedAdditionalRawData) + { + EntityId = entityId; + EntityName = entityName; + CreatedAt = createdAt; + ProvisioningState = provisioningState; + Attributes = attributes; + BranchId = branchId; + OwnerName = ownerName; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Unique identifier for the entity. + public string EntityId { get; } + /// Name of the resource. + public string EntityName { get; set; } + /// Timestamp indicating when the entity was created. + public string CreatedAt { get; } + /// Provisioning state of the resource. + public NeonResourceProvisioningState? ProvisioningState { get; } + /// Additional attributes for the entity. + public IList Attributes { get; } + /// The ID of the branch this database belongs to. + public string BranchId { get; set; } + /// The name of the role that owns the database. + public string OwnerName { get; set; } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/NeonOrganizationProperties.Serialization.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/NeonOrganizationProperties.Serialization.cs index a4fc8025f83f..e3a5bcd0ce6f 100644 --- a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/NeonOrganizationProperties.Serialization.cs +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/NeonOrganizationProperties.Serialization.cs @@ -50,6 +50,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("partnerOrganizationProperties"u8); writer.WriteObjectValue(PartnerOrganizationProperties, options); } + if (Optional.IsDefined(ProjectProperties)) + { + writer.WritePropertyName("projectProperties"u8); + writer.WriteObjectValue(ProjectProperties, options); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -92,6 +97,7 @@ internal static NeonOrganizationProperties DeserializeNeonOrganizationProperties NeonCompanyDetails companyDetails = default; NeonResourceProvisioningState? provisioningState = default; PartnerOrganizationProperties partnerOrganizationProperties = default; + ProjectProperties projectProperties = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -129,6 +135,15 @@ internal static NeonOrganizationProperties DeserializeNeonOrganizationProperties partnerOrganizationProperties = PartnerOrganizationProperties.DeserializePartnerOrganizationProperties(property.Value, options); continue; } + if (property.NameEquals("projectProperties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + projectProperties = ProjectProperties.DeserializeProjectProperties(property.Value, options); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -141,6 +156,7 @@ internal static NeonOrganizationProperties DeserializeNeonOrganizationProperties companyDetails, provisioningState, partnerOrganizationProperties, + projectProperties, serializedAdditionalRawData); } diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/NeonOrganizationProperties.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/NeonOrganizationProperties.cs index 90a25e7a9c58..ad634351c56c 100644 --- a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/NeonOrganizationProperties.cs +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/NeonOrganizationProperties.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.NeonPostgres.Models { - /// Properties specific to Data Organization resource. + /// Properties specific to Neon Organization resource. public partial class NeonOrganizationProperties { /// @@ -66,15 +66,17 @@ public NeonOrganizationProperties(NeonMarketplaceDetails marketplaceDetails, Neo /// Details of the user. /// Details of the company. /// Provisioning state of the resource. - /// Organization properties. + /// Neon Organization properties. + /// Neon Project Properties. /// Keeps track of any properties unknown to the library. - internal NeonOrganizationProperties(NeonMarketplaceDetails marketplaceDetails, NeonUserDetails userDetails, NeonCompanyDetails companyDetails, NeonResourceProvisioningState? provisioningState, PartnerOrganizationProperties partnerOrganizationProperties, IDictionary serializedAdditionalRawData) + internal NeonOrganizationProperties(NeonMarketplaceDetails marketplaceDetails, NeonUserDetails userDetails, NeonCompanyDetails companyDetails, NeonResourceProvisioningState? provisioningState, PartnerOrganizationProperties partnerOrganizationProperties, ProjectProperties projectProperties, IDictionary serializedAdditionalRawData) { MarketplaceDetails = marketplaceDetails; UserDetails = userDetails; CompanyDetails = companyDetails; ProvisioningState = provisioningState; PartnerOrganizationProperties = partnerOrganizationProperties; + ProjectProperties = projectProperties; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -91,7 +93,9 @@ internal NeonOrganizationProperties() public NeonCompanyDetails CompanyDetails { get; set; } /// Provisioning state of the resource. public NeonResourceProvisioningState? ProvisioningState { get; } - /// Organization properties. + /// Neon Organization properties. public PartnerOrganizationProperties PartnerOrganizationProperties { get; set; } + /// Neon Project Properties. + public ProjectProperties ProjectProperties { get; set; } } } diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/NeonRoleListResult.Serialization.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/NeonRoleListResult.Serialization.cs new file mode 100644 index 000000000000..17a286c67479 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/NeonRoleListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NeonPostgres.Models +{ + internal partial class NeonRoleListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NeonRoleListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + NeonRoleListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NeonRoleListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNeonRoleListResult(document.RootElement, options); + } + + internal static NeonRoleListResult DeserializeNeonRoleListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(NeonRoleData.DeserializeNeonRoleData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NeonRoleListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(NeonRoleListResult)} does not support writing '{options.Format}' format."); + } + } + + NeonRoleListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeNeonRoleListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NeonRoleListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/NeonRoleListResult.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/NeonRoleListResult.cs new file mode 100644 index 000000000000..b4130ba1b902 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/NeonRoleListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.NeonPostgres.Models +{ + /// The response of a NeonRole list operation. + internal partial class NeonRoleListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The NeonRole items on this page. + /// is null. + internal NeonRoleListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The NeonRole items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal NeonRoleListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal NeonRoleListResult() + { + } + + /// The NeonRole items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/NeonRoleProperties.Serialization.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/NeonRoleProperties.Serialization.cs new file mode 100644 index 000000000000..8931ed3bdb1d --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/NeonRoleProperties.Serialization.cs @@ -0,0 +1,251 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NeonPostgres.Models +{ + public partial class NeonRoleProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NeonRoleProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(EntityId)) + { + writer.WritePropertyName("entityId"u8); + writer.WriteStringValue(EntityId); + } + if (Optional.IsDefined(EntityName)) + { + writer.WritePropertyName("entityName"u8); + writer.WriteStringValue(EntityName); + } + if (options.Format != "W" && Optional.IsDefined(CreatedAt)) + { + writer.WritePropertyName("createdAt"u8); + writer.WriteStringValue(CreatedAt); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (Optional.IsCollectionDefined(Attributes)) + { + writer.WritePropertyName("attributes"u8); + writer.WriteStartArray(); + foreach (var item in Attributes) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(BranchId)) + { + writer.WritePropertyName("branchId"u8); + writer.WriteStringValue(BranchId); + } + if (Optional.IsCollectionDefined(Permissions)) + { + writer.WritePropertyName("permissions"u8); + writer.WriteStartArray(); + foreach (var item in Permissions) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(IsSuperUser)) + { + writer.WritePropertyName("isSuperUser"u8); + writer.WriteBooleanValue(IsSuperUser.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + NeonRoleProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NeonRoleProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNeonRoleProperties(document.RootElement, options); + } + + internal static NeonRoleProperties DeserializeNeonRoleProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string entityId = default; + string entityName = default; + string createdAt = default; + NeonResourceProvisioningState? provisioningState = default; + IList attributes = default; + string branchId = default; + IList permissions = default; + bool? isSuperUser = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("entityId"u8)) + { + entityId = property.Value.GetString(); + continue; + } + if (property.NameEquals("entityName"u8)) + { + entityName = property.Value.GetString(); + continue; + } + if (property.NameEquals("createdAt"u8)) + { + createdAt = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new NeonResourceProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("attributes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(Models.Attributes.DeserializeAttributes(item, options)); + } + attributes = array; + continue; + } + if (property.NameEquals("branchId"u8)) + { + branchId = property.Value.GetString(); + continue; + } + if (property.NameEquals("permissions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + permissions = array; + continue; + } + if (property.NameEquals("isSuperUser"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isSuperUser = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NeonRoleProperties( + entityId, + entityName, + createdAt, + provisioningState, + attributes ?? new ChangeTrackingList(), + branchId, + permissions ?? new ChangeTrackingList(), + isSuperUser, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(NeonRoleProperties)} does not support writing '{options.Format}' format."); + } + } + + NeonRoleProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeNeonRoleProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NeonRoleProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/NeonRoleProperties.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/NeonRoleProperties.cs new file mode 100644 index 000000000000..d19464e943da --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/NeonRoleProperties.cs @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NeonPostgres.Models +{ + /// Properties specific to Roles. + public partial class NeonRoleProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public NeonRoleProperties() + { + Attributes = new ChangeTrackingList(); + Permissions = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Unique identifier for the entity. + /// Name of the resource. + /// Timestamp indicating when the entity was created. + /// Provisioning state of the resource. + /// Additional attributes for the entity. + /// The ID of the branch this role belongs to. + /// Permissions assigned to the role. + /// Indicates whether the role has superuser privileges. + /// Keeps track of any properties unknown to the library. + internal NeonRoleProperties(string entityId, string entityName, string createdAt, NeonResourceProvisioningState? provisioningState, IList attributes, string branchId, IList permissions, bool? isSuperUser, IDictionary serializedAdditionalRawData) + { + EntityId = entityId; + EntityName = entityName; + CreatedAt = createdAt; + ProvisioningState = provisioningState; + Attributes = attributes; + BranchId = branchId; + Permissions = permissions; + IsSuperUser = isSuperUser; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Unique identifier for the entity. + public string EntityId { get; } + /// Name of the resource. + public string EntityName { get; set; } + /// Timestamp indicating when the entity was created. + public string CreatedAt { get; } + /// Provisioning state of the resource. + public NeonResourceProvisioningState? ProvisioningState { get; } + /// Additional attributes for the entity. + public IList Attributes { get; } + /// The ID of the branch this role belongs to. + public string BranchId { get; set; } + /// Permissions assigned to the role. + public IList Permissions { get; } + /// Indicates whether the role has superuser privileges. + public bool? IsSuperUser { get; set; } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/PgVersion.Serialization.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/PgVersion.Serialization.cs new file mode 100644 index 000000000000..4e7d3b310594 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/PgVersion.Serialization.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NeonPostgres.Models +{ + public partial class PgVersion : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PgVersion)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Version)) + { + writer.WritePropertyName("version"u8); + writer.WriteNumberValue(Version.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + PgVersion IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PgVersion)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePgVersion(document.RootElement, options); + } + + internal static PgVersion DeserializePgVersion(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int? version = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("version"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + version = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PgVersion(version, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(PgVersion)} does not support writing '{options.Format}' format."); + } + } + + PgVersion IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializePgVersion(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PgVersion)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/PgVersion.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/PgVersion.cs new file mode 100644 index 000000000000..ece8eba8f59e --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/PgVersion.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NeonPostgres.Models +{ + /// PostgreSQL Version model. + public partial class PgVersion + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public PgVersion() + { + } + + /// Initializes a new instance of . + /// The major PostgreSQL version number. + /// Keeps track of any properties unknown to the library. + internal PgVersion(int? version, IDictionary serializedAdditionalRawData) + { + Version = version; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The major PostgreSQL version number. + public int? Version { get; set; } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/PgVersionsResult.Serialization.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/PgVersionsResult.Serialization.cs new file mode 100644 index 000000000000..800c3245dc86 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/PgVersionsResult.Serialization.cs @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NeonPostgres.Models +{ + public partial class PgVersionsResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PgVersionsResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("versions"u8); + writer.WriteStartArray(); + foreach (var item in Versions) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + PgVersionsResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PgVersionsResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePgVersionsResult(document.RootElement, options); + } + + internal static PgVersionsResult DeserializePgVersionsResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList versions = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("versions"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(PgVersion.DeserializePgVersion(item, options)); + } + versions = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PgVersionsResult(versions, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(PgVersionsResult)} does not support writing '{options.Format}' format."); + } + } + + PgVersionsResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializePgVersionsResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PgVersionsResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/PgVersionsResult.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/PgVersionsResult.cs new file mode 100644 index 000000000000..deea19e022be --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/PgVersionsResult.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.NeonPostgres.Models +{ + /// Response model for PostgreSQL versions. + public partial class PgVersionsResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// List of PostgreSQL versions. + /// is null. + internal PgVersionsResult(IEnumerable versions) + { + Argument.AssertNotNull(versions, nameof(versions)); + + Versions = versions.ToList(); + } + + /// Initializes a new instance of . + /// List of PostgreSQL versions. + /// Keeps track of any properties unknown to the library. + internal PgVersionsResult(IReadOnlyList versions, IDictionary serializedAdditionalRawData) + { + Versions = versions; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal PgVersionsResult() + { + } + + /// List of PostgreSQL versions. + public IReadOnlyList Versions { get; } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/ProjectListResult.Serialization.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/ProjectListResult.Serialization.cs new file mode 100644 index 000000000000..05ee8440c730 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/ProjectListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NeonPostgres.Models +{ + internal partial class ProjectListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProjectListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ProjectListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProjectListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeProjectListResult(document.RootElement, options); + } + + internal static ProjectListResult DeserializeProjectListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ProjectData.DeserializeProjectData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ProjectListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ProjectListResult)} does not support writing '{options.Format}' format."); + } + } + + ProjectListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeProjectListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ProjectListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/ProjectListResult.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/ProjectListResult.cs new file mode 100644 index 000000000000..939c66f610d1 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/ProjectListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.NeonPostgres.Models +{ + /// The response of a Project list operation. + internal partial class ProjectListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The Project items on this page. + /// is null. + internal ProjectListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The Project items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal ProjectListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ProjectListResult() + { + } + + /// The Project items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/ProjectProperties.Serialization.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/ProjectProperties.Serialization.cs new file mode 100644 index 000000000000..5ff0e32a62f4 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/ProjectProperties.Serialization.cs @@ -0,0 +1,367 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.NeonPostgres.Models +{ + public partial class ProjectProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProjectProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(EntityId)) + { + writer.WritePropertyName("entityId"u8); + writer.WriteStringValue(EntityId); + } + if (Optional.IsDefined(EntityName)) + { + writer.WritePropertyName("entityName"u8); + writer.WriteStringValue(EntityName); + } + if (options.Format != "W" && Optional.IsDefined(CreatedAt)) + { + writer.WritePropertyName("createdAt"u8); + writer.WriteStringValue(CreatedAt); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (Optional.IsCollectionDefined(Attributes)) + { + writer.WritePropertyName("attributes"u8); + writer.WriteStartArray(); + foreach (var item in Attributes) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(RegionId)) + { + writer.WritePropertyName("regionId"u8); + writer.WriteStringValue(RegionId); + } + if (Optional.IsDefined(Storage)) + { + writer.WritePropertyName("storage"u8); + writer.WriteNumberValue(Storage.Value); + } + if (Optional.IsDefined(PgVersion)) + { + writer.WritePropertyName("pgVersion"u8); + writer.WriteNumberValue(PgVersion.Value); + } + if (Optional.IsDefined(HistoryRetention)) + { + writer.WritePropertyName("historyRetention"u8); + writer.WriteNumberValue(HistoryRetention.Value); + } + if (Optional.IsDefined(DefaultEndpointSettings)) + { + writer.WritePropertyName("defaultEndpointSettings"u8); + writer.WriteObjectValue(DefaultEndpointSettings, options); + } + if (Optional.IsDefined(Branch)) + { + writer.WritePropertyName("branch"u8); + writer.WriteObjectValue(Branch, options); + } + if (Optional.IsCollectionDefined(Roles)) + { + writer.WritePropertyName("roles"u8); + writer.WriteStartArray(); + foreach (var item in Roles) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Databases)) + { + writer.WritePropertyName("databases"u8); + writer.WriteStartArray(); + foreach (var item in Databases) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Endpoints)) + { + writer.WritePropertyName("endpoints"u8); + writer.WriteStartArray(); + foreach (var item in Endpoints) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ProjectProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProjectProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeProjectProperties(document.RootElement, options); + } + + internal static ProjectProperties DeserializeProjectProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string entityId = default; + string entityName = default; + string createdAt = default; + NeonResourceProvisioningState? provisioningState = default; + IList attributes = default; + string regionId = default; + long? storage = default; + int? pgVersion = default; + int? historyRetention = default; + DefaultEndpointSettings defaultEndpointSettings = default; + BranchProperties branch = default; + IList roles = default; + IList databases = default; + IList endpoints = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("entityId"u8)) + { + entityId = property.Value.GetString(); + continue; + } + if (property.NameEquals("entityName"u8)) + { + entityName = property.Value.GetString(); + continue; + } + if (property.NameEquals("createdAt"u8)) + { + createdAt = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new NeonResourceProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("attributes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(Models.Attributes.DeserializeAttributes(item, options)); + } + attributes = array; + continue; + } + if (property.NameEquals("regionId"u8)) + { + regionId = property.Value.GetString(); + continue; + } + if (property.NameEquals("storage"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + storage = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("pgVersion"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + pgVersion = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("historyRetention"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + historyRetention = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("defaultEndpointSettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + defaultEndpointSettings = DefaultEndpointSettings.DeserializeDefaultEndpointSettings(property.Value, options); + continue; + } + if (property.NameEquals("branch"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + branch = BranchProperties.DeserializeBranchProperties(property.Value, options); + continue; + } + if (property.NameEquals("roles"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(NeonRoleProperties.DeserializeNeonRoleProperties(item, options)); + } + roles = array; + continue; + } + if (property.NameEquals("databases"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(NeonDatabaseProperties.DeserializeNeonDatabaseProperties(item, options)); + } + databases = array; + continue; + } + if (property.NameEquals("endpoints"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(EndpointProperties.DeserializeEndpointProperties(item, options)); + } + endpoints = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ProjectProperties( + entityId, + entityName, + createdAt, + provisioningState, + attributes ?? new ChangeTrackingList(), + regionId, + storage, + pgVersion, + historyRetention, + defaultEndpointSettings, + branch, + roles ?? new ChangeTrackingList(), + databases ?? new ChangeTrackingList(), + endpoints ?? new ChangeTrackingList(), + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ProjectProperties)} does not support writing '{options.Format}' format."); + } + } + + ProjectProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeProjectProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ProjectProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/ProjectProperties.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/ProjectProperties.cs new file mode 100644 index 000000000000..30b27f112c59 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/Models/ProjectProperties.cs @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.NeonPostgres.Models +{ + /// Properties specific to Project. + public partial class ProjectProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ProjectProperties() + { + Attributes = new ChangeTrackingList(); + Roles = new ChangeTrackingList(); + Databases = new ChangeTrackingList(); + Endpoints = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Unique identifier for the entity. + /// Name of the resource. + /// Timestamp indicating when the entity was created. + /// Provisioning state of the resource. + /// Additional attributes for the entity. + /// Region where the project is created. + /// Data Storage bytes per hour for the project. + /// Postgres version for the project. + /// The retention period for project history in seconds. + /// Default endpoint settings for the project. + /// The Branch properties of the project. This is optional. + /// Roles associated with the project. + /// Neon Databases associated with the project. + /// Endpoints associated with the project. + /// Keeps track of any properties unknown to the library. + internal ProjectProperties(string entityId, string entityName, string createdAt, NeonResourceProvisioningState? provisioningState, IList attributes, string regionId, long? storage, int? pgVersion, int? historyRetention, DefaultEndpointSettings defaultEndpointSettings, BranchProperties branch, IList roles, IList databases, IList endpoints, IDictionary serializedAdditionalRawData) + { + EntityId = entityId; + EntityName = entityName; + CreatedAt = createdAt; + ProvisioningState = provisioningState; + Attributes = attributes; + RegionId = regionId; + Storage = storage; + PgVersion = pgVersion; + HistoryRetention = historyRetention; + DefaultEndpointSettings = defaultEndpointSettings; + Branch = branch; + Roles = roles; + Databases = databases; + Endpoints = endpoints; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Unique identifier for the entity. + public string EntityId { get; } + /// Name of the resource. + public string EntityName { get; set; } + /// Timestamp indicating when the entity was created. + public string CreatedAt { get; } + /// Provisioning state of the resource. + public NeonResourceProvisioningState? ProvisioningState { get; } + /// Additional attributes for the entity. + public IList Attributes { get; } + /// Region where the project is created. + public string RegionId { get; set; } + /// Data Storage bytes per hour for the project. + public long? Storage { get; set; } + /// Postgres version for the project. + public int? PgVersion { get; set; } + /// The retention period for project history in seconds. + public int? HistoryRetention { get; set; } + /// Default endpoint settings for the project. + public DefaultEndpointSettings DefaultEndpointSettings { get; set; } + /// The Branch properties of the project. This is optional. + public BranchProperties Branch { get; set; } + /// Roles associated with the project. + public IList Roles { get; } + /// Neon Databases associated with the project. + public IList Databases { get; } + /// Endpoints associated with the project. + public IList Endpoints { get; } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonDatabaseCollection.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonDatabaseCollection.cs new file mode 100644 index 000000000000..6c6e5bb61efa --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonDatabaseCollection.cs @@ -0,0 +1,493 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.NeonPostgres +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetNeonDatabases method from an instance of . + /// + public partial class NeonDatabaseCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _neonDatabaseClientDiagnostics; + private readonly NeonDatabasesRestOperations _neonDatabaseRestClient; + + /// Initializes a new instance of the class for mocking. + protected NeonDatabaseCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal NeonDatabaseCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _neonDatabaseClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.NeonPostgres", NeonDatabaseResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(NeonDatabaseResource.ResourceType, out string neonDatabaseApiVersion); + _neonDatabaseRestClient = new NeonDatabasesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, neonDatabaseApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != BranchResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, BranchResource.ResourceType), nameof(id)); + } + + /// + /// Create a NeonDatabase + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonDatabases/{neonDatabaseName} + /// + /// + /// Operation Id + /// NeonDatabase_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the NeonDatabase. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string neonDatabaseName, NeonDatabaseData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(neonDatabaseName, nameof(neonDatabaseName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _neonDatabaseClientDiagnostics.CreateScope("NeonDatabaseCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _neonDatabaseRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, neonDatabaseName, data, cancellationToken).ConfigureAwait(false); + var operation = new NeonPostgresArmOperation(new NeonDatabaseOperationSource(Client), _neonDatabaseClientDiagnostics, Pipeline, _neonDatabaseRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, neonDatabaseName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a NeonDatabase + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonDatabases/{neonDatabaseName} + /// + /// + /// Operation Id + /// NeonDatabase_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the NeonDatabase. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string neonDatabaseName, NeonDatabaseData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(neonDatabaseName, nameof(neonDatabaseName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _neonDatabaseClientDiagnostics.CreateScope("NeonDatabaseCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _neonDatabaseRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, neonDatabaseName, data, cancellationToken); + var operation = new NeonPostgresArmOperation(new NeonDatabaseOperationSource(Client), _neonDatabaseClientDiagnostics, Pipeline, _neonDatabaseRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, neonDatabaseName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a NeonDatabase + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonDatabases/{neonDatabaseName} + /// + /// + /// Operation Id + /// NeonDatabase_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the NeonDatabase. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string neonDatabaseName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(neonDatabaseName, nameof(neonDatabaseName)); + + using var scope = _neonDatabaseClientDiagnostics.CreateScope("NeonDatabaseCollection.Get"); + scope.Start(); + try + { + var response = await _neonDatabaseRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, neonDatabaseName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new NeonDatabaseResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a NeonDatabase + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonDatabases/{neonDatabaseName} + /// + /// + /// Operation Id + /// NeonDatabase_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the NeonDatabase. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string neonDatabaseName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(neonDatabaseName, nameof(neonDatabaseName)); + + using var scope = _neonDatabaseClientDiagnostics.CreateScope("NeonDatabaseCollection.Get"); + scope.Start(); + try + { + var response = _neonDatabaseRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, neonDatabaseName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new NeonDatabaseResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List NeonDatabase resources by Branch + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonDatabases + /// + /// + /// Operation Id + /// NeonDatabase_List + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _neonDatabaseRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _neonDatabaseRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new NeonDatabaseResource(Client, NeonDatabaseData.DeserializeNeonDatabaseData(e)), _neonDatabaseClientDiagnostics, Pipeline, "NeonDatabaseCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List NeonDatabase resources by Branch + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonDatabases + /// + /// + /// Operation Id + /// NeonDatabase_List + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _neonDatabaseRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _neonDatabaseRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new NeonDatabaseResource(Client, NeonDatabaseData.DeserializeNeonDatabaseData(e)), _neonDatabaseClientDiagnostics, Pipeline, "NeonDatabaseCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonDatabases/{neonDatabaseName} + /// + /// + /// Operation Id + /// NeonDatabase_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the NeonDatabase. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string neonDatabaseName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(neonDatabaseName, nameof(neonDatabaseName)); + + using var scope = _neonDatabaseClientDiagnostics.CreateScope("NeonDatabaseCollection.Exists"); + scope.Start(); + try + { + var response = await _neonDatabaseRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, neonDatabaseName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonDatabases/{neonDatabaseName} + /// + /// + /// Operation Id + /// NeonDatabase_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the NeonDatabase. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string neonDatabaseName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(neonDatabaseName, nameof(neonDatabaseName)); + + using var scope = _neonDatabaseClientDiagnostics.CreateScope("NeonDatabaseCollection.Exists"); + scope.Start(); + try + { + var response = _neonDatabaseRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, neonDatabaseName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonDatabases/{neonDatabaseName} + /// + /// + /// Operation Id + /// NeonDatabase_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the NeonDatabase. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string neonDatabaseName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(neonDatabaseName, nameof(neonDatabaseName)); + + using var scope = _neonDatabaseClientDiagnostics.CreateScope("NeonDatabaseCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _neonDatabaseRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, neonDatabaseName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new NeonDatabaseResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonDatabases/{neonDatabaseName} + /// + /// + /// Operation Id + /// NeonDatabase_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the NeonDatabase. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string neonDatabaseName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(neonDatabaseName, nameof(neonDatabaseName)); + + using var scope = _neonDatabaseClientDiagnostics.CreateScope("NeonDatabaseCollection.GetIfExists"); + scope.Start(); + try + { + var response = _neonDatabaseRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, neonDatabaseName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new NeonDatabaseResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonDatabaseData.Serialization.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonDatabaseData.Serialization.cs new file mode 100644 index 000000000000..64dcdf487f97 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonDatabaseData.Serialization.cs @@ -0,0 +1,155 @@ +// 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.Models; +using Azure.ResourceManager.NeonPostgres.Models; + +namespace Azure.ResourceManager.NeonPostgres +{ + public partial class NeonDatabaseData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NeonDatabaseData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + NeonDatabaseData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NeonDatabaseData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNeonDatabaseData(document.RootElement, options); + } + + internal static NeonDatabaseData DeserializeNeonDatabaseData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + NeonDatabaseProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = NeonDatabaseProperties.DeserializeNeonDatabaseProperties(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NeonDatabaseData( + id, + name, + type, + systemData, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(NeonDatabaseData)} does not support writing '{options.Format}' format."); + } + } + + NeonDatabaseData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeNeonDatabaseData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NeonDatabaseData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonDatabaseData.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonDatabaseData.cs new file mode 100644 index 000000000000..5ea8c17cbac3 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonDatabaseData.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.NeonPostgres.Models; + +namespace Azure.ResourceManager.NeonPostgres +{ + /// + /// A class representing the NeonDatabase data model. + /// The Neon Database resource type. + /// + public partial class NeonDatabaseData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public NeonDatabaseData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal NeonDatabaseData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, NeonDatabaseProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public NeonDatabaseProperties Properties { get; set; } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonDatabaseResource.Serialization.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonDatabaseResource.Serialization.cs new file mode 100644 index 000000000000..0defd6d6acc4 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonDatabaseResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.NeonPostgres +{ + public partial class NeonDatabaseResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + NeonDatabaseData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + NeonDatabaseData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonDatabaseResource.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonDatabaseResource.cs new file mode 100644 index 000000000000..54b31f98c454 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonDatabaseResource.cs @@ -0,0 +1,353 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.NeonPostgres +{ + /// + /// A Class representing a NeonDatabase along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetNeonDatabaseResource method. + /// Otherwise you can get one from its parent resource using the GetNeonDatabase method. + /// + public partial class NeonDatabaseResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The organizationName. + /// The projectName. + /// The branchName. + /// The neonDatabaseName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string neonDatabaseName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonDatabases/{neonDatabaseName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _neonDatabaseClientDiagnostics; + private readonly NeonDatabasesRestOperations _neonDatabaseRestClient; + private readonly NeonDatabaseData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Neon.Postgres/organizations/projects/branches/neonDatabases"; + + /// Initializes a new instance of the class for mocking. + protected NeonDatabaseResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal NeonDatabaseResource(ArmClient client, NeonDatabaseData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal NeonDatabaseResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _neonDatabaseClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.NeonPostgres", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string neonDatabaseApiVersion); + _neonDatabaseRestClient = new NeonDatabasesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, neonDatabaseApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual NeonDatabaseData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get a NeonDatabase + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonDatabases/{neonDatabaseName} + /// + /// + /// Operation Id + /// NeonDatabase_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _neonDatabaseClientDiagnostics.CreateScope("NeonDatabaseResource.Get"); + scope.Start(); + try + { + var response = await _neonDatabaseRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new NeonDatabaseResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a NeonDatabase + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonDatabases/{neonDatabaseName} + /// + /// + /// Operation Id + /// NeonDatabase_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _neonDatabaseClientDiagnostics.CreateScope("NeonDatabaseResource.Get"); + scope.Start(); + try + { + var response = _neonDatabaseRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new NeonDatabaseResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a NeonDatabase + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonDatabases/{neonDatabaseName} + /// + /// + /// Operation Id + /// NeonDatabase_Delete + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _neonDatabaseClientDiagnostics.CreateScope("NeonDatabaseResource.Delete"); + scope.Start(); + try + { + var response = await _neonDatabaseRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var uri = _neonDatabaseRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new NeonPostgresArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a NeonDatabase + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonDatabases/{neonDatabaseName} + /// + /// + /// Operation Id + /// NeonDatabase_Delete + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _neonDatabaseClientDiagnostics.CreateScope("NeonDatabaseResource.Delete"); + scope.Start(); + try + { + var response = _neonDatabaseRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var uri = _neonDatabaseRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new NeonPostgresArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a NeonDatabase + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonDatabases/{neonDatabaseName} + /// + /// + /// Operation Id + /// NeonDatabase_Update + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, NeonDatabaseData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _neonDatabaseClientDiagnostics.CreateScope("NeonDatabaseResource.Update"); + scope.Start(); + try + { + var response = await _neonDatabaseRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new NeonPostgresArmOperation(new NeonDatabaseOperationSource(Client), _neonDatabaseClientDiagnostics, Pipeline, _neonDatabaseRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a NeonDatabase + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonDatabases/{neonDatabaseName} + /// + /// + /// Operation Id + /// NeonDatabase_Update + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, NeonDatabaseData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _neonDatabaseClientDiagnostics.CreateScope("NeonDatabaseResource.Update"); + scope.Start(); + try + { + var response = _neonDatabaseRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new NeonPostgresArmOperation(new NeonDatabaseOperationSource(Client), _neonDatabaseClientDiagnostics, Pipeline, _neonDatabaseRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonOrganizationCollection.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonOrganizationCollection.cs index 29184c380db9..c4259daa0a47 100644 --- a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonOrganizationCollection.cs +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonOrganizationCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-08-01-preview + /// 2025-03-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdate /// /// /// Default Api Version - /// 2024-08-01-preview + /// 2025-03-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil w /// /// /// Default Api Version - /// 2024-08-01-preview + /// 2025-03-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string or /// /// /// Default Api Version - /// 2024-08-01-preview + /// 2025-03-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string organizationName, C /// /// /// Default Api Version - /// 2024-08-01-preview + /// 2025-03-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(CancellationT /// /// /// Default Api Version - /// 2024-08-01-preview + /// 2025-03-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken cance /// /// /// Default Api Version - /// 2024-08-01-preview + /// 2025-03-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string organizationName, C /// /// /// Default Api Version - /// 2024-08-01-preview + /// 2025-03-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string organizationName, CancellationToken /// /// /// Default Api Version - /// 2024-08-01-preview + /// 2025-03-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIfExist /// /// /// Default Api Version - /// 2024-08-01-preview + /// 2025-03-01 /// /// /// Resource diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonOrganizationResource.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonOrganizationResource.cs index ac4517a26e4a..e1cc6035b1fc 100644 --- a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonOrganizationResource.cs +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonOrganizationResource.cs @@ -89,6 +89,75 @@ internal static void ValidateResourceId(ResourceIdentifier id) throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); } + /// Gets a collection of ProjectResources in the NeonOrganization. + /// An object representing collection of ProjectResources and their operations over a ProjectResource. + public virtual ProjectCollection GetProjects() + { + return GetCachedClient(client => new ProjectCollection(client, Id)); + } + + /// + /// Get a Project + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName} + /// + /// + /// Operation Id + /// Project_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Project. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetProjectAsync(string projectName, CancellationToken cancellationToken = default) + { + return await GetProjects().GetAsync(projectName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a Project + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName} + /// + /// + /// Operation Id + /// Project_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Project. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetProject(string projectName, CancellationToken cancellationToken = default) + { + return GetProjects().Get(projectName, cancellationToken); + } + /// /// Get a OrganizationResource /// @@ -102,7 +171,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-08-01-preview + /// 2025-03-01 /// /// /// Resource @@ -142,7 +211,7 @@ public virtual async Task> GetAsync(Cancellat /// /// /// Default Api Version - /// 2024-08-01-preview + /// 2025-03-01 /// /// /// Resource @@ -182,7 +251,7 @@ public virtual Response Get(CancellationToken cancella /// /// /// Default Api Version - /// 2024-08-01-preview + /// 2025-03-01 /// /// /// Resource @@ -224,7 +293,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-08-01-preview + /// 2025-03-01 /// /// /// Resource @@ -266,7 +335,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-08-01-preview + /// 2025-03-01 /// /// /// Resource @@ -312,7 +381,7 @@ public virtual async Task> UpdateAsync(Wa /// /// /// Default Api Version - /// 2024-08-01-preview + /// 2025-03-01 /// /// /// Resource @@ -358,7 +427,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil /// /// /// Default Api Version - /// 2024-08-01-preview + /// 2025-03-01 /// /// /// Resource @@ -420,7 +489,7 @@ public virtual async Task> AddTagAsync(string /// /// /// Default Api Version - /// 2024-08-01-preview + /// 2025-03-01 /// /// /// Resource @@ -482,7 +551,7 @@ public virtual Response AddTag(string key, string valu /// /// /// Default Api Version - /// 2024-08-01-preview + /// 2025-03-01 /// /// /// Resource @@ -539,7 +608,7 @@ public virtual async Task> SetTagsAsync(IDict /// /// /// Default Api Version - /// 2024-08-01-preview + /// 2025-03-01 /// /// /// Resource @@ -596,7 +665,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2024-08-01-preview + /// 2025-03-01 /// /// /// Resource @@ -656,7 +725,7 @@ public virtual async Task> RemoveTagAsync(str /// /// /// Default Api Version - /// 2024-08-01-preview + /// 2025-03-01 /// /// /// Resource diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonRoleCollection.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonRoleCollection.cs new file mode 100644 index 000000000000..cbf7b17cca45 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonRoleCollection.cs @@ -0,0 +1,493 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.NeonPostgres +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetNeonRoles method from an instance of . + /// + public partial class NeonRoleCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _neonRoleClientDiagnostics; + private readonly NeonRolesRestOperations _neonRoleRestClient; + + /// Initializes a new instance of the class for mocking. + protected NeonRoleCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal NeonRoleCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _neonRoleClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.NeonPostgres", NeonRoleResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(NeonRoleResource.ResourceType, out string neonRoleApiVersion); + _neonRoleRestClient = new NeonRolesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, neonRoleApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != BranchResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, BranchResource.ResourceType), nameof(id)); + } + + /// + /// Create a NeonRole + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonRoles/{neonRoleName} + /// + /// + /// Operation Id + /// NeonRole_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the NeonRole. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string neonRoleName, NeonRoleData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(neonRoleName, nameof(neonRoleName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _neonRoleClientDiagnostics.CreateScope("NeonRoleCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _neonRoleRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, neonRoleName, data, cancellationToken).ConfigureAwait(false); + var operation = new NeonPostgresArmOperation(new NeonRoleOperationSource(Client), _neonRoleClientDiagnostics, Pipeline, _neonRoleRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, neonRoleName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a NeonRole + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonRoles/{neonRoleName} + /// + /// + /// Operation Id + /// NeonRole_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the NeonRole. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string neonRoleName, NeonRoleData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(neonRoleName, nameof(neonRoleName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _neonRoleClientDiagnostics.CreateScope("NeonRoleCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _neonRoleRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, neonRoleName, data, cancellationToken); + var operation = new NeonPostgresArmOperation(new NeonRoleOperationSource(Client), _neonRoleClientDiagnostics, Pipeline, _neonRoleRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, neonRoleName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a NeonRole + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonRoles/{neonRoleName} + /// + /// + /// Operation Id + /// NeonRole_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the NeonRole. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string neonRoleName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(neonRoleName, nameof(neonRoleName)); + + using var scope = _neonRoleClientDiagnostics.CreateScope("NeonRoleCollection.Get"); + scope.Start(); + try + { + var response = await _neonRoleRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, neonRoleName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new NeonRoleResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a NeonRole + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonRoles/{neonRoleName} + /// + /// + /// Operation Id + /// NeonRole_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the NeonRole. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string neonRoleName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(neonRoleName, nameof(neonRoleName)); + + using var scope = _neonRoleClientDiagnostics.CreateScope("NeonRoleCollection.Get"); + scope.Start(); + try + { + var response = _neonRoleRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, neonRoleName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new NeonRoleResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List NeonRole resources by Branch + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonRoles + /// + /// + /// Operation Id + /// NeonRole_List + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _neonRoleRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _neonRoleRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new NeonRoleResource(Client, NeonRoleData.DeserializeNeonRoleData(e)), _neonRoleClientDiagnostics, Pipeline, "NeonRoleCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List NeonRole resources by Branch + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonRoles + /// + /// + /// Operation Id + /// NeonRole_List + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _neonRoleRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _neonRoleRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new NeonRoleResource(Client, NeonRoleData.DeserializeNeonRoleData(e)), _neonRoleClientDiagnostics, Pipeline, "NeonRoleCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonRoles/{neonRoleName} + /// + /// + /// Operation Id + /// NeonRole_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the NeonRole. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string neonRoleName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(neonRoleName, nameof(neonRoleName)); + + using var scope = _neonRoleClientDiagnostics.CreateScope("NeonRoleCollection.Exists"); + scope.Start(); + try + { + var response = await _neonRoleRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, neonRoleName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonRoles/{neonRoleName} + /// + /// + /// Operation Id + /// NeonRole_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the NeonRole. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string neonRoleName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(neonRoleName, nameof(neonRoleName)); + + using var scope = _neonRoleClientDiagnostics.CreateScope("NeonRoleCollection.Exists"); + scope.Start(); + try + { + var response = _neonRoleRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, neonRoleName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonRoles/{neonRoleName} + /// + /// + /// Operation Id + /// NeonRole_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the NeonRole. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string neonRoleName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(neonRoleName, nameof(neonRoleName)); + + using var scope = _neonRoleClientDiagnostics.CreateScope("NeonRoleCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _neonRoleRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, neonRoleName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new NeonRoleResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonRoles/{neonRoleName} + /// + /// + /// Operation Id + /// NeonRole_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the NeonRole. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string neonRoleName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(neonRoleName, nameof(neonRoleName)); + + using var scope = _neonRoleClientDiagnostics.CreateScope("NeonRoleCollection.GetIfExists"); + scope.Start(); + try + { + var response = _neonRoleRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, neonRoleName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new NeonRoleResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonRoleData.Serialization.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonRoleData.Serialization.cs new file mode 100644 index 000000000000..2e7407d61ac3 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonRoleData.Serialization.cs @@ -0,0 +1,155 @@ +// 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.Models; +using Azure.ResourceManager.NeonPostgres.Models; + +namespace Azure.ResourceManager.NeonPostgres +{ + public partial class NeonRoleData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NeonRoleData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + NeonRoleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NeonRoleData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNeonRoleData(document.RootElement, options); + } + + internal static NeonRoleData DeserializeNeonRoleData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + NeonRoleProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = NeonRoleProperties.DeserializeNeonRoleProperties(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NeonRoleData( + id, + name, + type, + systemData, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(NeonRoleData)} does not support writing '{options.Format}' format."); + } + } + + NeonRoleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeNeonRoleData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NeonRoleData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonRoleData.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonRoleData.cs new file mode 100644 index 000000000000..f40f18133a1d --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonRoleData.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.NeonPostgres.Models; + +namespace Azure.ResourceManager.NeonPostgres +{ + /// + /// A class representing the NeonRole data model. + /// The Neon Role resource type. + /// + public partial class NeonRoleData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public NeonRoleData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal NeonRoleData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, NeonRoleProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public NeonRoleProperties Properties { get; set; } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonRoleResource.Serialization.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonRoleResource.Serialization.cs new file mode 100644 index 000000000000..13c6c17c0a84 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonRoleResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.NeonPostgres +{ + public partial class NeonRoleResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + NeonRoleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + NeonRoleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonRoleResource.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonRoleResource.cs new file mode 100644 index 000000000000..c61b903a5ef7 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonRoleResource.cs @@ -0,0 +1,353 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.NeonPostgres +{ + /// + /// A Class representing a NeonRole along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetNeonRoleResource method. + /// Otherwise you can get one from its parent resource using the GetNeonRole method. + /// + public partial class NeonRoleResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The organizationName. + /// The projectName. + /// The branchName. + /// The neonRoleName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string neonRoleName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonRoles/{neonRoleName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _neonRoleClientDiagnostics; + private readonly NeonRolesRestOperations _neonRoleRestClient; + private readonly NeonRoleData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Neon.Postgres/organizations/projects/branches/neonRoles"; + + /// Initializes a new instance of the class for mocking. + protected NeonRoleResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal NeonRoleResource(ArmClient client, NeonRoleData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal NeonRoleResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _neonRoleClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.NeonPostgres", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string neonRoleApiVersion); + _neonRoleRestClient = new NeonRolesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, neonRoleApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual NeonRoleData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get a NeonRole + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonRoles/{neonRoleName} + /// + /// + /// Operation Id + /// NeonRole_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _neonRoleClientDiagnostics.CreateScope("NeonRoleResource.Get"); + scope.Start(); + try + { + var response = await _neonRoleRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new NeonRoleResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a NeonRole + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonRoles/{neonRoleName} + /// + /// + /// Operation Id + /// NeonRole_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _neonRoleClientDiagnostics.CreateScope("NeonRoleResource.Get"); + scope.Start(); + try + { + var response = _neonRoleRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new NeonRoleResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a NeonRole + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonRoles/{neonRoleName} + /// + /// + /// Operation Id + /// NeonRole_Delete + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _neonRoleClientDiagnostics.CreateScope("NeonRoleResource.Delete"); + scope.Start(); + try + { + var response = await _neonRoleRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var uri = _neonRoleRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new NeonPostgresArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a NeonRole + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonRoles/{neonRoleName} + /// + /// + /// Operation Id + /// NeonRole_Delete + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _neonRoleClientDiagnostics.CreateScope("NeonRoleResource.Delete"); + scope.Start(); + try + { + var response = _neonRoleRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var uri = _neonRoleRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new NeonPostgresArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a NeonRole + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonRoles/{neonRoleName} + /// + /// + /// Operation Id + /// NeonRole_Update + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, NeonRoleData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _neonRoleClientDiagnostics.CreateScope("NeonRoleResource.Update"); + scope.Start(); + try + { + var response = await _neonRoleRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new NeonPostgresArmOperation(new NeonRoleOperationSource(Client), _neonRoleClientDiagnostics, Pipeline, _neonRoleRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a NeonRole + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonRoles/{neonRoleName} + /// + /// + /// Operation Id + /// NeonRole_Update + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, NeonRoleData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _neonRoleClientDiagnostics.CreateScope("NeonRoleResource.Update"); + scope.Start(); + try + { + var response = _neonRoleRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new NeonPostgresArmOperation(new NeonRoleOperationSource(Client), _neonRoleClientDiagnostics, Pipeline, _neonRoleRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/ProjectCollection.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/ProjectCollection.cs new file mode 100644 index 000000000000..638454ab0ed7 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/ProjectCollection.cs @@ -0,0 +1,493 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.NeonPostgres +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetProjects method from an instance of . + /// + public partial class ProjectCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _projectClientDiagnostics; + private readonly ProjectsRestOperations _projectRestClient; + + /// Initializes a new instance of the class for mocking. + protected ProjectCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal ProjectCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _projectClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.NeonPostgres", ProjectResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ProjectResource.ResourceType, out string projectApiVersion); + _projectRestClient = new ProjectsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, projectApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != NeonOrganizationResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, NeonOrganizationResource.ResourceType), nameof(id)); + } + + /// + /// Create a Project + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName} + /// + /// + /// Operation Id + /// Project_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the Project. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string projectName, ProjectData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _projectClientDiagnostics.CreateScope("ProjectCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _projectRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, projectName, data, cancellationToken).ConfigureAwait(false); + var operation = new NeonPostgresArmOperation(new ProjectOperationSource(Client), _projectClientDiagnostics, Pipeline, _projectRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, projectName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a Project + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName} + /// + /// + /// Operation Id + /// Project_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the Project. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string projectName, ProjectData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _projectClientDiagnostics.CreateScope("ProjectCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _projectRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, projectName, data, cancellationToken); + var operation = new NeonPostgresArmOperation(new ProjectOperationSource(Client), _projectClientDiagnostics, Pipeline, _projectRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, projectName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Project + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName} + /// + /// + /// Operation Id + /// Project_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Project. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string projectName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + using var scope = _projectClientDiagnostics.CreateScope("ProjectCollection.Get"); + scope.Start(); + try + { + var response = await _projectRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, projectName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ProjectResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Project + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName} + /// + /// + /// Operation Id + /// Project_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Project. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string projectName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + using var scope = _projectClientDiagnostics.CreateScope("ProjectCollection.Get"); + scope.Start(); + try + { + var response = _projectRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, projectName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ProjectResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List Project resources by OrganizationResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects + /// + /// + /// Operation Id + /// Project_List + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _projectRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _projectRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ProjectResource(Client, ProjectData.DeserializeProjectData(e)), _projectClientDiagnostics, Pipeline, "ProjectCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List Project resources by OrganizationResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects + /// + /// + /// Operation Id + /// Project_List + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _projectRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _projectRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ProjectResource(Client, ProjectData.DeserializeProjectData(e)), _projectClientDiagnostics, Pipeline, "ProjectCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName} + /// + /// + /// Operation Id + /// Project_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Project. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string projectName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + using var scope = _projectClientDiagnostics.CreateScope("ProjectCollection.Exists"); + scope.Start(); + try + { + var response = await _projectRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, projectName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName} + /// + /// + /// Operation Id + /// Project_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Project. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string projectName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + using var scope = _projectClientDiagnostics.CreateScope("ProjectCollection.Exists"); + scope.Start(); + try + { + var response = _projectRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, projectName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName} + /// + /// + /// Operation Id + /// Project_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Project. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string projectName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + using var scope = _projectClientDiagnostics.CreateScope("ProjectCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _projectRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, projectName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ProjectResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName} + /// + /// + /// Operation Id + /// Project_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Project. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string projectName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + using var scope = _projectClientDiagnostics.CreateScope("ProjectCollection.GetIfExists"); + scope.Start(); + try + { + var response = _projectRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, projectName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ProjectResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/ProjectData.Serialization.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/ProjectData.Serialization.cs new file mode 100644 index 000000000000..92c23ce3d306 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/ProjectData.Serialization.cs @@ -0,0 +1,155 @@ +// 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.Models; +using Azure.ResourceManager.NeonPostgres.Models; + +namespace Azure.ResourceManager.NeonPostgres +{ + public partial class ProjectData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProjectData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + ProjectData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProjectData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeProjectData(document.RootElement, options); + } + + internal static ProjectData DeserializeProjectData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ProjectProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = ProjectProperties.DeserializeProjectProperties(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ProjectData( + id, + name, + type, + systemData, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ProjectData)} does not support writing '{options.Format}' format."); + } + } + + ProjectData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeProjectData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ProjectData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/ProjectData.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/ProjectData.cs new file mode 100644 index 000000000000..eaefd7e47597 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/ProjectData.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.NeonPostgres.Models; + +namespace Azure.ResourceManager.NeonPostgres +{ + /// + /// A class representing the Project data model. + /// The Project resource type. + /// + public partial class ProjectData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ProjectData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal ProjectData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ProjectProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public ProjectProperties Properties { get; set; } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/ProjectResource.Serialization.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/ProjectResource.Serialization.cs new file mode 100644 index 000000000000..4e45bb94f0ef --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/ProjectResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.NeonPostgres +{ + public partial class ProjectResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + ProjectData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + ProjectData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/ProjectResource.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/ProjectResource.cs new file mode 100644 index 000000000000..6c0f6085231d --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/ProjectResource.cs @@ -0,0 +1,505 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.NeonPostgres.Models; + +namespace Azure.ResourceManager.NeonPostgres +{ + /// + /// A Class representing a Project along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetProjectResource method. + /// Otherwise you can get one from its parent resource using the GetProject method. + /// + public partial class ProjectResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The organizationName. + /// The projectName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string organizationName, string projectName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _projectClientDiagnostics; + private readonly ProjectsRestOperations _projectRestClient; + private readonly ProjectData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Neon.Postgres/organizations/projects"; + + /// Initializes a new instance of the class for mocking. + protected ProjectResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal ProjectResource(ArmClient client, ProjectData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal ProjectResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _projectClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.NeonPostgres", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string projectApiVersion); + _projectRestClient = new ProjectsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, projectApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual ProjectData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// Gets a collection of BranchResources in the Project. + /// An object representing collection of BranchResources and their operations over a BranchResource. + public virtual BranchCollection GetBranches() + { + return GetCachedClient(client => new BranchCollection(client, Id)); + } + + /// + /// Get a Branch + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName} + /// + /// + /// Operation Id + /// Branch_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Branch. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetBranchAsync(string branchName, CancellationToken cancellationToken = default) + { + return await GetBranches().GetAsync(branchName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a Branch + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName} + /// + /// + /// Operation Id + /// Branch_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Branch. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetBranch(string branchName, CancellationToken cancellationToken = default) + { + return GetBranches().Get(branchName, cancellationToken); + } + + /// + /// Get a Project + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName} + /// + /// + /// Operation Id + /// Project_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _projectClientDiagnostics.CreateScope("ProjectResource.Get"); + scope.Start(); + try + { + var response = await _projectRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ProjectResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a Project + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName} + /// + /// + /// Operation Id + /// Project_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _projectClientDiagnostics.CreateScope("ProjectResource.Get"); + scope.Start(); + try + { + var response = _projectRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ProjectResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a Project + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName} + /// + /// + /// Operation Id + /// Project_Delete + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _projectClientDiagnostics.CreateScope("ProjectResource.Delete"); + scope.Start(); + try + { + var response = await _projectRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var uri = _projectRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new NeonPostgresArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a Project + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName} + /// + /// + /// Operation Id + /// Project_Delete + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _projectClientDiagnostics.CreateScope("ProjectResource.Delete"); + scope.Start(); + try + { + var response = _projectRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var uri = _projectRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new NeonPostgresArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a Project + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName} + /// + /// + /// Operation Id + /// Project_Update + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, ProjectData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _projectClientDiagnostics.CreateScope("ProjectResource.Update"); + scope.Start(); + try + { + var response = await _projectRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new NeonPostgresArmOperation(new ProjectOperationSource(Client), _projectClientDiagnostics, Pipeline, _projectRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a Project + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName} + /// + /// + /// Operation Id + /// Project_Update + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, ProjectData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _projectClientDiagnostics.CreateScope("ProjectResource.Update"); + scope.Start(); + try + { + var response = _projectRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new NeonPostgresArmOperation(new ProjectOperationSource(Client), _projectClientDiagnostics, Pipeline, _projectRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Action to retrieve the connection URI for the Neon Database. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/getConnectionUri + /// + /// + /// Operation Id + /// Projects_GetConnectionUri + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Additional parameters for retrieving the database connection URI. + /// The cancellation token to use. + /// is null. + public virtual async Task> GetConnectionUriAsync(ConnectionUriProperties connectionUriParameters, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(connectionUriParameters, nameof(connectionUriParameters)); + + using var scope = _projectClientDiagnostics.CreateScope("ProjectResource.GetConnectionUri"); + scope.Start(); + try + { + var response = await _projectRestClient.GetConnectionUriAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, connectionUriParameters, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Action to retrieve the connection URI for the Neon Database. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/getConnectionUri + /// + /// + /// Operation Id + /// Projects_GetConnectionUri + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Additional parameters for retrieving the database connection URI. + /// The cancellation token to use. + /// is null. + public virtual Response GetConnectionUri(ConnectionUriProperties connectionUriParameters, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(connectionUriParameters, nameof(connectionUriParameters)); + + using var scope = _projectClientDiagnostics.CreateScope("ProjectResource.GetConnectionUri"); + scope.Start(); + try + { + var response = _projectRestClient.GetConnectionUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, connectionUriParameters, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/RestOperations/BranchesRestOperations.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/RestOperations/BranchesRestOperations.cs new file mode 100644 index 000000000000..8137b0dd41c9 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/RestOperations/BranchesRestOperations.cs @@ -0,0 +1,657 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.NeonPostgres.Models; + +namespace Azure.ResourceManager.NeonPostgres +{ + internal partial class BranchesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of BranchesRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public BranchesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-03-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a Branch. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + BranchData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = BranchData.DeserializeBranchData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((BranchData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a Branch. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + BranchData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = BranchData.DeserializeBranchData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((BranchData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, BranchData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, BranchData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create a Branch. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// Resource create parameters. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, BranchData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create a Branch. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// Resource create parameters. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, BranchData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, BranchData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, BranchData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Update a Branch. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The resource properties to be updated. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, BranchData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Update a Branch. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The resource properties to be updated. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, BranchData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a Branch. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete a Branch. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string organizationName, string projectName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string organizationName, string projectName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List Branch resources by Project. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string organizationName, string projectName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, organizationName, projectName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + BranchListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = BranchListResult.DeserializeBranchListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Branch resources by Project. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string organizationName, string projectName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, organizationName, projectName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + BranchListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = BranchListResult.DeserializeBranchListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string organizationName, string projectName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string organizationName, string projectName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List Branch resources by Project. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string organizationName, string projectName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, organizationName, projectName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + BranchListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = BranchListResult.DeserializeBranchListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Branch resources by Project. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string organizationName, string projectName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, organizationName, projectName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + BranchListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = BranchListResult.DeserializeBranchListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/RestOperations/ComputesRestOperations.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/RestOperations/ComputesRestOperations.cs new file mode 100644 index 000000000000..9eb97c7a32e8 --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/RestOperations/ComputesRestOperations.cs @@ -0,0 +1,701 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.NeonPostgres.Models; + +namespace Azure.ResourceManager.NeonPostgres +{ + internal partial class ComputesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ComputesRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public ComputesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-03-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string computeName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/computes/", false); + uri.AppendPath(computeName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string computeName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/computes/", false); + uri.AppendPath(computeName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a Compute. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The name of the Compute. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string computeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + Argument.AssertNotNullOrEmpty(computeName, nameof(computeName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName, computeName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ComputeData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ComputeData.DeserializeComputeData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ComputeData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a Compute. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The name of the Compute. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string computeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + Argument.AssertNotNullOrEmpty(computeName, nameof(computeName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName, computeName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ComputeData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ComputeData.DeserializeComputeData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ComputeData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string computeName, ComputeData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/computes/", false); + uri.AppendPath(computeName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string computeName, ComputeData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/computes/", false); + uri.AppendPath(computeName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create a Compute. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The name of the Compute. + /// Resource create parameters. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string computeName, ComputeData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + Argument.AssertNotNullOrEmpty(computeName, nameof(computeName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName, computeName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create a Compute. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The name of the Compute. + /// Resource create parameters. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string computeName, ComputeData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + Argument.AssertNotNullOrEmpty(computeName, nameof(computeName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName, computeName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string computeName, ComputeData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/computes/", false); + uri.AppendPath(computeName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string computeName, ComputeData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/computes/", false); + uri.AppendPath(computeName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Update a Compute. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The name of the Compute. + /// The resource properties to be updated. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string computeName, ComputeData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + Argument.AssertNotNullOrEmpty(computeName, nameof(computeName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName, computeName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Update a Compute. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The name of the Compute. + /// The resource properties to be updated. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string computeName, ComputeData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + Argument.AssertNotNullOrEmpty(computeName, nameof(computeName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName, computeName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string computeName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/computes/", false); + uri.AppendPath(computeName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string computeName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/computes/", false); + uri.AppendPath(computeName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a Compute. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The name of the Compute. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string computeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + Argument.AssertNotNullOrEmpty(computeName, nameof(computeName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName, computeName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete a Compute. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The name of the Compute. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string computeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + Argument.AssertNotNullOrEmpty(computeName, nameof(computeName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName, computeName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/computes", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/computes", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List Compute resources by Branch. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ComputeListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ComputeListResult.DeserializeComputeListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Compute resources by Branch. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ComputeListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ComputeListResult.DeserializeComputeListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List Compute resources by Branch. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, organizationName, projectName, branchName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ComputeListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ComputeListResult.DeserializeComputeListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Compute resources by Branch. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, organizationName, projectName, branchName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ComputeListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ComputeListResult.DeserializeComputeListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/RestOperations/EndpointsRestOperations.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/RestOperations/EndpointsRestOperations.cs new file mode 100644 index 000000000000..fd46a6bfa0aa --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/RestOperations/EndpointsRestOperations.cs @@ -0,0 +1,701 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.NeonPostgres.Models; + +namespace Azure.ResourceManager.NeonPostgres +{ + internal partial class EndpointsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of EndpointsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public EndpointsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-03-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string endpointName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/endpoints/", false); + uri.AppendPath(endpointName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string endpointName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/endpoints/", false); + uri.AppendPath(endpointName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a Endpoint. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The name of the Endpoint. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string endpointName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName, endpointName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + EndpointData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = EndpointData.DeserializeEndpointData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((EndpointData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a Endpoint. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The name of the Endpoint. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string endpointName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName, endpointName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + EndpointData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = EndpointData.DeserializeEndpointData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((EndpointData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string endpointName, EndpointData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/endpoints/", false); + uri.AppendPath(endpointName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string endpointName, EndpointData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/endpoints/", false); + uri.AppendPath(endpointName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create a Endpoint. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The name of the Endpoint. + /// Resource create parameters. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string endpointName, EndpointData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName, endpointName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create a Endpoint. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The name of the Endpoint. + /// Resource create parameters. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string endpointName, EndpointData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName, endpointName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string endpointName, EndpointData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/endpoints/", false); + uri.AppendPath(endpointName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string endpointName, EndpointData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/endpoints/", false); + uri.AppendPath(endpointName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Update a Endpoint. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The name of the Endpoint. + /// The resource properties to be updated. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string endpointName, EndpointData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName, endpointName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Update a Endpoint. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The name of the Endpoint. + /// The resource properties to be updated. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string endpointName, EndpointData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName, endpointName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string endpointName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/endpoints/", false); + uri.AppendPath(endpointName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string endpointName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/endpoints/", false); + uri.AppendPath(endpointName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a Endpoint. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The name of the Endpoint. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string endpointName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName, endpointName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete a Endpoint. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The name of the Endpoint. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string endpointName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName, endpointName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/endpoints", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/endpoints", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List Endpoint resources by Branch. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + EndpointListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = EndpointListResult.DeserializeEndpointListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Endpoint resources by Branch. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + EndpointListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = EndpointListResult.DeserializeEndpointListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List Endpoint resources by Branch. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, organizationName, projectName, branchName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + EndpointListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = EndpointListResult.DeserializeEndpointListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Endpoint resources by Branch. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, organizationName, projectName, branchName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + EndpointListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = EndpointListResult.DeserializeEndpointListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/RestOperations/NeonDatabasesRestOperations.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/RestOperations/NeonDatabasesRestOperations.cs new file mode 100644 index 000000000000..42c8d8e8fdfa --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/RestOperations/NeonDatabasesRestOperations.cs @@ -0,0 +1,701 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.NeonPostgres.Models; + +namespace Azure.ResourceManager.NeonPostgres +{ + internal partial class NeonDatabasesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of NeonDatabasesRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public NeonDatabasesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-03-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string neonDatabaseName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/neonDatabases/", false); + uri.AppendPath(neonDatabaseName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string neonDatabaseName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/neonDatabases/", false); + uri.AppendPath(neonDatabaseName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a NeonDatabase. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The name of the NeonDatabase. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string neonDatabaseName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + Argument.AssertNotNullOrEmpty(neonDatabaseName, nameof(neonDatabaseName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName, neonDatabaseName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + NeonDatabaseData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = NeonDatabaseData.DeserializeNeonDatabaseData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((NeonDatabaseData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a NeonDatabase. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The name of the NeonDatabase. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string neonDatabaseName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + Argument.AssertNotNullOrEmpty(neonDatabaseName, nameof(neonDatabaseName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName, neonDatabaseName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + NeonDatabaseData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = NeonDatabaseData.DeserializeNeonDatabaseData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((NeonDatabaseData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string neonDatabaseName, NeonDatabaseData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/neonDatabases/", false); + uri.AppendPath(neonDatabaseName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string neonDatabaseName, NeonDatabaseData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/neonDatabases/", false); + uri.AppendPath(neonDatabaseName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create a NeonDatabase. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The name of the NeonDatabase. + /// Resource create parameters. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string neonDatabaseName, NeonDatabaseData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + Argument.AssertNotNullOrEmpty(neonDatabaseName, nameof(neonDatabaseName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName, neonDatabaseName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create a NeonDatabase. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The name of the NeonDatabase. + /// Resource create parameters. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string neonDatabaseName, NeonDatabaseData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + Argument.AssertNotNullOrEmpty(neonDatabaseName, nameof(neonDatabaseName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName, neonDatabaseName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string neonDatabaseName, NeonDatabaseData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/neonDatabases/", false); + uri.AppendPath(neonDatabaseName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string neonDatabaseName, NeonDatabaseData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/neonDatabases/", false); + uri.AppendPath(neonDatabaseName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Update a NeonDatabase. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The name of the NeonDatabase. + /// The resource properties to be updated. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string neonDatabaseName, NeonDatabaseData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + Argument.AssertNotNullOrEmpty(neonDatabaseName, nameof(neonDatabaseName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName, neonDatabaseName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Update a NeonDatabase. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The name of the NeonDatabase. + /// The resource properties to be updated. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string neonDatabaseName, NeonDatabaseData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + Argument.AssertNotNullOrEmpty(neonDatabaseName, nameof(neonDatabaseName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName, neonDatabaseName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string neonDatabaseName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/neonDatabases/", false); + uri.AppendPath(neonDatabaseName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string neonDatabaseName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/neonDatabases/", false); + uri.AppendPath(neonDatabaseName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a NeonDatabase. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The name of the NeonDatabase. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string neonDatabaseName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + Argument.AssertNotNullOrEmpty(neonDatabaseName, nameof(neonDatabaseName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName, neonDatabaseName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete a NeonDatabase. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The name of the NeonDatabase. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string neonDatabaseName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + Argument.AssertNotNullOrEmpty(neonDatabaseName, nameof(neonDatabaseName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName, neonDatabaseName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/neonDatabases", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/neonDatabases", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List NeonDatabase resources by Branch. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + NeonDatabaseListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = NeonDatabaseListResult.DeserializeNeonDatabaseListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List NeonDatabase resources by Branch. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + NeonDatabaseListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = NeonDatabaseListResult.DeserializeNeonDatabaseListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List NeonDatabase resources by Branch. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, organizationName, projectName, branchName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + NeonDatabaseListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = NeonDatabaseListResult.DeserializeNeonDatabaseListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List NeonDatabase resources by Branch. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, organizationName, projectName, branchName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + NeonDatabaseListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = NeonDatabaseListResult.DeserializeNeonDatabaseListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/RestOperations/NeonRolesRestOperations.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/RestOperations/NeonRolesRestOperations.cs new file mode 100644 index 000000000000..c0db69d7c50f --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/RestOperations/NeonRolesRestOperations.cs @@ -0,0 +1,701 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.NeonPostgres.Models; + +namespace Azure.ResourceManager.NeonPostgres +{ + internal partial class NeonRolesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of NeonRolesRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public NeonRolesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-03-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string neonRoleName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/neonRoles/", false); + uri.AppendPath(neonRoleName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string neonRoleName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/neonRoles/", false); + uri.AppendPath(neonRoleName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a NeonRole. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The name of the NeonRole. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string neonRoleName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + Argument.AssertNotNullOrEmpty(neonRoleName, nameof(neonRoleName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName, neonRoleName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + NeonRoleData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = NeonRoleData.DeserializeNeonRoleData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((NeonRoleData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a NeonRole. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The name of the NeonRole. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string neonRoleName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + Argument.AssertNotNullOrEmpty(neonRoleName, nameof(neonRoleName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName, neonRoleName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + NeonRoleData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = NeonRoleData.DeserializeNeonRoleData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((NeonRoleData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string neonRoleName, NeonRoleData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/neonRoles/", false); + uri.AppendPath(neonRoleName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string neonRoleName, NeonRoleData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/neonRoles/", false); + uri.AppendPath(neonRoleName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create a NeonRole. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The name of the NeonRole. + /// Resource create parameters. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string neonRoleName, NeonRoleData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + Argument.AssertNotNullOrEmpty(neonRoleName, nameof(neonRoleName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName, neonRoleName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create a NeonRole. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The name of the NeonRole. + /// Resource create parameters. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string neonRoleName, NeonRoleData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + Argument.AssertNotNullOrEmpty(neonRoleName, nameof(neonRoleName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName, neonRoleName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string neonRoleName, NeonRoleData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/neonRoles/", false); + uri.AppendPath(neonRoleName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string neonRoleName, NeonRoleData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/neonRoles/", false); + uri.AppendPath(neonRoleName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Update a NeonRole. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The name of the NeonRole. + /// The resource properties to be updated. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string neonRoleName, NeonRoleData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + Argument.AssertNotNullOrEmpty(neonRoleName, nameof(neonRoleName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName, neonRoleName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Update a NeonRole. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The name of the NeonRole. + /// The resource properties to be updated. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string neonRoleName, NeonRoleData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + Argument.AssertNotNullOrEmpty(neonRoleName, nameof(neonRoleName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName, neonRoleName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string neonRoleName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/neonRoles/", false); + uri.AppendPath(neonRoleName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string neonRoleName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/neonRoles/", false); + uri.AppendPath(neonRoleName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a NeonRole. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The name of the NeonRole. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string neonRoleName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + Argument.AssertNotNullOrEmpty(neonRoleName, nameof(neonRoleName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName, neonRoleName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete a NeonRole. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The name of the NeonRole. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, string neonRoleName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + Argument.AssertNotNullOrEmpty(neonRoleName, nameof(neonRoleName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName, neonRoleName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/neonRoles", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/branches/", false); + uri.AppendPath(branchName, true); + uri.AppendPath("/neonRoles", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List NeonRole resources by Branch. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + NeonRoleListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = NeonRoleListResult.DeserializeNeonRoleListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List NeonRole resources by Branch. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, organizationName, projectName, branchName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + NeonRoleListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = NeonRoleListResult.DeserializeNeonRoleListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List NeonRole resources by Branch. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, organizationName, projectName, branchName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + NeonRoleListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = NeonRoleListResult.DeserializeNeonRoleListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List NeonRole resources by Branch. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The name of the Branch. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string organizationName, string projectName, string branchName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNullOrEmpty(branchName, nameof(branchName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, organizationName, projectName, branchName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + NeonRoleListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = NeonRoleListResult.DeserializeNeonRoleListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/RestOperations/OrganizationsRestOperations.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/RestOperations/OrganizationsRestOperations.cs index e528c86be1c8..c63d449c2906 100644 --- a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/RestOperations/OrganizationsRestOperations.cs +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/RestOperations/OrganizationsRestOperations.cs @@ -32,7 +32,7 @@ public OrganizationsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-08-01-preview"; + _apiVersion = apiVersion ?? "2025-03-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -564,6 +564,101 @@ public Response ListBySubscription(string subscr } } + internal RequestUriBuilder CreateGetPostgresVersionsRequestUri(string subscriptionId, string resourceGroupName, PgVersion pgVersion) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/getPostgresVersions", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetPostgresVersionsRequest(string subscriptionId, string resourceGroupName, PgVersion pgVersion) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/getPostgresVersions", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + if (pgVersion != null) + { + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(pgVersion, ModelSerializationExtensions.WireOptions); + request.Content = content; + } + _userAgent.Apply(message); + return message; + } + + /// Action to retrieve the PostgreSQL versions. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Post Action to retrieve the PostgreSQL versions. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> GetPostgresVersionsAsync(string subscriptionId, string resourceGroupName, PgVersion pgVersion = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateGetPostgresVersionsRequest(subscriptionId, resourceGroupName, pgVersion); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PgVersionsResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = PgVersionsResult.DeserializePgVersionsResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Action to retrieve the PostgreSQL versions. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Post Action to retrieve the PostgreSQL versions. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response GetPostgresVersions(string subscriptionId, string resourceGroupName, PgVersion pgVersion = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateGetPostgresVersionsRequest(subscriptionId, resourceGroupName, pgVersion); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PgVersionsResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = PgVersionsResult.DeserializePgVersionsResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateListByResourceGroupNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName) { var uri = new RawRequestUriBuilder(); diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/RestOperations/ProjectsRestOperations.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/RestOperations/ProjectsRestOperations.cs new file mode 100644 index 000000000000..efb9ed1700bb --- /dev/null +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/RestOperations/ProjectsRestOperations.cs @@ -0,0 +1,723 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.NeonPostgres.Models; + +namespace Azure.ResourceManager.NeonPostgres +{ + internal partial class ProjectsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ProjectsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public ProjectsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-03-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string organizationName, string projectName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string organizationName, string projectName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a Project. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string organizationName, string projectName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, organizationName, projectName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ProjectData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ProjectData.DeserializeProjectData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ProjectData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a Project. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string organizationName, string projectName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, organizationName, projectName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ProjectData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ProjectData.DeserializeProjectData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ProjectData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string organizationName, string projectName, ProjectData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string organizationName, string projectName, ProjectData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create a Project. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// Resource create parameters. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string organizationName, string projectName, ProjectData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, organizationName, projectName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create a Project. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// Resource create parameters. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string organizationName, string projectName, ProjectData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, organizationName, projectName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string organizationName, string projectName, ProjectData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string organizationName, string projectName, ProjectData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Update a Project. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The resource properties to be updated. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string organizationName, string projectName, ProjectData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, organizationName, projectName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Update a Project. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The resource properties to be updated. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string organizationName, string projectName, ProjectData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, organizationName, projectName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string organizationName, string projectName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string organizationName, string projectName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a Project. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string organizationName, string projectName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, organizationName, projectName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete a Project. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string organizationName, string projectName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, organizationName, projectName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string organizationName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string organizationName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List Project resources by OrganizationResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string organizationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, organizationName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ProjectListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ProjectListResult.DeserializeProjectListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Project resources by OrganizationResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string organizationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, organizationName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ProjectListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ProjectListResult.DeserializeProjectListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetConnectionUriRequestUri(string subscriptionId, string resourceGroupName, string organizationName, string projectName, ConnectionUriProperties connectionUriParameters) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/getConnectionUri", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetConnectionUriRequest(string subscriptionId, string resourceGroupName, string organizationName, string projectName, ConnectionUriProperties connectionUriParameters) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Neon.Postgres/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/projects/", false); + uri.AppendPath(projectName, true); + uri.AppendPath("/getConnectionUri", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(connectionUriParameters, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Action to retrieve the connection URI for the Neon Database. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// Additional parameters for retrieving the database connection URI. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetConnectionUriAsync(string subscriptionId, string resourceGroupName, string organizationName, string projectName, ConnectionUriProperties connectionUriParameters, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(connectionUriParameters, nameof(connectionUriParameters)); + + using var message = CreateGetConnectionUriRequest(subscriptionId, resourceGroupName, organizationName, projectName, connectionUriParameters); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ConnectionUriProperties value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ConnectionUriProperties.DeserializeConnectionUriProperties(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Action to retrieve the connection URI for the Neon Database. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The name of the Project. + /// Additional parameters for retrieving the database connection URI. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetConnectionUri(string subscriptionId, string resourceGroupName, string organizationName, string projectName, ConnectionUriProperties connectionUriParameters, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); + Argument.AssertNotNull(connectionUriParameters, nameof(connectionUriParameters)); + + using var message = CreateGetConnectionUriRequest(subscriptionId, resourceGroupName, organizationName, projectName, connectionUriParameters); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ConnectionUriProperties value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ConnectionUriProperties.DeserializeConnectionUriProperties(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string organizationName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string organizationName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List Project resources by OrganizationResource. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string organizationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, organizationName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ProjectListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ProjectListResult.DeserializeProjectListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Project resources by OrganizationResource. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Neon Organizations resource. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string organizationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, organizationName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ProjectListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ProjectListResult.DeserializeProjectListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/tsp-location.yaml b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/tsp-location.yaml index 4216dd4fa9fb..9189616bb927 100644 --- a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/tsp-location.yaml +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/tsp-location.yaml @@ -1,3 +1,4 @@ directory: specification/liftrneon/Neon.Postgres.Management -commit: 462574dbd02088c209bb1da3eef0d93f699e8de2 +commit: 1a8dcbc31c561409f253e5f7a924ff577b583da7 repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/Azure.ResourceManager.OracleDatabase.sln b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/Azure.ResourceManager.OracleDatabase.sln new file mode 100644 index 000000000000..ba8ba4c4195b --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/Azure.ResourceManager.OracleDatabase.sln @@ -0,0 +1,56 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29709.97 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.ResourceManager.OracleDatabase.Samples", "samples\Azure.ResourceManager.OracleDatabase.Samples.csproj", "{7A2DFF15-5746-49F4-BD0F-C6C35337088A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.ResourceManager.OracleDatabase", "src\Azure.ResourceManager.OracleDatabase.csproj", "{28FF4005-4467-4E36-92E7-DEA27DEB1519}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.ResourceManager.OracleDatabase.Tests", "tests\Azure.ResourceManager.OracleDatabase.Tests.csproj", "{1F1CD1D4-9932-4B73-99D8-C252A67D4B46}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.Build.0 = Release|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.Build.0 = Release|Any CPU + {7A2DFF15-5746-49F4-BD0F-C6C35337088A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7A2DFF15-5746-49F4-BD0F-C6C35337088A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7A2DFF15-5746-49F4-BD0F-C6C35337088A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7A2DFF15-5746-49F4-BD0F-C6C35337088A}.Release|Any CPU.Build.0 = Release|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Release|Any CPU.Build.0 = Release|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Release|Any CPU.Build.0 = Release|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Release|Any CPU.Build.0 = Release|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Debug|Any CPU.Build.0 = Debug|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Release|Any CPU.ActiveCfg = Release|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Release|Any CPU.Build.0 = Release|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {A97F4B90-2591-4689-B1F8-5F21FE6D6CAE} + EndGlobalSection +EndGlobal diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/CHANGELOG.md b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/CHANGELOG.md new file mode 100644 index 000000000000..8b33f0fedccc --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/CHANGELOG.md @@ -0,0 +1,11 @@ +# Release History + +## 1.0.0-beta.1 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes \ No newline at end of file diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/Directory.Build.props b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/Directory.Build.props new file mode 100644 index 000000000000..63bd836ad44b --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/Directory.Build.props @@ -0,0 +1,6 @@ + + + + diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/README.md b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/README.md new file mode 100644 index 000000000000..077b1ffb6056 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/README.md @@ -0,0 +1,80 @@ +# Microsoft Azure OracleDatabase management client library for .NET + +**[Describe the service briefly first.]** + +This library follows the [new Azure SDK guidelines](https://azure.github.io/azure-sdk/general_introduction.html), and provides many core capabilities: + + - Support MSAL.NET, Azure.Identity is out of box for supporting MSAL.NET. + - Support [OpenTelemetry](https://opentelemetry.io/) for distributed tracing. + - HTTP pipeline with custom policies. + - Better error-handling. + - Support uniform telemetry across all languages. + +## Getting started + +### Install the package + +Install the Microsoft Azure OracleDatabase management library for .NET with [NuGet](https://www.nuget.org/): + +```dotnetcli +dotnet add package Azure.ResourceManager.OracleDatabase --prerelease +``` + +### Prerequisites + +* You must have an [Microsoft Azure subscription](https://azure.microsoft.com/free/dotnet/). + +### Authenticate the Client + +To create an authenticated client and start interacting with Microsoft Azure resources, see the [quickstart guide here](https://github.com/Azure/azure-sdk-for-net/blob/main/doc/dev/mgmt_quickstart.md). + +## Key concepts + +Key concepts of the Microsoft Azure SDK for .NET can be found [here](https://azure.github.io/azure-sdk/dotnet_introduction.html) + +## Documentation + +Documentation is available to help you learn how to use this package: + +- [Quickstart](https://github.com/Azure/azure-sdk-for-net/blob/main/doc/dev/mgmt_quickstart.md). +- [API References](https://learn.microsoft.com/dotnet/api/?view=azure-dotnet). +- [Authentication](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/README.md). + +## Examples + +Code samples for using the management library for .NET can be found in the following locations +- [.NET Management Library Code Samples](https://aka.ms/azuresdk-net-mgmt-samples) + +## Troubleshooting + +- File an issue via [GitHub Issues](https://github.com/Azure/azure-sdk-for-net/issues). +- Check [previous questions](https://stackoverflow.com/questions/tagged/azure+.net) or ask new ones on Stack Overflow using Azure and .NET tags. + +## Next steps + +For more information about Microsoft Azure SDK, see [this website](https://azure.github.io/azure-sdk/). + +## Contributing + +For details on contributing to this repository, see the [contributing +guide][cg]. + +This project welcomes contributions and suggestions. Most contributions +require you to agree to a Contributor License Agreement (CLA) declaring +that you have the right to, and actually do, grant us the rights to use +your contribution. For details, visit . + +When you submit a pull request, a CLA-bot will automatically determine +whether you need to provide a CLA and decorate the PR appropriately +(for example, label, comment). Follow the instructions provided by the +bot. You'll only need to do this action once across all repositories +using our CLA. + +This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For +more information, see the [Code of Conduct FAQ][coc_faq] or contact + with any other questions or comments. + + +[cg]: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/resourcemanager/Azure.ResourceManager/docs/CONTRIBUTING.md +[coc]: https://opensource.microsoft.com/codeofconduct/ +[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ \ No newline at end of file diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/assets.json b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/assets.json new file mode 100644 index 000000000000..fba18acd24f2 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/assets.json @@ -0,0 +1,7 @@ + +{ + "AssetsRepo": "Azure/azure-sdk-assets", + "AssetsRepoPrefixPath": "net", + "TagPrefix": "net/oracledatabase/Azure.ResourceManager.OracleDatabase", + "Tag": "" +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/samples/Azure.ResourceManager.OracleDatabase.Samples.csproj b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/samples/Azure.ResourceManager.OracleDatabase.Samples.csproj new file mode 100644 index 000000000000..209dab0f893e --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/samples/Azure.ResourceManager.OracleDatabase.Samples.csproj @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDatabaseBackupResource.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDatabaseBackupResource.cs new file mode 100644 index 000000000000..5bedef33fe95 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDatabaseBackupResource.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.ResourceManager.OracleDatabase.Samples +{ + public partial class Sample_AutonomousDatabaseBackupResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_AutonomousDatabaseBackupsUpdate() + { + // Generated from example definition: 2025-03-01/autonomousDatabaseBackup_patch.json + // this example is just showing the usage of "AutonomousDatabaseBackup_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AutonomousDatabaseBackupResource created on azure + // for more information of creating AutonomousDatabaseBackupResource, please refer to the document of AutonomousDatabaseBackupResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg000"; + string autonomousdatabasename = "databasedb1"; + string adbbackupid = "1711644130"; + ResourceIdentifier autonomousDatabaseBackupResourceId = AutonomousDatabaseBackupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, autonomousdatabasename, adbbackupid); + AutonomousDatabaseBackupResource autonomousDatabaseBackup = client.GetAutonomousDatabaseBackupResource(autonomousDatabaseBackupResourceId); + + // invoke the operation + AutonomousDatabaseBackupData data = new AutonomousDatabaseBackupData(); + ArmOperation lro = await autonomousDatabaseBackup.UpdateAsync(WaitUntil.Completed, data); + AutonomousDatabaseBackupResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AutonomousDatabaseBackupData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDatabaseResource.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDatabaseResource.cs new file mode 100644 index 000000000000..7403501f0ba0 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDatabaseResource.cs @@ -0,0 +1,188 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.OracleDatabase.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.OracleDatabase.Samples +{ + public partial class Sample_AutonomousDatabaseResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Switchover_AutonomousDatabasesSwitchover() + { + // Generated from example definition: 2025-03-01/autonomousDatabase_switchover.json + // this example is just showing the usage of "AutonomousDatabases_Switchover" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AutonomousDatabaseResource created on azure + // for more information of creating AutonomousDatabaseResource, please refer to the document of AutonomousDatabaseResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg000"; + string autonomousdatabasename = "databasedb1"; + ResourceIdentifier autonomousDatabaseResourceId = AutonomousDatabaseResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, autonomousdatabasename); + AutonomousDatabaseResource autonomousDatabase = client.GetAutonomousDatabaseResource(autonomousDatabaseResourceId); + + // invoke the operation + PeerDbDetails details = new PeerDbDetails + { + PeerDbId = "peerDbId", + }; + ArmOperation lro = await autonomousDatabase.SwitchoverAsync(WaitUntil.Completed, details); + AutonomousDatabaseResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AutonomousDatabaseData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Failover_AutonomousDatabasesFailover() + { + // Generated from example definition: 2025-03-01/autonomousDatabase_failover.json + // this example is just showing the usage of "AutonomousDatabases_Failover" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AutonomousDatabaseResource created on azure + // for more information of creating AutonomousDatabaseResource, please refer to the document of AutonomousDatabaseResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg000"; + string autonomousdatabasename = "databasedb1"; + ResourceIdentifier autonomousDatabaseResourceId = AutonomousDatabaseResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, autonomousdatabasename); + AutonomousDatabaseResource autonomousDatabase = client.GetAutonomousDatabaseResource(autonomousDatabaseResourceId); + + // invoke the operation + PeerDbDetails details = new PeerDbDetails + { + PeerDbId = "peerDbId", + }; + ArmOperation lro = await autonomousDatabase.FailoverAsync(WaitUntil.Completed, details); + AutonomousDatabaseResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AutonomousDatabaseData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GenerateWallet_AutonomousDatabasesGenerateWallet() + { + // Generated from example definition: 2025-03-01/autonomousDatabase_generateWallet.json + // this example is just showing the usage of "AutonomousDatabases_GenerateWallet" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AutonomousDatabaseResource created on azure + // for more information of creating AutonomousDatabaseResource, please refer to the document of AutonomousDatabaseResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg000"; + string autonomousdatabasename = "databasedb1"; + ResourceIdentifier autonomousDatabaseResourceId = AutonomousDatabaseResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, autonomousdatabasename); + AutonomousDatabaseResource autonomousDatabase = client.GetAutonomousDatabaseResource(autonomousDatabaseResourceId); + + // invoke the operation + GenerateAutonomousDatabaseWalletDetails details = new GenerateAutonomousDatabaseWalletDetails("********") + { + GenerateType = GenerateType.Single, + IsRegional = false, + }; + AutonomousDatabaseWalletFile result = await autonomousDatabase.GenerateWalletAsync(details); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Restore_AutonomousDatabasesRestore() + { + // Generated from example definition: 2025-03-01/autonomousDatabase_restore.json + // this example is just showing the usage of "AutonomousDatabases_Restore" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AutonomousDatabaseResource created on azure + // for more information of creating AutonomousDatabaseResource, please refer to the document of AutonomousDatabaseResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg000"; + string autonomousdatabasename = "databasedb1"; + ResourceIdentifier autonomousDatabaseResourceId = AutonomousDatabaseResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, autonomousdatabasename); + AutonomousDatabaseResource autonomousDatabase = client.GetAutonomousDatabaseResource(autonomousDatabaseResourceId); + + // invoke the operation + RestoreAutonomousDatabaseDetails details = new RestoreAutonomousDatabaseDetails(DateTimeOffset.Parse("2024-04-23T00:00:00.000Z")); + ArmOperation lro = await autonomousDatabase.RestoreAsync(WaitUntil.Completed, details); + AutonomousDatabaseResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AutonomousDatabaseData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task ChangeDisasterRecoveryConfiguration_AutonomousDatabasesChangeDisasterRecoveryConfiguration() + { + // Generated from example definition: 2025-03-01/autonomousDatabase_changeDisasterRecoveryConfiguration.json + // this example is just showing the usage of "AutonomousDatabases_ChangeDisasterRecoveryConfiguration" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AutonomousDatabaseResource created on azure + // for more information of creating AutonomousDatabaseResource, please refer to the document of AutonomousDatabaseResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg000"; + string autonomousdatabasename = "databasedb1"; + ResourceIdentifier autonomousDatabaseResourceId = AutonomousDatabaseResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, autonomousdatabasename); + AutonomousDatabaseResource autonomousDatabase = client.GetAutonomousDatabaseResource(autonomousDatabaseResourceId); + + // invoke the operation + DisasterRecoveryConfigurationDetails details = new DisasterRecoveryConfigurationDetails + { + DisasterRecoveryType = DisasterRecoveryType.Adg, + IsReplicateAutomaticBackups = false, + }; + ArmOperation lro = await autonomousDatabase.ChangeDisasterRecoveryConfigurationAsync(WaitUntil.Completed, details); + AutonomousDatabaseResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AutonomousDatabaseData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_CloudExadataInfrastructureResource.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_CloudExadataInfrastructureResource.cs new file mode 100644 index 000000000000..fb1720e1c2c0 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_CloudExadataInfrastructureResource.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.ResourceManager.OracleDatabase.Samples +{ + public partial class Sample_CloudExadataInfrastructureResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task AddStorageCapacity_CloudExadataInfrastructuresAddStorageCapacity() + { + // Generated from example definition: 2025-03-01/exaInfra_addStorageCapacity.json + // this example is just showing the usage of "CloudExadataInfrastructures_AddStorageCapacity" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this CloudExadataInfrastructureResource created on azure + // for more information of creating CloudExadataInfrastructureResource, please refer to the document of CloudExadataInfrastructureResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg000"; + string cloudexadatainfrastructurename = "infra1"; + ResourceIdentifier cloudExadataInfrastructureResourceId = CloudExadataInfrastructureResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, cloudexadatainfrastructurename); + CloudExadataInfrastructureResource cloudExadataInfrastructure = client.GetCloudExadataInfrastructureResource(cloudExadataInfrastructureResourceId); + + // invoke the operation + ArmOperation lro = await cloudExadataInfrastructure.AddStorageCapacityAsync(WaitUntil.Completed); + CloudExadataInfrastructureResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + CloudExadataInfrastructureData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_CloudVmClusterResource.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_CloudVmClusterResource.cs new file mode 100644 index 000000000000..f5eaf90eeaf1 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_CloudVmClusterResource.cs @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.OracleDatabase.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.OracleDatabase.Samples +{ + public partial class Sample_CloudVmClusterResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task AddVms_CloudVmClustersAddVms() + { + // Generated from example definition: 2025-03-01/vmClusters_addVms.json + // this example is just showing the usage of "CloudVmClusters_AddVms" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this CloudVmClusterResource created on azure + // for more information of creating CloudVmClusterResource, please refer to the document of CloudVmClusterResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg000"; + string cloudvmclustername = "cluster1"; + ResourceIdentifier cloudVmClusterResourceId = CloudVmClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, cloudvmclustername); + CloudVmClusterResource cloudVmCluster = client.GetCloudVmClusterResource(cloudVmClusterResourceId); + + // invoke the operation + AddRemoveDbNode body = new AddRemoveDbNode(new string[] { "ocid1..aaaa", "ocid1..aaaaaa" }); + ArmOperation lro = await cloudVmCluster.AddVmsAsync(WaitUntil.Completed, body); + CloudVmClusterResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + CloudVmClusterData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task RemoveVms_CloudVmClustersRemoveVms() + { + // Generated from example definition: 2025-03-01/vmClusters_removeVms.json + // this example is just showing the usage of "CloudVmClusters_RemoveVms" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this CloudVmClusterResource created on azure + // for more information of creating CloudVmClusterResource, please refer to the document of CloudVmClusterResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg000"; + string cloudvmclustername = "cluster1"; + ResourceIdentifier cloudVmClusterResourceId = CloudVmClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, cloudvmclustername); + CloudVmClusterResource cloudVmCluster = client.GetCloudVmClusterResource(cloudVmClusterResourceId); + + // invoke the operation + AddRemoveDbNode body = new AddRemoveDbNode(new string[] { "ocid1..aaaa" }); + ArmOperation lro = await cloudVmCluster.RemoveVmsAsync(WaitUntil.Completed, body); + CloudVmClusterResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + CloudVmClusterData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetPrivateIPAddresses_CloudVmClustersListPrivateIpAddresses() + { + // Generated from example definition: 2025-03-01/vmClusters_listPrivateIpAddresses.json + // this example is just showing the usage of "CloudVmClusters_ListPrivateIPAddresses" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this CloudVmClusterResource created on azure + // for more information of creating CloudVmClusterResource, please refer to the document of CloudVmClusterResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg000"; + string cloudvmclustername = "cluster1"; + ResourceIdentifier cloudVmClusterResourceId = CloudVmClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, cloudvmclustername); + CloudVmClusterResource cloudVmCluster = client.GetCloudVmClusterResource(cloudVmClusterResourceId); + + // invoke the operation and iterate over the result + PrivateIPAddressesFilter body = new PrivateIPAddressesFilter("ocid1..aaaaaa", "ocid1..aaaaa"); + await foreach (PrivateIPAddressProperties item in cloudVmCluster.GetPrivateIPAddressesAsync(body)) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine("Succeeded"); + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_DbNodeResource.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_DbNodeResource.cs new file mode 100644 index 000000000000..2638a6449ccc --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_DbNodeResource.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.OracleDatabase.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.OracleDatabase.Samples +{ + public partial class Sample_DbNodeResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Action_DbNodesAction() + { + // Generated from example definition: 2025-03-01/dbNodes_action.json + // this example is just showing the usage of "DbNodes_Action" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DbNodeResource created on azure + // for more information of creating DbNodeResource, please refer to the document of DbNodeResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg000"; + string cloudvmclustername = "cluster1"; + string dbnodeocid = "ocid1....aaaaaa"; + ResourceIdentifier dbNodeResourceId = DbNodeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, cloudvmclustername, dbnodeocid); + DbNodeResource dbNode = client.GetDbNodeResource(dbNodeResourceId); + + // invoke the operation + DbNodeAction body = new DbNodeAction(DbNodeActionEnum.Start); + ArmOperation lro = await dbNode.ActionAsync(WaitUntil.Completed, body); + DbNodeResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DbNodeData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_DbSystemShapeCollection.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_DbSystemShapeCollection.cs new file mode 100644 index 000000000000..dbe42a983825 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_DbSystemShapeCollection.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.Resources; +using NUnit.Framework; + +namespace Azure.ResourceManager.OracleDatabase.Samples +{ + public partial class Sample_DbSystemShapeCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_DbSystemShapesListByLocation() + { + // Generated from example definition: 2025-03-01/dbSystemShapes_listByLocation.json + // this example is just showing the usage of "DbSystemShape_ListByLocation" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // get the collection of this DbSystemShapeResource + AzureLocation location = new AzureLocation("eastus"); + DbSystemShapeCollection collection = subscriptionResource.GetDbSystemShapes(location); + + // invoke the operation and iterate over the result + await foreach (DbSystemShapeResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DbSystemShapeData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_ExadbVmClusterResource.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_ExadbVmClusterResource.cs new file mode 100644 index 000000000000..92f60b52cd6e --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_ExadbVmClusterResource.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.OracleDatabase.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.OracleDatabase.Samples +{ + public partial class Sample_ExadbVmClusterResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task RemoveVms_ExadbVmClustersRemoveVmsMaximumSet() + { + // Generated from example definition: 2025-03-01/ExadbVmClusters_RemoveVms_MaximumSet_Gen.json + // this example is just showing the usage of "ExadbVmClusters_RemoveVms" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ExadbVmClusterResource created on azure + // for more information of creating ExadbVmClusterResource, please refer to the document of ExadbVmClusterResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rgopenapi"; + string exadbVmClusterName = "vmClusterName"; + ResourceIdentifier exadbVmClusterResourceId = ExadbVmClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, exadbVmClusterName); + ExadbVmClusterResource exadbVmCluster = client.GetExadbVmClusterResource(exadbVmClusterResourceId); + + // invoke the operation + RemoveVirtualMachineFromExadbVmClusterDetails details = new RemoveVirtualMachineFromExadbVmClusterDetails(new DbNodeDetails[] + { +new DbNodeDetails(new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Oracle.Database/exadbVmClusters/vmCluster/dbNodes/dbNodeName")) + }); + ArmOperation lro = await exadbVmCluster.RemoveVmsAsync(WaitUntil.Completed, details); + ExadbVmClusterResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ExadbVmClusterData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_ExascaleDbNodeCollection.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_ExascaleDbNodeCollection.cs new file mode 100644 index 000000000000..10cf7a95a101 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_ExascaleDbNodeCollection.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.ResourceManager.OracleDatabase.Samples +{ + public partial class Sample_ExascaleDbNodeCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_ExascaleDbNodesListByParentMaximumSet() + { + // Generated from example definition: 2025-03-01/ExascaleDbNodes_ListByParent_MaximumSet_Gen.json + // this example is just showing the usage of "ExascaleDbNode_ListByParent" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ExadbVmClusterResource created on azure + // for more information of creating ExadbVmClusterResource, please refer to the document of ExadbVmClusterResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rgopenapi"; + string exadbVmClusterName = "vmClusterName"; + ResourceIdentifier exadbVmClusterResourceId = ExadbVmClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, exadbVmClusterName); + ExadbVmClusterResource exadbVmCluster = client.GetExadbVmClusterResource(exadbVmClusterResourceId); + + // get the collection of this ExascaleDbNodeResource + ExascaleDbNodeCollection collection = exadbVmCluster.GetExascaleDbNodes(); + + // invoke the operation and iterate over the result + await foreach (ExascaleDbNodeResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ExascaleDbNodeData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_ExascaleDbNodeResource.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_ExascaleDbNodeResource.cs new file mode 100644 index 000000000000..4ffe56124708 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_ExascaleDbNodeResource.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.OracleDatabase.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.OracleDatabase.Samples +{ + public partial class Sample_ExascaleDbNodeResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Action_ExascaleDbNodesActionMaximumSet() + { + // Generated from example definition: 2025-03-01/ExascaleDbNodes_Action_MaximumSet_Gen.json + // this example is just showing the usage of "ExascaleDbNodes_Action" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ExascaleDbNodeResource created on azure + // for more information of creating ExascaleDbNodeResource, please refer to the document of ExascaleDbNodeResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rgopenapi"; + string exadbVmClusterName = "vmClusterName"; + string exascaleDbNodeName = "dbNodeName"; + ResourceIdentifier exascaleDbNodeResourceId = ExascaleDbNodeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, exadbVmClusterName, exascaleDbNodeName); + ExascaleDbNodeResource exascaleDbNode = client.GetExascaleDbNodeResource(exascaleDbNodeResourceId); + + // invoke the operation + DbNodeAction body = new DbNodeAction(DbNodeActionEnum.Start); + ArmOperation lro = await exascaleDbNode.ActionAsync(WaitUntil.Completed, body); + DbActionResponse result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_ExascaleDbStorageVaultCollection.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_ExascaleDbStorageVaultCollection.cs new file mode 100644 index 000000000000..a64a68ef1f43 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_ExascaleDbStorageVaultCollection.cs @@ -0,0 +1,206 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.OracleDatabase.Models; +using Azure.ResourceManager.Resources; +using NUnit.Framework; + +namespace Azure.ResourceManager.OracleDatabase.Samples +{ + public partial class Sample_ExascaleDbStorageVaultCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_ExascaleDbStorageVaultsCreateMaximumSet() + { + // Generated from example definition: 2025-03-01/ExascaleDbStorageVaults_Create_MaximumSet_Gen.json + // this example is just showing the usage of "ExascaleDbStorageVault_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rgopenapi"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ExascaleDbStorageVaultResource + ExascaleDbStorageVaultCollection collection = resourceGroupResource.GetExascaleDbStorageVaults(); + + // invoke the operation + string exascaleDbStorageVaultName = "vmClusterName"; + ExascaleDbStorageVaultData data = new ExascaleDbStorageVaultData(new AzureLocation("ltguhzffucaytqg")) + { + Properties = new ExascaleDbStorageVaultProperties("hbsybtelyvhpalemszcvartlhwvskrnpiveqfblvkdihoytqaotdgsgauvgivzaftfgeiwlyeqzssicwrrnlxtsmeakbcsxabjlt", new ExascaleDbStorageInputDetails(21)) + { + AdditionalFlashCacheInPercent = 0, + Description = "dmnvnnduldfmrmkkvvsdtuvmsmruxzzpsfdydgytlckutfozephjygjetrauvbdfcwmti", + TimeZone = "ltrbozwxjunncicrtzjrpqnqrcjgghohztrdlbfjrbkpenopyldwolslwgrgumjfkyovvkzcuxjujuxtjjzubvqvnhrswnbdgcbslopeofmtepbrrlymqwwszvsglmyuvlcuejshtpokirwklnwpcykhyinjmlqvxtyixlthtdishhmtipbygsayvgqzfrprgppylydlcskbmvwctxifdltippfvsxiughqbojqpqrekxsotnqsk", + }, + Zones = { "qk" }, + Tags = +{ +["key7827"] = "xqi" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, exascaleDbStorageVaultName, data); + ExascaleDbStorageVaultResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ExascaleDbStorageVaultData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_ExascaleDbStorageVaultsGetMaximumSet() + { + // Generated from example definition: 2025-03-01/ExascaleDbStorageVaults_Get_MaximumSet_Gen.json + // this example is just showing the usage of "ExascaleDbStorageVault_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rgopenapi"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ExascaleDbStorageVaultResource + ExascaleDbStorageVaultCollection collection = resourceGroupResource.GetExascaleDbStorageVaults(); + + // invoke the operation + string exascaleDbStorageVaultName = "vmClusterName"; + ExascaleDbStorageVaultResource result = await collection.GetAsync(exascaleDbStorageVaultName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ExascaleDbStorageVaultData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_ExascaleDbStorageVaultsListByResourceGroupMaximumSet() + { + // Generated from example definition: 2025-03-01/ExascaleDbStorageVaults_ListByResourceGroup_MaximumSet_Gen.json + // this example is just showing the usage of "ExascaleDbStorageVault_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rgopenapi"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ExascaleDbStorageVaultResource + ExascaleDbStorageVaultCollection collection = resourceGroupResource.GetExascaleDbStorageVaults(); + + // invoke the operation and iterate over the result + await foreach (ExascaleDbStorageVaultResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ExascaleDbStorageVaultData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_ExascaleDbStorageVaultsGetMaximumSet() + { + // Generated from example definition: 2025-03-01/ExascaleDbStorageVaults_Get_MaximumSet_Gen.json + // this example is just showing the usage of "ExascaleDbStorageVault_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rgopenapi"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ExascaleDbStorageVaultResource + ExascaleDbStorageVaultCollection collection = resourceGroupResource.GetExascaleDbStorageVaults(); + + // invoke the operation + string exascaleDbStorageVaultName = "vmClusterName"; + bool result = await collection.ExistsAsync(exascaleDbStorageVaultName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_ExascaleDbStorageVaultsGetMaximumSet() + { + // Generated from example definition: 2025-03-01/ExascaleDbStorageVaults_Get_MaximumSet_Gen.json + // this example is just showing the usage of "ExascaleDbStorageVault_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rgopenapi"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ExascaleDbStorageVaultResource + ExascaleDbStorageVaultCollection collection = resourceGroupResource.GetExascaleDbStorageVaults(); + + // invoke the operation + string exascaleDbStorageVaultName = "vmClusterName"; + NullableResponse response = await collection.GetIfExistsAsync(exascaleDbStorageVaultName); + ExascaleDbStorageVaultResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ExascaleDbStorageVaultData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_ExascaleDbStorageVaultResource.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_ExascaleDbStorageVaultResource.cs new file mode 100644 index 000000000000..c5b32761fd62 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_ExascaleDbStorageVaultResource.cs @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.OracleDatabase.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.OracleDatabase.Samples +{ + public partial class Sample_ExascaleDbStorageVaultResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_ExascaleDbStorageVaultsGetMaximumSet() + { + // Generated from example definition: 2025-03-01/ExascaleDbStorageVaults_Get_MaximumSet_Gen.json + // this example is just showing the usage of "ExascaleDbStorageVault_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ExascaleDbStorageVaultResource created on azure + // for more information of creating ExascaleDbStorageVaultResource, please refer to the document of ExascaleDbStorageVaultResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rgopenapi"; + string exascaleDbStorageVaultName = "vmClusterName"; + ResourceIdentifier exascaleDbStorageVaultResourceId = ExascaleDbStorageVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, exascaleDbStorageVaultName); + ExascaleDbStorageVaultResource exascaleDbStorageVault = client.GetExascaleDbStorageVaultResource(exascaleDbStorageVaultResourceId); + + // invoke the operation + ExascaleDbStorageVaultResource result = await exascaleDbStorageVault.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ExascaleDbStorageVaultData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_ExascaleDbStorageVaultsDeleteMaximumSet() + { + // Generated from example definition: 2025-03-01/ExascaleDbStorageVaults_Delete_MaximumSet_Gen.json + // this example is just showing the usage of "ExascaleDbStorageVault_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ExascaleDbStorageVaultResource created on azure + // for more information of creating ExascaleDbStorageVaultResource, please refer to the document of ExascaleDbStorageVaultResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rgopenapi"; + string exascaleDbStorageVaultName = "vmClusterName"; + ResourceIdentifier exascaleDbStorageVaultResourceId = ExascaleDbStorageVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, exascaleDbStorageVaultName); + ExascaleDbStorageVaultResource exascaleDbStorageVault = client.GetExascaleDbStorageVaultResource(exascaleDbStorageVaultResourceId); + + // invoke the operation + await exascaleDbStorageVault.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_ExascaleDbStorageVaultsUpdateMaximumSet() + { + // Generated from example definition: 2025-03-01/ExascaleDbStorageVaults_Update_MaximumSet_Gen.json + // this example is just showing the usage of "ExascaleDbStorageVault_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ExascaleDbStorageVaultResource created on azure + // for more information of creating ExascaleDbStorageVaultResource, please refer to the document of ExascaleDbStorageVaultResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rgopenapi"; + string exascaleDbStorageVaultName = "vmClusterName"; + ResourceIdentifier exascaleDbStorageVaultResourceId = ExascaleDbStorageVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, exascaleDbStorageVaultName); + ExascaleDbStorageVaultResource exascaleDbStorageVault = client.GetExascaleDbStorageVaultResource(exascaleDbStorageVaultResourceId); + + // invoke the operation + ExascaleDbStorageVaultPatch patch = new ExascaleDbStorageVaultPatch + { + Tags = +{ +["key6179"] = "ouj" +}, + }; + ArmOperation lro = await exascaleDbStorageVault.UpdateAsync(WaitUntil.Completed, patch); + ExascaleDbStorageVaultResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ExascaleDbStorageVaultData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_FlexComponentCollection.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_FlexComponentCollection.cs new file mode 100644 index 000000000000..51902c849622 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_FlexComponentCollection.cs @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.OracleDatabase.Models; +using Azure.ResourceManager.Resources; +using NUnit.Framework; + +namespace Azure.ResourceManager.OracleDatabase.Samples +{ + public partial class Sample_FlexComponentCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_FlexComponentsGetMaximumSet() + { + // Generated from example definition: 2025-03-01/FlexComponents_Get_MaximumSet_Gen.json + // this example is just showing the usage of "FlexComponent_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // get the collection of this FlexComponentResource + AzureLocation location = new AzureLocation("eastus"); + FlexComponentCollection collection = subscriptionResource.GetFlexComponents(location); + + // invoke the operation + string flexComponentName = "flexComponent"; + FlexComponentResource result = await collection.GetAsync(flexComponentName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + FlexComponentData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_FlexComponentsListByParentMaximumSet() + { + // Generated from example definition: 2025-03-01/FlexComponents_ListByParent_MaximumSet_Gen.json + // this example is just showing the usage of "FlexComponent_ListByParent" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // get the collection of this FlexComponentResource + AzureLocation location = new AzureLocation("eastus"); + FlexComponentCollection collection = subscriptionResource.GetFlexComponents(location); + + // invoke the operation and iterate over the result + SystemShape? shape = SystemShape.ExadataX11M; + await foreach (FlexComponentResource item in collection.GetAllAsync(shape: shape)) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + FlexComponentData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_FlexComponentsGetMaximumSet() + { + // Generated from example definition: 2025-03-01/FlexComponents_Get_MaximumSet_Gen.json + // this example is just showing the usage of "FlexComponent_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // get the collection of this FlexComponentResource + AzureLocation location = new AzureLocation("eastus"); + FlexComponentCollection collection = subscriptionResource.GetFlexComponents(location); + + // invoke the operation + string flexComponentName = "flexComponent"; + bool result = await collection.ExistsAsync(flexComponentName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_FlexComponentsGetMaximumSet() + { + // Generated from example definition: 2025-03-01/FlexComponents_Get_MaximumSet_Gen.json + // this example is just showing the usage of "FlexComponent_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // get the collection of this FlexComponentResource + AzureLocation location = new AzureLocation("eastus"); + FlexComponentCollection collection = subscriptionResource.GetFlexComponents(location); + + // invoke the operation + string flexComponentName = "flexComponent"; + NullableResponse response = await collection.GetIfExistsAsync(flexComponentName); + FlexComponentResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + FlexComponentData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_FlexComponentResource.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_FlexComponentResource.cs new file mode 100644 index 000000000000..61cc055d34a0 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_FlexComponentResource.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.ResourceManager.OracleDatabase.Samples +{ + public partial class Sample_FlexComponentResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_FlexComponentsGetMaximumSet() + { + // Generated from example definition: 2025-03-01/FlexComponents_Get_MaximumSet_Gen.json + // this example is just showing the usage of "FlexComponent_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this FlexComponentResource created on azure + // for more information of creating FlexComponentResource, please refer to the document of FlexComponentResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + AzureLocation location = new AzureLocation("eastus"); + string flexComponentName = "flexComponent"; + ResourceIdentifier flexComponentResourceId = FlexComponentResource.CreateResourceIdentifier(subscriptionId, location, flexComponentName); + FlexComponentResource flexComponent = client.GetFlexComponentResource(flexComponentResourceId); + + // invoke the operation + FlexComponentResource result = await flexComponent.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + FlexComponentData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_GiMinorVersionCollection.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_GiMinorVersionCollection.cs new file mode 100644 index 000000000000..ee7571123c1a --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_GiMinorVersionCollection.cs @@ -0,0 +1,162 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.OracleDatabase.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.OracleDatabase.Samples +{ + public partial class Sample_GiMinorVersionCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GiMinorVersionsGetMaximumSet() + { + // Generated from example definition: 2025-03-01/GiMinorVersions_Get_MaximumSet_Gen.json + // this example is just showing the usage of "GiMinorVersion_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this GiVersionResource created on azure + // for more information of creating GiVersionResource, please refer to the document of GiVersionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + AzureLocation location = new AzureLocation("eastus"); + string giversionname = "giVersionName"; + ResourceIdentifier giVersionResourceId = GiVersionResource.CreateResourceIdentifier(subscriptionId, location, giversionname); + GiVersionResource giVersion = client.GetGiVersionResource(giVersionResourceId); + + // get the collection of this GiMinorVersionResource + GiMinorVersionCollection collection = giVersion.GetGiMinorVersions(); + + // invoke the operation + string giMinorVersionName = "giMinorVersionName"; + GiMinorVersionResource result = await collection.GetAsync(giMinorVersionName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + GiMinorVersionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_GiMinorVersionsListByParentMaximumSet() + { + // Generated from example definition: 2025-03-01/GiMinorVersions_ListByParent_MaximumSet_Gen.json + // this example is just showing the usage of "GiMinorVersion_ListByParent" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this GiVersionResource created on azure + // for more information of creating GiVersionResource, please refer to the document of GiVersionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + AzureLocation location = new AzureLocation("eastus"); + string giversionname = "giVersionName"; + ResourceIdentifier giVersionResourceId = GiVersionResource.CreateResourceIdentifier(subscriptionId, location, giversionname); + GiVersionResource giVersion = client.GetGiVersionResource(giVersionResourceId); + + // get the collection of this GiMinorVersionResource + GiMinorVersionCollection collection = giVersion.GetGiMinorVersions(); + + // invoke the operation and iterate over the result + ShapeFamily? shapeFamily = new ShapeFamily("rtfcosvtlpeeqoicsjqggtgc"); + await foreach (GiMinorVersionResource item in collection.GetAllAsync(shapeFamily: shapeFamily)) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + GiMinorVersionData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_GiMinorVersionsGetMaximumSet() + { + // Generated from example definition: 2025-03-01/GiMinorVersions_Get_MaximumSet_Gen.json + // this example is just showing the usage of "GiMinorVersion_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this GiVersionResource created on azure + // for more information of creating GiVersionResource, please refer to the document of GiVersionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + AzureLocation location = new AzureLocation("eastus"); + string giversionname = "giVersionName"; + ResourceIdentifier giVersionResourceId = GiVersionResource.CreateResourceIdentifier(subscriptionId, location, giversionname); + GiVersionResource giVersion = client.GetGiVersionResource(giVersionResourceId); + + // get the collection of this GiMinorVersionResource + GiMinorVersionCollection collection = giVersion.GetGiMinorVersions(); + + // invoke the operation + string giMinorVersionName = "giMinorVersionName"; + bool result = await collection.ExistsAsync(giMinorVersionName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_GiMinorVersionsGetMaximumSet() + { + // Generated from example definition: 2025-03-01/GiMinorVersions_Get_MaximumSet_Gen.json + // this example is just showing the usage of "GiMinorVersion_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this GiVersionResource created on azure + // for more information of creating GiVersionResource, please refer to the document of GiVersionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + AzureLocation location = new AzureLocation("eastus"); + string giversionname = "giVersionName"; + ResourceIdentifier giVersionResourceId = GiVersionResource.CreateResourceIdentifier(subscriptionId, location, giversionname); + GiVersionResource giVersion = client.GetGiVersionResource(giVersionResourceId); + + // get the collection of this GiMinorVersionResource + GiMinorVersionCollection collection = giVersion.GetGiMinorVersions(); + + // invoke the operation + string giMinorVersionName = "giMinorVersionName"; + NullableResponse response = await collection.GetIfExistsAsync(giMinorVersionName); + GiMinorVersionResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + GiMinorVersionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_GiMinorVersionResource.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_GiMinorVersionResource.cs new file mode 100644 index 000000000000..2b9b6795bf06 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_GiMinorVersionResource.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.ResourceManager.OracleDatabase.Samples +{ + public partial class Sample_GiMinorVersionResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GiMinorVersionsGetMaximumSet() + { + // Generated from example definition: 2025-03-01/GiMinorVersions_Get_MaximumSet_Gen.json + // this example is just showing the usage of "GiMinorVersion_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this GiMinorVersionResource created on azure + // for more information of creating GiMinorVersionResource, please refer to the document of GiMinorVersionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + AzureLocation location = new AzureLocation("eastus"); + string giversionname = "giVersionName"; + string giMinorVersionName = "giMinorVersionName"; + ResourceIdentifier giMinorVersionResourceId = GiMinorVersionResource.CreateResourceIdentifier(subscriptionId, location, giversionname, giMinorVersionName); + GiMinorVersionResource giMinorVersion = client.GetGiMinorVersionResource(giMinorVersionResourceId); + + // invoke the operation + GiMinorVersionResource result = await giMinorVersion.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + GiMinorVersionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_GiVersionCollection.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_GiVersionCollection.cs new file mode 100644 index 000000000000..e80282236f47 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_GiVersionCollection.cs @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.OracleDatabase.Models; +using Azure.ResourceManager.Resources; +using NUnit.Framework; + +namespace Azure.ResourceManager.OracleDatabase.Samples +{ + public partial class Sample_GiVersionCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_ListGiVersionsByLocationGeneratedByMaximumSetRule() + { + // Generated from example definition: 2025-03-01/GiVersions_ListByLocation_MaximumSet_Gen.json + // this example is just showing the usage of "GiVersion_ListByLocation" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // get the collection of this GiVersionResource + AzureLocation location = new AzureLocation("eastus"); + GiVersionCollection collection = subscriptionResource.GetGiVersions(location); + + // invoke the operation and iterate over the result + SystemShape? shape = new SystemShape("osixsklyaauhoqnkxvnvsqeqenhzogntqnpubldrrfvqncwetdtwqwjjcvspwhgecbimdlulwcubikebrdzmidrucgtsuqvytkqutmbyrvvyioxpocpmuwiivyanjzucaegihztluuvpznzaoakfsselumhhsvrtrbzwpjhcihsvyouonlxdluwhqfxoqvgthkaxppbydtqjntscgzbivfdcaobbkthrbdjwpejirqmbly"); + await foreach (GiVersionResource item in collection.GetAllAsync(shape: shape)) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + GiVersionData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_ListGiVersionsByLocationGeneratedByMinimumSetRule() + { + // Generated from example definition: 2025-03-01/GiVersions_ListByLocation_MinimumSet_Gen.json + // this example is just showing the usage of "GiVersion_ListByLocation" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // get the collection of this GiVersionResource + AzureLocation location = new AzureLocation("eastus"); + GiVersionCollection collection = subscriptionResource.GetGiVersions(location); + + // invoke the operation and iterate over the result + await foreach (GiVersionResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + GiVersionData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleSubscriptionResource.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleSubscriptionResource.cs new file mode 100644 index 000000000000..c1560756ea2d --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleSubscriptionResource.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.OracleDatabase.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.OracleDatabase.Samples +{ + public partial class Sample_OracleSubscriptionResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_OracleSubscriptionsUpdate() + { + // Generated from example definition: 2025-03-01/oracleSubscriptions_patch.json + // this example is just showing the usage of "OracleSubscription_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this OracleSubscriptionResource created on azure + // for more information of creating OracleSubscriptionResource, please refer to the document of OracleSubscriptionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + ResourceIdentifier oracleSubscriptionResourceId = OracleSubscriptionResource.CreateResourceIdentifier(subscriptionId); + OracleSubscriptionResource oracleSubscription = client.GetOracleSubscriptionResource(oracleSubscriptionResourceId); + + // invoke the operation + OracleSubscriptionPatch patch = new OracleSubscriptionPatch(); + ArmOperation lro = await oracleSubscription.UpdateAsync(WaitUntil.Completed, patch); + OracleSubscriptionResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + OracleSubscriptionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetCloudAccountDetails_OracleSubscriptionsListCloudAccountDetails() + { + // Generated from example definition: 2025-03-01/oracleSubscriptions_listCloudAccountDetails.json + // this example is just showing the usage of "OracleSubscriptions_ListCloudAccountDetails" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this OracleSubscriptionResource created on azure + // for more information of creating OracleSubscriptionResource, please refer to the document of OracleSubscriptionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + ResourceIdentifier oracleSubscriptionResourceId = OracleSubscriptionResource.CreateResourceIdentifier(subscriptionId); + OracleSubscriptionResource oracleSubscription = client.GetOracleSubscriptionResource(oracleSubscriptionResourceId); + + // invoke the operation + await oracleSubscription.GetCloudAccountDetailsAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetSaasSubscriptionDetails_OracleSubscriptionsListSaasSubscriptionDetails() + { + // Generated from example definition: 2025-03-01/oracleSubscriptions_listSaasSubscriptionDetails.json + // this example is just showing the usage of "OracleSubscriptions_ListSaasSubscriptionDetails" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this OracleSubscriptionResource created on azure + // for more information of creating OracleSubscriptionResource, please refer to the document of OracleSubscriptionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + ResourceIdentifier oracleSubscriptionResourceId = OracleSubscriptionResource.CreateResourceIdentifier(subscriptionId); + OracleSubscriptionResource oracleSubscription = client.GetOracleSubscriptionResource(oracleSubscriptionResourceId); + + // invoke the operation + await oracleSubscription.GetSaasSubscriptionDetailsAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetActivationLinks_OracleSubscriptionsListActivationLinks() + { + // Generated from example definition: 2025-03-01/oracleSubscriptions_listActivationLinks.json + // this example is just showing the usage of "OracleSubscriptions_ListActivationLinks" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this OracleSubscriptionResource created on azure + // for more information of creating OracleSubscriptionResource, please refer to the document of OracleSubscriptionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + ResourceIdentifier oracleSubscriptionResourceId = OracleSubscriptionResource.CreateResourceIdentifier(subscriptionId); + OracleSubscriptionResource oracleSubscription = client.GetOracleSubscriptionResource(oracleSubscriptionResourceId); + + // invoke the operation + await oracleSubscription.GetActivationLinksAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task AddAzureSubscriptions_OracleSubscriptionsAddAzureSubscriptions() + { + // Generated from example definition: 2025-03-01/oracleSubscriptions_addAzureSubscriptions.json + // this example is just showing the usage of "OracleSubscriptions_AddAzureSubscriptions" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this OracleSubscriptionResource created on azure + // for more information of creating OracleSubscriptionResource, please refer to the document of OracleSubscriptionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + ResourceIdentifier oracleSubscriptionResourceId = OracleSubscriptionResource.CreateResourceIdentifier(subscriptionId); + OracleSubscriptionResource oracleSubscription = client.GetOracleSubscriptionResource(oracleSubscriptionResourceId); + + // invoke the operation + AzureSubscriptions body = new AzureSubscriptions(new string[] { "00000000-0000-0000-0000-000000000001" }); + await oracleSubscription.AddAzureSubscriptionsAsync(WaitUntil.Completed, body); + + Console.WriteLine("Succeeded"); + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs new file mode 100644 index 000000000000..6dcc0a48cbe0 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.Resources; +using NUnit.Framework; + +namespace Azure.ResourceManager.OracleDatabase.Samples +{ + public partial class Sample_SubscriptionResourceExtensions + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetExascaleDbStorageVaults_ExascaleDbStorageVaultsListBySubscriptionMaximumSet() + { + // Generated from example definition: 2025-03-01/ExascaleDbStorageVaults_ListBySubscription_MaximumSet_Gen.json + // this example is just showing the usage of "ExascaleDbStorageVault_ListBySubscription" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + await foreach (ExascaleDbStorageVaultResource item in subscriptionResource.GetExascaleDbStorageVaultsAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ExascaleDbStorageVaultData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Azure.ResourceManager.OracleDatabase.csproj b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Azure.ResourceManager.OracleDatabase.csproj new file mode 100644 index 000000000000..e7f8f39476b1 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Azure.ResourceManager.OracleDatabase.csproj @@ -0,0 +1,8 @@ + + + Azure Resource Manager client SDK for Azure resource provider OracleDatabase. + 1.0.0-beta.1 + azure;management;arm;resource manager;oracledatabase + Azure.ResourceManager.OracleDatabase + + diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/ArmOracleDatabaseModelFactory.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/ArmOracleDatabaseModelFactory.cs new file mode 100644 index 000000000000..d7300ebe4ef3 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/ArmOracleDatabaseModelFactory.cs @@ -0,0 +1,2267 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// Model factory for models. + public static partial class ArmOracleDatabaseModelFactory + { + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The resource-specific properties for this resource. + /// CloudExadataInfrastructure zones. + /// A new instance for mocking. + public static CloudExadataInfrastructureData CloudExadataInfrastructureData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, CloudExadataInfrastructureProperties properties = null, IEnumerable zones = null) + { + tags ??= new Dictionary(); + zones ??= new List(); + + return new CloudExadataInfrastructureData( + id, + name, + resourceType, + systemData, + tags, + location, + properties, + zones?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Defined file system configurations. + /// Exadata infra ocid. + /// The number of compute servers for the cloud Exadata infrastructure. + /// The number of storage servers for the cloud Exadata infrastructure. + /// The total storage allocated to the cloud Exadata infrastructure resource, in gigabytes (GB). + /// The available storage can be allocated to the cloud Exadata infrastructure resource, in gigabytes (GB). + /// The date and time the cloud Exadata infrastructure resource was created. + /// Additional information about the current lifecycle state. + /// maintenanceWindow property. + /// The estimated total time required in minutes for all patching operations (database server, storage server, and network switch patching). + /// The list of customer email addresses that receive information from Oracle about the specified OCI Database service resource. Oracle uses these email addresses to send notifications about planned and unplanned software maintenance updates, information about system hardware, and other information needed by administrators. Up to 10 email addresses can be added to the customer contacts for a cloud Exadata infrastructure instance. + /// CloudExadataInfrastructure provisioning state. + /// CloudExadataInfrastructure lifecycle state. + /// The model name of the cloud Exadata infrastructure resource. + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + /// The total number of CPU cores allocated. + /// The total number of CPU cores available. + /// The memory allocated in GBs. + /// The total memory available in GBs. + /// The local node storage to be allocated in GBs. + /// The total local node storage available in GBs. + /// The quantity of data in the database, in terabytes. + /// The total available DATA disk group size. + /// The software version of the database servers (dom0) in the Exadata infrastructure. + /// The software version of the storage servers (cells) in the Exadata infrastructure. + /// The requested number of additional storage servers activated for the Exadata infrastructure. + /// The requested number of additional storage servers for the Exadata infrastructure. + /// The name for the Exadata infrastructure. + /// The OCID of the last maintenance run. + /// The OCID of the next maintenance run. + /// Monthly Db Server version. + /// Monthly Storage Server version. + /// The database server model type of the cloud Exadata infrastructure resource. + /// The storage server model type of the cloud Exadata infrastructure resource. + /// The compute model of the Exadata Infrastructure. + /// A new instance for mocking. + public static CloudExadataInfrastructureProperties CloudExadataInfrastructureProperties(IEnumerable definedFileSystemConfiguration = null, string ocid = null, int? computeCount = null, int? storageCount = null, int? totalStorageSizeInGbs = null, int? availableStorageSizeInGbs = null, string timeCreated = null, string lifecycleDetails = null, MaintenanceWindow maintenanceWindow = null, EstimatedPatchingTime estimatedPatchingTime = null, IEnumerable customerContacts = null, AzureResourceProvisioningState? provisioningState = null, CloudExadataInfrastructureLifecycleState? lifecycleState = null, string shape = null, Uri ociUri = null, int? cpuCount = null, int? maxCpuCount = null, int? memorySizeInGbs = null, int? maxMemoryInGbs = null, int? dbNodeStorageSizeInGbs = null, int? maxDbNodeStorageSizeInGbs = null, double? dataStorageSizeInTbs = null, double? maxDataStorageInTbs = null, string dbServerVersion = null, string storageServerVersion = null, int? activatedStorageCount = null, int? additionalStorageCount = null, string displayName = null, string lastMaintenanceRunId = null, string nextMaintenanceRunId = null, string monthlyDbServerVersion = null, string monthlyStorageServerVersion = null, string databaseServerType = null, string storageServerType = null, ComputeModel? computeModel = null) + { + definedFileSystemConfiguration ??= new List(); + customerContacts ??= new List(); + + return new CloudExadataInfrastructureProperties( + definedFileSystemConfiguration?.ToList(), + ocid, + computeCount, + storageCount, + totalStorageSizeInGbs, + availableStorageSizeInGbs, + timeCreated, + lifecycleDetails, + maintenanceWindow, + estimatedPatchingTime, + customerContacts?.ToList(), + provisioningState, + lifecycleState, + shape, + ociUri, + cpuCount, + maxCpuCount, + memorySizeInGbs, + maxMemoryInGbs, + dbNodeStorageSizeInGbs, + maxDbNodeStorageSizeInGbs, + dataStorageSizeInTbs, + maxDataStorageInTbs, + dbServerVersion, + storageServerVersion, + activatedStorageCount, + additionalStorageCount, + displayName, + lastMaintenanceRunId, + nextMaintenanceRunId, + monthlyDbServerVersion, + monthlyStorageServerVersion, + databaseServerType, + storageServerType, + computeModel, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Checks if the data can be backed up. + /// Checks if the mount path is resizable. + /// Minimum size of mount path in Gb. + /// Mount path for the file system. + /// A new instance for mocking. + public static DefinedFileSystemConfiguration DefinedFileSystemConfiguration(bool? isBackupPartition = null, bool? isResizable = null, int? minSizeGb = null, string mountPoint = null) + { + return new DefinedFileSystemConfiguration(isBackupPartition, isResizable, minSizeGb, mountPoint, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The estimated time required in minutes for database server patching. + /// The estimated time required in minutes for network switch patching. + /// The estimated time required in minutes for storage server patching. + /// The estimated total time required in minutes for all patching operations. + /// A new instance for mocking. + public static EstimatedPatchingTime EstimatedPatchingTime(int? estimatedDbServerPatchingTime = null, int? estimatedNetworkSwitchesPatchingTime = null, int? estimatedStorageServerPatchingTime = null, int? totalEstimatedPatchingTime = null) + { + return new EstimatedPatchingTime(estimatedDbServerPatchingTime, estimatedNetworkSwitchesPatchingTime, estimatedStorageServerPatchingTime, totalEstimatedPatchingTime, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static DbServerData DbServerData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DbServerProperties properties = null) + { + return new DbServerData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Db server name. + /// The name for the Db Server. + /// The OCID of the compartment. + /// The OCID of the Exadata infrastructure. + /// The number of CPU cores enabled on the Db server. + /// dbServerPatching details of the Db server. + /// The total memory available in GBs. + /// The allocated local node storage in GBs on the Db server. + /// The OCID of the VM Clusters associated with the Db server. + /// The OCID of the Db nodes associated with the Db server. + /// Lifecycle details of dbServer. + /// DbServer provisioning state. + /// The total number of CPU cores available. + /// The list of OCIDs of the Autonomous VM Clusters associated with the Db server. + /// The list of OCIDs of the Autonomous Virtual Machines associated with the Db server. + /// The total max dbNode storage in GBs. + /// The total memory size in GBs. + /// The shape of the Db server. The shape determines the amount of CPU, storage, and memory resources available. + /// The date and time that the Db Server was created. + /// Azure resource provisioning state. + /// The compute model of the Exadata Infrastructure. + /// A new instance for mocking. + public static DbServerProperties DbServerProperties(string ocid = null, string displayName = null, string compartmentId = null, string exadataInfrastructureId = null, int? cpuCoreCount = null, DbServerPatchingDetails dbServerPatchingDetails = null, int? maxMemoryInGbs = null, int? dbNodeStorageSizeInGbs = null, IEnumerable vmClusterIds = null, IEnumerable dbNodeIds = null, string lifecycleDetails = null, DbServerProvisioningState? lifecycleState = null, int? maxCpuCount = null, IEnumerable autonomousVmClusterIds = null, IEnumerable autonomousVirtualMachineIds = null, int? maxDbNodeStorageInGbs = null, int? memorySizeInGbs = null, string shape = null, DateTimeOffset? timeCreated = null, ResourceProvisioningState? provisioningState = null, ComputeModel? computeModel = null) + { + vmClusterIds ??= new List(); + dbNodeIds ??= new List(); + autonomousVmClusterIds ??= new List(); + autonomousVirtualMachineIds ??= new List(); + + return new DbServerProperties( + ocid, + displayName, + compartmentId, + exadataInfrastructureId, + cpuCoreCount, + dbServerPatchingDetails, + maxMemoryInGbs, + dbNodeStorageSizeInGbs, + vmClusterIds?.ToList(), + dbNodeIds?.ToList(), + lifecycleDetails, + lifecycleState, + maxCpuCount, + autonomousVmClusterIds?.ToList(), + autonomousVirtualMachineIds?.ToList(), + maxDbNodeStorageInGbs, + memorySizeInGbs, + shape, + timeCreated, + provisioningState, + computeModel, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Estimated Patch Duration. + /// Patching Status. + /// Time Patching Ended. + /// Time Patching Started. + /// A new instance for mocking. + public static DbServerPatchingDetails DbServerPatchingDetails(int? estimatedPatchDuration = null, DbServerPatchingStatus? patchingStatus = null, DateTimeOffset? timePatchingEnded = null, DateTimeOffset? timePatchingStarted = null) + { + return new DbServerPatchingDetails(estimatedPatchDuration, patchingStatus, timePatchingEnded, timePatchingStarted, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static CloudVmClusterData CloudVmClusterData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, CloudVmClusterProperties properties = null) + { + tags ??= new Dictionary(); + + return new CloudVmClusterData( + id, + name, + resourceType, + systemData, + tags, + location, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Cloud VM Cluster ocid. + /// The port number configured for the listener on the cloud VM cluster. + /// The number of nodes in the cloud VM cluster. + /// The data disk group size to be allocated in GBs per VM. + /// Array of mount path and size. + /// The data disk group size to be allocated in TBs. + /// The local node storage to be allocated in GBs. + /// The memory to be allocated in GBs. + /// The date and time that the cloud VM cluster was created. + /// Additional information about the current lifecycle state. + /// The time zone of the cloud VM cluster. For details, see [Exadata Infrastructure Time Zones](/Content/Database/References/timezones.htm). + /// The OCID of the zone the cloud VM cluster is associated with. + /// The hostname for the cloud VM cluster. + /// The domain name for the cloud VM cluster. + /// The number of CPU cores enabled on the cloud VM cluster. + /// The number of OCPU cores to enable on the cloud VM cluster. Only 1 decimal place is allowed for the fractional part. + /// The cluster name for cloud VM cluster. The cluster name must begin with an alphabetic character, and may contain hyphens (-). Underscores (_) are not permitted. The cluster name can be no longer than 11 characters and is not case sensitive. + /// The percentage assigned to DATA storage (user data and database files). The remaining percentage is assigned to RECO storage (database redo logs, archive logs, and recovery manager backups). Accepted values are 35, 40, 60 and 80. The default is 80 percent assigned to DATA storage. See [Storage Configuration](/Content/Database/Concepts/exaoverview.htm#Exadata) in the Exadata documentation for details on the impact of the configuration settings on storage. + /// If true, database backup on local Exadata storage is configured for the cloud VM cluster. If false, database backup on local Exadata storage is not available in the cloud VM cluster. + /// Cloud Exadata Infrastructure ID. + /// If true, sparse disk group is configured for the cloud VM cluster. If false, sparse disk group is not created. + /// Operating system version of the image. + /// The public key portion of one or more key pairs used for SSH access to the cloud VM cluster. + /// The Oracle license model that applies to the cloud VM cluster. The default is LICENSE_INCLUDED. + /// The type of redundancy configured for the cloud Vm cluster. NORMAL is 2-way redundancy. HIGH is 3-way redundancy. + /// The Single Client Access Name (SCAN) IP addresses associated with the cloud VM cluster. SCAN IP addresses are typically used for load balancing and are not assigned to any interface. Oracle Clusterware directs the requests to the appropriate nodes in the cluster. **Note:** For a single-node DB system, this list is empty. + /// The virtual IP (VIP) addresses associated with the cloud VM cluster. The Cluster Ready Services (CRS) creates and maintains one VIP address for each node in the Exadata Cloud Service instance to enable failover. If one node fails, the VIP is reassigned to another active node in the cluster. **Note:** For a single-node DB system, this list is empty. + /// The FQDN of the DNS record for the SCAN IP addresses that are associated with the cloud VM cluster. + /// The TCP Single Client Access Name (SCAN) port. The default port is 1521. + /// The TCPS Single Client Access Name (SCAN) port. The default port is 2484. + /// The OCID of the DNS record for the SCAN IP addresses that are associated with the cloud VM cluster. + /// The model name of the Exadata hardware running the cloud VM cluster. + /// CloudVmCluster provisioning state. + /// CloudVmCluster lifecycle state. + /// VNET for network connectivity. + /// Oracle Grid Infrastructure (GI) software version. + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + /// HTTPS link to OCI Network Security Group exposed to Azure Customer via the Azure Interface. + /// Client subnet. + /// Client OCI backup subnet CIDR, default is 192.168.252.0/22. + /// CIDR blocks for additional NSG ingress rules. The VNET CIDRs used to provision the VM Cluster will be added by default. + /// Indicates user preferences for the various diagnostic collection options for the VM cluster/Cloud VM cluster/VMBM DBCS. + /// Display Name. + /// The list of compute servers to be added to the cloud VM cluster. + /// iormConfigCache details for cloud VM cluster. + /// The OCID of the last maintenance update history entry. + /// The list of DB servers. + /// Cluster compartmentId. + /// Cluster subnet ocid. + /// The compute model of the VM Cluster. + /// A new instance for mocking. + public static CloudVmClusterProperties CloudVmClusterProperties(string ocid = null, long? listenerPort = null, int? nodeCount = null, int? storageSizeInGbs = null, IEnumerable fileSystemConfigurationDetails = null, double? dataStorageSizeInTbs = null, int? dbNodeStorageSizeInGbs = null, int? memorySizeInGbs = null, DateTimeOffset? timeCreated = null, string lifecycleDetails = null, string timeZone = null, string zoneId = null, string hostname = null, string domain = null, int cpuCoreCount = default, float? ocpuCount = null, string clusterName = null, int? dataStoragePercentage = null, bool? isLocalBackupEnabled = null, ResourceIdentifier cloudExadataInfrastructureId = null, bool? isSparseDiskgroupEnabled = null, string systemVersion = null, IEnumerable sshPublicKeys = null, LicenseModel? licenseModel = null, DiskRedundancy? diskRedundancy = null, IEnumerable scanIPIds = null, IEnumerable vipIds = null, string scanDnsName = null, int? scanListenerPortTcp = null, int? scanListenerPortTcpSsl = null, string scanDnsRecordId = null, string shape = null, AzureResourceProvisioningState? provisioningState = null, CloudVmClusterLifecycleState? lifecycleState = null, ResourceIdentifier vnetId = null, string giVersion = null, Uri ociUri = null, Uri nsgUri = null, ResourceIdentifier subnetId = null, string backupSubnetCidr = null, IEnumerable nsgCidrs = null, DataCollectionOptions dataCollectionOptions = null, string displayName = null, IEnumerable computeNodes = null, ExadataIormConfig iormConfigCache = null, string lastUpdateHistoryEntryId = null, IEnumerable dbServers = null, string compartmentId = null, string subnetOcid = null, ComputeModel? computeModel = null) + { + fileSystemConfigurationDetails ??= new List(); + sshPublicKeys ??= new List(); + scanIPIds ??= new List(); + vipIds ??= new List(); + nsgCidrs ??= new List(); + computeNodes ??= new List(); + dbServers ??= new List(); + + return new CloudVmClusterProperties( + ocid, + listenerPort, + nodeCount, + storageSizeInGbs, + fileSystemConfigurationDetails?.ToList(), + dataStorageSizeInTbs, + dbNodeStorageSizeInGbs, + memorySizeInGbs, + timeCreated, + lifecycleDetails, + timeZone, + zoneId, + hostname, + domain, + cpuCoreCount, + ocpuCount, + clusterName, + dataStoragePercentage, + isLocalBackupEnabled, + cloudExadataInfrastructureId, + isSparseDiskgroupEnabled, + systemVersion, + sshPublicKeys?.ToList(), + licenseModel, + diskRedundancy, + scanIPIds?.ToList(), + vipIds?.ToList(), + scanDnsName, + scanListenerPortTcp, + scanListenerPortTcpSsl, + scanDnsRecordId, + shape, + provisioningState, + lifecycleState, + vnetId, + giVersion, + ociUri, + nsgUri, + subnetId, + backupSubnetCidr, + nsgCidrs?.ToList(), + dataCollectionOptions, + displayName, + computeNodes?.ToList(), + iormConfigCache, + lastUpdateHistoryEntryId, + dbServers?.ToList(), + compartmentId, + subnetOcid, + computeModel, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// An array of IORM settings for all the database in the Exadata DB system. + /// Additional information about the current lifecycleState. + /// The current state of IORM configuration for the Exadata DB system. + /// The current value for the IORM objective. The default is AUTO. + /// A new instance for mocking. + public static ExadataIormConfig ExadataIormConfig(IEnumerable dbPlans = null, string lifecycleDetails = null, IormLifecycleState? lifecycleState = null, Objective? objective = null) + { + dbPlans ??= new List(); + + return new ExadataIormConfig(dbPlans?.ToList(), lifecycleDetails, lifecycleState, objective, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The database name. For the default DbPlan, the dbName is default. + /// The flash cache limit for this database. This value is internally configured based on the share value assigned to the database. + /// The relative priority of this database. + /// A new instance for mocking. + public static DbIormConfig DbIormConfig(string dbName = null, string flashCacheLimit = null, int? share = null) + { + return new DbIormConfig(dbName, flashCacheLimit, share, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// PrivateIpAddresses displayName. + /// PrivateIpAddresses hostnameLabel. + /// PrivateIpAddresses Id. + /// PrivateIpAddresses ipAddress. + /// PrivateIpAddresses subnetId. + /// A new instance for mocking. + public static PrivateIPAddressProperties PrivateIPAddressProperties(string displayName = null, string hostnameLabel = null, string ocid = null, string ipAddress = null, string subnetId = null) + { + return new PrivateIPAddressProperties( + displayName, + hostnameLabel, + ocid, + ipAddress, + subnetId, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static VirtualNetworkAddressData VirtualNetworkAddressData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, VirtualNetworkAddressProperties properties = null) + { + return new VirtualNetworkAddressData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Virtual network Address address. + /// Virtual Machine OCID. + /// Application VIP OCID. + /// Virtual network address fully qualified domain name. + /// Additional information about the current lifecycle state of the application virtual IP (VIP) address. + /// Azure resource provisioning state. + /// virtual network address lifecycle state. + /// The date and time when the create operation for the application virtual IP (VIP) address completed. + /// A new instance for mocking. + public static VirtualNetworkAddressProperties VirtualNetworkAddressProperties(string ipAddress = null, string vmOcid = null, string ocid = null, string domain = null, string lifecycleDetails = null, AzureResourceProvisioningState? provisioningState = null, VirtualNetworkAddressLifecycleState? lifecycleState = null, DateTimeOffset? timeAssigned = null) + { + return new VirtualNetworkAddressProperties( + ipAddress, + vmOcid, + ocid, + domain, + lifecycleDetails, + provisioningState, + lifecycleState, + timeAssigned, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static SystemVersionData SystemVersionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string systemVersion = null) + { + return new SystemVersionData( + id, + name, + resourceType, + systemData, + systemVersion != null ? new SystemVersionProperties(systemVersion, serializedAdditionalRawData: null) : null, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// Details of the resource plan. + /// A new instance for mocking. + public static OracleSubscriptionData OracleSubscriptionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, OracleSubscriptionProperties properties = null, ArmPlan plan = null) + { + return new OracleSubscriptionData( + id, + name, + resourceType, + systemData, + properties, + plan, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// OracleSubscriptionProvisioningState provisioning state. + /// SAAS subscription ID generated by Marketplace. + /// Cloud Account Id. + /// Cloud Account provisioning state. + /// Term Unit. P1Y, P3Y, etc, see Durations https://en.wikipedia.org/wiki/ISO_8601. + /// Product code for the term unit. + /// Intent for the update operation. + /// Azure subscriptions to be added. + /// State of the add Azure subscription operation on Oracle subscription. + /// Status details of the last operation on Oracle subscription. + /// A new instance for mocking. + public static OracleSubscriptionProperties OracleSubscriptionProperties(OracleSubscriptionProvisioningState? provisioningState = null, string saasSubscriptionId = null, string cloudAccountId = null, CloudAccountProvisioningState? cloudAccountState = null, string termUnit = null, string productCode = null, Intent? intent = null, IEnumerable azureSubscriptionIds = null, AddSubscriptionOperationState? addSubscriptionOperationState = null, string lastOperationStatusDetail = null) + { + azureSubscriptionIds ??= new List(); + + return new OracleSubscriptionProperties( + provisioningState, + saasSubscriptionId, + cloudAccountId, + cloudAccountState, + termUnit, + productCode, + intent, + azureSubscriptionIds?.ToList(), + addSubscriptionOperationState, + lastOperationStatusDetail, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static DbNodeData DbNodeData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DbNodeProperties properties = null) + { + return new DbNodeData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// DbNode OCID. + /// Additional information about the planned maintenance. + /// The OCID of the backup IP address associated with the database node. + /// The OCID of the second backup VNIC. + /// The OCID of the backup VNIC. + /// The number of CPU cores enabled on the Db node. + /// The allocated local node storage in GBs on the Db node. + /// The OCID of the Exacc Db server associated with the database node. + /// The OCID of the DB system. + /// The name of the Fault Domain the instance is contained in. + /// The OCID of the host IP address associated with the database node. + /// The host name for the database node. + /// The current state of the database node. + /// Lifecycle details of Db Node. + /// The type of database node maintenance. + /// The allocated memory in GBs on the Db node. + /// The size (in GB) of the block storage volume allocation for the DB system. This attribute applies only for virtual machine DB systems. + /// The date and time that the database node was created. + /// End date and time of maintenance window. + /// Start date and time of maintenance window. + /// The OCID of the second VNIC. + /// The OCID of the VNIC. + /// Azure resource provisioning state. + /// A new instance for mocking. + public static DbNodeProperties DbNodeProperties(string ocid = null, string additionalDetails = null, string backupIPId = null, string backupVnic2Id = null, string backupVnicId = null, int? cpuCoreCount = null, int? dbNodeStorageSizeInGbs = null, string dbServerId = null, string dbSystemId = null, string faultDomain = null, string hostIPId = null, string hostname = null, DbNodeProvisioningState lifecycleState = default, string lifecycleDetails = null, DbNodeMaintenanceType? maintenanceType = null, int? memorySizeInGbs = null, int? softwareStorageSizeInGb = null, DateTimeOffset timeCreated = default, DateTimeOffset? timeMaintenanceWindowEnd = null, DateTimeOffset? timeMaintenanceWindowStart = null, string vnic2Id = null, string vnicId = null, ResourceProvisioningState? provisioningState = null) + { + return new DbNodeProperties( + ocid, + additionalDetails, + backupIPId, + backupVnic2Id, + backupVnicId, + cpuCoreCount, + dbNodeStorageSizeInGbs, + dbServerId, + dbSystemId, + faultDomain, + hostIPId, + hostname, + lifecycleState, + lifecycleDetails, + maintenanceType, + memorySizeInGbs, + softwareStorageSizeInGb, + timeCreated, + timeMaintenanceWindowEnd, + timeMaintenanceWindowStart, + vnic2Id, + vnicId, + provisioningState, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static GiVersionData GiVersionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string giVersion = null) + { + return new GiVersionData( + id, + name, + resourceType, + systemData, + giVersion != null ? new GiVersionProperties(giVersion, serializedAdditionalRawData: null) : null, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static GiMinorVersionData GiMinorVersionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, GiMinorVersionProperties properties = null) + { + return new GiMinorVersionData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// A valid Oracle Grid Infrastructure (GI) software version. + /// Grid Infrastructure Image Id. + /// A new instance for mocking. + public static GiMinorVersionProperties GiMinorVersionProperties(string version = null, string gridImageOcid = null) + { + return new GiMinorVersionProperties(version, gridImageOcid, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static DbSystemShapeData DbSystemShapeData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DbSystemShapeProperties properties = null) + { + return new DbSystemShapeData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The family of the shape used for the DB system. + /// The shape used for the DB system. + /// The maximum number of CPU cores that can be enabled on the DB system for this shape. + /// The minimum number of CPU cores that can be enabled on the DB system for this shape. + /// The runtime minimum number of CPU cores that can be enabled on the DB system for this shape. + /// The discrete number by which the CPU core count for this shape can be increased or decreased. + /// The minimum number of Exadata storage servers available for the Exadata infrastructure. + /// The maximum number of Exadata storage servers available for the Exadata infrastructure. + /// The maximum data storage available per storage server for this shape. Only applicable to ExaCC Elastic shapes. + /// The maximum memory available per database node for this shape. Only applicable to ExaCC Elastic shapes. + /// The maximum Db Node storage available per database node for this shape. Only applicable to ExaCC Elastic shapes. + /// The minimum number of CPU cores that can be enabled per node for this shape. + /// The maximum memory that can be enabled for this shape. + /// The minimum memory that need be allocated per node for this shape. + /// The maximum Db Node storage that can be enabled for this shape. + /// The minimum Db Node storage that need be allocated per node for this shape. + /// The maximum DATA storage that can be enabled for this shape. + /// The minimum data storage that need be allocated for this shape. + /// The minimum number of database nodes available for this shape. + /// The maximum number of database nodes available for this shape. + /// The maximum number of CPU cores per database node that can be enabled for this shape. Only applicable to the flex Exadata shape and ExaCC Elastic shapes. + /// The compute model of the Exadata Infrastructure. + /// Indicates if the shape supports database and storage server types. + /// The display name of the shape used for the DB system. + /// A new instance for mocking. + public static DbSystemShapeProperties DbSystemShapeProperties(string shapeFamily = null, string shapeName = null, int availableCoreCount = default, int? minimumCoreCount = null, int? runtimeMinimumCoreCount = null, int? coreCountIncrement = null, int? minStorageCount = null, int? maxStorageCount = null, double? availableDataStoragePerServerInTbs = null, int? availableMemoryPerNodeInGbs = null, int? availableDbNodePerNodeInGbs = null, int? minCoreCountPerNode = null, int? availableMemoryInGbs = null, int? minMemoryPerNodeInGbs = null, int? availableDbNodeStorageInGbs = null, int? minDbNodeStoragePerNodeInGbs = null, int? availableDataStorageInTbs = null, int? minDataStorageInTbs = null, int? minimumNodeCount = null, int? maximumNodeCount = null, int? availableCoreCountPerNode = null, ComputeModel? computeModel = null, bool? areServerTypesSupported = null, string displayName = null) + { + return new DbSystemShapeProperties( + shapeFamily, + shapeName, + availableCoreCount, + minimumCoreCount, + runtimeMinimumCoreCount, + coreCountIncrement, + minStorageCount, + maxStorageCount, + availableDataStoragePerServerInTbs, + availableMemoryPerNodeInGbs, + availableDbNodePerNodeInGbs, + minCoreCountPerNode, + availableMemoryInGbs, + minMemoryPerNodeInGbs, + availableDbNodeStorageInGbs, + minDbNodeStoragePerNodeInGbs, + availableDataStorageInTbs, + minDataStorageInTbs, + minimumNodeCount, + maximumNodeCount, + availableCoreCountPerNode, + computeModel, + areServerTypesSupported, + displayName, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static DnsPrivateViewData DnsPrivateViewData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DnsPrivateViewProperties properties = null) + { + return new DnsPrivateViewData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The OCID of the view. + /// The display name of the view resource. + /// A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed. + /// Views lifecycleState. + /// The canonical absolute URL of the resource. + /// views timeCreated. + /// views timeCreated. + /// Azure resource provisioning state. + /// A new instance for mocking. + public static DnsPrivateViewProperties DnsPrivateViewProperties(string ocid = null, string displayName = null, bool isProtected = default, DnsPrivateViewsLifecycleState lifecycleState = default, string self = null, DateTimeOffset timeCreated = default, DateTimeOffset timeUpdated = default, ResourceProvisioningState? provisioningState = null) + { + return new DnsPrivateViewProperties( + ocid, + displayName, + isProtected, + lifecycleState, + self, + timeCreated, + timeUpdated, + provisioningState, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static DnsPrivateZoneData DnsPrivateZoneData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DnsPrivateZoneProperties properties = null) + { + return new DnsPrivateZoneData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The OCID of the Zone. + /// A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed. + /// Zones lifecycleState. + /// The canonical absolute URL of the resource. + /// The current serial of the zone. As seen in the zone's SOA record. + /// Version is the never-repeating, totally-orderable, version of the zone, from which the serial field of the zone's SOA record is derived. + /// The OCID of the private view containing the zone. This value will be null for zones in the global DNS, which are publicly resolvable and not part of a private view. + /// The type of the zone. Must be either PRIMARY or SECONDARY. SECONDARY is only supported for GLOBAL zones. + /// Zones timeCreated. + /// Azure resource provisioning state. + /// A new instance for mocking. + public static DnsPrivateZoneProperties DnsPrivateZoneProperties(string ocid = null, bool isProtected = default, DnsPrivateZonesLifecycleState lifecycleState = default, string self = null, int serial = default, string version = null, string viewId = null, ZoneType zoneType = default, DateTimeOffset timeCreated = default, ResourceProvisioningState? provisioningState = null) + { + return new DnsPrivateZoneProperties( + ocid, + isProtected, + lifecycleState, + self, + serial, + version, + viewId, + zoneType, + timeCreated, + provisioningState, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static FlexComponentData FlexComponentData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, FlexComponentProperties properties = null) + { + return new FlexComponentData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The minimum number of CPU cores that can be enabled on the DB Server for this Flex Component. + /// The maximum number of CPU cores that can be enabled on the DB Server for this Flex Component. + /// The maximum storage that can be enabled on the Storage Server for this Flex Component. + /// The runtime minimum number of CPU cores that can be enabled for this Flex Component. + /// The name of the DB system shape for this Flex Component. + /// The maximum memory size that can be enabled on the DB Server for this Flex Component. + /// The maximum local storage that can be enabled on the DB Server for this Flex Component. + /// The compute model of the DB Server for this Flex Component. + /// The hardware type of the DB (Compute) or Storage (Cell) Server for this Flex Component. + /// The description summary for this Flex Component. + /// A new instance for mocking. + public static FlexComponentProperties FlexComponentProperties(int? minimumCoreCount = null, int? availableCoreCount = null, int? availableDbStorageInGbs = null, int? runtimeMinimumCoreCount = null, string shape = null, int? availableMemoryInGbs = null, int? availableLocalStorageInGbs = null, string computeModel = null, HardwareType? hardwareType = null, string descriptionSummary = null) + { + return new FlexComponentProperties( + minimumCoreCount, + availableCoreCount, + availableDbStorageInGbs, + runtimeMinimumCoreCount, + shape, + availableMemoryInGbs, + availableLocalStorageInGbs, + computeModel, + hardwareType, + descriptionSummary, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// + /// The resource-specific properties for this resource. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , and . + /// + /// A new instance for mocking. + public static AutonomousDatabaseData AutonomousDatabaseData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, AutonomousDatabaseBaseProperties properties = null) + { + tags ??= new Dictionary(); + + return new AutonomousDatabaseData( + id, + name, + resourceType, + systemData, + tags, + location, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Admin password. + /// Database type to be created. + /// The maintenance schedule type of the Autonomous Database Serverless. + /// The character set for the autonomous database. + /// The compute amount (CPUs) available to the database. + /// The compute model of the Autonomous Database. + /// The number of CPU cores to be made available to the database. + /// Customer Contacts. + /// The quantity of data in the database, in terabytes. + /// The size, in gigabytes, of the data volume that will be created and attached to the database. + /// A valid Oracle Database version for Autonomous Database. + /// The Autonomous Database workload type. + /// The user-friendly name for the Autonomous Database. + /// Indicates if auto scaling is enabled for the Autonomous Database CPU core count. + /// Indicates if auto scaling is enabled for the Autonomous Database storage. + /// The list of Azure resource IDs of standby databases located in Autonomous Data Guard remote regions that are associated with the source database. Note that for Autonomous Database Serverless instances, standby databases located in the same region as the source primary database do not have Azure IDs. + /// The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current peer database. + /// Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. + /// Indicates whether the Autonomous Database has Cross Region Data Guard enabled. + /// Indicates the local disaster recovery (DR) type of the Autonomous Database Serverless instance.Autonomous Data Guard (ADG) DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover.Backup-based DR type provides lower cost DR with a slower RTO during failover or switchover. + /// The date and time the Disaster Recovery role was switched for the standby Autonomous Database. + /// Indicates remote disaster recovery configuration. + /// Local Autonomous Disaster Recovery standby database details. + /// Indicates the number of seconds of data loss for a Data Guard failover. + /// Specifies if the Autonomous Database requires mTLS connections. + /// Specifies if the Autonomous Database preview version is being provisioned. + /// The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED. + /// The character set for the Autonomous Database. + /// Additional information about the current lifecycle state. + /// Azure resource provisioning state. + /// Views lifecycleState. + /// The list of scheduled operations. + /// The private endpoint Ip address for the resource. + /// The resource's private endpoint label. + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + /// Client subnet. + /// VNET for network connectivity. + /// The date and time that the database was created. + /// The date and time when maintenance will begin. + /// The date and time when maintenance will end. + /// The current amount of storage in use for user and system data, in terabytes (TB). + /// The amount of storage currently allocated for the database tables and billed for, rounded up. + /// Information about Oracle APEX Application Development. + /// List of Oracle Database versions available for a database upgrade. If there are no version upgrades available, this list is empty. + /// The connection string used to connect to the Autonomous Database. + /// The URLs for accessing Oracle Application Express (APEX) and SQL Developer Web with a browser from a Compute instance within your VCN or that has a direct connection to your VCN. + /// Status of the Data Safe registration for this Autonomous Database. + /// The Oracle Database Edition that applies to the Autonomous databases. + /// Autonomous Database ID. + /// The area assigned to In-Memory tables in Autonomous Database. + /// The date and time when the next long-term backup would be created. + /// Details for the long-term backup schedule. + /// Indicates if the Autonomous Database version is a preview version. + /// Parameter that allows users to select an acceptable maximum data loss limit in seconds, up to which Automatic Failover will be triggered when necessary for a Local Autonomous Data Guard. + /// The amount of memory (in GBs) enabled per ECPU or OCPU. + /// Indicates the Autonomous Database mode. + /// Status of Operations Insights for this Autonomous Database. + /// The Autonomous Database permission level. + /// The private endpoint for the resource. + /// An array of CPU values that an Autonomous Database can be scaled to. + /// The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. + /// The URL of the Service Console for the Autonomous Database. + /// The SQL Web Developer URL for the Oracle Autonomous Database. + /// The list of regions that support the creation of an Autonomous Database clone or an Autonomous Data Guard standby database. + /// The date and time the Autonomous Data Guard role was switched for the Autonomous Database. + /// The date and time the Always Free database will be automatically deleted because of inactivity. + /// The date and time that Autonomous Data Guard was enabled for an Autonomous Database where the standby was provisioned in the same region as the primary database. + /// The timestamp of the last failover operation. + /// The date and time when last refresh happened. + /// The refresh point timestamp (UTC). + /// The timestamp of the last switchover operation for the Autonomous Database. + /// The date and time the Always Free database will be stopped because of inactivity. + /// The storage space consumed by Autonomous Database in GBs. + /// The amount of storage that has been used, in terabytes. + /// Database ocid. + /// Retention period, in days, for long-term backups. + /// The client IP access control list (ACL). This is an array of CIDR notations and/or IP addresses. Values should be separate strings, separated by commas. Example: ['1.1.1.1','1.1.1.0/24','1.1.2.25']. + /// A new instance for mocking. + public static AutonomousDatabaseBaseProperties AutonomousDatabaseBaseProperties(string adminPassword = null, string dataBaseType = null, AutonomousMaintenanceScheduleType? autonomousMaintenanceScheduleType = null, string characterSet = null, float? computeCount = null, ComputeModel? computeModel = null, int? cpuCoreCount = null, IEnumerable customerContacts = null, int? dataStorageSizeInTbs = null, int? dataStorageSizeInGbs = null, string dbVersion = null, WorkloadType? dbWorkload = null, string displayName = null, bool? isAutoScalingEnabled = null, bool? isAutoScalingForStorageEnabled = null, IEnumerable peerDbIds = null, string peerDbId = null, bool? isLocalDataGuardEnabled = null, bool? isRemoteDataGuardEnabled = null, DisasterRecoveryType? localDisasterRecoveryType = null, DateTimeOffset? timeDisasterRecoveryRoleChanged = null, DisasterRecoveryConfigurationDetails remoteDisasterRecoveryConfiguration = null, AutonomousDatabaseStandbySummary localStandbyDb = null, int? failedDataRecoveryInSeconds = null, bool? isMtlsConnectionRequired = null, bool? isPreviewVersionWithServiceTermsAccepted = null, LicenseModel? licenseModel = null, string ncharacterSet = null, string lifecycleDetails = null, AzureResourceProvisioningState? provisioningState = null, AutonomousDatabaseLifecycleState? lifecycleState = null, ScheduledOperationsType scheduledOperations = null, string privateEndpointIP = null, string privateEndpointLabel = null, string ociUri = null, ResourceIdentifier subnetId = null, ResourceIdentifier vnetId = null, DateTimeOffset? timeCreated = null, DateTimeOffset? timeMaintenanceBegin = null, DateTimeOffset? timeMaintenanceEnd = null, double? actualUsedDataStorageSizeInTbs = null, double? allocatedStorageSizeInTbs = null, ApexDetailsType apexDetails = null, IEnumerable availableUpgradeVersions = null, ConnectionStringType connectionStrings = null, ConnectionUrlType connectionUrls = null, DataSafeStatusType? dataSafeStatus = null, DatabaseEditionType? databaseEdition = null, ResourceIdentifier autonomousDatabaseId = null, int? inMemoryAreaInGbs = null, DateTimeOffset? nextLongTermBackupTimeStamp = null, LongTermBackUpScheduleDetails longTermBackupSchedule = null, bool? isPreview = null, int? localAdgAutoFailoverMaxDataLossLimit = null, int? memoryPerOracleComputeUnitInGbs = null, OpenModeType? openMode = null, OperationsInsightsStatusType? operationsInsightsStatus = null, PermissionLevelType? permissionLevel = null, string privateEndpoint = null, IEnumerable provisionableCpus = null, RoleType? role = null, string serviceConsoleUri = null, string sqlWebDeveloperUri = null, IEnumerable supportedRegionsToCloneTo = null, string timeDataGuardRoleChanged = null, string timeDeletionOfFreeAutonomousDatabase = null, string timeLocalDataGuardEnabled = null, string timeOfLastFailover = null, string timeOfLastRefresh = null, string timeOfLastRefreshPoint = null, string timeOfLastSwitchover = null, string timeReclamationOfFreeAutonomousDatabase = null, int? usedDataStorageSizeInGbs = null, int? usedDataStorageSizeInTbs = null, string ocid = null, int? backupRetentionPeriodInDays = null, IEnumerable whitelistedIPs = null) + { + customerContacts ??= new List(); + peerDbIds ??= new List(); + availableUpgradeVersions ??= new List(); + provisionableCpus ??= new List(); + supportedRegionsToCloneTo ??= new List(); + whitelistedIPs ??= new List(); + + return new UnknownAutonomousDatabaseBaseProperties( + adminPassword, + dataBaseType == null ? default : new DataBaseType(dataBaseType), + autonomousMaintenanceScheduleType, + characterSet, + computeCount, + computeModel, + cpuCoreCount, + customerContacts?.ToList(), + dataStorageSizeInTbs, + dataStorageSizeInGbs, + dbVersion, + dbWorkload, + displayName, + isAutoScalingEnabled, + isAutoScalingForStorageEnabled, + peerDbIds?.ToList(), + peerDbId, + isLocalDataGuardEnabled, + isRemoteDataGuardEnabled, + localDisasterRecoveryType, + timeDisasterRecoveryRoleChanged, + remoteDisasterRecoveryConfiguration, + localStandbyDb, + failedDataRecoveryInSeconds, + isMtlsConnectionRequired, + isPreviewVersionWithServiceTermsAccepted, + licenseModel, + ncharacterSet, + lifecycleDetails, + provisioningState, + lifecycleState, + scheduledOperations, + privateEndpointIP, + privateEndpointLabel, + ociUri, + subnetId, + vnetId, + timeCreated, + timeMaintenanceBegin, + timeMaintenanceEnd, + actualUsedDataStorageSizeInTbs, + allocatedStorageSizeInTbs, + apexDetails, + availableUpgradeVersions?.ToList(), + connectionStrings, + connectionUrls, + dataSafeStatus, + databaseEdition, + autonomousDatabaseId, + inMemoryAreaInGbs, + nextLongTermBackupTimeStamp, + longTermBackupSchedule, + isPreview, + localAdgAutoFailoverMaxDataLossLimit, + memoryPerOracleComputeUnitInGbs, + openMode, + operationsInsightsStatus, + permissionLevel, + privateEndpoint, + provisionableCpus?.ToList(), + role, + serviceConsoleUri, + sqlWebDeveloperUri, + supportedRegionsToCloneTo?.ToList(), + timeDataGuardRoleChanged, + timeDeletionOfFreeAutonomousDatabase, + timeLocalDataGuardEnabled, + timeOfLastFailover, + timeOfLastRefresh, + timeOfLastRefreshPoint, + timeOfLastSwitchover, + timeReclamationOfFreeAutonomousDatabase, + usedDataStorageSizeInGbs, + usedDataStorageSizeInTbs, + ocid, + backupRetentionPeriodInDays, + whitelistedIPs?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The amount of time, in seconds, that the data of the standby database lags the data of the primary database. Can be used to determine the potential data loss in the event of a failover. + /// The current state of the Autonomous Database. + /// Additional information about the current lifecycle state. + /// The date and time the Autonomous Data Guard role was switched for the standby Autonomous Database. + /// The date and time the Disaster Recovery role was switched for the standby Autonomous Database. + /// A new instance for mocking. + public static AutonomousDatabaseStandbySummary AutonomousDatabaseStandbySummary(int? lagTimeInSeconds = null, AutonomousDatabaseLifecycleState? lifecycleState = null, string lifecycleDetails = null, string timeDataGuardRoleChanged = null, string timeDisasterRecoveryRoleChanged = null) + { + return new AutonomousDatabaseStandbySummary( + lagTimeInSeconds, + lifecycleState, + lifecycleDetails, + timeDataGuardRoleChanged, + timeDisasterRecoveryRoleChanged, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The Oracle APEX Application Development version. + /// The Oracle REST Data Services (ORDS) version. + /// A new instance for mocking. + public static ApexDetailsType ApexDetailsType(string apexVersion = null, string ordsVersion = null) + { + return new ApexDetailsType(apexVersion, ordsVersion, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Returns all connection strings that can be used to connect to the Autonomous Database. + /// The database service provides the least level of resources to each SQL statement, but supports the most number of concurrent SQL statements. + /// The High database service provides the highest level of resources to each SQL statement resulting in the highest performance, but supports the fewest number of concurrent SQL statements. + /// The Low database service provides the least level of resources to each SQL statement, but supports the most number of concurrent SQL statements. + /// The Medium database service provides a lower level of resources to each SQL statement potentially resulting a lower level of performance, but supports more concurrent SQL statements. + /// A list of connection string profiles to allow clients to group, filter and select connection string values based on structured metadata. + /// A new instance for mocking. + public static ConnectionStringType ConnectionStringType(AllConnectionStringType allConnectionStrings = null, string dedicated = null, string high = null, string low = null, string medium = null, IEnumerable profiles = null) + { + profiles ??= new List(); + + return new ConnectionStringType( + allConnectionStrings, + dedicated, + high, + low, + medium, + profiles?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The High database service provides the highest level of resources to each SQL statement resulting in the highest performance, but supports the fewest number of concurrent SQL statements. + /// The Low database service provides the least level of resources to each SQL statement, but supports the most number of concurrent SQL statements. + /// The Medium database service provides a lower level of resources to each SQL statement potentially resulting a lower level of performance, but supports more concurrent SQL statements. + /// A new instance for mocking. + public static AllConnectionStringType AllConnectionStringType(string high = null, string low = null, string medium = null) + { + return new AllConnectionStringType(high, low, medium, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Consumer group used by the connection. + /// A user-friendly name for the connection. + /// Host format used in connection string. + /// True for a regional connection string, applicable to cross-region DG only. + /// Protocol used by the connection. + /// Specifies whether the listener performs a direct hand-off of the session, or redirects the session. + /// Specifies whether the connection string is using the long (LONG), Easy Connect (EZCONNECT), or Easy Connect Plus (EZCONNECTPLUS) format. + /// Specifies whether the TLS handshake is using one-way (SERVER) or mutual (MUTUAL) authentication. + /// Connection string value. + /// A new instance for mocking. + public static ProfileType ProfileType(ConsumerGroup? consumerGroup = null, string displayName = null, HostFormatType hostFormat = default, bool? isRegional = null, ProtocolType protocol = default, SessionModeType sessionMode = default, SyntaxFormatType syntaxFormat = default, TlsAuthenticationType? tlsAuthentication = null, string value = null) + { + return new ProfileType( + consumerGroup, + displayName, + hostFormat, + isRegional, + protocol, + sessionMode, + syntaxFormat, + tlsAuthentication, + value, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Oracle Application Express (APEX) URL. + /// The URL of the Database Transforms for the Autonomous Database. + /// The URL of the Graph Studio for the Autonomous Database. + /// The URL of the Oracle Machine Learning (OML) Notebook for the Autonomous Database. + /// The URL of the MongoDB API for the Autonomous Database. + /// The Oracle REST Data Services (ORDS) URL of the Web Access for the Autonomous Database. + /// Oracle SQL Developer Web URL. + /// A new instance for mocking. + public static ConnectionUrlType ConnectionUrlType(string apexUri = null, string databaseTransformsUri = null, string graphStudioUri = null, string machineLearningNotebookUri = null, string mongoDbUri = null, string ordsUri = null, string sqlDevWebUri = null) + { + return new ConnectionUrlType( + apexUri, + databaseTransformsUri, + graphStudioUri, + machineLearningNotebookUri, + mongoDbUri, + ordsUri, + sqlDevWebUri, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Admin password. + /// The maintenance schedule type of the Autonomous Database Serverless. + /// The character set for the autonomous database. + /// The compute amount (CPUs) available to the database. + /// The compute model of the Autonomous Database. + /// The number of CPU cores to be made available to the database. + /// Customer Contacts. + /// The quantity of data in the database, in terabytes. + /// The size, in gigabytes, of the data volume that will be created and attached to the database. + /// A valid Oracle Database version for Autonomous Database. + /// The Autonomous Database workload type. + /// The user-friendly name for the Autonomous Database. + /// Indicates if auto scaling is enabled for the Autonomous Database CPU core count. + /// Indicates if auto scaling is enabled for the Autonomous Database storage. + /// The list of Azure resource IDs of standby databases located in Autonomous Data Guard remote regions that are associated with the source database. Note that for Autonomous Database Serverless instances, standby databases located in the same region as the source primary database do not have Azure IDs. + /// The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current peer database. + /// Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. + /// Indicates whether the Autonomous Database has Cross Region Data Guard enabled. + /// Indicates the local disaster recovery (DR) type of the Autonomous Database Serverless instance.Autonomous Data Guard (ADG) DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover.Backup-based DR type provides lower cost DR with a slower RTO during failover or switchover. + /// The date and time the Disaster Recovery role was switched for the standby Autonomous Database. + /// Indicates remote disaster recovery configuration. + /// Local Autonomous Disaster Recovery standby database details. + /// Indicates the number of seconds of data loss for a Data Guard failover. + /// Specifies if the Autonomous Database requires mTLS connections. + /// Specifies if the Autonomous Database preview version is being provisioned. + /// The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED. + /// The character set for the Autonomous Database. + /// Additional information about the current lifecycle state. + /// Azure resource provisioning state. + /// Views lifecycleState. + /// The list of scheduled operations. + /// The private endpoint Ip address for the resource. + /// The resource's private endpoint label. + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + /// Client subnet. + /// VNET for network connectivity. + /// The date and time that the database was created. + /// The date and time when maintenance will begin. + /// The date and time when maintenance will end. + /// The current amount of storage in use for user and system data, in terabytes (TB). + /// The amount of storage currently allocated for the database tables and billed for, rounded up. + /// Information about Oracle APEX Application Development. + /// List of Oracle Database versions available for a database upgrade. If there are no version upgrades available, this list is empty. + /// The connection string used to connect to the Autonomous Database. + /// The URLs for accessing Oracle Application Express (APEX) and SQL Developer Web with a browser from a Compute instance within your VCN or that has a direct connection to your VCN. + /// Status of the Data Safe registration for this Autonomous Database. + /// The Oracle Database Edition that applies to the Autonomous databases. + /// Autonomous Database ID. + /// The area assigned to In-Memory tables in Autonomous Database. + /// The date and time when the next long-term backup would be created. + /// Details for the long-term backup schedule. + /// Indicates if the Autonomous Database version is a preview version. + /// Parameter that allows users to select an acceptable maximum data loss limit in seconds, up to which Automatic Failover will be triggered when necessary for a Local Autonomous Data Guard. + /// The amount of memory (in GBs) enabled per ECPU or OCPU. + /// Indicates the Autonomous Database mode. + /// Status of Operations Insights for this Autonomous Database. + /// The Autonomous Database permission level. + /// The private endpoint for the resource. + /// An array of CPU values that an Autonomous Database can be scaled to. + /// The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. + /// The URL of the Service Console for the Autonomous Database. + /// The SQL Web Developer URL for the Oracle Autonomous Database. + /// The list of regions that support the creation of an Autonomous Database clone or an Autonomous Data Guard standby database. + /// The date and time the Autonomous Data Guard role was switched for the Autonomous Database. + /// The date and time the Always Free database will be automatically deleted because of inactivity. + /// The date and time that Autonomous Data Guard was enabled for an Autonomous Database where the standby was provisioned in the same region as the primary database. + /// The timestamp of the last failover operation. + /// The date and time when last refresh happened. + /// The refresh point timestamp (UTC). + /// The timestamp of the last switchover operation for the Autonomous Database. + /// The date and time the Always Free database will be stopped because of inactivity. + /// The storage space consumed by Autonomous Database in GBs. + /// The amount of storage that has been used, in terabytes. + /// Database ocid. + /// Retention period, in days, for long-term backups. + /// The client IP access control list (ACL). This is an array of CIDR notations and/or IP addresses. Values should be separate strings, separated by commas. Example: ['1.1.1.1','1.1.1.0/24','1.1.2.25']. + /// A new instance for mocking. + public static AutonomousDatabaseProperties AutonomousDatabaseProperties(string adminPassword = null, AutonomousMaintenanceScheduleType? autonomousMaintenanceScheduleType = null, string characterSet = null, float? computeCount = null, ComputeModel? computeModel = null, int? cpuCoreCount = null, IEnumerable customerContacts = null, int? dataStorageSizeInTbs = null, int? dataStorageSizeInGbs = null, string dbVersion = null, WorkloadType? dbWorkload = null, string displayName = null, bool? isAutoScalingEnabled = null, bool? isAutoScalingForStorageEnabled = null, IEnumerable peerDbIds = null, string peerDbId = null, bool? isLocalDataGuardEnabled = null, bool? isRemoteDataGuardEnabled = null, DisasterRecoveryType? localDisasterRecoveryType = null, DateTimeOffset? timeDisasterRecoveryRoleChanged = null, DisasterRecoveryConfigurationDetails remoteDisasterRecoveryConfiguration = null, AutonomousDatabaseStandbySummary localStandbyDb = null, int? failedDataRecoveryInSeconds = null, bool? isMtlsConnectionRequired = null, bool? isPreviewVersionWithServiceTermsAccepted = null, LicenseModel? licenseModel = null, string ncharacterSet = null, string lifecycleDetails = null, AzureResourceProvisioningState? provisioningState = null, AutonomousDatabaseLifecycleState? lifecycleState = null, ScheduledOperationsType scheduledOperations = null, string privateEndpointIP = null, string privateEndpointLabel = null, string ociUri = null, ResourceIdentifier subnetId = null, ResourceIdentifier vnetId = null, DateTimeOffset? timeCreated = null, DateTimeOffset? timeMaintenanceBegin = null, DateTimeOffset? timeMaintenanceEnd = null, double? actualUsedDataStorageSizeInTbs = null, double? allocatedStorageSizeInTbs = null, ApexDetailsType apexDetails = null, IEnumerable availableUpgradeVersions = null, ConnectionStringType connectionStrings = null, ConnectionUrlType connectionUrls = null, DataSafeStatusType? dataSafeStatus = null, DatabaseEditionType? databaseEdition = null, ResourceIdentifier autonomousDatabaseId = null, int? inMemoryAreaInGbs = null, DateTimeOffset? nextLongTermBackupTimeStamp = null, LongTermBackUpScheduleDetails longTermBackupSchedule = null, bool? isPreview = null, int? localAdgAutoFailoverMaxDataLossLimit = null, int? memoryPerOracleComputeUnitInGbs = null, OpenModeType? openMode = null, OperationsInsightsStatusType? operationsInsightsStatus = null, PermissionLevelType? permissionLevel = null, string privateEndpoint = null, IEnumerable provisionableCpus = null, RoleType? role = null, string serviceConsoleUri = null, string sqlWebDeveloperUri = null, IEnumerable supportedRegionsToCloneTo = null, string timeDataGuardRoleChanged = null, string timeDeletionOfFreeAutonomousDatabase = null, string timeLocalDataGuardEnabled = null, string timeOfLastFailover = null, string timeOfLastRefresh = null, string timeOfLastRefreshPoint = null, string timeOfLastSwitchover = null, string timeReclamationOfFreeAutonomousDatabase = null, int? usedDataStorageSizeInGbs = null, int? usedDataStorageSizeInTbs = null, string ocid = null, int? backupRetentionPeriodInDays = null, IEnumerable whitelistedIPs = null) + { + customerContacts ??= new List(); + peerDbIds ??= new List(); + availableUpgradeVersions ??= new List(); + provisionableCpus ??= new List(); + supportedRegionsToCloneTo ??= new List(); + whitelistedIPs ??= new List(); + + return new AutonomousDatabaseProperties( + adminPassword, + DataBaseType.Regular, + autonomousMaintenanceScheduleType, + characterSet, + computeCount, + computeModel, + cpuCoreCount, + customerContacts?.ToList(), + dataStorageSizeInTbs, + dataStorageSizeInGbs, + dbVersion, + dbWorkload, + displayName, + isAutoScalingEnabled, + isAutoScalingForStorageEnabled, + peerDbIds?.ToList(), + peerDbId, + isLocalDataGuardEnabled, + isRemoteDataGuardEnabled, + localDisasterRecoveryType, + timeDisasterRecoveryRoleChanged, + remoteDisasterRecoveryConfiguration, + localStandbyDb, + failedDataRecoveryInSeconds, + isMtlsConnectionRequired, + isPreviewVersionWithServiceTermsAccepted, + licenseModel, + ncharacterSet, + lifecycleDetails, + provisioningState, + lifecycleState, + scheduledOperations, + privateEndpointIP, + privateEndpointLabel, + ociUri, + subnetId, + vnetId, + timeCreated, + timeMaintenanceBegin, + timeMaintenanceEnd, + actualUsedDataStorageSizeInTbs, + allocatedStorageSizeInTbs, + apexDetails, + availableUpgradeVersions?.ToList(), + connectionStrings, + connectionUrls, + dataSafeStatus, + databaseEdition, + autonomousDatabaseId, + inMemoryAreaInGbs, + nextLongTermBackupTimeStamp, + longTermBackupSchedule, + isPreview, + localAdgAutoFailoverMaxDataLossLimit, + memoryPerOracleComputeUnitInGbs, + openMode, + operationsInsightsStatus, + permissionLevel, + privateEndpoint, + provisionableCpus?.ToList(), + role, + serviceConsoleUri, + sqlWebDeveloperUri, + supportedRegionsToCloneTo?.ToList(), + timeDataGuardRoleChanged, + timeDeletionOfFreeAutonomousDatabase, + timeLocalDataGuardEnabled, + timeOfLastFailover, + timeOfLastRefresh, + timeOfLastRefreshPoint, + timeOfLastSwitchover, + timeReclamationOfFreeAutonomousDatabase, + usedDataStorageSizeInGbs, + usedDataStorageSizeInTbs, + ocid, + backupRetentionPeriodInDays, + whitelistedIPs?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Admin password. + /// The maintenance schedule type of the Autonomous Database Serverless. + /// The character set for the autonomous database. + /// The compute amount (CPUs) available to the database. + /// The compute model of the Autonomous Database. + /// The number of CPU cores to be made available to the database. + /// Customer Contacts. + /// The quantity of data in the database, in terabytes. + /// The size, in gigabytes, of the data volume that will be created and attached to the database. + /// A valid Oracle Database version for Autonomous Database. + /// The Autonomous Database workload type. + /// The user-friendly name for the Autonomous Database. + /// Indicates if auto scaling is enabled for the Autonomous Database CPU core count. + /// Indicates if auto scaling is enabled for the Autonomous Database storage. + /// The list of Azure resource IDs of standby databases located in Autonomous Data Guard remote regions that are associated with the source database. Note that for Autonomous Database Serverless instances, standby databases located in the same region as the source primary database do not have Azure IDs. + /// The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current peer database. + /// Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. + /// Indicates whether the Autonomous Database has Cross Region Data Guard enabled. + /// Indicates the local disaster recovery (DR) type of the Autonomous Database Serverless instance.Autonomous Data Guard (ADG) DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover.Backup-based DR type provides lower cost DR with a slower RTO during failover or switchover. + /// The date and time the Disaster Recovery role was switched for the standby Autonomous Database. + /// Indicates remote disaster recovery configuration. + /// Local Autonomous Disaster Recovery standby database details. + /// Indicates the number of seconds of data loss for a Data Guard failover. + /// Specifies if the Autonomous Database requires mTLS connections. + /// Specifies if the Autonomous Database preview version is being provisioned. + /// The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED. + /// The character set for the Autonomous Database. + /// Additional information about the current lifecycle state. + /// Azure resource provisioning state. + /// Views lifecycleState. + /// The list of scheduled operations. + /// The private endpoint Ip address for the resource. + /// The resource's private endpoint label. + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + /// Client subnet. + /// VNET for network connectivity. + /// The date and time that the database was created. + /// The date and time when maintenance will begin. + /// The date and time when maintenance will end. + /// The current amount of storage in use for user and system data, in terabytes (TB). + /// The amount of storage currently allocated for the database tables and billed for, rounded up. + /// Information about Oracle APEX Application Development. + /// List of Oracle Database versions available for a database upgrade. If there are no version upgrades available, this list is empty. + /// The connection string used to connect to the Autonomous Database. + /// The URLs for accessing Oracle Application Express (APEX) and SQL Developer Web with a browser from a Compute instance within your VCN or that has a direct connection to your VCN. + /// Status of the Data Safe registration for this Autonomous Database. + /// The Oracle Database Edition that applies to the Autonomous databases. + /// Autonomous Database ID. + /// The area assigned to In-Memory tables in Autonomous Database. + /// The date and time when the next long-term backup would be created. + /// Details for the long-term backup schedule. + /// Indicates if the Autonomous Database version is a preview version. + /// Parameter that allows users to select an acceptable maximum data loss limit in seconds, up to which Automatic Failover will be triggered when necessary for a Local Autonomous Data Guard. + /// The amount of memory (in GBs) enabled per ECPU or OCPU. + /// Indicates the Autonomous Database mode. + /// Status of Operations Insights for this Autonomous Database. + /// The Autonomous Database permission level. + /// The private endpoint for the resource. + /// An array of CPU values that an Autonomous Database can be scaled to. + /// The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. + /// The URL of the Service Console for the Autonomous Database. + /// The SQL Web Developer URL for the Oracle Autonomous Database. + /// The list of regions that support the creation of an Autonomous Database clone or an Autonomous Data Guard standby database. + /// The date and time the Autonomous Data Guard role was switched for the Autonomous Database. + /// The date and time the Always Free database will be automatically deleted because of inactivity. + /// The date and time that Autonomous Data Guard was enabled for an Autonomous Database where the standby was provisioned in the same region as the primary database. + /// The timestamp of the last failover operation. + /// The date and time when last refresh happened. + /// The refresh point timestamp (UTC). + /// The timestamp of the last switchover operation for the Autonomous Database. + /// The date and time the Always Free database will be stopped because of inactivity. + /// The storage space consumed by Autonomous Database in GBs. + /// The amount of storage that has been used, in terabytes. + /// Database ocid. + /// Retention period, in days, for long-term backups. + /// The client IP access control list (ACL). This is an array of CIDR notations and/or IP addresses. Values should be separate strings, separated by commas. Example: ['1.1.1.1','1.1.1.0/24','1.1.2.25']. + /// The source of the database. + /// The Azure resource ID of the Autonomous Database that was cloned to create the current Autonomous Database. + /// The Autonomous Database clone type. + /// Indicates if the refreshable clone can be reconnected to its source database. + /// Indicates if the Autonomous Database is a refreshable clone. + /// The refresh mode of the clone. + /// The refresh status of the clone. + /// The time and date as an RFC3339 formatted string, e.g., 2022-01-01T12:00:00.000Z, to set the limit for a refreshable clone to be reconnected to its source database. + /// A new instance for mocking. + public static AutonomousDatabaseCloneProperties AutonomousDatabaseCloneProperties(string adminPassword = null, AutonomousMaintenanceScheduleType? autonomousMaintenanceScheduleType = null, string characterSet = null, float? computeCount = null, ComputeModel? computeModel = null, int? cpuCoreCount = null, IEnumerable customerContacts = null, int? dataStorageSizeInTbs = null, int? dataStorageSizeInGbs = null, string dbVersion = null, WorkloadType? dbWorkload = null, string displayName = null, bool? isAutoScalingEnabled = null, bool? isAutoScalingForStorageEnabled = null, IEnumerable peerDbIds = null, string peerDbId = null, bool? isLocalDataGuardEnabled = null, bool? isRemoteDataGuardEnabled = null, DisasterRecoveryType? localDisasterRecoveryType = null, DateTimeOffset? timeDisasterRecoveryRoleChanged = null, DisasterRecoveryConfigurationDetails remoteDisasterRecoveryConfiguration = null, AutonomousDatabaseStandbySummary localStandbyDb = null, int? failedDataRecoveryInSeconds = null, bool? isMtlsConnectionRequired = null, bool? isPreviewVersionWithServiceTermsAccepted = null, LicenseModel? licenseModel = null, string ncharacterSet = null, string lifecycleDetails = null, AzureResourceProvisioningState? provisioningState = null, AutonomousDatabaseLifecycleState? lifecycleState = null, ScheduledOperationsType scheduledOperations = null, string privateEndpointIP = null, string privateEndpointLabel = null, string ociUri = null, ResourceIdentifier subnetId = null, ResourceIdentifier vnetId = null, DateTimeOffset? timeCreated = null, DateTimeOffset? timeMaintenanceBegin = null, DateTimeOffset? timeMaintenanceEnd = null, double? actualUsedDataStorageSizeInTbs = null, double? allocatedStorageSizeInTbs = null, ApexDetailsType apexDetails = null, IEnumerable availableUpgradeVersions = null, ConnectionStringType connectionStrings = null, ConnectionUrlType connectionUrls = null, DataSafeStatusType? dataSafeStatus = null, DatabaseEditionType? databaseEdition = null, ResourceIdentifier autonomousDatabaseId = null, int? inMemoryAreaInGbs = null, DateTimeOffset? nextLongTermBackupTimeStamp = null, LongTermBackUpScheduleDetails longTermBackupSchedule = null, bool? isPreview = null, int? localAdgAutoFailoverMaxDataLossLimit = null, int? memoryPerOracleComputeUnitInGbs = null, OpenModeType? openMode = null, OperationsInsightsStatusType? operationsInsightsStatus = null, PermissionLevelType? permissionLevel = null, string privateEndpoint = null, IEnumerable provisionableCpus = null, RoleType? role = null, string serviceConsoleUri = null, string sqlWebDeveloperUri = null, IEnumerable supportedRegionsToCloneTo = null, string timeDataGuardRoleChanged = null, string timeDeletionOfFreeAutonomousDatabase = null, string timeLocalDataGuardEnabled = null, string timeOfLastFailover = null, string timeOfLastRefresh = null, string timeOfLastRefreshPoint = null, string timeOfLastSwitchover = null, string timeReclamationOfFreeAutonomousDatabase = null, int? usedDataStorageSizeInGbs = null, int? usedDataStorageSizeInTbs = null, string ocid = null, int? backupRetentionPeriodInDays = null, IEnumerable whitelistedIPs = null, SourceType? source = null, ResourceIdentifier sourceId = null, CloneType cloneType = default, bool? isReconnectCloneEnabled = null, bool? isRefreshableClone = null, RefreshableModelType? refreshableModel = null, RefreshableStatusType? refreshableStatus = null, string timeUntilReconnectCloneEnabled = null) + { + customerContacts ??= new List(); + peerDbIds ??= new List(); + availableUpgradeVersions ??= new List(); + provisionableCpus ??= new List(); + supportedRegionsToCloneTo ??= new List(); + whitelistedIPs ??= new List(); + + return new AutonomousDatabaseCloneProperties( + adminPassword, + DataBaseType.Clone, + autonomousMaintenanceScheduleType, + characterSet, + computeCount, + computeModel, + cpuCoreCount, + customerContacts?.ToList(), + dataStorageSizeInTbs, + dataStorageSizeInGbs, + dbVersion, + dbWorkload, + displayName, + isAutoScalingEnabled, + isAutoScalingForStorageEnabled, + peerDbIds?.ToList(), + peerDbId, + isLocalDataGuardEnabled, + isRemoteDataGuardEnabled, + localDisasterRecoveryType, + timeDisasterRecoveryRoleChanged, + remoteDisasterRecoveryConfiguration, + localStandbyDb, + failedDataRecoveryInSeconds, + isMtlsConnectionRequired, + isPreviewVersionWithServiceTermsAccepted, + licenseModel, + ncharacterSet, + lifecycleDetails, + provisioningState, + lifecycleState, + scheduledOperations, + privateEndpointIP, + privateEndpointLabel, + ociUri, + subnetId, + vnetId, + timeCreated, + timeMaintenanceBegin, + timeMaintenanceEnd, + actualUsedDataStorageSizeInTbs, + allocatedStorageSizeInTbs, + apexDetails, + availableUpgradeVersions?.ToList(), + connectionStrings, + connectionUrls, + dataSafeStatus, + databaseEdition, + autonomousDatabaseId, + inMemoryAreaInGbs, + nextLongTermBackupTimeStamp, + longTermBackupSchedule, + isPreview, + localAdgAutoFailoverMaxDataLossLimit, + memoryPerOracleComputeUnitInGbs, + openMode, + operationsInsightsStatus, + permissionLevel, + privateEndpoint, + provisionableCpus?.ToList(), + role, + serviceConsoleUri, + sqlWebDeveloperUri, + supportedRegionsToCloneTo?.ToList(), + timeDataGuardRoleChanged, + timeDeletionOfFreeAutonomousDatabase, + timeLocalDataGuardEnabled, + timeOfLastFailover, + timeOfLastRefresh, + timeOfLastRefreshPoint, + timeOfLastSwitchover, + timeReclamationOfFreeAutonomousDatabase, + usedDataStorageSizeInGbs, + usedDataStorageSizeInTbs, + ocid, + backupRetentionPeriodInDays, + whitelistedIPs?.ToList(), + serializedAdditionalRawData: null, + source, + sourceId, + cloneType, + isReconnectCloneEnabled, + isRefreshableClone, + refreshableModel, + refreshableStatus, + timeUntilReconnectCloneEnabled); + } + + /// Initializes a new instance of . + /// Admin password. + /// The maintenance schedule type of the Autonomous Database Serverless. + /// The character set for the autonomous database. + /// The compute amount (CPUs) available to the database. + /// The compute model of the Autonomous Database. + /// The number of CPU cores to be made available to the database. + /// Customer Contacts. + /// The quantity of data in the database, in terabytes. + /// The size, in gigabytes, of the data volume that will be created and attached to the database. + /// A valid Oracle Database version for Autonomous Database. + /// The Autonomous Database workload type. + /// The user-friendly name for the Autonomous Database. + /// Indicates if auto scaling is enabled for the Autonomous Database CPU core count. + /// Indicates if auto scaling is enabled for the Autonomous Database storage. + /// The list of Azure resource IDs of standby databases located in Autonomous Data Guard remote regions that are associated with the source database. Note that for Autonomous Database Serverless instances, standby databases located in the same region as the source primary database do not have Azure IDs. + /// The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current peer database. + /// Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. + /// Indicates whether the Autonomous Database has Cross Region Data Guard enabled. + /// Indicates the local disaster recovery (DR) type of the Autonomous Database Serverless instance.Autonomous Data Guard (ADG) DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover.Backup-based DR type provides lower cost DR with a slower RTO during failover or switchover. + /// The date and time the Disaster Recovery role was switched for the standby Autonomous Database. + /// Indicates remote disaster recovery configuration. + /// Local Autonomous Disaster Recovery standby database details. + /// Indicates the number of seconds of data loss for a Data Guard failover. + /// Specifies if the Autonomous Database requires mTLS connections. + /// Specifies if the Autonomous Database preview version is being provisioned. + /// The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED. + /// The character set for the Autonomous Database. + /// Additional information about the current lifecycle state. + /// Azure resource provisioning state. + /// Views lifecycleState. + /// The list of scheduled operations. + /// The private endpoint Ip address for the resource. + /// The resource's private endpoint label. + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + /// Client subnet. + /// VNET for network connectivity. + /// The date and time that the database was created. + /// The date and time when maintenance will begin. + /// The date and time when maintenance will end. + /// The current amount of storage in use for user and system data, in terabytes (TB). + /// The amount of storage currently allocated for the database tables and billed for, rounded up. + /// Information about Oracle APEX Application Development. + /// List of Oracle Database versions available for a database upgrade. If there are no version upgrades available, this list is empty. + /// The connection string used to connect to the Autonomous Database. + /// The URLs for accessing Oracle Application Express (APEX) and SQL Developer Web with a browser from a Compute instance within your VCN or that has a direct connection to your VCN. + /// Status of the Data Safe registration for this Autonomous Database. + /// The Oracle Database Edition that applies to the Autonomous databases. + /// Autonomous Database ID. + /// The area assigned to In-Memory tables in Autonomous Database. + /// The date and time when the next long-term backup would be created. + /// Details for the long-term backup schedule. + /// Indicates if the Autonomous Database version is a preview version. + /// Parameter that allows users to select an acceptable maximum data loss limit in seconds, up to which Automatic Failover will be triggered when necessary for a Local Autonomous Data Guard. + /// The amount of memory (in GBs) enabled per ECPU or OCPU. + /// Indicates the Autonomous Database mode. + /// Status of Operations Insights for this Autonomous Database. + /// The Autonomous Database permission level. + /// The private endpoint for the resource. + /// An array of CPU values that an Autonomous Database can be scaled to. + /// The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. + /// The URL of the Service Console for the Autonomous Database. + /// The SQL Web Developer URL for the Oracle Autonomous Database. + /// The list of regions that support the creation of an Autonomous Database clone or an Autonomous Data Guard standby database. + /// The date and time the Autonomous Data Guard role was switched for the Autonomous Database. + /// The date and time the Always Free database will be automatically deleted because of inactivity. + /// The date and time that Autonomous Data Guard was enabled for an Autonomous Database where the standby was provisioned in the same region as the primary database. + /// The timestamp of the last failover operation. + /// The date and time when last refresh happened. + /// The refresh point timestamp (UTC). + /// The timestamp of the last switchover operation for the Autonomous Database. + /// The date and time the Always Free database will be stopped because of inactivity. + /// The storage space consumed by Autonomous Database in GBs. + /// The amount of storage that has been used, in terabytes. + /// Database ocid. + /// Retention period, in days, for long-term backups. + /// The client IP access control list (ACL). This is an array of CIDR notations and/or IP addresses. Values should be separate strings, separated by commas. Example: ['1.1.1.1','1.1.1.0/24','1.1.2.25']. + /// The source of the database. + /// The Azure ID of the source Autonomous Database that will be used to create a new peer database for the DR association. + /// The name of the region where source Autonomous Database exists. + /// The source database ocid. + /// Indicates the cross-region disaster recovery (DR) type of the standby Autonomous Database Serverless instance. Autonomous Data Guard (ADG) DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover. Backup-based DR type provides lower cost DR with a slower RTO during failover or switchover. + /// If true, 7 days worth of backups are replicated across regions for Cross-Region ADB or Backup-Based DR between Primary and Standby. If false, the backups taken on the Primary are not replicated to the Standby database. + /// A new instance for mocking. + public static AutonomousDatabaseCrossRegionDisasterRecoveryProperties AutonomousDatabaseCrossRegionDisasterRecoveryProperties(string adminPassword = null, AutonomousMaintenanceScheduleType? autonomousMaintenanceScheduleType = null, string characterSet = null, float? computeCount = null, ComputeModel? computeModel = null, int? cpuCoreCount = null, IEnumerable customerContacts = null, int? dataStorageSizeInTbs = null, int? dataStorageSizeInGbs = null, string dbVersion = null, WorkloadType? dbWorkload = null, string displayName = null, bool? isAutoScalingEnabled = null, bool? isAutoScalingForStorageEnabled = null, IEnumerable peerDbIds = null, string peerDbId = null, bool? isLocalDataGuardEnabled = null, bool? isRemoteDataGuardEnabled = null, DisasterRecoveryType? localDisasterRecoveryType = null, DateTimeOffset? timeDisasterRecoveryRoleChanged = null, DisasterRecoveryConfigurationDetails remoteDisasterRecoveryConfiguration = null, AutonomousDatabaseStandbySummary localStandbyDb = null, int? failedDataRecoveryInSeconds = null, bool? isMtlsConnectionRequired = null, bool? isPreviewVersionWithServiceTermsAccepted = null, LicenseModel? licenseModel = null, string ncharacterSet = null, string lifecycleDetails = null, AzureResourceProvisioningState? provisioningState = null, AutonomousDatabaseLifecycleState? lifecycleState = null, ScheduledOperationsType scheduledOperations = null, string privateEndpointIP = null, string privateEndpointLabel = null, string ociUri = null, ResourceIdentifier subnetId = null, ResourceIdentifier vnetId = null, DateTimeOffset? timeCreated = null, DateTimeOffset? timeMaintenanceBegin = null, DateTimeOffset? timeMaintenanceEnd = null, double? actualUsedDataStorageSizeInTbs = null, double? allocatedStorageSizeInTbs = null, ApexDetailsType apexDetails = null, IEnumerable availableUpgradeVersions = null, ConnectionStringType connectionStrings = null, ConnectionUrlType connectionUrls = null, DataSafeStatusType? dataSafeStatus = null, DatabaseEditionType? databaseEdition = null, ResourceIdentifier autonomousDatabaseId = null, int? inMemoryAreaInGbs = null, DateTimeOffset? nextLongTermBackupTimeStamp = null, LongTermBackUpScheduleDetails longTermBackupSchedule = null, bool? isPreview = null, int? localAdgAutoFailoverMaxDataLossLimit = null, int? memoryPerOracleComputeUnitInGbs = null, OpenModeType? openMode = null, OperationsInsightsStatusType? operationsInsightsStatus = null, PermissionLevelType? permissionLevel = null, string privateEndpoint = null, IEnumerable provisionableCpus = null, RoleType? role = null, string serviceConsoleUri = null, string sqlWebDeveloperUri = null, IEnumerable supportedRegionsToCloneTo = null, string timeDataGuardRoleChanged = null, string timeDeletionOfFreeAutonomousDatabase = null, string timeLocalDataGuardEnabled = null, string timeOfLastFailover = null, string timeOfLastRefresh = null, string timeOfLastRefreshPoint = null, string timeOfLastSwitchover = null, string timeReclamationOfFreeAutonomousDatabase = null, int? usedDataStorageSizeInGbs = null, int? usedDataStorageSizeInTbs = null, string ocid = null, int? backupRetentionPeriodInDays = null, IEnumerable whitelistedIPs = null, SourceType source = default, ResourceIdentifier sourceId = null, string sourceLocation = null, string sourceOcid = null, DisasterRecoveryType remoteDisasterRecoveryType = default, bool? isReplicateAutomaticBackups = null) + { + customerContacts ??= new List(); + peerDbIds ??= new List(); + availableUpgradeVersions ??= new List(); + provisionableCpus ??= new List(); + supportedRegionsToCloneTo ??= new List(); + whitelistedIPs ??= new List(); + + return new AutonomousDatabaseCrossRegionDisasterRecoveryProperties( + adminPassword, + DataBaseType.CrossRegionDisasterRecovery, + autonomousMaintenanceScheduleType, + characterSet, + computeCount, + computeModel, + cpuCoreCount, + customerContacts?.ToList(), + dataStorageSizeInTbs, + dataStorageSizeInGbs, + dbVersion, + dbWorkload, + displayName, + isAutoScalingEnabled, + isAutoScalingForStorageEnabled, + peerDbIds?.ToList(), + peerDbId, + isLocalDataGuardEnabled, + isRemoteDataGuardEnabled, + localDisasterRecoveryType, + timeDisasterRecoveryRoleChanged, + remoteDisasterRecoveryConfiguration, + localStandbyDb, + failedDataRecoveryInSeconds, + isMtlsConnectionRequired, + isPreviewVersionWithServiceTermsAccepted, + licenseModel, + ncharacterSet, + lifecycleDetails, + provisioningState, + lifecycleState, + scheduledOperations, + privateEndpointIP, + privateEndpointLabel, + ociUri, + subnetId, + vnetId, + timeCreated, + timeMaintenanceBegin, + timeMaintenanceEnd, + actualUsedDataStorageSizeInTbs, + allocatedStorageSizeInTbs, + apexDetails, + availableUpgradeVersions?.ToList(), + connectionStrings, + connectionUrls, + dataSafeStatus, + databaseEdition, + autonomousDatabaseId, + inMemoryAreaInGbs, + nextLongTermBackupTimeStamp, + longTermBackupSchedule, + isPreview, + localAdgAutoFailoverMaxDataLossLimit, + memoryPerOracleComputeUnitInGbs, + openMode, + operationsInsightsStatus, + permissionLevel, + privateEndpoint, + provisionableCpus?.ToList(), + role, + serviceConsoleUri, + sqlWebDeveloperUri, + supportedRegionsToCloneTo?.ToList(), + timeDataGuardRoleChanged, + timeDeletionOfFreeAutonomousDatabase, + timeLocalDataGuardEnabled, + timeOfLastFailover, + timeOfLastRefresh, + timeOfLastRefreshPoint, + timeOfLastSwitchover, + timeReclamationOfFreeAutonomousDatabase, + usedDataStorageSizeInGbs, + usedDataStorageSizeInTbs, + ocid, + backupRetentionPeriodInDays, + whitelistedIPs?.ToList(), + serializedAdditionalRawData: null, + source, + sourceId, + sourceLocation, + sourceOcid, + remoteDisasterRecoveryType, + isReplicateAutomaticBackups); + } + + /// Initializes a new instance of . + /// Admin password. + /// The maintenance schedule type of the Autonomous Database Serverless. + /// The character set for the autonomous database. + /// The compute amount (CPUs) available to the database. + /// The compute model of the Autonomous Database. + /// The number of CPU cores to be made available to the database. + /// Customer Contacts. + /// The quantity of data in the database, in terabytes. + /// The size, in gigabytes, of the data volume that will be created and attached to the database. + /// A valid Oracle Database version for Autonomous Database. + /// The Autonomous Database workload type. + /// The user-friendly name for the Autonomous Database. + /// Indicates if auto scaling is enabled for the Autonomous Database CPU core count. + /// Indicates if auto scaling is enabled for the Autonomous Database storage. + /// The list of Azure resource IDs of standby databases located in Autonomous Data Guard remote regions that are associated with the source database. Note that for Autonomous Database Serverless instances, standby databases located in the same region as the source primary database do not have Azure IDs. + /// The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current peer database. + /// Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. + /// Indicates whether the Autonomous Database has Cross Region Data Guard enabled. + /// Indicates the local disaster recovery (DR) type of the Autonomous Database Serverless instance.Autonomous Data Guard (ADG) DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover.Backup-based DR type provides lower cost DR with a slower RTO during failover or switchover. + /// The date and time the Disaster Recovery role was switched for the standby Autonomous Database. + /// Indicates remote disaster recovery configuration. + /// Local Autonomous Disaster Recovery standby database details. + /// Indicates the number of seconds of data loss for a Data Guard failover. + /// Specifies if the Autonomous Database requires mTLS connections. + /// Specifies if the Autonomous Database preview version is being provisioned. + /// The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED. + /// The character set for the Autonomous Database. + /// Additional information about the current lifecycle state. + /// Azure resource provisioning state. + /// Views lifecycleState. + /// The list of scheduled operations. + /// The private endpoint Ip address for the resource. + /// The resource's private endpoint label. + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + /// Client subnet. + /// VNET for network connectivity. + /// The date and time that the database was created. + /// The date and time when maintenance will begin. + /// The date and time when maintenance will end. + /// The current amount of storage in use for user and system data, in terabytes (TB). + /// The amount of storage currently allocated for the database tables and billed for, rounded up. + /// Information about Oracle APEX Application Development. + /// List of Oracle Database versions available for a database upgrade. If there are no version upgrades available, this list is empty. + /// The connection string used to connect to the Autonomous Database. + /// The URLs for accessing Oracle Application Express (APEX) and SQL Developer Web with a browser from a Compute instance within your VCN or that has a direct connection to your VCN. + /// Status of the Data Safe registration for this Autonomous Database. + /// The Oracle Database Edition that applies to the Autonomous databases. + /// Autonomous Database ID. + /// The area assigned to In-Memory tables in Autonomous Database. + /// The date and time when the next long-term backup would be created. + /// Details for the long-term backup schedule. + /// Indicates if the Autonomous Database version is a preview version. + /// Parameter that allows users to select an acceptable maximum data loss limit in seconds, up to which Automatic Failover will be triggered when necessary for a Local Autonomous Data Guard. + /// The amount of memory (in GBs) enabled per ECPU or OCPU. + /// Indicates the Autonomous Database mode. + /// Status of Operations Insights for this Autonomous Database. + /// The Autonomous Database permission level. + /// The private endpoint for the resource. + /// An array of CPU values that an Autonomous Database can be scaled to. + /// The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. + /// The URL of the Service Console for the Autonomous Database. + /// The SQL Web Developer URL for the Oracle Autonomous Database. + /// The list of regions that support the creation of an Autonomous Database clone or an Autonomous Data Guard standby database. + /// The date and time the Autonomous Data Guard role was switched for the Autonomous Database. + /// The date and time the Always Free database will be automatically deleted because of inactivity. + /// The date and time that Autonomous Data Guard was enabled for an Autonomous Database where the standby was provisioned in the same region as the primary database. + /// The timestamp of the last failover operation. + /// The date and time when last refresh happened. + /// The refresh point timestamp (UTC). + /// The timestamp of the last switchover operation for the Autonomous Database. + /// The date and time the Always Free database will be stopped because of inactivity. + /// The storage space consumed by Autonomous Database in GBs. + /// The amount of storage that has been used, in terabytes. + /// Database ocid. + /// Retention period, in days, for long-term backups. + /// The client IP access control list (ACL). This is an array of CIDR notations and/or IP addresses. Values should be separate strings, separated by commas. Example: ['1.1.1.1','1.1.1.0/24','1.1.2.25']. + /// The source of the database. + /// The ID of the source Autonomous Database that you will clone to create a new Autonomous Database. + /// The Autonomous Database clone type. + /// The timestamp specified for the point-in-time clone of the source Autonomous Database. The timestamp must be in the past. + /// Clone from latest available backup timestamp. + /// A new instance for mocking. + public static AutonomousDatabaseFromBackupTimestampProperties AutonomousDatabaseFromBackupTimestampProperties(string adminPassword = null, AutonomousMaintenanceScheduleType? autonomousMaintenanceScheduleType = null, string characterSet = null, float? computeCount = null, ComputeModel? computeModel = null, int? cpuCoreCount = null, IEnumerable customerContacts = null, int? dataStorageSizeInTbs = null, int? dataStorageSizeInGbs = null, string dbVersion = null, WorkloadType? dbWorkload = null, string displayName = null, bool? isAutoScalingEnabled = null, bool? isAutoScalingForStorageEnabled = null, IEnumerable peerDbIds = null, string peerDbId = null, bool? isLocalDataGuardEnabled = null, bool? isRemoteDataGuardEnabled = null, DisasterRecoveryType? localDisasterRecoveryType = null, DateTimeOffset? timeDisasterRecoveryRoleChanged = null, DisasterRecoveryConfigurationDetails remoteDisasterRecoveryConfiguration = null, AutonomousDatabaseStandbySummary localStandbyDb = null, int? failedDataRecoveryInSeconds = null, bool? isMtlsConnectionRequired = null, bool? isPreviewVersionWithServiceTermsAccepted = null, LicenseModel? licenseModel = null, string ncharacterSet = null, string lifecycleDetails = null, AzureResourceProvisioningState? provisioningState = null, AutonomousDatabaseLifecycleState? lifecycleState = null, ScheduledOperationsType scheduledOperations = null, string privateEndpointIP = null, string privateEndpointLabel = null, string ociUri = null, ResourceIdentifier subnetId = null, ResourceIdentifier vnetId = null, DateTimeOffset? timeCreated = null, DateTimeOffset? timeMaintenanceBegin = null, DateTimeOffset? timeMaintenanceEnd = null, double? actualUsedDataStorageSizeInTbs = null, double? allocatedStorageSizeInTbs = null, ApexDetailsType apexDetails = null, IEnumerable availableUpgradeVersions = null, ConnectionStringType connectionStrings = null, ConnectionUrlType connectionUrls = null, DataSafeStatusType? dataSafeStatus = null, DatabaseEditionType? databaseEdition = null, ResourceIdentifier autonomousDatabaseId = null, int? inMemoryAreaInGbs = null, DateTimeOffset? nextLongTermBackupTimeStamp = null, LongTermBackUpScheduleDetails longTermBackupSchedule = null, bool? isPreview = null, int? localAdgAutoFailoverMaxDataLossLimit = null, int? memoryPerOracleComputeUnitInGbs = null, OpenModeType? openMode = null, OperationsInsightsStatusType? operationsInsightsStatus = null, PermissionLevelType? permissionLevel = null, string privateEndpoint = null, IEnumerable provisionableCpus = null, RoleType? role = null, string serviceConsoleUri = null, string sqlWebDeveloperUri = null, IEnumerable supportedRegionsToCloneTo = null, string timeDataGuardRoleChanged = null, string timeDeletionOfFreeAutonomousDatabase = null, string timeLocalDataGuardEnabled = null, string timeOfLastFailover = null, string timeOfLastRefresh = null, string timeOfLastRefreshPoint = null, string timeOfLastSwitchover = null, string timeReclamationOfFreeAutonomousDatabase = null, int? usedDataStorageSizeInGbs = null, int? usedDataStorageSizeInTbs = null, string ocid = null, int? backupRetentionPeriodInDays = null, IEnumerable whitelistedIPs = null, SourceType source = default, ResourceIdentifier sourceId = null, CloneType cloneType = default, DateTimeOffset? timestamp = null, bool? useLatestAvailableBackupTimeStamp = null) + { + customerContacts ??= new List(); + peerDbIds ??= new List(); + availableUpgradeVersions ??= new List(); + provisionableCpus ??= new List(); + supportedRegionsToCloneTo ??= new List(); + whitelistedIPs ??= new List(); + + return new AutonomousDatabaseFromBackupTimestampProperties( + adminPassword, + DataBaseType.CloneFromBackupTimestamp, + autonomousMaintenanceScheduleType, + characterSet, + computeCount, + computeModel, + cpuCoreCount, + customerContacts?.ToList(), + dataStorageSizeInTbs, + dataStorageSizeInGbs, + dbVersion, + dbWorkload, + displayName, + isAutoScalingEnabled, + isAutoScalingForStorageEnabled, + peerDbIds?.ToList(), + peerDbId, + isLocalDataGuardEnabled, + isRemoteDataGuardEnabled, + localDisasterRecoveryType, + timeDisasterRecoveryRoleChanged, + remoteDisasterRecoveryConfiguration, + localStandbyDb, + failedDataRecoveryInSeconds, + isMtlsConnectionRequired, + isPreviewVersionWithServiceTermsAccepted, + licenseModel, + ncharacterSet, + lifecycleDetails, + provisioningState, + lifecycleState, + scheduledOperations, + privateEndpointIP, + privateEndpointLabel, + ociUri, + subnetId, + vnetId, + timeCreated, + timeMaintenanceBegin, + timeMaintenanceEnd, + actualUsedDataStorageSizeInTbs, + allocatedStorageSizeInTbs, + apexDetails, + availableUpgradeVersions?.ToList(), + connectionStrings, + connectionUrls, + dataSafeStatus, + databaseEdition, + autonomousDatabaseId, + inMemoryAreaInGbs, + nextLongTermBackupTimeStamp, + longTermBackupSchedule, + isPreview, + localAdgAutoFailoverMaxDataLossLimit, + memoryPerOracleComputeUnitInGbs, + openMode, + operationsInsightsStatus, + permissionLevel, + privateEndpoint, + provisionableCpus?.ToList(), + role, + serviceConsoleUri, + sqlWebDeveloperUri, + supportedRegionsToCloneTo?.ToList(), + timeDataGuardRoleChanged, + timeDeletionOfFreeAutonomousDatabase, + timeLocalDataGuardEnabled, + timeOfLastFailover, + timeOfLastRefresh, + timeOfLastRefreshPoint, + timeOfLastSwitchover, + timeReclamationOfFreeAutonomousDatabase, + usedDataStorageSizeInGbs, + usedDataStorageSizeInTbs, + ocid, + backupRetentionPeriodInDays, + whitelistedIPs?.ToList(), + serializedAdditionalRawData: null, + source, + sourceId, + cloneType, + timestamp, + useLatestAvailableBackupTimeStamp); + } + + /// Initializes a new instance of . + /// The type of wallet to generate. + /// True when requesting regional connection strings in PDB connect info, applicable to cross-region DG only. + /// The password to encrypt the keys inside the wallet. + /// A new instance for mocking. + public static GenerateAutonomousDatabaseWalletDetails GenerateAutonomousDatabaseWalletDetails(GenerateType? generateType = null, bool? isRegional = null, string password = null) + { + return new GenerateAutonomousDatabaseWalletDetails(generateType, isRegional, password, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The base64 encoded wallet files. + /// A new instance for mocking. + public static AutonomousDatabaseWalletFile AutonomousDatabaseWalletFile(string walletFiles = null) + { + return new AutonomousDatabaseWalletFile(walletFiles, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static AutonomousDatabaseBackupData AutonomousDatabaseBackupData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, AutonomousDatabaseBackupProperties properties = null) + { + return new AutonomousDatabaseBackupData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The OCID of the Autonomous Database. + /// The size of the database in terabytes at the time the backup was taken. + /// A valid Oracle Database version for Autonomous Database. + /// The user-friendly name for the backup. The name does not have to be unique. + /// The OCID of the Autonomous Database backup. + /// Indicates whether the backup is user-initiated or automatic. + /// Indicates whether the backup can be used to restore the associated Autonomous Database. + /// Additional information about the current lifecycle state. + /// The current state of the backup. + /// Retention period, in days. + /// The backup size in terabytes (TB). + /// Timestamp until when the backup will be available. + /// The date and time the backup started. + /// The date and time the backup completed. + /// The type of backup. + /// Azure resource provisioning state. + /// A new instance for mocking. + public static AutonomousDatabaseBackupProperties AutonomousDatabaseBackupProperties(string autonomousDatabaseOcid = null, double? databaseSizeInTbs = null, string dbVersion = null, string displayName = null, string ocid = null, bool? isAutomatic = null, bool? isRestorable = null, string lifecycleDetails = null, AutonomousDatabaseBackupLifecycleState? lifecycleState = null, int? retentionPeriodInDays = null, double? sizeInTbs = null, DateTimeOffset? timeAvailableTil = null, string timeStarted = null, string timeEnded = null, AutonomousDatabaseBackupType? backupType = null, AzureResourceProvisioningState? provisioningState = null) + { + return new AutonomousDatabaseBackupProperties( + autonomousDatabaseOcid, + databaseSizeInTbs, + dbVersion, + displayName, + ocid, + isAutomatic, + isRestorable, + lifecycleDetails, + lifecycleState, + retentionPeriodInDays, + sizeInTbs, + timeAvailableTil, + timeStarted, + timeEnded, + backupType, + provisioningState, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static AutonomousDatabaseCharacterSetData AutonomousDatabaseCharacterSetData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string autonomousDatabaseCharacterSet = null) + { + return new AutonomousDatabaseCharacterSetData( + id, + name, + resourceType, + systemData, + autonomousDatabaseCharacterSet != null ? new AutonomousDatabaseCharacterSetProperties(autonomousDatabaseCharacterSet, serializedAdditionalRawData: null) : null, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static AutonomousDatabaseNationalCharacterSetData AutonomousDatabaseNationalCharacterSetData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string autonomousDatabaseNationalCharacterSet = null) + { + return new AutonomousDatabaseNationalCharacterSetData( + id, + name, + resourceType, + systemData, + autonomousDatabaseNationalCharacterSet != null ? new AutonomousDatabaseNationalCharacterSetProperties(autonomousDatabaseNationalCharacterSet, serializedAdditionalRawData: null) : null, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static AutonomousDbVersionData AutonomousDbVersionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, AutonomousDbVersionProperties properties = null) + { + return new AutonomousDbVersionData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Supported Autonomous Db versions. + /// The Autonomous Database workload type. + /// True if this version of the Oracle Database software's default is free. + /// True if this version of the Oracle Database software's default is paid. + /// True if this version of the Oracle Database software can be used for Always-Free Autonomous Databases. + /// True if this version of the Oracle Database software has payments enabled. + /// A new instance for mocking. + public static AutonomousDbVersionProperties AutonomousDbVersionProperties(string version = null, WorkloadType? dbWorkload = null, bool? isDefaultForFree = null, bool? isDefaultForPaid = null, bool? isFreeTierEnabled = null, bool? isPaidEnabled = null) + { + return new AutonomousDbVersionProperties( + version, + dbWorkload, + isDefaultForFree, + isDefaultForPaid, + isFreeTierEnabled, + isPaidEnabled, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The resource-specific properties for this resource. + /// The availability zones. + /// A new instance for mocking. + public static ExadbVmClusterData ExadbVmClusterData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ExadbVmClusterProperties properties = null, IEnumerable zones = null) + { + tags ??= new Dictionary(); + zones ??= new List(); + + return new ExadbVmClusterData( + id, + name, + resourceType, + systemData, + tags, + location, + properties, + zones?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// ExadbVmCluster ocid. + /// The cluster name for Exadata VM cluster on Exascale Infrastructure. The cluster name must begin with an alphabetic character, and may contain hyphens (-). Underscores (_) are not permitted. The cluster name can be no longer than 11 characters and is not case sensitive. + /// Client OCI backup subnet CIDR, default is 192.168.252.0/22. + /// HTTPS link to OCI Network Security Group exposed to Azure Customer via the Azure Interface. + /// Exadata VM cluster on Exascale Infrastructure provisioning state. + /// CloudVmCluster lifecycle state. + /// VNET for network connectivity. + /// Client subnet. + /// Indicates user preferences for the various diagnostic collection options for the VM cluster/Cloud VM cluster/VMBM DBCS. + /// Display Name. + /// A domain name used for the Exadata VM cluster on Exascale Infrastructure. + /// The number of ECPUs to enable for an Exadata VM cluster on Exascale Infrastructure. + /// The Azure Resource ID of the Exadata Database Storage Vault. + /// Grid Setup will be done using this Grid Image OCID. Can be obtained using giMinorVersions API. + /// The type of Grid Image. + /// Oracle Grid Infrastructure (GI) software version. + /// The hostname for the Exadata VM cluster on Exascale Infrastructure. + /// The Oracle license model that applies to the Exadata VM cluster on Exascale Infrastructure. The default is LICENSE_INCLUDED. + /// The memory that you want to be allocated in GBs. Memory is calculated based on 11 GB per VM core reserved. + /// The number of nodes in the Exadata VM cluster on Exascale Infrastructure. + /// CIDR blocks for additional NSG ingress rules. The VNET CIDRs used to provision the VM Cluster will be added by default. + /// The OCID of the zone the Exadata VM cluster on Exascale Infrastructure is associated with. + /// The OCID of the zone the Exadata VM cluster on Exascale Infrastructure is associated with. + /// The TCP Single Client Access Name (SCAN) port. The default port is 1521. + /// The TCPS Single Client Access Name (SCAN) port. The default port is 2484. + /// The port number configured for the listener on the Exadata VM cluster on Exascale Infrastructure. + /// The shape of the Exadata VM cluster on Exascale Infrastructure resource. + /// The public key portion of one or more key pairs used for SSH access to the Exadata VM cluster on Exascale Infrastructure. + /// Operating system version of the image. + /// The time zone of the Exadata VM cluster on Exascale Infrastructure. For details, see [Exadata Infrastructure Time Zones](/Content/Database/References/timezones.htm). + /// The number of Total ECPUs for an Exadata VM cluster on Exascale Infrastructure. + /// Filesystem storage details. + /// Additional information about the current lifecycle state. + /// The FQDN of the DNS record for the SCAN IP addresses that are associated with the Exadata VM cluster on Exascale Infrastructure. + /// The Single Client Access Name (SCAN) IP addresses associated with the Exadata VM cluster on Exascale Infrastructure. SCAN IP addresses are typically used for load balancing and are not assigned to any interface. Oracle Clusterware directs the requests to the appropriate nodes in the cluster. **Note:** For a single-node DB system, this list is empty. + /// The OCID of the DNS record for the SCAN IP addresses that are associated with the Exadata VM cluster on Exascale Infrastructure. + /// Snapshot filesystem storage details. + /// Total file system storage details. + /// The virtual IP (VIP) addresses associated with the Exadata VM cluster on Exascale Infrastructure. The Cluster Ready Services (CRS) creates and maintains one VIP address for each node in the Exadata Cloud Service instance to enable failover. If one node fails, the VIP is reassigned to another active node in the cluster. **Note:** For a single-node DB system, this list is empty. + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + /// iormConfigCache details for Exadata VM cluster on Exascale Infrastructure. + /// Cluster backup subnet ocid. + /// Cluster subnet ocid. + /// A new instance for mocking. + public static ExadbVmClusterProperties ExadbVmClusterProperties(string ocid = null, string clusterName = null, string backupSubnetCidr = null, Uri nsgUri = null, AzureResourceProvisioningState? provisioningState = null, ExadbVmClusterLifecycleState? lifecycleState = null, ResourceIdentifier vnetId = null, ResourceIdentifier subnetId = null, DataCollectionOptions dataCollectionOptions = null, string displayName = null, string domain = null, int enabledEcpuCount = default, ResourceIdentifier exascaleDbStorageVaultId = null, string gridImageOcid = null, GridImageType? gridImageType = null, string giVersion = null, string hostname = null, LicenseModel? licenseModel = null, int? memorySizeInGbs = null, int nodeCount = default, IEnumerable nsgCidrs = null, string zoneOcid = null, string privateZoneOcid = null, int? scanListenerPortTcp = null, int? scanListenerPortTcpSsl = null, int? listenerPort = null, string shape = null, IEnumerable sshPublicKeys = null, string systemVersion = null, string timeZone = null, int totalEcpuCount = default, int? vmFileSystemStorageTotalSizeInGbs = null, string lifecycleDetails = null, string scanDnsName = null, IEnumerable scanIPIds = null, string scanDnsRecordId = null, int? snapshotFileSystemStorageTotalSizeInGbs = null, int? totalSizeInGbs = null, IEnumerable vipIds = null, Uri ociUri = null, ExadataIormConfig iormConfigCache = null, string backupSubnetOcid = null, string subnetOcid = null) + { + nsgCidrs ??= new List(); + sshPublicKeys ??= new List(); + scanIPIds ??= new List(); + vipIds ??= new List(); + + return new ExadbVmClusterProperties( + ocid, + clusterName, + backupSubnetCidr, + nsgUri, + provisioningState, + lifecycleState, + vnetId, + subnetId, + dataCollectionOptions, + displayName, + domain, + enabledEcpuCount, + exascaleDbStorageVaultId, + gridImageOcid, + gridImageType, + giVersion, + hostname, + licenseModel, + memorySizeInGbs, + nodeCount, + nsgCidrs?.ToList(), + zoneOcid, + privateZoneOcid, + scanListenerPortTcp, + scanListenerPortTcpSsl, + listenerPort, + shape, + sshPublicKeys?.ToList(), + systemVersion, + timeZone, + totalEcpuCount, + vmFileSystemStorageTotalSizeInGbs.HasValue ? new ExadbVmClusterStorageDetails(vmFileSystemStorageTotalSizeInGbs.Value, serializedAdditionalRawData: null) : null, + lifecycleDetails, + scanDnsName, + scanIPIds?.ToList(), + scanDnsRecordId, + snapshotFileSystemStorageTotalSizeInGbs.HasValue ? new ExadbVmClusterStorageDetails(snapshotFileSystemStorageTotalSizeInGbs.Value, serializedAdditionalRawData: null) : null, + totalSizeInGbs.HasValue ? new ExadbVmClusterStorageDetails(totalSizeInGbs.Value, serializedAdditionalRawData: null) : null, + vipIds?.ToList(), + ociUri, + iormConfigCache, + backupSubnetOcid, + subnetOcid, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static ExascaleDbNodeData ExascaleDbNodeData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ExascaleDbNodeProperties properties = null) + { + return new ExascaleDbNodeData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// DbNode OCID. + /// Additional information about the planned maintenance. + /// The number of CPU cores enabled on the Db node. + /// The allocated local node storage in GBs on the Db node. + /// The name of the Fault Domain the instance is contained in. + /// The host name for the database node. + /// The current state of the database node. + /// The type of database node maintenance. + /// The allocated memory in GBs on the Db node. + /// The size (in GB) of the block storage volume allocation for the DB system. This attribute applies only for virtual machine DB systems. + /// End date and time of maintenance window. + /// Start date and time of maintenance window. + /// The total number of CPU cores reserved on the Db node. + /// A new instance for mocking. + public static ExascaleDbNodeProperties ExascaleDbNodeProperties(string ocid = null, string additionalDetails = null, int? cpuCoreCount = null, int? dbNodeStorageSizeInGbs = null, string faultDomain = null, string hostname = null, DbNodeProvisioningState? lifecycleState = null, string maintenanceType = null, int? memorySizeInGbs = null, int? softwareStorageSizeInGb = null, DateTimeOffset? timeMaintenanceWindowEnd = null, DateTimeOffset? timeMaintenanceWindowStart = null, int? totalCpuCoreCount = null) + { + return new ExascaleDbNodeProperties( + ocid, + additionalDetails, + cpuCoreCount, + dbNodeStorageSizeInGbs, + faultDomain, + hostname, + lifecycleState, + maintenanceType, + memorySizeInGbs, + softwareStorageSizeInGb, + timeMaintenanceWindowEnd, + timeMaintenanceWindowStart, + totalCpuCoreCount, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// ExascaleDbNode provisioning state. + /// A new instance for mocking. + public static DbActionResponse DbActionResponse(AzureResourceProvisioningState? provisioningState = null) + { + return new DbActionResponse(provisioningState, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The resource-specific properties for this resource. + /// The availability zones. + /// A new instance for mocking. + public static ExascaleDbStorageVaultData ExascaleDbStorageVaultData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ExascaleDbStorageVaultProperties properties = null, IEnumerable zones = null) + { + tags ??= new Dictionary(); + zones ??= new List(); + + return new ExascaleDbStorageVaultData( + id, + name, + resourceType, + systemData, + tags, + location, + properties, + zones?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The size of additional Flash Cache in percentage of High Capacity database storage. + /// Exadata Database Storage Vault description. + /// The user-friendly name for the Exadata Database Storage Vault. The name does not need to be unique. + /// Create exadata Database Storage Details. + /// Response exadata Database Storage Details. + /// The time zone that you want to use for the Exadata Database Storage Vault. + /// Exadata Database Storage Vault provisioning state. + /// Exadata Database Storage Vault lifecycle state. + /// Additional information about the current lifecycle state. + /// The number of Exadata VM clusters used the Exadata Database Storage Vault. + /// The OCID of the Exadata Database Storage Vault. + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + /// A new instance for mocking. + public static ExascaleDbStorageVaultProperties ExascaleDbStorageVaultProperties(int? additionalFlashCacheInPercent = null, string description = null, string displayName = null, int? highCapacityDatabaseStorageInputTotalSizeInGbs = null, ExascaleDbStorageDetails highCapacityDatabaseStorage = null, string timeZone = null, AzureResourceProvisioningState? provisioningState = null, ExascaleDbStorageVaultLifecycleState? lifecycleState = null, string lifecycleDetails = null, int? vmClusterCount = null, string ocid = null, Uri ociUri = null) + { + return new ExascaleDbStorageVaultProperties( + additionalFlashCacheInPercent, + description, + displayName, + highCapacityDatabaseStorageInputTotalSizeInGbs.HasValue ? new ExascaleDbStorageInputDetails(highCapacityDatabaseStorageInputTotalSizeInGbs.Value, serializedAdditionalRawData: null) : null, + highCapacityDatabaseStorage, + timeZone, + provisioningState, + lifecycleState, + lifecycleDetails, + vmClusterCount, + ocid, + ociUri, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Available Capacity. + /// Total Capacity. + /// A new instance for mocking. + public static ExascaleDbStorageDetails ExascaleDbStorageDetails(int? availableSizeInGbs = null, int? totalSizeInGbs = null) + { + return new ExascaleDbStorageDetails(availableSizeInGbs, totalSizeInGbs, serializedAdditionalRawData: null); + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseBackupCollection.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseBackupCollection.cs new file mode 100644 index 000000000000..4a448bf0bd28 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseBackupCollection.cs @@ -0,0 +1,493 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.OracleDatabase +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get an instance call the GetAutonomousDatabaseBackups method from an instance of . + /// + public partial class AutonomousDatabaseBackupCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _autonomousDatabaseBackupClientDiagnostics; + private readonly AutonomousDatabaseBackupsRestOperations _autonomousDatabaseBackupRestClient; + + /// Initializes a new instance of the class for mocking. + protected AutonomousDatabaseBackupCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal AutonomousDatabaseBackupCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _autonomousDatabaseBackupClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.OracleDatabase", AutonomousDatabaseBackupResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(AutonomousDatabaseBackupResource.ResourceType, out string autonomousDatabaseBackupApiVersion); + _autonomousDatabaseBackupRestClient = new AutonomousDatabaseBackupsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, autonomousDatabaseBackupApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != AutonomousDatabaseResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, AutonomousDatabaseResource.ResourceType), nameof(id)); + } + + /// + /// Create a AutonomousDatabaseBackup + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid} + /// + /// + /// Operation Id + /// AutonomousDatabaseBackup_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// 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. + /// AutonomousDatabaseBackup id. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string adbbackupid, AutonomousDatabaseBackupData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(adbbackupid, nameof(adbbackupid)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _autonomousDatabaseBackupClientDiagnostics.CreateScope("AutonomousDatabaseBackupCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _autonomousDatabaseBackupRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, adbbackupid, data, cancellationToken).ConfigureAwait(false); + var operation = new OracleDatabaseArmOperation(new AutonomousDatabaseBackupOperationSource(Client), _autonomousDatabaseBackupClientDiagnostics, Pipeline, _autonomousDatabaseBackupRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, adbbackupid, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a AutonomousDatabaseBackup + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid} + /// + /// + /// Operation Id + /// AutonomousDatabaseBackup_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// 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. + /// AutonomousDatabaseBackup id. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string adbbackupid, AutonomousDatabaseBackupData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(adbbackupid, nameof(adbbackupid)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _autonomousDatabaseBackupClientDiagnostics.CreateScope("AutonomousDatabaseBackupCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _autonomousDatabaseBackupRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, adbbackupid, data, cancellationToken); + var operation = new OracleDatabaseArmOperation(new AutonomousDatabaseBackupOperationSource(Client), _autonomousDatabaseBackupClientDiagnostics, Pipeline, _autonomousDatabaseBackupRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, adbbackupid, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a AutonomousDatabaseBackup + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid} + /// + /// + /// Operation Id + /// AutonomousDatabaseBackup_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// AutonomousDatabaseBackup id. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string adbbackupid, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(adbbackupid, nameof(adbbackupid)); + + using var scope = _autonomousDatabaseBackupClientDiagnostics.CreateScope("AutonomousDatabaseBackupCollection.Get"); + scope.Start(); + try + { + var response = await _autonomousDatabaseBackupRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, adbbackupid, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AutonomousDatabaseBackupResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a AutonomousDatabaseBackup + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid} + /// + /// + /// Operation Id + /// AutonomousDatabaseBackup_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// AutonomousDatabaseBackup id. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string adbbackupid, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(adbbackupid, nameof(adbbackupid)); + + using var scope = _autonomousDatabaseBackupClientDiagnostics.CreateScope("AutonomousDatabaseBackupCollection.Get"); + scope.Start(); + try + { + var response = _autonomousDatabaseBackupRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, adbbackupid, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AutonomousDatabaseBackupResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List AutonomousDatabaseBackup resources by AutonomousDatabase + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups + /// + /// + /// Operation Id + /// AutonomousDatabaseBackup_ListByParent + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _autonomousDatabaseBackupRestClient.CreateListByParentRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _autonomousDatabaseBackupRestClient.CreateListByParentNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new AutonomousDatabaseBackupResource(Client, AutonomousDatabaseBackupData.DeserializeAutonomousDatabaseBackupData(e)), _autonomousDatabaseBackupClientDiagnostics, Pipeline, "AutonomousDatabaseBackupCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List AutonomousDatabaseBackup resources by AutonomousDatabase + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups + /// + /// + /// Operation Id + /// AutonomousDatabaseBackup_ListByParent + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _autonomousDatabaseBackupRestClient.CreateListByParentRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _autonomousDatabaseBackupRestClient.CreateListByParentNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new AutonomousDatabaseBackupResource(Client, AutonomousDatabaseBackupData.DeserializeAutonomousDatabaseBackupData(e)), _autonomousDatabaseBackupClientDiagnostics, Pipeline, "AutonomousDatabaseBackupCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid} + /// + /// + /// Operation Id + /// AutonomousDatabaseBackup_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// AutonomousDatabaseBackup id. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string adbbackupid, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(adbbackupid, nameof(adbbackupid)); + + using var scope = _autonomousDatabaseBackupClientDiagnostics.CreateScope("AutonomousDatabaseBackupCollection.Exists"); + scope.Start(); + try + { + var response = await _autonomousDatabaseBackupRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, adbbackupid, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid} + /// + /// + /// Operation Id + /// AutonomousDatabaseBackup_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// AutonomousDatabaseBackup id. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string adbbackupid, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(adbbackupid, nameof(adbbackupid)); + + using var scope = _autonomousDatabaseBackupClientDiagnostics.CreateScope("AutonomousDatabaseBackupCollection.Exists"); + scope.Start(); + try + { + var response = _autonomousDatabaseBackupRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, adbbackupid, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid} + /// + /// + /// Operation Id + /// AutonomousDatabaseBackup_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// AutonomousDatabaseBackup id. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string adbbackupid, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(adbbackupid, nameof(adbbackupid)); + + using var scope = _autonomousDatabaseBackupClientDiagnostics.CreateScope("AutonomousDatabaseBackupCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _autonomousDatabaseBackupRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, adbbackupid, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new AutonomousDatabaseBackupResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid} + /// + /// + /// Operation Id + /// AutonomousDatabaseBackup_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// AutonomousDatabaseBackup id. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string adbbackupid, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(adbbackupid, nameof(adbbackupid)); + + using var scope = _autonomousDatabaseBackupClientDiagnostics.CreateScope("AutonomousDatabaseBackupCollection.GetIfExists"); + scope.Start(); + try + { + var response = _autonomousDatabaseBackupRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, adbbackupid, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new AutonomousDatabaseBackupResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseBackupData.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseBackupData.Serialization.cs new file mode 100644 index 000000000000..f3871e93f891 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseBackupData.Serialization.cs @@ -0,0 +1,155 @@ +// 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.Models; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + public partial class AutonomousDatabaseBackupData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AutonomousDatabaseBackupData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + AutonomousDatabaseBackupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AutonomousDatabaseBackupData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAutonomousDatabaseBackupData(document.RootElement, options); + } + + internal static AutonomousDatabaseBackupData DeserializeAutonomousDatabaseBackupData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AutonomousDatabaseBackupProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = AutonomousDatabaseBackupProperties.DeserializeAutonomousDatabaseBackupProperties(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AutonomousDatabaseBackupData( + id, + name, + type, + systemData, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AutonomousDatabaseBackupData)} does not support writing '{options.Format}' format."); + } + } + + AutonomousDatabaseBackupData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAutonomousDatabaseBackupData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AutonomousDatabaseBackupData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseBackupData.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseBackupData.cs new file mode 100644 index 000000000000..19b1ef0b7c2c --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseBackupData.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + /// + /// A class representing the AutonomousDatabaseBackup data model. + /// AutonomousDatabaseBackup resource definition + /// + public partial class AutonomousDatabaseBackupData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AutonomousDatabaseBackupData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal AutonomousDatabaseBackupData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, AutonomousDatabaseBackupProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public AutonomousDatabaseBackupProperties Properties { get; set; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseBackupResource.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseBackupResource.Serialization.cs new file mode 100644 index 000000000000..3599f43b0e53 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseBackupResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.OracleDatabase +{ + public partial class AutonomousDatabaseBackupResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + AutonomousDatabaseBackupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + AutonomousDatabaseBackupData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseBackupResource.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseBackupResource.cs new file mode 100644 index 000000000000..23e02e0bf5a8 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseBackupResource.cs @@ -0,0 +1,347 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.OracleDatabase +{ + /// + /// A Class representing an AutonomousDatabaseBackup along with the instance operations that can be performed on it. + /// If you have a you can construct an + /// from an instance of using the GetAutonomousDatabaseBackupResource method. + /// Otherwise you can get one from its parent resource using the GetAutonomousDatabaseBackup method. + /// + public partial class AutonomousDatabaseBackupResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The autonomousdatabasename. + /// The adbbackupid. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string autonomousdatabasename, string adbbackupid) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _autonomousDatabaseBackupClientDiagnostics; + private readonly AutonomousDatabaseBackupsRestOperations _autonomousDatabaseBackupRestClient; + private readonly AutonomousDatabaseBackupData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Oracle.Database/autonomousDatabases/autonomousDatabaseBackups"; + + /// Initializes a new instance of the class for mocking. + protected AutonomousDatabaseBackupResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal AutonomousDatabaseBackupResource(ArmClient client, AutonomousDatabaseBackupData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal AutonomousDatabaseBackupResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _autonomousDatabaseBackupClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.OracleDatabase", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string autonomousDatabaseBackupApiVersion); + _autonomousDatabaseBackupRestClient = new AutonomousDatabaseBackupsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, autonomousDatabaseBackupApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual AutonomousDatabaseBackupData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get a AutonomousDatabaseBackup + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid} + /// + /// + /// Operation Id + /// AutonomousDatabaseBackup_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _autonomousDatabaseBackupClientDiagnostics.CreateScope("AutonomousDatabaseBackupResource.Get"); + scope.Start(); + try + { + var response = await _autonomousDatabaseBackupRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AutonomousDatabaseBackupResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a AutonomousDatabaseBackup + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid} + /// + /// + /// Operation Id + /// AutonomousDatabaseBackup_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _autonomousDatabaseBackupClientDiagnostics.CreateScope("AutonomousDatabaseBackupResource.Get"); + scope.Start(); + try + { + var response = _autonomousDatabaseBackupRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AutonomousDatabaseBackupResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a AutonomousDatabaseBackup + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid} + /// + /// + /// Operation Id + /// AutonomousDatabaseBackup_Delete + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _autonomousDatabaseBackupClientDiagnostics.CreateScope("AutonomousDatabaseBackupResource.Delete"); + scope.Start(); + try + { + var response = await _autonomousDatabaseBackupRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new OracleDatabaseArmOperation(_autonomousDatabaseBackupClientDiagnostics, Pipeline, _autonomousDatabaseBackupRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a AutonomousDatabaseBackup + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid} + /// + /// + /// Operation Id + /// AutonomousDatabaseBackup_Delete + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _autonomousDatabaseBackupClientDiagnostics.CreateScope("AutonomousDatabaseBackupResource.Delete"); + scope.Start(); + try + { + var response = _autonomousDatabaseBackupRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new OracleDatabaseArmOperation(_autonomousDatabaseBackupClientDiagnostics, Pipeline, _autonomousDatabaseBackupRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a AutonomousDatabaseBackup + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid} + /// + /// + /// Operation Id + /// AutonomousDatabaseBackup_Update + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, AutonomousDatabaseBackupData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _autonomousDatabaseBackupClientDiagnostics.CreateScope("AutonomousDatabaseBackupResource.Update"); + scope.Start(); + try + { + var response = await _autonomousDatabaseBackupRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new OracleDatabaseArmOperation(new AutonomousDatabaseBackupOperationSource(Client), _autonomousDatabaseBackupClientDiagnostics, Pipeline, _autonomousDatabaseBackupRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a AutonomousDatabaseBackup + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid} + /// + /// + /// Operation Id + /// AutonomousDatabaseBackup_Update + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, AutonomousDatabaseBackupData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _autonomousDatabaseBackupClientDiagnostics.CreateScope("AutonomousDatabaseBackupResource.Update"); + scope.Start(); + try + { + var response = _autonomousDatabaseBackupRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new OracleDatabaseArmOperation(new AutonomousDatabaseBackupOperationSource(Client), _autonomousDatabaseBackupClientDiagnostics, Pipeline, _autonomousDatabaseBackupRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseCharacterSetCollection.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseCharacterSetCollection.cs new file mode 100644 index 000000000000..607737ad2855 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseCharacterSetCollection.cs @@ -0,0 +1,399 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.OracleDatabase +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get an instance call the GetAutonomousDatabaseCharacterSets method from an instance of . + /// + public partial class AutonomousDatabaseCharacterSetCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _autonomousDatabaseCharacterSetClientDiagnostics; + private readonly AutonomousDatabaseCharacterSetsRestOperations _autonomousDatabaseCharacterSetRestClient; + private readonly AzureLocation _location; + + /// Initializes a new instance of the class for mocking. + protected AutonomousDatabaseCharacterSetCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + /// The name of the Azure region. + internal AutonomousDatabaseCharacterSetCollection(ArmClient client, ResourceIdentifier id, AzureLocation location) : base(client, id) + { + _location = location; + _autonomousDatabaseCharacterSetClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.OracleDatabase", AutonomousDatabaseCharacterSetResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(AutonomousDatabaseCharacterSetResource.ResourceType, out string autonomousDatabaseCharacterSetApiVersion); + _autonomousDatabaseCharacterSetRestClient = new AutonomousDatabaseCharacterSetsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, autonomousDatabaseCharacterSetApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != SubscriptionResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, SubscriptionResource.ResourceType), nameof(id)); + } + + /// + /// Get a AutonomousDatabaseCharacterSet + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseCharacterSets/{adbscharsetname} + /// + /// + /// Operation Id + /// AutonomousDatabaseCharacterSet_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// AutonomousDatabaseCharacterSet name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string adbscharsetname, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(adbscharsetname, nameof(adbscharsetname)); + + using var scope = _autonomousDatabaseCharacterSetClientDiagnostics.CreateScope("AutonomousDatabaseCharacterSetCollection.Get"); + scope.Start(); + try + { + var response = await _autonomousDatabaseCharacterSetRestClient.GetAsync(Id.SubscriptionId, new AzureLocation(_location), adbscharsetname, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AutonomousDatabaseCharacterSetResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a AutonomousDatabaseCharacterSet + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseCharacterSets/{adbscharsetname} + /// + /// + /// Operation Id + /// AutonomousDatabaseCharacterSet_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// AutonomousDatabaseCharacterSet name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string adbscharsetname, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(adbscharsetname, nameof(adbscharsetname)); + + using var scope = _autonomousDatabaseCharacterSetClientDiagnostics.CreateScope("AutonomousDatabaseCharacterSetCollection.Get"); + scope.Start(); + try + { + var response = _autonomousDatabaseCharacterSetRestClient.Get(Id.SubscriptionId, new AzureLocation(_location), adbscharsetname, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AutonomousDatabaseCharacterSetResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List AutonomousDatabaseCharacterSet resources by SubscriptionLocationResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseCharacterSets + /// + /// + /// Operation Id + /// AutonomousDatabaseCharacterSet_ListByLocation + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _autonomousDatabaseCharacterSetRestClient.CreateListByLocationRequest(Id.SubscriptionId, new AzureLocation(_location)); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _autonomousDatabaseCharacterSetRestClient.CreateListByLocationNextPageRequest(nextLink, Id.SubscriptionId, new AzureLocation(_location)); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new AutonomousDatabaseCharacterSetResource(Client, AutonomousDatabaseCharacterSetData.DeserializeAutonomousDatabaseCharacterSetData(e)), _autonomousDatabaseCharacterSetClientDiagnostics, Pipeline, "AutonomousDatabaseCharacterSetCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List AutonomousDatabaseCharacterSet resources by SubscriptionLocationResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseCharacterSets + /// + /// + /// Operation Id + /// AutonomousDatabaseCharacterSet_ListByLocation + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _autonomousDatabaseCharacterSetRestClient.CreateListByLocationRequest(Id.SubscriptionId, new AzureLocation(_location)); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _autonomousDatabaseCharacterSetRestClient.CreateListByLocationNextPageRequest(nextLink, Id.SubscriptionId, new AzureLocation(_location)); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new AutonomousDatabaseCharacterSetResource(Client, AutonomousDatabaseCharacterSetData.DeserializeAutonomousDatabaseCharacterSetData(e)), _autonomousDatabaseCharacterSetClientDiagnostics, Pipeline, "AutonomousDatabaseCharacterSetCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseCharacterSets/{adbscharsetname} + /// + /// + /// Operation Id + /// AutonomousDatabaseCharacterSet_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// AutonomousDatabaseCharacterSet name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string adbscharsetname, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(adbscharsetname, nameof(adbscharsetname)); + + using var scope = _autonomousDatabaseCharacterSetClientDiagnostics.CreateScope("AutonomousDatabaseCharacterSetCollection.Exists"); + scope.Start(); + try + { + var response = await _autonomousDatabaseCharacterSetRestClient.GetAsync(Id.SubscriptionId, new AzureLocation(_location), adbscharsetname, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseCharacterSets/{adbscharsetname} + /// + /// + /// Operation Id + /// AutonomousDatabaseCharacterSet_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// AutonomousDatabaseCharacterSet name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string adbscharsetname, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(adbscharsetname, nameof(adbscharsetname)); + + using var scope = _autonomousDatabaseCharacterSetClientDiagnostics.CreateScope("AutonomousDatabaseCharacterSetCollection.Exists"); + scope.Start(); + try + { + var response = _autonomousDatabaseCharacterSetRestClient.Get(Id.SubscriptionId, new AzureLocation(_location), adbscharsetname, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseCharacterSets/{adbscharsetname} + /// + /// + /// Operation Id + /// AutonomousDatabaseCharacterSet_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// AutonomousDatabaseCharacterSet name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string adbscharsetname, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(adbscharsetname, nameof(adbscharsetname)); + + using var scope = _autonomousDatabaseCharacterSetClientDiagnostics.CreateScope("AutonomousDatabaseCharacterSetCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _autonomousDatabaseCharacterSetRestClient.GetAsync(Id.SubscriptionId, new AzureLocation(_location), adbscharsetname, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new AutonomousDatabaseCharacterSetResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseCharacterSets/{adbscharsetname} + /// + /// + /// Operation Id + /// AutonomousDatabaseCharacterSet_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// AutonomousDatabaseCharacterSet name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string adbscharsetname, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(adbscharsetname, nameof(adbscharsetname)); + + using var scope = _autonomousDatabaseCharacterSetClientDiagnostics.CreateScope("AutonomousDatabaseCharacterSetCollection.GetIfExists"); + scope.Start(); + try + { + var response = _autonomousDatabaseCharacterSetRestClient.Get(Id.SubscriptionId, new AzureLocation(_location), adbscharsetname, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new AutonomousDatabaseCharacterSetResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseCharacterSetData.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseCharacterSetData.Serialization.cs new file mode 100644 index 000000000000..6c6caea1a3a0 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseCharacterSetData.Serialization.cs @@ -0,0 +1,155 @@ +// 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.Models; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + public partial class AutonomousDatabaseCharacterSetData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AutonomousDatabaseCharacterSetData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + AutonomousDatabaseCharacterSetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AutonomousDatabaseCharacterSetData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAutonomousDatabaseCharacterSetData(document.RootElement, options); + } + + internal static AutonomousDatabaseCharacterSetData DeserializeAutonomousDatabaseCharacterSetData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AutonomousDatabaseCharacterSetProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = AutonomousDatabaseCharacterSetProperties.DeserializeAutonomousDatabaseCharacterSetProperties(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AutonomousDatabaseCharacterSetData( + id, + name, + type, + systemData, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AutonomousDatabaseCharacterSetData)} does not support writing '{options.Format}' format."); + } + } + + AutonomousDatabaseCharacterSetData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAutonomousDatabaseCharacterSetData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AutonomousDatabaseCharacterSetData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseCharacterSetData.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseCharacterSetData.cs new file mode 100644 index 000000000000..f192e212cf4c --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseCharacterSetData.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + /// + /// A class representing the AutonomousDatabaseCharacterSet data model. + /// AutonomousDatabaseCharacterSets resource definition + /// + public partial class AutonomousDatabaseCharacterSetData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal AutonomousDatabaseCharacterSetData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal AutonomousDatabaseCharacterSetData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, AutonomousDatabaseCharacterSetProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + internal AutonomousDatabaseCharacterSetProperties Properties { get; } + /// The Oracle Autonomous Database supported character sets. + public string AutonomousDatabaseCharacterSet + { + get => Properties?.CharacterSet; + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseCharacterSetResource.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseCharacterSetResource.Serialization.cs new file mode 100644 index 000000000000..b5fa9ead5207 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseCharacterSetResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.OracleDatabase +{ + public partial class AutonomousDatabaseCharacterSetResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + AutonomousDatabaseCharacterSetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + AutonomousDatabaseCharacterSetData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseCharacterSetResource.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseCharacterSetResource.cs new file mode 100644 index 000000000000..333556dcd19a --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseCharacterSetResource.cs @@ -0,0 +1,171 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.OracleDatabase +{ + /// + /// A Class representing an AutonomousDatabaseCharacterSet along with the instance operations that can be performed on it. + /// If you have a you can construct an + /// from an instance of using the GetAutonomousDatabaseCharacterSetResource method. + /// Otherwise you can get one from its parent resource using the GetAutonomousDatabaseCharacterSet method. + /// + public partial class AutonomousDatabaseCharacterSetResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The location. + /// The adbscharsetname. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, AzureLocation location, string adbscharsetname) + { + var resourceId = $"/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseCharacterSets/{adbscharsetname}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _autonomousDatabaseCharacterSetClientDiagnostics; + private readonly AutonomousDatabaseCharacterSetsRestOperations _autonomousDatabaseCharacterSetRestClient; + private readonly AutonomousDatabaseCharacterSetData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Oracle.Database/locations/autonomousDatabaseCharacterSets"; + + /// Initializes a new instance of the class for mocking. + protected AutonomousDatabaseCharacterSetResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal AutonomousDatabaseCharacterSetResource(ArmClient client, AutonomousDatabaseCharacterSetData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal AutonomousDatabaseCharacterSetResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _autonomousDatabaseCharacterSetClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.OracleDatabase", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string autonomousDatabaseCharacterSetApiVersion); + _autonomousDatabaseCharacterSetRestClient = new AutonomousDatabaseCharacterSetsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, autonomousDatabaseCharacterSetApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual AutonomousDatabaseCharacterSetData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get a AutonomousDatabaseCharacterSet + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseCharacterSets/{adbscharsetname} + /// + /// + /// Operation Id + /// AutonomousDatabaseCharacterSet_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _autonomousDatabaseCharacterSetClientDiagnostics.CreateScope("AutonomousDatabaseCharacterSetResource.Get"); + scope.Start(); + try + { + var response = await _autonomousDatabaseCharacterSetRestClient.GetAsync(Id.SubscriptionId, new AzureLocation(Id.Parent.Name), Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AutonomousDatabaseCharacterSetResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a AutonomousDatabaseCharacterSet + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseCharacterSets/{adbscharsetname} + /// + /// + /// Operation Id + /// AutonomousDatabaseCharacterSet_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _autonomousDatabaseCharacterSetClientDiagnostics.CreateScope("AutonomousDatabaseCharacterSetResource.Get"); + scope.Start(); + try + { + var response = _autonomousDatabaseCharacterSetRestClient.Get(Id.SubscriptionId, new AzureLocation(Id.Parent.Name), Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AutonomousDatabaseCharacterSetResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseCollection.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseCollection.cs new file mode 100644 index 000000000000..ce29865dfb26 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseCollection.cs @@ -0,0 +1,494 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.OracleDatabase +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get an instance call the GetAutonomousDatabases method from an instance of . + /// + public partial class AutonomousDatabaseCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _autonomousDatabaseClientDiagnostics; + private readonly AutonomousDatabasesRestOperations _autonomousDatabaseRestClient; + + /// Initializes a new instance of the class for mocking. + protected AutonomousDatabaseCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal AutonomousDatabaseCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _autonomousDatabaseClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.OracleDatabase", AutonomousDatabaseResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(AutonomousDatabaseResource.ResourceType, out string autonomousDatabaseApiVersion); + _autonomousDatabaseRestClient = new AutonomousDatabasesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, autonomousDatabaseApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceGroupResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceGroupResource.ResourceType), nameof(id)); + } + + /// + /// Create a AutonomousDatabase + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename} + /// + /// + /// Operation Id + /// AutonomousDatabase_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The database name. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string autonomousdatabasename, AutonomousDatabaseData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(autonomousdatabasename, nameof(autonomousdatabasename)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _autonomousDatabaseClientDiagnostics.CreateScope("AutonomousDatabaseCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _autonomousDatabaseRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, autonomousdatabasename, data, cancellationToken).ConfigureAwait(false); + var operation = new OracleDatabaseArmOperation(new AutonomousDatabaseOperationSource(Client), _autonomousDatabaseClientDiagnostics, Pipeline, _autonomousDatabaseRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, autonomousdatabasename, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a AutonomousDatabase + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename} + /// + /// + /// Operation Id + /// AutonomousDatabase_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The database name. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string autonomousdatabasename, AutonomousDatabaseData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(autonomousdatabasename, nameof(autonomousdatabasename)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _autonomousDatabaseClientDiagnostics.CreateScope("AutonomousDatabaseCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _autonomousDatabaseRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, autonomousdatabasename, data, cancellationToken); + var operation = new OracleDatabaseArmOperation(new AutonomousDatabaseOperationSource(Client), _autonomousDatabaseClientDiagnostics, Pipeline, _autonomousDatabaseRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, autonomousdatabasename, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a AutonomousDatabase + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename} + /// + /// + /// Operation Id + /// AutonomousDatabase_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The database name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string autonomousdatabasename, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(autonomousdatabasename, nameof(autonomousdatabasename)); + + using var scope = _autonomousDatabaseClientDiagnostics.CreateScope("AutonomousDatabaseCollection.Get"); + scope.Start(); + try + { + var response = await _autonomousDatabaseRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, autonomousdatabasename, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AutonomousDatabaseResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a AutonomousDatabase + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename} + /// + /// + /// Operation Id + /// AutonomousDatabase_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The database name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string autonomousdatabasename, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(autonomousdatabasename, nameof(autonomousdatabasename)); + + using var scope = _autonomousDatabaseClientDiagnostics.CreateScope("AutonomousDatabaseCollection.Get"); + scope.Start(); + try + { + var response = _autonomousDatabaseRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, autonomousdatabasename, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AutonomousDatabaseResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List AutonomousDatabase resources by resource group + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases + /// + /// + /// Operation Id + /// AutonomousDatabase_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _autonomousDatabaseRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _autonomousDatabaseRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new AutonomousDatabaseResource(Client, AutonomousDatabaseData.DeserializeAutonomousDatabaseData(e)), _autonomousDatabaseClientDiagnostics, Pipeline, "AutonomousDatabaseCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List AutonomousDatabase resources by resource group + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases + /// + /// + /// Operation Id + /// AutonomousDatabase_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _autonomousDatabaseRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _autonomousDatabaseRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new AutonomousDatabaseResource(Client, AutonomousDatabaseData.DeserializeAutonomousDatabaseData(e)), _autonomousDatabaseClientDiagnostics, Pipeline, "AutonomousDatabaseCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename} + /// + /// + /// Operation Id + /// AutonomousDatabase_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The database name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string autonomousdatabasename, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(autonomousdatabasename, nameof(autonomousdatabasename)); + + using var scope = _autonomousDatabaseClientDiagnostics.CreateScope("AutonomousDatabaseCollection.Exists"); + scope.Start(); + try + { + var response = await _autonomousDatabaseRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, autonomousdatabasename, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename} + /// + /// + /// Operation Id + /// AutonomousDatabase_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The database name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string autonomousdatabasename, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(autonomousdatabasename, nameof(autonomousdatabasename)); + + using var scope = _autonomousDatabaseClientDiagnostics.CreateScope("AutonomousDatabaseCollection.Exists"); + scope.Start(); + try + { + var response = _autonomousDatabaseRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, autonomousdatabasename, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename} + /// + /// + /// Operation Id + /// AutonomousDatabase_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The database name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string autonomousdatabasename, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(autonomousdatabasename, nameof(autonomousdatabasename)); + + using var scope = _autonomousDatabaseClientDiagnostics.CreateScope("AutonomousDatabaseCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _autonomousDatabaseRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, autonomousdatabasename, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new AutonomousDatabaseResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename} + /// + /// + /// Operation Id + /// AutonomousDatabase_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The database name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string autonomousdatabasename, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(autonomousdatabasename, nameof(autonomousdatabasename)); + + using var scope = _autonomousDatabaseClientDiagnostics.CreateScope("AutonomousDatabaseCollection.GetIfExists"); + scope.Start(); + try + { + var response = _autonomousDatabaseRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, autonomousdatabasename, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new AutonomousDatabaseResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseData.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseData.Serialization.cs new file mode 100644 index 000000000000..c351ab86c8fe --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseData.Serialization.cs @@ -0,0 +1,178 @@ +// 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.Models; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + public partial class AutonomousDatabaseData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AutonomousDatabaseData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + AutonomousDatabaseData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AutonomousDatabaseData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAutonomousDatabaseData(document.RootElement, options); + } + + internal static AutonomousDatabaseData DeserializeAutonomousDatabaseData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AutonomousDatabaseBaseProperties properties = default; + IDictionary tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = AutonomousDatabaseBaseProperties.DeserializeAutonomousDatabaseBaseProperties(property.Value, options); + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("location"u8)) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AutonomousDatabaseData( + id, + name, + type, + systemData, + tags ?? new ChangeTrackingDictionary(), + location, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AutonomousDatabaseData)} does not support writing '{options.Format}' format."); + } + } + + AutonomousDatabaseData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAutonomousDatabaseData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AutonomousDatabaseData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseData.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseData.cs new file mode 100644 index 000000000000..c2af47340c97 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseData.cs @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + /// + /// A class representing the AutonomousDatabase data model. + /// Autonomous Database resource model. + /// + public partial class AutonomousDatabaseData : TrackedResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The location. + public AutonomousDatabaseData(AzureLocation location) : base(location) + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// + /// The resource-specific properties for this resource. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , and . + /// + /// Keeps track of any properties unknown to the library. + internal AutonomousDatabaseData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, AutonomousDatabaseBaseProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AutonomousDatabaseData() + { + } + + /// + /// The resource-specific properties for this resource. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , and . + /// + public AutonomousDatabaseBaseProperties Properties { get; set; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseNationalCharacterSetCollection.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseNationalCharacterSetCollection.cs new file mode 100644 index 000000000000..5b3bdf95f6a0 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseNationalCharacterSetCollection.cs @@ -0,0 +1,399 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.OracleDatabase +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get an instance call the GetAutonomousDatabaseNationalCharacterSets method from an instance of . + /// + public partial class AutonomousDatabaseNationalCharacterSetCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _autonomousDatabaseNationalCharacterSetClientDiagnostics; + private readonly AutonomousDatabaseNationalCharacterSetsRestOperations _autonomousDatabaseNationalCharacterSetRestClient; + private readonly AzureLocation _location; + + /// Initializes a new instance of the class for mocking. + protected AutonomousDatabaseNationalCharacterSetCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + /// The name of the Azure region. + internal AutonomousDatabaseNationalCharacterSetCollection(ArmClient client, ResourceIdentifier id, AzureLocation location) : base(client, id) + { + _location = location; + _autonomousDatabaseNationalCharacterSetClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.OracleDatabase", AutonomousDatabaseNationalCharacterSetResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(AutonomousDatabaseNationalCharacterSetResource.ResourceType, out string autonomousDatabaseNationalCharacterSetApiVersion); + _autonomousDatabaseNationalCharacterSetRestClient = new AutonomousDatabaseNationalCharacterSetsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, autonomousDatabaseNationalCharacterSetApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != SubscriptionResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, SubscriptionResource.ResourceType), nameof(id)); + } + + /// + /// Get a AutonomousDatabaseNationalCharacterSet + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseNationalCharacterSets/{adbsncharsetname} + /// + /// + /// Operation Id + /// AutonomousDatabaseNationalCharacterSet_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// AutonomousDatabaseNationalCharacterSets name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string adbsncharsetname, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(adbsncharsetname, nameof(adbsncharsetname)); + + using var scope = _autonomousDatabaseNationalCharacterSetClientDiagnostics.CreateScope("AutonomousDatabaseNationalCharacterSetCollection.Get"); + scope.Start(); + try + { + var response = await _autonomousDatabaseNationalCharacterSetRestClient.GetAsync(Id.SubscriptionId, new AzureLocation(_location), adbsncharsetname, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AutonomousDatabaseNationalCharacterSetResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a AutonomousDatabaseNationalCharacterSet + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseNationalCharacterSets/{adbsncharsetname} + /// + /// + /// Operation Id + /// AutonomousDatabaseNationalCharacterSet_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// AutonomousDatabaseNationalCharacterSets name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string adbsncharsetname, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(adbsncharsetname, nameof(adbsncharsetname)); + + using var scope = _autonomousDatabaseNationalCharacterSetClientDiagnostics.CreateScope("AutonomousDatabaseNationalCharacterSetCollection.Get"); + scope.Start(); + try + { + var response = _autonomousDatabaseNationalCharacterSetRestClient.Get(Id.SubscriptionId, new AzureLocation(_location), adbsncharsetname, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AutonomousDatabaseNationalCharacterSetResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List AutonomousDatabaseNationalCharacterSet resources by SubscriptionLocationResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseNationalCharacterSets + /// + /// + /// Operation Id + /// AutonomousDatabaseNationalCharacterSet_ListByLocation + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _autonomousDatabaseNationalCharacterSetRestClient.CreateListByLocationRequest(Id.SubscriptionId, new AzureLocation(_location)); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _autonomousDatabaseNationalCharacterSetRestClient.CreateListByLocationNextPageRequest(nextLink, Id.SubscriptionId, new AzureLocation(_location)); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new AutonomousDatabaseNationalCharacterSetResource(Client, AutonomousDatabaseNationalCharacterSetData.DeserializeAutonomousDatabaseNationalCharacterSetData(e)), _autonomousDatabaseNationalCharacterSetClientDiagnostics, Pipeline, "AutonomousDatabaseNationalCharacterSetCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List AutonomousDatabaseNationalCharacterSet resources by SubscriptionLocationResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseNationalCharacterSets + /// + /// + /// Operation Id + /// AutonomousDatabaseNationalCharacterSet_ListByLocation + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _autonomousDatabaseNationalCharacterSetRestClient.CreateListByLocationRequest(Id.SubscriptionId, new AzureLocation(_location)); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _autonomousDatabaseNationalCharacterSetRestClient.CreateListByLocationNextPageRequest(nextLink, Id.SubscriptionId, new AzureLocation(_location)); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new AutonomousDatabaseNationalCharacterSetResource(Client, AutonomousDatabaseNationalCharacterSetData.DeserializeAutonomousDatabaseNationalCharacterSetData(e)), _autonomousDatabaseNationalCharacterSetClientDiagnostics, Pipeline, "AutonomousDatabaseNationalCharacterSetCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseNationalCharacterSets/{adbsncharsetname} + /// + /// + /// Operation Id + /// AutonomousDatabaseNationalCharacterSet_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// AutonomousDatabaseNationalCharacterSets name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string adbsncharsetname, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(adbsncharsetname, nameof(adbsncharsetname)); + + using var scope = _autonomousDatabaseNationalCharacterSetClientDiagnostics.CreateScope("AutonomousDatabaseNationalCharacterSetCollection.Exists"); + scope.Start(); + try + { + var response = await _autonomousDatabaseNationalCharacterSetRestClient.GetAsync(Id.SubscriptionId, new AzureLocation(_location), adbsncharsetname, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseNationalCharacterSets/{adbsncharsetname} + /// + /// + /// Operation Id + /// AutonomousDatabaseNationalCharacterSet_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// AutonomousDatabaseNationalCharacterSets name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string adbsncharsetname, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(adbsncharsetname, nameof(adbsncharsetname)); + + using var scope = _autonomousDatabaseNationalCharacterSetClientDiagnostics.CreateScope("AutonomousDatabaseNationalCharacterSetCollection.Exists"); + scope.Start(); + try + { + var response = _autonomousDatabaseNationalCharacterSetRestClient.Get(Id.SubscriptionId, new AzureLocation(_location), adbsncharsetname, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseNationalCharacterSets/{adbsncharsetname} + /// + /// + /// Operation Id + /// AutonomousDatabaseNationalCharacterSet_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// AutonomousDatabaseNationalCharacterSets name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string adbsncharsetname, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(adbsncharsetname, nameof(adbsncharsetname)); + + using var scope = _autonomousDatabaseNationalCharacterSetClientDiagnostics.CreateScope("AutonomousDatabaseNationalCharacterSetCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _autonomousDatabaseNationalCharacterSetRestClient.GetAsync(Id.SubscriptionId, new AzureLocation(_location), adbsncharsetname, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new AutonomousDatabaseNationalCharacterSetResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseNationalCharacterSets/{adbsncharsetname} + /// + /// + /// Operation Id + /// AutonomousDatabaseNationalCharacterSet_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// AutonomousDatabaseNationalCharacterSets name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string adbsncharsetname, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(adbsncharsetname, nameof(adbsncharsetname)); + + using var scope = _autonomousDatabaseNationalCharacterSetClientDiagnostics.CreateScope("AutonomousDatabaseNationalCharacterSetCollection.GetIfExists"); + scope.Start(); + try + { + var response = _autonomousDatabaseNationalCharacterSetRestClient.Get(Id.SubscriptionId, new AzureLocation(_location), adbsncharsetname, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new AutonomousDatabaseNationalCharacterSetResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseNationalCharacterSetData.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseNationalCharacterSetData.Serialization.cs new file mode 100644 index 000000000000..093c403f850e --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseNationalCharacterSetData.Serialization.cs @@ -0,0 +1,155 @@ +// 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.Models; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + public partial class AutonomousDatabaseNationalCharacterSetData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AutonomousDatabaseNationalCharacterSetData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + AutonomousDatabaseNationalCharacterSetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AutonomousDatabaseNationalCharacterSetData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAutonomousDatabaseNationalCharacterSetData(document.RootElement, options); + } + + internal static AutonomousDatabaseNationalCharacterSetData DeserializeAutonomousDatabaseNationalCharacterSetData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AutonomousDatabaseNationalCharacterSetProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = AutonomousDatabaseNationalCharacterSetProperties.DeserializeAutonomousDatabaseNationalCharacterSetProperties(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AutonomousDatabaseNationalCharacterSetData( + id, + name, + type, + systemData, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AutonomousDatabaseNationalCharacterSetData)} does not support writing '{options.Format}' format."); + } + } + + AutonomousDatabaseNationalCharacterSetData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAutonomousDatabaseNationalCharacterSetData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AutonomousDatabaseNationalCharacterSetData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseNationalCharacterSetData.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseNationalCharacterSetData.cs new file mode 100644 index 000000000000..122e111db9b2 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseNationalCharacterSetData.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + /// + /// A class representing the AutonomousDatabaseNationalCharacterSet data model. + /// AutonomousDatabaseNationalCharacterSets resource definition + /// + public partial class AutonomousDatabaseNationalCharacterSetData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal AutonomousDatabaseNationalCharacterSetData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal AutonomousDatabaseNationalCharacterSetData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, AutonomousDatabaseNationalCharacterSetProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + internal AutonomousDatabaseNationalCharacterSetProperties Properties { get; } + /// The Oracle Autonomous Database supported national character sets. + public string AutonomousDatabaseNationalCharacterSet + { + get => Properties?.CharacterSet; + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseNationalCharacterSetResource.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseNationalCharacterSetResource.Serialization.cs new file mode 100644 index 000000000000..47ce9c0ddb44 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseNationalCharacterSetResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.OracleDatabase +{ + public partial class AutonomousDatabaseNationalCharacterSetResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + AutonomousDatabaseNationalCharacterSetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + AutonomousDatabaseNationalCharacterSetData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseNationalCharacterSetResource.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseNationalCharacterSetResource.cs new file mode 100644 index 000000000000..2533caaa2c6f --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseNationalCharacterSetResource.cs @@ -0,0 +1,171 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.OracleDatabase +{ + /// + /// A Class representing an AutonomousDatabaseNationalCharacterSet along with the instance operations that can be performed on it. + /// If you have a you can construct an + /// from an instance of using the GetAutonomousDatabaseNationalCharacterSetResource method. + /// Otherwise you can get one from its parent resource using the GetAutonomousDatabaseNationalCharacterSet method. + /// + public partial class AutonomousDatabaseNationalCharacterSetResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The location. + /// The adbsncharsetname. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, AzureLocation location, string adbsncharsetname) + { + var resourceId = $"/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseNationalCharacterSets/{adbsncharsetname}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _autonomousDatabaseNationalCharacterSetClientDiagnostics; + private readonly AutonomousDatabaseNationalCharacterSetsRestOperations _autonomousDatabaseNationalCharacterSetRestClient; + private readonly AutonomousDatabaseNationalCharacterSetData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Oracle.Database/locations/autonomousDatabaseNationalCharacterSets"; + + /// Initializes a new instance of the class for mocking. + protected AutonomousDatabaseNationalCharacterSetResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal AutonomousDatabaseNationalCharacterSetResource(ArmClient client, AutonomousDatabaseNationalCharacterSetData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal AutonomousDatabaseNationalCharacterSetResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _autonomousDatabaseNationalCharacterSetClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.OracleDatabase", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string autonomousDatabaseNationalCharacterSetApiVersion); + _autonomousDatabaseNationalCharacterSetRestClient = new AutonomousDatabaseNationalCharacterSetsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, autonomousDatabaseNationalCharacterSetApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual AutonomousDatabaseNationalCharacterSetData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get a AutonomousDatabaseNationalCharacterSet + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseNationalCharacterSets/{adbsncharsetname} + /// + /// + /// Operation Id + /// AutonomousDatabaseNationalCharacterSet_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _autonomousDatabaseNationalCharacterSetClientDiagnostics.CreateScope("AutonomousDatabaseNationalCharacterSetResource.Get"); + scope.Start(); + try + { + var response = await _autonomousDatabaseNationalCharacterSetRestClient.GetAsync(Id.SubscriptionId, new AzureLocation(Id.Parent.Name), Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AutonomousDatabaseNationalCharacterSetResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a AutonomousDatabaseNationalCharacterSet + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseNationalCharacterSets/{adbsncharsetname} + /// + /// + /// Operation Id + /// AutonomousDatabaseNationalCharacterSet_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _autonomousDatabaseNationalCharacterSetClientDiagnostics.CreateScope("AutonomousDatabaseNationalCharacterSetResource.Get"); + scope.Start(); + try + { + var response = _autonomousDatabaseNationalCharacterSetRestClient.Get(Id.SubscriptionId, new AzureLocation(Id.Parent.Name), Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AutonomousDatabaseNationalCharacterSetResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseResource.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseResource.Serialization.cs new file mode 100644 index 000000000000..9c32a64fd3d5 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.OracleDatabase +{ + public partial class AutonomousDatabaseResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + AutonomousDatabaseData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + AutonomousDatabaseData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseResource.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseResource.cs new file mode 100644 index 000000000000..d9a80c781815 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseResource.cs @@ -0,0 +1,1312 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.OracleDatabase.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.OracleDatabase +{ + /// + /// A Class representing an AutonomousDatabase along with the instance operations that can be performed on it. + /// If you have a you can construct an + /// from an instance of using the GetAutonomousDatabaseResource method. + /// Otherwise you can get one from its parent resource using the GetAutonomousDatabase method. + /// + public partial class AutonomousDatabaseResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The autonomousdatabasename. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string autonomousdatabasename) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _autonomousDatabaseClientDiagnostics; + private readonly AutonomousDatabasesRestOperations _autonomousDatabaseRestClient; + private readonly AutonomousDatabaseData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Oracle.Database/autonomousDatabases"; + + /// Initializes a new instance of the class for mocking. + protected AutonomousDatabaseResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal AutonomousDatabaseResource(ArmClient client, AutonomousDatabaseData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal AutonomousDatabaseResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _autonomousDatabaseClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.OracleDatabase", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string autonomousDatabaseApiVersion); + _autonomousDatabaseRestClient = new AutonomousDatabasesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, autonomousDatabaseApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual AutonomousDatabaseData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// Gets a collection of AutonomousDatabaseBackupResources in the AutonomousDatabase. + /// An object representing collection of AutonomousDatabaseBackupResources and their operations over a AutonomousDatabaseBackupResource. + public virtual AutonomousDatabaseBackupCollection GetAutonomousDatabaseBackups() + { + return GetCachedClient(client => new AutonomousDatabaseBackupCollection(client, Id)); + } + + /// + /// Get a AutonomousDatabaseBackup + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid} + /// + /// + /// Operation Id + /// AutonomousDatabaseBackup_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// AutonomousDatabaseBackup id. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetAutonomousDatabaseBackupAsync(string adbbackupid, CancellationToken cancellationToken = default) + { + return await GetAutonomousDatabaseBackups().GetAsync(adbbackupid, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a AutonomousDatabaseBackup + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid} + /// + /// + /// Operation Id + /// AutonomousDatabaseBackup_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// AutonomousDatabaseBackup id. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetAutonomousDatabaseBackup(string adbbackupid, CancellationToken cancellationToken = default) + { + return GetAutonomousDatabaseBackups().Get(adbbackupid, cancellationToken); + } + + /// + /// Get a AutonomousDatabase + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename} + /// + /// + /// Operation Id + /// AutonomousDatabase_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _autonomousDatabaseClientDiagnostics.CreateScope("AutonomousDatabaseResource.Get"); + scope.Start(); + try + { + var response = await _autonomousDatabaseRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AutonomousDatabaseResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a AutonomousDatabase + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename} + /// + /// + /// Operation Id + /// AutonomousDatabase_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _autonomousDatabaseClientDiagnostics.CreateScope("AutonomousDatabaseResource.Get"); + scope.Start(); + try + { + var response = _autonomousDatabaseRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AutonomousDatabaseResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a AutonomousDatabase + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename} + /// + /// + /// Operation Id + /// AutonomousDatabase_Delete + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _autonomousDatabaseClientDiagnostics.CreateScope("AutonomousDatabaseResource.Delete"); + scope.Start(); + try + { + var response = await _autonomousDatabaseRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new OracleDatabaseArmOperation(_autonomousDatabaseClientDiagnostics, Pipeline, _autonomousDatabaseRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a AutonomousDatabase + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename} + /// + /// + /// Operation Id + /// AutonomousDatabase_Delete + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _autonomousDatabaseClientDiagnostics.CreateScope("AutonomousDatabaseResource.Delete"); + scope.Start(); + try + { + var response = _autonomousDatabaseRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new OracleDatabaseArmOperation(_autonomousDatabaseClientDiagnostics, Pipeline, _autonomousDatabaseRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a AutonomousDatabase + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename} + /// + /// + /// Operation Id + /// AutonomousDatabase_Update + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, AutonomousDatabasePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _autonomousDatabaseClientDiagnostics.CreateScope("AutonomousDatabaseResource.Update"); + scope.Start(); + try + { + var response = await _autonomousDatabaseRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new OracleDatabaseArmOperation(new AutonomousDatabaseOperationSource(Client), _autonomousDatabaseClientDiagnostics, Pipeline, _autonomousDatabaseRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a AutonomousDatabase + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename} + /// + /// + /// Operation Id + /// AutonomousDatabase_Update + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, AutonomousDatabasePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _autonomousDatabaseClientDiagnostics.CreateScope("AutonomousDatabaseResource.Update"); + scope.Start(); + try + { + var response = _autonomousDatabaseRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); + var operation = new OracleDatabaseArmOperation(new AutonomousDatabaseOperationSource(Client), _autonomousDatabaseClientDiagnostics, Pipeline, _autonomousDatabaseRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Perform switchover action on Autonomous Database + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/switchover + /// + /// + /// Operation Id + /// AutonomousDatabases_Switchover + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual async Task> SwitchoverAsync(WaitUntil waitUntil, PeerDbDetails details, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(details, nameof(details)); + + using var scope = _autonomousDatabaseClientDiagnostics.CreateScope("AutonomousDatabaseResource.Switchover"); + scope.Start(); + try + { + var response = await _autonomousDatabaseRestClient.SwitchoverAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, details, cancellationToken).ConfigureAwait(false); + var operation = new OracleDatabaseArmOperation(new AutonomousDatabaseOperationSource(Client), _autonomousDatabaseClientDiagnostics, Pipeline, _autonomousDatabaseRestClient.CreateSwitchoverRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, details).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Perform switchover action on Autonomous Database + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/switchover + /// + /// + /// Operation Id + /// AutonomousDatabases_Switchover + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Switchover(WaitUntil waitUntil, PeerDbDetails details, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(details, nameof(details)); + + using var scope = _autonomousDatabaseClientDiagnostics.CreateScope("AutonomousDatabaseResource.Switchover"); + scope.Start(); + try + { + var response = _autonomousDatabaseRestClient.Switchover(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, details, cancellationToken); + var operation = new OracleDatabaseArmOperation(new AutonomousDatabaseOperationSource(Client), _autonomousDatabaseClientDiagnostics, Pipeline, _autonomousDatabaseRestClient.CreateSwitchoverRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, details).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Perform failover action on Autonomous Database + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/failover + /// + /// + /// Operation Id + /// AutonomousDatabases_Failover + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual async Task> FailoverAsync(WaitUntil waitUntil, PeerDbDetails details, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(details, nameof(details)); + + using var scope = _autonomousDatabaseClientDiagnostics.CreateScope("AutonomousDatabaseResource.Failover"); + scope.Start(); + try + { + var response = await _autonomousDatabaseRestClient.FailoverAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, details, cancellationToken).ConfigureAwait(false); + var operation = new OracleDatabaseArmOperation(new AutonomousDatabaseOperationSource(Client), _autonomousDatabaseClientDiagnostics, Pipeline, _autonomousDatabaseRestClient.CreateFailoverRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, details).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Perform failover action on Autonomous Database + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/failover + /// + /// + /// Operation Id + /// AutonomousDatabases_Failover + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Failover(WaitUntil waitUntil, PeerDbDetails details, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(details, nameof(details)); + + using var scope = _autonomousDatabaseClientDiagnostics.CreateScope("AutonomousDatabaseResource.Failover"); + scope.Start(); + try + { + var response = _autonomousDatabaseRestClient.Failover(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, details, cancellationToken); + var operation = new OracleDatabaseArmOperation(new AutonomousDatabaseOperationSource(Client), _autonomousDatabaseClientDiagnostics, Pipeline, _autonomousDatabaseRestClient.CreateFailoverRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, details).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Generate wallet action on Autonomous Database + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/generateWallet + /// + /// + /// Operation Id + /// AutonomousDatabases_GenerateWallet + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual async Task> GenerateWalletAsync(GenerateAutonomousDatabaseWalletDetails details, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(details, nameof(details)); + + using var scope = _autonomousDatabaseClientDiagnostics.CreateScope("AutonomousDatabaseResource.GenerateWallet"); + scope.Start(); + try + { + var response = await _autonomousDatabaseRestClient.GenerateWalletAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, details, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Generate wallet action on Autonomous Database + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/generateWallet + /// + /// + /// Operation Id + /// AutonomousDatabases_GenerateWallet + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual Response GenerateWallet(GenerateAutonomousDatabaseWalletDetails details, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(details, nameof(details)); + + using var scope = _autonomousDatabaseClientDiagnostics.CreateScope("AutonomousDatabaseResource.GenerateWallet"); + scope.Start(); + try + { + var response = _autonomousDatabaseRestClient.GenerateWallet(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, details, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Restores an Autonomous Database based on the provided request parameters. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/restore + /// + /// + /// Operation Id + /// AutonomousDatabases_Restore + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual async Task> RestoreAsync(WaitUntil waitUntil, RestoreAutonomousDatabaseDetails details, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(details, nameof(details)); + + using var scope = _autonomousDatabaseClientDiagnostics.CreateScope("AutonomousDatabaseResource.Restore"); + scope.Start(); + try + { + var response = await _autonomousDatabaseRestClient.RestoreAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, details, cancellationToken).ConfigureAwait(false); + var operation = new OracleDatabaseArmOperation(new AutonomousDatabaseOperationSource(Client), _autonomousDatabaseClientDiagnostics, Pipeline, _autonomousDatabaseRestClient.CreateRestoreRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, details).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Restores an Autonomous Database based on the provided request parameters. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/restore + /// + /// + /// Operation Id + /// AutonomousDatabases_Restore + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Restore(WaitUntil waitUntil, RestoreAutonomousDatabaseDetails details, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(details, nameof(details)); + + using var scope = _autonomousDatabaseClientDiagnostics.CreateScope("AutonomousDatabaseResource.Restore"); + scope.Start(); + try + { + var response = _autonomousDatabaseRestClient.Restore(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, details, cancellationToken); + var operation = new OracleDatabaseArmOperation(new AutonomousDatabaseOperationSource(Client), _autonomousDatabaseClientDiagnostics, Pipeline, _autonomousDatabaseRestClient.CreateRestoreRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, details).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// This operation shrinks the current allocated storage down to the current actual used data storage. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/shrink + /// + /// + /// Operation Id + /// AutonomousDatabases_Shrink + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task> ShrinkAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _autonomousDatabaseClientDiagnostics.CreateScope("AutonomousDatabaseResource.Shrink"); + scope.Start(); + try + { + var response = await _autonomousDatabaseRestClient.ShrinkAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new OracleDatabaseArmOperation(new AutonomousDatabaseOperationSource(Client), _autonomousDatabaseClientDiagnostics, Pipeline, _autonomousDatabaseRestClient.CreateShrinkRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// This operation shrinks the current allocated storage down to the current actual used data storage. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/shrink + /// + /// + /// Operation Id + /// AutonomousDatabases_Shrink + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Shrink(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _autonomousDatabaseClientDiagnostics.CreateScope("AutonomousDatabaseResource.Shrink"); + scope.Start(); + try + { + var response = _autonomousDatabaseRestClient.Shrink(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new OracleDatabaseArmOperation(new AutonomousDatabaseOperationSource(Client), _autonomousDatabaseClientDiagnostics, Pipeline, _autonomousDatabaseRestClient.CreateShrinkRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Perform ChangeDisasterRecoveryConfiguration action on Autonomous Database + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/changeDisasterRecoveryConfiguration + /// + /// + /// Operation Id + /// AutonomousDatabases_ChangeDisasterRecoveryConfiguration + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual async Task> ChangeDisasterRecoveryConfigurationAsync(WaitUntil waitUntil, DisasterRecoveryConfigurationDetails details, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(details, nameof(details)); + + using var scope = _autonomousDatabaseClientDiagnostics.CreateScope("AutonomousDatabaseResource.ChangeDisasterRecoveryConfiguration"); + scope.Start(); + try + { + var response = await _autonomousDatabaseRestClient.ChangeDisasterRecoveryConfigurationAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, details, cancellationToken).ConfigureAwait(false); + var operation = new OracleDatabaseArmOperation(new AutonomousDatabaseOperationSource(Client), _autonomousDatabaseClientDiagnostics, Pipeline, _autonomousDatabaseRestClient.CreateChangeDisasterRecoveryConfigurationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, details).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Perform ChangeDisasterRecoveryConfiguration action on Autonomous Database + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/changeDisasterRecoveryConfiguration + /// + /// + /// Operation Id + /// AutonomousDatabases_ChangeDisasterRecoveryConfiguration + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation ChangeDisasterRecoveryConfiguration(WaitUntil waitUntil, DisasterRecoveryConfigurationDetails details, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(details, nameof(details)); + + using var scope = _autonomousDatabaseClientDiagnostics.CreateScope("AutonomousDatabaseResource.ChangeDisasterRecoveryConfiguration"); + scope.Start(); + try + { + var response = _autonomousDatabaseRestClient.ChangeDisasterRecoveryConfiguration(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, details, cancellationToken); + var operation = new OracleDatabaseArmOperation(new AutonomousDatabaseOperationSource(Client), _autonomousDatabaseClientDiagnostics, Pipeline, _autonomousDatabaseRestClient.CreateChangeDisasterRecoveryConfigurationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, details).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename} + /// + /// + /// Operation Id + /// AutonomousDatabase_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _autonomousDatabaseClientDiagnostics.CreateScope("AutonomousDatabaseResource.AddTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues[key] = value; + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _autonomousDatabaseRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new AutonomousDatabaseResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new AutonomousDatabasePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename} + /// + /// + /// Operation Id + /// AutonomousDatabase_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _autonomousDatabaseClientDiagnostics.CreateScope("AutonomousDatabaseResource.AddTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues[key] = value; + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _autonomousDatabaseRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new AutonomousDatabaseResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new AutonomousDatabasePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename} + /// + /// + /// Operation Id + /// AutonomousDatabase_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _autonomousDatabaseClientDiagnostics.CreateScope("AutonomousDatabaseResource.SetTags"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _autonomousDatabaseRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new AutonomousDatabaseResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new AutonomousDatabasePatch(); + patch.Tags.ReplaceWith(tags); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename} + /// + /// + /// Operation Id + /// AutonomousDatabase_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _autonomousDatabaseClientDiagnostics.CreateScope("AutonomousDatabaseResource.SetTags"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _autonomousDatabaseRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new AutonomousDatabaseResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new AutonomousDatabasePatch(); + patch.Tags.ReplaceWith(tags); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename} + /// + /// + /// Operation Id + /// AutonomousDatabase_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _autonomousDatabaseClientDiagnostics.CreateScope("AutonomousDatabaseResource.RemoveTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.Remove(key); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _autonomousDatabaseRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new AutonomousDatabaseResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new AutonomousDatabasePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename} + /// + /// + /// Operation Id + /// AutonomousDatabase_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _autonomousDatabaseClientDiagnostics.CreateScope("AutonomousDatabaseResource.RemoveTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.Remove(key); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _autonomousDatabaseRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new AutonomousDatabaseResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new AutonomousDatabasePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDbVersionCollection.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDbVersionCollection.cs new file mode 100644 index 000000000000..5a3725efb0c0 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDbVersionCollection.cs @@ -0,0 +1,399 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.OracleDatabase +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get an instance call the GetAutonomousDbVersions method from an instance of . + /// + public partial class AutonomousDbVersionCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _autonomousDbVersionAutonomousDatabaseVersionsClientDiagnostics; + private readonly AutonomousDatabaseVersionsRestOperations _autonomousDbVersionAutonomousDatabaseVersionsRestClient; + private readonly AzureLocation _location; + + /// Initializes a new instance of the class for mocking. + protected AutonomousDbVersionCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + /// The name of the Azure region. + internal AutonomousDbVersionCollection(ArmClient client, ResourceIdentifier id, AzureLocation location) : base(client, id) + { + _location = location; + _autonomousDbVersionAutonomousDatabaseVersionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.OracleDatabase", AutonomousDbVersionResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(AutonomousDbVersionResource.ResourceType, out string autonomousDbVersionAutonomousDatabaseVersionsApiVersion); + _autonomousDbVersionAutonomousDatabaseVersionsRestClient = new AutonomousDatabaseVersionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, autonomousDbVersionAutonomousDatabaseVersionsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != SubscriptionResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, SubscriptionResource.ResourceType), nameof(id)); + } + + /// + /// Get a AutonomousDbVersion + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDbVersions/{autonomousdbversionsname} + /// + /// + /// Operation Id + /// AutonomousDbVersion_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// AutonomousDbVersion name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string autonomousdbversionsname, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(autonomousdbversionsname, nameof(autonomousdbversionsname)); + + using var scope = _autonomousDbVersionAutonomousDatabaseVersionsClientDiagnostics.CreateScope("AutonomousDbVersionCollection.Get"); + scope.Start(); + try + { + var response = await _autonomousDbVersionAutonomousDatabaseVersionsRestClient.GetAsync(Id.SubscriptionId, new AzureLocation(_location), autonomousdbversionsname, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AutonomousDbVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a AutonomousDbVersion + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDbVersions/{autonomousdbversionsname} + /// + /// + /// Operation Id + /// AutonomousDbVersion_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// AutonomousDbVersion name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string autonomousdbversionsname, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(autonomousdbversionsname, nameof(autonomousdbversionsname)); + + using var scope = _autonomousDbVersionAutonomousDatabaseVersionsClientDiagnostics.CreateScope("AutonomousDbVersionCollection.Get"); + scope.Start(); + try + { + var response = _autonomousDbVersionAutonomousDatabaseVersionsRestClient.Get(Id.SubscriptionId, new AzureLocation(_location), autonomousdbversionsname, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AutonomousDbVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List AutonomousDbVersion resources by SubscriptionLocationResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDbVersions + /// + /// + /// Operation Id + /// AutonomousDbVersion_ListByLocation + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _autonomousDbVersionAutonomousDatabaseVersionsRestClient.CreateListByLocationRequest(Id.SubscriptionId, new AzureLocation(_location)); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _autonomousDbVersionAutonomousDatabaseVersionsRestClient.CreateListByLocationNextPageRequest(nextLink, Id.SubscriptionId, new AzureLocation(_location)); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new AutonomousDbVersionResource(Client, AutonomousDbVersionData.DeserializeAutonomousDbVersionData(e)), _autonomousDbVersionAutonomousDatabaseVersionsClientDiagnostics, Pipeline, "AutonomousDbVersionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List AutonomousDbVersion resources by SubscriptionLocationResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDbVersions + /// + /// + /// Operation Id + /// AutonomousDbVersion_ListByLocation + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _autonomousDbVersionAutonomousDatabaseVersionsRestClient.CreateListByLocationRequest(Id.SubscriptionId, new AzureLocation(_location)); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _autonomousDbVersionAutonomousDatabaseVersionsRestClient.CreateListByLocationNextPageRequest(nextLink, Id.SubscriptionId, new AzureLocation(_location)); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new AutonomousDbVersionResource(Client, AutonomousDbVersionData.DeserializeAutonomousDbVersionData(e)), _autonomousDbVersionAutonomousDatabaseVersionsClientDiagnostics, Pipeline, "AutonomousDbVersionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDbVersions/{autonomousdbversionsname} + /// + /// + /// Operation Id + /// AutonomousDbVersion_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// AutonomousDbVersion name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string autonomousdbversionsname, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(autonomousdbversionsname, nameof(autonomousdbversionsname)); + + using var scope = _autonomousDbVersionAutonomousDatabaseVersionsClientDiagnostics.CreateScope("AutonomousDbVersionCollection.Exists"); + scope.Start(); + try + { + var response = await _autonomousDbVersionAutonomousDatabaseVersionsRestClient.GetAsync(Id.SubscriptionId, new AzureLocation(_location), autonomousdbversionsname, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDbVersions/{autonomousdbversionsname} + /// + /// + /// Operation Id + /// AutonomousDbVersion_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// AutonomousDbVersion name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string autonomousdbversionsname, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(autonomousdbversionsname, nameof(autonomousdbversionsname)); + + using var scope = _autonomousDbVersionAutonomousDatabaseVersionsClientDiagnostics.CreateScope("AutonomousDbVersionCollection.Exists"); + scope.Start(); + try + { + var response = _autonomousDbVersionAutonomousDatabaseVersionsRestClient.Get(Id.SubscriptionId, new AzureLocation(_location), autonomousdbversionsname, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDbVersions/{autonomousdbversionsname} + /// + /// + /// Operation Id + /// AutonomousDbVersion_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// AutonomousDbVersion name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string autonomousdbversionsname, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(autonomousdbversionsname, nameof(autonomousdbversionsname)); + + using var scope = _autonomousDbVersionAutonomousDatabaseVersionsClientDiagnostics.CreateScope("AutonomousDbVersionCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _autonomousDbVersionAutonomousDatabaseVersionsRestClient.GetAsync(Id.SubscriptionId, new AzureLocation(_location), autonomousdbversionsname, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new AutonomousDbVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDbVersions/{autonomousdbversionsname} + /// + /// + /// Operation Id + /// AutonomousDbVersion_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// AutonomousDbVersion name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string autonomousdbversionsname, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(autonomousdbversionsname, nameof(autonomousdbversionsname)); + + using var scope = _autonomousDbVersionAutonomousDatabaseVersionsClientDiagnostics.CreateScope("AutonomousDbVersionCollection.GetIfExists"); + scope.Start(); + try + { + var response = _autonomousDbVersionAutonomousDatabaseVersionsRestClient.Get(Id.SubscriptionId, new AzureLocation(_location), autonomousdbversionsname, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new AutonomousDbVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDbVersionData.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDbVersionData.Serialization.cs new file mode 100644 index 000000000000..7c1863aa8fa9 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDbVersionData.Serialization.cs @@ -0,0 +1,155 @@ +// 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.Models; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + public partial class AutonomousDbVersionData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AutonomousDbVersionData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + AutonomousDbVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AutonomousDbVersionData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAutonomousDbVersionData(document.RootElement, options); + } + + internal static AutonomousDbVersionData DeserializeAutonomousDbVersionData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AutonomousDbVersionProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = AutonomousDbVersionProperties.DeserializeAutonomousDbVersionProperties(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AutonomousDbVersionData( + id, + name, + type, + systemData, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AutonomousDbVersionData)} does not support writing '{options.Format}' format."); + } + } + + AutonomousDbVersionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAutonomousDbVersionData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AutonomousDbVersionData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDbVersionData.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDbVersionData.cs new file mode 100644 index 000000000000..0df166ccc4fc --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDbVersionData.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + /// + /// A class representing the AutonomousDbVersion data model. + /// AutonomousDbVersion resource definition + /// + public partial class AutonomousDbVersionData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal AutonomousDbVersionData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal AutonomousDbVersionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, AutonomousDbVersionProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public AutonomousDbVersionProperties Properties { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDbVersionResource.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDbVersionResource.Serialization.cs new file mode 100644 index 000000000000..d57149c48864 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDbVersionResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.OracleDatabase +{ + public partial class AutonomousDbVersionResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + AutonomousDbVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + AutonomousDbVersionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDbVersionResource.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDbVersionResource.cs new file mode 100644 index 000000000000..b8242333de80 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDbVersionResource.cs @@ -0,0 +1,171 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.OracleDatabase +{ + /// + /// A Class representing an AutonomousDbVersion along with the instance operations that can be performed on it. + /// If you have a you can construct an + /// from an instance of using the GetAutonomousDbVersionResource method. + /// Otherwise you can get one from its parent resource using the GetAutonomousDbVersion method. + /// + public partial class AutonomousDbVersionResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The location. + /// The autonomousdbversionsname. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, AzureLocation location, string autonomousdbversionsname) + { + var resourceId = $"/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDbVersions/{autonomousdbversionsname}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _autonomousDbVersionAutonomousDatabaseVersionsClientDiagnostics; + private readonly AutonomousDatabaseVersionsRestOperations _autonomousDbVersionAutonomousDatabaseVersionsRestClient; + private readonly AutonomousDbVersionData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Oracle.Database/locations/autonomousDbVersions"; + + /// Initializes a new instance of the class for mocking. + protected AutonomousDbVersionResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal AutonomousDbVersionResource(ArmClient client, AutonomousDbVersionData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal AutonomousDbVersionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _autonomousDbVersionAutonomousDatabaseVersionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.OracleDatabase", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string autonomousDbVersionAutonomousDatabaseVersionsApiVersion); + _autonomousDbVersionAutonomousDatabaseVersionsRestClient = new AutonomousDatabaseVersionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, autonomousDbVersionAutonomousDatabaseVersionsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual AutonomousDbVersionData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get a AutonomousDbVersion + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDbVersions/{autonomousdbversionsname} + /// + /// + /// Operation Id + /// AutonomousDbVersion_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _autonomousDbVersionAutonomousDatabaseVersionsClientDiagnostics.CreateScope("AutonomousDbVersionResource.Get"); + scope.Start(); + try + { + var response = await _autonomousDbVersionAutonomousDatabaseVersionsRestClient.GetAsync(Id.SubscriptionId, new AzureLocation(Id.Parent.Name), Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AutonomousDbVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a AutonomousDbVersion + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDbVersions/{autonomousdbversionsname} + /// + /// + /// Operation Id + /// AutonomousDbVersion_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _autonomousDbVersionAutonomousDatabaseVersionsClientDiagnostics.CreateScope("AutonomousDbVersionResource.Get"); + scope.Start(); + try + { + var response = _autonomousDbVersionAutonomousDatabaseVersionsRestClient.Get(Id.SubscriptionId, new AzureLocation(Id.Parent.Name), Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AutonomousDbVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/CloudExadataInfrastructureCollection.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/CloudExadataInfrastructureCollection.cs new file mode 100644 index 000000000000..a03c22781484 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/CloudExadataInfrastructureCollection.cs @@ -0,0 +1,494 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.OracleDatabase +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetCloudExadataInfrastructures method from an instance of . + /// + public partial class CloudExadataInfrastructureCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _cloudExadataInfrastructureClientDiagnostics; + private readonly CloudExadataInfrastructuresRestOperations _cloudExadataInfrastructureRestClient; + + /// Initializes a new instance of the class for mocking. + protected CloudExadataInfrastructureCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal CloudExadataInfrastructureCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _cloudExadataInfrastructureClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.OracleDatabase", CloudExadataInfrastructureResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(CloudExadataInfrastructureResource.ResourceType, out string cloudExadataInfrastructureApiVersion); + _cloudExadataInfrastructureRestClient = new CloudExadataInfrastructuresRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, cloudExadataInfrastructureApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceGroupResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceGroupResource.ResourceType), nameof(id)); + } + + /// + /// Create a CloudExadataInfrastructure + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename} + /// + /// + /// Operation Id + /// CloudExadataInfrastructure_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// 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. + /// CloudExadataInfrastructure name. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string cloudexadatainfrastructurename, CloudExadataInfrastructureData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(cloudexadatainfrastructurename, nameof(cloudexadatainfrastructurename)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _cloudExadataInfrastructureClientDiagnostics.CreateScope("CloudExadataInfrastructureCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _cloudExadataInfrastructureRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, cloudexadatainfrastructurename, data, cancellationToken).ConfigureAwait(false); + var operation = new OracleDatabaseArmOperation(new CloudExadataInfrastructureOperationSource(Client), _cloudExadataInfrastructureClientDiagnostics, Pipeline, _cloudExadataInfrastructureRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, cloudexadatainfrastructurename, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a CloudExadataInfrastructure + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename} + /// + /// + /// Operation Id + /// CloudExadataInfrastructure_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// 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. + /// CloudExadataInfrastructure name. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string cloudexadatainfrastructurename, CloudExadataInfrastructureData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(cloudexadatainfrastructurename, nameof(cloudexadatainfrastructurename)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _cloudExadataInfrastructureClientDiagnostics.CreateScope("CloudExadataInfrastructureCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _cloudExadataInfrastructureRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, cloudexadatainfrastructurename, data, cancellationToken); + var operation = new OracleDatabaseArmOperation(new CloudExadataInfrastructureOperationSource(Client), _cloudExadataInfrastructureClientDiagnostics, Pipeline, _cloudExadataInfrastructureRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, cloudexadatainfrastructurename, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a CloudExadataInfrastructure + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename} + /// + /// + /// Operation Id + /// CloudExadataInfrastructure_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// CloudExadataInfrastructure name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string cloudexadatainfrastructurename, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(cloudexadatainfrastructurename, nameof(cloudexadatainfrastructurename)); + + using var scope = _cloudExadataInfrastructureClientDiagnostics.CreateScope("CloudExadataInfrastructureCollection.Get"); + scope.Start(); + try + { + var response = await _cloudExadataInfrastructureRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, cloudexadatainfrastructurename, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new CloudExadataInfrastructureResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a CloudExadataInfrastructure + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename} + /// + /// + /// Operation Id + /// CloudExadataInfrastructure_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// CloudExadataInfrastructure name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string cloudexadatainfrastructurename, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(cloudexadatainfrastructurename, nameof(cloudexadatainfrastructurename)); + + using var scope = _cloudExadataInfrastructureClientDiagnostics.CreateScope("CloudExadataInfrastructureCollection.Get"); + scope.Start(); + try + { + var response = _cloudExadataInfrastructureRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, cloudexadatainfrastructurename, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new CloudExadataInfrastructureResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List CloudExadataInfrastructure resources by resource group + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures + /// + /// + /// Operation Id + /// CloudExadataInfrastructure_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _cloudExadataInfrastructureRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _cloudExadataInfrastructureRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new CloudExadataInfrastructureResource(Client, CloudExadataInfrastructureData.DeserializeCloudExadataInfrastructureData(e)), _cloudExadataInfrastructureClientDiagnostics, Pipeline, "CloudExadataInfrastructureCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List CloudExadataInfrastructure resources by resource group + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures + /// + /// + /// Operation Id + /// CloudExadataInfrastructure_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _cloudExadataInfrastructureRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _cloudExadataInfrastructureRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new CloudExadataInfrastructureResource(Client, CloudExadataInfrastructureData.DeserializeCloudExadataInfrastructureData(e)), _cloudExadataInfrastructureClientDiagnostics, Pipeline, "CloudExadataInfrastructureCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename} + /// + /// + /// Operation Id + /// CloudExadataInfrastructure_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// CloudExadataInfrastructure name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string cloudexadatainfrastructurename, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(cloudexadatainfrastructurename, nameof(cloudexadatainfrastructurename)); + + using var scope = _cloudExadataInfrastructureClientDiagnostics.CreateScope("CloudExadataInfrastructureCollection.Exists"); + scope.Start(); + try + { + var response = await _cloudExadataInfrastructureRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, cloudexadatainfrastructurename, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename} + /// + /// + /// Operation Id + /// CloudExadataInfrastructure_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// CloudExadataInfrastructure name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string cloudexadatainfrastructurename, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(cloudexadatainfrastructurename, nameof(cloudexadatainfrastructurename)); + + using var scope = _cloudExadataInfrastructureClientDiagnostics.CreateScope("CloudExadataInfrastructureCollection.Exists"); + scope.Start(); + try + { + var response = _cloudExadataInfrastructureRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, cloudexadatainfrastructurename, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename} + /// + /// + /// Operation Id + /// CloudExadataInfrastructure_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// CloudExadataInfrastructure name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string cloudexadatainfrastructurename, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(cloudexadatainfrastructurename, nameof(cloudexadatainfrastructurename)); + + using var scope = _cloudExadataInfrastructureClientDiagnostics.CreateScope("CloudExadataInfrastructureCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _cloudExadataInfrastructureRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, cloudexadatainfrastructurename, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new CloudExadataInfrastructureResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename} + /// + /// + /// Operation Id + /// CloudExadataInfrastructure_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// CloudExadataInfrastructure name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string cloudexadatainfrastructurename, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(cloudexadatainfrastructurename, nameof(cloudexadatainfrastructurename)); + + using var scope = _cloudExadataInfrastructureClientDiagnostics.CreateScope("CloudExadataInfrastructureCollection.GetIfExists"); + scope.Start(); + try + { + var response = _cloudExadataInfrastructureRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, cloudexadatainfrastructurename, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new CloudExadataInfrastructureResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/CloudExadataInfrastructureData.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/CloudExadataInfrastructureData.Serialization.cs new file mode 100644 index 000000000000..75ea13884e0f --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/CloudExadataInfrastructureData.Serialization.cs @@ -0,0 +1,197 @@ +// 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.Models; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + public partial class CloudExadataInfrastructureData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CloudExadataInfrastructureData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + writer.WritePropertyName("zones"u8); + writer.WriteStartArray(); + foreach (var item in Zones) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + + CloudExadataInfrastructureData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CloudExadataInfrastructureData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCloudExadataInfrastructureData(document.RootElement, options); + } + + internal static CloudExadataInfrastructureData DeserializeCloudExadataInfrastructureData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + CloudExadataInfrastructureProperties properties = default; + IList zones = default; + IDictionary tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = CloudExadataInfrastructureProperties.DeserializeCloudExadataInfrastructureProperties(property.Value, options); + continue; + } + if (property.NameEquals("zones"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + zones = array; + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("location"u8)) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CloudExadataInfrastructureData( + id, + name, + type, + systemData, + tags ?? new ChangeTrackingDictionary(), + location, + properties, + zones, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(CloudExadataInfrastructureData)} does not support writing '{options.Format}' format."); + } + } + + CloudExadataInfrastructureData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeCloudExadataInfrastructureData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CloudExadataInfrastructureData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/CloudExadataInfrastructureData.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/CloudExadataInfrastructureData.cs new file mode 100644 index 000000000000..3e1a25cef6b5 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/CloudExadataInfrastructureData.cs @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + /// + /// A class representing the CloudExadataInfrastructure data model. + /// CloudExadataInfrastructure resource definition + /// + public partial class CloudExadataInfrastructureData : TrackedResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The location. + /// CloudExadataInfrastructure zones. + /// is null. + public CloudExadataInfrastructureData(AzureLocation location, IEnumerable zones) : base(location) + { + Argument.AssertNotNull(zones, nameof(zones)); + + Zones = zones.ToList(); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The resource-specific properties for this resource. + /// CloudExadataInfrastructure zones. + /// Keeps track of any properties unknown to the library. + internal CloudExadataInfrastructureData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, CloudExadataInfrastructureProperties properties, IList zones, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + Properties = properties; + Zones = zones; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal CloudExadataInfrastructureData() + { + } + + /// The resource-specific properties for this resource. + public CloudExadataInfrastructureProperties Properties { get; set; } + /// CloudExadataInfrastructure zones. + public IList Zones { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/CloudExadataInfrastructureResource.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/CloudExadataInfrastructureResource.Serialization.cs new file mode 100644 index 000000000000..d4584fbea82c --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/CloudExadataInfrastructureResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.OracleDatabase +{ + public partial class CloudExadataInfrastructureResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + CloudExadataInfrastructureData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + CloudExadataInfrastructureData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/CloudExadataInfrastructureResource.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/CloudExadataInfrastructureResource.cs new file mode 100644 index 000000000000..fa5581c28f9c --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/CloudExadataInfrastructureResource.cs @@ -0,0 +1,860 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.OracleDatabase.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.OracleDatabase +{ + /// + /// A Class representing a CloudExadataInfrastructure along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetCloudExadataInfrastructureResource method. + /// Otherwise you can get one from its parent resource using the GetCloudExadataInfrastructure method. + /// + public partial class CloudExadataInfrastructureResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The cloudexadatainfrastructurename. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _cloudExadataInfrastructureClientDiagnostics; + private readonly CloudExadataInfrastructuresRestOperations _cloudExadataInfrastructureRestClient; + private readonly CloudExadataInfrastructureData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Oracle.Database/cloudExadataInfrastructures"; + + /// Initializes a new instance of the class for mocking. + protected CloudExadataInfrastructureResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal CloudExadataInfrastructureResource(ArmClient client, CloudExadataInfrastructureData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal CloudExadataInfrastructureResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _cloudExadataInfrastructureClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.OracleDatabase", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string cloudExadataInfrastructureApiVersion); + _cloudExadataInfrastructureRestClient = new CloudExadataInfrastructuresRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, cloudExadataInfrastructureApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual CloudExadataInfrastructureData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// Gets a collection of DbServerResources in the CloudExadataInfrastructure. + /// An object representing collection of DbServerResources and their operations over a DbServerResource. + public virtual DbServerCollection GetDbServers() + { + return GetCachedClient(client => new DbServerCollection(client, Id)); + } + + /// + /// Get a DbServer + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}/dbServers/{dbserverocid} + /// + /// + /// Operation Id + /// DbServer_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// DbServer OCID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetDbServerAsync(string dbserverocid, CancellationToken cancellationToken = default) + { + return await GetDbServers().GetAsync(dbserverocid, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a DbServer + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}/dbServers/{dbserverocid} + /// + /// + /// Operation Id + /// DbServer_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// DbServer OCID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetDbServer(string dbserverocid, CancellationToken cancellationToken = default) + { + return GetDbServers().Get(dbserverocid, cancellationToken); + } + + /// + /// Get a CloudExadataInfrastructure + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename} + /// + /// + /// Operation Id + /// CloudExadataInfrastructure_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _cloudExadataInfrastructureClientDiagnostics.CreateScope("CloudExadataInfrastructureResource.Get"); + scope.Start(); + try + { + var response = await _cloudExadataInfrastructureRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new CloudExadataInfrastructureResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a CloudExadataInfrastructure + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename} + /// + /// + /// Operation Id + /// CloudExadataInfrastructure_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _cloudExadataInfrastructureClientDiagnostics.CreateScope("CloudExadataInfrastructureResource.Get"); + scope.Start(); + try + { + var response = _cloudExadataInfrastructureRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new CloudExadataInfrastructureResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a CloudExadataInfrastructure + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename} + /// + /// + /// Operation Id + /// CloudExadataInfrastructure_Delete + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _cloudExadataInfrastructureClientDiagnostics.CreateScope("CloudExadataInfrastructureResource.Delete"); + scope.Start(); + try + { + var response = await _cloudExadataInfrastructureRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new OracleDatabaseArmOperation(_cloudExadataInfrastructureClientDiagnostics, Pipeline, _cloudExadataInfrastructureRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a CloudExadataInfrastructure + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename} + /// + /// + /// Operation Id + /// CloudExadataInfrastructure_Delete + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _cloudExadataInfrastructureClientDiagnostics.CreateScope("CloudExadataInfrastructureResource.Delete"); + scope.Start(); + try + { + var response = _cloudExadataInfrastructureRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new OracleDatabaseArmOperation(_cloudExadataInfrastructureClientDiagnostics, Pipeline, _cloudExadataInfrastructureRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a CloudExadataInfrastructure + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename} + /// + /// + /// Operation Id + /// CloudExadataInfrastructure_Update + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, CloudExadataInfrastructurePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _cloudExadataInfrastructureClientDiagnostics.CreateScope("CloudExadataInfrastructureResource.Update"); + scope.Start(); + try + { + var response = await _cloudExadataInfrastructureRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new OracleDatabaseArmOperation(new CloudExadataInfrastructureOperationSource(Client), _cloudExadataInfrastructureClientDiagnostics, Pipeline, _cloudExadataInfrastructureRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a CloudExadataInfrastructure + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename} + /// + /// + /// Operation Id + /// CloudExadataInfrastructure_Update + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, CloudExadataInfrastructurePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _cloudExadataInfrastructureClientDiagnostics.CreateScope("CloudExadataInfrastructureResource.Update"); + scope.Start(); + try + { + var response = _cloudExadataInfrastructureRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); + var operation = new OracleDatabaseArmOperation(new CloudExadataInfrastructureOperationSource(Client), _cloudExadataInfrastructureClientDiagnostics, Pipeline, _cloudExadataInfrastructureRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Perform add storage capacity on exadata infra + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}/addStorageCapacity + /// + /// + /// Operation Id + /// CloudExadataInfrastructures_AddStorageCapacity + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task> AddStorageCapacityAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _cloudExadataInfrastructureClientDiagnostics.CreateScope("CloudExadataInfrastructureResource.AddStorageCapacity"); + scope.Start(); + try + { + var response = await _cloudExadataInfrastructureRestClient.AddStorageCapacityAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new OracleDatabaseArmOperation(new CloudExadataInfrastructureOperationSource(Client), _cloudExadataInfrastructureClientDiagnostics, Pipeline, _cloudExadataInfrastructureRestClient.CreateAddStorageCapacityRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Perform add storage capacity on exadata infra + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}/addStorageCapacity + /// + /// + /// Operation Id + /// CloudExadataInfrastructures_AddStorageCapacity + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation AddStorageCapacity(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _cloudExadataInfrastructureClientDiagnostics.CreateScope("CloudExadataInfrastructureResource.AddStorageCapacity"); + scope.Start(); + try + { + var response = _cloudExadataInfrastructureRestClient.AddStorageCapacity(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new OracleDatabaseArmOperation(new CloudExadataInfrastructureOperationSource(Client), _cloudExadataInfrastructureClientDiagnostics, Pipeline, _cloudExadataInfrastructureRestClient.CreateAddStorageCapacityRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename} + /// + /// + /// Operation Id + /// CloudExadataInfrastructure_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _cloudExadataInfrastructureClientDiagnostics.CreateScope("CloudExadataInfrastructureResource.AddTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues[key] = value; + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _cloudExadataInfrastructureRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new CloudExadataInfrastructureResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new CloudExadataInfrastructurePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename} + /// + /// + /// Operation Id + /// CloudExadataInfrastructure_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _cloudExadataInfrastructureClientDiagnostics.CreateScope("CloudExadataInfrastructureResource.AddTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues[key] = value; + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _cloudExadataInfrastructureRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new CloudExadataInfrastructureResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new CloudExadataInfrastructurePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename} + /// + /// + /// Operation Id + /// CloudExadataInfrastructure_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _cloudExadataInfrastructureClientDiagnostics.CreateScope("CloudExadataInfrastructureResource.SetTags"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _cloudExadataInfrastructureRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new CloudExadataInfrastructureResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new CloudExadataInfrastructurePatch(); + patch.Tags.ReplaceWith(tags); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename} + /// + /// + /// Operation Id + /// CloudExadataInfrastructure_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _cloudExadataInfrastructureClientDiagnostics.CreateScope("CloudExadataInfrastructureResource.SetTags"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _cloudExadataInfrastructureRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new CloudExadataInfrastructureResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new CloudExadataInfrastructurePatch(); + patch.Tags.ReplaceWith(tags); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename} + /// + /// + /// Operation Id + /// CloudExadataInfrastructure_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _cloudExadataInfrastructureClientDiagnostics.CreateScope("CloudExadataInfrastructureResource.RemoveTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.Remove(key); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _cloudExadataInfrastructureRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new CloudExadataInfrastructureResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new CloudExadataInfrastructurePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename} + /// + /// + /// Operation Id + /// CloudExadataInfrastructure_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _cloudExadataInfrastructureClientDiagnostics.CreateScope("CloudExadataInfrastructureResource.RemoveTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.Remove(key); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _cloudExadataInfrastructureRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new CloudExadataInfrastructureResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new CloudExadataInfrastructurePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/CloudVmClusterCollection.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/CloudVmClusterCollection.cs new file mode 100644 index 000000000000..61c30483e41b --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/CloudVmClusterCollection.cs @@ -0,0 +1,494 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.OracleDatabase +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetCloudVmClusters method from an instance of . + /// + public partial class CloudVmClusterCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _cloudVmClusterClientDiagnostics; + private readonly CloudVmClustersRestOperations _cloudVmClusterRestClient; + + /// Initializes a new instance of the class for mocking. + protected CloudVmClusterCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal CloudVmClusterCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _cloudVmClusterClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.OracleDatabase", CloudVmClusterResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(CloudVmClusterResource.ResourceType, out string cloudVmClusterApiVersion); + _cloudVmClusterRestClient = new CloudVmClustersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, cloudVmClusterApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceGroupResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceGroupResource.ResourceType), nameof(id)); + } + + /// + /// Create a CloudVmCluster + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername} + /// + /// + /// Operation Id + /// CloudVmCluster_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// 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. + /// CloudVmCluster name. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string cloudvmclustername, CloudVmClusterData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(cloudvmclustername, nameof(cloudvmclustername)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _cloudVmClusterClientDiagnostics.CreateScope("CloudVmClusterCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _cloudVmClusterRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, cloudvmclustername, data, cancellationToken).ConfigureAwait(false); + var operation = new OracleDatabaseArmOperation(new CloudVmClusterOperationSource(Client), _cloudVmClusterClientDiagnostics, Pipeline, _cloudVmClusterRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, cloudvmclustername, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a CloudVmCluster + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername} + /// + /// + /// Operation Id + /// CloudVmCluster_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// 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. + /// CloudVmCluster name. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string cloudvmclustername, CloudVmClusterData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(cloudvmclustername, nameof(cloudvmclustername)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _cloudVmClusterClientDiagnostics.CreateScope("CloudVmClusterCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _cloudVmClusterRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, cloudvmclustername, data, cancellationToken); + var operation = new OracleDatabaseArmOperation(new CloudVmClusterOperationSource(Client), _cloudVmClusterClientDiagnostics, Pipeline, _cloudVmClusterRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, cloudvmclustername, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a CloudVmCluster + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername} + /// + /// + /// Operation Id + /// CloudVmCluster_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// CloudVmCluster name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string cloudvmclustername, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(cloudvmclustername, nameof(cloudvmclustername)); + + using var scope = _cloudVmClusterClientDiagnostics.CreateScope("CloudVmClusterCollection.Get"); + scope.Start(); + try + { + var response = await _cloudVmClusterRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, cloudvmclustername, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new CloudVmClusterResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a CloudVmCluster + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername} + /// + /// + /// Operation Id + /// CloudVmCluster_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// CloudVmCluster name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string cloudvmclustername, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(cloudvmclustername, nameof(cloudvmclustername)); + + using var scope = _cloudVmClusterClientDiagnostics.CreateScope("CloudVmClusterCollection.Get"); + scope.Start(); + try + { + var response = _cloudVmClusterRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, cloudvmclustername, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new CloudVmClusterResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List CloudVmCluster resources by resource group + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters + /// + /// + /// Operation Id + /// CloudVmCluster_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _cloudVmClusterRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _cloudVmClusterRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new CloudVmClusterResource(Client, CloudVmClusterData.DeserializeCloudVmClusterData(e)), _cloudVmClusterClientDiagnostics, Pipeline, "CloudVmClusterCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List CloudVmCluster resources by resource group + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters + /// + /// + /// Operation Id + /// CloudVmCluster_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _cloudVmClusterRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _cloudVmClusterRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new CloudVmClusterResource(Client, CloudVmClusterData.DeserializeCloudVmClusterData(e)), _cloudVmClusterClientDiagnostics, Pipeline, "CloudVmClusterCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername} + /// + /// + /// Operation Id + /// CloudVmCluster_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// CloudVmCluster name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string cloudvmclustername, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(cloudvmclustername, nameof(cloudvmclustername)); + + using var scope = _cloudVmClusterClientDiagnostics.CreateScope("CloudVmClusterCollection.Exists"); + scope.Start(); + try + { + var response = await _cloudVmClusterRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, cloudvmclustername, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername} + /// + /// + /// Operation Id + /// CloudVmCluster_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// CloudVmCluster name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string cloudvmclustername, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(cloudvmclustername, nameof(cloudvmclustername)); + + using var scope = _cloudVmClusterClientDiagnostics.CreateScope("CloudVmClusterCollection.Exists"); + scope.Start(); + try + { + var response = _cloudVmClusterRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, cloudvmclustername, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername} + /// + /// + /// Operation Id + /// CloudVmCluster_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// CloudVmCluster name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string cloudvmclustername, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(cloudvmclustername, nameof(cloudvmclustername)); + + using var scope = _cloudVmClusterClientDiagnostics.CreateScope("CloudVmClusterCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _cloudVmClusterRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, cloudvmclustername, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new CloudVmClusterResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername} + /// + /// + /// Operation Id + /// CloudVmCluster_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// CloudVmCluster name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string cloudvmclustername, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(cloudvmclustername, nameof(cloudvmclustername)); + + using var scope = _cloudVmClusterClientDiagnostics.CreateScope("CloudVmClusterCollection.GetIfExists"); + scope.Start(); + try + { + var response = _cloudVmClusterRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, cloudvmclustername, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new CloudVmClusterResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/CloudVmClusterData.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/CloudVmClusterData.Serialization.cs new file mode 100644 index 000000000000..f8a8ff693860 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/CloudVmClusterData.Serialization.cs @@ -0,0 +1,178 @@ +// 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.Models; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + public partial class CloudVmClusterData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CloudVmClusterData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + CloudVmClusterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CloudVmClusterData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCloudVmClusterData(document.RootElement, options); + } + + internal static CloudVmClusterData DeserializeCloudVmClusterData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + CloudVmClusterProperties properties = default; + IDictionary tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = CloudVmClusterProperties.DeserializeCloudVmClusterProperties(property.Value, options); + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("location"u8)) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CloudVmClusterData( + id, + name, + type, + systemData, + tags ?? new ChangeTrackingDictionary(), + location, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(CloudVmClusterData)} does not support writing '{options.Format}' format."); + } + } + + CloudVmClusterData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeCloudVmClusterData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CloudVmClusterData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/CloudVmClusterData.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/CloudVmClusterData.cs new file mode 100644 index 000000000000..c5b7897bcb34 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/CloudVmClusterData.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + /// + /// A class representing the CloudVmCluster data model. + /// CloudVmCluster resource definition + /// + public partial class CloudVmClusterData : TrackedResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The location. + public CloudVmClusterData(AzureLocation location) : base(location) + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal CloudVmClusterData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, CloudVmClusterProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal CloudVmClusterData() + { + } + + /// The resource-specific properties for this resource. + public CloudVmClusterProperties Properties { get; set; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/CloudVmClusterResource.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/CloudVmClusterResource.Serialization.cs new file mode 100644 index 000000000000..ef62da1df66f --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/CloudVmClusterResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.OracleDatabase +{ + public partial class CloudVmClusterResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + CloudVmClusterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + CloudVmClusterData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/CloudVmClusterResource.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/CloudVmClusterResource.cs new file mode 100644 index 000000000000..57c5bbe41347 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/CloudVmClusterResource.cs @@ -0,0 +1,1096 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.OracleDatabase.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.OracleDatabase +{ + /// + /// A Class representing a CloudVmCluster along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetCloudVmClusterResource method. + /// Otherwise you can get one from its parent resource using the GetCloudVmCluster method. + /// + public partial class CloudVmClusterResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The cloudvmclustername. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string cloudvmclustername) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _cloudVmClusterClientDiagnostics; + private readonly CloudVmClustersRestOperations _cloudVmClusterRestClient; + private readonly CloudVmClusterData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Oracle.Database/cloudVmClusters"; + + /// Initializes a new instance of the class for mocking. + protected CloudVmClusterResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal CloudVmClusterResource(ArmClient client, CloudVmClusterData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal CloudVmClusterResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _cloudVmClusterClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.OracleDatabase", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string cloudVmClusterApiVersion); + _cloudVmClusterRestClient = new CloudVmClustersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, cloudVmClusterApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual CloudVmClusterData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// Gets a collection of VirtualNetworkAddressResources in the CloudVmCluster. + /// An object representing collection of VirtualNetworkAddressResources and their operations over a VirtualNetworkAddressResource. + public virtual VirtualNetworkAddressCollection GetVirtualNetworkAddresses() + { + return GetCachedClient(client => new VirtualNetworkAddressCollection(client, Id)); + } + + /// + /// Get a VirtualNetworkAddress + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/virtualNetworkAddresses/{virtualnetworkaddressname} + /// + /// + /// Operation Id + /// VirtualNetworkAddress_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Virtual IP address hostname. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetVirtualNetworkAddressAsync(string virtualnetworkaddressname, CancellationToken cancellationToken = default) + { + return await GetVirtualNetworkAddresses().GetAsync(virtualnetworkaddressname, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a VirtualNetworkAddress + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/virtualNetworkAddresses/{virtualnetworkaddressname} + /// + /// + /// Operation Id + /// VirtualNetworkAddress_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Virtual IP address hostname. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetVirtualNetworkAddress(string virtualnetworkaddressname, CancellationToken cancellationToken = default) + { + return GetVirtualNetworkAddresses().Get(virtualnetworkaddressname, cancellationToken); + } + + /// Gets a collection of DbNodeResources in the CloudVmCluster. + /// An object representing collection of DbNodeResources and their operations over a DbNodeResource. + public virtual DbNodeCollection GetDbNodes() + { + return GetCachedClient(client => new DbNodeCollection(client, Id)); + } + + /// + /// Get a DbNode + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/dbNodes/{dbnodeocid} + /// + /// + /// Operation Id + /// DbNode_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// DbNode OCID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetDbNodeAsync(string dbnodeocid, CancellationToken cancellationToken = default) + { + return await GetDbNodes().GetAsync(dbnodeocid, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a DbNode + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/dbNodes/{dbnodeocid} + /// + /// + /// Operation Id + /// DbNode_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// DbNode OCID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetDbNode(string dbnodeocid, CancellationToken cancellationToken = default) + { + return GetDbNodes().Get(dbnodeocid, cancellationToken); + } + + /// + /// Get a CloudVmCluster + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername} + /// + /// + /// Operation Id + /// CloudVmCluster_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _cloudVmClusterClientDiagnostics.CreateScope("CloudVmClusterResource.Get"); + scope.Start(); + try + { + var response = await _cloudVmClusterRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new CloudVmClusterResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a CloudVmCluster + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername} + /// + /// + /// Operation Id + /// CloudVmCluster_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _cloudVmClusterClientDiagnostics.CreateScope("CloudVmClusterResource.Get"); + scope.Start(); + try + { + var response = _cloudVmClusterRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new CloudVmClusterResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a CloudVmCluster + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername} + /// + /// + /// Operation Id + /// CloudVmCluster_Delete + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _cloudVmClusterClientDiagnostics.CreateScope("CloudVmClusterResource.Delete"); + scope.Start(); + try + { + var response = await _cloudVmClusterRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new OracleDatabaseArmOperation(_cloudVmClusterClientDiagnostics, Pipeline, _cloudVmClusterRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a CloudVmCluster + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername} + /// + /// + /// Operation Id + /// CloudVmCluster_Delete + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _cloudVmClusterClientDiagnostics.CreateScope("CloudVmClusterResource.Delete"); + scope.Start(); + try + { + var response = _cloudVmClusterRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new OracleDatabaseArmOperation(_cloudVmClusterClientDiagnostics, Pipeline, _cloudVmClusterRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a CloudVmCluster + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername} + /// + /// + /// Operation Id + /// CloudVmCluster_Update + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, CloudVmClusterPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _cloudVmClusterClientDiagnostics.CreateScope("CloudVmClusterResource.Update"); + scope.Start(); + try + { + var response = await _cloudVmClusterRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new OracleDatabaseArmOperation(new CloudVmClusterOperationSource(Client), _cloudVmClusterClientDiagnostics, Pipeline, _cloudVmClusterRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a CloudVmCluster + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername} + /// + /// + /// Operation Id + /// CloudVmCluster_Update + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, CloudVmClusterPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _cloudVmClusterClientDiagnostics.CreateScope("CloudVmClusterResource.Update"); + scope.Start(); + try + { + var response = _cloudVmClusterRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); + var operation = new OracleDatabaseArmOperation(new CloudVmClusterOperationSource(Client), _cloudVmClusterClientDiagnostics, Pipeline, _cloudVmClusterRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add VMs to the VM Cluster + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/addVms + /// + /// + /// Operation Id + /// CloudVmClusters_AddVms + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual async Task> AddVmsAsync(WaitUntil waitUntil, AddRemoveDbNode body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using var scope = _cloudVmClusterClientDiagnostics.CreateScope("CloudVmClusterResource.AddVms"); + scope.Start(); + try + { + var response = await _cloudVmClusterRestClient.AddVmsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body, cancellationToken).ConfigureAwait(false); + var operation = new OracleDatabaseArmOperation(new CloudVmClusterOperationSource(Client), _cloudVmClusterClientDiagnostics, Pipeline, _cloudVmClusterRestClient.CreateAddVmsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add VMs to the VM Cluster + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/addVms + /// + /// + /// Operation Id + /// CloudVmClusters_AddVms + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation AddVms(WaitUntil waitUntil, AddRemoveDbNode body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using var scope = _cloudVmClusterClientDiagnostics.CreateScope("CloudVmClusterResource.AddVms"); + scope.Start(); + try + { + var response = _cloudVmClusterRestClient.AddVms(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body, cancellationToken); + var operation = new OracleDatabaseArmOperation(new CloudVmClusterOperationSource(Client), _cloudVmClusterClientDiagnostics, Pipeline, _cloudVmClusterRestClient.CreateAddVmsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Remove VMs from the VM Cluster + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/removeVms + /// + /// + /// Operation Id + /// CloudVmClusters_RemoveVms + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual async Task> RemoveVmsAsync(WaitUntil waitUntil, AddRemoveDbNode body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using var scope = _cloudVmClusterClientDiagnostics.CreateScope("CloudVmClusterResource.RemoveVms"); + scope.Start(); + try + { + var response = await _cloudVmClusterRestClient.RemoveVmsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body, cancellationToken).ConfigureAwait(false); + var operation = new OracleDatabaseArmOperation(new CloudVmClusterOperationSource(Client), _cloudVmClusterClientDiagnostics, Pipeline, _cloudVmClusterRestClient.CreateRemoveVmsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Remove VMs from the VM Cluster + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/removeVms + /// + /// + /// Operation Id + /// CloudVmClusters_RemoveVms + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation RemoveVms(WaitUntil waitUntil, AddRemoveDbNode body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using var scope = _cloudVmClusterClientDiagnostics.CreateScope("CloudVmClusterResource.RemoveVms"); + scope.Start(); + try + { + var response = _cloudVmClusterRestClient.RemoveVms(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body, cancellationToken); + var operation = new OracleDatabaseArmOperation(new CloudVmClusterOperationSource(Client), _cloudVmClusterClientDiagnostics, Pipeline, _cloudVmClusterRestClient.CreateRemoveVmsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List Private IP Addresses by the provided filter + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/listPrivateIpAddresses + /// + /// + /// Operation Id + /// CloudVmClusters_ListPrivateIPAddresses + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The content of the action request. + /// The cancellation token to use. + /// is null. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetPrivateIPAddressesAsync(PrivateIPAddressesFilter body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => _cloudVmClusterRestClient.CreateListPrivateIPAddressesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => PrivateIPAddressProperties.DeserializePrivateIPAddressProperties(e), _cloudVmClusterClientDiagnostics, Pipeline, "CloudVmClusterResource.GetPrivateIPAddresses", "", null, cancellationToken); + } + + /// + /// List Private IP Addresses by the provided filter + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/listPrivateIpAddresses + /// + /// + /// Operation Id + /// CloudVmClusters_ListPrivateIPAddresses + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The content of the action request. + /// The cancellation token to use. + /// is null. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetPrivateIPAddresses(PrivateIPAddressesFilter body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => _cloudVmClusterRestClient.CreateListPrivateIPAddressesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, e => PrivateIPAddressProperties.DeserializePrivateIPAddressProperties(e), _cloudVmClusterClientDiagnostics, Pipeline, "CloudVmClusterResource.GetPrivateIPAddresses", "", null, cancellationToken); + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername} + /// + /// + /// Operation Id + /// CloudVmCluster_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _cloudVmClusterClientDiagnostics.CreateScope("CloudVmClusterResource.AddTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues[key] = value; + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _cloudVmClusterRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new CloudVmClusterResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new CloudVmClusterPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername} + /// + /// + /// Operation Id + /// CloudVmCluster_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _cloudVmClusterClientDiagnostics.CreateScope("CloudVmClusterResource.AddTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues[key] = value; + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _cloudVmClusterRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new CloudVmClusterResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new CloudVmClusterPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername} + /// + /// + /// Operation Id + /// CloudVmCluster_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _cloudVmClusterClientDiagnostics.CreateScope("CloudVmClusterResource.SetTags"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _cloudVmClusterRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new CloudVmClusterResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new CloudVmClusterPatch(); + patch.Tags.ReplaceWith(tags); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername} + /// + /// + /// Operation Id + /// CloudVmCluster_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _cloudVmClusterClientDiagnostics.CreateScope("CloudVmClusterResource.SetTags"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _cloudVmClusterRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new CloudVmClusterResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new CloudVmClusterPatch(); + patch.Tags.ReplaceWith(tags); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername} + /// + /// + /// Operation Id + /// CloudVmCluster_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _cloudVmClusterClientDiagnostics.CreateScope("CloudVmClusterResource.RemoveTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.Remove(key); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _cloudVmClusterRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new CloudVmClusterResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new CloudVmClusterPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername} + /// + /// + /// Operation Id + /// CloudVmCluster_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _cloudVmClusterClientDiagnostics.CreateScope("CloudVmClusterResource.RemoveTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.Remove(key); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _cloudVmClusterRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new CloudVmClusterResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new CloudVmClusterPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/DbNodeCollection.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/DbNodeCollection.cs new file mode 100644 index 000000000000..19f2a0d5d505 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/DbNodeCollection.cs @@ -0,0 +1,395 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.OracleDatabase +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetDbNodes method from an instance of . + /// + public partial class DbNodeCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _dbNodeClientDiagnostics; + private readonly DbNodesRestOperations _dbNodeRestClient; + + /// Initializes a new instance of the class for mocking. + protected DbNodeCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal DbNodeCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _dbNodeClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.OracleDatabase", DbNodeResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DbNodeResource.ResourceType, out string dbNodeApiVersion); + _dbNodeRestClient = new DbNodesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dbNodeApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != CloudVmClusterResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, CloudVmClusterResource.ResourceType), nameof(id)); + } + + /// + /// Get a DbNode + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/dbNodes/{dbnodeocid} + /// + /// + /// Operation Id + /// DbNode_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// DbNode OCID. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string dbnodeocid, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dbnodeocid, nameof(dbnodeocid)); + + using var scope = _dbNodeClientDiagnostics.CreateScope("DbNodeCollection.Get"); + scope.Start(); + try + { + var response = await _dbNodeRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dbnodeocid, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DbNodeResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a DbNode + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/dbNodes/{dbnodeocid} + /// + /// + /// Operation Id + /// DbNode_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// DbNode OCID. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string dbnodeocid, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dbnodeocid, nameof(dbnodeocid)); + + using var scope = _dbNodeClientDiagnostics.CreateScope("DbNodeCollection.Get"); + scope.Start(); + try + { + var response = _dbNodeRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dbnodeocid, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DbNodeResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List DbNode resources by CloudVmCluster + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/dbNodes + /// + /// + /// Operation Id + /// DbNode_ListByParent + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _dbNodeRestClient.CreateListByParentRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dbNodeRestClient.CreateListByParentNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DbNodeResource(Client, DbNodeData.DeserializeDbNodeData(e)), _dbNodeClientDiagnostics, Pipeline, "DbNodeCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List DbNode resources by CloudVmCluster + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/dbNodes + /// + /// + /// Operation Id + /// DbNode_ListByParent + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _dbNodeRestClient.CreateListByParentRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dbNodeRestClient.CreateListByParentNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DbNodeResource(Client, DbNodeData.DeserializeDbNodeData(e)), _dbNodeClientDiagnostics, Pipeline, "DbNodeCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/dbNodes/{dbnodeocid} + /// + /// + /// Operation Id + /// DbNode_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// DbNode OCID. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string dbnodeocid, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dbnodeocid, nameof(dbnodeocid)); + + using var scope = _dbNodeClientDiagnostics.CreateScope("DbNodeCollection.Exists"); + scope.Start(); + try + { + var response = await _dbNodeRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dbnodeocid, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/dbNodes/{dbnodeocid} + /// + /// + /// Operation Id + /// DbNode_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// DbNode OCID. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string dbnodeocid, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dbnodeocid, nameof(dbnodeocid)); + + using var scope = _dbNodeClientDiagnostics.CreateScope("DbNodeCollection.Exists"); + scope.Start(); + try + { + var response = _dbNodeRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dbnodeocid, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/dbNodes/{dbnodeocid} + /// + /// + /// Operation Id + /// DbNode_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// DbNode OCID. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string dbnodeocid, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dbnodeocid, nameof(dbnodeocid)); + + using var scope = _dbNodeClientDiagnostics.CreateScope("DbNodeCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _dbNodeRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dbnodeocid, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DbNodeResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/dbNodes/{dbnodeocid} + /// + /// + /// Operation Id + /// DbNode_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// DbNode OCID. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string dbnodeocid, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dbnodeocid, nameof(dbnodeocid)); + + using var scope = _dbNodeClientDiagnostics.CreateScope("DbNodeCollection.GetIfExists"); + scope.Start(); + try + { + var response = _dbNodeRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dbnodeocid, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DbNodeResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/DbNodeData.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/DbNodeData.Serialization.cs new file mode 100644 index 000000000000..9113f44bd4e9 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/DbNodeData.Serialization.cs @@ -0,0 +1,155 @@ +// 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.Models; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + public partial class DbNodeData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DbNodeData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + DbNodeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DbNodeData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDbNodeData(document.RootElement, options); + } + + internal static DbNodeData DeserializeDbNodeData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DbNodeProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = DbNodeProperties.DeserializeDbNodeProperties(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DbNodeData( + id, + name, + type, + systemData, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DbNodeData)} does not support writing '{options.Format}' format."); + } + } + + DbNodeData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDbNodeData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DbNodeData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/DbNodeData.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/DbNodeData.cs new file mode 100644 index 000000000000..f554ff697df3 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/DbNodeData.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + /// + /// A class representing the DbNode data model. + /// The DbNode resource belonging to vmCluster + /// + public partial class DbNodeData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal DbNodeData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal DbNodeData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DbNodeProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public DbNodeProperties Properties { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/DbNodeResource.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/DbNodeResource.Serialization.cs new file mode 100644 index 000000000000..91f8cf427673 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/DbNodeResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.OracleDatabase +{ + public partial class DbNodeResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + DbNodeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + DbNodeData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/DbNodeResource.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/DbNodeResource.cs new file mode 100644 index 000000000000..571efe901b1a --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/DbNodeResource.cs @@ -0,0 +1,264 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + /// + /// A Class representing a DbNode along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetDbNodeResource method. + /// Otherwise you can get one from its parent resource using the GetDbNode method. + /// + public partial class DbNodeResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The cloudvmclustername. + /// The dbnodeocid. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string cloudvmclustername, string dbnodeocid) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/dbNodes/{dbnodeocid}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _dbNodeClientDiagnostics; + private readonly DbNodesRestOperations _dbNodeRestClient; + private readonly DbNodeData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Oracle.Database/cloudVmClusters/dbNodes"; + + /// Initializes a new instance of the class for mocking. + protected DbNodeResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal DbNodeResource(ArmClient client, DbNodeData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal DbNodeResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _dbNodeClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.OracleDatabase", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string dbNodeApiVersion); + _dbNodeRestClient = new DbNodesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dbNodeApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual DbNodeData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get a DbNode + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/dbNodes/{dbnodeocid} + /// + /// + /// Operation Id + /// DbNode_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _dbNodeClientDiagnostics.CreateScope("DbNodeResource.Get"); + scope.Start(); + try + { + var response = await _dbNodeRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DbNodeResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a DbNode + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/dbNodes/{dbnodeocid} + /// + /// + /// Operation Id + /// DbNode_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _dbNodeClientDiagnostics.CreateScope("DbNodeResource.Get"); + scope.Start(); + try + { + var response = _dbNodeRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DbNodeResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// VM actions on DbNode of VM Cluster by the provided filter + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/dbNodes/{dbnodeocid}/action + /// + /// + /// Operation Id + /// DbNodes_Action + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual async Task> ActionAsync(WaitUntil waitUntil, DbNodeAction body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using var scope = _dbNodeClientDiagnostics.CreateScope("DbNodeResource.Action"); + scope.Start(); + try + { + var response = await _dbNodeRestClient.ActionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body, cancellationToken).ConfigureAwait(false); + var operation = new OracleDatabaseArmOperation(new DbNodeOperationSource(Client), _dbNodeClientDiagnostics, Pipeline, _dbNodeRestClient.CreateActionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// VM actions on DbNode of VM Cluster by the provided filter + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/dbNodes/{dbnodeocid}/action + /// + /// + /// Operation Id + /// DbNodes_Action + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Action(WaitUntil waitUntil, DbNodeAction body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using var scope = _dbNodeClientDiagnostics.CreateScope("DbNodeResource.Action"); + scope.Start(); + try + { + var response = _dbNodeRestClient.Action(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body, cancellationToken); + var operation = new OracleDatabaseArmOperation(new DbNodeOperationSource(Client), _dbNodeClientDiagnostics, Pipeline, _dbNodeRestClient.CreateActionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/DbServerCollection.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/DbServerCollection.cs new file mode 100644 index 000000000000..6ca62f4737e3 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/DbServerCollection.cs @@ -0,0 +1,395 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.OracleDatabase +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetDbServers method from an instance of . + /// + public partial class DbServerCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _dbServerClientDiagnostics; + private readonly DbServersRestOperations _dbServerRestClient; + + /// Initializes a new instance of the class for mocking. + protected DbServerCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal DbServerCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _dbServerClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.OracleDatabase", DbServerResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DbServerResource.ResourceType, out string dbServerApiVersion); + _dbServerRestClient = new DbServersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dbServerApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != CloudExadataInfrastructureResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, CloudExadataInfrastructureResource.ResourceType), nameof(id)); + } + + /// + /// Get a DbServer + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}/dbServers/{dbserverocid} + /// + /// + /// Operation Id + /// DbServer_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// DbServer OCID. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string dbserverocid, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dbserverocid, nameof(dbserverocid)); + + using var scope = _dbServerClientDiagnostics.CreateScope("DbServerCollection.Get"); + scope.Start(); + try + { + var response = await _dbServerRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dbserverocid, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DbServerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a DbServer + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}/dbServers/{dbserverocid} + /// + /// + /// Operation Id + /// DbServer_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// DbServer OCID. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string dbserverocid, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dbserverocid, nameof(dbserverocid)); + + using var scope = _dbServerClientDiagnostics.CreateScope("DbServerCollection.Get"); + scope.Start(); + try + { + var response = _dbServerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dbserverocid, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DbServerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List DbServer resources by CloudExadataInfrastructure + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}/dbServers + /// + /// + /// Operation Id + /// DbServer_ListByParent + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _dbServerRestClient.CreateListByParentRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dbServerRestClient.CreateListByParentNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DbServerResource(Client, DbServerData.DeserializeDbServerData(e)), _dbServerClientDiagnostics, Pipeline, "DbServerCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List DbServer resources by CloudExadataInfrastructure + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}/dbServers + /// + /// + /// Operation Id + /// DbServer_ListByParent + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _dbServerRestClient.CreateListByParentRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dbServerRestClient.CreateListByParentNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DbServerResource(Client, DbServerData.DeserializeDbServerData(e)), _dbServerClientDiagnostics, Pipeline, "DbServerCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}/dbServers/{dbserverocid} + /// + /// + /// Operation Id + /// DbServer_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// DbServer OCID. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string dbserverocid, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dbserverocid, nameof(dbserverocid)); + + using var scope = _dbServerClientDiagnostics.CreateScope("DbServerCollection.Exists"); + scope.Start(); + try + { + var response = await _dbServerRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dbserverocid, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}/dbServers/{dbserverocid} + /// + /// + /// Operation Id + /// DbServer_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// DbServer OCID. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string dbserverocid, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dbserverocid, nameof(dbserverocid)); + + using var scope = _dbServerClientDiagnostics.CreateScope("DbServerCollection.Exists"); + scope.Start(); + try + { + var response = _dbServerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dbserverocid, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}/dbServers/{dbserverocid} + /// + /// + /// Operation Id + /// DbServer_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// DbServer OCID. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string dbserverocid, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dbserverocid, nameof(dbserverocid)); + + using var scope = _dbServerClientDiagnostics.CreateScope("DbServerCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _dbServerRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dbserverocid, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DbServerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}/dbServers/{dbserverocid} + /// + /// + /// Operation Id + /// DbServer_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// DbServer OCID. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string dbserverocid, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dbserverocid, nameof(dbserverocid)); + + using var scope = _dbServerClientDiagnostics.CreateScope("DbServerCollection.GetIfExists"); + scope.Start(); + try + { + var response = _dbServerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dbserverocid, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DbServerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/DbServerData.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/DbServerData.Serialization.cs new file mode 100644 index 000000000000..8305d2d57961 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/DbServerData.Serialization.cs @@ -0,0 +1,155 @@ +// 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.Models; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + public partial class DbServerData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DbServerData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + DbServerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DbServerData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDbServerData(document.RootElement, options); + } + + internal static DbServerData DeserializeDbServerData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DbServerProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = DbServerProperties.DeserializeDbServerProperties(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DbServerData( + id, + name, + type, + systemData, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DbServerData)} does not support writing '{options.Format}' format."); + } + } + + DbServerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDbServerData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DbServerData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/DbServerData.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/DbServerData.cs new file mode 100644 index 000000000000..fe015f457cb0 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/DbServerData.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + /// + /// A class representing the DbServer data model. + /// DbServer resource model + /// + public partial class DbServerData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal DbServerData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal DbServerData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DbServerProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public DbServerProperties Properties { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/DbServerResource.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/DbServerResource.Serialization.cs new file mode 100644 index 000000000000..283a415afbd2 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/DbServerResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.OracleDatabase +{ + public partial class DbServerResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + DbServerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + DbServerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/DbServerResource.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/DbServerResource.cs new file mode 100644 index 000000000000..4aac01ebf5b0 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/DbServerResource.cs @@ -0,0 +1,171 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.OracleDatabase +{ + /// + /// A Class representing a DbServer along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetDbServerResource method. + /// Otherwise you can get one from its parent resource using the GetDbServer method. + /// + public partial class DbServerResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The cloudexadatainfrastructurename. + /// The dbserverocid. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename, string dbserverocid) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}/dbServers/{dbserverocid}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _dbServerClientDiagnostics; + private readonly DbServersRestOperations _dbServerRestClient; + private readonly DbServerData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Oracle.Database/cloudExadataInfrastructures/dbServers"; + + /// Initializes a new instance of the class for mocking. + protected DbServerResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal DbServerResource(ArmClient client, DbServerData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal DbServerResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _dbServerClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.OracleDatabase", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string dbServerApiVersion); + _dbServerRestClient = new DbServersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dbServerApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual DbServerData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get a DbServer + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}/dbServers/{dbserverocid} + /// + /// + /// Operation Id + /// DbServer_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _dbServerClientDiagnostics.CreateScope("DbServerResource.Get"); + scope.Start(); + try + { + var response = await _dbServerRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DbServerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a DbServer + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}/dbServers/{dbserverocid} + /// + /// + /// Operation Id + /// DbServer_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _dbServerClientDiagnostics.CreateScope("DbServerResource.Get"); + scope.Start(); + try + { + var response = _dbServerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DbServerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/DbSystemShapeCollection.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/DbSystemShapeCollection.cs new file mode 100644 index 000000000000..ba6f7acba62f --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/DbSystemShapeCollection.cs @@ -0,0 +1,401 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.OracleDatabase +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetDbSystemShapes method from an instance of . + /// + public partial class DbSystemShapeCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _dbSystemShapeClientDiagnostics; + private readonly DbSystemShapesRestOperations _dbSystemShapeRestClient; + private readonly AzureLocation _location; + + /// Initializes a new instance of the class for mocking. + protected DbSystemShapeCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + /// The name of the Azure region. + internal DbSystemShapeCollection(ArmClient client, ResourceIdentifier id, AzureLocation location) : base(client, id) + { + _location = location; + _dbSystemShapeClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.OracleDatabase", DbSystemShapeResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DbSystemShapeResource.ResourceType, out string dbSystemShapeApiVersion); + _dbSystemShapeRestClient = new DbSystemShapesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dbSystemShapeApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != SubscriptionResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, SubscriptionResource.ResourceType), nameof(id)); + } + + /// + /// Get a DbSystemShape + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dbSystemShapes/{dbsystemshapename} + /// + /// + /// Operation Id + /// DbSystemShape_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// DbSystemShape name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string dbsystemshapename, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dbsystemshapename, nameof(dbsystemshapename)); + + using var scope = _dbSystemShapeClientDiagnostics.CreateScope("DbSystemShapeCollection.Get"); + scope.Start(); + try + { + var response = await _dbSystemShapeRestClient.GetAsync(Id.SubscriptionId, new AzureLocation(_location), dbsystemshapename, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DbSystemShapeResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a DbSystemShape + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dbSystemShapes/{dbsystemshapename} + /// + /// + /// Operation Id + /// DbSystemShape_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// DbSystemShape name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string dbsystemshapename, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dbsystemshapename, nameof(dbsystemshapename)); + + using var scope = _dbSystemShapeClientDiagnostics.CreateScope("DbSystemShapeCollection.Get"); + scope.Start(); + try + { + var response = _dbSystemShapeRestClient.Get(Id.SubscriptionId, new AzureLocation(_location), dbsystemshapename, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DbSystemShapeResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List DbSystemShape resources by SubscriptionLocationResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dbSystemShapes + /// + /// + /// Operation Id + /// DbSystemShape_ListByLocation + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Filters the result for the given Azure Availability Zone. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(string zone = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _dbSystemShapeRestClient.CreateListByLocationRequest(Id.SubscriptionId, new AzureLocation(_location), zone); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dbSystemShapeRestClient.CreateListByLocationNextPageRequest(nextLink, Id.SubscriptionId, new AzureLocation(_location), zone); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DbSystemShapeResource(Client, DbSystemShapeData.DeserializeDbSystemShapeData(e)), _dbSystemShapeClientDiagnostics, Pipeline, "DbSystemShapeCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List DbSystemShape resources by SubscriptionLocationResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dbSystemShapes + /// + /// + /// Operation Id + /// DbSystemShape_ListByLocation + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Filters the result for the given Azure Availability Zone. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(string zone = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _dbSystemShapeRestClient.CreateListByLocationRequest(Id.SubscriptionId, new AzureLocation(_location), zone); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dbSystemShapeRestClient.CreateListByLocationNextPageRequest(nextLink, Id.SubscriptionId, new AzureLocation(_location), zone); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DbSystemShapeResource(Client, DbSystemShapeData.DeserializeDbSystemShapeData(e)), _dbSystemShapeClientDiagnostics, Pipeline, "DbSystemShapeCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dbSystemShapes/{dbsystemshapename} + /// + /// + /// Operation Id + /// DbSystemShape_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// DbSystemShape name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string dbsystemshapename, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dbsystemshapename, nameof(dbsystemshapename)); + + using var scope = _dbSystemShapeClientDiagnostics.CreateScope("DbSystemShapeCollection.Exists"); + scope.Start(); + try + { + var response = await _dbSystemShapeRestClient.GetAsync(Id.SubscriptionId, new AzureLocation(_location), dbsystemshapename, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dbSystemShapes/{dbsystemshapename} + /// + /// + /// Operation Id + /// DbSystemShape_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// DbSystemShape name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string dbsystemshapename, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dbsystemshapename, nameof(dbsystemshapename)); + + using var scope = _dbSystemShapeClientDiagnostics.CreateScope("DbSystemShapeCollection.Exists"); + scope.Start(); + try + { + var response = _dbSystemShapeRestClient.Get(Id.SubscriptionId, new AzureLocation(_location), dbsystemshapename, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dbSystemShapes/{dbsystemshapename} + /// + /// + /// Operation Id + /// DbSystemShape_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// DbSystemShape name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string dbsystemshapename, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dbsystemshapename, nameof(dbsystemshapename)); + + using var scope = _dbSystemShapeClientDiagnostics.CreateScope("DbSystemShapeCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _dbSystemShapeRestClient.GetAsync(Id.SubscriptionId, new AzureLocation(_location), dbsystemshapename, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DbSystemShapeResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dbSystemShapes/{dbsystemshapename} + /// + /// + /// Operation Id + /// DbSystemShape_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// DbSystemShape name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string dbsystemshapename, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dbsystemshapename, nameof(dbsystemshapename)); + + using var scope = _dbSystemShapeClientDiagnostics.CreateScope("DbSystemShapeCollection.GetIfExists"); + scope.Start(); + try + { + var response = _dbSystemShapeRestClient.Get(Id.SubscriptionId, new AzureLocation(_location), dbsystemshapename, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DbSystemShapeResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/DbSystemShapeData.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/DbSystemShapeData.Serialization.cs new file mode 100644 index 000000000000..bfd090df7b02 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/DbSystemShapeData.Serialization.cs @@ -0,0 +1,155 @@ +// 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.Models; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + public partial class DbSystemShapeData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DbSystemShapeData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + DbSystemShapeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DbSystemShapeData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDbSystemShapeData(document.RootElement, options); + } + + internal static DbSystemShapeData DeserializeDbSystemShapeData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DbSystemShapeProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = DbSystemShapeProperties.DeserializeDbSystemShapeProperties(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DbSystemShapeData( + id, + name, + type, + systemData, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DbSystemShapeData)} does not support writing '{options.Format}' format."); + } + } + + DbSystemShapeData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDbSystemShapeData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DbSystemShapeData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/DbSystemShapeData.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/DbSystemShapeData.cs new file mode 100644 index 000000000000..b17b327120ed --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/DbSystemShapeData.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + /// + /// A class representing the DbSystemShape data model. + /// DbSystemShape resource definition + /// + public partial class DbSystemShapeData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal DbSystemShapeData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal DbSystemShapeData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DbSystemShapeProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public DbSystemShapeProperties Properties { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/DbSystemShapeResource.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/DbSystemShapeResource.Serialization.cs new file mode 100644 index 000000000000..43c5850c36c7 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/DbSystemShapeResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.OracleDatabase +{ + public partial class DbSystemShapeResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + DbSystemShapeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + DbSystemShapeData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/DbSystemShapeResource.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/DbSystemShapeResource.cs new file mode 100644 index 000000000000..5b6fa15b2afd --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/DbSystemShapeResource.cs @@ -0,0 +1,171 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.OracleDatabase +{ + /// + /// A Class representing a DbSystemShape along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetDbSystemShapeResource method. + /// Otherwise you can get one from its parent resource using the GetDbSystemShape method. + /// + public partial class DbSystemShapeResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The location. + /// The dbsystemshapename. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, AzureLocation location, string dbsystemshapename) + { + var resourceId = $"/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dbSystemShapes/{dbsystemshapename}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _dbSystemShapeClientDiagnostics; + private readonly DbSystemShapesRestOperations _dbSystemShapeRestClient; + private readonly DbSystemShapeData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Oracle.Database/locations/dbSystemShapes"; + + /// Initializes a new instance of the class for mocking. + protected DbSystemShapeResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal DbSystemShapeResource(ArmClient client, DbSystemShapeData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal DbSystemShapeResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _dbSystemShapeClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.OracleDatabase", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string dbSystemShapeApiVersion); + _dbSystemShapeRestClient = new DbSystemShapesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dbSystemShapeApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual DbSystemShapeData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get a DbSystemShape + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dbSystemShapes/{dbsystemshapename} + /// + /// + /// Operation Id + /// DbSystemShape_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _dbSystemShapeClientDiagnostics.CreateScope("DbSystemShapeResource.Get"); + scope.Start(); + try + { + var response = await _dbSystemShapeRestClient.GetAsync(Id.SubscriptionId, new AzureLocation(Id.Parent.Name), Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DbSystemShapeResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a DbSystemShape + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dbSystemShapes/{dbsystemshapename} + /// + /// + /// Operation Id + /// DbSystemShape_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _dbSystemShapeClientDiagnostics.CreateScope("DbSystemShapeResource.Get"); + scope.Start(); + try + { + var response = _dbSystemShapeRestClient.Get(Id.SubscriptionId, new AzureLocation(Id.Parent.Name), Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DbSystemShapeResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/DnsPrivateViewCollection.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/DnsPrivateViewCollection.cs new file mode 100644 index 000000000000..ea29005e101e --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/DnsPrivateViewCollection.cs @@ -0,0 +1,399 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.OracleDatabase +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetDnsPrivateViews method from an instance of . + /// + public partial class DnsPrivateViewCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _dnsPrivateViewClientDiagnostics; + private readonly DnsPrivateViewsRestOperations _dnsPrivateViewRestClient; + private readonly AzureLocation _location; + + /// Initializes a new instance of the class for mocking. + protected DnsPrivateViewCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + /// The name of the Azure region. + internal DnsPrivateViewCollection(ArmClient client, ResourceIdentifier id, AzureLocation location) : base(client, id) + { + _location = location; + _dnsPrivateViewClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.OracleDatabase", DnsPrivateViewResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DnsPrivateViewResource.ResourceType, out string dnsPrivateViewApiVersion); + _dnsPrivateViewRestClient = new DnsPrivateViewsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dnsPrivateViewApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != SubscriptionResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, SubscriptionResource.ResourceType), nameof(id)); + } + + /// + /// Get a DnsPrivateView + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateViews/{dnsprivateviewocid} + /// + /// + /// Operation Id + /// DnsPrivateView_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// DnsPrivateView OCID. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string dnsprivateviewocid, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dnsprivateviewocid, nameof(dnsprivateviewocid)); + + using var scope = _dnsPrivateViewClientDiagnostics.CreateScope("DnsPrivateViewCollection.Get"); + scope.Start(); + try + { + var response = await _dnsPrivateViewRestClient.GetAsync(Id.SubscriptionId, new AzureLocation(_location), dnsprivateviewocid, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DnsPrivateViewResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a DnsPrivateView + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateViews/{dnsprivateviewocid} + /// + /// + /// Operation Id + /// DnsPrivateView_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// DnsPrivateView OCID. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string dnsprivateviewocid, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dnsprivateviewocid, nameof(dnsprivateviewocid)); + + using var scope = _dnsPrivateViewClientDiagnostics.CreateScope("DnsPrivateViewCollection.Get"); + scope.Start(); + try + { + var response = _dnsPrivateViewRestClient.Get(Id.SubscriptionId, new AzureLocation(_location), dnsprivateviewocid, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DnsPrivateViewResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List DnsPrivateView resources by SubscriptionLocationResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateViews + /// + /// + /// Operation Id + /// DnsPrivateView_ListByLocation + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _dnsPrivateViewRestClient.CreateListByLocationRequest(Id.SubscriptionId, new AzureLocation(_location)); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dnsPrivateViewRestClient.CreateListByLocationNextPageRequest(nextLink, Id.SubscriptionId, new AzureLocation(_location)); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DnsPrivateViewResource(Client, DnsPrivateViewData.DeserializeDnsPrivateViewData(e)), _dnsPrivateViewClientDiagnostics, Pipeline, "DnsPrivateViewCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List DnsPrivateView resources by SubscriptionLocationResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateViews + /// + /// + /// Operation Id + /// DnsPrivateView_ListByLocation + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _dnsPrivateViewRestClient.CreateListByLocationRequest(Id.SubscriptionId, new AzureLocation(_location)); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dnsPrivateViewRestClient.CreateListByLocationNextPageRequest(nextLink, Id.SubscriptionId, new AzureLocation(_location)); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DnsPrivateViewResource(Client, DnsPrivateViewData.DeserializeDnsPrivateViewData(e)), _dnsPrivateViewClientDiagnostics, Pipeline, "DnsPrivateViewCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateViews/{dnsprivateviewocid} + /// + /// + /// Operation Id + /// DnsPrivateView_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// DnsPrivateView OCID. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string dnsprivateviewocid, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dnsprivateviewocid, nameof(dnsprivateviewocid)); + + using var scope = _dnsPrivateViewClientDiagnostics.CreateScope("DnsPrivateViewCollection.Exists"); + scope.Start(); + try + { + var response = await _dnsPrivateViewRestClient.GetAsync(Id.SubscriptionId, new AzureLocation(_location), dnsprivateviewocid, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateViews/{dnsprivateviewocid} + /// + /// + /// Operation Id + /// DnsPrivateView_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// DnsPrivateView OCID. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string dnsprivateviewocid, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dnsprivateviewocid, nameof(dnsprivateviewocid)); + + using var scope = _dnsPrivateViewClientDiagnostics.CreateScope("DnsPrivateViewCollection.Exists"); + scope.Start(); + try + { + var response = _dnsPrivateViewRestClient.Get(Id.SubscriptionId, new AzureLocation(_location), dnsprivateviewocid, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateViews/{dnsprivateviewocid} + /// + /// + /// Operation Id + /// DnsPrivateView_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// DnsPrivateView OCID. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string dnsprivateviewocid, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dnsprivateviewocid, nameof(dnsprivateviewocid)); + + using var scope = _dnsPrivateViewClientDiagnostics.CreateScope("DnsPrivateViewCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _dnsPrivateViewRestClient.GetAsync(Id.SubscriptionId, new AzureLocation(_location), dnsprivateviewocid, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DnsPrivateViewResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateViews/{dnsprivateviewocid} + /// + /// + /// Operation Id + /// DnsPrivateView_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// DnsPrivateView OCID. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string dnsprivateviewocid, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dnsprivateviewocid, nameof(dnsprivateviewocid)); + + using var scope = _dnsPrivateViewClientDiagnostics.CreateScope("DnsPrivateViewCollection.GetIfExists"); + scope.Start(); + try + { + var response = _dnsPrivateViewRestClient.Get(Id.SubscriptionId, new AzureLocation(_location), dnsprivateviewocid, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DnsPrivateViewResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/DnsPrivateViewData.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/DnsPrivateViewData.Serialization.cs new file mode 100644 index 000000000000..0ccb220dc059 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/DnsPrivateViewData.Serialization.cs @@ -0,0 +1,155 @@ +// 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.Models; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + public partial class DnsPrivateViewData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DnsPrivateViewData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + DnsPrivateViewData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DnsPrivateViewData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDnsPrivateViewData(document.RootElement, options); + } + + internal static DnsPrivateViewData DeserializeDnsPrivateViewData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DnsPrivateViewProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = DnsPrivateViewProperties.DeserializeDnsPrivateViewProperties(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DnsPrivateViewData( + id, + name, + type, + systemData, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DnsPrivateViewData)} does not support writing '{options.Format}' format."); + } + } + + DnsPrivateViewData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDnsPrivateViewData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DnsPrivateViewData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/DnsPrivateViewData.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/DnsPrivateViewData.cs new file mode 100644 index 000000000000..c82c45d3d234 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/DnsPrivateViewData.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + /// + /// A class representing the DnsPrivateView data model. + /// DnsPrivateView resource definition + /// + public partial class DnsPrivateViewData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal DnsPrivateViewData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal DnsPrivateViewData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DnsPrivateViewProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public DnsPrivateViewProperties Properties { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/DnsPrivateViewResource.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/DnsPrivateViewResource.Serialization.cs new file mode 100644 index 000000000000..0f9205c512c0 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/DnsPrivateViewResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.OracleDatabase +{ + public partial class DnsPrivateViewResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + DnsPrivateViewData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + DnsPrivateViewData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/DnsPrivateViewResource.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/DnsPrivateViewResource.cs new file mode 100644 index 000000000000..1f301f89078e --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/DnsPrivateViewResource.cs @@ -0,0 +1,171 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.OracleDatabase +{ + /// + /// A Class representing a DnsPrivateView along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetDnsPrivateViewResource method. + /// Otherwise you can get one from its parent resource using the GetDnsPrivateView method. + /// + public partial class DnsPrivateViewResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The location. + /// The dnsprivateviewocid. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, AzureLocation location, string dnsprivateviewocid) + { + var resourceId = $"/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateViews/{dnsprivateviewocid}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _dnsPrivateViewClientDiagnostics; + private readonly DnsPrivateViewsRestOperations _dnsPrivateViewRestClient; + private readonly DnsPrivateViewData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Oracle.Database/locations/dnsPrivateViews"; + + /// Initializes a new instance of the class for mocking. + protected DnsPrivateViewResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal DnsPrivateViewResource(ArmClient client, DnsPrivateViewData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal DnsPrivateViewResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _dnsPrivateViewClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.OracleDatabase", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string dnsPrivateViewApiVersion); + _dnsPrivateViewRestClient = new DnsPrivateViewsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dnsPrivateViewApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual DnsPrivateViewData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get a DnsPrivateView + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateViews/{dnsprivateviewocid} + /// + /// + /// Operation Id + /// DnsPrivateView_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _dnsPrivateViewClientDiagnostics.CreateScope("DnsPrivateViewResource.Get"); + scope.Start(); + try + { + var response = await _dnsPrivateViewRestClient.GetAsync(Id.SubscriptionId, new AzureLocation(Id.Parent.Name), Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DnsPrivateViewResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a DnsPrivateView + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateViews/{dnsprivateviewocid} + /// + /// + /// Operation Id + /// DnsPrivateView_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _dnsPrivateViewClientDiagnostics.CreateScope("DnsPrivateViewResource.Get"); + scope.Start(); + try + { + var response = _dnsPrivateViewRestClient.Get(Id.SubscriptionId, new AzureLocation(Id.Parent.Name), Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DnsPrivateViewResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/DnsPrivateZoneCollection.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/DnsPrivateZoneCollection.cs new file mode 100644 index 000000000000..71aa632ca62a --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/DnsPrivateZoneCollection.cs @@ -0,0 +1,399 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.OracleDatabase +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetDnsPrivateZones method from an instance of . + /// + public partial class DnsPrivateZoneCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _dnsPrivateZoneClientDiagnostics; + private readonly DnsPrivateZonesRestOperations _dnsPrivateZoneRestClient; + private readonly AzureLocation _location; + + /// Initializes a new instance of the class for mocking. + protected DnsPrivateZoneCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + /// The name of the Azure region. + internal DnsPrivateZoneCollection(ArmClient client, ResourceIdentifier id, AzureLocation location) : base(client, id) + { + _location = location; + _dnsPrivateZoneClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.OracleDatabase", DnsPrivateZoneResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DnsPrivateZoneResource.ResourceType, out string dnsPrivateZoneApiVersion); + _dnsPrivateZoneRestClient = new DnsPrivateZonesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dnsPrivateZoneApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != SubscriptionResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, SubscriptionResource.ResourceType), nameof(id)); + } + + /// + /// Get a DnsPrivateZone + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateZones/{dnsprivatezonename} + /// + /// + /// Operation Id + /// DnsPrivateZone_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// DnsPrivateZone name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string dnsprivatezonename, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dnsprivatezonename, nameof(dnsprivatezonename)); + + using var scope = _dnsPrivateZoneClientDiagnostics.CreateScope("DnsPrivateZoneCollection.Get"); + scope.Start(); + try + { + var response = await _dnsPrivateZoneRestClient.GetAsync(Id.SubscriptionId, new AzureLocation(_location), dnsprivatezonename, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DnsPrivateZoneResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a DnsPrivateZone + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateZones/{dnsprivatezonename} + /// + /// + /// Operation Id + /// DnsPrivateZone_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// DnsPrivateZone name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string dnsprivatezonename, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dnsprivatezonename, nameof(dnsprivatezonename)); + + using var scope = _dnsPrivateZoneClientDiagnostics.CreateScope("DnsPrivateZoneCollection.Get"); + scope.Start(); + try + { + var response = _dnsPrivateZoneRestClient.Get(Id.SubscriptionId, new AzureLocation(_location), dnsprivatezonename, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DnsPrivateZoneResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List DnsPrivateZone resources by SubscriptionLocationResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateZones + /// + /// + /// Operation Id + /// DnsPrivateZone_ListByLocation + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _dnsPrivateZoneRestClient.CreateListByLocationRequest(Id.SubscriptionId, new AzureLocation(_location)); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dnsPrivateZoneRestClient.CreateListByLocationNextPageRequest(nextLink, Id.SubscriptionId, new AzureLocation(_location)); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DnsPrivateZoneResource(Client, DnsPrivateZoneData.DeserializeDnsPrivateZoneData(e)), _dnsPrivateZoneClientDiagnostics, Pipeline, "DnsPrivateZoneCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List DnsPrivateZone resources by SubscriptionLocationResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateZones + /// + /// + /// Operation Id + /// DnsPrivateZone_ListByLocation + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _dnsPrivateZoneRestClient.CreateListByLocationRequest(Id.SubscriptionId, new AzureLocation(_location)); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dnsPrivateZoneRestClient.CreateListByLocationNextPageRequest(nextLink, Id.SubscriptionId, new AzureLocation(_location)); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DnsPrivateZoneResource(Client, DnsPrivateZoneData.DeserializeDnsPrivateZoneData(e)), _dnsPrivateZoneClientDiagnostics, Pipeline, "DnsPrivateZoneCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateZones/{dnsprivatezonename} + /// + /// + /// Operation Id + /// DnsPrivateZone_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// DnsPrivateZone name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string dnsprivatezonename, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dnsprivatezonename, nameof(dnsprivatezonename)); + + using var scope = _dnsPrivateZoneClientDiagnostics.CreateScope("DnsPrivateZoneCollection.Exists"); + scope.Start(); + try + { + var response = await _dnsPrivateZoneRestClient.GetAsync(Id.SubscriptionId, new AzureLocation(_location), dnsprivatezonename, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateZones/{dnsprivatezonename} + /// + /// + /// Operation Id + /// DnsPrivateZone_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// DnsPrivateZone name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string dnsprivatezonename, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dnsprivatezonename, nameof(dnsprivatezonename)); + + using var scope = _dnsPrivateZoneClientDiagnostics.CreateScope("DnsPrivateZoneCollection.Exists"); + scope.Start(); + try + { + var response = _dnsPrivateZoneRestClient.Get(Id.SubscriptionId, new AzureLocation(_location), dnsprivatezonename, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateZones/{dnsprivatezonename} + /// + /// + /// Operation Id + /// DnsPrivateZone_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// DnsPrivateZone name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string dnsprivatezonename, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dnsprivatezonename, nameof(dnsprivatezonename)); + + using var scope = _dnsPrivateZoneClientDiagnostics.CreateScope("DnsPrivateZoneCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _dnsPrivateZoneRestClient.GetAsync(Id.SubscriptionId, new AzureLocation(_location), dnsprivatezonename, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DnsPrivateZoneResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateZones/{dnsprivatezonename} + /// + /// + /// Operation Id + /// DnsPrivateZone_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// DnsPrivateZone name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string dnsprivatezonename, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dnsprivatezonename, nameof(dnsprivatezonename)); + + using var scope = _dnsPrivateZoneClientDiagnostics.CreateScope("DnsPrivateZoneCollection.GetIfExists"); + scope.Start(); + try + { + var response = _dnsPrivateZoneRestClient.Get(Id.SubscriptionId, new AzureLocation(_location), dnsprivatezonename, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DnsPrivateZoneResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/DnsPrivateZoneData.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/DnsPrivateZoneData.Serialization.cs new file mode 100644 index 000000000000..c31921097a40 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/DnsPrivateZoneData.Serialization.cs @@ -0,0 +1,155 @@ +// 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.Models; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + public partial class DnsPrivateZoneData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DnsPrivateZoneData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + DnsPrivateZoneData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DnsPrivateZoneData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDnsPrivateZoneData(document.RootElement, options); + } + + internal static DnsPrivateZoneData DeserializeDnsPrivateZoneData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DnsPrivateZoneProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = DnsPrivateZoneProperties.DeserializeDnsPrivateZoneProperties(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DnsPrivateZoneData( + id, + name, + type, + systemData, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DnsPrivateZoneData)} does not support writing '{options.Format}' format."); + } + } + + DnsPrivateZoneData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDnsPrivateZoneData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DnsPrivateZoneData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/DnsPrivateZoneData.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/DnsPrivateZoneData.cs new file mode 100644 index 000000000000..8292991838b2 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/DnsPrivateZoneData.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + /// + /// A class representing the DnsPrivateZone data model. + /// DnsPrivateZone resource definition + /// + public partial class DnsPrivateZoneData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal DnsPrivateZoneData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal DnsPrivateZoneData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DnsPrivateZoneProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public DnsPrivateZoneProperties Properties { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/DnsPrivateZoneResource.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/DnsPrivateZoneResource.Serialization.cs new file mode 100644 index 000000000000..91441ab783cf --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/DnsPrivateZoneResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.OracleDatabase +{ + public partial class DnsPrivateZoneResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + DnsPrivateZoneData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + DnsPrivateZoneData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/DnsPrivateZoneResource.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/DnsPrivateZoneResource.cs new file mode 100644 index 000000000000..0adb330234e2 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/DnsPrivateZoneResource.cs @@ -0,0 +1,171 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.OracleDatabase +{ + /// + /// A Class representing a DnsPrivateZone along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetDnsPrivateZoneResource method. + /// Otherwise you can get one from its parent resource using the GetDnsPrivateZone method. + /// + public partial class DnsPrivateZoneResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The location. + /// The dnsprivatezonename. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, AzureLocation location, string dnsprivatezonename) + { + var resourceId = $"/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateZones/{dnsprivatezonename}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _dnsPrivateZoneClientDiagnostics; + private readonly DnsPrivateZonesRestOperations _dnsPrivateZoneRestClient; + private readonly DnsPrivateZoneData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Oracle.Database/locations/dnsPrivateZones"; + + /// Initializes a new instance of the class for mocking. + protected DnsPrivateZoneResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal DnsPrivateZoneResource(ArmClient client, DnsPrivateZoneData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal DnsPrivateZoneResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _dnsPrivateZoneClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.OracleDatabase", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string dnsPrivateZoneApiVersion); + _dnsPrivateZoneRestClient = new DnsPrivateZonesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dnsPrivateZoneApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual DnsPrivateZoneData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get a DnsPrivateZone + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateZones/{dnsprivatezonename} + /// + /// + /// Operation Id + /// DnsPrivateZone_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _dnsPrivateZoneClientDiagnostics.CreateScope("DnsPrivateZoneResource.Get"); + scope.Start(); + try + { + var response = await _dnsPrivateZoneRestClient.GetAsync(Id.SubscriptionId, new AzureLocation(Id.Parent.Name), Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DnsPrivateZoneResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a DnsPrivateZone + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateZones/{dnsprivatezonename} + /// + /// + /// Operation Id + /// DnsPrivateZone_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _dnsPrivateZoneClientDiagnostics.CreateScope("DnsPrivateZoneResource.Get"); + scope.Start(); + try + { + var response = _dnsPrivateZoneRestClient.Get(Id.SubscriptionId, new AzureLocation(Id.Parent.Name), Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DnsPrivateZoneResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/ExadbVmClusterCollection.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/ExadbVmClusterCollection.cs new file mode 100644 index 000000000000..41d8cec5b33e --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/ExadbVmClusterCollection.cs @@ -0,0 +1,494 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.OracleDatabase +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get an instance call the GetExadbVmClusters method from an instance of . + /// + public partial class ExadbVmClusterCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _exadbVmClusterClientDiagnostics; + private readonly ExadbVmClustersRestOperations _exadbVmClusterRestClient; + + /// Initializes a new instance of the class for mocking. + protected ExadbVmClusterCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal ExadbVmClusterCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _exadbVmClusterClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.OracleDatabase", ExadbVmClusterResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ExadbVmClusterResource.ResourceType, out string exadbVmClusterApiVersion); + _exadbVmClusterRestClient = new ExadbVmClustersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, exadbVmClusterApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceGroupResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceGroupResource.ResourceType), nameof(id)); + } + + /// + /// Create a ExadbVmCluster + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName} + /// + /// + /// Operation Id + /// ExadbVmCluster_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the ExadbVmCluster. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string exadbVmClusterName, ExadbVmClusterData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(exadbVmClusterName, nameof(exadbVmClusterName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _exadbVmClusterClientDiagnostics.CreateScope("ExadbVmClusterCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _exadbVmClusterRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, exadbVmClusterName, data, cancellationToken).ConfigureAwait(false); + var operation = new OracleDatabaseArmOperation(new ExadbVmClusterOperationSource(Client), _exadbVmClusterClientDiagnostics, Pipeline, _exadbVmClusterRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, exadbVmClusterName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a ExadbVmCluster + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName} + /// + /// + /// Operation Id + /// ExadbVmCluster_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the ExadbVmCluster. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string exadbVmClusterName, ExadbVmClusterData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(exadbVmClusterName, nameof(exadbVmClusterName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _exadbVmClusterClientDiagnostics.CreateScope("ExadbVmClusterCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _exadbVmClusterRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, exadbVmClusterName, data, cancellationToken); + var operation = new OracleDatabaseArmOperation(new ExadbVmClusterOperationSource(Client), _exadbVmClusterClientDiagnostics, Pipeline, _exadbVmClusterRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, exadbVmClusterName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a ExadbVmCluster + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName} + /// + /// + /// Operation Id + /// ExadbVmCluster_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ExadbVmCluster. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string exadbVmClusterName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(exadbVmClusterName, nameof(exadbVmClusterName)); + + using var scope = _exadbVmClusterClientDiagnostics.CreateScope("ExadbVmClusterCollection.Get"); + scope.Start(); + try + { + var response = await _exadbVmClusterRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, exadbVmClusterName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ExadbVmClusterResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a ExadbVmCluster + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName} + /// + /// + /// Operation Id + /// ExadbVmCluster_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ExadbVmCluster. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string exadbVmClusterName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(exadbVmClusterName, nameof(exadbVmClusterName)); + + using var scope = _exadbVmClusterClientDiagnostics.CreateScope("ExadbVmClusterCollection.Get"); + scope.Start(); + try + { + var response = _exadbVmClusterRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, exadbVmClusterName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ExadbVmClusterResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List ExadbVmCluster resources by resource group + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters + /// + /// + /// Operation Id + /// ExadbVmCluster_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _exadbVmClusterRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _exadbVmClusterRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ExadbVmClusterResource(Client, ExadbVmClusterData.DeserializeExadbVmClusterData(e)), _exadbVmClusterClientDiagnostics, Pipeline, "ExadbVmClusterCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List ExadbVmCluster resources by resource group + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters + /// + /// + /// Operation Id + /// ExadbVmCluster_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _exadbVmClusterRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _exadbVmClusterRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ExadbVmClusterResource(Client, ExadbVmClusterData.DeserializeExadbVmClusterData(e)), _exadbVmClusterClientDiagnostics, Pipeline, "ExadbVmClusterCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName} + /// + /// + /// Operation Id + /// ExadbVmCluster_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ExadbVmCluster. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string exadbVmClusterName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(exadbVmClusterName, nameof(exadbVmClusterName)); + + using var scope = _exadbVmClusterClientDiagnostics.CreateScope("ExadbVmClusterCollection.Exists"); + scope.Start(); + try + { + var response = await _exadbVmClusterRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, exadbVmClusterName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName} + /// + /// + /// Operation Id + /// ExadbVmCluster_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ExadbVmCluster. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string exadbVmClusterName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(exadbVmClusterName, nameof(exadbVmClusterName)); + + using var scope = _exadbVmClusterClientDiagnostics.CreateScope("ExadbVmClusterCollection.Exists"); + scope.Start(); + try + { + var response = _exadbVmClusterRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, exadbVmClusterName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName} + /// + /// + /// Operation Id + /// ExadbVmCluster_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ExadbVmCluster. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string exadbVmClusterName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(exadbVmClusterName, nameof(exadbVmClusterName)); + + using var scope = _exadbVmClusterClientDiagnostics.CreateScope("ExadbVmClusterCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _exadbVmClusterRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, exadbVmClusterName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ExadbVmClusterResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName} + /// + /// + /// Operation Id + /// ExadbVmCluster_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ExadbVmCluster. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string exadbVmClusterName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(exadbVmClusterName, nameof(exadbVmClusterName)); + + using var scope = _exadbVmClusterClientDiagnostics.CreateScope("ExadbVmClusterCollection.GetIfExists"); + scope.Start(); + try + { + var response = _exadbVmClusterRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, exadbVmClusterName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ExadbVmClusterResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/ExadbVmClusterData.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/ExadbVmClusterData.Serialization.cs new file mode 100644 index 000000000000..e1ec90308459 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/ExadbVmClusterData.Serialization.cs @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + public partial class ExadbVmClusterData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExadbVmClusterData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (Optional.IsCollectionDefined(Zones)) + { + writer.WritePropertyName("zones"u8); + writer.WriteStartArray(); + foreach (var item in Zones) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + } + + ExadbVmClusterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExadbVmClusterData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExadbVmClusterData(document.RootElement, options); + } + + internal static ExadbVmClusterData DeserializeExadbVmClusterData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ExadbVmClusterProperties properties = default; + IList zones = default; + IDictionary tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = ExadbVmClusterProperties.DeserializeExadbVmClusterProperties(property.Value, options); + continue; + } + if (property.NameEquals("zones"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + zones = array; + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("location"u8)) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExadbVmClusterData( + id, + name, + type, + systemData, + tags ?? new ChangeTrackingDictionary(), + location, + properties, + zones ?? new ChangeTrackingList(), + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExadbVmClusterData)} does not support writing '{options.Format}' format."); + } + } + + ExadbVmClusterData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeExadbVmClusterData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExadbVmClusterData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/ExadbVmClusterData.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/ExadbVmClusterData.cs new file mode 100644 index 000000000000..7d9b7d350b23 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/ExadbVmClusterData.cs @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + /// + /// A class representing the ExadbVmCluster data model. + /// ExadbVmCluster resource definition + /// + public partial class ExadbVmClusterData : TrackedResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The location. + public ExadbVmClusterData(AzureLocation location) : base(location) + { + Zones = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The resource-specific properties for this resource. + /// The availability zones. + /// Keeps track of any properties unknown to the library. + internal ExadbVmClusterData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ExadbVmClusterProperties properties, IList zones, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + Properties = properties; + Zones = zones; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ExadbVmClusterData() + { + } + + /// The resource-specific properties for this resource. + public ExadbVmClusterProperties Properties { get; set; } + /// The availability zones. + public IList Zones { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/ExadbVmClusterResource.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/ExadbVmClusterResource.Serialization.cs new file mode 100644 index 000000000000..8de68a9361bc --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/ExadbVmClusterResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.OracleDatabase +{ + public partial class ExadbVmClusterResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + ExadbVmClusterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + ExadbVmClusterData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/ExadbVmClusterResource.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/ExadbVmClusterResource.cs new file mode 100644 index 000000000000..1a40f0ee947c --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/ExadbVmClusterResource.cs @@ -0,0 +1,868 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.OracleDatabase.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.OracleDatabase +{ + /// + /// A Class representing an ExadbVmCluster along with the instance operations that can be performed on it. + /// If you have a you can construct an + /// from an instance of using the GetExadbVmClusterResource method. + /// Otherwise you can get one from its parent resource using the GetExadbVmCluster method. + /// + public partial class ExadbVmClusterResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The exadbVmClusterName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string exadbVmClusterName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _exadbVmClusterClientDiagnostics; + private readonly ExadbVmClustersRestOperations _exadbVmClusterRestClient; + private readonly ExadbVmClusterData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Oracle.Database/exadbVmClusters"; + + /// Initializes a new instance of the class for mocking. + protected ExadbVmClusterResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal ExadbVmClusterResource(ArmClient client, ExadbVmClusterData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal ExadbVmClusterResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _exadbVmClusterClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.OracleDatabase", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string exadbVmClusterApiVersion); + _exadbVmClusterRestClient = new ExadbVmClustersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, exadbVmClusterApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual ExadbVmClusterData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// Gets a collection of ExascaleDbNodeResources in the ExadbVmCluster. + /// An object representing collection of ExascaleDbNodeResources and their operations over a ExascaleDbNodeResource. + public virtual ExascaleDbNodeCollection GetExascaleDbNodes() + { + return GetCachedClient(client => new ExascaleDbNodeCollection(client, Id)); + } + + /// + /// Get a ExascaleDbNode + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}/dbNodes/{exascaleDbNodeName} + /// + /// + /// Operation Id + /// ExascaleDbNode_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ExascaleDbNode. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetExascaleDbNodeAsync(string exascaleDbNodeName, CancellationToken cancellationToken = default) + { + return await GetExascaleDbNodes().GetAsync(exascaleDbNodeName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a ExascaleDbNode + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}/dbNodes/{exascaleDbNodeName} + /// + /// + /// Operation Id + /// ExascaleDbNode_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ExascaleDbNode. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetExascaleDbNode(string exascaleDbNodeName, CancellationToken cancellationToken = default) + { + return GetExascaleDbNodes().Get(exascaleDbNodeName, cancellationToken); + } + + /// + /// Get a ExadbVmCluster + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName} + /// + /// + /// Operation Id + /// ExadbVmCluster_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _exadbVmClusterClientDiagnostics.CreateScope("ExadbVmClusterResource.Get"); + scope.Start(); + try + { + var response = await _exadbVmClusterRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ExadbVmClusterResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a ExadbVmCluster + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName} + /// + /// + /// Operation Id + /// ExadbVmCluster_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _exadbVmClusterClientDiagnostics.CreateScope("ExadbVmClusterResource.Get"); + scope.Start(); + try + { + var response = _exadbVmClusterRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ExadbVmClusterResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a ExadbVmCluster + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName} + /// + /// + /// Operation Id + /// ExadbVmCluster_Delete + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _exadbVmClusterClientDiagnostics.CreateScope("ExadbVmClusterResource.Delete"); + scope.Start(); + try + { + var response = await _exadbVmClusterRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new OracleDatabaseArmOperation(_exadbVmClusterClientDiagnostics, Pipeline, _exadbVmClusterRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a ExadbVmCluster + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName} + /// + /// + /// Operation Id + /// ExadbVmCluster_Delete + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _exadbVmClusterClientDiagnostics.CreateScope("ExadbVmClusterResource.Delete"); + scope.Start(); + try + { + var response = _exadbVmClusterRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new OracleDatabaseArmOperation(_exadbVmClusterClientDiagnostics, Pipeline, _exadbVmClusterRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a ExadbVmCluster + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName} + /// + /// + /// Operation Id + /// ExadbVmCluster_Update + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, ExadbVmClusterPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _exadbVmClusterClientDiagnostics.CreateScope("ExadbVmClusterResource.Update"); + scope.Start(); + try + { + var response = await _exadbVmClusterRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new OracleDatabaseArmOperation(new ExadbVmClusterOperationSource(Client), _exadbVmClusterClientDiagnostics, Pipeline, _exadbVmClusterRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a ExadbVmCluster + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName} + /// + /// + /// Operation Id + /// ExadbVmCluster_Update + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, ExadbVmClusterPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _exadbVmClusterClientDiagnostics.CreateScope("ExadbVmClusterResource.Update"); + scope.Start(); + try + { + var response = _exadbVmClusterRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); + var operation = new OracleDatabaseArmOperation(new ExadbVmClusterOperationSource(Client), _exadbVmClusterClientDiagnostics, Pipeline, _exadbVmClusterRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Remove VMs from the VM Cluster + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}/removeVms + /// + /// + /// Operation Id + /// ExadbVmClusters_RemoveVms + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual async Task> RemoveVmsAsync(WaitUntil waitUntil, RemoveVirtualMachineFromExadbVmClusterDetails details, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(details, nameof(details)); + + using var scope = _exadbVmClusterClientDiagnostics.CreateScope("ExadbVmClusterResource.RemoveVms"); + scope.Start(); + try + { + var response = await _exadbVmClusterRestClient.RemoveVmsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, details, cancellationToken).ConfigureAwait(false); + var operation = new OracleDatabaseArmOperation(new ExadbVmClusterOperationSource(Client), _exadbVmClusterClientDiagnostics, Pipeline, _exadbVmClusterRestClient.CreateRemoveVmsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, details).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Remove VMs from the VM Cluster + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}/removeVms + /// + /// + /// Operation Id + /// ExadbVmClusters_RemoveVms + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation RemoveVms(WaitUntil waitUntil, RemoveVirtualMachineFromExadbVmClusterDetails details, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(details, nameof(details)); + + using var scope = _exadbVmClusterClientDiagnostics.CreateScope("ExadbVmClusterResource.RemoveVms"); + scope.Start(); + try + { + var response = _exadbVmClusterRestClient.RemoveVms(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, details, cancellationToken); + var operation = new OracleDatabaseArmOperation(new ExadbVmClusterOperationSource(Client), _exadbVmClusterClientDiagnostics, Pipeline, _exadbVmClusterRestClient.CreateRemoveVmsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, details).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName} + /// + /// + /// Operation Id + /// ExadbVmCluster_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _exadbVmClusterClientDiagnostics.CreateScope("ExadbVmClusterResource.AddTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues[key] = value; + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _exadbVmClusterRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ExadbVmClusterResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new ExadbVmClusterPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName} + /// + /// + /// Operation Id + /// ExadbVmCluster_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _exadbVmClusterClientDiagnostics.CreateScope("ExadbVmClusterResource.AddTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues[key] = value; + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _exadbVmClusterRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new ExadbVmClusterResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new ExadbVmClusterPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName} + /// + /// + /// Operation Id + /// ExadbVmCluster_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _exadbVmClusterClientDiagnostics.CreateScope("ExadbVmClusterResource.SetTags"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _exadbVmClusterRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ExadbVmClusterResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new ExadbVmClusterPatch(); + patch.Tags.ReplaceWith(tags); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName} + /// + /// + /// Operation Id + /// ExadbVmCluster_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _exadbVmClusterClientDiagnostics.CreateScope("ExadbVmClusterResource.SetTags"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _exadbVmClusterRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new ExadbVmClusterResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new ExadbVmClusterPatch(); + patch.Tags.ReplaceWith(tags); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName} + /// + /// + /// Operation Id + /// ExadbVmCluster_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _exadbVmClusterClientDiagnostics.CreateScope("ExadbVmClusterResource.RemoveTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.Remove(key); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _exadbVmClusterRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ExadbVmClusterResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new ExadbVmClusterPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName} + /// + /// + /// Operation Id + /// ExadbVmCluster_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _exadbVmClusterClientDiagnostics.CreateScope("ExadbVmClusterResource.RemoveTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.Remove(key); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _exadbVmClusterRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new ExadbVmClusterResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new ExadbVmClusterPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/ExascaleDbNodeCollection.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/ExascaleDbNodeCollection.cs new file mode 100644 index 000000000000..65e11f60d08e --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/ExascaleDbNodeCollection.cs @@ -0,0 +1,395 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.OracleDatabase +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get an instance call the GetExascaleDbNodes method from an instance of . + /// + public partial class ExascaleDbNodeCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _exascaleDbNodeClientDiagnostics; + private readonly ExascaleDbNodesRestOperations _exascaleDbNodeRestClient; + + /// Initializes a new instance of the class for mocking. + protected ExascaleDbNodeCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal ExascaleDbNodeCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _exascaleDbNodeClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.OracleDatabase", ExascaleDbNodeResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ExascaleDbNodeResource.ResourceType, out string exascaleDbNodeApiVersion); + _exascaleDbNodeRestClient = new ExascaleDbNodesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, exascaleDbNodeApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ExadbVmClusterResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ExadbVmClusterResource.ResourceType), nameof(id)); + } + + /// + /// Get a ExascaleDbNode + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}/dbNodes/{exascaleDbNodeName} + /// + /// + /// Operation Id + /// ExascaleDbNode_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ExascaleDbNode. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string exascaleDbNodeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(exascaleDbNodeName, nameof(exascaleDbNodeName)); + + using var scope = _exascaleDbNodeClientDiagnostics.CreateScope("ExascaleDbNodeCollection.Get"); + scope.Start(); + try + { + var response = await _exascaleDbNodeRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, exascaleDbNodeName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ExascaleDbNodeResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a ExascaleDbNode + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}/dbNodes/{exascaleDbNodeName} + /// + /// + /// Operation Id + /// ExascaleDbNode_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ExascaleDbNode. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string exascaleDbNodeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(exascaleDbNodeName, nameof(exascaleDbNodeName)); + + using var scope = _exascaleDbNodeClientDiagnostics.CreateScope("ExascaleDbNodeCollection.Get"); + scope.Start(); + try + { + var response = _exascaleDbNodeRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, exascaleDbNodeName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ExascaleDbNodeResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List ExascaleDbNode resources by ExadbVmCluster + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}/dbNodes + /// + /// + /// Operation Id + /// ExascaleDbNode_ListByParent + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _exascaleDbNodeRestClient.CreateListByParentRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _exascaleDbNodeRestClient.CreateListByParentNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ExascaleDbNodeResource(Client, ExascaleDbNodeData.DeserializeExascaleDbNodeData(e)), _exascaleDbNodeClientDiagnostics, Pipeline, "ExascaleDbNodeCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List ExascaleDbNode resources by ExadbVmCluster + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}/dbNodes + /// + /// + /// Operation Id + /// ExascaleDbNode_ListByParent + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _exascaleDbNodeRestClient.CreateListByParentRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _exascaleDbNodeRestClient.CreateListByParentNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ExascaleDbNodeResource(Client, ExascaleDbNodeData.DeserializeExascaleDbNodeData(e)), _exascaleDbNodeClientDiagnostics, Pipeline, "ExascaleDbNodeCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}/dbNodes/{exascaleDbNodeName} + /// + /// + /// Operation Id + /// ExascaleDbNode_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ExascaleDbNode. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string exascaleDbNodeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(exascaleDbNodeName, nameof(exascaleDbNodeName)); + + using var scope = _exascaleDbNodeClientDiagnostics.CreateScope("ExascaleDbNodeCollection.Exists"); + scope.Start(); + try + { + var response = await _exascaleDbNodeRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, exascaleDbNodeName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}/dbNodes/{exascaleDbNodeName} + /// + /// + /// Operation Id + /// ExascaleDbNode_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ExascaleDbNode. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string exascaleDbNodeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(exascaleDbNodeName, nameof(exascaleDbNodeName)); + + using var scope = _exascaleDbNodeClientDiagnostics.CreateScope("ExascaleDbNodeCollection.Exists"); + scope.Start(); + try + { + var response = _exascaleDbNodeRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, exascaleDbNodeName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}/dbNodes/{exascaleDbNodeName} + /// + /// + /// Operation Id + /// ExascaleDbNode_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ExascaleDbNode. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string exascaleDbNodeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(exascaleDbNodeName, nameof(exascaleDbNodeName)); + + using var scope = _exascaleDbNodeClientDiagnostics.CreateScope("ExascaleDbNodeCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _exascaleDbNodeRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, exascaleDbNodeName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ExascaleDbNodeResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}/dbNodes/{exascaleDbNodeName} + /// + /// + /// Operation Id + /// ExascaleDbNode_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ExascaleDbNode. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string exascaleDbNodeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(exascaleDbNodeName, nameof(exascaleDbNodeName)); + + using var scope = _exascaleDbNodeClientDiagnostics.CreateScope("ExascaleDbNodeCollection.GetIfExists"); + scope.Start(); + try + { + var response = _exascaleDbNodeRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, exascaleDbNodeName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ExascaleDbNodeResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/ExascaleDbNodeData.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/ExascaleDbNodeData.Serialization.cs new file mode 100644 index 000000000000..c4396399a8f0 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/ExascaleDbNodeData.Serialization.cs @@ -0,0 +1,155 @@ +// 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.Models; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + public partial class ExascaleDbNodeData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExascaleDbNodeData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + ExascaleDbNodeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExascaleDbNodeData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExascaleDbNodeData(document.RootElement, options); + } + + internal static ExascaleDbNodeData DeserializeExascaleDbNodeData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ExascaleDbNodeProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = ExascaleDbNodeProperties.DeserializeExascaleDbNodeProperties(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExascaleDbNodeData( + id, + name, + type, + systemData, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExascaleDbNodeData)} does not support writing '{options.Format}' format."); + } + } + + ExascaleDbNodeData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeExascaleDbNodeData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExascaleDbNodeData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/ExascaleDbNodeData.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/ExascaleDbNodeData.cs new file mode 100644 index 000000000000..737d4dec5154 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/ExascaleDbNodeData.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + /// + /// A class representing the ExascaleDbNode data model. + /// The DbNode resource belonging to ExadbVmCluster + /// + public partial class ExascaleDbNodeData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal ExascaleDbNodeData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal ExascaleDbNodeData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ExascaleDbNodeProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public ExascaleDbNodeProperties Properties { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/ExascaleDbNodeResource.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/ExascaleDbNodeResource.Serialization.cs new file mode 100644 index 000000000000..df517032390b --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/ExascaleDbNodeResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.OracleDatabase +{ + public partial class ExascaleDbNodeResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + ExascaleDbNodeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + ExascaleDbNodeData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/ExascaleDbNodeResource.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/ExascaleDbNodeResource.cs new file mode 100644 index 000000000000..ea7d7924d7fe --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/ExascaleDbNodeResource.cs @@ -0,0 +1,264 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + /// + /// A Class representing an ExascaleDbNode along with the instance operations that can be performed on it. + /// If you have a you can construct an + /// from an instance of using the GetExascaleDbNodeResource method. + /// Otherwise you can get one from its parent resource using the GetExascaleDbNode method. + /// + public partial class ExascaleDbNodeResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The exadbVmClusterName. + /// The exascaleDbNodeName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string exadbVmClusterName, string exascaleDbNodeName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}/dbNodes/{exascaleDbNodeName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _exascaleDbNodeClientDiagnostics; + private readonly ExascaleDbNodesRestOperations _exascaleDbNodeRestClient; + private readonly ExascaleDbNodeData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Oracle.Database/exadbVmClusters/dbNodes"; + + /// Initializes a new instance of the class for mocking. + protected ExascaleDbNodeResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal ExascaleDbNodeResource(ArmClient client, ExascaleDbNodeData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal ExascaleDbNodeResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _exascaleDbNodeClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.OracleDatabase", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string exascaleDbNodeApiVersion); + _exascaleDbNodeRestClient = new ExascaleDbNodesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, exascaleDbNodeApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual ExascaleDbNodeData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get a ExascaleDbNode + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}/dbNodes/{exascaleDbNodeName} + /// + /// + /// Operation Id + /// ExascaleDbNode_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _exascaleDbNodeClientDiagnostics.CreateScope("ExascaleDbNodeResource.Get"); + scope.Start(); + try + { + var response = await _exascaleDbNodeRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ExascaleDbNodeResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a ExascaleDbNode + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}/dbNodes/{exascaleDbNodeName} + /// + /// + /// Operation Id + /// ExascaleDbNode_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _exascaleDbNodeClientDiagnostics.CreateScope("ExascaleDbNodeResource.Get"); + scope.Start(); + try + { + var response = _exascaleDbNodeRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ExascaleDbNodeResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// VM actions on DbNode of ExadbVmCluster by the provided filter + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}/dbNodes/{exascaleDbNodeName}/action + /// + /// + /// Operation Id + /// ExascaleDbNodes_Action + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual async Task> ActionAsync(WaitUntil waitUntil, DbNodeAction body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using var scope = _exascaleDbNodeClientDiagnostics.CreateScope("ExascaleDbNodeResource.Action"); + scope.Start(); + try + { + var response = await _exascaleDbNodeRestClient.ActionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body, cancellationToken).ConfigureAwait(false); + var operation = new OracleDatabaseArmOperation(new DbActionResponseOperationSource(), _exascaleDbNodeClientDiagnostics, Pipeline, _exascaleDbNodeRestClient.CreateActionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// VM actions on DbNode of ExadbVmCluster by the provided filter + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}/dbNodes/{exascaleDbNodeName}/action + /// + /// + /// Operation Id + /// ExascaleDbNodes_Action + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Action(WaitUntil waitUntil, DbNodeAction body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using var scope = _exascaleDbNodeClientDiagnostics.CreateScope("ExascaleDbNodeResource.Action"); + scope.Start(); + try + { + var response = _exascaleDbNodeRestClient.Action(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body, cancellationToken); + var operation = new OracleDatabaseArmOperation(new DbActionResponseOperationSource(), _exascaleDbNodeClientDiagnostics, Pipeline, _exascaleDbNodeRestClient.CreateActionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/ExascaleDbStorageVaultCollection.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/ExascaleDbStorageVaultCollection.cs new file mode 100644 index 000000000000..8fbc470afcf0 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/ExascaleDbStorageVaultCollection.cs @@ -0,0 +1,494 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.OracleDatabase +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get an instance call the GetExascaleDbStorageVaults method from an instance of . + /// + public partial class ExascaleDbStorageVaultCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _exascaleDbStorageVaultClientDiagnostics; + private readonly ExascaleDbStorageVaultsRestOperations _exascaleDbStorageVaultRestClient; + + /// Initializes a new instance of the class for mocking. + protected ExascaleDbStorageVaultCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal ExascaleDbStorageVaultCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _exascaleDbStorageVaultClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.OracleDatabase", ExascaleDbStorageVaultResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ExascaleDbStorageVaultResource.ResourceType, out string exascaleDbStorageVaultApiVersion); + _exascaleDbStorageVaultRestClient = new ExascaleDbStorageVaultsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, exascaleDbStorageVaultApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceGroupResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceGroupResource.ResourceType), nameof(id)); + } + + /// + /// Create a ExascaleDbStorageVault + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName} + /// + /// + /// Operation Id + /// ExascaleDbStorageVault_Create + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the ExascaleDbStorageVault. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string exascaleDbStorageVaultName, ExascaleDbStorageVaultData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(exascaleDbStorageVaultName, nameof(exascaleDbStorageVaultName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _exascaleDbStorageVaultClientDiagnostics.CreateScope("ExascaleDbStorageVaultCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _exascaleDbStorageVaultRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, exascaleDbStorageVaultName, data, cancellationToken).ConfigureAwait(false); + var operation = new OracleDatabaseArmOperation(new ExascaleDbStorageVaultOperationSource(Client), _exascaleDbStorageVaultClientDiagnostics, Pipeline, _exascaleDbStorageVaultRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, exascaleDbStorageVaultName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a ExascaleDbStorageVault + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName} + /// + /// + /// Operation Id + /// ExascaleDbStorageVault_Create + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the ExascaleDbStorageVault. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string exascaleDbStorageVaultName, ExascaleDbStorageVaultData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(exascaleDbStorageVaultName, nameof(exascaleDbStorageVaultName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _exascaleDbStorageVaultClientDiagnostics.CreateScope("ExascaleDbStorageVaultCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _exascaleDbStorageVaultRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, exascaleDbStorageVaultName, data, cancellationToken); + var operation = new OracleDatabaseArmOperation(new ExascaleDbStorageVaultOperationSource(Client), _exascaleDbStorageVaultClientDiagnostics, Pipeline, _exascaleDbStorageVaultRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, exascaleDbStorageVaultName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a ExascaleDbStorageVault + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName} + /// + /// + /// Operation Id + /// ExascaleDbStorageVault_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ExascaleDbStorageVault. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string exascaleDbStorageVaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(exascaleDbStorageVaultName, nameof(exascaleDbStorageVaultName)); + + using var scope = _exascaleDbStorageVaultClientDiagnostics.CreateScope("ExascaleDbStorageVaultCollection.Get"); + scope.Start(); + try + { + var response = await _exascaleDbStorageVaultRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, exascaleDbStorageVaultName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ExascaleDbStorageVaultResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a ExascaleDbStorageVault + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName} + /// + /// + /// Operation Id + /// ExascaleDbStorageVault_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ExascaleDbStorageVault. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string exascaleDbStorageVaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(exascaleDbStorageVaultName, nameof(exascaleDbStorageVaultName)); + + using var scope = _exascaleDbStorageVaultClientDiagnostics.CreateScope("ExascaleDbStorageVaultCollection.Get"); + scope.Start(); + try + { + var response = _exascaleDbStorageVaultRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, exascaleDbStorageVaultName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ExascaleDbStorageVaultResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List ExascaleDbStorageVault resources by resource group + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults + /// + /// + /// Operation Id + /// ExascaleDbStorageVault_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _exascaleDbStorageVaultRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _exascaleDbStorageVaultRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ExascaleDbStorageVaultResource(Client, ExascaleDbStorageVaultData.DeserializeExascaleDbStorageVaultData(e)), _exascaleDbStorageVaultClientDiagnostics, Pipeline, "ExascaleDbStorageVaultCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List ExascaleDbStorageVault resources by resource group + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults + /// + /// + /// Operation Id + /// ExascaleDbStorageVault_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _exascaleDbStorageVaultRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _exascaleDbStorageVaultRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ExascaleDbStorageVaultResource(Client, ExascaleDbStorageVaultData.DeserializeExascaleDbStorageVaultData(e)), _exascaleDbStorageVaultClientDiagnostics, Pipeline, "ExascaleDbStorageVaultCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName} + /// + /// + /// Operation Id + /// ExascaleDbStorageVault_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ExascaleDbStorageVault. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string exascaleDbStorageVaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(exascaleDbStorageVaultName, nameof(exascaleDbStorageVaultName)); + + using var scope = _exascaleDbStorageVaultClientDiagnostics.CreateScope("ExascaleDbStorageVaultCollection.Exists"); + scope.Start(); + try + { + var response = await _exascaleDbStorageVaultRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, exascaleDbStorageVaultName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName} + /// + /// + /// Operation Id + /// ExascaleDbStorageVault_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ExascaleDbStorageVault. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string exascaleDbStorageVaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(exascaleDbStorageVaultName, nameof(exascaleDbStorageVaultName)); + + using var scope = _exascaleDbStorageVaultClientDiagnostics.CreateScope("ExascaleDbStorageVaultCollection.Exists"); + scope.Start(); + try + { + var response = _exascaleDbStorageVaultRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, exascaleDbStorageVaultName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName} + /// + /// + /// Operation Id + /// ExascaleDbStorageVault_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ExascaleDbStorageVault. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string exascaleDbStorageVaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(exascaleDbStorageVaultName, nameof(exascaleDbStorageVaultName)); + + using var scope = _exascaleDbStorageVaultClientDiagnostics.CreateScope("ExascaleDbStorageVaultCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _exascaleDbStorageVaultRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, exascaleDbStorageVaultName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ExascaleDbStorageVaultResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName} + /// + /// + /// Operation Id + /// ExascaleDbStorageVault_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ExascaleDbStorageVault. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string exascaleDbStorageVaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(exascaleDbStorageVaultName, nameof(exascaleDbStorageVaultName)); + + using var scope = _exascaleDbStorageVaultClientDiagnostics.CreateScope("ExascaleDbStorageVaultCollection.GetIfExists"); + scope.Start(); + try + { + var response = _exascaleDbStorageVaultRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, exascaleDbStorageVaultName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ExascaleDbStorageVaultResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/ExascaleDbStorageVaultData.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/ExascaleDbStorageVaultData.Serialization.cs new file mode 100644 index 000000000000..2e7a031dd086 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/ExascaleDbStorageVaultData.Serialization.cs @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + public partial class ExascaleDbStorageVaultData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExascaleDbStorageVaultData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (Optional.IsCollectionDefined(Zones)) + { + writer.WritePropertyName("zones"u8); + writer.WriteStartArray(); + foreach (var item in Zones) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + } + + ExascaleDbStorageVaultData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExascaleDbStorageVaultData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExascaleDbStorageVaultData(document.RootElement, options); + } + + internal static ExascaleDbStorageVaultData DeserializeExascaleDbStorageVaultData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ExascaleDbStorageVaultProperties properties = default; + IList zones = default; + IDictionary tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = ExascaleDbStorageVaultProperties.DeserializeExascaleDbStorageVaultProperties(property.Value, options); + continue; + } + if (property.NameEquals("zones"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + zones = array; + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("location"u8)) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExascaleDbStorageVaultData( + id, + name, + type, + systemData, + tags ?? new ChangeTrackingDictionary(), + location, + properties, + zones ?? new ChangeTrackingList(), + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExascaleDbStorageVaultData)} does not support writing '{options.Format}' format."); + } + } + + ExascaleDbStorageVaultData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeExascaleDbStorageVaultData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExascaleDbStorageVaultData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/ExascaleDbStorageVaultData.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/ExascaleDbStorageVaultData.cs new file mode 100644 index 000000000000..78ce1d7a5bbb --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/ExascaleDbStorageVaultData.cs @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + /// + /// A class representing the ExascaleDbStorageVault data model. + /// ExascaleDbStorageVault resource definition + /// + public partial class ExascaleDbStorageVaultData : TrackedResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The location. + public ExascaleDbStorageVaultData(AzureLocation location) : base(location) + { + Zones = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The resource-specific properties for this resource. + /// The availability zones. + /// Keeps track of any properties unknown to the library. + internal ExascaleDbStorageVaultData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ExascaleDbStorageVaultProperties properties, IList zones, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + Properties = properties; + Zones = zones; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ExascaleDbStorageVaultData() + { + } + + /// The resource-specific properties for this resource. + public ExascaleDbStorageVaultProperties Properties { get; set; } + /// The availability zones. + public IList Zones { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/ExascaleDbStorageVaultResource.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/ExascaleDbStorageVaultResource.Serialization.cs new file mode 100644 index 000000000000..cff23d4ce5d5 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/ExascaleDbStorageVaultResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.OracleDatabase +{ + public partial class ExascaleDbStorageVaultResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + ExascaleDbStorageVaultData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + ExascaleDbStorageVaultData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/ExascaleDbStorageVaultResource.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/ExascaleDbStorageVaultResource.cs new file mode 100644 index 000000000000..fb51019e2fa0 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/ExascaleDbStorageVaultResource.cs @@ -0,0 +1,707 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.OracleDatabase.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.OracleDatabase +{ + /// + /// A Class representing an ExascaleDbStorageVault along with the instance operations that can be performed on it. + /// If you have a you can construct an + /// from an instance of using the GetExascaleDbStorageVaultResource method. + /// Otherwise you can get one from its parent resource using the GetExascaleDbStorageVault method. + /// + public partial class ExascaleDbStorageVaultResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The exascaleDbStorageVaultName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string exascaleDbStorageVaultName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _exascaleDbStorageVaultClientDiagnostics; + private readonly ExascaleDbStorageVaultsRestOperations _exascaleDbStorageVaultRestClient; + private readonly ExascaleDbStorageVaultData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Oracle.Database/exascaleDbStorageVaults"; + + /// Initializes a new instance of the class for mocking. + protected ExascaleDbStorageVaultResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal ExascaleDbStorageVaultResource(ArmClient client, ExascaleDbStorageVaultData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal ExascaleDbStorageVaultResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _exascaleDbStorageVaultClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.OracleDatabase", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string exascaleDbStorageVaultApiVersion); + _exascaleDbStorageVaultRestClient = new ExascaleDbStorageVaultsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, exascaleDbStorageVaultApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual ExascaleDbStorageVaultData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get a ExascaleDbStorageVault + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName} + /// + /// + /// Operation Id + /// ExascaleDbStorageVault_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _exascaleDbStorageVaultClientDiagnostics.CreateScope("ExascaleDbStorageVaultResource.Get"); + scope.Start(); + try + { + var response = await _exascaleDbStorageVaultRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ExascaleDbStorageVaultResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a ExascaleDbStorageVault + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName} + /// + /// + /// Operation Id + /// ExascaleDbStorageVault_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _exascaleDbStorageVaultClientDiagnostics.CreateScope("ExascaleDbStorageVaultResource.Get"); + scope.Start(); + try + { + var response = _exascaleDbStorageVaultRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ExascaleDbStorageVaultResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a ExascaleDbStorageVault + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName} + /// + /// + /// Operation Id + /// ExascaleDbStorageVault_Delete + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _exascaleDbStorageVaultClientDiagnostics.CreateScope("ExascaleDbStorageVaultResource.Delete"); + scope.Start(); + try + { + var response = await _exascaleDbStorageVaultRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new OracleDatabaseArmOperation(_exascaleDbStorageVaultClientDiagnostics, Pipeline, _exascaleDbStorageVaultRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a ExascaleDbStorageVault + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName} + /// + /// + /// Operation Id + /// ExascaleDbStorageVault_Delete + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _exascaleDbStorageVaultClientDiagnostics.CreateScope("ExascaleDbStorageVaultResource.Delete"); + scope.Start(); + try + { + var response = _exascaleDbStorageVaultRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new OracleDatabaseArmOperation(_exascaleDbStorageVaultClientDiagnostics, Pipeline, _exascaleDbStorageVaultRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a ExascaleDbStorageVault + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName} + /// + /// + /// Operation Id + /// ExascaleDbStorageVault_Update + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, ExascaleDbStorageVaultPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _exascaleDbStorageVaultClientDiagnostics.CreateScope("ExascaleDbStorageVaultResource.Update"); + scope.Start(); + try + { + var response = await _exascaleDbStorageVaultRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new OracleDatabaseArmOperation(new ExascaleDbStorageVaultOperationSource(Client), _exascaleDbStorageVaultClientDiagnostics, Pipeline, _exascaleDbStorageVaultRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a ExascaleDbStorageVault + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName} + /// + /// + /// Operation Id + /// ExascaleDbStorageVault_Update + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, ExascaleDbStorageVaultPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _exascaleDbStorageVaultClientDiagnostics.CreateScope("ExascaleDbStorageVaultResource.Update"); + scope.Start(); + try + { + var response = _exascaleDbStorageVaultRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); + var operation = new OracleDatabaseArmOperation(new ExascaleDbStorageVaultOperationSource(Client), _exascaleDbStorageVaultClientDiagnostics, Pipeline, _exascaleDbStorageVaultRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName} + /// + /// + /// Operation Id + /// ExascaleDbStorageVault_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _exascaleDbStorageVaultClientDiagnostics.CreateScope("ExascaleDbStorageVaultResource.AddTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues[key] = value; + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _exascaleDbStorageVaultRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ExascaleDbStorageVaultResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new ExascaleDbStorageVaultPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName} + /// + /// + /// Operation Id + /// ExascaleDbStorageVault_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _exascaleDbStorageVaultClientDiagnostics.CreateScope("ExascaleDbStorageVaultResource.AddTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues[key] = value; + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _exascaleDbStorageVaultRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new ExascaleDbStorageVaultResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new ExascaleDbStorageVaultPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName} + /// + /// + /// Operation Id + /// ExascaleDbStorageVault_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _exascaleDbStorageVaultClientDiagnostics.CreateScope("ExascaleDbStorageVaultResource.SetTags"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _exascaleDbStorageVaultRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ExascaleDbStorageVaultResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new ExascaleDbStorageVaultPatch(); + patch.Tags.ReplaceWith(tags); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName} + /// + /// + /// Operation Id + /// ExascaleDbStorageVault_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _exascaleDbStorageVaultClientDiagnostics.CreateScope("ExascaleDbStorageVaultResource.SetTags"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _exascaleDbStorageVaultRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new ExascaleDbStorageVaultResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new ExascaleDbStorageVaultPatch(); + patch.Tags.ReplaceWith(tags); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName} + /// + /// + /// Operation Id + /// ExascaleDbStorageVault_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _exascaleDbStorageVaultClientDiagnostics.CreateScope("ExascaleDbStorageVaultResource.RemoveTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.Remove(key); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _exascaleDbStorageVaultRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ExascaleDbStorageVaultResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new ExascaleDbStorageVaultPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName} + /// + /// + /// Operation Id + /// ExascaleDbStorageVault_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _exascaleDbStorageVaultClientDiagnostics.CreateScope("ExascaleDbStorageVaultResource.RemoveTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.Remove(key); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _exascaleDbStorageVaultRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new ExascaleDbStorageVaultResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new ExascaleDbStorageVaultPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Extensions/MockableOracleDatabaseArmClient.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Extensions/MockableOracleDatabaseArmClient.cs new file mode 100644 index 000000000000..84c6ba6dc360 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Extensions/MockableOracleDatabaseArmClient.cs @@ -0,0 +1,289 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Mocking +{ + /// A class to add extension methods to ArmClient. + public partial class MockableOracleDatabaseArmClient : ArmResource + { + /// Initializes a new instance of the class for mocking. + protected MockableOracleDatabaseArmClient() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal MockableOracleDatabaseArmClient(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + internal MockableOracleDatabaseArmClient(ArmClient client) : this(client, ResourceIdentifier.Root) + { + } + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual CloudExadataInfrastructureResource GetCloudExadataInfrastructureResource(ResourceIdentifier id) + { + CloudExadataInfrastructureResource.ValidateResourceId(id); + return new CloudExadataInfrastructureResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual DbServerResource GetDbServerResource(ResourceIdentifier id) + { + DbServerResource.ValidateResourceId(id); + return new DbServerResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual CloudVmClusterResource GetCloudVmClusterResource(ResourceIdentifier id) + { + CloudVmClusterResource.ValidateResourceId(id); + return new CloudVmClusterResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual VirtualNetworkAddressResource GetVirtualNetworkAddressResource(ResourceIdentifier id) + { + VirtualNetworkAddressResource.ValidateResourceId(id); + return new VirtualNetworkAddressResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual SystemVersionResource GetSystemVersionResource(ResourceIdentifier id) + { + SystemVersionResource.ValidateResourceId(id); + return new SystemVersionResource(Client, id); + } + + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual OracleSubscriptionResource GetOracleSubscriptionResource(ResourceIdentifier id) + { + OracleSubscriptionResource.ValidateResourceId(id); + return new OracleSubscriptionResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual DbNodeResource GetDbNodeResource(ResourceIdentifier id) + { + DbNodeResource.ValidateResourceId(id); + return new DbNodeResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual GiVersionResource GetGiVersionResource(ResourceIdentifier id) + { + GiVersionResource.ValidateResourceId(id); + return new GiVersionResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual GiMinorVersionResource GetGiMinorVersionResource(ResourceIdentifier id) + { + GiMinorVersionResource.ValidateResourceId(id); + return new GiMinorVersionResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual DbSystemShapeResource GetDbSystemShapeResource(ResourceIdentifier id) + { + DbSystemShapeResource.ValidateResourceId(id); + return new DbSystemShapeResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual DnsPrivateViewResource GetDnsPrivateViewResource(ResourceIdentifier id) + { + DnsPrivateViewResource.ValidateResourceId(id); + return new DnsPrivateViewResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual DnsPrivateZoneResource GetDnsPrivateZoneResource(ResourceIdentifier id) + { + DnsPrivateZoneResource.ValidateResourceId(id); + return new DnsPrivateZoneResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual FlexComponentResource GetFlexComponentResource(ResourceIdentifier id) + { + FlexComponentResource.ValidateResourceId(id); + return new FlexComponentResource(Client, id); + } + + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual AutonomousDatabaseResource GetAutonomousDatabaseResource(ResourceIdentifier id) + { + AutonomousDatabaseResource.ValidateResourceId(id); + return new AutonomousDatabaseResource(Client, id); + } + + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual AutonomousDatabaseBackupResource GetAutonomousDatabaseBackupResource(ResourceIdentifier id) + { + AutonomousDatabaseBackupResource.ValidateResourceId(id); + return new AutonomousDatabaseBackupResource(Client, id); + } + + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual AutonomousDatabaseCharacterSetResource GetAutonomousDatabaseCharacterSetResource(ResourceIdentifier id) + { + AutonomousDatabaseCharacterSetResource.ValidateResourceId(id); + return new AutonomousDatabaseCharacterSetResource(Client, id); + } + + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual AutonomousDatabaseNationalCharacterSetResource GetAutonomousDatabaseNationalCharacterSetResource(ResourceIdentifier id) + { + AutonomousDatabaseNationalCharacterSetResource.ValidateResourceId(id); + return new AutonomousDatabaseNationalCharacterSetResource(Client, id); + } + + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual AutonomousDbVersionResource GetAutonomousDbVersionResource(ResourceIdentifier id) + { + AutonomousDbVersionResource.ValidateResourceId(id); + return new AutonomousDbVersionResource(Client, id); + } + + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual ExadbVmClusterResource GetExadbVmClusterResource(ResourceIdentifier id) + { + ExadbVmClusterResource.ValidateResourceId(id); + return new ExadbVmClusterResource(Client, id); + } + + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual ExascaleDbNodeResource GetExascaleDbNodeResource(ResourceIdentifier id) + { + ExascaleDbNodeResource.ValidateResourceId(id); + return new ExascaleDbNodeResource(Client, id); + } + + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual ExascaleDbStorageVaultResource GetExascaleDbStorageVaultResource(ResourceIdentifier id) + { + ExascaleDbStorageVaultResource.ValidateResourceId(id); + return new ExascaleDbStorageVaultResource(Client, id); + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Extensions/MockableOracleDatabaseResourceGroupResource.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Extensions/MockableOracleDatabaseResourceGroupResource.cs new file mode 100644 index 000000000000..7650ba2c8df1 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Extensions/MockableOracleDatabaseResourceGroupResource.cs @@ -0,0 +1,381 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Mocking +{ + /// A class to add extension methods to ResourceGroupResource. + public partial class MockableOracleDatabaseResourceGroupResource : ArmResource + { + /// Initializes a new instance of the class for mocking. + protected MockableOracleDatabaseResourceGroupResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal MockableOracleDatabaseResourceGroupResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// Gets a collection of CloudExadataInfrastructureResources in the ResourceGroupResource. + /// An object representing collection of CloudExadataInfrastructureResources and their operations over a CloudExadataInfrastructureResource. + public virtual CloudExadataInfrastructureCollection GetCloudExadataInfrastructures() + { + return GetCachedClient(client => new CloudExadataInfrastructureCollection(client, Id)); + } + + /// + /// Get a CloudExadataInfrastructure + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename} + /// + /// + /// Operation Id + /// CloudExadataInfrastructure_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// CloudExadataInfrastructure name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetCloudExadataInfrastructureAsync(string cloudexadatainfrastructurename, CancellationToken cancellationToken = default) + { + return await GetCloudExadataInfrastructures().GetAsync(cloudexadatainfrastructurename, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a CloudExadataInfrastructure + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename} + /// + /// + /// Operation Id + /// CloudExadataInfrastructure_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// CloudExadataInfrastructure name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetCloudExadataInfrastructure(string cloudexadatainfrastructurename, CancellationToken cancellationToken = default) + { + return GetCloudExadataInfrastructures().Get(cloudexadatainfrastructurename, cancellationToken); + } + + /// Gets a collection of CloudVmClusterResources in the ResourceGroupResource. + /// An object representing collection of CloudVmClusterResources and their operations over a CloudVmClusterResource. + public virtual CloudVmClusterCollection GetCloudVmClusters() + { + return GetCachedClient(client => new CloudVmClusterCollection(client, Id)); + } + + /// + /// Get a CloudVmCluster + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername} + /// + /// + /// Operation Id + /// CloudVmCluster_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// CloudVmCluster name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetCloudVmClusterAsync(string cloudvmclustername, CancellationToken cancellationToken = default) + { + return await GetCloudVmClusters().GetAsync(cloudvmclustername, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a CloudVmCluster + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername} + /// + /// + /// Operation Id + /// CloudVmCluster_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// CloudVmCluster name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetCloudVmCluster(string cloudvmclustername, CancellationToken cancellationToken = default) + { + return GetCloudVmClusters().Get(cloudvmclustername, cancellationToken); + } + + /// Gets a collection of AutonomousDatabaseResources in the ResourceGroupResource. + /// An object representing collection of AutonomousDatabaseResources and their operations over a AutonomousDatabaseResource. + public virtual AutonomousDatabaseCollection GetAutonomousDatabases() + { + return GetCachedClient(client => new AutonomousDatabaseCollection(client, Id)); + } + + /// + /// Get a AutonomousDatabase + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename} + /// + /// + /// Operation Id + /// AutonomousDatabase_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The database name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetAutonomousDatabaseAsync(string autonomousdatabasename, CancellationToken cancellationToken = default) + { + return await GetAutonomousDatabases().GetAsync(autonomousdatabasename, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a AutonomousDatabase + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename} + /// + /// + /// Operation Id + /// AutonomousDatabase_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The database name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetAutonomousDatabase(string autonomousdatabasename, CancellationToken cancellationToken = default) + { + return GetAutonomousDatabases().Get(autonomousdatabasename, cancellationToken); + } + + /// Gets a collection of ExadbVmClusterResources in the ResourceGroupResource. + /// An object representing collection of ExadbVmClusterResources and their operations over a ExadbVmClusterResource. + public virtual ExadbVmClusterCollection GetExadbVmClusters() + { + return GetCachedClient(client => new ExadbVmClusterCollection(client, Id)); + } + + /// + /// Get a ExadbVmCluster + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName} + /// + /// + /// Operation Id + /// ExadbVmCluster_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ExadbVmCluster. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetExadbVmClusterAsync(string exadbVmClusterName, CancellationToken cancellationToken = default) + { + return await GetExadbVmClusters().GetAsync(exadbVmClusterName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a ExadbVmCluster + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName} + /// + /// + /// Operation Id + /// ExadbVmCluster_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ExadbVmCluster. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetExadbVmCluster(string exadbVmClusterName, CancellationToken cancellationToken = default) + { + return GetExadbVmClusters().Get(exadbVmClusterName, cancellationToken); + } + + /// Gets a collection of ExascaleDbStorageVaultResources in the ResourceGroupResource. + /// An object representing collection of ExascaleDbStorageVaultResources and their operations over a ExascaleDbStorageVaultResource. + public virtual ExascaleDbStorageVaultCollection GetExascaleDbStorageVaults() + { + return GetCachedClient(client => new ExascaleDbStorageVaultCollection(client, Id)); + } + + /// + /// Get a ExascaleDbStorageVault + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName} + /// + /// + /// Operation Id + /// ExascaleDbStorageVault_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ExascaleDbStorageVault. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetExascaleDbStorageVaultAsync(string exascaleDbStorageVaultName, CancellationToken cancellationToken = default) + { + return await GetExascaleDbStorageVaults().GetAsync(exascaleDbStorageVaultName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a ExascaleDbStorageVault + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName} + /// + /// + /// Operation Id + /// ExascaleDbStorageVault_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ExascaleDbStorageVault. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetExascaleDbStorageVault(string exascaleDbStorageVaultName, CancellationToken cancellationToken = default) + { + return GetExascaleDbStorageVaults().Get(exascaleDbStorageVaultName, cancellationToken); + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Extensions/MockableOracleDatabaseSubscriptionResource.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Extensions/MockableOracleDatabaseSubscriptionResource.cs new file mode 100644 index 000000000000..57108cb076c5 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Extensions/MockableOracleDatabaseSubscriptionResource.cs @@ -0,0 +1,1015 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.OracleDatabase.Mocking +{ + /// A class to add extension methods to SubscriptionResource. + public partial class MockableOracleDatabaseSubscriptionResource : ArmResource + { + private ClientDiagnostics _cloudExadataInfrastructureClientDiagnostics; + private CloudExadataInfrastructuresRestOperations _cloudExadataInfrastructureRestClient; + private ClientDiagnostics _cloudVmClusterClientDiagnostics; + private CloudVmClustersRestOperations _cloudVmClusterRestClient; + private ClientDiagnostics _autonomousDatabaseClientDiagnostics; + private AutonomousDatabasesRestOperations _autonomousDatabaseRestClient; + private ClientDiagnostics _exadbVmClusterClientDiagnostics; + private ExadbVmClustersRestOperations _exadbVmClusterRestClient; + private ClientDiagnostics _exascaleDbStorageVaultClientDiagnostics; + private ExascaleDbStorageVaultsRestOperations _exascaleDbStorageVaultRestClient; + + /// Initializes a new instance of the class for mocking. + protected MockableOracleDatabaseSubscriptionResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal MockableOracleDatabaseSubscriptionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + private ClientDiagnostics CloudExadataInfrastructureClientDiagnostics => _cloudExadataInfrastructureClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.OracleDatabase", CloudExadataInfrastructureResource.ResourceType.Namespace, Diagnostics); + private CloudExadataInfrastructuresRestOperations CloudExadataInfrastructureRestClient => _cloudExadataInfrastructureRestClient ??= new CloudExadataInfrastructuresRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(CloudExadataInfrastructureResource.ResourceType)); + private ClientDiagnostics CloudVmClusterClientDiagnostics => _cloudVmClusterClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.OracleDatabase", CloudVmClusterResource.ResourceType.Namespace, Diagnostics); + private CloudVmClustersRestOperations CloudVmClusterRestClient => _cloudVmClusterRestClient ??= new CloudVmClustersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(CloudVmClusterResource.ResourceType)); + private ClientDiagnostics AutonomousDatabaseClientDiagnostics => _autonomousDatabaseClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.OracleDatabase", AutonomousDatabaseResource.ResourceType.Namespace, Diagnostics); + private AutonomousDatabasesRestOperations AutonomousDatabaseRestClient => _autonomousDatabaseRestClient ??= new AutonomousDatabasesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(AutonomousDatabaseResource.ResourceType)); + private ClientDiagnostics ExadbVmClusterClientDiagnostics => _exadbVmClusterClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.OracleDatabase", ExadbVmClusterResource.ResourceType.Namespace, Diagnostics); + private ExadbVmClustersRestOperations ExadbVmClusterRestClient => _exadbVmClusterRestClient ??= new ExadbVmClustersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(ExadbVmClusterResource.ResourceType)); + private ClientDiagnostics ExascaleDbStorageVaultClientDiagnostics => _exascaleDbStorageVaultClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.OracleDatabase", ExascaleDbStorageVaultResource.ResourceType.Namespace, Diagnostics); + private ExascaleDbStorageVaultsRestOperations ExascaleDbStorageVaultRestClient => _exascaleDbStorageVaultRestClient ??= new ExascaleDbStorageVaultsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(ExascaleDbStorageVaultResource.ResourceType)); + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// Gets a collection of SystemVersionResources in the SubscriptionResource. + /// The name of the Azure region. + /// An object representing collection of SystemVersionResources and their operations over a SystemVersionResource. + public virtual SystemVersionCollection GetSystemVersions(AzureLocation location) + { + return new SystemVersionCollection(Client, Id, location); + } + + /// + /// Get a SystemVersion + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/systemVersions/{systemversionname} + /// + /// + /// Operation Id + /// SystemVersion_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Azure region. + /// SystemVersion name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetSystemVersionAsync(AzureLocation location, string systemversionname, CancellationToken cancellationToken = default) + { + return await GetSystemVersions(location).GetAsync(systemversionname, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a SystemVersion + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/systemVersions/{systemversionname} + /// + /// + /// Operation Id + /// SystemVersion_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Azure region. + /// SystemVersion name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetSystemVersion(AzureLocation location, string systemversionname, CancellationToken cancellationToken = default) + { + return GetSystemVersions(location).Get(systemversionname, cancellationToken); + } + + /// Gets an object representing a OracleSubscriptionResource along with the instance operations that can be performed on it in the SubscriptionResource. + /// Returns a object. + public virtual OracleSubscriptionResource GetOracleSubscription() + { + return new OracleSubscriptionResource(Client, Id.AppendProviderResource("Oracle.Database", "oracleSubscriptions", "default")); + } + + /// Gets a collection of GiVersionResources in the SubscriptionResource. + /// The name of the Azure region. + /// An object representing collection of GiVersionResources and their operations over a GiVersionResource. + public virtual GiVersionCollection GetGiVersions(AzureLocation location) + { + return new GiVersionCollection(Client, Id, location); + } + + /// + /// Get a GiVersion + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/giVersions/{giversionname} + /// + /// + /// Operation Id + /// GiVersion_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Azure region. + /// GiVersion name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetGiVersionAsync(AzureLocation location, string giversionname, CancellationToken cancellationToken = default) + { + return await GetGiVersions(location).GetAsync(giversionname, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a GiVersion + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/giVersions/{giversionname} + /// + /// + /// Operation Id + /// GiVersion_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Azure region. + /// GiVersion name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetGiVersion(AzureLocation location, string giversionname, CancellationToken cancellationToken = default) + { + return GetGiVersions(location).Get(giversionname, cancellationToken); + } + + /// Gets a collection of DbSystemShapeResources in the SubscriptionResource. + /// The name of the Azure region. + /// An object representing collection of DbSystemShapeResources and their operations over a DbSystemShapeResource. + public virtual DbSystemShapeCollection GetDbSystemShapes(AzureLocation location) + { + return new DbSystemShapeCollection(Client, Id, location); + } + + /// + /// Get a DbSystemShape + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dbSystemShapes/{dbsystemshapename} + /// + /// + /// Operation Id + /// DbSystemShape_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Azure region. + /// DbSystemShape name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetDbSystemShapeAsync(AzureLocation location, string dbsystemshapename, CancellationToken cancellationToken = default) + { + return await GetDbSystemShapes(location).GetAsync(dbsystemshapename, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a DbSystemShape + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dbSystemShapes/{dbsystemshapename} + /// + /// + /// Operation Id + /// DbSystemShape_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Azure region. + /// DbSystemShape name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetDbSystemShape(AzureLocation location, string dbsystemshapename, CancellationToken cancellationToken = default) + { + return GetDbSystemShapes(location).Get(dbsystemshapename, cancellationToken); + } + + /// Gets a collection of DnsPrivateViewResources in the SubscriptionResource. + /// The name of the Azure region. + /// An object representing collection of DnsPrivateViewResources and their operations over a DnsPrivateViewResource. + public virtual DnsPrivateViewCollection GetDnsPrivateViews(AzureLocation location) + { + return new DnsPrivateViewCollection(Client, Id, location); + } + + /// + /// Get a DnsPrivateView + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateViews/{dnsprivateviewocid} + /// + /// + /// Operation Id + /// DnsPrivateView_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Azure region. + /// DnsPrivateView OCID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetDnsPrivateViewAsync(AzureLocation location, string dnsprivateviewocid, CancellationToken cancellationToken = default) + { + return await GetDnsPrivateViews(location).GetAsync(dnsprivateviewocid, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a DnsPrivateView + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateViews/{dnsprivateviewocid} + /// + /// + /// Operation Id + /// DnsPrivateView_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Azure region. + /// DnsPrivateView OCID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetDnsPrivateView(AzureLocation location, string dnsprivateviewocid, CancellationToken cancellationToken = default) + { + return GetDnsPrivateViews(location).Get(dnsprivateviewocid, cancellationToken); + } + + /// Gets a collection of DnsPrivateZoneResources in the SubscriptionResource. + /// The name of the Azure region. + /// An object representing collection of DnsPrivateZoneResources and their operations over a DnsPrivateZoneResource. + public virtual DnsPrivateZoneCollection GetDnsPrivateZones(AzureLocation location) + { + return new DnsPrivateZoneCollection(Client, Id, location); + } + + /// + /// Get a DnsPrivateZone + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateZones/{dnsprivatezonename} + /// + /// + /// Operation Id + /// DnsPrivateZone_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Azure region. + /// DnsPrivateZone name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetDnsPrivateZoneAsync(AzureLocation location, string dnsprivatezonename, CancellationToken cancellationToken = default) + { + return await GetDnsPrivateZones(location).GetAsync(dnsprivatezonename, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a DnsPrivateZone + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateZones/{dnsprivatezonename} + /// + /// + /// Operation Id + /// DnsPrivateZone_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Azure region. + /// DnsPrivateZone name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetDnsPrivateZone(AzureLocation location, string dnsprivatezonename, CancellationToken cancellationToken = default) + { + return GetDnsPrivateZones(location).Get(dnsprivatezonename, cancellationToken); + } + + /// Gets a collection of FlexComponentResources in the SubscriptionResource. + /// The name of the Azure region. + /// An object representing collection of FlexComponentResources and their operations over a FlexComponentResource. + public virtual FlexComponentCollection GetFlexComponents(AzureLocation location) + { + return new FlexComponentCollection(Client, Id, location); + } + + /// + /// Get a FlexComponent + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/flexComponents/{flexComponentName} + /// + /// + /// Operation Id + /// FlexComponent_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Azure region. + /// The name of the FlexComponent. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetFlexComponentAsync(AzureLocation location, string flexComponentName, CancellationToken cancellationToken = default) + { + return await GetFlexComponents(location).GetAsync(flexComponentName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a FlexComponent + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/flexComponents/{flexComponentName} + /// + /// + /// Operation Id + /// FlexComponent_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Azure region. + /// The name of the FlexComponent. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetFlexComponent(AzureLocation location, string flexComponentName, CancellationToken cancellationToken = default) + { + return GetFlexComponents(location).Get(flexComponentName, cancellationToken); + } + + /// Gets a collection of AutonomousDatabaseCharacterSetResources in the SubscriptionResource. + /// The name of the Azure region. + /// An object representing collection of AutonomousDatabaseCharacterSetResources and their operations over a AutonomousDatabaseCharacterSetResource. + public virtual AutonomousDatabaseCharacterSetCollection GetAutonomousDatabaseCharacterSets(AzureLocation location) + { + return new AutonomousDatabaseCharacterSetCollection(Client, Id, location); + } + + /// + /// Get a AutonomousDatabaseCharacterSet + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseCharacterSets/{adbscharsetname} + /// + /// + /// Operation Id + /// AutonomousDatabaseCharacterSet_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Azure region. + /// AutonomousDatabaseCharacterSet name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetAutonomousDatabaseCharacterSetAsync(AzureLocation location, string adbscharsetname, CancellationToken cancellationToken = default) + { + return await GetAutonomousDatabaseCharacterSets(location).GetAsync(adbscharsetname, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a AutonomousDatabaseCharacterSet + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseCharacterSets/{adbscharsetname} + /// + /// + /// Operation Id + /// AutonomousDatabaseCharacterSet_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Azure region. + /// AutonomousDatabaseCharacterSet name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetAutonomousDatabaseCharacterSet(AzureLocation location, string adbscharsetname, CancellationToken cancellationToken = default) + { + return GetAutonomousDatabaseCharacterSets(location).Get(adbscharsetname, cancellationToken); + } + + /// Gets a collection of AutonomousDatabaseNationalCharacterSetResources in the SubscriptionResource. + /// The name of the Azure region. + /// An object representing collection of AutonomousDatabaseNationalCharacterSetResources and their operations over a AutonomousDatabaseNationalCharacterSetResource. + public virtual AutonomousDatabaseNationalCharacterSetCollection GetAutonomousDatabaseNationalCharacterSets(AzureLocation location) + { + return new AutonomousDatabaseNationalCharacterSetCollection(Client, Id, location); + } + + /// + /// Get a AutonomousDatabaseNationalCharacterSet + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseNationalCharacterSets/{adbsncharsetname} + /// + /// + /// Operation Id + /// AutonomousDatabaseNationalCharacterSet_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Azure region. + /// AutonomousDatabaseNationalCharacterSets name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetAutonomousDatabaseNationalCharacterSetAsync(AzureLocation location, string adbsncharsetname, CancellationToken cancellationToken = default) + { + return await GetAutonomousDatabaseNationalCharacterSets(location).GetAsync(adbsncharsetname, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a AutonomousDatabaseNationalCharacterSet + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseNationalCharacterSets/{adbsncharsetname} + /// + /// + /// Operation Id + /// AutonomousDatabaseNationalCharacterSet_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Azure region. + /// AutonomousDatabaseNationalCharacterSets name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetAutonomousDatabaseNationalCharacterSet(AzureLocation location, string adbsncharsetname, CancellationToken cancellationToken = default) + { + return GetAutonomousDatabaseNationalCharacterSets(location).Get(adbsncharsetname, cancellationToken); + } + + /// Gets a collection of AutonomousDbVersionResources in the SubscriptionResource. + /// The name of the Azure region. + /// An object representing collection of AutonomousDbVersionResources and their operations over a AutonomousDbVersionResource. + public virtual AutonomousDbVersionCollection GetAutonomousDbVersions(AzureLocation location) + { + return new AutonomousDbVersionCollection(Client, Id, location); + } + + /// + /// Get a AutonomousDbVersion + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDbVersions/{autonomousdbversionsname} + /// + /// + /// Operation Id + /// AutonomousDbVersion_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Azure region. + /// AutonomousDbVersion name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetAutonomousDbVersionAsync(AzureLocation location, string autonomousdbversionsname, CancellationToken cancellationToken = default) + { + return await GetAutonomousDbVersions(location).GetAsync(autonomousdbversionsname, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a AutonomousDbVersion + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDbVersions/{autonomousdbversionsname} + /// + /// + /// Operation Id + /// AutonomousDbVersion_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Azure region. + /// AutonomousDbVersion name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetAutonomousDbVersion(AzureLocation location, string autonomousdbversionsname, CancellationToken cancellationToken = default) + { + return GetAutonomousDbVersions(location).Get(autonomousdbversionsname, cancellationToken); + } + + /// + /// List CloudExadataInfrastructure resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/cloudExadataInfrastructures + /// + /// + /// Operation Id + /// CloudExadataInfrastructure_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetCloudExadataInfrastructuresAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => CloudExadataInfrastructureRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CloudExadataInfrastructureRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new CloudExadataInfrastructureResource(Client, CloudExadataInfrastructureData.DeserializeCloudExadataInfrastructureData(e)), CloudExadataInfrastructureClientDiagnostics, Pipeline, "MockableOracleDatabaseSubscriptionResource.GetCloudExadataInfrastructures", "value", "nextLink", cancellationToken); + } + + /// + /// List CloudExadataInfrastructure resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/cloudExadataInfrastructures + /// + /// + /// Operation Id + /// CloudExadataInfrastructure_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetCloudExadataInfrastructures(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => CloudExadataInfrastructureRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CloudExadataInfrastructureRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new CloudExadataInfrastructureResource(Client, CloudExadataInfrastructureData.DeserializeCloudExadataInfrastructureData(e)), CloudExadataInfrastructureClientDiagnostics, Pipeline, "MockableOracleDatabaseSubscriptionResource.GetCloudExadataInfrastructures", "value", "nextLink", cancellationToken); + } + + /// + /// List CloudVmCluster resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/cloudVmClusters + /// + /// + /// Operation Id + /// CloudVmCluster_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetCloudVmClustersAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => CloudVmClusterRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CloudVmClusterRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new CloudVmClusterResource(Client, CloudVmClusterData.DeserializeCloudVmClusterData(e)), CloudVmClusterClientDiagnostics, Pipeline, "MockableOracleDatabaseSubscriptionResource.GetCloudVmClusters", "value", "nextLink", cancellationToken); + } + + /// + /// List CloudVmCluster resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/cloudVmClusters + /// + /// + /// Operation Id + /// CloudVmCluster_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetCloudVmClusters(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => CloudVmClusterRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CloudVmClusterRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new CloudVmClusterResource(Client, CloudVmClusterData.DeserializeCloudVmClusterData(e)), CloudVmClusterClientDiagnostics, Pipeline, "MockableOracleDatabaseSubscriptionResource.GetCloudVmClusters", "value", "nextLink", cancellationToken); + } + + /// + /// List AutonomousDatabase resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/autonomousDatabases + /// + /// + /// Operation Id + /// AutonomousDatabase_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAutonomousDatabasesAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => AutonomousDatabaseRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => AutonomousDatabaseRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new AutonomousDatabaseResource(Client, AutonomousDatabaseData.DeserializeAutonomousDatabaseData(e)), AutonomousDatabaseClientDiagnostics, Pipeline, "MockableOracleDatabaseSubscriptionResource.GetAutonomousDatabases", "value", "nextLink", cancellationToken); + } + + /// + /// List AutonomousDatabase resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/autonomousDatabases + /// + /// + /// Operation Id + /// AutonomousDatabase_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAutonomousDatabases(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => AutonomousDatabaseRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => AutonomousDatabaseRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new AutonomousDatabaseResource(Client, AutonomousDatabaseData.DeserializeAutonomousDatabaseData(e)), AutonomousDatabaseClientDiagnostics, Pipeline, "MockableOracleDatabaseSubscriptionResource.GetAutonomousDatabases", "value", "nextLink", cancellationToken); + } + + /// + /// List ExadbVmCluster resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/exadbVmClusters + /// + /// + /// Operation Id + /// ExadbVmCluster_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetExadbVmClustersAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => ExadbVmClusterRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => ExadbVmClusterRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ExadbVmClusterResource(Client, ExadbVmClusterData.DeserializeExadbVmClusterData(e)), ExadbVmClusterClientDiagnostics, Pipeline, "MockableOracleDatabaseSubscriptionResource.GetExadbVmClusters", "value", "nextLink", cancellationToken); + } + + /// + /// List ExadbVmCluster resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/exadbVmClusters + /// + /// + /// Operation Id + /// ExadbVmCluster_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetExadbVmClusters(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => ExadbVmClusterRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => ExadbVmClusterRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ExadbVmClusterResource(Client, ExadbVmClusterData.DeserializeExadbVmClusterData(e)), ExadbVmClusterClientDiagnostics, Pipeline, "MockableOracleDatabaseSubscriptionResource.GetExadbVmClusters", "value", "nextLink", cancellationToken); + } + + /// + /// List ExascaleDbStorageVault resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/exascaleDbStorageVaults + /// + /// + /// Operation Id + /// ExascaleDbStorageVault_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetExascaleDbStorageVaultsAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => ExascaleDbStorageVaultRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => ExascaleDbStorageVaultRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ExascaleDbStorageVaultResource(Client, ExascaleDbStorageVaultData.DeserializeExascaleDbStorageVaultData(e)), ExascaleDbStorageVaultClientDiagnostics, Pipeline, "MockableOracleDatabaseSubscriptionResource.GetExascaleDbStorageVaults", "value", "nextLink", cancellationToken); + } + + /// + /// List ExascaleDbStorageVault resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/exascaleDbStorageVaults + /// + /// + /// Operation Id + /// ExascaleDbStorageVault_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetExascaleDbStorageVaults(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => ExascaleDbStorageVaultRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => ExascaleDbStorageVaultRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ExascaleDbStorageVaultResource(Client, ExascaleDbStorageVaultData.DeserializeExascaleDbStorageVaultData(e)), ExascaleDbStorageVaultClientDiagnostics, Pipeline, "MockableOracleDatabaseSubscriptionResource.GetExascaleDbStorageVaults", "value", "nextLink", cancellationToken); + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Extensions/OracleDatabaseExtensions.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Extensions/OracleDatabaseExtensions.cs new file mode 100644 index 000000000000..4a2aebf71590 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Extensions/OracleDatabaseExtensions.cs @@ -0,0 +1,2140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.ResourceManager.OracleDatabase.Mocking; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.OracleDatabase +{ + /// A class to add extension methods to Azure.ResourceManager.OracleDatabase. + public static partial class OracleDatabaseExtensions + { + private static MockableOracleDatabaseArmClient GetMockableOracleDatabaseArmClient(ArmClient client) + { + return client.GetCachedClient(client0 => new MockableOracleDatabaseArmClient(client0)); + } + + private static MockableOracleDatabaseResourceGroupResource GetMockableOracleDatabaseResourceGroupResource(ArmResource resource) + { + return resource.GetCachedClient(client => new MockableOracleDatabaseResourceGroupResource(client, resource.Id)); + } + + private static MockableOracleDatabaseSubscriptionResource GetMockableOracleDatabaseSubscriptionResource(ArmResource resource) + { + return resource.GetCachedClient(client => new MockableOracleDatabaseSubscriptionResource(client, resource.Id)); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static CloudExadataInfrastructureResource GetCloudExadataInfrastructureResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableOracleDatabaseArmClient(client).GetCloudExadataInfrastructureResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static DbServerResource GetDbServerResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableOracleDatabaseArmClient(client).GetDbServerResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static CloudVmClusterResource GetCloudVmClusterResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableOracleDatabaseArmClient(client).GetCloudVmClusterResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static VirtualNetworkAddressResource GetVirtualNetworkAddressResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableOracleDatabaseArmClient(client).GetVirtualNetworkAddressResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static SystemVersionResource GetSystemVersionResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableOracleDatabaseArmClient(client).GetSystemVersionResource(id); + } + + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static OracleSubscriptionResource GetOracleSubscriptionResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableOracleDatabaseArmClient(client).GetOracleSubscriptionResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static DbNodeResource GetDbNodeResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableOracleDatabaseArmClient(client).GetDbNodeResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static GiVersionResource GetGiVersionResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableOracleDatabaseArmClient(client).GetGiVersionResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static GiMinorVersionResource GetGiMinorVersionResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableOracleDatabaseArmClient(client).GetGiMinorVersionResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static DbSystemShapeResource GetDbSystemShapeResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableOracleDatabaseArmClient(client).GetDbSystemShapeResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static DnsPrivateViewResource GetDnsPrivateViewResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableOracleDatabaseArmClient(client).GetDnsPrivateViewResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static DnsPrivateZoneResource GetDnsPrivateZoneResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableOracleDatabaseArmClient(client).GetDnsPrivateZoneResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static FlexComponentResource GetFlexComponentResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableOracleDatabaseArmClient(client).GetFlexComponentResource(id); + } + + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static AutonomousDatabaseResource GetAutonomousDatabaseResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableOracleDatabaseArmClient(client).GetAutonomousDatabaseResource(id); + } + + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static AutonomousDatabaseBackupResource GetAutonomousDatabaseBackupResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableOracleDatabaseArmClient(client).GetAutonomousDatabaseBackupResource(id); + } + + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static AutonomousDatabaseCharacterSetResource GetAutonomousDatabaseCharacterSetResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableOracleDatabaseArmClient(client).GetAutonomousDatabaseCharacterSetResource(id); + } + + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static AutonomousDatabaseNationalCharacterSetResource GetAutonomousDatabaseNationalCharacterSetResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableOracleDatabaseArmClient(client).GetAutonomousDatabaseNationalCharacterSetResource(id); + } + + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static AutonomousDbVersionResource GetAutonomousDbVersionResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableOracleDatabaseArmClient(client).GetAutonomousDbVersionResource(id); + } + + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static ExadbVmClusterResource GetExadbVmClusterResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableOracleDatabaseArmClient(client).GetExadbVmClusterResource(id); + } + + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static ExascaleDbNodeResource GetExascaleDbNodeResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableOracleDatabaseArmClient(client).GetExascaleDbNodeResource(id); + } + + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static ExascaleDbStorageVaultResource GetExascaleDbStorageVaultResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableOracleDatabaseArmClient(client).GetExascaleDbStorageVaultResource(id); + } + + /// + /// Gets a collection of CloudExadataInfrastructureResources in the ResourceGroupResource. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// is null. + /// An object representing collection of CloudExadataInfrastructureResources and their operations over a CloudExadataInfrastructureResource. + public static CloudExadataInfrastructureCollection GetCloudExadataInfrastructures(this ResourceGroupResource resourceGroupResource) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableOracleDatabaseResourceGroupResource(resourceGroupResource).GetCloudExadataInfrastructures(); + } + + /// + /// Get a CloudExadataInfrastructure + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename} + /// + /// + /// Operation Id + /// CloudExadataInfrastructure_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// CloudExadataInfrastructure name. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static async Task> GetCloudExadataInfrastructureAsync(this ResourceGroupResource resourceGroupResource, string cloudexadatainfrastructurename, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return await GetMockableOracleDatabaseResourceGroupResource(resourceGroupResource).GetCloudExadataInfrastructureAsync(cloudexadatainfrastructurename, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a CloudExadataInfrastructure + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename} + /// + /// + /// Operation Id + /// CloudExadataInfrastructure_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// CloudExadataInfrastructure name. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static Response GetCloudExadataInfrastructure(this ResourceGroupResource resourceGroupResource, string cloudexadatainfrastructurename, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableOracleDatabaseResourceGroupResource(resourceGroupResource).GetCloudExadataInfrastructure(cloudexadatainfrastructurename, cancellationToken); + } + + /// + /// Gets a collection of CloudVmClusterResources in the ResourceGroupResource. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// is null. + /// An object representing collection of CloudVmClusterResources and their operations over a CloudVmClusterResource. + public static CloudVmClusterCollection GetCloudVmClusters(this ResourceGroupResource resourceGroupResource) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableOracleDatabaseResourceGroupResource(resourceGroupResource).GetCloudVmClusters(); + } + + /// + /// Get a CloudVmCluster + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername} + /// + /// + /// Operation Id + /// CloudVmCluster_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// CloudVmCluster name. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static async Task> GetCloudVmClusterAsync(this ResourceGroupResource resourceGroupResource, string cloudvmclustername, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return await GetMockableOracleDatabaseResourceGroupResource(resourceGroupResource).GetCloudVmClusterAsync(cloudvmclustername, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a CloudVmCluster + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername} + /// + /// + /// Operation Id + /// CloudVmCluster_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// CloudVmCluster name. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static Response GetCloudVmCluster(this ResourceGroupResource resourceGroupResource, string cloudvmclustername, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableOracleDatabaseResourceGroupResource(resourceGroupResource).GetCloudVmCluster(cloudvmclustername, cancellationToken); + } + + /// + /// Gets a collection of AutonomousDatabaseResources in the ResourceGroupResource. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// is null. + /// An object representing collection of AutonomousDatabaseResources and their operations over a AutonomousDatabaseResource. + public static AutonomousDatabaseCollection GetAutonomousDatabases(this ResourceGroupResource resourceGroupResource) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableOracleDatabaseResourceGroupResource(resourceGroupResource).GetAutonomousDatabases(); + } + + /// + /// Get a AutonomousDatabase + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename} + /// + /// + /// Operation Id + /// AutonomousDatabase_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The database name. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static async Task> GetAutonomousDatabaseAsync(this ResourceGroupResource resourceGroupResource, string autonomousdatabasename, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return await GetMockableOracleDatabaseResourceGroupResource(resourceGroupResource).GetAutonomousDatabaseAsync(autonomousdatabasename, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a AutonomousDatabase + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename} + /// + /// + /// Operation Id + /// AutonomousDatabase_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The database name. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static Response GetAutonomousDatabase(this ResourceGroupResource resourceGroupResource, string autonomousdatabasename, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableOracleDatabaseResourceGroupResource(resourceGroupResource).GetAutonomousDatabase(autonomousdatabasename, cancellationToken); + } + + /// + /// Gets a collection of ExadbVmClusterResources in the ResourceGroupResource. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// is null. + /// An object representing collection of ExadbVmClusterResources and their operations over a ExadbVmClusterResource. + public static ExadbVmClusterCollection GetExadbVmClusters(this ResourceGroupResource resourceGroupResource) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableOracleDatabaseResourceGroupResource(resourceGroupResource).GetExadbVmClusters(); + } + + /// + /// Get a ExadbVmCluster + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName} + /// + /// + /// Operation Id + /// ExadbVmCluster_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the ExadbVmCluster. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static async Task> GetExadbVmClusterAsync(this ResourceGroupResource resourceGroupResource, string exadbVmClusterName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return await GetMockableOracleDatabaseResourceGroupResource(resourceGroupResource).GetExadbVmClusterAsync(exadbVmClusterName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a ExadbVmCluster + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName} + /// + /// + /// Operation Id + /// ExadbVmCluster_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the ExadbVmCluster. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static Response GetExadbVmCluster(this ResourceGroupResource resourceGroupResource, string exadbVmClusterName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableOracleDatabaseResourceGroupResource(resourceGroupResource).GetExadbVmCluster(exadbVmClusterName, cancellationToken); + } + + /// + /// Gets a collection of ExascaleDbStorageVaultResources in the ResourceGroupResource. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// is null. + /// An object representing collection of ExascaleDbStorageVaultResources and their operations over a ExascaleDbStorageVaultResource. + public static ExascaleDbStorageVaultCollection GetExascaleDbStorageVaults(this ResourceGroupResource resourceGroupResource) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableOracleDatabaseResourceGroupResource(resourceGroupResource).GetExascaleDbStorageVaults(); + } + + /// + /// Get a ExascaleDbStorageVault + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName} + /// + /// + /// Operation Id + /// ExascaleDbStorageVault_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the ExascaleDbStorageVault. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static async Task> GetExascaleDbStorageVaultAsync(this ResourceGroupResource resourceGroupResource, string exascaleDbStorageVaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return await GetMockableOracleDatabaseResourceGroupResource(resourceGroupResource).GetExascaleDbStorageVaultAsync(exascaleDbStorageVaultName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a ExascaleDbStorageVault + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName} + /// + /// + /// Operation Id + /// ExascaleDbStorageVault_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the ExascaleDbStorageVault. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static Response GetExascaleDbStorageVault(this ResourceGroupResource resourceGroupResource, string exascaleDbStorageVaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableOracleDatabaseResourceGroupResource(resourceGroupResource).GetExascaleDbStorageVault(exascaleDbStorageVaultName, cancellationToken); + } + + /// + /// Gets a collection of SystemVersionResources in the SubscriptionResource. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Azure region. + /// is null. + /// An object representing collection of SystemVersionResources and their operations over a SystemVersionResource. + public static SystemVersionCollection GetSystemVersions(this SubscriptionResource subscriptionResource, AzureLocation location) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableOracleDatabaseSubscriptionResource(subscriptionResource).GetSystemVersions(location); + } + + /// + /// Get a SystemVersion + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/systemVersions/{systemversionname} + /// + /// + /// Operation Id + /// SystemVersion_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Azure region. + /// SystemVersion name. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static async Task> GetSystemVersionAsync(this SubscriptionResource subscriptionResource, AzureLocation location, string systemversionname, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return await GetMockableOracleDatabaseSubscriptionResource(subscriptionResource).GetSystemVersionAsync(location, systemversionname, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a SystemVersion + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/systemVersions/{systemversionname} + /// + /// + /// Operation Id + /// SystemVersion_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Azure region. + /// SystemVersion name. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static Response GetSystemVersion(this SubscriptionResource subscriptionResource, AzureLocation location, string systemversionname, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableOracleDatabaseSubscriptionResource(subscriptionResource).GetSystemVersion(location, systemversionname, cancellationToken); + } + + /// + /// Gets an object representing a OracleSubscriptionResource along with the instance operations that can be performed on it in the SubscriptionResource. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// is null. + /// Returns a object. + public static OracleSubscriptionResource GetOracleSubscription(this SubscriptionResource subscriptionResource) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableOracleDatabaseSubscriptionResource(subscriptionResource).GetOracleSubscription(); + } + + /// + /// Gets a collection of GiVersionResources in the SubscriptionResource. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Azure region. + /// is null. + /// An object representing collection of GiVersionResources and their operations over a GiVersionResource. + public static GiVersionCollection GetGiVersions(this SubscriptionResource subscriptionResource, AzureLocation location) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableOracleDatabaseSubscriptionResource(subscriptionResource).GetGiVersions(location); + } + + /// + /// Get a GiVersion + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/giVersions/{giversionname} + /// + /// + /// Operation Id + /// GiVersion_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Azure region. + /// GiVersion name. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static async Task> GetGiVersionAsync(this SubscriptionResource subscriptionResource, AzureLocation location, string giversionname, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return await GetMockableOracleDatabaseSubscriptionResource(subscriptionResource).GetGiVersionAsync(location, giversionname, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a GiVersion + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/giVersions/{giversionname} + /// + /// + /// Operation Id + /// GiVersion_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Azure region. + /// GiVersion name. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static Response GetGiVersion(this SubscriptionResource subscriptionResource, AzureLocation location, string giversionname, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableOracleDatabaseSubscriptionResource(subscriptionResource).GetGiVersion(location, giversionname, cancellationToken); + } + + /// + /// Gets a collection of DbSystemShapeResources in the SubscriptionResource. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Azure region. + /// is null. + /// An object representing collection of DbSystemShapeResources and their operations over a DbSystemShapeResource. + public static DbSystemShapeCollection GetDbSystemShapes(this SubscriptionResource subscriptionResource, AzureLocation location) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableOracleDatabaseSubscriptionResource(subscriptionResource).GetDbSystemShapes(location); + } + + /// + /// Get a DbSystemShape + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dbSystemShapes/{dbsystemshapename} + /// + /// + /// Operation Id + /// DbSystemShape_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Azure region. + /// DbSystemShape name. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static async Task> GetDbSystemShapeAsync(this SubscriptionResource subscriptionResource, AzureLocation location, string dbsystemshapename, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return await GetMockableOracleDatabaseSubscriptionResource(subscriptionResource).GetDbSystemShapeAsync(location, dbsystemshapename, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a DbSystemShape + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dbSystemShapes/{dbsystemshapename} + /// + /// + /// Operation Id + /// DbSystemShape_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Azure region. + /// DbSystemShape name. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static Response GetDbSystemShape(this SubscriptionResource subscriptionResource, AzureLocation location, string dbsystemshapename, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableOracleDatabaseSubscriptionResource(subscriptionResource).GetDbSystemShape(location, dbsystemshapename, cancellationToken); + } + + /// + /// Gets a collection of DnsPrivateViewResources in the SubscriptionResource. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Azure region. + /// is null. + /// An object representing collection of DnsPrivateViewResources and their operations over a DnsPrivateViewResource. + public static DnsPrivateViewCollection GetDnsPrivateViews(this SubscriptionResource subscriptionResource, AzureLocation location) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableOracleDatabaseSubscriptionResource(subscriptionResource).GetDnsPrivateViews(location); + } + + /// + /// Get a DnsPrivateView + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateViews/{dnsprivateviewocid} + /// + /// + /// Operation Id + /// DnsPrivateView_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Azure region. + /// DnsPrivateView OCID. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static async Task> GetDnsPrivateViewAsync(this SubscriptionResource subscriptionResource, AzureLocation location, string dnsprivateviewocid, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return await GetMockableOracleDatabaseSubscriptionResource(subscriptionResource).GetDnsPrivateViewAsync(location, dnsprivateviewocid, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a DnsPrivateView + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateViews/{dnsprivateviewocid} + /// + /// + /// Operation Id + /// DnsPrivateView_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Azure region. + /// DnsPrivateView OCID. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static Response GetDnsPrivateView(this SubscriptionResource subscriptionResource, AzureLocation location, string dnsprivateviewocid, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableOracleDatabaseSubscriptionResource(subscriptionResource).GetDnsPrivateView(location, dnsprivateviewocid, cancellationToken); + } + + /// + /// Gets a collection of DnsPrivateZoneResources in the SubscriptionResource. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Azure region. + /// is null. + /// An object representing collection of DnsPrivateZoneResources and their operations over a DnsPrivateZoneResource. + public static DnsPrivateZoneCollection GetDnsPrivateZones(this SubscriptionResource subscriptionResource, AzureLocation location) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableOracleDatabaseSubscriptionResource(subscriptionResource).GetDnsPrivateZones(location); + } + + /// + /// Get a DnsPrivateZone + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateZones/{dnsprivatezonename} + /// + /// + /// Operation Id + /// DnsPrivateZone_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Azure region. + /// DnsPrivateZone name. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static async Task> GetDnsPrivateZoneAsync(this SubscriptionResource subscriptionResource, AzureLocation location, string dnsprivatezonename, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return await GetMockableOracleDatabaseSubscriptionResource(subscriptionResource).GetDnsPrivateZoneAsync(location, dnsprivatezonename, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a DnsPrivateZone + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateZones/{dnsprivatezonename} + /// + /// + /// Operation Id + /// DnsPrivateZone_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Azure region. + /// DnsPrivateZone name. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static Response GetDnsPrivateZone(this SubscriptionResource subscriptionResource, AzureLocation location, string dnsprivatezonename, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableOracleDatabaseSubscriptionResource(subscriptionResource).GetDnsPrivateZone(location, dnsprivatezonename, cancellationToken); + } + + /// + /// Gets a collection of FlexComponentResources in the SubscriptionResource. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Azure region. + /// is null. + /// An object representing collection of FlexComponentResources and their operations over a FlexComponentResource. + public static FlexComponentCollection GetFlexComponents(this SubscriptionResource subscriptionResource, AzureLocation location) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableOracleDatabaseSubscriptionResource(subscriptionResource).GetFlexComponents(location); + } + + /// + /// Get a FlexComponent + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/flexComponents/{flexComponentName} + /// + /// + /// Operation Id + /// FlexComponent_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Azure region. + /// The name of the FlexComponent. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static async Task> GetFlexComponentAsync(this SubscriptionResource subscriptionResource, AzureLocation location, string flexComponentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return await GetMockableOracleDatabaseSubscriptionResource(subscriptionResource).GetFlexComponentAsync(location, flexComponentName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a FlexComponent + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/flexComponents/{flexComponentName} + /// + /// + /// Operation Id + /// FlexComponent_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Azure region. + /// The name of the FlexComponent. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static Response GetFlexComponent(this SubscriptionResource subscriptionResource, AzureLocation location, string flexComponentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableOracleDatabaseSubscriptionResource(subscriptionResource).GetFlexComponent(location, flexComponentName, cancellationToken); + } + + /// + /// Gets a collection of AutonomousDatabaseCharacterSetResources in the SubscriptionResource. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Azure region. + /// is null. + /// An object representing collection of AutonomousDatabaseCharacterSetResources and their operations over a AutonomousDatabaseCharacterSetResource. + public static AutonomousDatabaseCharacterSetCollection GetAutonomousDatabaseCharacterSets(this SubscriptionResource subscriptionResource, AzureLocation location) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableOracleDatabaseSubscriptionResource(subscriptionResource).GetAutonomousDatabaseCharacterSets(location); + } + + /// + /// Get a AutonomousDatabaseCharacterSet + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseCharacterSets/{adbscharsetname} + /// + /// + /// Operation Id + /// AutonomousDatabaseCharacterSet_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Azure region. + /// AutonomousDatabaseCharacterSet name. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static async Task> GetAutonomousDatabaseCharacterSetAsync(this SubscriptionResource subscriptionResource, AzureLocation location, string adbscharsetname, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return await GetMockableOracleDatabaseSubscriptionResource(subscriptionResource).GetAutonomousDatabaseCharacterSetAsync(location, adbscharsetname, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a AutonomousDatabaseCharacterSet + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseCharacterSets/{adbscharsetname} + /// + /// + /// Operation Id + /// AutonomousDatabaseCharacterSet_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Azure region. + /// AutonomousDatabaseCharacterSet name. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static Response GetAutonomousDatabaseCharacterSet(this SubscriptionResource subscriptionResource, AzureLocation location, string adbscharsetname, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableOracleDatabaseSubscriptionResource(subscriptionResource).GetAutonomousDatabaseCharacterSet(location, adbscharsetname, cancellationToken); + } + + /// + /// Gets a collection of AutonomousDatabaseNationalCharacterSetResources in the SubscriptionResource. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Azure region. + /// is null. + /// An object representing collection of AutonomousDatabaseNationalCharacterSetResources and their operations over a AutonomousDatabaseNationalCharacterSetResource. + public static AutonomousDatabaseNationalCharacterSetCollection GetAutonomousDatabaseNationalCharacterSets(this SubscriptionResource subscriptionResource, AzureLocation location) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableOracleDatabaseSubscriptionResource(subscriptionResource).GetAutonomousDatabaseNationalCharacterSets(location); + } + + /// + /// Get a AutonomousDatabaseNationalCharacterSet + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseNationalCharacterSets/{adbsncharsetname} + /// + /// + /// Operation Id + /// AutonomousDatabaseNationalCharacterSet_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Azure region. + /// AutonomousDatabaseNationalCharacterSets name. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static async Task> GetAutonomousDatabaseNationalCharacterSetAsync(this SubscriptionResource subscriptionResource, AzureLocation location, string adbsncharsetname, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return await GetMockableOracleDatabaseSubscriptionResource(subscriptionResource).GetAutonomousDatabaseNationalCharacterSetAsync(location, adbsncharsetname, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a AutonomousDatabaseNationalCharacterSet + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseNationalCharacterSets/{adbsncharsetname} + /// + /// + /// Operation Id + /// AutonomousDatabaseNationalCharacterSet_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Azure region. + /// AutonomousDatabaseNationalCharacterSets name. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static Response GetAutonomousDatabaseNationalCharacterSet(this SubscriptionResource subscriptionResource, AzureLocation location, string adbsncharsetname, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableOracleDatabaseSubscriptionResource(subscriptionResource).GetAutonomousDatabaseNationalCharacterSet(location, adbsncharsetname, cancellationToken); + } + + /// + /// Gets a collection of AutonomousDbVersionResources in the SubscriptionResource. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Azure region. + /// is null. + /// An object representing collection of AutonomousDbVersionResources and their operations over a AutonomousDbVersionResource. + public static AutonomousDbVersionCollection GetAutonomousDbVersions(this SubscriptionResource subscriptionResource, AzureLocation location) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableOracleDatabaseSubscriptionResource(subscriptionResource).GetAutonomousDbVersions(location); + } + + /// + /// Get a AutonomousDbVersion + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDbVersions/{autonomousdbversionsname} + /// + /// + /// Operation Id + /// AutonomousDbVersion_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Azure region. + /// AutonomousDbVersion name. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static async Task> GetAutonomousDbVersionAsync(this SubscriptionResource subscriptionResource, AzureLocation location, string autonomousdbversionsname, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return await GetMockableOracleDatabaseSubscriptionResource(subscriptionResource).GetAutonomousDbVersionAsync(location, autonomousdbversionsname, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a AutonomousDbVersion + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDbVersions/{autonomousdbversionsname} + /// + /// + /// Operation Id + /// AutonomousDbVersion_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Azure region. + /// AutonomousDbVersion name. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static Response GetAutonomousDbVersion(this SubscriptionResource subscriptionResource, AzureLocation location, string autonomousdbversionsname, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableOracleDatabaseSubscriptionResource(subscriptionResource).GetAutonomousDbVersion(location, autonomousdbversionsname, cancellationToken); + } + + /// + /// List CloudExadataInfrastructure resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/cloudExadataInfrastructures + /// + /// + /// Operation Id + /// CloudExadataInfrastructure_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// is null. + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetCloudExadataInfrastructuresAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableOracleDatabaseSubscriptionResource(subscriptionResource).GetCloudExadataInfrastructuresAsync(cancellationToken); + } + + /// + /// List CloudExadataInfrastructure resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/cloudExadataInfrastructures + /// + /// + /// Operation Id + /// CloudExadataInfrastructure_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// is null. + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetCloudExadataInfrastructures(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableOracleDatabaseSubscriptionResource(subscriptionResource).GetCloudExadataInfrastructures(cancellationToken); + } + + /// + /// List CloudVmCluster resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/cloudVmClusters + /// + /// + /// Operation Id + /// CloudVmCluster_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// is null. + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetCloudVmClustersAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableOracleDatabaseSubscriptionResource(subscriptionResource).GetCloudVmClustersAsync(cancellationToken); + } + + /// + /// List CloudVmCluster resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/cloudVmClusters + /// + /// + /// Operation Id + /// CloudVmCluster_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// is null. + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetCloudVmClusters(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableOracleDatabaseSubscriptionResource(subscriptionResource).GetCloudVmClusters(cancellationToken); + } + + /// + /// List AutonomousDatabase resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/autonomousDatabases + /// + /// + /// Operation Id + /// AutonomousDatabase_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// is null. + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetAutonomousDatabasesAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableOracleDatabaseSubscriptionResource(subscriptionResource).GetAutonomousDatabasesAsync(cancellationToken); + } + + /// + /// List AutonomousDatabase resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/autonomousDatabases + /// + /// + /// Operation Id + /// AutonomousDatabase_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// is null. + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetAutonomousDatabases(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableOracleDatabaseSubscriptionResource(subscriptionResource).GetAutonomousDatabases(cancellationToken); + } + + /// + /// List ExadbVmCluster resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/exadbVmClusters + /// + /// + /// Operation Id + /// ExadbVmCluster_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// is null. + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetExadbVmClustersAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableOracleDatabaseSubscriptionResource(subscriptionResource).GetExadbVmClustersAsync(cancellationToken); + } + + /// + /// List ExadbVmCluster resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/exadbVmClusters + /// + /// + /// Operation Id + /// ExadbVmCluster_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// is null. + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetExadbVmClusters(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableOracleDatabaseSubscriptionResource(subscriptionResource).GetExadbVmClusters(cancellationToken); + } + + /// + /// List ExascaleDbStorageVault resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/exascaleDbStorageVaults + /// + /// + /// Operation Id + /// ExascaleDbStorageVault_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// is null. + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetExascaleDbStorageVaultsAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableOracleDatabaseSubscriptionResource(subscriptionResource).GetExascaleDbStorageVaultsAsync(cancellationToken); + } + + /// + /// List ExascaleDbStorageVault resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/exascaleDbStorageVaults + /// + /// + /// Operation Id + /// ExascaleDbStorageVault_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// is null. + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetExascaleDbStorageVaults(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableOracleDatabaseSubscriptionResource(subscriptionResource).GetExascaleDbStorageVaults(cancellationToken); + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/FlexComponentCollection.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/FlexComponentCollection.cs new file mode 100644 index 000000000000..8607b6552c92 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/FlexComponentCollection.cs @@ -0,0 +1,402 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.OracleDatabase.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.OracleDatabase +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetFlexComponents method from an instance of . + /// + public partial class FlexComponentCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _flexComponentClientDiagnostics; + private readonly FlexComponentsRestOperations _flexComponentRestClient; + private readonly AzureLocation _location; + + /// Initializes a new instance of the class for mocking. + protected FlexComponentCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + /// The name of the Azure region. + internal FlexComponentCollection(ArmClient client, ResourceIdentifier id, AzureLocation location) : base(client, id) + { + _location = location; + _flexComponentClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.OracleDatabase", FlexComponentResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(FlexComponentResource.ResourceType, out string flexComponentApiVersion); + _flexComponentRestClient = new FlexComponentsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, flexComponentApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != SubscriptionResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, SubscriptionResource.ResourceType), nameof(id)); + } + + /// + /// Get a FlexComponent + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/flexComponents/{flexComponentName} + /// + /// + /// Operation Id + /// FlexComponent_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the FlexComponent. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string flexComponentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(flexComponentName, nameof(flexComponentName)); + + using var scope = _flexComponentClientDiagnostics.CreateScope("FlexComponentCollection.Get"); + scope.Start(); + try + { + var response = await _flexComponentRestClient.GetAsync(Id.SubscriptionId, new AzureLocation(_location), flexComponentName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new FlexComponentResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a FlexComponent + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/flexComponents/{flexComponentName} + /// + /// + /// Operation Id + /// FlexComponent_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the FlexComponent. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string flexComponentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(flexComponentName, nameof(flexComponentName)); + + using var scope = _flexComponentClientDiagnostics.CreateScope("FlexComponentCollection.Get"); + scope.Start(); + try + { + var response = _flexComponentRestClient.Get(Id.SubscriptionId, new AzureLocation(_location), flexComponentName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new FlexComponentResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List FlexComponent resources by SubscriptionLocationResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/flexComponents + /// + /// + /// Operation Id + /// FlexComponent_ListByParent + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// If provided, filters the results for the given shape. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(SystemShape? shape = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _flexComponentRestClient.CreateListByParentRequest(Id.SubscriptionId, new AzureLocation(_location), shape); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _flexComponentRestClient.CreateListByParentNextPageRequest(nextLink, Id.SubscriptionId, new AzureLocation(_location), shape); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new FlexComponentResource(Client, FlexComponentData.DeserializeFlexComponentData(e)), _flexComponentClientDiagnostics, Pipeline, "FlexComponentCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List FlexComponent resources by SubscriptionLocationResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/flexComponents + /// + /// + /// Operation Id + /// FlexComponent_ListByParent + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// If provided, filters the results for the given shape. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(SystemShape? shape = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _flexComponentRestClient.CreateListByParentRequest(Id.SubscriptionId, new AzureLocation(_location), shape); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _flexComponentRestClient.CreateListByParentNextPageRequest(nextLink, Id.SubscriptionId, new AzureLocation(_location), shape); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new FlexComponentResource(Client, FlexComponentData.DeserializeFlexComponentData(e)), _flexComponentClientDiagnostics, Pipeline, "FlexComponentCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/flexComponents/{flexComponentName} + /// + /// + /// Operation Id + /// FlexComponent_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the FlexComponent. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string flexComponentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(flexComponentName, nameof(flexComponentName)); + + using var scope = _flexComponentClientDiagnostics.CreateScope("FlexComponentCollection.Exists"); + scope.Start(); + try + { + var response = await _flexComponentRestClient.GetAsync(Id.SubscriptionId, new AzureLocation(_location), flexComponentName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/flexComponents/{flexComponentName} + /// + /// + /// Operation Id + /// FlexComponent_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the FlexComponent. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string flexComponentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(flexComponentName, nameof(flexComponentName)); + + using var scope = _flexComponentClientDiagnostics.CreateScope("FlexComponentCollection.Exists"); + scope.Start(); + try + { + var response = _flexComponentRestClient.Get(Id.SubscriptionId, new AzureLocation(_location), flexComponentName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/flexComponents/{flexComponentName} + /// + /// + /// Operation Id + /// FlexComponent_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the FlexComponent. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string flexComponentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(flexComponentName, nameof(flexComponentName)); + + using var scope = _flexComponentClientDiagnostics.CreateScope("FlexComponentCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _flexComponentRestClient.GetAsync(Id.SubscriptionId, new AzureLocation(_location), flexComponentName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new FlexComponentResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/flexComponents/{flexComponentName} + /// + /// + /// Operation Id + /// FlexComponent_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the FlexComponent. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string flexComponentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(flexComponentName, nameof(flexComponentName)); + + using var scope = _flexComponentClientDiagnostics.CreateScope("FlexComponentCollection.GetIfExists"); + scope.Start(); + try + { + var response = _flexComponentRestClient.Get(Id.SubscriptionId, new AzureLocation(_location), flexComponentName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new FlexComponentResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/FlexComponentData.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/FlexComponentData.Serialization.cs new file mode 100644 index 000000000000..b42120201bca --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/FlexComponentData.Serialization.cs @@ -0,0 +1,155 @@ +// 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.Models; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + public partial class FlexComponentData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FlexComponentData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + FlexComponentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FlexComponentData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFlexComponentData(document.RootElement, options); + } + + internal static FlexComponentData DeserializeFlexComponentData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + FlexComponentProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = FlexComponentProperties.DeserializeFlexComponentProperties(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FlexComponentData( + id, + name, + type, + systemData, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(FlexComponentData)} does not support writing '{options.Format}' format."); + } + } + + FlexComponentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeFlexComponentData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FlexComponentData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/FlexComponentData.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/FlexComponentData.cs new file mode 100644 index 000000000000..a6be89fcc167 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/FlexComponentData.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + /// + /// A class representing the FlexComponent data model. + /// FlexComponent Resource Definition + /// + public partial class FlexComponentData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal FlexComponentData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal FlexComponentData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, FlexComponentProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public FlexComponentProperties Properties { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/FlexComponentResource.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/FlexComponentResource.Serialization.cs new file mode 100644 index 000000000000..0b685efb8e37 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/FlexComponentResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.OracleDatabase +{ + public partial class FlexComponentResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + FlexComponentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + FlexComponentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/FlexComponentResource.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/FlexComponentResource.cs new file mode 100644 index 000000000000..46f297ae1a02 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/FlexComponentResource.cs @@ -0,0 +1,171 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.OracleDatabase +{ + /// + /// A Class representing a FlexComponent along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetFlexComponentResource method. + /// Otherwise you can get one from its parent resource using the GetFlexComponent method. + /// + public partial class FlexComponentResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The location. + /// The flexComponentName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, AzureLocation location, string flexComponentName) + { + var resourceId = $"/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/flexComponents/{flexComponentName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _flexComponentClientDiagnostics; + private readonly FlexComponentsRestOperations _flexComponentRestClient; + private readonly FlexComponentData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Oracle.Database/locations/flexComponents"; + + /// Initializes a new instance of the class for mocking. + protected FlexComponentResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal FlexComponentResource(ArmClient client, FlexComponentData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal FlexComponentResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _flexComponentClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.OracleDatabase", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string flexComponentApiVersion); + _flexComponentRestClient = new FlexComponentsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, flexComponentApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual FlexComponentData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get a FlexComponent + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/flexComponents/{flexComponentName} + /// + /// + /// Operation Id + /// FlexComponent_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _flexComponentClientDiagnostics.CreateScope("FlexComponentResource.Get"); + scope.Start(); + try + { + var response = await _flexComponentRestClient.GetAsync(Id.SubscriptionId, new AzureLocation(Id.Parent.Name), Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new FlexComponentResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a FlexComponent + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/flexComponents/{flexComponentName} + /// + /// + /// Operation Id + /// FlexComponent_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _flexComponentClientDiagnostics.CreateScope("FlexComponentResource.Get"); + scope.Start(); + try + { + var response = _flexComponentRestClient.Get(Id.SubscriptionId, new AzureLocation(Id.Parent.Name), Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new FlexComponentResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/GiMinorVersionCollection.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/GiMinorVersionCollection.cs new file mode 100644 index 000000000000..9bde4b39f80d --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/GiMinorVersionCollection.cs @@ -0,0 +1,400 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetGiMinorVersions method from an instance of . + /// + public partial class GiMinorVersionCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _giMinorVersionClientDiagnostics; + private readonly GiMinorVersionsRestOperations _giMinorVersionRestClient; + + /// Initializes a new instance of the class for mocking. + protected GiMinorVersionCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal GiMinorVersionCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _giMinorVersionClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.OracleDatabase", GiMinorVersionResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(GiMinorVersionResource.ResourceType, out string giMinorVersionApiVersion); + _giMinorVersionRestClient = new GiMinorVersionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, giMinorVersionApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != GiVersionResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, GiVersionResource.ResourceType), nameof(id)); + } + + /// + /// Get a GiMinorVersion + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/giVersions/{giversionname}/giMinorVersions/{giMinorVersionName} + /// + /// + /// Operation Id + /// GiMinorVersion_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the GiMinorVersion. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string giMinorVersionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(giMinorVersionName, nameof(giMinorVersionName)); + + using var scope = _giMinorVersionClientDiagnostics.CreateScope("GiMinorVersionCollection.Get"); + scope.Start(); + try + { + var response = await _giMinorVersionRestClient.GetAsync(Id.SubscriptionId, new AzureLocation(Id.Parent.Name), Id.Name, giMinorVersionName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new GiMinorVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a GiMinorVersion + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/giVersions/{giversionname}/giMinorVersions/{giMinorVersionName} + /// + /// + /// Operation Id + /// GiMinorVersion_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the GiMinorVersion. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string giMinorVersionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(giMinorVersionName, nameof(giMinorVersionName)); + + using var scope = _giMinorVersionClientDiagnostics.CreateScope("GiMinorVersionCollection.Get"); + scope.Start(); + try + { + var response = _giMinorVersionRestClient.Get(Id.SubscriptionId, new AzureLocation(Id.Parent.Name), Id.Name, giMinorVersionName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new GiMinorVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List GiMinorVersion resources by GiVersion + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/giVersions/{giversionname}/giMinorVersions + /// + /// + /// Operation Id + /// GiMinorVersion_ListByParent + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// If provided, filters the results to the set of database versions which are supported for the given shape family. + /// Filters the result for the given Azure Availability Zone. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(ShapeFamily? shapeFamily = null, string zone = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _giMinorVersionRestClient.CreateListByParentRequest(Id.SubscriptionId, new AzureLocation(Id.Parent.Name), Id.Name, shapeFamily, zone); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _giMinorVersionRestClient.CreateListByParentNextPageRequest(nextLink, Id.SubscriptionId, new AzureLocation(Id.Parent.Name), Id.Name, shapeFamily, zone); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new GiMinorVersionResource(Client, GiMinorVersionData.DeserializeGiMinorVersionData(e)), _giMinorVersionClientDiagnostics, Pipeline, "GiMinorVersionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List GiMinorVersion resources by GiVersion + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/giVersions/{giversionname}/giMinorVersions + /// + /// + /// Operation Id + /// GiMinorVersion_ListByParent + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// If provided, filters the results to the set of database versions which are supported for the given shape family. + /// Filters the result for the given Azure Availability Zone. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(ShapeFamily? shapeFamily = null, string zone = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _giMinorVersionRestClient.CreateListByParentRequest(Id.SubscriptionId, new AzureLocation(Id.Parent.Name), Id.Name, shapeFamily, zone); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _giMinorVersionRestClient.CreateListByParentNextPageRequest(nextLink, Id.SubscriptionId, new AzureLocation(Id.Parent.Name), Id.Name, shapeFamily, zone); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new GiMinorVersionResource(Client, GiMinorVersionData.DeserializeGiMinorVersionData(e)), _giMinorVersionClientDiagnostics, Pipeline, "GiMinorVersionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/giVersions/{giversionname}/giMinorVersions/{giMinorVersionName} + /// + /// + /// Operation Id + /// GiMinorVersion_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the GiMinorVersion. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string giMinorVersionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(giMinorVersionName, nameof(giMinorVersionName)); + + using var scope = _giMinorVersionClientDiagnostics.CreateScope("GiMinorVersionCollection.Exists"); + scope.Start(); + try + { + var response = await _giMinorVersionRestClient.GetAsync(Id.SubscriptionId, new AzureLocation(Id.Parent.Name), Id.Name, giMinorVersionName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/giVersions/{giversionname}/giMinorVersions/{giMinorVersionName} + /// + /// + /// Operation Id + /// GiMinorVersion_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the GiMinorVersion. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string giMinorVersionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(giMinorVersionName, nameof(giMinorVersionName)); + + using var scope = _giMinorVersionClientDiagnostics.CreateScope("GiMinorVersionCollection.Exists"); + scope.Start(); + try + { + var response = _giMinorVersionRestClient.Get(Id.SubscriptionId, new AzureLocation(Id.Parent.Name), Id.Name, giMinorVersionName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/giVersions/{giversionname}/giMinorVersions/{giMinorVersionName} + /// + /// + /// Operation Id + /// GiMinorVersion_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the GiMinorVersion. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string giMinorVersionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(giMinorVersionName, nameof(giMinorVersionName)); + + using var scope = _giMinorVersionClientDiagnostics.CreateScope("GiMinorVersionCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _giMinorVersionRestClient.GetAsync(Id.SubscriptionId, new AzureLocation(Id.Parent.Name), Id.Name, giMinorVersionName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new GiMinorVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/giVersions/{giversionname}/giMinorVersions/{giMinorVersionName} + /// + /// + /// Operation Id + /// GiMinorVersion_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the GiMinorVersion. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string giMinorVersionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(giMinorVersionName, nameof(giMinorVersionName)); + + using var scope = _giMinorVersionClientDiagnostics.CreateScope("GiMinorVersionCollection.GetIfExists"); + scope.Start(); + try + { + var response = _giMinorVersionRestClient.Get(Id.SubscriptionId, new AzureLocation(Id.Parent.Name), Id.Name, giMinorVersionName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new GiMinorVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/GiMinorVersionData.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/GiMinorVersionData.Serialization.cs new file mode 100644 index 000000000000..e073f2df5ad7 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/GiMinorVersionData.Serialization.cs @@ -0,0 +1,155 @@ +// 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.Models; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + public partial class GiMinorVersionData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(GiMinorVersionData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + GiMinorVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(GiMinorVersionData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeGiMinorVersionData(document.RootElement, options); + } + + internal static GiMinorVersionData DeserializeGiMinorVersionData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + GiMinorVersionProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = GiMinorVersionProperties.DeserializeGiMinorVersionProperties(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new GiMinorVersionData( + id, + name, + type, + systemData, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(GiMinorVersionData)} does not support writing '{options.Format}' format."); + } + } + + GiMinorVersionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeGiMinorVersionData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(GiMinorVersionData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/GiMinorVersionData.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/GiMinorVersionData.cs new file mode 100644 index 000000000000..1caa30341880 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/GiMinorVersionData.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + /// + /// A class representing the GiMinorVersion data model. + /// The Oracle Grid Infrastructure (GI) minor version resource definition. + /// + public partial class GiMinorVersionData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal GiMinorVersionData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal GiMinorVersionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, GiMinorVersionProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public GiMinorVersionProperties Properties { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/GiMinorVersionResource.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/GiMinorVersionResource.Serialization.cs new file mode 100644 index 000000000000..61d5861b314c --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/GiMinorVersionResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.OracleDatabase +{ + public partial class GiMinorVersionResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + GiMinorVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + GiMinorVersionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/GiMinorVersionResource.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/GiMinorVersionResource.cs new file mode 100644 index 000000000000..974f94d1908a --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/GiMinorVersionResource.cs @@ -0,0 +1,171 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.OracleDatabase +{ + /// + /// A Class representing a GiMinorVersion along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetGiMinorVersionResource method. + /// Otherwise you can get one from its parent resource using the GetGiMinorVersion method. + /// + public partial class GiMinorVersionResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The location. + /// The giversionname. + /// The giMinorVersionName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, AzureLocation location, string giversionname, string giMinorVersionName) + { + var resourceId = $"/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/giVersions/{giversionname}/giMinorVersions/{giMinorVersionName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _giMinorVersionClientDiagnostics; + private readonly GiMinorVersionsRestOperations _giMinorVersionRestClient; + private readonly GiMinorVersionData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Oracle.Database/locations/giVersions/giMinorVersions"; + + /// Initializes a new instance of the class for mocking. + protected GiMinorVersionResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal GiMinorVersionResource(ArmClient client, GiMinorVersionData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal GiMinorVersionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _giMinorVersionClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.OracleDatabase", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string giMinorVersionApiVersion); + _giMinorVersionRestClient = new GiMinorVersionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, giMinorVersionApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual GiMinorVersionData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get a GiMinorVersion + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/giVersions/{giversionname}/giMinorVersions/{giMinorVersionName} + /// + /// + /// Operation Id + /// GiMinorVersion_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _giMinorVersionClientDiagnostics.CreateScope("GiMinorVersionResource.Get"); + scope.Start(); + try + { + var response = await _giMinorVersionRestClient.GetAsync(Id.SubscriptionId, new AzureLocation(Id.Parent.Parent.Name), Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new GiMinorVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a GiMinorVersion + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/giVersions/{giversionname}/giMinorVersions/{giMinorVersionName} + /// + /// + /// Operation Id + /// GiMinorVersion_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _giMinorVersionClientDiagnostics.CreateScope("GiMinorVersionResource.Get"); + scope.Start(); + try + { + var response = _giMinorVersionRestClient.Get(Id.SubscriptionId, new AzureLocation(Id.Parent.Parent.Name), Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new GiMinorVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/GiVersionCollection.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/GiVersionCollection.cs new file mode 100644 index 000000000000..02e8f64ba2a9 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/GiVersionCollection.cs @@ -0,0 +1,404 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.OracleDatabase.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.OracleDatabase +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetGiVersions method from an instance of . + /// + public partial class GiVersionCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _giVersionClientDiagnostics; + private readonly GiVersionsRestOperations _giVersionRestClient; + private readonly AzureLocation _location; + + /// Initializes a new instance of the class for mocking. + protected GiVersionCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + /// The name of the Azure region. + internal GiVersionCollection(ArmClient client, ResourceIdentifier id, AzureLocation location) : base(client, id) + { + _location = location; + _giVersionClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.OracleDatabase", GiVersionResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(GiVersionResource.ResourceType, out string giVersionApiVersion); + _giVersionRestClient = new GiVersionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, giVersionApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != SubscriptionResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, SubscriptionResource.ResourceType), nameof(id)); + } + + /// + /// Get a GiVersion + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/giVersions/{giversionname} + /// + /// + /// Operation Id + /// GiVersion_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// GiVersion name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string giversionname, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(giversionname, nameof(giversionname)); + + using var scope = _giVersionClientDiagnostics.CreateScope("GiVersionCollection.Get"); + scope.Start(); + try + { + var response = await _giVersionRestClient.GetAsync(Id.SubscriptionId, new AzureLocation(_location), giversionname, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new GiVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a GiVersion + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/giVersions/{giversionname} + /// + /// + /// Operation Id + /// GiVersion_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// GiVersion name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string giversionname, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(giversionname, nameof(giversionname)); + + using var scope = _giVersionClientDiagnostics.CreateScope("GiVersionCollection.Get"); + scope.Start(); + try + { + var response = _giVersionRestClient.Get(Id.SubscriptionId, new AzureLocation(_location), giversionname, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new GiVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List GiVersion resources by SubscriptionLocationResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/giVersions + /// + /// + /// Operation Id + /// GiVersion_ListByLocation + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// If provided, filters the results for the given shape. + /// Filters the result for the given Azure Availability Zone. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(SystemShape? shape = null, string zone = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _giVersionRestClient.CreateListByLocationRequest(Id.SubscriptionId, new AzureLocation(_location), shape, zone); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _giVersionRestClient.CreateListByLocationNextPageRequest(nextLink, Id.SubscriptionId, new AzureLocation(_location), shape, zone); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new GiVersionResource(Client, GiVersionData.DeserializeGiVersionData(e)), _giVersionClientDiagnostics, Pipeline, "GiVersionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List GiVersion resources by SubscriptionLocationResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/giVersions + /// + /// + /// Operation Id + /// GiVersion_ListByLocation + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// If provided, filters the results for the given shape. + /// Filters the result for the given Azure Availability Zone. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(SystemShape? shape = null, string zone = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _giVersionRestClient.CreateListByLocationRequest(Id.SubscriptionId, new AzureLocation(_location), shape, zone); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _giVersionRestClient.CreateListByLocationNextPageRequest(nextLink, Id.SubscriptionId, new AzureLocation(_location), shape, zone); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new GiVersionResource(Client, GiVersionData.DeserializeGiVersionData(e)), _giVersionClientDiagnostics, Pipeline, "GiVersionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/giVersions/{giversionname} + /// + /// + /// Operation Id + /// GiVersion_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// GiVersion name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string giversionname, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(giversionname, nameof(giversionname)); + + using var scope = _giVersionClientDiagnostics.CreateScope("GiVersionCollection.Exists"); + scope.Start(); + try + { + var response = await _giVersionRestClient.GetAsync(Id.SubscriptionId, new AzureLocation(_location), giversionname, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/giVersions/{giversionname} + /// + /// + /// Operation Id + /// GiVersion_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// GiVersion name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string giversionname, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(giversionname, nameof(giversionname)); + + using var scope = _giVersionClientDiagnostics.CreateScope("GiVersionCollection.Exists"); + scope.Start(); + try + { + var response = _giVersionRestClient.Get(Id.SubscriptionId, new AzureLocation(_location), giversionname, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/giVersions/{giversionname} + /// + /// + /// Operation Id + /// GiVersion_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// GiVersion name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string giversionname, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(giversionname, nameof(giversionname)); + + using var scope = _giVersionClientDiagnostics.CreateScope("GiVersionCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _giVersionRestClient.GetAsync(Id.SubscriptionId, new AzureLocation(_location), giversionname, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new GiVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/giVersions/{giversionname} + /// + /// + /// Operation Id + /// GiVersion_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// GiVersion name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string giversionname, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(giversionname, nameof(giversionname)); + + using var scope = _giVersionClientDiagnostics.CreateScope("GiVersionCollection.GetIfExists"); + scope.Start(); + try + { + var response = _giVersionRestClient.Get(Id.SubscriptionId, new AzureLocation(_location), giversionname, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new GiVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/GiVersionData.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/GiVersionData.Serialization.cs new file mode 100644 index 000000000000..3b3171915497 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/GiVersionData.Serialization.cs @@ -0,0 +1,155 @@ +// 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.Models; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + public partial class GiVersionData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(GiVersionData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + GiVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(GiVersionData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeGiVersionData(document.RootElement, options); + } + + internal static GiVersionData DeserializeGiVersionData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + GiVersionProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = GiVersionProperties.DeserializeGiVersionProperties(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new GiVersionData( + id, + name, + type, + systemData, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(GiVersionData)} does not support writing '{options.Format}' format."); + } + } + + GiVersionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeGiVersionData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(GiVersionData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/GiVersionData.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/GiVersionData.cs new file mode 100644 index 000000000000..cf82603ba982 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/GiVersionData.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + /// + /// A class representing the GiVersion data model. + /// GiVersion resource definition + /// + public partial class GiVersionData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal GiVersionData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal GiVersionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, GiVersionProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + internal GiVersionProperties Properties { get; } + /// A valid Oracle Grid Infrastructure (GI) software version. + public string GiVersion + { + get => Properties?.Version; + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/GiVersionResource.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/GiVersionResource.Serialization.cs new file mode 100644 index 000000000000..5b613f3e6863 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/GiVersionResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.OracleDatabase +{ + public partial class GiVersionResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + GiVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + GiVersionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/GiVersionResource.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/GiVersionResource.cs new file mode 100644 index 000000000000..aa5d89b11af4 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/GiVersionResource.cs @@ -0,0 +1,240 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.OracleDatabase +{ + /// + /// A Class representing a GiVersion along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetGiVersionResource method. + /// Otherwise you can get one from its parent resource using the GetGiVersion method. + /// + public partial class GiVersionResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The location. + /// The giversionname. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, AzureLocation location, string giversionname) + { + var resourceId = $"/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/giVersions/{giversionname}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _giVersionClientDiagnostics; + private readonly GiVersionsRestOperations _giVersionRestClient; + private readonly GiVersionData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Oracle.Database/locations/giVersions"; + + /// Initializes a new instance of the class for mocking. + protected GiVersionResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal GiVersionResource(ArmClient client, GiVersionData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal GiVersionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _giVersionClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.OracleDatabase", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string giVersionApiVersion); + _giVersionRestClient = new GiVersionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, giVersionApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual GiVersionData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// Gets a collection of GiMinorVersionResources in the GiVersion. + /// An object representing collection of GiMinorVersionResources and their operations over a GiMinorVersionResource. + public virtual GiMinorVersionCollection GetGiMinorVersions() + { + return GetCachedClient(client => new GiMinorVersionCollection(client, Id)); + } + + /// + /// Get a GiMinorVersion + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/giVersions/{giversionname}/giMinorVersions/{giMinorVersionName} + /// + /// + /// Operation Id + /// GiMinorVersion_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the GiMinorVersion. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetGiMinorVersionAsync(string giMinorVersionName, CancellationToken cancellationToken = default) + { + return await GetGiMinorVersions().GetAsync(giMinorVersionName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a GiMinorVersion + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/giVersions/{giversionname}/giMinorVersions/{giMinorVersionName} + /// + /// + /// Operation Id + /// GiMinorVersion_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the GiMinorVersion. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetGiMinorVersion(string giMinorVersionName, CancellationToken cancellationToken = default) + { + return GetGiMinorVersions().Get(giMinorVersionName, cancellationToken); + } + + /// + /// Get a GiVersion + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/giVersions/{giversionname} + /// + /// + /// Operation Id + /// GiVersion_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _giVersionClientDiagnostics.CreateScope("GiVersionResource.Get"); + scope.Start(); + try + { + var response = await _giVersionRestClient.GetAsync(Id.SubscriptionId, new AzureLocation(Id.Parent.Name), Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new GiVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a GiVersion + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/giVersions/{giversionname} + /// + /// + /// Operation Id + /// GiVersion_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _giVersionClientDiagnostics.CreateScope("GiVersionResource.Get"); + scope.Start(); + try + { + var response = _giVersionRestClient.Get(Id.SubscriptionId, new AzureLocation(Id.Parent.Name), Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new GiVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Internal/Argument.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Internal/Argument.cs new file mode 100644 index 000000000000..0f2aed863812 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Internal/Argument.cs @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Azure.ResourceManager.OracleDatabase +{ + internal static class Argument + { + public static void AssertNotNull(T value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + } + + public static void AssertNotNull(T? value, string name) + where T : struct + { + if (!value.HasValue) + { + throw new ArgumentNullException(name); + } + } + + public static void AssertNotNullOrEmpty(IEnumerable value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + if (value is ICollection collectionOfT && collectionOfT.Count == 0) + { + throw new ArgumentException("Value cannot be an empty collection.", name); + } + if (value is ICollection collection && collection.Count == 0) + { + throw new ArgumentException("Value cannot be an empty collection.", name); + } + using IEnumerator e = value.GetEnumerator(); + if (!e.MoveNext()) + { + throw new ArgumentException("Value cannot be an empty collection.", name); + } + } + + public static void AssertNotNullOrEmpty(string value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + if (value.Length == 0) + { + throw new ArgumentException("Value cannot be an empty string.", name); + } + } + + public static void AssertNotNullOrWhiteSpace(string value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + if (string.IsNullOrWhiteSpace(value)) + { + throw new ArgumentException("Value cannot be empty or contain only white-space characters.", name); + } + } + + public static void AssertNotDefault(ref T value, string name) + where T : struct, IEquatable + { + if (value.Equals(default)) + { + throw new ArgumentException("Value cannot be empty.", name); + } + } + + public static void AssertInRange(T value, T minimum, T maximum, string name) + where T : notnull, IComparable + { + if (minimum.CompareTo(value) > 0) + { + throw new ArgumentOutOfRangeException(name, "Value is less than the minimum allowed."); + } + if (maximum.CompareTo(value) < 0) + { + throw new ArgumentOutOfRangeException(name, "Value is greater than the maximum allowed."); + } + } + + public static void AssertEnumDefined(Type enumType, object value, string name) + { + if (!Enum.IsDefined(enumType, value)) + { + throw new ArgumentException($"Value not defined for {enumType.FullName}.", name); + } + } + + public static T CheckNotNull(T value, string name) + where T : class + { + AssertNotNull(value, name); + return value; + } + + public static string CheckNotNullOrEmpty(string value, string name) + { + AssertNotNullOrEmpty(value, name); + return value; + } + + public static void AssertNull(T value, string name, string message = null) + { + if (value != null) + { + throw new ArgumentException(message ?? "Value must be null.", name); + } + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Internal/ChangeTrackingDictionary.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Internal/ChangeTrackingDictionary.cs new file mode 100644 index 000000000000..260c1b7f6873 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Internal/ChangeTrackingDictionary.cs @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Azure.ResourceManager.OracleDatabase +{ + internal class ChangeTrackingDictionary : IDictionary, IReadOnlyDictionary where TKey : notnull + { + private IDictionary _innerDictionary; + + public ChangeTrackingDictionary() + { + } + + public ChangeTrackingDictionary(IDictionary dictionary) + { + if (dictionary == null) + { + return; + } + _innerDictionary = new Dictionary(dictionary); + } + + public ChangeTrackingDictionary(IReadOnlyDictionary dictionary) + { + if (dictionary == null) + { + return; + } + _innerDictionary = new Dictionary(); + foreach (var pair in dictionary) + { + _innerDictionary.Add(pair); + } + } + + public bool IsUndefined => _innerDictionary == null; + + public int Count => IsUndefined ? 0 : EnsureDictionary().Count; + + public bool IsReadOnly => IsUndefined ? false : EnsureDictionary().IsReadOnly; + + public ICollection Keys => IsUndefined ? Array.Empty() : EnsureDictionary().Keys; + + public ICollection Values => IsUndefined ? Array.Empty() : EnsureDictionary().Values; + + public TValue this[TKey key] + { + get + { + if (IsUndefined) + { + throw new KeyNotFoundException(nameof(key)); + } + return EnsureDictionary()[key]; + } + set + { + EnsureDictionary()[key] = value; + } + } + + IEnumerable IReadOnlyDictionary.Keys => Keys; + + IEnumerable IReadOnlyDictionary.Values => Values; + + public IEnumerator> GetEnumerator() + { + if (IsUndefined) + { + IEnumerator> enumerateEmpty() + { + yield break; + } + return enumerateEmpty(); + } + return EnsureDictionary().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + public void Add(KeyValuePair item) + { + EnsureDictionary().Add(item); + } + + public void Clear() + { + EnsureDictionary().Clear(); + } + + public bool Contains(KeyValuePair item) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().Contains(item); + } + + public void CopyTo(KeyValuePair[] array, int index) + { + if (IsUndefined) + { + return; + } + EnsureDictionary().CopyTo(array, index); + } + + public bool Remove(KeyValuePair item) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().Remove(item); + } + + public void Add(TKey key, TValue value) + { + EnsureDictionary().Add(key, value); + } + + public bool ContainsKey(TKey key) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().ContainsKey(key); + } + + public bool Remove(TKey key) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().Remove(key); + } + + public bool TryGetValue(TKey key, out TValue value) + { + if (IsUndefined) + { + value = default; + return false; + } + return EnsureDictionary().TryGetValue(key, out value); + } + + public IDictionary EnsureDictionary() + { + return _innerDictionary ??= new Dictionary(); + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Internal/ChangeTrackingList.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Internal/ChangeTrackingList.cs new file mode 100644 index 000000000000..e58de7b0afd8 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Internal/ChangeTrackingList.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.OracleDatabase +{ + internal class ChangeTrackingList : IList, IReadOnlyList + { + private IList _innerList; + + public ChangeTrackingList() + { + } + + public ChangeTrackingList(IList innerList) + { + if (innerList != null) + { + _innerList = innerList; + } + } + + public ChangeTrackingList(IReadOnlyList innerList) + { + if (innerList != null) + { + _innerList = innerList.ToList(); + } + } + + public bool IsUndefined => _innerList == null; + + public int Count => IsUndefined ? 0 : EnsureList().Count; + + public bool IsReadOnly => IsUndefined ? false : EnsureList().IsReadOnly; + + public T this[int index] + { + get + { + if (IsUndefined) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + return EnsureList()[index]; + } + set + { + if (IsUndefined) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + EnsureList()[index] = value; + } + } + + public void Reset() + { + _innerList = null; + } + + public IEnumerator GetEnumerator() + { + if (IsUndefined) + { + IEnumerator enumerateEmpty() + { + yield break; + } + return enumerateEmpty(); + } + return EnsureList().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + public void Add(T item) + { + EnsureList().Add(item); + } + + public void Clear() + { + EnsureList().Clear(); + } + + public bool Contains(T item) + { + if (IsUndefined) + { + return false; + } + return EnsureList().Contains(item); + } + + public void CopyTo(T[] array, int arrayIndex) + { + if (IsUndefined) + { + return; + } + EnsureList().CopyTo(array, arrayIndex); + } + + public bool Remove(T item) + { + if (IsUndefined) + { + return false; + } + return EnsureList().Remove(item); + } + + public int IndexOf(T item) + { + if (IsUndefined) + { + return -1; + } + return EnsureList().IndexOf(item); + } + + public void Insert(int index, T item) + { + EnsureList().Insert(index, item); + } + + public void RemoveAt(int index) + { + if (IsUndefined) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + EnsureList().RemoveAt(index); + } + + public IList EnsureList() + { + return _innerList ??= new List(); + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Internal/ModelSerializationExtensions.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Internal/ModelSerializationExtensions.cs new file mode 100644 index 000000000000..bd1fcaa5efdf --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Internal/ModelSerializationExtensions.cs @@ -0,0 +1,399 @@ +// 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.Diagnostics; +using System.Globalization; +using System.Text.Json; +using System.Xml; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase +{ + internal static class ModelSerializationExtensions + { + internal static readonly JsonDocumentOptions JsonDocumentOptions = new JsonDocumentOptions { MaxDepth = 256 }; + internal static readonly ModelReaderWriterOptions WireOptions = new ModelReaderWriterOptions("W"); + + public static object GetObject(this JsonElement element) + { + switch (element.ValueKind) + { + case JsonValueKind.String: + return element.GetString(); + case JsonValueKind.Number: + if (element.TryGetInt32(out int intValue)) + { + return intValue; + } + if (element.TryGetInt64(out long longValue)) + { + return longValue; + } + return element.GetDouble(); + case JsonValueKind.True: + return true; + case JsonValueKind.False: + return false; + case JsonValueKind.Undefined: + case JsonValueKind.Null: + return null; + case JsonValueKind.Object: + var dictionary = new Dictionary(); + foreach (var jsonProperty in element.EnumerateObject()) + { + dictionary.Add(jsonProperty.Name, jsonProperty.Value.GetObject()); + } + return dictionary; + case JsonValueKind.Array: + var list = new List(); + foreach (var item in element.EnumerateArray()) + { + list.Add(item.GetObject()); + } + return list.ToArray(); + default: + throw new NotSupportedException($"Not supported value kind {element.ValueKind}"); + } + } + + public static byte[] GetBytesFromBase64(this JsonElement element, string format) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + + return format switch + { + "U" => TypeFormatters.FromBase64UrlString(element.GetRequiredString()), + "D" => element.GetBytesFromBase64(), + _ => throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)) + }; + } + + public static DateTimeOffset GetDateTimeOffset(this JsonElement element, string format) => format switch + { + "U" when element.ValueKind == JsonValueKind.Number => DateTimeOffset.FromUnixTimeSeconds(element.GetInt64()), + _ => TypeFormatters.ParseDateTimeOffset(element.GetString(), format) + }; + + public static TimeSpan GetTimeSpan(this JsonElement element, string format) => TypeFormatters.ParseTimeSpan(element.GetString(), format); + + public static char GetChar(this JsonElement element) + { + if (element.ValueKind == JsonValueKind.String) + { + var text = element.GetString(); + if (text == null || text.Length != 1) + { + throw new NotSupportedException($"Cannot convert \"{text}\" to a char"); + } + return text[0]; + } + else + { + throw new NotSupportedException($"Cannot convert {element.ValueKind} to a char"); + } + } + + [Conditional("DEBUG")] + public static void ThrowNonNullablePropertyIsNull(this JsonProperty property) + { + throw new JsonException($"A property '{property.Name}' defined as non-nullable but received as null from the service. This exception only happens in DEBUG builds of the library and would be ignored in the release build"); + } + + public static string GetRequiredString(this JsonElement element) + { + var value = element.GetString(); + if (value == null) + { + throw new InvalidOperationException($"The requested operation requires an element of type 'String', but the target element has type '{element.ValueKind}'."); + } + return value; + } + + public static void WriteStringValue(this Utf8JsonWriter writer, DateTimeOffset value, string format) + { + writer.WriteStringValue(TypeFormatters.ToString(value, format)); + } + + public static void WriteStringValue(this Utf8JsonWriter writer, DateTime value, string format) + { + writer.WriteStringValue(TypeFormatters.ToString(value, format)); + } + + public static void WriteStringValue(this Utf8JsonWriter writer, TimeSpan value, string format) + { + writer.WriteStringValue(TypeFormatters.ToString(value, format)); + } + + public static void WriteStringValue(this Utf8JsonWriter writer, char value) + { + writer.WriteStringValue(value.ToString(CultureInfo.InvariantCulture)); + } + + public static void WriteBase64StringValue(this Utf8JsonWriter writer, byte[] value, string format) + { + if (value == null) + { + writer.WriteNullValue(); + return; + } + switch (format) + { + case "U": + writer.WriteStringValue(TypeFormatters.ToBase64UrlString(value)); + break; + case "D": + writer.WriteBase64StringValue(value); + break; + default: + throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)); + } + } + + public static void WriteNumberValue(this Utf8JsonWriter writer, DateTimeOffset value, string format) + { + if (format != "U") + { + throw new ArgumentOutOfRangeException(nameof(format), "Only 'U' format is supported when writing a DateTimeOffset as a Number."); + } + writer.WriteNumberValue(value.ToUnixTimeSeconds()); + } + + public static void WriteObjectValue(this Utf8JsonWriter writer, T value, ModelReaderWriterOptions options = null) + { + switch (value) + { + case null: + writer.WriteNullValue(); + break; + case IJsonModel jsonModel: + jsonModel.Write(writer, options ?? WireOptions); + break; + case IUtf8JsonSerializable serializable: + serializable.Write(writer); + break; + case byte[] bytes: + writer.WriteBase64StringValue(bytes); + break; + case BinaryData bytes0: + writer.WriteBase64StringValue(bytes0); + break; + case JsonElement json: + json.WriteTo(writer); + break; + case int i: + writer.WriteNumberValue(i); + break; + case decimal d: + writer.WriteNumberValue(d); + break; + case double d0: + if (double.IsNaN(d0)) + { + writer.WriteStringValue("NaN"); + } + else + { + writer.WriteNumberValue(d0); + } + break; + case float f: + writer.WriteNumberValue(f); + break; + case long l: + writer.WriteNumberValue(l); + break; + case string s: + writer.WriteStringValue(s); + break; + case bool b: + writer.WriteBooleanValue(b); + break; + case Guid g: + writer.WriteStringValue(g); + break; + case DateTimeOffset dateTimeOffset: + writer.WriteStringValue(dateTimeOffset, "O"); + break; + case DateTime dateTime: + writer.WriteStringValue(dateTime, "O"); + break; + case IEnumerable> enumerable: + writer.WriteStartObject(); + foreach (var pair in enumerable) + { + writer.WritePropertyName(pair.Key); + writer.WriteObjectValue(pair.Value, options); + } + writer.WriteEndObject(); + break; + case IEnumerable objectEnumerable: + writer.WriteStartArray(); + foreach (var item in objectEnumerable) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + break; + case TimeSpan timeSpan: + writer.WriteStringValue(timeSpan, "P"); + break; + default: + throw new NotSupportedException($"Not supported type {value.GetType()}"); + } + } + + public static void WriteObjectValue(this Utf8JsonWriter writer, object value, ModelReaderWriterOptions options = null) + { + writer.WriteObjectValue(value, options); + } + + internal static class TypeFormatters + { + private const string RoundtripZFormat = "yyyy-MM-ddTHH:mm:ss.fffffffZ"; + public const string DefaultNumberFormat = "G"; + + public static string ToString(bool value) => value ? "true" : "false"; + + public static string ToString(DateTime value, string format) => value.Kind switch + { + DateTimeKind.Utc => ToString((DateTimeOffset)value, format), + _ => throw new NotSupportedException($"DateTime {value} has a Kind of {value.Kind}. Azure SDK requires it to be UTC. You can call DateTime.SpecifyKind to change Kind property value to DateTimeKind.Utc.") + }; + + public static string ToString(DateTimeOffset value, string format) => format switch + { + "D" => value.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture), + "U" => value.ToUnixTimeSeconds().ToString(CultureInfo.InvariantCulture), + "O" => value.ToUniversalTime().ToString(RoundtripZFormat, CultureInfo.InvariantCulture), + "o" => value.ToUniversalTime().ToString(RoundtripZFormat, CultureInfo.InvariantCulture), + "R" => value.ToString("r", CultureInfo.InvariantCulture), + _ => value.ToString(format, CultureInfo.InvariantCulture) + }; + + public static string ToString(TimeSpan value, string format) => format switch + { + "P" => XmlConvert.ToString(value), + _ => value.ToString(format, CultureInfo.InvariantCulture) + }; + + public static string ToString(byte[] value, string format) => format switch + { + "U" => ToBase64UrlString(value), + "D" => Convert.ToBase64String(value), + _ => throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)) + }; + + public static string ToBase64UrlString(byte[] value) + { + int numWholeOrPartialInputBlocks = checked(value.Length + 2) / 3; + int size = checked(numWholeOrPartialInputBlocks * 4); + char[] output = new char[size]; + + int numBase64Chars = Convert.ToBase64CharArray(value, 0, value.Length, output, 0); + + int i = 0; + for (; i < numBase64Chars; i++) + { + char ch = output[i]; + if (ch == '+') + { + output[i] = '-'; + } + else + { + if (ch == '/') + { + output[i] = '_'; + } + else + { + if (ch == '=') + { + break; + } + } + } + } + + return new string(output, 0, i); + } + + public static byte[] FromBase64UrlString(string value) + { + int paddingCharsToAdd = (value.Length % 4) switch + { + 0 => 0, + 2 => 2, + 3 => 1, + _ => throw new InvalidOperationException("Malformed input") + }; + char[] output = new char[(value.Length + paddingCharsToAdd)]; + int i = 0; + for (; i < value.Length; i++) + { + char ch = value[i]; + if (ch == '-') + { + output[i] = '+'; + } + else + { + if (ch == '_') + { + output[i] = '/'; + } + else + { + output[i] = ch; + } + } + } + + for (; i < output.Length; i++) + { + output[i] = '='; + } + + return Convert.FromBase64CharArray(output, 0, output.Length); + } + + public static DateTimeOffset ParseDateTimeOffset(string value, string format) => format switch + { + "U" => DateTimeOffset.FromUnixTimeSeconds(long.Parse(value, CultureInfo.InvariantCulture)), + _ => DateTimeOffset.Parse(value, CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal) + }; + + public static TimeSpan ParseTimeSpan(string value, string format) => format switch + { + "P" => XmlConvert.ToTimeSpan(value), + _ => TimeSpan.ParseExact(value, format, CultureInfo.InvariantCulture) + }; + + public static string ConvertToString(object value, string format = null) => value switch + { + null => "null", + string s => s, + bool b => ToString(b), + int or float or double or long or decimal => ((IFormattable)value).ToString(DefaultNumberFormat, CultureInfo.InvariantCulture), + byte[] b0 when format != null => ToString(b0, format), + IEnumerable s0 => string.Join(",", s0), + DateTimeOffset dateTime when format != null => ToString(dateTime, format), + TimeSpan timeSpan when format != null => ToString(timeSpan, format), + TimeSpan timeSpan0 => XmlConvert.ToString(timeSpan0), + Guid guid => guid.ToString(), + BinaryData binaryData => ConvertToString(binaryData.ToArray(), format), + _ => value.ToString() + }; + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Internal/Optional.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Internal/Optional.cs new file mode 100644 index 000000000000..25502e5b927a --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Internal/Optional.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.ResourceManager.OracleDatabase +{ + internal static class Optional + { + public static bool IsCollectionDefined(IEnumerable collection) + { + return !(collection is ChangeTrackingList changeTrackingList && changeTrackingList.IsUndefined); + } + + public static bool IsCollectionDefined(IDictionary collection) + { + return !(collection is ChangeTrackingDictionary changeTrackingDictionary && changeTrackingDictionary.IsUndefined); + } + + public static bool IsCollectionDefined(IReadOnlyDictionary collection) + { + return !(collection is ChangeTrackingDictionary changeTrackingDictionary && changeTrackingDictionary.IsUndefined); + } + + public static bool IsDefined(T? value) + where T : struct + { + return value.HasValue; + } + + public static bool IsDefined(object value) + { + return value != null; + } + + public static bool IsDefined(JsonElement value) + { + return value.ValueKind != JsonValueKind.Undefined; + } + + public static bool IsDefined(string value) + { + return value != null; + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Internal/Utf8JsonRequestContent.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Internal/Utf8JsonRequestContent.cs new file mode 100644 index 000000000000..2cc0e4da3a2e --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Internal/Utf8JsonRequestContent.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.IO; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase +{ + internal class Utf8JsonRequestContent : RequestContent + { + private readonly MemoryStream _stream; + private readonly RequestContent _content; + + public Utf8JsonRequestContent() + { + _stream = new MemoryStream(); + _content = Create(_stream); + JsonWriter = new Utf8JsonWriter(_stream); + } + + public Utf8JsonWriter JsonWriter { get; } + + public override async Task WriteToAsync(Stream stream, CancellationToken cancellationToken = default) + { + await JsonWriter.FlushAsync().ConfigureAwait(false); + await _content.WriteToAsync(stream, cancellationToken).ConfigureAwait(false); + } + + public override void WriteTo(Stream stream, CancellationToken cancellationToken = default) + { + JsonWriter.Flush(); + _content.WriteTo(stream, cancellationToken); + } + + public override bool TryComputeLength(out long length) + { + length = JsonWriter.BytesCommitted + JsonWriter.BytesPending; + return true; + } + + public override void Dispose() + { + JsonWriter.Dispose(); + _content.Dispose(); + _stream.Dispose(); + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/LongRunningOperation/AutonomousDatabaseBackupOperationSource.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/LongRunningOperation/AutonomousDatabaseBackupOperationSource.cs new file mode 100644 index 000000000000..2eec34c29edd --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/LongRunningOperation/AutonomousDatabaseBackupOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase +{ + internal class AutonomousDatabaseBackupOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal AutonomousDatabaseBackupOperationSource(ArmClient client) + { + _client = client; + } + + AutonomousDatabaseBackupResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return new AutonomousDatabaseBackupResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return await Task.FromResult(new AutonomousDatabaseBackupResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/LongRunningOperation/AutonomousDatabaseOperationSource.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/LongRunningOperation/AutonomousDatabaseOperationSource.cs new file mode 100644 index 000000000000..942957d268d5 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/LongRunningOperation/AutonomousDatabaseOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase +{ + internal class AutonomousDatabaseOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal AutonomousDatabaseOperationSource(ArmClient client) + { + _client = client; + } + + AutonomousDatabaseResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return new AutonomousDatabaseResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return await Task.FromResult(new AutonomousDatabaseResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/LongRunningOperation/CloudExadataInfrastructureOperationSource.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/LongRunningOperation/CloudExadataInfrastructureOperationSource.cs new file mode 100644 index 000000000000..a00b2445a0a4 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/LongRunningOperation/CloudExadataInfrastructureOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase +{ + internal class CloudExadataInfrastructureOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal CloudExadataInfrastructureOperationSource(ArmClient client) + { + _client = client; + } + + CloudExadataInfrastructureResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return new CloudExadataInfrastructureResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return await Task.FromResult(new CloudExadataInfrastructureResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/LongRunningOperation/CloudVmClusterOperationSource.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/LongRunningOperation/CloudVmClusterOperationSource.cs new file mode 100644 index 000000000000..e230fc680a1d --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/LongRunningOperation/CloudVmClusterOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase +{ + internal class CloudVmClusterOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal CloudVmClusterOperationSource(ArmClient client) + { + _client = client; + } + + CloudVmClusterResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return new CloudVmClusterResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return await Task.FromResult(new CloudVmClusterResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/LongRunningOperation/DbActionResponseOperationSource.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/LongRunningOperation/DbActionResponseOperationSource.cs new file mode 100644 index 000000000000..944a1f2b5d2f --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/LongRunningOperation/DbActionResponseOperationSource.cs @@ -0,0 +1,30 @@ +// 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.Core; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + internal class DbActionResponseOperationSource : IOperationSource + { + DbActionResponse IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + return DbActionResponse.DeserializeDbActionResponse(document.RootElement); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + return DbActionResponse.DeserializeDbActionResponse(document.RootElement); + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/LongRunningOperation/DbNodeOperationSource.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/LongRunningOperation/DbNodeOperationSource.cs new file mode 100644 index 000000000000..5dbc4f68d8e0 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/LongRunningOperation/DbNodeOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase +{ + internal class DbNodeOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal DbNodeOperationSource(ArmClient client) + { + _client = client; + } + + DbNodeResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return new DbNodeResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return await Task.FromResult(new DbNodeResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/LongRunningOperation/ExadbVmClusterOperationSource.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/LongRunningOperation/ExadbVmClusterOperationSource.cs new file mode 100644 index 000000000000..b0970ce98262 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/LongRunningOperation/ExadbVmClusterOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase +{ + internal class ExadbVmClusterOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal ExadbVmClusterOperationSource(ArmClient client) + { + _client = client; + } + + ExadbVmClusterResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return new ExadbVmClusterResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return await Task.FromResult(new ExadbVmClusterResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/LongRunningOperation/ExascaleDbStorageVaultOperationSource.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/LongRunningOperation/ExascaleDbStorageVaultOperationSource.cs new file mode 100644 index 000000000000..f3b81b509d41 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/LongRunningOperation/ExascaleDbStorageVaultOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase +{ + internal class ExascaleDbStorageVaultOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal ExascaleDbStorageVaultOperationSource(ArmClient client) + { + _client = client; + } + + ExascaleDbStorageVaultResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return new ExascaleDbStorageVaultResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return await Task.FromResult(new ExascaleDbStorageVaultResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/LongRunningOperation/OracleDatabaseArmOperation.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/LongRunningOperation/OracleDatabaseArmOperation.cs new file mode 100644 index 000000000000..7da3e72ee1fd --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/LongRunningOperation/OracleDatabaseArmOperation.cs @@ -0,0 +1,94 @@ +// 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.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.OracleDatabase +{ +#pragma warning disable SA1649 // File name should match first type name + internal class OracleDatabaseArmOperation : ArmOperation +#pragma warning restore SA1649 // File name should match first type name + { + private readonly OperationInternal _operation; + private readonly RehydrationToken? _completeRehydrationToken; + private readonly NextLinkOperationImplementation _nextLinkOperation; + private readonly string _operationId; + + /// Initializes a new instance of OracleDatabaseArmOperation for mocking. + protected OracleDatabaseArmOperation() + { + } + + internal OracleDatabaseArmOperation(Response response, RehydrationToken? rehydrationToken = null) + { + _operation = OperationInternal.Succeeded(response); + _completeRehydrationToken = rehydrationToken; + _operationId = GetOperationId(rehydrationToken); + } + + internal OracleDatabaseArmOperation(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response, OperationFinalStateVia finalStateVia, bool skipApiVersionOverride = false, string apiVersionOverrideValue = null) + { + var nextLinkOperation = NextLinkOperationImplementation.Create(pipeline, request.Method, request.Uri.ToUri(), response, finalStateVia, skipApiVersionOverride, apiVersionOverrideValue); + if (nextLinkOperation is NextLinkOperationImplementation nextLinkOperationValue) + { + _nextLinkOperation = nextLinkOperationValue; + _operationId = _nextLinkOperation.OperationId; + } + else + { + _completeRehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(request.Method, request.Uri.ToUri(), response, finalStateVia); + _operationId = GetOperationId(_completeRehydrationToken); + } + _operation = new OperationInternal(nextLinkOperation, clientDiagnostics, response, "OracleDatabaseArmOperation", fallbackStrategy: new SequentialDelayStrategy()); + } + + private string GetOperationId(RehydrationToken? rehydrationToken) + { + if (rehydrationToken is null) + { + return null; + } + var lroDetails = ModelReaderWriter.Write(rehydrationToken, ModelReaderWriterOptions.Json).ToObjectFromJson>(); + return lroDetails["id"]; + } + /// + public override string Id => _operationId ?? NextLinkOperationImplementation.NotSet; + + /// + public override RehydrationToken? GetRehydrationToken() => _nextLinkOperation?.GetRehydrationToken() ?? _completeRehydrationToken; + + /// + public override bool HasCompleted => _operation.HasCompleted; + + /// + public override Response GetRawResponse() => _operation.RawResponse; + + /// + public override Response UpdateStatus(CancellationToken cancellationToken = default) => _operation.UpdateStatus(cancellationToken); + + /// + public override ValueTask UpdateStatusAsync(CancellationToken cancellationToken = default) => _operation.UpdateStatusAsync(cancellationToken); + + /// + public override Response WaitForCompletionResponse(CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponse(cancellationToken); + + /// + public override Response WaitForCompletionResponse(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponse(pollingInterval, cancellationToken); + + /// + public override ValueTask WaitForCompletionResponseAsync(CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponseAsync(cancellationToken); + + /// + public override ValueTask WaitForCompletionResponseAsync(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponseAsync(pollingInterval, cancellationToken); + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/LongRunningOperation/OracleDatabaseArmOperationOfT.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/LongRunningOperation/OracleDatabaseArmOperationOfT.cs new file mode 100644 index 000000000000..018393a6b241 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/LongRunningOperation/OracleDatabaseArmOperationOfT.cs @@ -0,0 +1,100 @@ +// 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.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.OracleDatabase +{ +#pragma warning disable SA1649 // File name should match first type name + internal class OracleDatabaseArmOperation : ArmOperation +#pragma warning restore SA1649 // File name should match first type name + { + private readonly OperationInternal _operation; + private readonly RehydrationToken? _completeRehydrationToken; + private readonly NextLinkOperationImplementation _nextLinkOperation; + private readonly string _operationId; + + /// Initializes a new instance of OracleDatabaseArmOperation for mocking. + protected OracleDatabaseArmOperation() + { + } + + internal OracleDatabaseArmOperation(Response response, RehydrationToken? rehydrationToken = null) + { + _operation = OperationInternal.Succeeded(response.GetRawResponse(), response.Value); + _completeRehydrationToken = rehydrationToken; + _operationId = GetOperationId(rehydrationToken); + } + + internal OracleDatabaseArmOperation(IOperationSource source, ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response, OperationFinalStateVia finalStateVia, bool skipApiVersionOverride = false, string apiVersionOverrideValue = null) + { + var nextLinkOperation = NextLinkOperationImplementation.Create(pipeline, request.Method, request.Uri.ToUri(), response, finalStateVia, skipApiVersionOverride, apiVersionOverrideValue); + if (nextLinkOperation is NextLinkOperationImplementation nextLinkOperationValue) + { + _nextLinkOperation = nextLinkOperationValue; + _operationId = _nextLinkOperation.OperationId; + } + else + { + _completeRehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(request.Method, request.Uri.ToUri(), response, finalStateVia); + _operationId = GetOperationId(_completeRehydrationToken); + } + _operation = new OperationInternal(NextLinkOperationImplementation.Create(source, nextLinkOperation), clientDiagnostics, response, "OracleDatabaseArmOperation", fallbackStrategy: new SequentialDelayStrategy()); + } + + private string GetOperationId(RehydrationToken? rehydrationToken) + { + if (rehydrationToken is null) + { + return null; + } + var lroDetails = ModelReaderWriter.Write(rehydrationToken, ModelReaderWriterOptions.Json).ToObjectFromJson>(); + return lroDetails["id"]; + } + /// + public override string Id => _operationId ?? NextLinkOperationImplementation.NotSet; + + /// + public override RehydrationToken? GetRehydrationToken() => _nextLinkOperation?.GetRehydrationToken() ?? _completeRehydrationToken; + + /// + public override T Value => _operation.Value; + + /// + public override bool HasValue => _operation.HasValue; + + /// + public override bool HasCompleted => _operation.HasCompleted; + + /// + public override Response GetRawResponse() => _operation.RawResponse; + + /// + public override Response UpdateStatus(CancellationToken cancellationToken = default) => _operation.UpdateStatus(cancellationToken); + + /// + public override ValueTask UpdateStatusAsync(CancellationToken cancellationToken = default) => _operation.UpdateStatusAsync(cancellationToken); + + /// + public override Response WaitForCompletion(CancellationToken cancellationToken = default) => _operation.WaitForCompletion(cancellationToken); + + /// + public override Response WaitForCompletion(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletion(pollingInterval, cancellationToken); + + /// + public override ValueTask> WaitForCompletionAsync(CancellationToken cancellationToken = default) => _operation.WaitForCompletionAsync(cancellationToken); + + /// + public override ValueTask> WaitForCompletionAsync(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionAsync(pollingInterval, cancellationToken); + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/LongRunningOperation/OracleSubscriptionOperationSource.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/LongRunningOperation/OracleSubscriptionOperationSource.cs new file mode 100644 index 000000000000..2e78e263d083 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/LongRunningOperation/OracleSubscriptionOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase +{ + internal class OracleSubscriptionOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal OracleSubscriptionOperationSource(ArmClient client) + { + _client = client; + } + + OracleSubscriptionResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return new OracleSubscriptionResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return await Task.FromResult(new OracleSubscriptionResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/LongRunningOperation/VirtualNetworkAddressOperationSource.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/LongRunningOperation/VirtualNetworkAddressOperationSource.cs new file mode 100644 index 000000000000..f5340e9aea58 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/LongRunningOperation/VirtualNetworkAddressOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase +{ + internal class VirtualNetworkAddressOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal VirtualNetworkAddressOperationSource(ArmClient client) + { + _client = client; + } + + VirtualNetworkAddressResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return new VirtualNetworkAddressResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return await Task.FromResult(new VirtualNetworkAddressResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AddRemoveDbNode.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AddRemoveDbNode.Serialization.cs new file mode 100644 index 000000000000..1a880500442b --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AddRemoveDbNode.Serialization.cs @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + public partial class AddRemoveDbNode : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AddRemoveDbNode)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("dbServers"u8); + writer.WriteStartArray(); + foreach (var item in DbServers) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AddRemoveDbNode IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AddRemoveDbNode)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAddRemoveDbNode(document.RootElement, options); + } + + internal static AddRemoveDbNode DeserializeAddRemoveDbNode(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList dbServers = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("dbServers"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + dbServers = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AddRemoveDbNode(dbServers, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AddRemoveDbNode)} does not support writing '{options.Format}' format."); + } + } + + AddRemoveDbNode IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAddRemoveDbNode(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AddRemoveDbNode)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AddRemoveDbNode.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AddRemoveDbNode.cs new file mode 100644 index 000000000000..8d1583c39ca2 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AddRemoveDbNode.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// Add/Remove (Virtual Machine) DbNode model. + public partial class AddRemoveDbNode + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Db servers ocids. + /// is null. + public AddRemoveDbNode(IEnumerable dbServers) + { + Argument.AssertNotNull(dbServers, nameof(dbServers)); + + DbServers = dbServers.ToList(); + } + + /// Initializes a new instance of . + /// Db servers ocids. + /// Keeps track of any properties unknown to the library. + internal AddRemoveDbNode(IList dbServers, IDictionary serializedAdditionalRawData) + { + DbServers = dbServers; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AddRemoveDbNode() + { + } + + /// Db servers ocids. + public IList DbServers { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AddSubscriptionOperationState.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AddSubscriptionOperationState.cs new file mode 100644 index 000000000000..29255876381b --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AddSubscriptionOperationState.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// Add Subscription Operation state enum. + public readonly partial struct AddSubscriptionOperationState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AddSubscriptionOperationState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SucceededValue = "Succeeded"; + private const string UpdatingValue = "Updating"; + private const string FailedValue = "Failed"; + + /// Succeeded - State when Add Subscription operation succeeded. + public static AddSubscriptionOperationState Succeeded { get; } = new AddSubscriptionOperationState(SucceededValue); + /// Updating - State when Add Subscription operation is being Updated. + public static AddSubscriptionOperationState Updating { get; } = new AddSubscriptionOperationState(UpdatingValue); + /// Failed - State when Add Subscription operation failed. + public static AddSubscriptionOperationState Failed { get; } = new AddSubscriptionOperationState(FailedValue); + /// Determines if two values are the same. + public static bool operator ==(AddSubscriptionOperationState left, AddSubscriptionOperationState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AddSubscriptionOperationState left, AddSubscriptionOperationState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AddSubscriptionOperationState(string value) => new AddSubscriptionOperationState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AddSubscriptionOperationState other && Equals(other); + /// + public bool Equals(AddSubscriptionOperationState 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/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AllConnectionStringType.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AllConnectionStringType.Serialization.cs new file mode 100644 index 000000000000..10bfc9b5fe2d --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AllConnectionStringType.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + public partial class AllConnectionStringType : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AllConnectionStringType)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(High)) + { + writer.WritePropertyName("high"u8); + writer.WriteStringValue(High); + } + if (Optional.IsDefined(Low)) + { + writer.WritePropertyName("low"u8); + writer.WriteStringValue(Low); + } + if (Optional.IsDefined(Medium)) + { + writer.WritePropertyName("medium"u8); + writer.WriteStringValue(Medium); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AllConnectionStringType IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AllConnectionStringType)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAllConnectionStringType(document.RootElement, options); + } + + internal static AllConnectionStringType DeserializeAllConnectionStringType(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string high = default; + string low = default; + string medium = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("high"u8)) + { + high = property.Value.GetString(); + continue; + } + if (property.NameEquals("low"u8)) + { + low = property.Value.GetString(); + continue; + } + if (property.NameEquals("medium"u8)) + { + medium = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AllConnectionStringType(high, low, medium, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AllConnectionStringType)} does not support writing '{options.Format}' format."); + } + } + + AllConnectionStringType IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAllConnectionStringType(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AllConnectionStringType)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AllConnectionStringType.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AllConnectionStringType.cs new file mode 100644 index 000000000000..226dd8dd507b --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AllConnectionStringType.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// The connection string profile to allow clients to group, filter and select connection string values based on structured metadata. + public partial class AllConnectionStringType + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal AllConnectionStringType() + { + } + + /// Initializes a new instance of . + /// The High database service provides the highest level of resources to each SQL statement resulting in the highest performance, but supports the fewest number of concurrent SQL statements. + /// The Low database service provides the least level of resources to each SQL statement, but supports the most number of concurrent SQL statements. + /// The Medium database service provides a lower level of resources to each SQL statement potentially resulting a lower level of performance, but supports more concurrent SQL statements. + /// Keeps track of any properties unknown to the library. + internal AllConnectionStringType(string high, string low, string medium, IDictionary serializedAdditionalRawData) + { + High = high; + Low = low; + Medium = medium; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The High database service provides the highest level of resources to each SQL statement resulting in the highest performance, but supports the fewest number of concurrent SQL statements. + public string High { get; } + /// The Low database service provides the least level of resources to each SQL statement, but supports the most number of concurrent SQL statements. + public string Low { get; } + /// The Medium database service provides a lower level of resources to each SQL statement potentially resulting a lower level of performance, but supports more concurrent SQL statements. + public string Medium { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ApexDetailsType.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ApexDetailsType.Serialization.cs new file mode 100644 index 000000000000..76216f19eddb --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ApexDetailsType.Serialization.cs @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + public partial class ApexDetailsType : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ApexDetailsType)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(ApexVersion)) + { + writer.WritePropertyName("apexVersion"u8); + writer.WriteStringValue(ApexVersion); + } + if (Optional.IsDefined(OrdsVersion)) + { + writer.WritePropertyName("ordsVersion"u8); + writer.WriteStringValue(OrdsVersion); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ApexDetailsType IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ApexDetailsType)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeApexDetailsType(document.RootElement, options); + } + + internal static ApexDetailsType DeserializeApexDetailsType(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string apexVersion = default; + string ordsVersion = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("apexVersion"u8)) + { + apexVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("ordsVersion"u8)) + { + ordsVersion = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ApexDetailsType(apexVersion, ordsVersion, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ApexDetailsType)} does not support writing '{options.Format}' format."); + } + } + + ApexDetailsType IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApexDetailsType(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ApexDetailsType)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ApexDetailsType.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ApexDetailsType.cs new file mode 100644 index 000000000000..9e346ee2f4d5 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ApexDetailsType.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// Information about Oracle APEX Application Development. + public partial class ApexDetailsType + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal ApexDetailsType() + { + } + + /// Initializes a new instance of . + /// The Oracle APEX Application Development version. + /// The Oracle REST Data Services (ORDS) version. + /// Keeps track of any properties unknown to the library. + internal ApexDetailsType(string apexVersion, string ordsVersion, IDictionary serializedAdditionalRawData) + { + ApexVersion = apexVersion; + OrdsVersion = ordsVersion; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The Oracle APEX Application Development version. + public string ApexVersion { get; } + /// The Oracle REST Data Services (ORDS) version. + public string OrdsVersion { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseBackupLifecycleState.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseBackupLifecycleState.cs new file mode 100644 index 000000000000..2c0eacc9663d --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseBackupLifecycleState.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// Autonomous database backup lifecycle state enum. + public readonly partial struct AutonomousDatabaseBackupLifecycleState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AutonomousDatabaseBackupLifecycleState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string CreatingValue = "Creating"; + private const string ActiveValue = "Active"; + private const string DeletingValue = "Deleting"; + private const string FailedValue = "Failed"; + private const string UpdatingValue = "Updating"; + + /// AutonomousDatabase backup is creating. + public static AutonomousDatabaseBackupLifecycleState Creating { get; } = new AutonomousDatabaseBackupLifecycleState(CreatingValue); + /// AutonomousDatabase backup is active. + public static AutonomousDatabaseBackupLifecycleState Active { get; } = new AutonomousDatabaseBackupLifecycleState(ActiveValue); + /// AutonomousDatabase backup is deleting. + public static AutonomousDatabaseBackupLifecycleState Deleting { get; } = new AutonomousDatabaseBackupLifecycleState(DeletingValue); + /// AutonomousDatabase backup is failed. + public static AutonomousDatabaseBackupLifecycleState Failed { get; } = new AutonomousDatabaseBackupLifecycleState(FailedValue); + /// AutonomousDatabase backup is updating. + public static AutonomousDatabaseBackupLifecycleState Updating { get; } = new AutonomousDatabaseBackupLifecycleState(UpdatingValue); + /// Determines if two values are the same. + public static bool operator ==(AutonomousDatabaseBackupLifecycleState left, AutonomousDatabaseBackupLifecycleState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AutonomousDatabaseBackupLifecycleState left, AutonomousDatabaseBackupLifecycleState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AutonomousDatabaseBackupLifecycleState(string value) => new AutonomousDatabaseBackupLifecycleState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AutonomousDatabaseBackupLifecycleState other && Equals(other); + /// + public bool Equals(AutonomousDatabaseBackupLifecycleState 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/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseBackupListResult.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseBackupListResult.Serialization.cs new file mode 100644 index 000000000000..749c1ff80590 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseBackupListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + internal partial class AutonomousDatabaseBackupListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AutonomousDatabaseBackupListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AutonomousDatabaseBackupListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AutonomousDatabaseBackupListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAutonomousDatabaseBackupListResult(document.RootElement, options); + } + + internal static AutonomousDatabaseBackupListResult DeserializeAutonomousDatabaseBackupListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AutonomousDatabaseBackupData.DeserializeAutonomousDatabaseBackupData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AutonomousDatabaseBackupListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AutonomousDatabaseBackupListResult)} does not support writing '{options.Format}' format."); + } + } + + AutonomousDatabaseBackupListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAutonomousDatabaseBackupListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AutonomousDatabaseBackupListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseBackupListResult.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseBackupListResult.cs new file mode 100644 index 000000000000..547c14aa9da2 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseBackupListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// The response of a AutonomousDatabaseBackup list operation. + internal partial class AutonomousDatabaseBackupListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The AutonomousDatabaseBackup items on this page. + /// is null. + internal AutonomousDatabaseBackupListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The AutonomousDatabaseBackup items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal AutonomousDatabaseBackupListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AutonomousDatabaseBackupListResult() + { + } + + /// The AutonomousDatabaseBackup items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseBackupProperties.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseBackupProperties.Serialization.cs new file mode 100644 index 000000000000..5343f788f66e --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseBackupProperties.Serialization.cs @@ -0,0 +1,347 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + public partial class AutonomousDatabaseBackupProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AutonomousDatabaseBackupProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(AutonomousDatabaseOcid)) + { + writer.WritePropertyName("autonomousDatabaseOcid"u8); + writer.WriteStringValue(AutonomousDatabaseOcid); + } + if (options.Format != "W" && Optional.IsDefined(DatabaseSizeInTbs)) + { + writer.WritePropertyName("databaseSizeInTbs"u8); + writer.WriteNumberValue(DatabaseSizeInTbs.Value); + } + if (options.Format != "W" && Optional.IsDefined(DbVersion)) + { + writer.WritePropertyName("dbVersion"u8); + writer.WriteStringValue(DbVersion); + } + if (Optional.IsDefined(DisplayName)) + { + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + } + if (options.Format != "W" && Optional.IsDefined(Ocid)) + { + writer.WritePropertyName("ocid"u8); + writer.WriteStringValue(Ocid); + } + if (options.Format != "W" && Optional.IsDefined(IsAutomatic)) + { + writer.WritePropertyName("isAutomatic"u8); + writer.WriteBooleanValue(IsAutomatic.Value); + } + if (options.Format != "W" && Optional.IsDefined(IsRestorable)) + { + writer.WritePropertyName("isRestorable"u8); + writer.WriteBooleanValue(IsRestorable.Value); + } + if (options.Format != "W" && Optional.IsDefined(LifecycleDetails)) + { + writer.WritePropertyName("lifecycleDetails"u8); + writer.WriteStringValue(LifecycleDetails); + } + if (options.Format != "W" && Optional.IsDefined(LifecycleState)) + { + writer.WritePropertyName("lifecycleState"u8); + writer.WriteStringValue(LifecycleState.Value.ToString()); + } + if (Optional.IsDefined(RetentionPeriodInDays)) + { + writer.WritePropertyName("retentionPeriodInDays"u8); + writer.WriteNumberValue(RetentionPeriodInDays.Value); + } + if (options.Format != "W" && Optional.IsDefined(SizeInTbs)) + { + writer.WritePropertyName("sizeInTbs"u8); + writer.WriteNumberValue(SizeInTbs.Value); + } + if (options.Format != "W" && Optional.IsDefined(TimeAvailableTil)) + { + writer.WritePropertyName("timeAvailableTil"u8); + writer.WriteStringValue(TimeAvailableTil.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(TimeStarted)) + { + writer.WritePropertyName("timeStarted"u8); + writer.WriteStringValue(TimeStarted); + } + if (options.Format != "W" && Optional.IsDefined(TimeEnded)) + { + writer.WritePropertyName("timeEnded"u8); + writer.WriteStringValue(TimeEnded); + } + if (options.Format != "W" && Optional.IsDefined(BackupType)) + { + writer.WritePropertyName("backupType"u8); + writer.WriteStringValue(BackupType.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AutonomousDatabaseBackupProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AutonomousDatabaseBackupProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAutonomousDatabaseBackupProperties(document.RootElement, options); + } + + internal static AutonomousDatabaseBackupProperties DeserializeAutonomousDatabaseBackupProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string autonomousDatabaseOcid = default; + double? databaseSizeInTbs = default; + string dbVersion = default; + string displayName = default; + string ocid = default; + bool? isAutomatic = default; + bool? isRestorable = default; + string lifecycleDetails = default; + AutonomousDatabaseBackupLifecycleState? lifecycleState = default; + int? retentionPeriodInDays = default; + double? sizeInTbs = default; + DateTimeOffset? timeAvailableTil = default; + string timeStarted = default; + string timeEnded = default; + AutonomousDatabaseBackupType? backupType = default; + AzureResourceProvisioningState? provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("autonomousDatabaseOcid"u8)) + { + autonomousDatabaseOcid = property.Value.GetString(); + continue; + } + if (property.NameEquals("databaseSizeInTbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + databaseSizeInTbs = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("dbVersion"u8)) + { + dbVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("ocid"u8)) + { + ocid = property.Value.GetString(); + continue; + } + if (property.NameEquals("isAutomatic"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isAutomatic = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("isRestorable"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isRestorable = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("lifecycleDetails"u8)) + { + lifecycleDetails = property.Value.GetString(); + continue; + } + if (property.NameEquals("lifecycleState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lifecycleState = new AutonomousDatabaseBackupLifecycleState(property.Value.GetString()); + continue; + } + if (property.NameEquals("retentionPeriodInDays"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + retentionPeriodInDays = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("sizeInTbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sizeInTbs = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("timeAvailableTil"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeAvailableTil = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("timeStarted"u8)) + { + timeStarted = property.Value.GetString(); + continue; + } + if (property.NameEquals("timeEnded"u8)) + { + timeEnded = property.Value.GetString(); + continue; + } + if (property.NameEquals("backupType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + backupType = new AutonomousDatabaseBackupType(property.Value.GetString()); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new AzureResourceProvisioningState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AutonomousDatabaseBackupProperties( + autonomousDatabaseOcid, + databaseSizeInTbs, + dbVersion, + displayName, + ocid, + isAutomatic, + isRestorable, + lifecycleDetails, + lifecycleState, + retentionPeriodInDays, + sizeInTbs, + timeAvailableTil, + timeStarted, + timeEnded, + backupType, + provisioningState, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AutonomousDatabaseBackupProperties)} does not support writing '{options.Format}' format."); + } + } + + AutonomousDatabaseBackupProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAutonomousDatabaseBackupProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AutonomousDatabaseBackupProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseBackupProperties.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseBackupProperties.cs new file mode 100644 index 000000000000..62273feddba7 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseBackupProperties.cs @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// AutonomousDatabaseBackup resource model. + public partial class AutonomousDatabaseBackupProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AutonomousDatabaseBackupProperties() + { + } + + /// Initializes a new instance of . + /// The OCID of the Autonomous Database. + /// The size of the database in terabytes at the time the backup was taken. + /// A valid Oracle Database version for Autonomous Database. + /// The user-friendly name for the backup. The name does not have to be unique. + /// The OCID of the Autonomous Database backup. + /// Indicates whether the backup is user-initiated or automatic. + /// Indicates whether the backup can be used to restore the associated Autonomous Database. + /// Additional information about the current lifecycle state. + /// The current state of the backup. + /// Retention period, in days. + /// The backup size in terabytes (TB). + /// Timestamp until when the backup will be available. + /// The date and time the backup started. + /// The date and time the backup completed. + /// The type of backup. + /// Azure resource provisioning state. + /// Keeps track of any properties unknown to the library. + internal AutonomousDatabaseBackupProperties(string autonomousDatabaseOcid, double? databaseSizeInTbs, string dbVersion, string displayName, string ocid, bool? isAutomatic, bool? isRestorable, string lifecycleDetails, AutonomousDatabaseBackupLifecycleState? lifecycleState, int? retentionPeriodInDays, double? sizeInTbs, DateTimeOffset? timeAvailableTil, string timeStarted, string timeEnded, AutonomousDatabaseBackupType? backupType, AzureResourceProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) + { + AutonomousDatabaseOcid = autonomousDatabaseOcid; + DatabaseSizeInTbs = databaseSizeInTbs; + DbVersion = dbVersion; + DisplayName = displayName; + Ocid = ocid; + IsAutomatic = isAutomatic; + IsRestorable = isRestorable; + LifecycleDetails = lifecycleDetails; + LifecycleState = lifecycleState; + RetentionPeriodInDays = retentionPeriodInDays; + SizeInTbs = sizeInTbs; + TimeAvailableTil = timeAvailableTil; + TimeStarted = timeStarted; + TimeEnded = timeEnded; + BackupType = backupType; + ProvisioningState = provisioningState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The OCID of the Autonomous Database. + public string AutonomousDatabaseOcid { get; } + /// The size of the database in terabytes at the time the backup was taken. + public double? DatabaseSizeInTbs { get; } + /// A valid Oracle Database version for Autonomous Database. + public string DbVersion { get; } + /// The user-friendly name for the backup. The name does not have to be unique. + public string DisplayName { get; set; } + /// The OCID of the Autonomous Database backup. + public string Ocid { get; } + /// Indicates whether the backup is user-initiated or automatic. + public bool? IsAutomatic { get; } + /// Indicates whether the backup can be used to restore the associated Autonomous Database. + public bool? IsRestorable { get; } + /// Additional information about the current lifecycle state. + public string LifecycleDetails { get; } + /// The current state of the backup. + public AutonomousDatabaseBackupLifecycleState? LifecycleState { get; } + /// Retention period, in days. + public int? RetentionPeriodInDays { get; set; } + /// The backup size in terabytes (TB). + public double? SizeInTbs { get; } + /// Timestamp until when the backup will be available. + public DateTimeOffset? TimeAvailableTil { get; } + /// The date and time the backup started. + public string TimeStarted { get; } + /// The date and time the backup completed. + public string TimeEnded { get; } + /// The type of backup. + public AutonomousDatabaseBackupType? BackupType { get; } + /// Azure resource provisioning state. + public AzureResourceProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseBackupType.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseBackupType.cs new file mode 100644 index 000000000000..10cd36d2315e --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseBackupType.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// Autonomous database backup type enum. + public readonly partial struct AutonomousDatabaseBackupType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AutonomousDatabaseBackupType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string IncrementalValue = "Incremental"; + private const string FullValue = "Full"; + private const string LongTermValue = "LongTerm"; + + /// Incremental backup. + public static AutonomousDatabaseBackupType Incremental { get; } = new AutonomousDatabaseBackupType(IncrementalValue); + /// Full backup. + public static AutonomousDatabaseBackupType Full { get; } = new AutonomousDatabaseBackupType(FullValue); + /// LongTerm backup. + public static AutonomousDatabaseBackupType LongTerm { get; } = new AutonomousDatabaseBackupType(LongTermValue); + /// Determines if two values are the same. + public static bool operator ==(AutonomousDatabaseBackupType left, AutonomousDatabaseBackupType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AutonomousDatabaseBackupType left, AutonomousDatabaseBackupType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AutonomousDatabaseBackupType(string value) => new AutonomousDatabaseBackupType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AutonomousDatabaseBackupType other && Equals(other); + /// + public bool Equals(AutonomousDatabaseBackupType 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/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseBaseProperties.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseBaseProperties.Serialization.cs new file mode 100644 index 000000000000..39b61a4751ee --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseBaseProperties.Serialization.cs @@ -0,0 +1,530 @@ +// 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.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + [PersistableModelProxy(typeof(UnknownAutonomousDatabaseBaseProperties))] + public partial class AutonomousDatabaseBaseProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AutonomousDatabaseBaseProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(AdminPassword)) + { + writer.WritePropertyName("adminPassword"u8); + writer.WriteStringValue(AdminPassword); + } + writer.WritePropertyName("dataBaseType"u8); + writer.WriteStringValue(DataBaseType.ToString()); + if (Optional.IsDefined(AutonomousMaintenanceScheduleType)) + { + writer.WritePropertyName("autonomousMaintenanceScheduleType"u8); + writer.WriteStringValue(AutonomousMaintenanceScheduleType.Value.ToString()); + } + if (Optional.IsDefined(CharacterSet)) + { + writer.WritePropertyName("characterSet"u8); + writer.WriteStringValue(CharacterSet); + } + if (Optional.IsDefined(ComputeCount)) + { + writer.WritePropertyName("computeCount"u8); + writer.WriteNumberValue(ComputeCount.Value); + } + if (Optional.IsDefined(ComputeModel)) + { + writer.WritePropertyName("computeModel"u8); + writer.WriteStringValue(ComputeModel.Value.ToString()); + } + if (Optional.IsDefined(CpuCoreCount)) + { + writer.WritePropertyName("cpuCoreCount"u8); + writer.WriteNumberValue(CpuCoreCount.Value); + } + if (Optional.IsCollectionDefined(CustomerContacts)) + { + writer.WritePropertyName("customerContacts"u8); + writer.WriteStartArray(); + foreach (var item in CustomerContacts) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(DataStorageSizeInTbs)) + { + writer.WritePropertyName("dataStorageSizeInTbs"u8); + writer.WriteNumberValue(DataStorageSizeInTbs.Value); + } + if (Optional.IsDefined(DataStorageSizeInGbs)) + { + writer.WritePropertyName("dataStorageSizeInGbs"u8); + writer.WriteNumberValue(DataStorageSizeInGbs.Value); + } + if (Optional.IsDefined(DbVersion)) + { + writer.WritePropertyName("dbVersion"u8); + writer.WriteStringValue(DbVersion); + } + if (Optional.IsDefined(DbWorkload)) + { + writer.WritePropertyName("dbWorkload"u8); + writer.WriteStringValue(DbWorkload.Value.ToString()); + } + if (Optional.IsDefined(DisplayName)) + { + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + } + if (Optional.IsDefined(IsAutoScalingEnabled)) + { + writer.WritePropertyName("isAutoScalingEnabled"u8); + writer.WriteBooleanValue(IsAutoScalingEnabled.Value); + } + if (Optional.IsDefined(IsAutoScalingForStorageEnabled)) + { + writer.WritePropertyName("isAutoScalingForStorageEnabled"u8); + writer.WriteBooleanValue(IsAutoScalingForStorageEnabled.Value); + } + if (options.Format != "W" && Optional.IsCollectionDefined(PeerDbIds)) + { + writer.WritePropertyName("peerDbIds"u8); + writer.WriteStartArray(); + foreach (var item in PeerDbIds) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(PeerDbId)) + { + writer.WritePropertyName("peerDbId"u8); + writer.WriteStringValue(PeerDbId); + } + if (Optional.IsDefined(IsLocalDataGuardEnabled)) + { + writer.WritePropertyName("isLocalDataGuardEnabled"u8); + writer.WriteBooleanValue(IsLocalDataGuardEnabled.Value); + } + if (options.Format != "W" && Optional.IsDefined(IsRemoteDataGuardEnabled)) + { + writer.WritePropertyName("isRemoteDataGuardEnabled"u8); + writer.WriteBooleanValue(IsRemoteDataGuardEnabled.Value); + } + if (options.Format != "W" && Optional.IsDefined(LocalDisasterRecoveryType)) + { + writer.WritePropertyName("localDisasterRecoveryType"u8); + writer.WriteStringValue(LocalDisasterRecoveryType.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(TimeDisasterRecoveryRoleChanged)) + { + writer.WritePropertyName("timeDisasterRecoveryRoleChanged"u8); + writer.WriteStringValue(TimeDisasterRecoveryRoleChanged.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(RemoteDisasterRecoveryConfiguration)) + { + writer.WritePropertyName("remoteDisasterRecoveryConfiguration"u8); + writer.WriteObjectValue(RemoteDisasterRecoveryConfiguration, options); + } + if (options.Format != "W" && Optional.IsDefined(LocalStandbyDb)) + { + writer.WritePropertyName("localStandbyDb"u8); + writer.WriteObjectValue(LocalStandbyDb, options); + } + if (options.Format != "W" && Optional.IsDefined(FailedDataRecoveryInSeconds)) + { + writer.WritePropertyName("failedDataRecoveryInSeconds"u8); + writer.WriteNumberValue(FailedDataRecoveryInSeconds.Value); + } + if (Optional.IsDefined(IsMtlsConnectionRequired)) + { + writer.WritePropertyName("isMtlsConnectionRequired"u8); + writer.WriteBooleanValue(IsMtlsConnectionRequired.Value); + } + if (Optional.IsDefined(IsPreviewVersionWithServiceTermsAccepted)) + { + writer.WritePropertyName("isPreviewVersionWithServiceTermsAccepted"u8); + writer.WriteBooleanValue(IsPreviewVersionWithServiceTermsAccepted.Value); + } + if (Optional.IsDefined(LicenseModel)) + { + writer.WritePropertyName("licenseModel"u8); + writer.WriteStringValue(LicenseModel.Value.ToString()); + } + if (Optional.IsDefined(NcharacterSet)) + { + writer.WritePropertyName("ncharacterSet"u8); + writer.WriteStringValue(NcharacterSet); + } + if (options.Format != "W" && Optional.IsDefined(LifecycleDetails)) + { + writer.WritePropertyName("lifecycleDetails"u8); + writer.WriteStringValue(LifecycleDetails); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(LifecycleState)) + { + writer.WritePropertyName("lifecycleState"u8); + writer.WriteStringValue(LifecycleState.Value.ToString()); + } + if (Optional.IsDefined(ScheduledOperations)) + { + writer.WritePropertyName("scheduledOperations"u8); + writer.WriteObjectValue(ScheduledOperations, options); + } + if (Optional.IsDefined(PrivateEndpointIP)) + { + writer.WritePropertyName("privateEndpointIp"u8); + writer.WriteStringValue(PrivateEndpointIP); + } + if (Optional.IsDefined(PrivateEndpointLabel)) + { + writer.WritePropertyName("privateEndpointLabel"u8); + writer.WriteStringValue(PrivateEndpointLabel); + } + if (options.Format != "W" && Optional.IsDefined(OciUri)) + { + writer.WritePropertyName("ociUrl"u8); + writer.WriteStringValue(OciUri); + } + if (Optional.IsDefined(SubnetId)) + { + writer.WritePropertyName("subnetId"u8); + writer.WriteStringValue(SubnetId); + } + if (Optional.IsDefined(VnetId)) + { + writer.WritePropertyName("vnetId"u8); + writer.WriteStringValue(VnetId); + } + if (options.Format != "W" && Optional.IsDefined(TimeCreated)) + { + writer.WritePropertyName("timeCreated"u8); + writer.WriteStringValue(TimeCreated.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(TimeMaintenanceBegin)) + { + writer.WritePropertyName("timeMaintenanceBegin"u8); + writer.WriteStringValue(TimeMaintenanceBegin.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(TimeMaintenanceEnd)) + { + writer.WritePropertyName("timeMaintenanceEnd"u8); + writer.WriteStringValue(TimeMaintenanceEnd.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(ActualUsedDataStorageSizeInTbs)) + { + writer.WritePropertyName("actualUsedDataStorageSizeInTbs"u8); + writer.WriteNumberValue(ActualUsedDataStorageSizeInTbs.Value); + } + if (options.Format != "W" && Optional.IsDefined(AllocatedStorageSizeInTbs)) + { + writer.WritePropertyName("allocatedStorageSizeInTbs"u8); + writer.WriteNumberValue(AllocatedStorageSizeInTbs.Value); + } + if (options.Format != "W" && Optional.IsDefined(ApexDetails)) + { + writer.WritePropertyName("apexDetails"u8); + writer.WriteObjectValue(ApexDetails, options); + } + if (options.Format != "W" && Optional.IsCollectionDefined(AvailableUpgradeVersions)) + { + writer.WritePropertyName("availableUpgradeVersions"u8); + writer.WriteStartArray(); + foreach (var item in AvailableUpgradeVersions) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(ConnectionStrings)) + { + writer.WritePropertyName("connectionStrings"u8); + writer.WriteObjectValue(ConnectionStrings, options); + } + if (options.Format != "W" && Optional.IsDefined(ConnectionUrls)) + { + writer.WritePropertyName("connectionUrls"u8); + writer.WriteObjectValue(ConnectionUrls, options); + } + if (options.Format != "W" && Optional.IsDefined(DataSafeStatus)) + { + writer.WritePropertyName("dataSafeStatus"u8); + writer.WriteStringValue(DataSafeStatus.Value.ToString()); + } + if (Optional.IsDefined(DatabaseEdition)) + { + writer.WritePropertyName("databaseEdition"u8); + writer.WriteStringValue(DatabaseEdition.Value.ToString()); + } + if (Optional.IsDefined(AutonomousDatabaseId)) + { + writer.WritePropertyName("autonomousDatabaseId"u8); + writer.WriteStringValue(AutonomousDatabaseId); + } + if (options.Format != "W" && Optional.IsDefined(InMemoryAreaInGbs)) + { + writer.WritePropertyName("inMemoryAreaInGbs"u8); + writer.WriteNumberValue(InMemoryAreaInGbs.Value); + } + if (options.Format != "W" && Optional.IsDefined(NextLongTermBackupTimeStamp)) + { + writer.WritePropertyName("nextLongTermBackupTimeStamp"u8); + writer.WriteStringValue(NextLongTermBackupTimeStamp.Value, "O"); + } + if (Optional.IsDefined(LongTermBackupSchedule)) + { + writer.WritePropertyName("longTermBackupSchedule"u8); + writer.WriteObjectValue(LongTermBackupSchedule, options); + } + if (options.Format != "W" && Optional.IsDefined(IsPreview)) + { + writer.WritePropertyName("isPreview"u8); + writer.WriteBooleanValue(IsPreview.Value); + } + if (Optional.IsDefined(LocalAdgAutoFailoverMaxDataLossLimit)) + { + writer.WritePropertyName("localAdgAutoFailoverMaxDataLossLimit"u8); + writer.WriteNumberValue(LocalAdgAutoFailoverMaxDataLossLimit.Value); + } + if (options.Format != "W" && Optional.IsDefined(MemoryPerOracleComputeUnitInGbs)) + { + writer.WritePropertyName("memoryPerOracleComputeUnitInGbs"u8); + writer.WriteNumberValue(MemoryPerOracleComputeUnitInGbs.Value); + } + if (Optional.IsDefined(OpenMode)) + { + writer.WritePropertyName("openMode"u8); + writer.WriteStringValue(OpenMode.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(OperationsInsightsStatus)) + { + writer.WritePropertyName("operationsInsightsStatus"u8); + writer.WriteStringValue(OperationsInsightsStatus.Value.ToString()); + } + if (Optional.IsDefined(PermissionLevel)) + { + writer.WritePropertyName("permissionLevel"u8); + writer.WriteStringValue(PermissionLevel.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(PrivateEndpoint)) + { + writer.WritePropertyName("privateEndpoint"u8); + writer.WriteStringValue(PrivateEndpoint); + } + if (options.Format != "W" && Optional.IsCollectionDefined(ProvisionableCpus)) + { + writer.WritePropertyName("provisionableCpus"u8); + writer.WriteStartArray(); + foreach (var item in ProvisionableCpus) + { + writer.WriteNumberValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Role)) + { + writer.WritePropertyName("role"u8); + writer.WriteStringValue(Role.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(ServiceConsoleUri)) + { + writer.WritePropertyName("serviceConsoleUrl"u8); + writer.WriteStringValue(ServiceConsoleUri); + } + if (options.Format != "W" && Optional.IsDefined(SqlWebDeveloperUri)) + { + writer.WritePropertyName("sqlWebDeveloperUrl"u8); + writer.WriteStringValue(SqlWebDeveloperUri); + } + if (options.Format != "W" && Optional.IsCollectionDefined(SupportedRegionsToCloneTo)) + { + writer.WritePropertyName("supportedRegionsToCloneTo"u8); + writer.WriteStartArray(); + foreach (var item in SupportedRegionsToCloneTo) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(TimeDataGuardRoleChanged)) + { + writer.WritePropertyName("timeDataGuardRoleChanged"u8); + writer.WriteStringValue(TimeDataGuardRoleChanged); + } + if (options.Format != "W" && Optional.IsDefined(TimeDeletionOfFreeAutonomousDatabase)) + { + writer.WritePropertyName("timeDeletionOfFreeAutonomousDatabase"u8); + writer.WriteStringValue(TimeDeletionOfFreeAutonomousDatabase); + } + if (options.Format != "W" && Optional.IsDefined(TimeLocalDataGuardEnabled)) + { + writer.WritePropertyName("timeLocalDataGuardEnabled"u8); + writer.WriteStringValue(TimeLocalDataGuardEnabled); + } + if (options.Format != "W" && Optional.IsDefined(TimeOfLastFailover)) + { + writer.WritePropertyName("timeOfLastFailover"u8); + writer.WriteStringValue(TimeOfLastFailover); + } + if (options.Format != "W" && Optional.IsDefined(TimeOfLastRefresh)) + { + writer.WritePropertyName("timeOfLastRefresh"u8); + writer.WriteStringValue(TimeOfLastRefresh); + } + if (options.Format != "W" && Optional.IsDefined(TimeOfLastRefreshPoint)) + { + writer.WritePropertyName("timeOfLastRefreshPoint"u8); + writer.WriteStringValue(TimeOfLastRefreshPoint); + } + if (options.Format != "W" && Optional.IsDefined(TimeOfLastSwitchover)) + { + writer.WritePropertyName("timeOfLastSwitchover"u8); + writer.WriteStringValue(TimeOfLastSwitchover); + } + if (options.Format != "W" && Optional.IsDefined(TimeReclamationOfFreeAutonomousDatabase)) + { + writer.WritePropertyName("timeReclamationOfFreeAutonomousDatabase"u8); + writer.WriteStringValue(TimeReclamationOfFreeAutonomousDatabase); + } + if (options.Format != "W" && Optional.IsDefined(UsedDataStorageSizeInGbs)) + { + writer.WritePropertyName("usedDataStorageSizeInGbs"u8); + writer.WriteNumberValue(UsedDataStorageSizeInGbs.Value); + } + if (options.Format != "W" && Optional.IsDefined(UsedDataStorageSizeInTbs)) + { + writer.WritePropertyName("usedDataStorageSizeInTbs"u8); + writer.WriteNumberValue(UsedDataStorageSizeInTbs.Value); + } + if (options.Format != "W" && Optional.IsDefined(Ocid)) + { + writer.WritePropertyName("ocid"u8); + writer.WriteStringValue(Ocid); + } + if (Optional.IsDefined(BackupRetentionPeriodInDays)) + { + writer.WritePropertyName("backupRetentionPeriodInDays"u8); + writer.WriteNumberValue(BackupRetentionPeriodInDays.Value); + } + if (Optional.IsCollectionDefined(WhitelistedIPs)) + { + writer.WritePropertyName("whitelistedIps"u8); + writer.WriteStartArray(); + foreach (var item in WhitelistedIPs) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AutonomousDatabaseBaseProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AutonomousDatabaseBaseProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAutonomousDatabaseBaseProperties(document.RootElement, options); + } + + internal static AutonomousDatabaseBaseProperties DeserializeAutonomousDatabaseBaseProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("dataBaseType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "Clone": return AutonomousDatabaseCloneProperties.DeserializeAutonomousDatabaseCloneProperties(element, options); + case "CloneFromBackupTimestamp": return AutonomousDatabaseFromBackupTimestampProperties.DeserializeAutonomousDatabaseFromBackupTimestampProperties(element, options); + case "CrossRegionDisasterRecovery": return AutonomousDatabaseCrossRegionDisasterRecoveryProperties.DeserializeAutonomousDatabaseCrossRegionDisasterRecoveryProperties(element, options); + case "Regular": return AutonomousDatabaseProperties.DeserializeAutonomousDatabaseProperties(element, options); + } + } + return UnknownAutonomousDatabaseBaseProperties.DeserializeUnknownAutonomousDatabaseBaseProperties(element, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AutonomousDatabaseBaseProperties)} does not support writing '{options.Format}' format."); + } + } + + AutonomousDatabaseBaseProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAutonomousDatabaseBaseProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AutonomousDatabaseBaseProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseBaseProperties.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseBaseProperties.cs new file mode 100644 index 000000000000..7a5d8952962e --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseBaseProperties.cs @@ -0,0 +1,380 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// + /// Autonomous Database base resource model. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , and . + /// + public abstract partial class AutonomousDatabaseBaseProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + protected AutonomousDatabaseBaseProperties() + { + CustomerContacts = new ChangeTrackingList(); + PeerDbIds = new ChangeTrackingList(); + AvailableUpgradeVersions = new ChangeTrackingList(); + ProvisionableCpus = new ChangeTrackingList(); + SupportedRegionsToCloneTo = new ChangeTrackingList(); + WhitelistedIPs = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Admin password. + /// Database type to be created. + /// The maintenance schedule type of the Autonomous Database Serverless. + /// The character set for the autonomous database. + /// The compute amount (CPUs) available to the database. + /// The compute model of the Autonomous Database. + /// The number of CPU cores to be made available to the database. + /// Customer Contacts. + /// The quantity of data in the database, in terabytes. + /// The size, in gigabytes, of the data volume that will be created and attached to the database. + /// A valid Oracle Database version for Autonomous Database. + /// The Autonomous Database workload type. + /// The user-friendly name for the Autonomous Database. + /// Indicates if auto scaling is enabled for the Autonomous Database CPU core count. + /// Indicates if auto scaling is enabled for the Autonomous Database storage. + /// The list of Azure resource IDs of standby databases located in Autonomous Data Guard remote regions that are associated with the source database. Note that for Autonomous Database Serverless instances, standby databases located in the same region as the source primary database do not have Azure IDs. + /// The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current peer database. + /// Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. + /// Indicates whether the Autonomous Database has Cross Region Data Guard enabled. + /// Indicates the local disaster recovery (DR) type of the Autonomous Database Serverless instance.Autonomous Data Guard (ADG) DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover.Backup-based DR type provides lower cost DR with a slower RTO during failover or switchover. + /// The date and time the Disaster Recovery role was switched for the standby Autonomous Database. + /// Indicates remote disaster recovery configuration. + /// Local Autonomous Disaster Recovery standby database details. + /// Indicates the number of seconds of data loss for a Data Guard failover. + /// Specifies if the Autonomous Database requires mTLS connections. + /// Specifies if the Autonomous Database preview version is being provisioned. + /// The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED. + /// The character set for the Autonomous Database. + /// Additional information about the current lifecycle state. + /// Azure resource provisioning state. + /// Views lifecycleState. + /// The list of scheduled operations. + /// The private endpoint Ip address for the resource. + /// The resource's private endpoint label. + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + /// Client subnet. + /// VNET for network connectivity. + /// The date and time that the database was created. + /// The date and time when maintenance will begin. + /// The date and time when maintenance will end. + /// The current amount of storage in use for user and system data, in terabytes (TB). + /// The amount of storage currently allocated for the database tables and billed for, rounded up. + /// Information about Oracle APEX Application Development. + /// List of Oracle Database versions available for a database upgrade. If there are no version upgrades available, this list is empty. + /// The connection string used to connect to the Autonomous Database. + /// The URLs for accessing Oracle Application Express (APEX) and SQL Developer Web with a browser from a Compute instance within your VCN or that has a direct connection to your VCN. + /// Status of the Data Safe registration for this Autonomous Database. + /// The Oracle Database Edition that applies to the Autonomous databases. + /// Autonomous Database ID. + /// The area assigned to In-Memory tables in Autonomous Database. + /// The date and time when the next long-term backup would be created. + /// Details for the long-term backup schedule. + /// Indicates if the Autonomous Database version is a preview version. + /// Parameter that allows users to select an acceptable maximum data loss limit in seconds, up to which Automatic Failover will be triggered when necessary for a Local Autonomous Data Guard. + /// The amount of memory (in GBs) enabled per ECPU or OCPU. + /// Indicates the Autonomous Database mode. + /// Status of Operations Insights for this Autonomous Database. + /// The Autonomous Database permission level. + /// The private endpoint for the resource. + /// An array of CPU values that an Autonomous Database can be scaled to. + /// The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. + /// The URL of the Service Console for the Autonomous Database. + /// The SQL Web Developer URL for the Oracle Autonomous Database. + /// The list of regions that support the creation of an Autonomous Database clone or an Autonomous Data Guard standby database. + /// The date and time the Autonomous Data Guard role was switched for the Autonomous Database. + /// The date and time the Always Free database will be automatically deleted because of inactivity. + /// The date and time that Autonomous Data Guard was enabled for an Autonomous Database where the standby was provisioned in the same region as the primary database. + /// The timestamp of the last failover operation. + /// The date and time when last refresh happened. + /// The refresh point timestamp (UTC). + /// The timestamp of the last switchover operation for the Autonomous Database. + /// The date and time the Always Free database will be stopped because of inactivity. + /// The storage space consumed by Autonomous Database in GBs. + /// The amount of storage that has been used, in terabytes. + /// Database ocid. + /// Retention period, in days, for long-term backups. + /// The client IP access control list (ACL). This is an array of CIDR notations and/or IP addresses. Values should be separate strings, separated by commas. Example: ['1.1.1.1','1.1.1.0/24','1.1.2.25']. + /// Keeps track of any properties unknown to the library. + internal AutonomousDatabaseBaseProperties(string adminPassword, DataBaseType dataBaseType, AutonomousMaintenanceScheduleType? autonomousMaintenanceScheduleType, string characterSet, float? computeCount, ComputeModel? computeModel, int? cpuCoreCount, IList customerContacts, int? dataStorageSizeInTbs, int? dataStorageSizeInGbs, string dbVersion, WorkloadType? dbWorkload, string displayName, bool? isAutoScalingEnabled, bool? isAutoScalingForStorageEnabled, IReadOnlyList peerDbIds, string peerDbId, bool? isLocalDataGuardEnabled, bool? isRemoteDataGuardEnabled, DisasterRecoveryType? localDisasterRecoveryType, DateTimeOffset? timeDisasterRecoveryRoleChanged, DisasterRecoveryConfigurationDetails remoteDisasterRecoveryConfiguration, AutonomousDatabaseStandbySummary localStandbyDb, int? failedDataRecoveryInSeconds, bool? isMtlsConnectionRequired, bool? isPreviewVersionWithServiceTermsAccepted, LicenseModel? licenseModel, string ncharacterSet, string lifecycleDetails, AzureResourceProvisioningState? provisioningState, AutonomousDatabaseLifecycleState? lifecycleState, ScheduledOperationsType scheduledOperations, string privateEndpointIP, string privateEndpointLabel, string ociUri, ResourceIdentifier subnetId, ResourceIdentifier vnetId, DateTimeOffset? timeCreated, DateTimeOffset? timeMaintenanceBegin, DateTimeOffset? timeMaintenanceEnd, double? actualUsedDataStorageSizeInTbs, double? allocatedStorageSizeInTbs, ApexDetailsType apexDetails, IReadOnlyList availableUpgradeVersions, ConnectionStringType connectionStrings, ConnectionUrlType connectionUrls, DataSafeStatusType? dataSafeStatus, DatabaseEditionType? databaseEdition, ResourceIdentifier autonomousDatabaseId, int? inMemoryAreaInGbs, DateTimeOffset? nextLongTermBackupTimeStamp, LongTermBackUpScheduleDetails longTermBackupSchedule, bool? isPreview, int? localAdgAutoFailoverMaxDataLossLimit, int? memoryPerOracleComputeUnitInGbs, OpenModeType? openMode, OperationsInsightsStatusType? operationsInsightsStatus, PermissionLevelType? permissionLevel, string privateEndpoint, IReadOnlyList provisionableCpus, RoleType? role, string serviceConsoleUri, string sqlWebDeveloperUri, IReadOnlyList supportedRegionsToCloneTo, string timeDataGuardRoleChanged, string timeDeletionOfFreeAutonomousDatabase, string timeLocalDataGuardEnabled, string timeOfLastFailover, string timeOfLastRefresh, string timeOfLastRefreshPoint, string timeOfLastSwitchover, string timeReclamationOfFreeAutonomousDatabase, int? usedDataStorageSizeInGbs, int? usedDataStorageSizeInTbs, string ocid, int? backupRetentionPeriodInDays, IList whitelistedIPs, IDictionary serializedAdditionalRawData) + { + AdminPassword = adminPassword; + DataBaseType = dataBaseType; + AutonomousMaintenanceScheduleType = autonomousMaintenanceScheduleType; + CharacterSet = characterSet; + ComputeCount = computeCount; + ComputeModel = computeModel; + CpuCoreCount = cpuCoreCount; + CustomerContacts = customerContacts; + DataStorageSizeInTbs = dataStorageSizeInTbs; + DataStorageSizeInGbs = dataStorageSizeInGbs; + DbVersion = dbVersion; + DbWorkload = dbWorkload; + DisplayName = displayName; + IsAutoScalingEnabled = isAutoScalingEnabled; + IsAutoScalingForStorageEnabled = isAutoScalingForStorageEnabled; + PeerDbIds = peerDbIds; + PeerDbId = peerDbId; + IsLocalDataGuardEnabled = isLocalDataGuardEnabled; + IsRemoteDataGuardEnabled = isRemoteDataGuardEnabled; + LocalDisasterRecoveryType = localDisasterRecoveryType; + TimeDisasterRecoveryRoleChanged = timeDisasterRecoveryRoleChanged; + RemoteDisasterRecoveryConfiguration = remoteDisasterRecoveryConfiguration; + LocalStandbyDb = localStandbyDb; + FailedDataRecoveryInSeconds = failedDataRecoveryInSeconds; + IsMtlsConnectionRequired = isMtlsConnectionRequired; + IsPreviewVersionWithServiceTermsAccepted = isPreviewVersionWithServiceTermsAccepted; + LicenseModel = licenseModel; + NcharacterSet = ncharacterSet; + LifecycleDetails = lifecycleDetails; + ProvisioningState = provisioningState; + LifecycleState = lifecycleState; + ScheduledOperations = scheduledOperations; + PrivateEndpointIP = privateEndpointIP; + PrivateEndpointLabel = privateEndpointLabel; + OciUri = ociUri; + SubnetId = subnetId; + VnetId = vnetId; + TimeCreated = timeCreated; + TimeMaintenanceBegin = timeMaintenanceBegin; + TimeMaintenanceEnd = timeMaintenanceEnd; + ActualUsedDataStorageSizeInTbs = actualUsedDataStorageSizeInTbs; + AllocatedStorageSizeInTbs = allocatedStorageSizeInTbs; + ApexDetails = apexDetails; + AvailableUpgradeVersions = availableUpgradeVersions; + ConnectionStrings = connectionStrings; + ConnectionUrls = connectionUrls; + DataSafeStatus = dataSafeStatus; + DatabaseEdition = databaseEdition; + AutonomousDatabaseId = autonomousDatabaseId; + InMemoryAreaInGbs = inMemoryAreaInGbs; + NextLongTermBackupTimeStamp = nextLongTermBackupTimeStamp; + LongTermBackupSchedule = longTermBackupSchedule; + IsPreview = isPreview; + LocalAdgAutoFailoverMaxDataLossLimit = localAdgAutoFailoverMaxDataLossLimit; + MemoryPerOracleComputeUnitInGbs = memoryPerOracleComputeUnitInGbs; + OpenMode = openMode; + OperationsInsightsStatus = operationsInsightsStatus; + PermissionLevel = permissionLevel; + PrivateEndpoint = privateEndpoint; + ProvisionableCpus = provisionableCpus; + Role = role; + ServiceConsoleUri = serviceConsoleUri; + SqlWebDeveloperUri = sqlWebDeveloperUri; + SupportedRegionsToCloneTo = supportedRegionsToCloneTo; + TimeDataGuardRoleChanged = timeDataGuardRoleChanged; + TimeDeletionOfFreeAutonomousDatabase = timeDeletionOfFreeAutonomousDatabase; + TimeLocalDataGuardEnabled = timeLocalDataGuardEnabled; + TimeOfLastFailover = timeOfLastFailover; + TimeOfLastRefresh = timeOfLastRefresh; + TimeOfLastRefreshPoint = timeOfLastRefreshPoint; + TimeOfLastSwitchover = timeOfLastSwitchover; + TimeReclamationOfFreeAutonomousDatabase = timeReclamationOfFreeAutonomousDatabase; + UsedDataStorageSizeInGbs = usedDataStorageSizeInGbs; + UsedDataStorageSizeInTbs = usedDataStorageSizeInTbs; + Ocid = ocid; + BackupRetentionPeriodInDays = backupRetentionPeriodInDays; + WhitelistedIPs = whitelistedIPs; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Admin password. + public string AdminPassword { get; set; } + /// Database type to be created. + internal DataBaseType DataBaseType { get; set; } + /// The maintenance schedule type of the Autonomous Database Serverless. + public AutonomousMaintenanceScheduleType? AutonomousMaintenanceScheduleType { get; set; } + /// The character set for the autonomous database. + public string CharacterSet { get; set; } + /// The compute amount (CPUs) available to the database. + public float? ComputeCount { get; set; } + /// The compute model of the Autonomous Database. + public ComputeModel? ComputeModel { get; set; } + /// The number of CPU cores to be made available to the database. + public int? CpuCoreCount { get; set; } + /// Customer Contacts. + public IList CustomerContacts { get; } + /// The quantity of data in the database, in terabytes. + public int? DataStorageSizeInTbs { get; set; } + /// The size, in gigabytes, of the data volume that will be created and attached to the database. + public int? DataStorageSizeInGbs { get; set; } + /// A valid Oracle Database version for Autonomous Database. + public string DbVersion { get; set; } + /// The Autonomous Database workload type. + public WorkloadType? DbWorkload { get; set; } + /// The user-friendly name for the Autonomous Database. + public string DisplayName { get; set; } + /// Indicates if auto scaling is enabled for the Autonomous Database CPU core count. + public bool? IsAutoScalingEnabled { get; set; } + /// Indicates if auto scaling is enabled for the Autonomous Database storage. + public bool? IsAutoScalingForStorageEnabled { get; set; } + /// The list of Azure resource IDs of standby databases located in Autonomous Data Guard remote regions that are associated with the source database. Note that for Autonomous Database Serverless instances, standby databases located in the same region as the source primary database do not have Azure IDs. + public IReadOnlyList PeerDbIds { get; } + /// The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current peer database. + public string PeerDbId { get; set; } + /// Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. + public bool? IsLocalDataGuardEnabled { get; set; } + /// Indicates whether the Autonomous Database has Cross Region Data Guard enabled. + public bool? IsRemoteDataGuardEnabled { get; } + /// Indicates the local disaster recovery (DR) type of the Autonomous Database Serverless instance.Autonomous Data Guard (ADG) DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover.Backup-based DR type provides lower cost DR with a slower RTO during failover or switchover. + public DisasterRecoveryType? LocalDisasterRecoveryType { get; } + /// The date and time the Disaster Recovery role was switched for the standby Autonomous Database. + public DateTimeOffset? TimeDisasterRecoveryRoleChanged { get; } + /// Indicates remote disaster recovery configuration. + public DisasterRecoveryConfigurationDetails RemoteDisasterRecoveryConfiguration { get; } + /// Local Autonomous Disaster Recovery standby database details. + public AutonomousDatabaseStandbySummary LocalStandbyDb { get; } + /// Indicates the number of seconds of data loss for a Data Guard failover. + public int? FailedDataRecoveryInSeconds { get; } + /// Specifies if the Autonomous Database requires mTLS connections. + public bool? IsMtlsConnectionRequired { get; set; } + /// Specifies if the Autonomous Database preview version is being provisioned. + public bool? IsPreviewVersionWithServiceTermsAccepted { get; set; } + /// The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED. + public LicenseModel? LicenseModel { get; set; } + /// The character set for the Autonomous Database. + public string NcharacterSet { get; set; } + /// Additional information about the current lifecycle state. + public string LifecycleDetails { get; } + /// Azure resource provisioning state. + public AzureResourceProvisioningState? ProvisioningState { get; } + /// Views lifecycleState. + public AutonomousDatabaseLifecycleState? LifecycleState { get; } + /// The list of scheduled operations. + public ScheduledOperationsType ScheduledOperations { get; set; } + /// The private endpoint Ip address for the resource. + public string PrivateEndpointIP { get; set; } + /// The resource's private endpoint label. + public string PrivateEndpointLabel { get; set; } + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + public string OciUri { get; } + /// Client subnet. + public ResourceIdentifier SubnetId { get; set; } + /// VNET for network connectivity. + public ResourceIdentifier VnetId { get; set; } + /// The date and time that the database was created. + public DateTimeOffset? TimeCreated { get; } + /// The date and time when maintenance will begin. + public DateTimeOffset? TimeMaintenanceBegin { get; } + /// The date and time when maintenance will end. + public DateTimeOffset? TimeMaintenanceEnd { get; } + /// The current amount of storage in use for user and system data, in terabytes (TB). + public double? ActualUsedDataStorageSizeInTbs { get; } + /// The amount of storage currently allocated for the database tables and billed for, rounded up. + public double? AllocatedStorageSizeInTbs { get; } + /// Information about Oracle APEX Application Development. + public ApexDetailsType ApexDetails { get; } + /// List of Oracle Database versions available for a database upgrade. If there are no version upgrades available, this list is empty. + public IReadOnlyList AvailableUpgradeVersions { get; } + /// The connection string used to connect to the Autonomous Database. + public ConnectionStringType ConnectionStrings { get; } + /// The URLs for accessing Oracle Application Express (APEX) and SQL Developer Web with a browser from a Compute instance within your VCN or that has a direct connection to your VCN. + public ConnectionUrlType ConnectionUrls { get; } + /// Status of the Data Safe registration for this Autonomous Database. + public DataSafeStatusType? DataSafeStatus { get; } + /// The Oracle Database Edition that applies to the Autonomous databases. + public DatabaseEditionType? DatabaseEdition { get; set; } + /// Autonomous Database ID. + public ResourceIdentifier AutonomousDatabaseId { get; set; } + /// The area assigned to In-Memory tables in Autonomous Database. + public int? InMemoryAreaInGbs { get; } + /// The date and time when the next long-term backup would be created. + public DateTimeOffset? NextLongTermBackupTimeStamp { get; } + /// Details for the long-term backup schedule. + public LongTermBackUpScheduleDetails LongTermBackupSchedule { get; set; } + /// Indicates if the Autonomous Database version is a preview version. + public bool? IsPreview { get; } + /// Parameter that allows users to select an acceptable maximum data loss limit in seconds, up to which Automatic Failover will be triggered when necessary for a Local Autonomous Data Guard. + public int? LocalAdgAutoFailoverMaxDataLossLimit { get; set; } + /// The amount of memory (in GBs) enabled per ECPU or OCPU. + public int? MemoryPerOracleComputeUnitInGbs { get; } + /// Indicates the Autonomous Database mode. + public OpenModeType? OpenMode { get; set; } + /// Status of Operations Insights for this Autonomous Database. + public OperationsInsightsStatusType? OperationsInsightsStatus { get; } + /// The Autonomous Database permission level. + public PermissionLevelType? PermissionLevel { get; set; } + /// The private endpoint for the resource. + public string PrivateEndpoint { get; } + /// An array of CPU values that an Autonomous Database can be scaled to. + public IReadOnlyList ProvisionableCpus { get; } + /// The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. + public RoleType? Role { get; set; } + /// The URL of the Service Console for the Autonomous Database. + public string ServiceConsoleUri { get; } + /// The SQL Web Developer URL for the Oracle Autonomous Database. + public string SqlWebDeveloperUri { get; } + /// The list of regions that support the creation of an Autonomous Database clone or an Autonomous Data Guard standby database. + public IReadOnlyList SupportedRegionsToCloneTo { get; } + /// The date and time the Autonomous Data Guard role was switched for the Autonomous Database. + public string TimeDataGuardRoleChanged { get; } + /// The date and time the Always Free database will be automatically deleted because of inactivity. + public string TimeDeletionOfFreeAutonomousDatabase { get; } + /// The date and time that Autonomous Data Guard was enabled for an Autonomous Database where the standby was provisioned in the same region as the primary database. + public string TimeLocalDataGuardEnabled { get; } + /// The timestamp of the last failover operation. + public string TimeOfLastFailover { get; } + /// The date and time when last refresh happened. + public string TimeOfLastRefresh { get; } + /// The refresh point timestamp (UTC). + public string TimeOfLastRefreshPoint { get; } + /// The timestamp of the last switchover operation for the Autonomous Database. + public string TimeOfLastSwitchover { get; } + /// The date and time the Always Free database will be stopped because of inactivity. + public string TimeReclamationOfFreeAutonomousDatabase { get; } + /// The storage space consumed by Autonomous Database in GBs. + public int? UsedDataStorageSizeInGbs { get; } + /// The amount of storage that has been used, in terabytes. + public int? UsedDataStorageSizeInTbs { get; } + /// Database ocid. + public string Ocid { get; } + /// Retention period, in days, for long-term backups. + public int? BackupRetentionPeriodInDays { get; set; } + /// The client IP access control list (ACL). This is an array of CIDR notations and/or IP addresses. Values should be separate strings, separated by commas. Example: ['1.1.1.1','1.1.1.0/24','1.1.2.25']. + public IList WhitelistedIPs { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseCharacterSetListResult.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseCharacterSetListResult.Serialization.cs new file mode 100644 index 000000000000..fcb3ab655e2a --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseCharacterSetListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + internal partial class AutonomousDatabaseCharacterSetListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AutonomousDatabaseCharacterSetListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AutonomousDatabaseCharacterSetListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AutonomousDatabaseCharacterSetListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAutonomousDatabaseCharacterSetListResult(document.RootElement, options); + } + + internal static AutonomousDatabaseCharacterSetListResult DeserializeAutonomousDatabaseCharacterSetListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AutonomousDatabaseCharacterSetData.DeserializeAutonomousDatabaseCharacterSetData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AutonomousDatabaseCharacterSetListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AutonomousDatabaseCharacterSetListResult)} does not support writing '{options.Format}' format."); + } + } + + AutonomousDatabaseCharacterSetListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAutonomousDatabaseCharacterSetListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AutonomousDatabaseCharacterSetListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseCharacterSetListResult.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseCharacterSetListResult.cs new file mode 100644 index 000000000000..e11926615f79 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseCharacterSetListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// The response of a AutonomousDatabaseCharacterSet list operation. + internal partial class AutonomousDatabaseCharacterSetListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The AutonomousDatabaseCharacterSet items on this page. + /// is null. + internal AutonomousDatabaseCharacterSetListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The AutonomousDatabaseCharacterSet items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal AutonomousDatabaseCharacterSetListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AutonomousDatabaseCharacterSetListResult() + { + } + + /// The AutonomousDatabaseCharacterSet items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseCharacterSetProperties.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseCharacterSetProperties.Serialization.cs new file mode 100644 index 000000000000..b91fa0e5f4ed --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseCharacterSetProperties.Serialization.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + internal partial class AutonomousDatabaseCharacterSetProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AutonomousDatabaseCharacterSetProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("characterSet"u8); + writer.WriteStringValue(CharacterSet); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AutonomousDatabaseCharacterSetProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AutonomousDatabaseCharacterSetProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAutonomousDatabaseCharacterSetProperties(document.RootElement, options); + } + + internal static AutonomousDatabaseCharacterSetProperties DeserializeAutonomousDatabaseCharacterSetProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string characterSet = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("characterSet"u8)) + { + characterSet = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AutonomousDatabaseCharacterSetProperties(characterSet, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AutonomousDatabaseCharacterSetProperties)} does not support writing '{options.Format}' format."); + } + } + + AutonomousDatabaseCharacterSetProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAutonomousDatabaseCharacterSetProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AutonomousDatabaseCharacterSetProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseCharacterSetProperties.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseCharacterSetProperties.cs new file mode 100644 index 000000000000..3ab343d37b9a --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseCharacterSetProperties.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// AutonomousDatabaseCharacterSet resource model. + internal partial class AutonomousDatabaseCharacterSetProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The Oracle Autonomous Database supported character sets. + /// is null. + internal AutonomousDatabaseCharacterSetProperties(string characterSet) + { + Argument.AssertNotNull(characterSet, nameof(characterSet)); + + CharacterSet = characterSet; + } + + /// Initializes a new instance of . + /// The Oracle Autonomous Database supported character sets. + /// Keeps track of any properties unknown to the library. + internal AutonomousDatabaseCharacterSetProperties(string characterSet, IDictionary serializedAdditionalRawData) + { + CharacterSet = characterSet; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AutonomousDatabaseCharacterSetProperties() + { + } + + /// The Oracle Autonomous Database supported character sets. + public string CharacterSet { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseCloneProperties.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseCloneProperties.Serialization.cs new file mode 100644 index 000000000000..5a22d7bddd63 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseCloneProperties.Serialization.cs @@ -0,0 +1,1000 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + public partial class AutonomousDatabaseCloneProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AutonomousDatabaseCloneProperties)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Source)) + { + writer.WritePropertyName("source"u8); + writer.WriteStringValue(Source.Value.ToString()); + } + writer.WritePropertyName("sourceId"u8); + writer.WriteStringValue(SourceId); + writer.WritePropertyName("cloneType"u8); + writer.WriteStringValue(CloneType.ToString()); + if (options.Format != "W" && Optional.IsDefined(IsReconnectCloneEnabled)) + { + writer.WritePropertyName("isReconnectCloneEnabled"u8); + writer.WriteBooleanValue(IsReconnectCloneEnabled.Value); + } + if (options.Format != "W" && Optional.IsDefined(IsRefreshableClone)) + { + writer.WritePropertyName("isRefreshableClone"u8); + writer.WriteBooleanValue(IsRefreshableClone.Value); + } + if (Optional.IsDefined(RefreshableModel)) + { + writer.WritePropertyName("refreshableModel"u8); + writer.WriteStringValue(RefreshableModel.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(RefreshableStatus)) + { + writer.WritePropertyName("refreshableStatus"u8); + writer.WriteStringValue(RefreshableStatus.Value.ToString()); + } + if (Optional.IsDefined(TimeUntilReconnectCloneEnabled)) + { + writer.WritePropertyName("timeUntilReconnectCloneEnabled"u8); + writer.WriteStringValue(TimeUntilReconnectCloneEnabled); + } + } + + AutonomousDatabaseCloneProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AutonomousDatabaseCloneProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAutonomousDatabaseCloneProperties(document.RootElement, options); + } + + internal static AutonomousDatabaseCloneProperties DeserializeAutonomousDatabaseCloneProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + SourceType? source = default; + ResourceIdentifier sourceId = default; + CloneType cloneType = default; + bool? isReconnectCloneEnabled = default; + bool? isRefreshableClone = default; + RefreshableModelType? refreshableModel = default; + RefreshableStatusType? refreshableStatus = default; + string timeUntilReconnectCloneEnabled = default; + string adminPassword = default; + DataBaseType dataBaseType = default; + AutonomousMaintenanceScheduleType? autonomousMaintenanceScheduleType = default; + string characterSet = default; + float? computeCount = default; + ComputeModel? computeModel = default; + int? cpuCoreCount = default; + IList customerContacts = default; + int? dataStorageSizeInTbs = default; + int? dataStorageSizeInGbs = default; + string dbVersion = default; + WorkloadType? dbWorkload = default; + string displayName = default; + bool? isAutoScalingEnabled = default; + bool? isAutoScalingForStorageEnabled = default; + IReadOnlyList peerDbIds = default; + string peerDbId = default; + bool? isLocalDataGuardEnabled = default; + bool? isRemoteDataGuardEnabled = default; + DisasterRecoveryType? localDisasterRecoveryType = default; + DateTimeOffset? timeDisasterRecoveryRoleChanged = default; + DisasterRecoveryConfigurationDetails remoteDisasterRecoveryConfiguration = default; + AutonomousDatabaseStandbySummary localStandbyDb = default; + int? failedDataRecoveryInSeconds = default; + bool? isMtlsConnectionRequired = default; + bool? isPreviewVersionWithServiceTermsAccepted = default; + LicenseModel? licenseModel = default; + string ncharacterSet = default; + string lifecycleDetails = default; + AzureResourceProvisioningState? provisioningState = default; + AutonomousDatabaseLifecycleState? lifecycleState = default; + ScheduledOperationsType scheduledOperations = default; + string privateEndpointIP = default; + string privateEndpointLabel = default; + string ociUrl = default; + ResourceIdentifier subnetId = default; + ResourceIdentifier vnetId = default; + DateTimeOffset? timeCreated = default; + DateTimeOffset? timeMaintenanceBegin = default; + DateTimeOffset? timeMaintenanceEnd = default; + double? actualUsedDataStorageSizeInTbs = default; + double? allocatedStorageSizeInTbs = default; + ApexDetailsType apexDetails = default; + IReadOnlyList availableUpgradeVersions = default; + ConnectionStringType connectionStrings = default; + ConnectionUrlType connectionUrls = default; + DataSafeStatusType? dataSafeStatus = default; + DatabaseEditionType? databaseEdition = default; + ResourceIdentifier autonomousDatabaseId = default; + int? inMemoryAreaInGbs = default; + DateTimeOffset? nextLongTermBackupTimeStamp = default; + LongTermBackUpScheduleDetails longTermBackupSchedule = default; + bool? isPreview = default; + int? localAdgAutoFailoverMaxDataLossLimit = default; + int? memoryPerOracleComputeUnitInGbs = default; + OpenModeType? openMode = default; + OperationsInsightsStatusType? operationsInsightsStatus = default; + PermissionLevelType? permissionLevel = default; + string privateEndpoint = default; + IReadOnlyList provisionableCpus = default; + RoleType? role = default; + string serviceConsoleUrl = default; + string sqlWebDeveloperUrl = default; + IReadOnlyList supportedRegionsToCloneTo = default; + string timeDataGuardRoleChanged = default; + string timeDeletionOfFreeAutonomousDatabase = default; + string timeLocalDataGuardEnabled = default; + string timeOfLastFailover = default; + string timeOfLastRefresh = default; + string timeOfLastRefreshPoint = default; + string timeOfLastSwitchover = default; + string timeReclamationOfFreeAutonomousDatabase = default; + int? usedDataStorageSizeInGbs = default; + int? usedDataStorageSizeInTbs = default; + string ocid = default; + int? backupRetentionPeriodInDays = default; + IList whitelistedIPs = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("source"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + source = new SourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("sourceId"u8)) + { + sourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("cloneType"u8)) + { + cloneType = new CloneType(property.Value.GetString()); + continue; + } + if (property.NameEquals("isReconnectCloneEnabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isReconnectCloneEnabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("isRefreshableClone"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isRefreshableClone = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("refreshableModel"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + refreshableModel = new RefreshableModelType(property.Value.GetString()); + continue; + } + if (property.NameEquals("refreshableStatus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + refreshableStatus = new RefreshableStatusType(property.Value.GetString()); + continue; + } + if (property.NameEquals("timeUntilReconnectCloneEnabled"u8)) + { + timeUntilReconnectCloneEnabled = property.Value.GetString(); + continue; + } + if (property.NameEquals("adminPassword"u8)) + { + adminPassword = property.Value.GetString(); + continue; + } + if (property.NameEquals("dataBaseType"u8)) + { + dataBaseType = new DataBaseType(property.Value.GetString()); + continue; + } + if (property.NameEquals("autonomousMaintenanceScheduleType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + autonomousMaintenanceScheduleType = new AutonomousMaintenanceScheduleType(property.Value.GetString()); + continue; + } + if (property.NameEquals("characterSet"u8)) + { + characterSet = property.Value.GetString(); + continue; + } + if (property.NameEquals("computeCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + computeCount = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("computeModel"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + computeModel = new ComputeModel(property.Value.GetString()); + continue; + } + if (property.NameEquals("cpuCoreCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + cpuCoreCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("customerContacts"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(CustomerContact.DeserializeCustomerContact(item, options)); + } + customerContacts = array; + continue; + } + if (property.NameEquals("dataStorageSizeInTbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dataStorageSizeInTbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("dataStorageSizeInGbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dataStorageSizeInGbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("dbVersion"u8)) + { + dbVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("dbWorkload"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dbWorkload = new WorkloadType(property.Value.GetString()); + continue; + } + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("isAutoScalingEnabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isAutoScalingEnabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("isAutoScalingForStorageEnabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isAutoScalingForStorageEnabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("peerDbIds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + peerDbIds = array; + continue; + } + if (property.NameEquals("peerDbId"u8)) + { + peerDbId = property.Value.GetString(); + continue; + } + if (property.NameEquals("isLocalDataGuardEnabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isLocalDataGuardEnabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("isRemoteDataGuardEnabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isRemoteDataGuardEnabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("localDisasterRecoveryType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + localDisasterRecoveryType = new DisasterRecoveryType(property.Value.GetString()); + continue; + } + if (property.NameEquals("timeDisasterRecoveryRoleChanged"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeDisasterRecoveryRoleChanged = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("remoteDisasterRecoveryConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + remoteDisasterRecoveryConfiguration = DisasterRecoveryConfigurationDetails.DeserializeDisasterRecoveryConfigurationDetails(property.Value, options); + continue; + } + if (property.NameEquals("localStandbyDb"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + localStandbyDb = AutonomousDatabaseStandbySummary.DeserializeAutonomousDatabaseStandbySummary(property.Value, options); + continue; + } + if (property.NameEquals("failedDataRecoveryInSeconds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + failedDataRecoveryInSeconds = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("isMtlsConnectionRequired"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isMtlsConnectionRequired = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("isPreviewVersionWithServiceTermsAccepted"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isPreviewVersionWithServiceTermsAccepted = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("licenseModel"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + licenseModel = new LicenseModel(property.Value.GetString()); + continue; + } + if (property.NameEquals("ncharacterSet"u8)) + { + ncharacterSet = property.Value.GetString(); + continue; + } + if (property.NameEquals("lifecycleDetails"u8)) + { + lifecycleDetails = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new AzureResourceProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("lifecycleState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lifecycleState = new AutonomousDatabaseLifecycleState(property.Value.GetString()); + continue; + } + if (property.NameEquals("scheduledOperations"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + scheduledOperations = ScheduledOperationsType.DeserializeScheduledOperationsType(property.Value, options); + continue; + } + if (property.NameEquals("privateEndpointIp"u8)) + { + privateEndpointIP = property.Value.GetString(); + continue; + } + if (property.NameEquals("privateEndpointLabel"u8)) + { + privateEndpointLabel = property.Value.GetString(); + continue; + } + if (property.NameEquals("ociUrl"u8)) + { + ociUrl = property.Value.GetString(); + continue; + } + if (property.NameEquals("subnetId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + subnetId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("vnetId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + vnetId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("timeCreated"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeCreated = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("timeMaintenanceBegin"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeMaintenanceBegin = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("timeMaintenanceEnd"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeMaintenanceEnd = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("actualUsedDataStorageSizeInTbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + actualUsedDataStorageSizeInTbs = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("allocatedStorageSizeInTbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + allocatedStorageSizeInTbs = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("apexDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + apexDetails = ApexDetailsType.DeserializeApexDetailsType(property.Value, options); + continue; + } + if (property.NameEquals("availableUpgradeVersions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + availableUpgradeVersions = array; + continue; + } + if (property.NameEquals("connectionStrings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectionStrings = ConnectionStringType.DeserializeConnectionStringType(property.Value, options); + continue; + } + if (property.NameEquals("connectionUrls"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectionUrls = ConnectionUrlType.DeserializeConnectionUrlType(property.Value, options); + continue; + } + if (property.NameEquals("dataSafeStatus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dataSafeStatus = new DataSafeStatusType(property.Value.GetString()); + continue; + } + if (property.NameEquals("databaseEdition"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + databaseEdition = new DatabaseEditionType(property.Value.GetString()); + continue; + } + if (property.NameEquals("autonomousDatabaseId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + autonomousDatabaseId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("inMemoryAreaInGbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + inMemoryAreaInGbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("nextLongTermBackupTimeStamp"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLongTermBackupTimeStamp = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("longTermBackupSchedule"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + longTermBackupSchedule = LongTermBackUpScheduleDetails.DeserializeLongTermBackUpScheduleDetails(property.Value, options); + continue; + } + if (property.NameEquals("isPreview"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isPreview = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("localAdgAutoFailoverMaxDataLossLimit"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + localAdgAutoFailoverMaxDataLossLimit = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("memoryPerOracleComputeUnitInGbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + memoryPerOracleComputeUnitInGbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("openMode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + openMode = new OpenModeType(property.Value.GetString()); + continue; + } + if (property.NameEquals("operationsInsightsStatus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + operationsInsightsStatus = new OperationsInsightsStatusType(property.Value.GetString()); + continue; + } + if (property.NameEquals("permissionLevel"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + permissionLevel = new PermissionLevelType(property.Value.GetString()); + continue; + } + if (property.NameEquals("privateEndpoint"u8)) + { + privateEndpoint = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisionableCpus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetInt32()); + } + provisionableCpus = array; + continue; + } + if (property.NameEquals("role"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + role = new RoleType(property.Value.GetString()); + continue; + } + if (property.NameEquals("serviceConsoleUrl"u8)) + { + serviceConsoleUrl = property.Value.GetString(); + continue; + } + if (property.NameEquals("sqlWebDeveloperUrl"u8)) + { + sqlWebDeveloperUrl = property.Value.GetString(); + continue; + } + if (property.NameEquals("supportedRegionsToCloneTo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + supportedRegionsToCloneTo = array; + continue; + } + if (property.NameEquals("timeDataGuardRoleChanged"u8)) + { + timeDataGuardRoleChanged = property.Value.GetString(); + continue; + } + if (property.NameEquals("timeDeletionOfFreeAutonomousDatabase"u8)) + { + timeDeletionOfFreeAutonomousDatabase = property.Value.GetString(); + continue; + } + if (property.NameEquals("timeLocalDataGuardEnabled"u8)) + { + timeLocalDataGuardEnabled = property.Value.GetString(); + continue; + } + if (property.NameEquals("timeOfLastFailover"u8)) + { + timeOfLastFailover = property.Value.GetString(); + continue; + } + if (property.NameEquals("timeOfLastRefresh"u8)) + { + timeOfLastRefresh = property.Value.GetString(); + continue; + } + if (property.NameEquals("timeOfLastRefreshPoint"u8)) + { + timeOfLastRefreshPoint = property.Value.GetString(); + continue; + } + if (property.NameEquals("timeOfLastSwitchover"u8)) + { + timeOfLastSwitchover = property.Value.GetString(); + continue; + } + if (property.NameEquals("timeReclamationOfFreeAutonomousDatabase"u8)) + { + timeReclamationOfFreeAutonomousDatabase = property.Value.GetString(); + continue; + } + if (property.NameEquals("usedDataStorageSizeInGbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + usedDataStorageSizeInGbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("usedDataStorageSizeInTbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + usedDataStorageSizeInTbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("ocid"u8)) + { + ocid = property.Value.GetString(); + continue; + } + if (property.NameEquals("backupRetentionPeriodInDays"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + backupRetentionPeriodInDays = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("whitelistedIps"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + whitelistedIPs = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AutonomousDatabaseCloneProperties( + adminPassword, + dataBaseType, + autonomousMaintenanceScheduleType, + characterSet, + computeCount, + computeModel, + cpuCoreCount, + customerContacts ?? new ChangeTrackingList(), + dataStorageSizeInTbs, + dataStorageSizeInGbs, + dbVersion, + dbWorkload, + displayName, + isAutoScalingEnabled, + isAutoScalingForStorageEnabled, + peerDbIds ?? new ChangeTrackingList(), + peerDbId, + isLocalDataGuardEnabled, + isRemoteDataGuardEnabled, + localDisasterRecoveryType, + timeDisasterRecoveryRoleChanged, + remoteDisasterRecoveryConfiguration, + localStandbyDb, + failedDataRecoveryInSeconds, + isMtlsConnectionRequired, + isPreviewVersionWithServiceTermsAccepted, + licenseModel, + ncharacterSet, + lifecycleDetails, + provisioningState, + lifecycleState, + scheduledOperations, + privateEndpointIP, + privateEndpointLabel, + ociUrl, + subnetId, + vnetId, + timeCreated, + timeMaintenanceBegin, + timeMaintenanceEnd, + actualUsedDataStorageSizeInTbs, + allocatedStorageSizeInTbs, + apexDetails, + availableUpgradeVersions ?? new ChangeTrackingList(), + connectionStrings, + connectionUrls, + dataSafeStatus, + databaseEdition, + autonomousDatabaseId, + inMemoryAreaInGbs, + nextLongTermBackupTimeStamp, + longTermBackupSchedule, + isPreview, + localAdgAutoFailoverMaxDataLossLimit, + memoryPerOracleComputeUnitInGbs, + openMode, + operationsInsightsStatus, + permissionLevel, + privateEndpoint, + provisionableCpus ?? new ChangeTrackingList(), + role, + serviceConsoleUrl, + sqlWebDeveloperUrl, + supportedRegionsToCloneTo ?? new ChangeTrackingList(), + timeDataGuardRoleChanged, + timeDeletionOfFreeAutonomousDatabase, + timeLocalDataGuardEnabled, + timeOfLastFailover, + timeOfLastRefresh, + timeOfLastRefreshPoint, + timeOfLastSwitchover, + timeReclamationOfFreeAutonomousDatabase, + usedDataStorageSizeInGbs, + usedDataStorageSizeInTbs, + ocid, + backupRetentionPeriodInDays, + whitelistedIPs ?? new ChangeTrackingList(), + serializedAdditionalRawData, + source, + sourceId, + cloneType, + isReconnectCloneEnabled, + isRefreshableClone, + refreshableModel, + refreshableStatus, + timeUntilReconnectCloneEnabled); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AutonomousDatabaseCloneProperties)} does not support writing '{options.Format}' format."); + } + } + + AutonomousDatabaseCloneProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAutonomousDatabaseCloneProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AutonomousDatabaseCloneProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseCloneProperties.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseCloneProperties.cs new file mode 100644 index 000000000000..98cc26b3b887 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseCloneProperties.cs @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// Autonomous Database clone resource model. + public partial class AutonomousDatabaseCloneProperties : AutonomousDatabaseBaseProperties + { + /// Initializes a new instance of . + /// The Azure resource ID of the Autonomous Database that was cloned to create the current Autonomous Database. + /// The Autonomous Database clone type. + /// is null. + public AutonomousDatabaseCloneProperties(ResourceIdentifier sourceId, CloneType cloneType) + { + Argument.AssertNotNull(sourceId, nameof(sourceId)); + + SourceId = sourceId; + CloneType = cloneType; + DataBaseType = DataBaseType.Clone; + } + + /// Initializes a new instance of . + /// Admin password. + /// Database type to be created. + /// The maintenance schedule type of the Autonomous Database Serverless. + /// The character set for the autonomous database. + /// The compute amount (CPUs) available to the database. + /// The compute model of the Autonomous Database. + /// The number of CPU cores to be made available to the database. + /// Customer Contacts. + /// The quantity of data in the database, in terabytes. + /// The size, in gigabytes, of the data volume that will be created and attached to the database. + /// A valid Oracle Database version for Autonomous Database. + /// The Autonomous Database workload type. + /// The user-friendly name for the Autonomous Database. + /// Indicates if auto scaling is enabled for the Autonomous Database CPU core count. + /// Indicates if auto scaling is enabled for the Autonomous Database storage. + /// The list of Azure resource IDs of standby databases located in Autonomous Data Guard remote regions that are associated with the source database. Note that for Autonomous Database Serverless instances, standby databases located in the same region as the source primary database do not have Azure IDs. + /// The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current peer database. + /// Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. + /// Indicates whether the Autonomous Database has Cross Region Data Guard enabled. + /// Indicates the local disaster recovery (DR) type of the Autonomous Database Serverless instance.Autonomous Data Guard (ADG) DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover.Backup-based DR type provides lower cost DR with a slower RTO during failover or switchover. + /// The date and time the Disaster Recovery role was switched for the standby Autonomous Database. + /// Indicates remote disaster recovery configuration. + /// Local Autonomous Disaster Recovery standby database details. + /// Indicates the number of seconds of data loss for a Data Guard failover. + /// Specifies if the Autonomous Database requires mTLS connections. + /// Specifies if the Autonomous Database preview version is being provisioned. + /// The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED. + /// The character set for the Autonomous Database. + /// Additional information about the current lifecycle state. + /// Azure resource provisioning state. + /// Views lifecycleState. + /// The list of scheduled operations. + /// The private endpoint Ip address for the resource. + /// The resource's private endpoint label. + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + /// Client subnet. + /// VNET for network connectivity. + /// The date and time that the database was created. + /// The date and time when maintenance will begin. + /// The date and time when maintenance will end. + /// The current amount of storage in use for user and system data, in terabytes (TB). + /// The amount of storage currently allocated for the database tables and billed for, rounded up. + /// Information about Oracle APEX Application Development. + /// List of Oracle Database versions available for a database upgrade. If there are no version upgrades available, this list is empty. + /// The connection string used to connect to the Autonomous Database. + /// The URLs for accessing Oracle Application Express (APEX) and SQL Developer Web with a browser from a Compute instance within your VCN or that has a direct connection to your VCN. + /// Status of the Data Safe registration for this Autonomous Database. + /// The Oracle Database Edition that applies to the Autonomous databases. + /// Autonomous Database ID. + /// The area assigned to In-Memory tables in Autonomous Database. + /// The date and time when the next long-term backup would be created. + /// Details for the long-term backup schedule. + /// Indicates if the Autonomous Database version is a preview version. + /// Parameter that allows users to select an acceptable maximum data loss limit in seconds, up to which Automatic Failover will be triggered when necessary for a Local Autonomous Data Guard. + /// The amount of memory (in GBs) enabled per ECPU or OCPU. + /// Indicates the Autonomous Database mode. + /// Status of Operations Insights for this Autonomous Database. + /// The Autonomous Database permission level. + /// The private endpoint for the resource. + /// An array of CPU values that an Autonomous Database can be scaled to. + /// The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. + /// The URL of the Service Console for the Autonomous Database. + /// The SQL Web Developer URL for the Oracle Autonomous Database. + /// The list of regions that support the creation of an Autonomous Database clone or an Autonomous Data Guard standby database. + /// The date and time the Autonomous Data Guard role was switched for the Autonomous Database. + /// The date and time the Always Free database will be automatically deleted because of inactivity. + /// The date and time that Autonomous Data Guard was enabled for an Autonomous Database where the standby was provisioned in the same region as the primary database. + /// The timestamp of the last failover operation. + /// The date and time when last refresh happened. + /// The refresh point timestamp (UTC). + /// The timestamp of the last switchover operation for the Autonomous Database. + /// The date and time the Always Free database will be stopped because of inactivity. + /// The storage space consumed by Autonomous Database in GBs. + /// The amount of storage that has been used, in terabytes. + /// Database ocid. + /// Retention period, in days, for long-term backups. + /// The client IP access control list (ACL). This is an array of CIDR notations and/or IP addresses. Values should be separate strings, separated by commas. Example: ['1.1.1.1','1.1.1.0/24','1.1.2.25']. + /// Keeps track of any properties unknown to the library. + /// The source of the database. + /// The Azure resource ID of the Autonomous Database that was cloned to create the current Autonomous Database. + /// The Autonomous Database clone type. + /// Indicates if the refreshable clone can be reconnected to its source database. + /// Indicates if the Autonomous Database is a refreshable clone. + /// The refresh mode of the clone. + /// The refresh status of the clone. + /// The time and date as an RFC3339 formatted string, e.g., 2022-01-01T12:00:00.000Z, to set the limit for a refreshable clone to be reconnected to its source database. + internal AutonomousDatabaseCloneProperties(string adminPassword, DataBaseType dataBaseType, AutonomousMaintenanceScheduleType? autonomousMaintenanceScheduleType, string characterSet, float? computeCount, ComputeModel? computeModel, int? cpuCoreCount, IList customerContacts, int? dataStorageSizeInTbs, int? dataStorageSizeInGbs, string dbVersion, WorkloadType? dbWorkload, string displayName, bool? isAutoScalingEnabled, bool? isAutoScalingForStorageEnabled, IReadOnlyList peerDbIds, string peerDbId, bool? isLocalDataGuardEnabled, bool? isRemoteDataGuardEnabled, DisasterRecoveryType? localDisasterRecoveryType, DateTimeOffset? timeDisasterRecoveryRoleChanged, DisasterRecoveryConfigurationDetails remoteDisasterRecoveryConfiguration, AutonomousDatabaseStandbySummary localStandbyDb, int? failedDataRecoveryInSeconds, bool? isMtlsConnectionRequired, bool? isPreviewVersionWithServiceTermsAccepted, LicenseModel? licenseModel, string ncharacterSet, string lifecycleDetails, AzureResourceProvisioningState? provisioningState, AutonomousDatabaseLifecycleState? lifecycleState, ScheduledOperationsType scheduledOperations, string privateEndpointIP, string privateEndpointLabel, string ociUri, ResourceIdentifier subnetId, ResourceIdentifier vnetId, DateTimeOffset? timeCreated, DateTimeOffset? timeMaintenanceBegin, DateTimeOffset? timeMaintenanceEnd, double? actualUsedDataStorageSizeInTbs, double? allocatedStorageSizeInTbs, ApexDetailsType apexDetails, IReadOnlyList availableUpgradeVersions, ConnectionStringType connectionStrings, ConnectionUrlType connectionUrls, DataSafeStatusType? dataSafeStatus, DatabaseEditionType? databaseEdition, ResourceIdentifier autonomousDatabaseId, int? inMemoryAreaInGbs, DateTimeOffset? nextLongTermBackupTimeStamp, LongTermBackUpScheduleDetails longTermBackupSchedule, bool? isPreview, int? localAdgAutoFailoverMaxDataLossLimit, int? memoryPerOracleComputeUnitInGbs, OpenModeType? openMode, OperationsInsightsStatusType? operationsInsightsStatus, PermissionLevelType? permissionLevel, string privateEndpoint, IReadOnlyList provisionableCpus, RoleType? role, string serviceConsoleUri, string sqlWebDeveloperUri, IReadOnlyList supportedRegionsToCloneTo, string timeDataGuardRoleChanged, string timeDeletionOfFreeAutonomousDatabase, string timeLocalDataGuardEnabled, string timeOfLastFailover, string timeOfLastRefresh, string timeOfLastRefreshPoint, string timeOfLastSwitchover, string timeReclamationOfFreeAutonomousDatabase, int? usedDataStorageSizeInGbs, int? usedDataStorageSizeInTbs, string ocid, int? backupRetentionPeriodInDays, IList whitelistedIPs, IDictionary serializedAdditionalRawData, SourceType? source, ResourceIdentifier sourceId, CloneType cloneType, bool? isReconnectCloneEnabled, bool? isRefreshableClone, RefreshableModelType? refreshableModel, RefreshableStatusType? refreshableStatus, string timeUntilReconnectCloneEnabled) : base(adminPassword, dataBaseType, autonomousMaintenanceScheduleType, characterSet, computeCount, computeModel, cpuCoreCount, customerContacts, dataStorageSizeInTbs, dataStorageSizeInGbs, dbVersion, dbWorkload, displayName, isAutoScalingEnabled, isAutoScalingForStorageEnabled, peerDbIds, peerDbId, isLocalDataGuardEnabled, isRemoteDataGuardEnabled, localDisasterRecoveryType, timeDisasterRecoveryRoleChanged, remoteDisasterRecoveryConfiguration, localStandbyDb, failedDataRecoveryInSeconds, isMtlsConnectionRequired, isPreviewVersionWithServiceTermsAccepted, licenseModel, ncharacterSet, lifecycleDetails, provisioningState, lifecycleState, scheduledOperations, privateEndpointIP, privateEndpointLabel, ociUri, subnetId, vnetId, timeCreated, timeMaintenanceBegin, timeMaintenanceEnd, actualUsedDataStorageSizeInTbs, allocatedStorageSizeInTbs, apexDetails, availableUpgradeVersions, connectionStrings, connectionUrls, dataSafeStatus, databaseEdition, autonomousDatabaseId, inMemoryAreaInGbs, nextLongTermBackupTimeStamp, longTermBackupSchedule, isPreview, localAdgAutoFailoverMaxDataLossLimit, memoryPerOracleComputeUnitInGbs, openMode, operationsInsightsStatus, permissionLevel, privateEndpoint, provisionableCpus, role, serviceConsoleUri, sqlWebDeveloperUri, supportedRegionsToCloneTo, timeDataGuardRoleChanged, timeDeletionOfFreeAutonomousDatabase, timeLocalDataGuardEnabled, timeOfLastFailover, timeOfLastRefresh, timeOfLastRefreshPoint, timeOfLastSwitchover, timeReclamationOfFreeAutonomousDatabase, usedDataStorageSizeInGbs, usedDataStorageSizeInTbs, ocid, backupRetentionPeriodInDays, whitelistedIPs, serializedAdditionalRawData) + { + Source = source; + SourceId = sourceId; + CloneType = cloneType; + IsReconnectCloneEnabled = isReconnectCloneEnabled; + IsRefreshableClone = isRefreshableClone; + RefreshableModel = refreshableModel; + RefreshableStatus = refreshableStatus; + TimeUntilReconnectCloneEnabled = timeUntilReconnectCloneEnabled; + DataBaseType = dataBaseType; + } + + /// Initializes a new instance of for deserialization. + internal AutonomousDatabaseCloneProperties() + { + } + + /// The source of the database. + public SourceType? Source { get; set; } + /// The Azure resource ID of the Autonomous Database that was cloned to create the current Autonomous Database. + public ResourceIdentifier SourceId { get; set; } + /// The Autonomous Database clone type. + public CloneType CloneType { get; set; } + /// Indicates if the refreshable clone can be reconnected to its source database. + public bool? IsReconnectCloneEnabled { get; } + /// Indicates if the Autonomous Database is a refreshable clone. + public bool? IsRefreshableClone { get; } + /// The refresh mode of the clone. + public RefreshableModelType? RefreshableModel { get; set; } + /// The refresh status of the clone. + public RefreshableStatusType? RefreshableStatus { get; } + /// The time and date as an RFC3339 formatted string, e.g., 2022-01-01T12:00:00.000Z, to set the limit for a refreshable clone to be reconnected to its source database. + public string TimeUntilReconnectCloneEnabled { get; set; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseCrossRegionDisasterRecoveryProperties.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseCrossRegionDisasterRecoveryProperties.Serialization.cs new file mode 100644 index 000000000000..f37f24c30de6 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseCrossRegionDisasterRecoveryProperties.Serialization.cs @@ -0,0 +1,957 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + public partial class AutonomousDatabaseCrossRegionDisasterRecoveryProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AutonomousDatabaseCrossRegionDisasterRecoveryProperties)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("source"u8); + writer.WriteStringValue(Source.ToString()); + writer.WritePropertyName("sourceId"u8); + writer.WriteStringValue(SourceId); + if (Optional.IsDefined(SourceLocation)) + { + writer.WritePropertyName("sourceLocation"u8); + writer.WriteStringValue(SourceLocation); + } + if (Optional.IsDefined(SourceOcid)) + { + writer.WritePropertyName("sourceOcid"u8); + writer.WriteStringValue(SourceOcid); + } + writer.WritePropertyName("remoteDisasterRecoveryType"u8); + writer.WriteStringValue(RemoteDisasterRecoveryType.ToString()); + if (Optional.IsDefined(IsReplicateAutomaticBackups)) + { + writer.WritePropertyName("isReplicateAutomaticBackups"u8); + writer.WriteBooleanValue(IsReplicateAutomaticBackups.Value); + } + } + + AutonomousDatabaseCrossRegionDisasterRecoveryProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AutonomousDatabaseCrossRegionDisasterRecoveryProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAutonomousDatabaseCrossRegionDisasterRecoveryProperties(document.RootElement, options); + } + + internal static AutonomousDatabaseCrossRegionDisasterRecoveryProperties DeserializeAutonomousDatabaseCrossRegionDisasterRecoveryProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + SourceType source = default; + ResourceIdentifier sourceId = default; + string sourceLocation = default; + string sourceOcid = default; + DisasterRecoveryType remoteDisasterRecoveryType = default; + bool? isReplicateAutomaticBackups = default; + string adminPassword = default; + DataBaseType dataBaseType = default; + AutonomousMaintenanceScheduleType? autonomousMaintenanceScheduleType = default; + string characterSet = default; + float? computeCount = default; + ComputeModel? computeModel = default; + int? cpuCoreCount = default; + IList customerContacts = default; + int? dataStorageSizeInTbs = default; + int? dataStorageSizeInGbs = default; + string dbVersion = default; + WorkloadType? dbWorkload = default; + string displayName = default; + bool? isAutoScalingEnabled = default; + bool? isAutoScalingForStorageEnabled = default; + IReadOnlyList peerDbIds = default; + string peerDbId = default; + bool? isLocalDataGuardEnabled = default; + bool? isRemoteDataGuardEnabled = default; + DisasterRecoveryType? localDisasterRecoveryType = default; + DateTimeOffset? timeDisasterRecoveryRoleChanged = default; + DisasterRecoveryConfigurationDetails remoteDisasterRecoveryConfiguration = default; + AutonomousDatabaseStandbySummary localStandbyDb = default; + int? failedDataRecoveryInSeconds = default; + bool? isMtlsConnectionRequired = default; + bool? isPreviewVersionWithServiceTermsAccepted = default; + LicenseModel? licenseModel = default; + string ncharacterSet = default; + string lifecycleDetails = default; + AzureResourceProvisioningState? provisioningState = default; + AutonomousDatabaseLifecycleState? lifecycleState = default; + ScheduledOperationsType scheduledOperations = default; + string privateEndpointIP = default; + string privateEndpointLabel = default; + string ociUrl = default; + ResourceIdentifier subnetId = default; + ResourceIdentifier vnetId = default; + DateTimeOffset? timeCreated = default; + DateTimeOffset? timeMaintenanceBegin = default; + DateTimeOffset? timeMaintenanceEnd = default; + double? actualUsedDataStorageSizeInTbs = default; + double? allocatedStorageSizeInTbs = default; + ApexDetailsType apexDetails = default; + IReadOnlyList availableUpgradeVersions = default; + ConnectionStringType connectionStrings = default; + ConnectionUrlType connectionUrls = default; + DataSafeStatusType? dataSafeStatus = default; + DatabaseEditionType? databaseEdition = default; + ResourceIdentifier autonomousDatabaseId = default; + int? inMemoryAreaInGbs = default; + DateTimeOffset? nextLongTermBackupTimeStamp = default; + LongTermBackUpScheduleDetails longTermBackupSchedule = default; + bool? isPreview = default; + int? localAdgAutoFailoverMaxDataLossLimit = default; + int? memoryPerOracleComputeUnitInGbs = default; + OpenModeType? openMode = default; + OperationsInsightsStatusType? operationsInsightsStatus = default; + PermissionLevelType? permissionLevel = default; + string privateEndpoint = default; + IReadOnlyList provisionableCpus = default; + RoleType? role = default; + string serviceConsoleUrl = default; + string sqlWebDeveloperUrl = default; + IReadOnlyList supportedRegionsToCloneTo = default; + string timeDataGuardRoleChanged = default; + string timeDeletionOfFreeAutonomousDatabase = default; + string timeLocalDataGuardEnabled = default; + string timeOfLastFailover = default; + string timeOfLastRefresh = default; + string timeOfLastRefreshPoint = default; + string timeOfLastSwitchover = default; + string timeReclamationOfFreeAutonomousDatabase = default; + int? usedDataStorageSizeInGbs = default; + int? usedDataStorageSizeInTbs = default; + string ocid = default; + int? backupRetentionPeriodInDays = default; + IList whitelistedIPs = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("source"u8)) + { + source = new SourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("sourceId"u8)) + { + sourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("sourceLocation"u8)) + { + sourceLocation = property.Value.GetString(); + continue; + } + if (property.NameEquals("sourceOcid"u8)) + { + sourceOcid = property.Value.GetString(); + continue; + } + if (property.NameEquals("remoteDisasterRecoveryType"u8)) + { + remoteDisasterRecoveryType = new DisasterRecoveryType(property.Value.GetString()); + continue; + } + if (property.NameEquals("isReplicateAutomaticBackups"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isReplicateAutomaticBackups = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("adminPassword"u8)) + { + adminPassword = property.Value.GetString(); + continue; + } + if (property.NameEquals("dataBaseType"u8)) + { + dataBaseType = new DataBaseType(property.Value.GetString()); + continue; + } + if (property.NameEquals("autonomousMaintenanceScheduleType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + autonomousMaintenanceScheduleType = new AutonomousMaintenanceScheduleType(property.Value.GetString()); + continue; + } + if (property.NameEquals("characterSet"u8)) + { + characterSet = property.Value.GetString(); + continue; + } + if (property.NameEquals("computeCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + computeCount = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("computeModel"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + computeModel = new ComputeModel(property.Value.GetString()); + continue; + } + if (property.NameEquals("cpuCoreCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + cpuCoreCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("customerContacts"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(CustomerContact.DeserializeCustomerContact(item, options)); + } + customerContacts = array; + continue; + } + if (property.NameEquals("dataStorageSizeInTbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dataStorageSizeInTbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("dataStorageSizeInGbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dataStorageSizeInGbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("dbVersion"u8)) + { + dbVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("dbWorkload"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dbWorkload = new WorkloadType(property.Value.GetString()); + continue; + } + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("isAutoScalingEnabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isAutoScalingEnabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("isAutoScalingForStorageEnabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isAutoScalingForStorageEnabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("peerDbIds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + peerDbIds = array; + continue; + } + if (property.NameEquals("peerDbId"u8)) + { + peerDbId = property.Value.GetString(); + continue; + } + if (property.NameEquals("isLocalDataGuardEnabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isLocalDataGuardEnabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("isRemoteDataGuardEnabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isRemoteDataGuardEnabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("localDisasterRecoveryType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + localDisasterRecoveryType = new DisasterRecoveryType(property.Value.GetString()); + continue; + } + if (property.NameEquals("timeDisasterRecoveryRoleChanged"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeDisasterRecoveryRoleChanged = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("remoteDisasterRecoveryConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + remoteDisasterRecoveryConfiguration = DisasterRecoveryConfigurationDetails.DeserializeDisasterRecoveryConfigurationDetails(property.Value, options); + continue; + } + if (property.NameEquals("localStandbyDb"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + localStandbyDb = AutonomousDatabaseStandbySummary.DeserializeAutonomousDatabaseStandbySummary(property.Value, options); + continue; + } + if (property.NameEquals("failedDataRecoveryInSeconds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + failedDataRecoveryInSeconds = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("isMtlsConnectionRequired"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isMtlsConnectionRequired = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("isPreviewVersionWithServiceTermsAccepted"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isPreviewVersionWithServiceTermsAccepted = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("licenseModel"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + licenseModel = new LicenseModel(property.Value.GetString()); + continue; + } + if (property.NameEquals("ncharacterSet"u8)) + { + ncharacterSet = property.Value.GetString(); + continue; + } + if (property.NameEquals("lifecycleDetails"u8)) + { + lifecycleDetails = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new AzureResourceProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("lifecycleState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lifecycleState = new AutonomousDatabaseLifecycleState(property.Value.GetString()); + continue; + } + if (property.NameEquals("scheduledOperations"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + scheduledOperations = ScheduledOperationsType.DeserializeScheduledOperationsType(property.Value, options); + continue; + } + if (property.NameEquals("privateEndpointIp"u8)) + { + privateEndpointIP = property.Value.GetString(); + continue; + } + if (property.NameEquals("privateEndpointLabel"u8)) + { + privateEndpointLabel = property.Value.GetString(); + continue; + } + if (property.NameEquals("ociUrl"u8)) + { + ociUrl = property.Value.GetString(); + continue; + } + if (property.NameEquals("subnetId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + subnetId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("vnetId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + vnetId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("timeCreated"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeCreated = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("timeMaintenanceBegin"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeMaintenanceBegin = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("timeMaintenanceEnd"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeMaintenanceEnd = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("actualUsedDataStorageSizeInTbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + actualUsedDataStorageSizeInTbs = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("allocatedStorageSizeInTbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + allocatedStorageSizeInTbs = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("apexDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + apexDetails = ApexDetailsType.DeserializeApexDetailsType(property.Value, options); + continue; + } + if (property.NameEquals("availableUpgradeVersions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + availableUpgradeVersions = array; + continue; + } + if (property.NameEquals("connectionStrings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectionStrings = ConnectionStringType.DeserializeConnectionStringType(property.Value, options); + continue; + } + if (property.NameEquals("connectionUrls"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectionUrls = ConnectionUrlType.DeserializeConnectionUrlType(property.Value, options); + continue; + } + if (property.NameEquals("dataSafeStatus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dataSafeStatus = new DataSafeStatusType(property.Value.GetString()); + continue; + } + if (property.NameEquals("databaseEdition"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + databaseEdition = new DatabaseEditionType(property.Value.GetString()); + continue; + } + if (property.NameEquals("autonomousDatabaseId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + autonomousDatabaseId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("inMemoryAreaInGbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + inMemoryAreaInGbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("nextLongTermBackupTimeStamp"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLongTermBackupTimeStamp = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("longTermBackupSchedule"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + longTermBackupSchedule = LongTermBackUpScheduleDetails.DeserializeLongTermBackUpScheduleDetails(property.Value, options); + continue; + } + if (property.NameEquals("isPreview"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isPreview = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("localAdgAutoFailoverMaxDataLossLimit"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + localAdgAutoFailoverMaxDataLossLimit = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("memoryPerOracleComputeUnitInGbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + memoryPerOracleComputeUnitInGbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("openMode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + openMode = new OpenModeType(property.Value.GetString()); + continue; + } + if (property.NameEquals("operationsInsightsStatus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + operationsInsightsStatus = new OperationsInsightsStatusType(property.Value.GetString()); + continue; + } + if (property.NameEquals("permissionLevel"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + permissionLevel = new PermissionLevelType(property.Value.GetString()); + continue; + } + if (property.NameEquals("privateEndpoint"u8)) + { + privateEndpoint = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisionableCpus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetInt32()); + } + provisionableCpus = array; + continue; + } + if (property.NameEquals("role"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + role = new RoleType(property.Value.GetString()); + continue; + } + if (property.NameEquals("serviceConsoleUrl"u8)) + { + serviceConsoleUrl = property.Value.GetString(); + continue; + } + if (property.NameEquals("sqlWebDeveloperUrl"u8)) + { + sqlWebDeveloperUrl = property.Value.GetString(); + continue; + } + if (property.NameEquals("supportedRegionsToCloneTo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + supportedRegionsToCloneTo = array; + continue; + } + if (property.NameEquals("timeDataGuardRoleChanged"u8)) + { + timeDataGuardRoleChanged = property.Value.GetString(); + continue; + } + if (property.NameEquals("timeDeletionOfFreeAutonomousDatabase"u8)) + { + timeDeletionOfFreeAutonomousDatabase = property.Value.GetString(); + continue; + } + if (property.NameEquals("timeLocalDataGuardEnabled"u8)) + { + timeLocalDataGuardEnabled = property.Value.GetString(); + continue; + } + if (property.NameEquals("timeOfLastFailover"u8)) + { + timeOfLastFailover = property.Value.GetString(); + continue; + } + if (property.NameEquals("timeOfLastRefresh"u8)) + { + timeOfLastRefresh = property.Value.GetString(); + continue; + } + if (property.NameEquals("timeOfLastRefreshPoint"u8)) + { + timeOfLastRefreshPoint = property.Value.GetString(); + continue; + } + if (property.NameEquals("timeOfLastSwitchover"u8)) + { + timeOfLastSwitchover = property.Value.GetString(); + continue; + } + if (property.NameEquals("timeReclamationOfFreeAutonomousDatabase"u8)) + { + timeReclamationOfFreeAutonomousDatabase = property.Value.GetString(); + continue; + } + if (property.NameEquals("usedDataStorageSizeInGbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + usedDataStorageSizeInGbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("usedDataStorageSizeInTbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + usedDataStorageSizeInTbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("ocid"u8)) + { + ocid = property.Value.GetString(); + continue; + } + if (property.NameEquals("backupRetentionPeriodInDays"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + backupRetentionPeriodInDays = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("whitelistedIps"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + whitelistedIPs = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AutonomousDatabaseCrossRegionDisasterRecoveryProperties( + adminPassword, + dataBaseType, + autonomousMaintenanceScheduleType, + characterSet, + computeCount, + computeModel, + cpuCoreCount, + customerContacts ?? new ChangeTrackingList(), + dataStorageSizeInTbs, + dataStorageSizeInGbs, + dbVersion, + dbWorkload, + displayName, + isAutoScalingEnabled, + isAutoScalingForStorageEnabled, + peerDbIds ?? new ChangeTrackingList(), + peerDbId, + isLocalDataGuardEnabled, + isRemoteDataGuardEnabled, + localDisasterRecoveryType, + timeDisasterRecoveryRoleChanged, + remoteDisasterRecoveryConfiguration, + localStandbyDb, + failedDataRecoveryInSeconds, + isMtlsConnectionRequired, + isPreviewVersionWithServiceTermsAccepted, + licenseModel, + ncharacterSet, + lifecycleDetails, + provisioningState, + lifecycleState, + scheduledOperations, + privateEndpointIP, + privateEndpointLabel, + ociUrl, + subnetId, + vnetId, + timeCreated, + timeMaintenanceBegin, + timeMaintenanceEnd, + actualUsedDataStorageSizeInTbs, + allocatedStorageSizeInTbs, + apexDetails, + availableUpgradeVersions ?? new ChangeTrackingList(), + connectionStrings, + connectionUrls, + dataSafeStatus, + databaseEdition, + autonomousDatabaseId, + inMemoryAreaInGbs, + nextLongTermBackupTimeStamp, + longTermBackupSchedule, + isPreview, + localAdgAutoFailoverMaxDataLossLimit, + memoryPerOracleComputeUnitInGbs, + openMode, + operationsInsightsStatus, + permissionLevel, + privateEndpoint, + provisionableCpus ?? new ChangeTrackingList(), + role, + serviceConsoleUrl, + sqlWebDeveloperUrl, + supportedRegionsToCloneTo ?? new ChangeTrackingList(), + timeDataGuardRoleChanged, + timeDeletionOfFreeAutonomousDatabase, + timeLocalDataGuardEnabled, + timeOfLastFailover, + timeOfLastRefresh, + timeOfLastRefreshPoint, + timeOfLastSwitchover, + timeReclamationOfFreeAutonomousDatabase, + usedDataStorageSizeInGbs, + usedDataStorageSizeInTbs, + ocid, + backupRetentionPeriodInDays, + whitelistedIPs ?? new ChangeTrackingList(), + serializedAdditionalRawData, + source, + sourceId, + sourceLocation, + sourceOcid, + remoteDisasterRecoveryType, + isReplicateAutomaticBackups); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AutonomousDatabaseCrossRegionDisasterRecoveryProperties)} does not support writing '{options.Format}' format."); + } + } + + AutonomousDatabaseCrossRegionDisasterRecoveryProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAutonomousDatabaseCrossRegionDisasterRecoveryProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AutonomousDatabaseCrossRegionDisasterRecoveryProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseCrossRegionDisasterRecoveryProperties.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseCrossRegionDisasterRecoveryProperties.cs new file mode 100644 index 000000000000..576720a19267 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseCrossRegionDisasterRecoveryProperties.cs @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// Autonomous Database Cross Region Disaster Recovery resource model. + public partial class AutonomousDatabaseCrossRegionDisasterRecoveryProperties : AutonomousDatabaseBaseProperties + { + /// Initializes a new instance of . + /// The Azure ID of the source Autonomous Database that will be used to create a new peer database for the DR association. + /// Indicates the cross-region disaster recovery (DR) type of the standby Autonomous Database Serverless instance. Autonomous Data Guard (ADG) DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover. Backup-based DR type provides lower cost DR with a slower RTO during failover or switchover. + /// is null. + public AutonomousDatabaseCrossRegionDisasterRecoveryProperties(ResourceIdentifier sourceId, DisasterRecoveryType remoteDisasterRecoveryType) + { + Argument.AssertNotNull(sourceId, nameof(sourceId)); + + Source = SourceType.CrossRegionDisasterRecovery; + SourceId = sourceId; + RemoteDisasterRecoveryType = remoteDisasterRecoveryType; + DataBaseType = DataBaseType.CrossRegionDisasterRecovery; + } + + /// Initializes a new instance of . + /// Admin password. + /// Database type to be created. + /// The maintenance schedule type of the Autonomous Database Serverless. + /// The character set for the autonomous database. + /// The compute amount (CPUs) available to the database. + /// The compute model of the Autonomous Database. + /// The number of CPU cores to be made available to the database. + /// Customer Contacts. + /// The quantity of data in the database, in terabytes. + /// The size, in gigabytes, of the data volume that will be created and attached to the database. + /// A valid Oracle Database version for Autonomous Database. + /// The Autonomous Database workload type. + /// The user-friendly name for the Autonomous Database. + /// Indicates if auto scaling is enabled for the Autonomous Database CPU core count. + /// Indicates if auto scaling is enabled for the Autonomous Database storage. + /// The list of Azure resource IDs of standby databases located in Autonomous Data Guard remote regions that are associated with the source database. Note that for Autonomous Database Serverless instances, standby databases located in the same region as the source primary database do not have Azure IDs. + /// The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current peer database. + /// Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. + /// Indicates whether the Autonomous Database has Cross Region Data Guard enabled. + /// Indicates the local disaster recovery (DR) type of the Autonomous Database Serverless instance.Autonomous Data Guard (ADG) DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover.Backup-based DR type provides lower cost DR with a slower RTO during failover or switchover. + /// The date and time the Disaster Recovery role was switched for the standby Autonomous Database. + /// Indicates remote disaster recovery configuration. + /// Local Autonomous Disaster Recovery standby database details. + /// Indicates the number of seconds of data loss for a Data Guard failover. + /// Specifies if the Autonomous Database requires mTLS connections. + /// Specifies if the Autonomous Database preview version is being provisioned. + /// The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED. + /// The character set for the Autonomous Database. + /// Additional information about the current lifecycle state. + /// Azure resource provisioning state. + /// Views lifecycleState. + /// The list of scheduled operations. + /// The private endpoint Ip address for the resource. + /// The resource's private endpoint label. + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + /// Client subnet. + /// VNET for network connectivity. + /// The date and time that the database was created. + /// The date and time when maintenance will begin. + /// The date and time when maintenance will end. + /// The current amount of storage in use for user and system data, in terabytes (TB). + /// The amount of storage currently allocated for the database tables and billed for, rounded up. + /// Information about Oracle APEX Application Development. + /// List of Oracle Database versions available for a database upgrade. If there are no version upgrades available, this list is empty. + /// The connection string used to connect to the Autonomous Database. + /// The URLs for accessing Oracle Application Express (APEX) and SQL Developer Web with a browser from a Compute instance within your VCN or that has a direct connection to your VCN. + /// Status of the Data Safe registration for this Autonomous Database. + /// The Oracle Database Edition that applies to the Autonomous databases. + /// Autonomous Database ID. + /// The area assigned to In-Memory tables in Autonomous Database. + /// The date and time when the next long-term backup would be created. + /// Details for the long-term backup schedule. + /// Indicates if the Autonomous Database version is a preview version. + /// Parameter that allows users to select an acceptable maximum data loss limit in seconds, up to which Automatic Failover will be triggered when necessary for a Local Autonomous Data Guard. + /// The amount of memory (in GBs) enabled per ECPU or OCPU. + /// Indicates the Autonomous Database mode. + /// Status of Operations Insights for this Autonomous Database. + /// The Autonomous Database permission level. + /// The private endpoint for the resource. + /// An array of CPU values that an Autonomous Database can be scaled to. + /// The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. + /// The URL of the Service Console for the Autonomous Database. + /// The SQL Web Developer URL for the Oracle Autonomous Database. + /// The list of regions that support the creation of an Autonomous Database clone or an Autonomous Data Guard standby database. + /// The date and time the Autonomous Data Guard role was switched for the Autonomous Database. + /// The date and time the Always Free database will be automatically deleted because of inactivity. + /// The date and time that Autonomous Data Guard was enabled for an Autonomous Database where the standby was provisioned in the same region as the primary database. + /// The timestamp of the last failover operation. + /// The date and time when last refresh happened. + /// The refresh point timestamp (UTC). + /// The timestamp of the last switchover operation for the Autonomous Database. + /// The date and time the Always Free database will be stopped because of inactivity. + /// The storage space consumed by Autonomous Database in GBs. + /// The amount of storage that has been used, in terabytes. + /// Database ocid. + /// Retention period, in days, for long-term backups. + /// The client IP access control list (ACL). This is an array of CIDR notations and/or IP addresses. Values should be separate strings, separated by commas. Example: ['1.1.1.1','1.1.1.0/24','1.1.2.25']. + /// Keeps track of any properties unknown to the library. + /// The source of the database. + /// The Azure ID of the source Autonomous Database that will be used to create a new peer database for the DR association. + /// The name of the region where source Autonomous Database exists. + /// The source database ocid. + /// Indicates the cross-region disaster recovery (DR) type of the standby Autonomous Database Serverless instance. Autonomous Data Guard (ADG) DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover. Backup-based DR type provides lower cost DR with a slower RTO during failover or switchover. + /// If true, 7 days worth of backups are replicated across regions for Cross-Region ADB or Backup-Based DR between Primary and Standby. If false, the backups taken on the Primary are not replicated to the Standby database. + internal AutonomousDatabaseCrossRegionDisasterRecoveryProperties(string adminPassword, DataBaseType dataBaseType, AutonomousMaintenanceScheduleType? autonomousMaintenanceScheduleType, string characterSet, float? computeCount, ComputeModel? computeModel, int? cpuCoreCount, IList customerContacts, int? dataStorageSizeInTbs, int? dataStorageSizeInGbs, string dbVersion, WorkloadType? dbWorkload, string displayName, bool? isAutoScalingEnabled, bool? isAutoScalingForStorageEnabled, IReadOnlyList peerDbIds, string peerDbId, bool? isLocalDataGuardEnabled, bool? isRemoteDataGuardEnabled, DisasterRecoveryType? localDisasterRecoveryType, DateTimeOffset? timeDisasterRecoveryRoleChanged, DisasterRecoveryConfigurationDetails remoteDisasterRecoveryConfiguration, AutonomousDatabaseStandbySummary localStandbyDb, int? failedDataRecoveryInSeconds, bool? isMtlsConnectionRequired, bool? isPreviewVersionWithServiceTermsAccepted, LicenseModel? licenseModel, string ncharacterSet, string lifecycleDetails, AzureResourceProvisioningState? provisioningState, AutonomousDatabaseLifecycleState? lifecycleState, ScheduledOperationsType scheduledOperations, string privateEndpointIP, string privateEndpointLabel, string ociUri, ResourceIdentifier subnetId, ResourceIdentifier vnetId, DateTimeOffset? timeCreated, DateTimeOffset? timeMaintenanceBegin, DateTimeOffset? timeMaintenanceEnd, double? actualUsedDataStorageSizeInTbs, double? allocatedStorageSizeInTbs, ApexDetailsType apexDetails, IReadOnlyList availableUpgradeVersions, ConnectionStringType connectionStrings, ConnectionUrlType connectionUrls, DataSafeStatusType? dataSafeStatus, DatabaseEditionType? databaseEdition, ResourceIdentifier autonomousDatabaseId, int? inMemoryAreaInGbs, DateTimeOffset? nextLongTermBackupTimeStamp, LongTermBackUpScheduleDetails longTermBackupSchedule, bool? isPreview, int? localAdgAutoFailoverMaxDataLossLimit, int? memoryPerOracleComputeUnitInGbs, OpenModeType? openMode, OperationsInsightsStatusType? operationsInsightsStatus, PermissionLevelType? permissionLevel, string privateEndpoint, IReadOnlyList provisionableCpus, RoleType? role, string serviceConsoleUri, string sqlWebDeveloperUri, IReadOnlyList supportedRegionsToCloneTo, string timeDataGuardRoleChanged, string timeDeletionOfFreeAutonomousDatabase, string timeLocalDataGuardEnabled, string timeOfLastFailover, string timeOfLastRefresh, string timeOfLastRefreshPoint, string timeOfLastSwitchover, string timeReclamationOfFreeAutonomousDatabase, int? usedDataStorageSizeInGbs, int? usedDataStorageSizeInTbs, string ocid, int? backupRetentionPeriodInDays, IList whitelistedIPs, IDictionary serializedAdditionalRawData, SourceType source, ResourceIdentifier sourceId, string sourceLocation, string sourceOcid, DisasterRecoveryType remoteDisasterRecoveryType, bool? isReplicateAutomaticBackups) : base(adminPassword, dataBaseType, autonomousMaintenanceScheduleType, characterSet, computeCount, computeModel, cpuCoreCount, customerContacts, dataStorageSizeInTbs, dataStorageSizeInGbs, dbVersion, dbWorkload, displayName, isAutoScalingEnabled, isAutoScalingForStorageEnabled, peerDbIds, peerDbId, isLocalDataGuardEnabled, isRemoteDataGuardEnabled, localDisasterRecoveryType, timeDisasterRecoveryRoleChanged, remoteDisasterRecoveryConfiguration, localStandbyDb, failedDataRecoveryInSeconds, isMtlsConnectionRequired, isPreviewVersionWithServiceTermsAccepted, licenseModel, ncharacterSet, lifecycleDetails, provisioningState, lifecycleState, scheduledOperations, privateEndpointIP, privateEndpointLabel, ociUri, subnetId, vnetId, timeCreated, timeMaintenanceBegin, timeMaintenanceEnd, actualUsedDataStorageSizeInTbs, allocatedStorageSizeInTbs, apexDetails, availableUpgradeVersions, connectionStrings, connectionUrls, dataSafeStatus, databaseEdition, autonomousDatabaseId, inMemoryAreaInGbs, nextLongTermBackupTimeStamp, longTermBackupSchedule, isPreview, localAdgAutoFailoverMaxDataLossLimit, memoryPerOracleComputeUnitInGbs, openMode, operationsInsightsStatus, permissionLevel, privateEndpoint, provisionableCpus, role, serviceConsoleUri, sqlWebDeveloperUri, supportedRegionsToCloneTo, timeDataGuardRoleChanged, timeDeletionOfFreeAutonomousDatabase, timeLocalDataGuardEnabled, timeOfLastFailover, timeOfLastRefresh, timeOfLastRefreshPoint, timeOfLastSwitchover, timeReclamationOfFreeAutonomousDatabase, usedDataStorageSizeInGbs, usedDataStorageSizeInTbs, ocid, backupRetentionPeriodInDays, whitelistedIPs, serializedAdditionalRawData) + { + Source = source; + SourceId = sourceId; + SourceLocation = sourceLocation; + SourceOcid = sourceOcid; + RemoteDisasterRecoveryType = remoteDisasterRecoveryType; + IsReplicateAutomaticBackups = isReplicateAutomaticBackups; + DataBaseType = dataBaseType; + } + + /// Initializes a new instance of for deserialization. + internal AutonomousDatabaseCrossRegionDisasterRecoveryProperties() + { + } + + /// The source of the database. + public SourceType Source { get; } + /// The Azure ID of the source Autonomous Database that will be used to create a new peer database for the DR association. + public ResourceIdentifier SourceId { get; set; } + /// The name of the region where source Autonomous Database exists. + public string SourceLocation { get; set; } + /// The source database ocid. + public string SourceOcid { get; set; } + /// Indicates the cross-region disaster recovery (DR) type of the standby Autonomous Database Serverless instance. Autonomous Data Guard (ADG) DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover. Backup-based DR type provides lower cost DR with a slower RTO during failover or switchover. + public DisasterRecoveryType RemoteDisasterRecoveryType { get; set; } + /// If true, 7 days worth of backups are replicated across regions for Cross-Region ADB or Backup-Based DR between Primary and Standby. If false, the backups taken on the Primary are not replicated to the Standby database. + public bool? IsReplicateAutomaticBackups { get; set; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseFromBackupTimestampProperties.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseFromBackupTimestampProperties.Serialization.cs new file mode 100644 index 000000000000..613aac12de77 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseFromBackupTimestampProperties.Serialization.cs @@ -0,0 +1,949 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + public partial class AutonomousDatabaseFromBackupTimestampProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AutonomousDatabaseFromBackupTimestampProperties)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("source"u8); + writer.WriteStringValue(Source.ToString()); + writer.WritePropertyName("sourceId"u8); + writer.WriteStringValue(SourceId); + writer.WritePropertyName("cloneType"u8); + writer.WriteStringValue(CloneType.ToString()); + if (Optional.IsDefined(Timestamp)) + { + writer.WritePropertyName("timestamp"u8); + writer.WriteStringValue(Timestamp.Value, "O"); + } + if (Optional.IsDefined(UseLatestAvailableBackupTimeStamp)) + { + writer.WritePropertyName("useLatestAvailableBackupTimeStamp"u8); + writer.WriteBooleanValue(UseLatestAvailableBackupTimeStamp.Value); + } + } + + AutonomousDatabaseFromBackupTimestampProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AutonomousDatabaseFromBackupTimestampProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAutonomousDatabaseFromBackupTimestampProperties(document.RootElement, options); + } + + internal static AutonomousDatabaseFromBackupTimestampProperties DeserializeAutonomousDatabaseFromBackupTimestampProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + SourceType source = default; + ResourceIdentifier sourceId = default; + CloneType cloneType = default; + DateTimeOffset? timestamp = default; + bool? useLatestAvailableBackupTimeStamp = default; + string adminPassword = default; + DataBaseType dataBaseType = default; + AutonomousMaintenanceScheduleType? autonomousMaintenanceScheduleType = default; + string characterSet = default; + float? computeCount = default; + ComputeModel? computeModel = default; + int? cpuCoreCount = default; + IList customerContacts = default; + int? dataStorageSizeInTbs = default; + int? dataStorageSizeInGbs = default; + string dbVersion = default; + WorkloadType? dbWorkload = default; + string displayName = default; + bool? isAutoScalingEnabled = default; + bool? isAutoScalingForStorageEnabled = default; + IReadOnlyList peerDbIds = default; + string peerDbId = default; + bool? isLocalDataGuardEnabled = default; + bool? isRemoteDataGuardEnabled = default; + DisasterRecoveryType? localDisasterRecoveryType = default; + DateTimeOffset? timeDisasterRecoveryRoleChanged = default; + DisasterRecoveryConfigurationDetails remoteDisasterRecoveryConfiguration = default; + AutonomousDatabaseStandbySummary localStandbyDb = default; + int? failedDataRecoveryInSeconds = default; + bool? isMtlsConnectionRequired = default; + bool? isPreviewVersionWithServiceTermsAccepted = default; + LicenseModel? licenseModel = default; + string ncharacterSet = default; + string lifecycleDetails = default; + AzureResourceProvisioningState? provisioningState = default; + AutonomousDatabaseLifecycleState? lifecycleState = default; + ScheduledOperationsType scheduledOperations = default; + string privateEndpointIP = default; + string privateEndpointLabel = default; + string ociUrl = default; + ResourceIdentifier subnetId = default; + ResourceIdentifier vnetId = default; + DateTimeOffset? timeCreated = default; + DateTimeOffset? timeMaintenanceBegin = default; + DateTimeOffset? timeMaintenanceEnd = default; + double? actualUsedDataStorageSizeInTbs = default; + double? allocatedStorageSizeInTbs = default; + ApexDetailsType apexDetails = default; + IReadOnlyList availableUpgradeVersions = default; + ConnectionStringType connectionStrings = default; + ConnectionUrlType connectionUrls = default; + DataSafeStatusType? dataSafeStatus = default; + DatabaseEditionType? databaseEdition = default; + ResourceIdentifier autonomousDatabaseId = default; + int? inMemoryAreaInGbs = default; + DateTimeOffset? nextLongTermBackupTimeStamp = default; + LongTermBackUpScheduleDetails longTermBackupSchedule = default; + bool? isPreview = default; + int? localAdgAutoFailoverMaxDataLossLimit = default; + int? memoryPerOracleComputeUnitInGbs = default; + OpenModeType? openMode = default; + OperationsInsightsStatusType? operationsInsightsStatus = default; + PermissionLevelType? permissionLevel = default; + string privateEndpoint = default; + IReadOnlyList provisionableCpus = default; + RoleType? role = default; + string serviceConsoleUrl = default; + string sqlWebDeveloperUrl = default; + IReadOnlyList supportedRegionsToCloneTo = default; + string timeDataGuardRoleChanged = default; + string timeDeletionOfFreeAutonomousDatabase = default; + string timeLocalDataGuardEnabled = default; + string timeOfLastFailover = default; + string timeOfLastRefresh = default; + string timeOfLastRefreshPoint = default; + string timeOfLastSwitchover = default; + string timeReclamationOfFreeAutonomousDatabase = default; + int? usedDataStorageSizeInGbs = default; + int? usedDataStorageSizeInTbs = default; + string ocid = default; + int? backupRetentionPeriodInDays = default; + IList whitelistedIPs = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("source"u8)) + { + source = new SourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("sourceId"u8)) + { + sourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("cloneType"u8)) + { + cloneType = new CloneType(property.Value.GetString()); + continue; + } + if (property.NameEquals("timestamp"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timestamp = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("useLatestAvailableBackupTimeStamp"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + useLatestAvailableBackupTimeStamp = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("adminPassword"u8)) + { + adminPassword = property.Value.GetString(); + continue; + } + if (property.NameEquals("dataBaseType"u8)) + { + dataBaseType = new DataBaseType(property.Value.GetString()); + continue; + } + if (property.NameEquals("autonomousMaintenanceScheduleType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + autonomousMaintenanceScheduleType = new AutonomousMaintenanceScheduleType(property.Value.GetString()); + continue; + } + if (property.NameEquals("characterSet"u8)) + { + characterSet = property.Value.GetString(); + continue; + } + if (property.NameEquals("computeCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + computeCount = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("computeModel"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + computeModel = new ComputeModel(property.Value.GetString()); + continue; + } + if (property.NameEquals("cpuCoreCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + cpuCoreCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("customerContacts"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(CustomerContact.DeserializeCustomerContact(item, options)); + } + customerContacts = array; + continue; + } + if (property.NameEquals("dataStorageSizeInTbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dataStorageSizeInTbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("dataStorageSizeInGbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dataStorageSizeInGbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("dbVersion"u8)) + { + dbVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("dbWorkload"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dbWorkload = new WorkloadType(property.Value.GetString()); + continue; + } + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("isAutoScalingEnabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isAutoScalingEnabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("isAutoScalingForStorageEnabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isAutoScalingForStorageEnabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("peerDbIds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + peerDbIds = array; + continue; + } + if (property.NameEquals("peerDbId"u8)) + { + peerDbId = property.Value.GetString(); + continue; + } + if (property.NameEquals("isLocalDataGuardEnabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isLocalDataGuardEnabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("isRemoteDataGuardEnabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isRemoteDataGuardEnabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("localDisasterRecoveryType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + localDisasterRecoveryType = new DisasterRecoveryType(property.Value.GetString()); + continue; + } + if (property.NameEquals("timeDisasterRecoveryRoleChanged"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeDisasterRecoveryRoleChanged = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("remoteDisasterRecoveryConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + remoteDisasterRecoveryConfiguration = DisasterRecoveryConfigurationDetails.DeserializeDisasterRecoveryConfigurationDetails(property.Value, options); + continue; + } + if (property.NameEquals("localStandbyDb"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + localStandbyDb = AutonomousDatabaseStandbySummary.DeserializeAutonomousDatabaseStandbySummary(property.Value, options); + continue; + } + if (property.NameEquals("failedDataRecoveryInSeconds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + failedDataRecoveryInSeconds = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("isMtlsConnectionRequired"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isMtlsConnectionRequired = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("isPreviewVersionWithServiceTermsAccepted"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isPreviewVersionWithServiceTermsAccepted = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("licenseModel"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + licenseModel = new LicenseModel(property.Value.GetString()); + continue; + } + if (property.NameEquals("ncharacterSet"u8)) + { + ncharacterSet = property.Value.GetString(); + continue; + } + if (property.NameEquals("lifecycleDetails"u8)) + { + lifecycleDetails = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new AzureResourceProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("lifecycleState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lifecycleState = new AutonomousDatabaseLifecycleState(property.Value.GetString()); + continue; + } + if (property.NameEquals("scheduledOperations"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + scheduledOperations = ScheduledOperationsType.DeserializeScheduledOperationsType(property.Value, options); + continue; + } + if (property.NameEquals("privateEndpointIp"u8)) + { + privateEndpointIP = property.Value.GetString(); + continue; + } + if (property.NameEquals("privateEndpointLabel"u8)) + { + privateEndpointLabel = property.Value.GetString(); + continue; + } + if (property.NameEquals("ociUrl"u8)) + { + ociUrl = property.Value.GetString(); + continue; + } + if (property.NameEquals("subnetId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + subnetId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("vnetId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + vnetId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("timeCreated"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeCreated = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("timeMaintenanceBegin"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeMaintenanceBegin = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("timeMaintenanceEnd"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeMaintenanceEnd = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("actualUsedDataStorageSizeInTbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + actualUsedDataStorageSizeInTbs = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("allocatedStorageSizeInTbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + allocatedStorageSizeInTbs = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("apexDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + apexDetails = ApexDetailsType.DeserializeApexDetailsType(property.Value, options); + continue; + } + if (property.NameEquals("availableUpgradeVersions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + availableUpgradeVersions = array; + continue; + } + if (property.NameEquals("connectionStrings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectionStrings = ConnectionStringType.DeserializeConnectionStringType(property.Value, options); + continue; + } + if (property.NameEquals("connectionUrls"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectionUrls = ConnectionUrlType.DeserializeConnectionUrlType(property.Value, options); + continue; + } + if (property.NameEquals("dataSafeStatus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dataSafeStatus = new DataSafeStatusType(property.Value.GetString()); + continue; + } + if (property.NameEquals("databaseEdition"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + databaseEdition = new DatabaseEditionType(property.Value.GetString()); + continue; + } + if (property.NameEquals("autonomousDatabaseId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + autonomousDatabaseId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("inMemoryAreaInGbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + inMemoryAreaInGbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("nextLongTermBackupTimeStamp"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLongTermBackupTimeStamp = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("longTermBackupSchedule"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + longTermBackupSchedule = LongTermBackUpScheduleDetails.DeserializeLongTermBackUpScheduleDetails(property.Value, options); + continue; + } + if (property.NameEquals("isPreview"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isPreview = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("localAdgAutoFailoverMaxDataLossLimit"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + localAdgAutoFailoverMaxDataLossLimit = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("memoryPerOracleComputeUnitInGbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + memoryPerOracleComputeUnitInGbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("openMode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + openMode = new OpenModeType(property.Value.GetString()); + continue; + } + if (property.NameEquals("operationsInsightsStatus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + operationsInsightsStatus = new OperationsInsightsStatusType(property.Value.GetString()); + continue; + } + if (property.NameEquals("permissionLevel"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + permissionLevel = new PermissionLevelType(property.Value.GetString()); + continue; + } + if (property.NameEquals("privateEndpoint"u8)) + { + privateEndpoint = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisionableCpus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetInt32()); + } + provisionableCpus = array; + continue; + } + if (property.NameEquals("role"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + role = new RoleType(property.Value.GetString()); + continue; + } + if (property.NameEquals("serviceConsoleUrl"u8)) + { + serviceConsoleUrl = property.Value.GetString(); + continue; + } + if (property.NameEquals("sqlWebDeveloperUrl"u8)) + { + sqlWebDeveloperUrl = property.Value.GetString(); + continue; + } + if (property.NameEquals("supportedRegionsToCloneTo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + supportedRegionsToCloneTo = array; + continue; + } + if (property.NameEquals("timeDataGuardRoleChanged"u8)) + { + timeDataGuardRoleChanged = property.Value.GetString(); + continue; + } + if (property.NameEquals("timeDeletionOfFreeAutonomousDatabase"u8)) + { + timeDeletionOfFreeAutonomousDatabase = property.Value.GetString(); + continue; + } + if (property.NameEquals("timeLocalDataGuardEnabled"u8)) + { + timeLocalDataGuardEnabled = property.Value.GetString(); + continue; + } + if (property.NameEquals("timeOfLastFailover"u8)) + { + timeOfLastFailover = property.Value.GetString(); + continue; + } + if (property.NameEquals("timeOfLastRefresh"u8)) + { + timeOfLastRefresh = property.Value.GetString(); + continue; + } + if (property.NameEquals("timeOfLastRefreshPoint"u8)) + { + timeOfLastRefreshPoint = property.Value.GetString(); + continue; + } + if (property.NameEquals("timeOfLastSwitchover"u8)) + { + timeOfLastSwitchover = property.Value.GetString(); + continue; + } + if (property.NameEquals("timeReclamationOfFreeAutonomousDatabase"u8)) + { + timeReclamationOfFreeAutonomousDatabase = property.Value.GetString(); + continue; + } + if (property.NameEquals("usedDataStorageSizeInGbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + usedDataStorageSizeInGbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("usedDataStorageSizeInTbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + usedDataStorageSizeInTbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("ocid"u8)) + { + ocid = property.Value.GetString(); + continue; + } + if (property.NameEquals("backupRetentionPeriodInDays"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + backupRetentionPeriodInDays = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("whitelistedIps"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + whitelistedIPs = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AutonomousDatabaseFromBackupTimestampProperties( + adminPassword, + dataBaseType, + autonomousMaintenanceScheduleType, + characterSet, + computeCount, + computeModel, + cpuCoreCount, + customerContacts ?? new ChangeTrackingList(), + dataStorageSizeInTbs, + dataStorageSizeInGbs, + dbVersion, + dbWorkload, + displayName, + isAutoScalingEnabled, + isAutoScalingForStorageEnabled, + peerDbIds ?? new ChangeTrackingList(), + peerDbId, + isLocalDataGuardEnabled, + isRemoteDataGuardEnabled, + localDisasterRecoveryType, + timeDisasterRecoveryRoleChanged, + remoteDisasterRecoveryConfiguration, + localStandbyDb, + failedDataRecoveryInSeconds, + isMtlsConnectionRequired, + isPreviewVersionWithServiceTermsAccepted, + licenseModel, + ncharacterSet, + lifecycleDetails, + provisioningState, + lifecycleState, + scheduledOperations, + privateEndpointIP, + privateEndpointLabel, + ociUrl, + subnetId, + vnetId, + timeCreated, + timeMaintenanceBegin, + timeMaintenanceEnd, + actualUsedDataStorageSizeInTbs, + allocatedStorageSizeInTbs, + apexDetails, + availableUpgradeVersions ?? new ChangeTrackingList(), + connectionStrings, + connectionUrls, + dataSafeStatus, + databaseEdition, + autonomousDatabaseId, + inMemoryAreaInGbs, + nextLongTermBackupTimeStamp, + longTermBackupSchedule, + isPreview, + localAdgAutoFailoverMaxDataLossLimit, + memoryPerOracleComputeUnitInGbs, + openMode, + operationsInsightsStatus, + permissionLevel, + privateEndpoint, + provisionableCpus ?? new ChangeTrackingList(), + role, + serviceConsoleUrl, + sqlWebDeveloperUrl, + supportedRegionsToCloneTo ?? new ChangeTrackingList(), + timeDataGuardRoleChanged, + timeDeletionOfFreeAutonomousDatabase, + timeLocalDataGuardEnabled, + timeOfLastFailover, + timeOfLastRefresh, + timeOfLastRefreshPoint, + timeOfLastSwitchover, + timeReclamationOfFreeAutonomousDatabase, + usedDataStorageSizeInGbs, + usedDataStorageSizeInTbs, + ocid, + backupRetentionPeriodInDays, + whitelistedIPs ?? new ChangeTrackingList(), + serializedAdditionalRawData, + source, + sourceId, + cloneType, + timestamp, + useLatestAvailableBackupTimeStamp); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AutonomousDatabaseFromBackupTimestampProperties)} does not support writing '{options.Format}' format."); + } + } + + AutonomousDatabaseFromBackupTimestampProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAutonomousDatabaseFromBackupTimestampProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AutonomousDatabaseFromBackupTimestampProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseFromBackupTimestampProperties.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseFromBackupTimestampProperties.cs new file mode 100644 index 000000000000..31b201ad386c --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseFromBackupTimestampProperties.cs @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// Autonomous Database From Backup Timestamp resource model. + public partial class AutonomousDatabaseFromBackupTimestampProperties : AutonomousDatabaseBaseProperties + { + /// Initializes a new instance of . + /// The ID of the source Autonomous Database that you will clone to create a new Autonomous Database. + /// The Autonomous Database clone type. + /// is null. + public AutonomousDatabaseFromBackupTimestampProperties(ResourceIdentifier sourceId, CloneType cloneType) + { + Argument.AssertNotNull(sourceId, nameof(sourceId)); + + Source = SourceType.BackupFromTimestamp; + SourceId = sourceId; + CloneType = cloneType; + DataBaseType = DataBaseType.CloneFromBackupTimestamp; + } + + /// Initializes a new instance of . + /// Admin password. + /// Database type to be created. + /// The maintenance schedule type of the Autonomous Database Serverless. + /// The character set for the autonomous database. + /// The compute amount (CPUs) available to the database. + /// The compute model of the Autonomous Database. + /// The number of CPU cores to be made available to the database. + /// Customer Contacts. + /// The quantity of data in the database, in terabytes. + /// The size, in gigabytes, of the data volume that will be created and attached to the database. + /// A valid Oracle Database version for Autonomous Database. + /// The Autonomous Database workload type. + /// The user-friendly name for the Autonomous Database. + /// Indicates if auto scaling is enabled for the Autonomous Database CPU core count. + /// Indicates if auto scaling is enabled for the Autonomous Database storage. + /// The list of Azure resource IDs of standby databases located in Autonomous Data Guard remote regions that are associated with the source database. Note that for Autonomous Database Serverless instances, standby databases located in the same region as the source primary database do not have Azure IDs. + /// The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current peer database. + /// Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. + /// Indicates whether the Autonomous Database has Cross Region Data Guard enabled. + /// Indicates the local disaster recovery (DR) type of the Autonomous Database Serverless instance.Autonomous Data Guard (ADG) DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover.Backup-based DR type provides lower cost DR with a slower RTO during failover or switchover. + /// The date and time the Disaster Recovery role was switched for the standby Autonomous Database. + /// Indicates remote disaster recovery configuration. + /// Local Autonomous Disaster Recovery standby database details. + /// Indicates the number of seconds of data loss for a Data Guard failover. + /// Specifies if the Autonomous Database requires mTLS connections. + /// Specifies if the Autonomous Database preview version is being provisioned. + /// The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED. + /// The character set for the Autonomous Database. + /// Additional information about the current lifecycle state. + /// Azure resource provisioning state. + /// Views lifecycleState. + /// The list of scheduled operations. + /// The private endpoint Ip address for the resource. + /// The resource's private endpoint label. + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + /// Client subnet. + /// VNET for network connectivity. + /// The date and time that the database was created. + /// The date and time when maintenance will begin. + /// The date and time when maintenance will end. + /// The current amount of storage in use for user and system data, in terabytes (TB). + /// The amount of storage currently allocated for the database tables and billed for, rounded up. + /// Information about Oracle APEX Application Development. + /// List of Oracle Database versions available for a database upgrade. If there are no version upgrades available, this list is empty. + /// The connection string used to connect to the Autonomous Database. + /// The URLs for accessing Oracle Application Express (APEX) and SQL Developer Web with a browser from a Compute instance within your VCN or that has a direct connection to your VCN. + /// Status of the Data Safe registration for this Autonomous Database. + /// The Oracle Database Edition that applies to the Autonomous databases. + /// Autonomous Database ID. + /// The area assigned to In-Memory tables in Autonomous Database. + /// The date and time when the next long-term backup would be created. + /// Details for the long-term backup schedule. + /// Indicates if the Autonomous Database version is a preview version. + /// Parameter that allows users to select an acceptable maximum data loss limit in seconds, up to which Automatic Failover will be triggered when necessary for a Local Autonomous Data Guard. + /// The amount of memory (in GBs) enabled per ECPU or OCPU. + /// Indicates the Autonomous Database mode. + /// Status of Operations Insights for this Autonomous Database. + /// The Autonomous Database permission level. + /// The private endpoint for the resource. + /// An array of CPU values that an Autonomous Database can be scaled to. + /// The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. + /// The URL of the Service Console for the Autonomous Database. + /// The SQL Web Developer URL for the Oracle Autonomous Database. + /// The list of regions that support the creation of an Autonomous Database clone or an Autonomous Data Guard standby database. + /// The date and time the Autonomous Data Guard role was switched for the Autonomous Database. + /// The date and time the Always Free database will be automatically deleted because of inactivity. + /// The date and time that Autonomous Data Guard was enabled for an Autonomous Database where the standby was provisioned in the same region as the primary database. + /// The timestamp of the last failover operation. + /// The date and time when last refresh happened. + /// The refresh point timestamp (UTC). + /// The timestamp of the last switchover operation for the Autonomous Database. + /// The date and time the Always Free database will be stopped because of inactivity. + /// The storage space consumed by Autonomous Database in GBs. + /// The amount of storage that has been used, in terabytes. + /// Database ocid. + /// Retention period, in days, for long-term backups. + /// The client IP access control list (ACL). This is an array of CIDR notations and/or IP addresses. Values should be separate strings, separated by commas. Example: ['1.1.1.1','1.1.1.0/24','1.1.2.25']. + /// Keeps track of any properties unknown to the library. + /// The source of the database. + /// The ID of the source Autonomous Database that you will clone to create a new Autonomous Database. + /// The Autonomous Database clone type. + /// The timestamp specified for the point-in-time clone of the source Autonomous Database. The timestamp must be in the past. + /// Clone from latest available backup timestamp. + internal AutonomousDatabaseFromBackupTimestampProperties(string adminPassword, DataBaseType dataBaseType, AutonomousMaintenanceScheduleType? autonomousMaintenanceScheduleType, string characterSet, float? computeCount, ComputeModel? computeModel, int? cpuCoreCount, IList customerContacts, int? dataStorageSizeInTbs, int? dataStorageSizeInGbs, string dbVersion, WorkloadType? dbWorkload, string displayName, bool? isAutoScalingEnabled, bool? isAutoScalingForStorageEnabled, IReadOnlyList peerDbIds, string peerDbId, bool? isLocalDataGuardEnabled, bool? isRemoteDataGuardEnabled, DisasterRecoveryType? localDisasterRecoveryType, DateTimeOffset? timeDisasterRecoveryRoleChanged, DisasterRecoveryConfigurationDetails remoteDisasterRecoveryConfiguration, AutonomousDatabaseStandbySummary localStandbyDb, int? failedDataRecoveryInSeconds, bool? isMtlsConnectionRequired, bool? isPreviewVersionWithServiceTermsAccepted, LicenseModel? licenseModel, string ncharacterSet, string lifecycleDetails, AzureResourceProvisioningState? provisioningState, AutonomousDatabaseLifecycleState? lifecycleState, ScheduledOperationsType scheduledOperations, string privateEndpointIP, string privateEndpointLabel, string ociUri, ResourceIdentifier subnetId, ResourceIdentifier vnetId, DateTimeOffset? timeCreated, DateTimeOffset? timeMaintenanceBegin, DateTimeOffset? timeMaintenanceEnd, double? actualUsedDataStorageSizeInTbs, double? allocatedStorageSizeInTbs, ApexDetailsType apexDetails, IReadOnlyList availableUpgradeVersions, ConnectionStringType connectionStrings, ConnectionUrlType connectionUrls, DataSafeStatusType? dataSafeStatus, DatabaseEditionType? databaseEdition, ResourceIdentifier autonomousDatabaseId, int? inMemoryAreaInGbs, DateTimeOffset? nextLongTermBackupTimeStamp, LongTermBackUpScheduleDetails longTermBackupSchedule, bool? isPreview, int? localAdgAutoFailoverMaxDataLossLimit, int? memoryPerOracleComputeUnitInGbs, OpenModeType? openMode, OperationsInsightsStatusType? operationsInsightsStatus, PermissionLevelType? permissionLevel, string privateEndpoint, IReadOnlyList provisionableCpus, RoleType? role, string serviceConsoleUri, string sqlWebDeveloperUri, IReadOnlyList supportedRegionsToCloneTo, string timeDataGuardRoleChanged, string timeDeletionOfFreeAutonomousDatabase, string timeLocalDataGuardEnabled, string timeOfLastFailover, string timeOfLastRefresh, string timeOfLastRefreshPoint, string timeOfLastSwitchover, string timeReclamationOfFreeAutonomousDatabase, int? usedDataStorageSizeInGbs, int? usedDataStorageSizeInTbs, string ocid, int? backupRetentionPeriodInDays, IList whitelistedIPs, IDictionary serializedAdditionalRawData, SourceType source, ResourceIdentifier sourceId, CloneType cloneType, DateTimeOffset? timestamp, bool? useLatestAvailableBackupTimeStamp) : base(adminPassword, dataBaseType, autonomousMaintenanceScheduleType, characterSet, computeCount, computeModel, cpuCoreCount, customerContacts, dataStorageSizeInTbs, dataStorageSizeInGbs, dbVersion, dbWorkload, displayName, isAutoScalingEnabled, isAutoScalingForStorageEnabled, peerDbIds, peerDbId, isLocalDataGuardEnabled, isRemoteDataGuardEnabled, localDisasterRecoveryType, timeDisasterRecoveryRoleChanged, remoteDisasterRecoveryConfiguration, localStandbyDb, failedDataRecoveryInSeconds, isMtlsConnectionRequired, isPreviewVersionWithServiceTermsAccepted, licenseModel, ncharacterSet, lifecycleDetails, provisioningState, lifecycleState, scheduledOperations, privateEndpointIP, privateEndpointLabel, ociUri, subnetId, vnetId, timeCreated, timeMaintenanceBegin, timeMaintenanceEnd, actualUsedDataStorageSizeInTbs, allocatedStorageSizeInTbs, apexDetails, availableUpgradeVersions, connectionStrings, connectionUrls, dataSafeStatus, databaseEdition, autonomousDatabaseId, inMemoryAreaInGbs, nextLongTermBackupTimeStamp, longTermBackupSchedule, isPreview, localAdgAutoFailoverMaxDataLossLimit, memoryPerOracleComputeUnitInGbs, openMode, operationsInsightsStatus, permissionLevel, privateEndpoint, provisionableCpus, role, serviceConsoleUri, sqlWebDeveloperUri, supportedRegionsToCloneTo, timeDataGuardRoleChanged, timeDeletionOfFreeAutonomousDatabase, timeLocalDataGuardEnabled, timeOfLastFailover, timeOfLastRefresh, timeOfLastRefreshPoint, timeOfLastSwitchover, timeReclamationOfFreeAutonomousDatabase, usedDataStorageSizeInGbs, usedDataStorageSizeInTbs, ocid, backupRetentionPeriodInDays, whitelistedIPs, serializedAdditionalRawData) + { + Source = source; + SourceId = sourceId; + CloneType = cloneType; + Timestamp = timestamp; + UseLatestAvailableBackupTimeStamp = useLatestAvailableBackupTimeStamp; + DataBaseType = dataBaseType; + } + + /// Initializes a new instance of for deserialization. + internal AutonomousDatabaseFromBackupTimestampProperties() + { + } + + /// The source of the database. + public SourceType Source { get; } + /// The ID of the source Autonomous Database that you will clone to create a new Autonomous Database. + public ResourceIdentifier SourceId { get; set; } + /// The Autonomous Database clone type. + public CloneType CloneType { get; set; } + /// The timestamp specified for the point-in-time clone of the source Autonomous Database. The timestamp must be in the past. + public DateTimeOffset? Timestamp { get; set; } + /// Clone from latest available backup timestamp. + public bool? UseLatestAvailableBackupTimeStamp { get; set; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseLifecycleState.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseLifecycleState.cs new file mode 100644 index 000000000000..0ca0ab918038 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseLifecycleState.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// Autonomous database lifecycle state enum. + public readonly partial struct AutonomousDatabaseLifecycleState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AutonomousDatabaseLifecycleState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ProvisioningValue = "Provisioning"; + private const string AvailableValue = "Available"; + private const string StoppingValue = "Stopping"; + private const string StoppedValue = "Stopped"; + private const string StartingValue = "Starting"; + private const string TerminatingValue = "Terminating"; + private const string TerminatedValue = "Terminated"; + private const string UnavailableValue = "Unavailable"; + private const string RestoreInProgressValue = "RestoreInProgress"; + private const string RestoreFailedValue = "RestoreFailed"; + private const string BackupInProgressValue = "BackupInProgress"; + private const string ScaleInProgressValue = "ScaleInProgress"; + private const string AvailableNeedsAttentionValue = "AvailableNeedsAttention"; + private const string UpdatingValue = "Updating"; + private const string MaintenanceInProgressValue = "MaintenanceInProgress"; + private const string RestartingValue = "Restarting"; + private const string RecreatingValue = "Recreating"; + private const string RoleChangeInProgressValue = "RoleChangeInProgress"; + private const string UpgradingValue = "Upgrading"; + private const string InaccessibleValue = "Inaccessible"; + private const string StandbyValue = "Standby"; + + /// Indicates that resource in Provisioning state. + public static AutonomousDatabaseLifecycleState Provisioning { get; } = new AutonomousDatabaseLifecycleState(ProvisioningValue); + /// Indicates that resource in Available state. + public static AutonomousDatabaseLifecycleState Available { get; } = new AutonomousDatabaseLifecycleState(AvailableValue); + /// Indicates that resource in Stopping state. + public static AutonomousDatabaseLifecycleState Stopping { get; } = new AutonomousDatabaseLifecycleState(StoppingValue); + /// Indicates that resource in Stopped state. + public static AutonomousDatabaseLifecycleState Stopped { get; } = new AutonomousDatabaseLifecycleState(StoppedValue); + /// Indicates that resource in Starting state. + public static AutonomousDatabaseLifecycleState Starting { get; } = new AutonomousDatabaseLifecycleState(StartingValue); + /// Indicates that resource in Terminating state. + public static AutonomousDatabaseLifecycleState Terminating { get; } = new AutonomousDatabaseLifecycleState(TerminatingValue); + /// Indicates that resource in Terminated state. + public static AutonomousDatabaseLifecycleState Terminated { get; } = new AutonomousDatabaseLifecycleState(TerminatedValue); + /// Indicates that resource in Unavailable state. + public static AutonomousDatabaseLifecycleState Unavailable { get; } = new AutonomousDatabaseLifecycleState(UnavailableValue); + /// Indicates that resource in RestoreInProgress state. + public static AutonomousDatabaseLifecycleState RestoreInProgress { get; } = new AutonomousDatabaseLifecycleState(RestoreInProgressValue); + /// Indicates that resource in RestoreFailed state. + public static AutonomousDatabaseLifecycleState RestoreFailed { get; } = new AutonomousDatabaseLifecycleState(RestoreFailedValue); + /// Indicates that resource in BackupInProgress state. + public static AutonomousDatabaseLifecycleState BackupInProgress { get; } = new AutonomousDatabaseLifecycleState(BackupInProgressValue); + /// Indicates that resource in ScaleInProgress state. + public static AutonomousDatabaseLifecycleState ScaleInProgress { get; } = new AutonomousDatabaseLifecycleState(ScaleInProgressValue); + /// Indicates that resource is available but needs attention. + public static AutonomousDatabaseLifecycleState AvailableNeedsAttention { get; } = new AutonomousDatabaseLifecycleState(AvailableNeedsAttentionValue); + /// Indicates that resource in Updating state. + public static AutonomousDatabaseLifecycleState Updating { get; } = new AutonomousDatabaseLifecycleState(UpdatingValue); + /// Indicates that resource maintenance in progress state. + public static AutonomousDatabaseLifecycleState MaintenanceInProgress { get; } = new AutonomousDatabaseLifecycleState(MaintenanceInProgressValue); + /// Indicates that resource in Restarting state. + public static AutonomousDatabaseLifecycleState Restarting { get; } = new AutonomousDatabaseLifecycleState(RestartingValue); + /// Indicates that resource in Recreating state. + public static AutonomousDatabaseLifecycleState Recreating { get; } = new AutonomousDatabaseLifecycleState(RecreatingValue); + /// Indicates that resource role change in progress state. + public static AutonomousDatabaseLifecycleState RoleChangeInProgress { get; } = new AutonomousDatabaseLifecycleState(RoleChangeInProgressValue); + /// Indicates that resource in Upgrading state. + public static AutonomousDatabaseLifecycleState Upgrading { get; } = new AutonomousDatabaseLifecycleState(UpgradingValue); + /// IIndicates that resource in Inaccessible state. + public static AutonomousDatabaseLifecycleState Inaccessible { get; } = new AutonomousDatabaseLifecycleState(InaccessibleValue); + /// Indicates that resource in Standby state. + public static AutonomousDatabaseLifecycleState Standby { get; } = new AutonomousDatabaseLifecycleState(StandbyValue); + /// Determines if two values are the same. + public static bool operator ==(AutonomousDatabaseLifecycleState left, AutonomousDatabaseLifecycleState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AutonomousDatabaseLifecycleState left, AutonomousDatabaseLifecycleState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AutonomousDatabaseLifecycleState(string value) => new AutonomousDatabaseLifecycleState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AutonomousDatabaseLifecycleState other && Equals(other); + /// + public bool Equals(AutonomousDatabaseLifecycleState 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/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseListResult.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseListResult.Serialization.cs new file mode 100644 index 000000000000..cc38a33ed75d --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + internal partial class AutonomousDatabaseListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AutonomousDatabaseListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AutonomousDatabaseListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AutonomousDatabaseListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAutonomousDatabaseListResult(document.RootElement, options); + } + + internal static AutonomousDatabaseListResult DeserializeAutonomousDatabaseListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AutonomousDatabaseData.DeserializeAutonomousDatabaseData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AutonomousDatabaseListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AutonomousDatabaseListResult)} does not support writing '{options.Format}' format."); + } + } + + AutonomousDatabaseListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAutonomousDatabaseListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AutonomousDatabaseListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseListResult.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseListResult.cs new file mode 100644 index 000000000000..0883d4ab63a4 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// The response of a AutonomousDatabase list operation. + internal partial class AutonomousDatabaseListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The AutonomousDatabase items on this page. + /// is null. + internal AutonomousDatabaseListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The AutonomousDatabase items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal AutonomousDatabaseListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AutonomousDatabaseListResult() + { + } + + /// The AutonomousDatabase items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseNationalCharacterSetListResult.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseNationalCharacterSetListResult.Serialization.cs new file mode 100644 index 000000000000..d03800f6680f --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseNationalCharacterSetListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + internal partial class AutonomousDatabaseNationalCharacterSetListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AutonomousDatabaseNationalCharacterSetListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AutonomousDatabaseNationalCharacterSetListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AutonomousDatabaseNationalCharacterSetListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAutonomousDatabaseNationalCharacterSetListResult(document.RootElement, options); + } + + internal static AutonomousDatabaseNationalCharacterSetListResult DeserializeAutonomousDatabaseNationalCharacterSetListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AutonomousDatabaseNationalCharacterSetData.DeserializeAutonomousDatabaseNationalCharacterSetData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AutonomousDatabaseNationalCharacterSetListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AutonomousDatabaseNationalCharacterSetListResult)} does not support writing '{options.Format}' format."); + } + } + + AutonomousDatabaseNationalCharacterSetListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAutonomousDatabaseNationalCharacterSetListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AutonomousDatabaseNationalCharacterSetListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseNationalCharacterSetListResult.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseNationalCharacterSetListResult.cs new file mode 100644 index 000000000000..c5ade46c17a6 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseNationalCharacterSetListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// The response of a AutonomousDatabaseNationalCharacterSet list operation. + internal partial class AutonomousDatabaseNationalCharacterSetListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The AutonomousDatabaseNationalCharacterSet items on this page. + /// is null. + internal AutonomousDatabaseNationalCharacterSetListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The AutonomousDatabaseNationalCharacterSet items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal AutonomousDatabaseNationalCharacterSetListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AutonomousDatabaseNationalCharacterSetListResult() + { + } + + /// The AutonomousDatabaseNationalCharacterSet items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseNationalCharacterSetProperties.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseNationalCharacterSetProperties.Serialization.cs new file mode 100644 index 000000000000..142187ebfe3b --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseNationalCharacterSetProperties.Serialization.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + internal partial class AutonomousDatabaseNationalCharacterSetProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AutonomousDatabaseNationalCharacterSetProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("characterSet"u8); + writer.WriteStringValue(CharacterSet); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AutonomousDatabaseNationalCharacterSetProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AutonomousDatabaseNationalCharacterSetProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAutonomousDatabaseNationalCharacterSetProperties(document.RootElement, options); + } + + internal static AutonomousDatabaseNationalCharacterSetProperties DeserializeAutonomousDatabaseNationalCharacterSetProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string characterSet = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("characterSet"u8)) + { + characterSet = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AutonomousDatabaseNationalCharacterSetProperties(characterSet, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AutonomousDatabaseNationalCharacterSetProperties)} does not support writing '{options.Format}' format."); + } + } + + AutonomousDatabaseNationalCharacterSetProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAutonomousDatabaseNationalCharacterSetProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AutonomousDatabaseNationalCharacterSetProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseNationalCharacterSetProperties.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseNationalCharacterSetProperties.cs new file mode 100644 index 000000000000..408eb4c744b5 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseNationalCharacterSetProperties.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// AutonomousDatabaseNationalCharacterSet resource model. + internal partial class AutonomousDatabaseNationalCharacterSetProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The Oracle Autonomous Database supported national character sets. + /// is null. + internal AutonomousDatabaseNationalCharacterSetProperties(string characterSet) + { + Argument.AssertNotNull(characterSet, nameof(characterSet)); + + CharacterSet = characterSet; + } + + /// Initializes a new instance of . + /// The Oracle Autonomous Database supported national character sets. + /// Keeps track of any properties unknown to the library. + internal AutonomousDatabaseNationalCharacterSetProperties(string characterSet, IDictionary serializedAdditionalRawData) + { + CharacterSet = characterSet; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AutonomousDatabaseNationalCharacterSetProperties() + { + } + + /// The Oracle Autonomous Database supported national character sets. + public string CharacterSet { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabasePatch.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabasePatch.Serialization.cs new file mode 100644 index 000000000000..32bd65f2b902 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabasePatch.Serialization.cs @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + public partial class AutonomousDatabasePatch : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AutonomousDatabasePatch)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AutonomousDatabasePatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AutonomousDatabasePatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAutonomousDatabasePatch(document.RootElement, options); + } + + internal static AutonomousDatabasePatch DeserializeAutonomousDatabasePatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary tags = default; + AutonomousDatabaseUpdateProperties properties = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = AutonomousDatabaseUpdateProperties.DeserializeAutonomousDatabaseUpdateProperties(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AutonomousDatabasePatch(tags ?? new ChangeTrackingDictionary(), properties, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AutonomousDatabasePatch)} does not support writing '{options.Format}' format."); + } + } + + AutonomousDatabasePatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAutonomousDatabasePatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AutonomousDatabasePatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabasePatch.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabasePatch.cs new file mode 100644 index 000000000000..0a6d36756b5c --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabasePatch.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// The type used for update operations of the AutonomousDatabase. + public partial class AutonomousDatabasePatch + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AutonomousDatabasePatch() + { + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// Resource tags. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal AutonomousDatabasePatch(IDictionary tags, AutonomousDatabaseUpdateProperties properties, IDictionary serializedAdditionalRawData) + { + Tags = tags; + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Resource tags. + public IDictionary Tags { get; } + /// The resource-specific properties for this resource. + public AutonomousDatabaseUpdateProperties Properties { get; set; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseProperties.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseProperties.Serialization.cs new file mode 100644 index 000000000000..73f135cc6bdd --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseProperties.Serialization.cs @@ -0,0 +1,890 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + public partial class AutonomousDatabaseProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AutonomousDatabaseProperties)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + AutonomousDatabaseProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AutonomousDatabaseProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAutonomousDatabaseProperties(document.RootElement, options); + } + + internal static AutonomousDatabaseProperties DeserializeAutonomousDatabaseProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string adminPassword = default; + DataBaseType dataBaseType = default; + AutonomousMaintenanceScheduleType? autonomousMaintenanceScheduleType = default; + string characterSet = default; + float? computeCount = default; + ComputeModel? computeModel = default; + int? cpuCoreCount = default; + IList customerContacts = default; + int? dataStorageSizeInTbs = default; + int? dataStorageSizeInGbs = default; + string dbVersion = default; + WorkloadType? dbWorkload = default; + string displayName = default; + bool? isAutoScalingEnabled = default; + bool? isAutoScalingForStorageEnabled = default; + IReadOnlyList peerDbIds = default; + string peerDbId = default; + bool? isLocalDataGuardEnabled = default; + bool? isRemoteDataGuardEnabled = default; + DisasterRecoveryType? localDisasterRecoveryType = default; + DateTimeOffset? timeDisasterRecoveryRoleChanged = default; + DisasterRecoveryConfigurationDetails remoteDisasterRecoveryConfiguration = default; + AutonomousDatabaseStandbySummary localStandbyDb = default; + int? failedDataRecoveryInSeconds = default; + bool? isMtlsConnectionRequired = default; + bool? isPreviewVersionWithServiceTermsAccepted = default; + LicenseModel? licenseModel = default; + string ncharacterSet = default; + string lifecycleDetails = default; + AzureResourceProvisioningState? provisioningState = default; + AutonomousDatabaseLifecycleState? lifecycleState = default; + ScheduledOperationsType scheduledOperations = default; + string privateEndpointIP = default; + string privateEndpointLabel = default; + string ociUrl = default; + ResourceIdentifier subnetId = default; + ResourceIdentifier vnetId = default; + DateTimeOffset? timeCreated = default; + DateTimeOffset? timeMaintenanceBegin = default; + DateTimeOffset? timeMaintenanceEnd = default; + double? actualUsedDataStorageSizeInTbs = default; + double? allocatedStorageSizeInTbs = default; + ApexDetailsType apexDetails = default; + IReadOnlyList availableUpgradeVersions = default; + ConnectionStringType connectionStrings = default; + ConnectionUrlType connectionUrls = default; + DataSafeStatusType? dataSafeStatus = default; + DatabaseEditionType? databaseEdition = default; + ResourceIdentifier autonomousDatabaseId = default; + int? inMemoryAreaInGbs = default; + DateTimeOffset? nextLongTermBackupTimeStamp = default; + LongTermBackUpScheduleDetails longTermBackupSchedule = default; + bool? isPreview = default; + int? localAdgAutoFailoverMaxDataLossLimit = default; + int? memoryPerOracleComputeUnitInGbs = default; + OpenModeType? openMode = default; + OperationsInsightsStatusType? operationsInsightsStatus = default; + PermissionLevelType? permissionLevel = default; + string privateEndpoint = default; + IReadOnlyList provisionableCpus = default; + RoleType? role = default; + string serviceConsoleUrl = default; + string sqlWebDeveloperUrl = default; + IReadOnlyList supportedRegionsToCloneTo = default; + string timeDataGuardRoleChanged = default; + string timeDeletionOfFreeAutonomousDatabase = default; + string timeLocalDataGuardEnabled = default; + string timeOfLastFailover = default; + string timeOfLastRefresh = default; + string timeOfLastRefreshPoint = default; + string timeOfLastSwitchover = default; + string timeReclamationOfFreeAutonomousDatabase = default; + int? usedDataStorageSizeInGbs = default; + int? usedDataStorageSizeInTbs = default; + string ocid = default; + int? backupRetentionPeriodInDays = default; + IList whitelistedIPs = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("adminPassword"u8)) + { + adminPassword = property.Value.GetString(); + continue; + } + if (property.NameEquals("dataBaseType"u8)) + { + dataBaseType = new DataBaseType(property.Value.GetString()); + continue; + } + if (property.NameEquals("autonomousMaintenanceScheduleType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + autonomousMaintenanceScheduleType = new AutonomousMaintenanceScheduleType(property.Value.GetString()); + continue; + } + if (property.NameEquals("characterSet"u8)) + { + characterSet = property.Value.GetString(); + continue; + } + if (property.NameEquals("computeCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + computeCount = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("computeModel"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + computeModel = new ComputeModel(property.Value.GetString()); + continue; + } + if (property.NameEquals("cpuCoreCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + cpuCoreCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("customerContacts"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(CustomerContact.DeserializeCustomerContact(item, options)); + } + customerContacts = array; + continue; + } + if (property.NameEquals("dataStorageSizeInTbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dataStorageSizeInTbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("dataStorageSizeInGbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dataStorageSizeInGbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("dbVersion"u8)) + { + dbVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("dbWorkload"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dbWorkload = new WorkloadType(property.Value.GetString()); + continue; + } + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("isAutoScalingEnabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isAutoScalingEnabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("isAutoScalingForStorageEnabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isAutoScalingForStorageEnabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("peerDbIds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + peerDbIds = array; + continue; + } + if (property.NameEquals("peerDbId"u8)) + { + peerDbId = property.Value.GetString(); + continue; + } + if (property.NameEquals("isLocalDataGuardEnabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isLocalDataGuardEnabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("isRemoteDataGuardEnabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isRemoteDataGuardEnabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("localDisasterRecoveryType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + localDisasterRecoveryType = new DisasterRecoveryType(property.Value.GetString()); + continue; + } + if (property.NameEquals("timeDisasterRecoveryRoleChanged"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeDisasterRecoveryRoleChanged = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("remoteDisasterRecoveryConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + remoteDisasterRecoveryConfiguration = DisasterRecoveryConfigurationDetails.DeserializeDisasterRecoveryConfigurationDetails(property.Value, options); + continue; + } + if (property.NameEquals("localStandbyDb"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + localStandbyDb = AutonomousDatabaseStandbySummary.DeserializeAutonomousDatabaseStandbySummary(property.Value, options); + continue; + } + if (property.NameEquals("failedDataRecoveryInSeconds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + failedDataRecoveryInSeconds = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("isMtlsConnectionRequired"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isMtlsConnectionRequired = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("isPreviewVersionWithServiceTermsAccepted"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isPreviewVersionWithServiceTermsAccepted = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("licenseModel"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + licenseModel = new LicenseModel(property.Value.GetString()); + continue; + } + if (property.NameEquals("ncharacterSet"u8)) + { + ncharacterSet = property.Value.GetString(); + continue; + } + if (property.NameEquals("lifecycleDetails"u8)) + { + lifecycleDetails = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new AzureResourceProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("lifecycleState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lifecycleState = new AutonomousDatabaseLifecycleState(property.Value.GetString()); + continue; + } + if (property.NameEquals("scheduledOperations"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + scheduledOperations = ScheduledOperationsType.DeserializeScheduledOperationsType(property.Value, options); + continue; + } + if (property.NameEquals("privateEndpointIp"u8)) + { + privateEndpointIP = property.Value.GetString(); + continue; + } + if (property.NameEquals("privateEndpointLabel"u8)) + { + privateEndpointLabel = property.Value.GetString(); + continue; + } + if (property.NameEquals("ociUrl"u8)) + { + ociUrl = property.Value.GetString(); + continue; + } + if (property.NameEquals("subnetId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + subnetId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("vnetId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + vnetId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("timeCreated"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeCreated = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("timeMaintenanceBegin"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeMaintenanceBegin = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("timeMaintenanceEnd"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeMaintenanceEnd = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("actualUsedDataStorageSizeInTbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + actualUsedDataStorageSizeInTbs = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("allocatedStorageSizeInTbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + allocatedStorageSizeInTbs = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("apexDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + apexDetails = ApexDetailsType.DeserializeApexDetailsType(property.Value, options); + continue; + } + if (property.NameEquals("availableUpgradeVersions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + availableUpgradeVersions = array; + continue; + } + if (property.NameEquals("connectionStrings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectionStrings = ConnectionStringType.DeserializeConnectionStringType(property.Value, options); + continue; + } + if (property.NameEquals("connectionUrls"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectionUrls = ConnectionUrlType.DeserializeConnectionUrlType(property.Value, options); + continue; + } + if (property.NameEquals("dataSafeStatus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dataSafeStatus = new DataSafeStatusType(property.Value.GetString()); + continue; + } + if (property.NameEquals("databaseEdition"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + databaseEdition = new DatabaseEditionType(property.Value.GetString()); + continue; + } + if (property.NameEquals("autonomousDatabaseId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + autonomousDatabaseId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("inMemoryAreaInGbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + inMemoryAreaInGbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("nextLongTermBackupTimeStamp"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLongTermBackupTimeStamp = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("longTermBackupSchedule"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + longTermBackupSchedule = LongTermBackUpScheduleDetails.DeserializeLongTermBackUpScheduleDetails(property.Value, options); + continue; + } + if (property.NameEquals("isPreview"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isPreview = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("localAdgAutoFailoverMaxDataLossLimit"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + localAdgAutoFailoverMaxDataLossLimit = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("memoryPerOracleComputeUnitInGbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + memoryPerOracleComputeUnitInGbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("openMode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + openMode = new OpenModeType(property.Value.GetString()); + continue; + } + if (property.NameEquals("operationsInsightsStatus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + operationsInsightsStatus = new OperationsInsightsStatusType(property.Value.GetString()); + continue; + } + if (property.NameEquals("permissionLevel"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + permissionLevel = new PermissionLevelType(property.Value.GetString()); + continue; + } + if (property.NameEquals("privateEndpoint"u8)) + { + privateEndpoint = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisionableCpus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetInt32()); + } + provisionableCpus = array; + continue; + } + if (property.NameEquals("role"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + role = new RoleType(property.Value.GetString()); + continue; + } + if (property.NameEquals("serviceConsoleUrl"u8)) + { + serviceConsoleUrl = property.Value.GetString(); + continue; + } + if (property.NameEquals("sqlWebDeveloperUrl"u8)) + { + sqlWebDeveloperUrl = property.Value.GetString(); + continue; + } + if (property.NameEquals("supportedRegionsToCloneTo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + supportedRegionsToCloneTo = array; + continue; + } + if (property.NameEquals("timeDataGuardRoleChanged"u8)) + { + timeDataGuardRoleChanged = property.Value.GetString(); + continue; + } + if (property.NameEquals("timeDeletionOfFreeAutonomousDatabase"u8)) + { + timeDeletionOfFreeAutonomousDatabase = property.Value.GetString(); + continue; + } + if (property.NameEquals("timeLocalDataGuardEnabled"u8)) + { + timeLocalDataGuardEnabled = property.Value.GetString(); + continue; + } + if (property.NameEquals("timeOfLastFailover"u8)) + { + timeOfLastFailover = property.Value.GetString(); + continue; + } + if (property.NameEquals("timeOfLastRefresh"u8)) + { + timeOfLastRefresh = property.Value.GetString(); + continue; + } + if (property.NameEquals("timeOfLastRefreshPoint"u8)) + { + timeOfLastRefreshPoint = property.Value.GetString(); + continue; + } + if (property.NameEquals("timeOfLastSwitchover"u8)) + { + timeOfLastSwitchover = property.Value.GetString(); + continue; + } + if (property.NameEquals("timeReclamationOfFreeAutonomousDatabase"u8)) + { + timeReclamationOfFreeAutonomousDatabase = property.Value.GetString(); + continue; + } + if (property.NameEquals("usedDataStorageSizeInGbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + usedDataStorageSizeInGbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("usedDataStorageSizeInTbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + usedDataStorageSizeInTbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("ocid"u8)) + { + ocid = property.Value.GetString(); + continue; + } + if (property.NameEquals("backupRetentionPeriodInDays"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + backupRetentionPeriodInDays = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("whitelistedIps"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + whitelistedIPs = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AutonomousDatabaseProperties( + adminPassword, + dataBaseType, + autonomousMaintenanceScheduleType, + characterSet, + computeCount, + computeModel, + cpuCoreCount, + customerContacts ?? new ChangeTrackingList(), + dataStorageSizeInTbs, + dataStorageSizeInGbs, + dbVersion, + dbWorkload, + displayName, + isAutoScalingEnabled, + isAutoScalingForStorageEnabled, + peerDbIds ?? new ChangeTrackingList(), + peerDbId, + isLocalDataGuardEnabled, + isRemoteDataGuardEnabled, + localDisasterRecoveryType, + timeDisasterRecoveryRoleChanged, + remoteDisasterRecoveryConfiguration, + localStandbyDb, + failedDataRecoveryInSeconds, + isMtlsConnectionRequired, + isPreviewVersionWithServiceTermsAccepted, + licenseModel, + ncharacterSet, + lifecycleDetails, + provisioningState, + lifecycleState, + scheduledOperations, + privateEndpointIP, + privateEndpointLabel, + ociUrl, + subnetId, + vnetId, + timeCreated, + timeMaintenanceBegin, + timeMaintenanceEnd, + actualUsedDataStorageSizeInTbs, + allocatedStorageSizeInTbs, + apexDetails, + availableUpgradeVersions ?? new ChangeTrackingList(), + connectionStrings, + connectionUrls, + dataSafeStatus, + databaseEdition, + autonomousDatabaseId, + inMemoryAreaInGbs, + nextLongTermBackupTimeStamp, + longTermBackupSchedule, + isPreview, + localAdgAutoFailoverMaxDataLossLimit, + memoryPerOracleComputeUnitInGbs, + openMode, + operationsInsightsStatus, + permissionLevel, + privateEndpoint, + provisionableCpus ?? new ChangeTrackingList(), + role, + serviceConsoleUrl, + sqlWebDeveloperUrl, + supportedRegionsToCloneTo ?? new ChangeTrackingList(), + timeDataGuardRoleChanged, + timeDeletionOfFreeAutonomousDatabase, + timeLocalDataGuardEnabled, + timeOfLastFailover, + timeOfLastRefresh, + timeOfLastRefreshPoint, + timeOfLastSwitchover, + timeReclamationOfFreeAutonomousDatabase, + usedDataStorageSizeInGbs, + usedDataStorageSizeInTbs, + ocid, + backupRetentionPeriodInDays, + whitelistedIPs ?? new ChangeTrackingList(), + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AutonomousDatabaseProperties)} does not support writing '{options.Format}' format."); + } + } + + AutonomousDatabaseProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAutonomousDatabaseProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AutonomousDatabaseProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseProperties.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseProperties.cs new file mode 100644 index 000000000000..eb1270799c00 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseProperties.cs @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// Autonomous Database resource model. + public partial class AutonomousDatabaseProperties : AutonomousDatabaseBaseProperties + { + /// Initializes a new instance of . + public AutonomousDatabaseProperties() + { + DataBaseType = DataBaseType.Regular; + } + + /// Initializes a new instance of . + /// Admin password. + /// Database type to be created. + /// The maintenance schedule type of the Autonomous Database Serverless. + /// The character set for the autonomous database. + /// The compute amount (CPUs) available to the database. + /// The compute model of the Autonomous Database. + /// The number of CPU cores to be made available to the database. + /// Customer Contacts. + /// The quantity of data in the database, in terabytes. + /// The size, in gigabytes, of the data volume that will be created and attached to the database. + /// A valid Oracle Database version for Autonomous Database. + /// The Autonomous Database workload type. + /// The user-friendly name for the Autonomous Database. + /// Indicates if auto scaling is enabled for the Autonomous Database CPU core count. + /// Indicates if auto scaling is enabled for the Autonomous Database storage. + /// The list of Azure resource IDs of standby databases located in Autonomous Data Guard remote regions that are associated with the source database. Note that for Autonomous Database Serverless instances, standby databases located in the same region as the source primary database do not have Azure IDs. + /// The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current peer database. + /// Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. + /// Indicates whether the Autonomous Database has Cross Region Data Guard enabled. + /// Indicates the local disaster recovery (DR) type of the Autonomous Database Serverless instance.Autonomous Data Guard (ADG) DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover.Backup-based DR type provides lower cost DR with a slower RTO during failover or switchover. + /// The date and time the Disaster Recovery role was switched for the standby Autonomous Database. + /// Indicates remote disaster recovery configuration. + /// Local Autonomous Disaster Recovery standby database details. + /// Indicates the number of seconds of data loss for a Data Guard failover. + /// Specifies if the Autonomous Database requires mTLS connections. + /// Specifies if the Autonomous Database preview version is being provisioned. + /// The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED. + /// The character set for the Autonomous Database. + /// Additional information about the current lifecycle state. + /// Azure resource provisioning state. + /// Views lifecycleState. + /// The list of scheduled operations. + /// The private endpoint Ip address for the resource. + /// The resource's private endpoint label. + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + /// Client subnet. + /// VNET for network connectivity. + /// The date and time that the database was created. + /// The date and time when maintenance will begin. + /// The date and time when maintenance will end. + /// The current amount of storage in use for user and system data, in terabytes (TB). + /// The amount of storage currently allocated for the database tables and billed for, rounded up. + /// Information about Oracle APEX Application Development. + /// List of Oracle Database versions available for a database upgrade. If there are no version upgrades available, this list is empty. + /// The connection string used to connect to the Autonomous Database. + /// The URLs for accessing Oracle Application Express (APEX) and SQL Developer Web with a browser from a Compute instance within your VCN or that has a direct connection to your VCN. + /// Status of the Data Safe registration for this Autonomous Database. + /// The Oracle Database Edition that applies to the Autonomous databases. + /// Autonomous Database ID. + /// The area assigned to In-Memory tables in Autonomous Database. + /// The date and time when the next long-term backup would be created. + /// Details for the long-term backup schedule. + /// Indicates if the Autonomous Database version is a preview version. + /// Parameter that allows users to select an acceptable maximum data loss limit in seconds, up to which Automatic Failover will be triggered when necessary for a Local Autonomous Data Guard. + /// The amount of memory (in GBs) enabled per ECPU or OCPU. + /// Indicates the Autonomous Database mode. + /// Status of Operations Insights for this Autonomous Database. + /// The Autonomous Database permission level. + /// The private endpoint for the resource. + /// An array of CPU values that an Autonomous Database can be scaled to. + /// The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. + /// The URL of the Service Console for the Autonomous Database. + /// The SQL Web Developer URL for the Oracle Autonomous Database. + /// The list of regions that support the creation of an Autonomous Database clone or an Autonomous Data Guard standby database. + /// The date and time the Autonomous Data Guard role was switched for the Autonomous Database. + /// The date and time the Always Free database will be automatically deleted because of inactivity. + /// The date and time that Autonomous Data Guard was enabled for an Autonomous Database where the standby was provisioned in the same region as the primary database. + /// The timestamp of the last failover operation. + /// The date and time when last refresh happened. + /// The refresh point timestamp (UTC). + /// The timestamp of the last switchover operation for the Autonomous Database. + /// The date and time the Always Free database will be stopped because of inactivity. + /// The storage space consumed by Autonomous Database in GBs. + /// The amount of storage that has been used, in terabytes. + /// Database ocid. + /// Retention period, in days, for long-term backups. + /// The client IP access control list (ACL). This is an array of CIDR notations and/or IP addresses. Values should be separate strings, separated by commas. Example: ['1.1.1.1','1.1.1.0/24','1.1.2.25']. + /// Keeps track of any properties unknown to the library. + internal AutonomousDatabaseProperties(string adminPassword, DataBaseType dataBaseType, AutonomousMaintenanceScheduleType? autonomousMaintenanceScheduleType, string characterSet, float? computeCount, ComputeModel? computeModel, int? cpuCoreCount, IList customerContacts, int? dataStorageSizeInTbs, int? dataStorageSizeInGbs, string dbVersion, WorkloadType? dbWorkload, string displayName, bool? isAutoScalingEnabled, bool? isAutoScalingForStorageEnabled, IReadOnlyList peerDbIds, string peerDbId, bool? isLocalDataGuardEnabled, bool? isRemoteDataGuardEnabled, DisasterRecoveryType? localDisasterRecoveryType, DateTimeOffset? timeDisasterRecoveryRoleChanged, DisasterRecoveryConfigurationDetails remoteDisasterRecoveryConfiguration, AutonomousDatabaseStandbySummary localStandbyDb, int? failedDataRecoveryInSeconds, bool? isMtlsConnectionRequired, bool? isPreviewVersionWithServiceTermsAccepted, LicenseModel? licenseModel, string ncharacterSet, string lifecycleDetails, AzureResourceProvisioningState? provisioningState, AutonomousDatabaseLifecycleState? lifecycleState, ScheduledOperationsType scheduledOperations, string privateEndpointIP, string privateEndpointLabel, string ociUri, ResourceIdentifier subnetId, ResourceIdentifier vnetId, DateTimeOffset? timeCreated, DateTimeOffset? timeMaintenanceBegin, DateTimeOffset? timeMaintenanceEnd, double? actualUsedDataStorageSizeInTbs, double? allocatedStorageSizeInTbs, ApexDetailsType apexDetails, IReadOnlyList availableUpgradeVersions, ConnectionStringType connectionStrings, ConnectionUrlType connectionUrls, DataSafeStatusType? dataSafeStatus, DatabaseEditionType? databaseEdition, ResourceIdentifier autonomousDatabaseId, int? inMemoryAreaInGbs, DateTimeOffset? nextLongTermBackupTimeStamp, LongTermBackUpScheduleDetails longTermBackupSchedule, bool? isPreview, int? localAdgAutoFailoverMaxDataLossLimit, int? memoryPerOracleComputeUnitInGbs, OpenModeType? openMode, OperationsInsightsStatusType? operationsInsightsStatus, PermissionLevelType? permissionLevel, string privateEndpoint, IReadOnlyList provisionableCpus, RoleType? role, string serviceConsoleUri, string sqlWebDeveloperUri, IReadOnlyList supportedRegionsToCloneTo, string timeDataGuardRoleChanged, string timeDeletionOfFreeAutonomousDatabase, string timeLocalDataGuardEnabled, string timeOfLastFailover, string timeOfLastRefresh, string timeOfLastRefreshPoint, string timeOfLastSwitchover, string timeReclamationOfFreeAutonomousDatabase, int? usedDataStorageSizeInGbs, int? usedDataStorageSizeInTbs, string ocid, int? backupRetentionPeriodInDays, IList whitelistedIPs, IDictionary serializedAdditionalRawData) : base(adminPassword, dataBaseType, autonomousMaintenanceScheduleType, characterSet, computeCount, computeModel, cpuCoreCount, customerContacts, dataStorageSizeInTbs, dataStorageSizeInGbs, dbVersion, dbWorkload, displayName, isAutoScalingEnabled, isAutoScalingForStorageEnabled, peerDbIds, peerDbId, isLocalDataGuardEnabled, isRemoteDataGuardEnabled, localDisasterRecoveryType, timeDisasterRecoveryRoleChanged, remoteDisasterRecoveryConfiguration, localStandbyDb, failedDataRecoveryInSeconds, isMtlsConnectionRequired, isPreviewVersionWithServiceTermsAccepted, licenseModel, ncharacterSet, lifecycleDetails, provisioningState, lifecycleState, scheduledOperations, privateEndpointIP, privateEndpointLabel, ociUri, subnetId, vnetId, timeCreated, timeMaintenanceBegin, timeMaintenanceEnd, actualUsedDataStorageSizeInTbs, allocatedStorageSizeInTbs, apexDetails, availableUpgradeVersions, connectionStrings, connectionUrls, dataSafeStatus, databaseEdition, autonomousDatabaseId, inMemoryAreaInGbs, nextLongTermBackupTimeStamp, longTermBackupSchedule, isPreview, localAdgAutoFailoverMaxDataLossLimit, memoryPerOracleComputeUnitInGbs, openMode, operationsInsightsStatus, permissionLevel, privateEndpoint, provisionableCpus, role, serviceConsoleUri, sqlWebDeveloperUri, supportedRegionsToCloneTo, timeDataGuardRoleChanged, timeDeletionOfFreeAutonomousDatabase, timeLocalDataGuardEnabled, timeOfLastFailover, timeOfLastRefresh, timeOfLastRefreshPoint, timeOfLastSwitchover, timeReclamationOfFreeAutonomousDatabase, usedDataStorageSizeInGbs, usedDataStorageSizeInTbs, ocid, backupRetentionPeriodInDays, whitelistedIPs, serializedAdditionalRawData) + { + DataBaseType = dataBaseType; + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseStandbySummary.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseStandbySummary.Serialization.cs new file mode 100644 index 000000000000..6bbad99d7295 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseStandbySummary.Serialization.cs @@ -0,0 +1,187 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + public partial class AutonomousDatabaseStandbySummary : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AutonomousDatabaseStandbySummary)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(LagTimeInSeconds)) + { + writer.WritePropertyName("lagTimeInSeconds"u8); + writer.WriteNumberValue(LagTimeInSeconds.Value); + } + if (Optional.IsDefined(LifecycleState)) + { + writer.WritePropertyName("lifecycleState"u8); + writer.WriteStringValue(LifecycleState.Value.ToString()); + } + if (Optional.IsDefined(LifecycleDetails)) + { + writer.WritePropertyName("lifecycleDetails"u8); + writer.WriteStringValue(LifecycleDetails); + } + if (Optional.IsDefined(TimeDataGuardRoleChanged)) + { + writer.WritePropertyName("timeDataGuardRoleChanged"u8); + writer.WriteStringValue(TimeDataGuardRoleChanged); + } + if (Optional.IsDefined(TimeDisasterRecoveryRoleChanged)) + { + writer.WritePropertyName("timeDisasterRecoveryRoleChanged"u8); + writer.WriteStringValue(TimeDisasterRecoveryRoleChanged); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AutonomousDatabaseStandbySummary IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AutonomousDatabaseStandbySummary)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAutonomousDatabaseStandbySummary(document.RootElement, options); + } + + internal static AutonomousDatabaseStandbySummary DeserializeAutonomousDatabaseStandbySummary(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int? lagTimeInSeconds = default; + AutonomousDatabaseLifecycleState? lifecycleState = default; + string lifecycleDetails = default; + string timeDataGuardRoleChanged = default; + string timeDisasterRecoveryRoleChanged = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("lagTimeInSeconds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lagTimeInSeconds = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("lifecycleState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lifecycleState = new AutonomousDatabaseLifecycleState(property.Value.GetString()); + continue; + } + if (property.NameEquals("lifecycleDetails"u8)) + { + lifecycleDetails = property.Value.GetString(); + continue; + } + if (property.NameEquals("timeDataGuardRoleChanged"u8)) + { + timeDataGuardRoleChanged = property.Value.GetString(); + continue; + } + if (property.NameEquals("timeDisasterRecoveryRoleChanged"u8)) + { + timeDisasterRecoveryRoleChanged = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AutonomousDatabaseStandbySummary( + lagTimeInSeconds, + lifecycleState, + lifecycleDetails, + timeDataGuardRoleChanged, + timeDisasterRecoveryRoleChanged, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AutonomousDatabaseStandbySummary)} does not support writing '{options.Format}' format."); + } + } + + AutonomousDatabaseStandbySummary IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAutonomousDatabaseStandbySummary(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AutonomousDatabaseStandbySummary)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseStandbySummary.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseStandbySummary.cs new file mode 100644 index 000000000000..88416144b1c0 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseStandbySummary.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// Autonomous Disaster Recovery standby database details. + public partial class AutonomousDatabaseStandbySummary + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal AutonomousDatabaseStandbySummary() + { + } + + /// Initializes a new instance of . + /// The amount of time, in seconds, that the data of the standby database lags the data of the primary database. Can be used to determine the potential data loss in the event of a failover. + /// The current state of the Autonomous Database. + /// Additional information about the current lifecycle state. + /// The date and time the Autonomous Data Guard role was switched for the standby Autonomous Database. + /// The date and time the Disaster Recovery role was switched for the standby Autonomous Database. + /// Keeps track of any properties unknown to the library. + internal AutonomousDatabaseStandbySummary(int? lagTimeInSeconds, AutonomousDatabaseLifecycleState? lifecycleState, string lifecycleDetails, string timeDataGuardRoleChanged, string timeDisasterRecoveryRoleChanged, IDictionary serializedAdditionalRawData) + { + LagTimeInSeconds = lagTimeInSeconds; + LifecycleState = lifecycleState; + LifecycleDetails = lifecycleDetails; + TimeDataGuardRoleChanged = timeDataGuardRoleChanged; + TimeDisasterRecoveryRoleChanged = timeDisasterRecoveryRoleChanged; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The amount of time, in seconds, that the data of the standby database lags the data of the primary database. Can be used to determine the potential data loss in the event of a failover. + public int? LagTimeInSeconds { get; } + /// The current state of the Autonomous Database. + public AutonomousDatabaseLifecycleState? LifecycleState { get; } + /// Additional information about the current lifecycle state. + public string LifecycleDetails { get; } + /// The date and time the Autonomous Data Guard role was switched for the standby Autonomous Database. + public string TimeDataGuardRoleChanged { get; } + /// The date and time the Disaster Recovery role was switched for the standby Autonomous Database. + public string TimeDisasterRecoveryRoleChanged { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseUpdateProperties.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseUpdateProperties.Serialization.cs new file mode 100644 index 000000000000..637518e5791b --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseUpdateProperties.Serialization.cs @@ -0,0 +1,495 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + public partial class AutonomousDatabaseUpdateProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AutonomousDatabaseUpdateProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(AdminPassword)) + { + writer.WritePropertyName("adminPassword"u8); + writer.WriteStringValue(AdminPassword); + } + if (Optional.IsDefined(AutonomousMaintenanceScheduleType)) + { + writer.WritePropertyName("autonomousMaintenanceScheduleType"u8); + writer.WriteStringValue(AutonomousMaintenanceScheduleType.Value.ToString()); + } + if (Optional.IsDefined(ComputeCount)) + { + writer.WritePropertyName("computeCount"u8); + writer.WriteNumberValue(ComputeCount.Value); + } + if (Optional.IsDefined(CpuCoreCount)) + { + writer.WritePropertyName("cpuCoreCount"u8); + writer.WriteNumberValue(CpuCoreCount.Value); + } + if (Optional.IsCollectionDefined(CustomerContacts)) + { + writer.WritePropertyName("customerContacts"u8); + writer.WriteStartArray(); + foreach (var item in CustomerContacts) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(DataStorageSizeInTbs)) + { + writer.WritePropertyName("dataStorageSizeInTbs"u8); + writer.WriteNumberValue(DataStorageSizeInTbs.Value); + } + if (Optional.IsDefined(DataStorageSizeInGbs)) + { + writer.WritePropertyName("dataStorageSizeInGbs"u8); + writer.WriteNumberValue(DataStorageSizeInGbs.Value); + } + if (Optional.IsDefined(DisplayName)) + { + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + } + if (Optional.IsDefined(IsAutoScalingEnabled)) + { + writer.WritePropertyName("isAutoScalingEnabled"u8); + writer.WriteBooleanValue(IsAutoScalingEnabled.Value); + } + if (Optional.IsDefined(IsAutoScalingForStorageEnabled)) + { + writer.WritePropertyName("isAutoScalingForStorageEnabled"u8); + writer.WriteBooleanValue(IsAutoScalingForStorageEnabled.Value); + } + if (Optional.IsDefined(PeerDbId)) + { + writer.WritePropertyName("peerDbId"u8); + writer.WriteStringValue(PeerDbId); + } + if (Optional.IsDefined(IsLocalDataGuardEnabled)) + { + writer.WritePropertyName("isLocalDataGuardEnabled"u8); + writer.WriteBooleanValue(IsLocalDataGuardEnabled.Value); + } + if (Optional.IsDefined(IsMtlsConnectionRequired)) + { + writer.WritePropertyName("isMtlsConnectionRequired"u8); + writer.WriteBooleanValue(IsMtlsConnectionRequired.Value); + } + if (Optional.IsDefined(LicenseModel)) + { + writer.WritePropertyName("licenseModel"u8); + writer.WriteStringValue(LicenseModel.Value.ToString()); + } + if (Optional.IsDefined(ScheduledOperations)) + { + writer.WritePropertyName("scheduledOperations"u8); + writer.WriteObjectValue(ScheduledOperations, options); + } + if (Optional.IsDefined(DatabaseEdition)) + { + writer.WritePropertyName("databaseEdition"u8); + writer.WriteStringValue(DatabaseEdition.Value.ToString()); + } + if (Optional.IsDefined(LongTermBackupSchedule)) + { + writer.WritePropertyName("longTermBackupSchedule"u8); + writer.WriteObjectValue(LongTermBackupSchedule, options); + } + if (Optional.IsDefined(LocalAdgAutoFailoverMaxDataLossLimit)) + { + writer.WritePropertyName("localAdgAutoFailoverMaxDataLossLimit"u8); + writer.WriteNumberValue(LocalAdgAutoFailoverMaxDataLossLimit.Value); + } + if (Optional.IsDefined(OpenMode)) + { + writer.WritePropertyName("openMode"u8); + writer.WriteStringValue(OpenMode.Value.ToString()); + } + if (Optional.IsDefined(PermissionLevel)) + { + writer.WritePropertyName("permissionLevel"u8); + writer.WriteStringValue(PermissionLevel.Value.ToString()); + } + if (Optional.IsDefined(Role)) + { + writer.WritePropertyName("role"u8); + writer.WriteStringValue(Role.Value.ToString()); + } + if (Optional.IsDefined(BackupRetentionPeriodInDays)) + { + writer.WritePropertyName("backupRetentionPeriodInDays"u8); + writer.WriteNumberValue(BackupRetentionPeriodInDays.Value); + } + if (Optional.IsCollectionDefined(WhitelistedIPs)) + { + writer.WritePropertyName("whitelistedIps"u8); + writer.WriteStartArray(); + foreach (var item in WhitelistedIPs) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AutonomousDatabaseUpdateProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AutonomousDatabaseUpdateProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAutonomousDatabaseUpdateProperties(document.RootElement, options); + } + + internal static AutonomousDatabaseUpdateProperties DeserializeAutonomousDatabaseUpdateProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string adminPassword = default; + AutonomousMaintenanceScheduleType? autonomousMaintenanceScheduleType = default; + float? computeCount = default; + int? cpuCoreCount = default; + IList customerContacts = default; + int? dataStorageSizeInTbs = default; + int? dataStorageSizeInGbs = default; + string displayName = default; + bool? isAutoScalingEnabled = default; + bool? isAutoScalingForStorageEnabled = default; + string peerDbId = default; + bool? isLocalDataGuardEnabled = default; + bool? isMtlsConnectionRequired = default; + LicenseModel? licenseModel = default; + ScheduledOperationsType scheduledOperations = default; + DatabaseEditionType? databaseEdition = default; + LongTermBackUpScheduleDetails longTermBackupSchedule = default; + int? localAdgAutoFailoverMaxDataLossLimit = default; + OpenModeType? openMode = default; + PermissionLevelType? permissionLevel = default; + RoleType? role = default; + int? backupRetentionPeriodInDays = default; + IList whitelistedIPs = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("adminPassword"u8)) + { + adminPassword = property.Value.GetString(); + continue; + } + if (property.NameEquals("autonomousMaintenanceScheduleType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + autonomousMaintenanceScheduleType = new AutonomousMaintenanceScheduleType(property.Value.GetString()); + continue; + } + if (property.NameEquals("computeCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + computeCount = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("cpuCoreCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + cpuCoreCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("customerContacts"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(CustomerContact.DeserializeCustomerContact(item, options)); + } + customerContacts = array; + continue; + } + if (property.NameEquals("dataStorageSizeInTbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dataStorageSizeInTbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("dataStorageSizeInGbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dataStorageSizeInGbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("isAutoScalingEnabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isAutoScalingEnabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("isAutoScalingForStorageEnabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isAutoScalingForStorageEnabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("peerDbId"u8)) + { + peerDbId = property.Value.GetString(); + continue; + } + if (property.NameEquals("isLocalDataGuardEnabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isLocalDataGuardEnabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("isMtlsConnectionRequired"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isMtlsConnectionRequired = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("licenseModel"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + licenseModel = new LicenseModel(property.Value.GetString()); + continue; + } + if (property.NameEquals("scheduledOperations"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + scheduledOperations = ScheduledOperationsType.DeserializeScheduledOperationsType(property.Value, options); + continue; + } + if (property.NameEquals("databaseEdition"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + databaseEdition = new DatabaseEditionType(property.Value.GetString()); + continue; + } + if (property.NameEquals("longTermBackupSchedule"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + longTermBackupSchedule = LongTermBackUpScheduleDetails.DeserializeLongTermBackUpScheduleDetails(property.Value, options); + continue; + } + if (property.NameEquals("localAdgAutoFailoverMaxDataLossLimit"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + localAdgAutoFailoverMaxDataLossLimit = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("openMode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + openMode = new OpenModeType(property.Value.GetString()); + continue; + } + if (property.NameEquals("permissionLevel"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + permissionLevel = new PermissionLevelType(property.Value.GetString()); + continue; + } + if (property.NameEquals("role"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + role = new RoleType(property.Value.GetString()); + continue; + } + if (property.NameEquals("backupRetentionPeriodInDays"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + backupRetentionPeriodInDays = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("whitelistedIps"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + whitelistedIPs = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AutonomousDatabaseUpdateProperties( + adminPassword, + autonomousMaintenanceScheduleType, + computeCount, + cpuCoreCount, + customerContacts ?? new ChangeTrackingList(), + dataStorageSizeInTbs, + dataStorageSizeInGbs, + displayName, + isAutoScalingEnabled, + isAutoScalingForStorageEnabled, + peerDbId, + isLocalDataGuardEnabled, + isMtlsConnectionRequired, + licenseModel, + scheduledOperations, + databaseEdition, + longTermBackupSchedule, + localAdgAutoFailoverMaxDataLossLimit, + openMode, + permissionLevel, + role, + backupRetentionPeriodInDays, + whitelistedIPs ?? new ChangeTrackingList(), + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AutonomousDatabaseUpdateProperties)} does not support writing '{options.Format}' format."); + } + } + + AutonomousDatabaseUpdateProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAutonomousDatabaseUpdateProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AutonomousDatabaseUpdateProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseUpdateProperties.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseUpdateProperties.cs new file mode 100644 index 000000000000..92be925ac4ac --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseUpdateProperties.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// The updatable properties of the AutonomousDatabase. + public partial class AutonomousDatabaseUpdateProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AutonomousDatabaseUpdateProperties() + { + CustomerContacts = new ChangeTrackingList(); + WhitelistedIPs = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Admin password. + /// The maintenance schedule type of the Autonomous Database Serverless. + /// The compute amount (CPUs) available to the database. + /// The number of CPU cores to be made available to the database. + /// Customer Contacts. + /// The quantity of data in the database, in terabytes. + /// The size, in gigabytes, of the data volume that will be created and attached to the database. + /// The user-friendly name for the Autonomous Database. + /// Indicates if auto scaling is enabled for the Autonomous Database CPU core count. + /// Indicates if auto scaling is enabled for the Autonomous Database storage. + /// The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current peer database. + /// Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. + /// Specifies if the Autonomous Database requires mTLS connections. + /// The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED. + /// The list of scheduled operations. + /// The Oracle Database Edition that applies to the Autonomous databases. + /// Details for the long-term backup schedule. + /// Parameter that allows users to select an acceptable maximum data loss limit in seconds, up to which Automatic Failover will be triggered when necessary for a Local Autonomous Data Guard. + /// Indicates the Autonomous Database mode. + /// The Autonomous Database permission level. + /// The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. + /// Retention period, in days, for long-term backups. + /// The client IP access control list (ACL). This is an array of CIDR notations and/or IP addresses. Values should be separate strings, separated by commas. Example: ['1.1.1.1','1.1.1.0/24','1.1.2.25']. + /// Keeps track of any properties unknown to the library. + internal AutonomousDatabaseUpdateProperties(string adminPassword, AutonomousMaintenanceScheduleType? autonomousMaintenanceScheduleType, float? computeCount, int? cpuCoreCount, IList customerContacts, int? dataStorageSizeInTbs, int? dataStorageSizeInGbs, string displayName, bool? isAutoScalingEnabled, bool? isAutoScalingForStorageEnabled, string peerDbId, bool? isLocalDataGuardEnabled, bool? isMtlsConnectionRequired, LicenseModel? licenseModel, ScheduledOperationsType scheduledOperations, DatabaseEditionType? databaseEdition, LongTermBackUpScheduleDetails longTermBackupSchedule, int? localAdgAutoFailoverMaxDataLossLimit, OpenModeType? openMode, PermissionLevelType? permissionLevel, RoleType? role, int? backupRetentionPeriodInDays, IList whitelistedIPs, IDictionary serializedAdditionalRawData) + { + AdminPassword = adminPassword; + AutonomousMaintenanceScheduleType = autonomousMaintenanceScheduleType; + ComputeCount = computeCount; + CpuCoreCount = cpuCoreCount; + CustomerContacts = customerContacts; + DataStorageSizeInTbs = dataStorageSizeInTbs; + DataStorageSizeInGbs = dataStorageSizeInGbs; + DisplayName = displayName; + IsAutoScalingEnabled = isAutoScalingEnabled; + IsAutoScalingForStorageEnabled = isAutoScalingForStorageEnabled; + PeerDbId = peerDbId; + IsLocalDataGuardEnabled = isLocalDataGuardEnabled; + IsMtlsConnectionRequired = isMtlsConnectionRequired; + LicenseModel = licenseModel; + ScheduledOperations = scheduledOperations; + DatabaseEdition = databaseEdition; + LongTermBackupSchedule = longTermBackupSchedule; + LocalAdgAutoFailoverMaxDataLossLimit = localAdgAutoFailoverMaxDataLossLimit; + OpenMode = openMode; + PermissionLevel = permissionLevel; + Role = role; + BackupRetentionPeriodInDays = backupRetentionPeriodInDays; + WhitelistedIPs = whitelistedIPs; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Admin password. + public string AdminPassword { get; set; } + /// The maintenance schedule type of the Autonomous Database Serverless. + public AutonomousMaintenanceScheduleType? AutonomousMaintenanceScheduleType { get; set; } + /// The compute amount (CPUs) available to the database. + public float? ComputeCount { get; set; } + /// The number of CPU cores to be made available to the database. + public int? CpuCoreCount { get; set; } + /// Customer Contacts. + public IList CustomerContacts { get; } + /// The quantity of data in the database, in terabytes. + public int? DataStorageSizeInTbs { get; set; } + /// The size, in gigabytes, of the data volume that will be created and attached to the database. + public int? DataStorageSizeInGbs { get; set; } + /// The user-friendly name for the Autonomous Database. + public string DisplayName { get; set; } + /// Indicates if auto scaling is enabled for the Autonomous Database CPU core count. + public bool? IsAutoScalingEnabled { get; set; } + /// Indicates if auto scaling is enabled for the Autonomous Database storage. + public bool? IsAutoScalingForStorageEnabled { get; set; } + /// The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current peer database. + public string PeerDbId { get; set; } + /// Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. + public bool? IsLocalDataGuardEnabled { get; set; } + /// Specifies if the Autonomous Database requires mTLS connections. + public bool? IsMtlsConnectionRequired { get; set; } + /// The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED. + public LicenseModel? LicenseModel { get; set; } + /// The list of scheduled operations. + public ScheduledOperationsType ScheduledOperations { get; set; } + /// The Oracle Database Edition that applies to the Autonomous databases. + public DatabaseEditionType? DatabaseEdition { get; set; } + /// Details for the long-term backup schedule. + public LongTermBackUpScheduleDetails LongTermBackupSchedule { get; set; } + /// Parameter that allows users to select an acceptable maximum data loss limit in seconds, up to which Automatic Failover will be triggered when necessary for a Local Autonomous Data Guard. + public int? LocalAdgAutoFailoverMaxDataLossLimit { get; set; } + /// Indicates the Autonomous Database mode. + public OpenModeType? OpenMode { get; set; } + /// The Autonomous Database permission level. + public PermissionLevelType? PermissionLevel { get; set; } + /// The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. + public RoleType? Role { get; set; } + /// Retention period, in days, for long-term backups. + public int? BackupRetentionPeriodInDays { get; set; } + /// The client IP access control list (ACL). This is an array of CIDR notations and/or IP addresses. Values should be separate strings, separated by commas. Example: ['1.1.1.1','1.1.1.0/24','1.1.2.25']. + public IList WhitelistedIPs { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseWalletFile.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseWalletFile.Serialization.cs new file mode 100644 index 000000000000..8ab6d2f3207b --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseWalletFile.Serialization.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + public partial class AutonomousDatabaseWalletFile : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AutonomousDatabaseWalletFile)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("walletFiles"u8); + writer.WriteStringValue(WalletFiles); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AutonomousDatabaseWalletFile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AutonomousDatabaseWalletFile)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAutonomousDatabaseWalletFile(document.RootElement, options); + } + + internal static AutonomousDatabaseWalletFile DeserializeAutonomousDatabaseWalletFile(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string walletFiles = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("walletFiles"u8)) + { + walletFiles = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AutonomousDatabaseWalletFile(walletFiles, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AutonomousDatabaseWalletFile)} does not support writing '{options.Format}' format."); + } + } + + AutonomousDatabaseWalletFile IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAutonomousDatabaseWalletFile(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AutonomousDatabaseWalletFile)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseWalletFile.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseWalletFile.cs new file mode 100644 index 000000000000..c46f2b318484 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseWalletFile.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// Autonomous Database Wallet File resource model. + public partial class AutonomousDatabaseWalletFile + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The base64 encoded wallet files. + /// is null. + internal AutonomousDatabaseWalletFile(string walletFiles) + { + Argument.AssertNotNull(walletFiles, nameof(walletFiles)); + + WalletFiles = walletFiles; + } + + /// Initializes a new instance of . + /// The base64 encoded wallet files. + /// Keeps track of any properties unknown to the library. + internal AutonomousDatabaseWalletFile(string walletFiles, IDictionary serializedAdditionalRawData) + { + WalletFiles = walletFiles; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AutonomousDatabaseWalletFile() + { + } + + /// The base64 encoded wallet files. + public string WalletFiles { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDbVersionListResult.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDbVersionListResult.Serialization.cs new file mode 100644 index 000000000000..f8f1d9445ce0 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDbVersionListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + internal partial class AutonomousDbVersionListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AutonomousDbVersionListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AutonomousDbVersionListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AutonomousDbVersionListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAutonomousDbVersionListResult(document.RootElement, options); + } + + internal static AutonomousDbVersionListResult DeserializeAutonomousDbVersionListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AutonomousDbVersionData.DeserializeAutonomousDbVersionData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AutonomousDbVersionListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AutonomousDbVersionListResult)} does not support writing '{options.Format}' format."); + } + } + + AutonomousDbVersionListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAutonomousDbVersionListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AutonomousDbVersionListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDbVersionListResult.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDbVersionListResult.cs new file mode 100644 index 000000000000..1e0dd60610f3 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDbVersionListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// The response of a AutonomousDbVersion list operation. + internal partial class AutonomousDbVersionListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The AutonomousDbVersion items on this page. + /// is null. + internal AutonomousDbVersionListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The AutonomousDbVersion items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal AutonomousDbVersionListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AutonomousDbVersionListResult() + { + } + + /// The AutonomousDbVersion items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDbVersionProperties.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDbVersionProperties.Serialization.cs new file mode 100644 index 000000000000..b4b12822a112 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDbVersionProperties.Serialization.cs @@ -0,0 +1,208 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + public partial class AutonomousDbVersionProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AutonomousDbVersionProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("version"u8); + writer.WriteStringValue(Version); + if (Optional.IsDefined(DbWorkload)) + { + writer.WritePropertyName("dbWorkload"u8); + writer.WriteStringValue(DbWorkload.Value.ToString()); + } + if (Optional.IsDefined(IsDefaultForFree)) + { + writer.WritePropertyName("isDefaultForFree"u8); + writer.WriteBooleanValue(IsDefaultForFree.Value); + } + if (Optional.IsDefined(IsDefaultForPaid)) + { + writer.WritePropertyName("isDefaultForPaid"u8); + writer.WriteBooleanValue(IsDefaultForPaid.Value); + } + if (Optional.IsDefined(IsFreeTierEnabled)) + { + writer.WritePropertyName("isFreeTierEnabled"u8); + writer.WriteBooleanValue(IsFreeTierEnabled.Value); + } + if (Optional.IsDefined(IsPaidEnabled)) + { + writer.WritePropertyName("isPaidEnabled"u8); + writer.WriteBooleanValue(IsPaidEnabled.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AutonomousDbVersionProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AutonomousDbVersionProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAutonomousDbVersionProperties(document.RootElement, options); + } + + internal static AutonomousDbVersionProperties DeserializeAutonomousDbVersionProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string version = default; + WorkloadType? dbWorkload = default; + bool? isDefaultForFree = default; + bool? isDefaultForPaid = default; + bool? isFreeTierEnabled = default; + bool? isPaidEnabled = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("version"u8)) + { + version = property.Value.GetString(); + continue; + } + if (property.NameEquals("dbWorkload"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dbWorkload = new WorkloadType(property.Value.GetString()); + continue; + } + if (property.NameEquals("isDefaultForFree"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isDefaultForFree = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("isDefaultForPaid"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isDefaultForPaid = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("isFreeTierEnabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isFreeTierEnabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("isPaidEnabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isPaidEnabled = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AutonomousDbVersionProperties( + version, + dbWorkload, + isDefaultForFree, + isDefaultForPaid, + isFreeTierEnabled, + isPaidEnabled, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AutonomousDbVersionProperties)} does not support writing '{options.Format}' format."); + } + } + + AutonomousDbVersionProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAutonomousDbVersionProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AutonomousDbVersionProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDbVersionProperties.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDbVersionProperties.cs new file mode 100644 index 000000000000..ba70a7ad559a --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDbVersionProperties.cs @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// AutonomousDbVersion resource model. + public partial class AutonomousDbVersionProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Supported Autonomous Db versions. + /// is null. + internal AutonomousDbVersionProperties(string version) + { + Argument.AssertNotNull(version, nameof(version)); + + Version = version; + } + + /// Initializes a new instance of . + /// Supported Autonomous Db versions. + /// The Autonomous Database workload type. + /// True if this version of the Oracle Database software's default is free. + /// True if this version of the Oracle Database software's default is paid. + /// True if this version of the Oracle Database software can be used for Always-Free Autonomous Databases. + /// True if this version of the Oracle Database software has payments enabled. + /// Keeps track of any properties unknown to the library. + internal AutonomousDbVersionProperties(string version, WorkloadType? dbWorkload, bool? isDefaultForFree, bool? isDefaultForPaid, bool? isFreeTierEnabled, bool? isPaidEnabled, IDictionary serializedAdditionalRawData) + { + Version = version; + DbWorkload = dbWorkload; + IsDefaultForFree = isDefaultForFree; + IsDefaultForPaid = isDefaultForPaid; + IsFreeTierEnabled = isFreeTierEnabled; + IsPaidEnabled = isPaidEnabled; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AutonomousDbVersionProperties() + { + } + + /// Supported Autonomous Db versions. + public string Version { get; } + /// The Autonomous Database workload type. + public WorkloadType? DbWorkload { get; } + /// True if this version of the Oracle Database software's default is free. + public bool? IsDefaultForFree { get; } + /// True if this version of the Oracle Database software's default is paid. + public bool? IsDefaultForPaid { get; } + /// True if this version of the Oracle Database software can be used for Always-Free Autonomous Databases. + public bool? IsFreeTierEnabled { get; } + /// True if this version of the Oracle Database software has payments enabled. + public bool? IsPaidEnabled { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousMaintenanceScheduleType.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousMaintenanceScheduleType.cs new file mode 100644 index 000000000000..3a445168a667 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousMaintenanceScheduleType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// Autonomous database maintenance schedule type enum. + public readonly partial struct AutonomousMaintenanceScheduleType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AutonomousMaintenanceScheduleType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EarlyValue = "Early"; + private const string RegularValue = "Regular"; + + /// Early maintenance schedule. + public static AutonomousMaintenanceScheduleType Early { get; } = new AutonomousMaintenanceScheduleType(EarlyValue); + /// Regular maintenance schedule. + public static AutonomousMaintenanceScheduleType Regular { get; } = new AutonomousMaintenanceScheduleType(RegularValue); + /// Determines if two values are the same. + public static bool operator ==(AutonomousMaintenanceScheduleType left, AutonomousMaintenanceScheduleType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AutonomousMaintenanceScheduleType left, AutonomousMaintenanceScheduleType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AutonomousMaintenanceScheduleType(string value) => new AutonomousMaintenanceScheduleType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AutonomousMaintenanceScheduleType other && Equals(other); + /// + public bool Equals(AutonomousMaintenanceScheduleType 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/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AzureResourceProvisioningState.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AzureResourceProvisioningState.cs new file mode 100644 index 000000000000..3b2c466b3695 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AzureResourceProvisioningState.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// Azure Resource Provisioning State enum. + public readonly partial struct AzureResourceProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AzureResourceProvisioningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + private const string CanceledValue = "Canceled"; + private const string ProvisioningValue = "Provisioning"; + + /// Resource has been created. + public static AzureResourceProvisioningState Succeeded { get; } = new AzureResourceProvisioningState(SucceededValue); + /// Resource creation failed. + public static AzureResourceProvisioningState Failed { get; } = new AzureResourceProvisioningState(FailedValue); + /// Resource creation was canceled. + public static AzureResourceProvisioningState Canceled { get; } = new AzureResourceProvisioningState(CanceledValue); + /// Indicates that resource in Provisioning state. + public static AzureResourceProvisioningState Provisioning { get; } = new AzureResourceProvisioningState(ProvisioningValue); + /// Determines if two values are the same. + public static bool operator ==(AzureResourceProvisioningState left, AzureResourceProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AzureResourceProvisioningState left, AzureResourceProvisioningState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AzureResourceProvisioningState(string value) => new AzureResourceProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AzureResourceProvisioningState other && Equals(other); + /// + public bool Equals(AzureResourceProvisioningState 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/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AzureSubscriptions.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AzureSubscriptions.Serialization.cs new file mode 100644 index 000000000000..0a566c92b8c3 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AzureSubscriptions.Serialization.cs @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + public partial class AzureSubscriptions : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AzureSubscriptions)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("azureSubscriptionIds"u8); + writer.WriteStartArray(); + foreach (var item in AzureSubscriptionIds) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AzureSubscriptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AzureSubscriptions)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAzureSubscriptions(document.RootElement, options); + } + + internal static AzureSubscriptions DeserializeAzureSubscriptions(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList azureSubscriptionIds = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("azureSubscriptionIds"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + azureSubscriptionIds = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AzureSubscriptions(azureSubscriptionIds, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AzureSubscriptions)} does not support writing '{options.Format}' format."); + } + } + + AzureSubscriptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAzureSubscriptions(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AzureSubscriptions)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AzureSubscriptions.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AzureSubscriptions.cs new file mode 100644 index 000000000000..4fc171c10996 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AzureSubscriptions.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// Azure Subscriptions model. + public partial class AzureSubscriptions + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Azure Subscription Ids to be updated. + /// is null. + public AzureSubscriptions(IEnumerable azureSubscriptionIds) + { + Argument.AssertNotNull(azureSubscriptionIds, nameof(azureSubscriptionIds)); + + AzureSubscriptionIds = azureSubscriptionIds.ToList(); + } + + /// Initializes a new instance of . + /// Azure Subscription Ids to be updated. + /// Keeps track of any properties unknown to the library. + internal AzureSubscriptions(IList azureSubscriptionIds, IDictionary serializedAdditionalRawData) + { + AzureSubscriptionIds = azureSubscriptionIds; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AzureSubscriptions() + { + } + + /// Azure Subscription Ids to be updated. + public IList AzureSubscriptionIds { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloneType.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloneType.cs new file mode 100644 index 000000000000..db6ecc558ea3 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloneType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// Clone type enum. + public readonly partial struct CloneType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public CloneType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string FullValue = "Full"; + private const string MetadataValue = "Metadata"; + + /// Full clone. + public static CloneType Full { get; } = new CloneType(FullValue); + /// Metadata only. + public static CloneType Metadata { get; } = new CloneType(MetadataValue); + /// Determines if two values are the same. + public static bool operator ==(CloneType left, CloneType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(CloneType left, CloneType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator CloneType(string value) => new CloneType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is CloneType other && Equals(other); + /// + public bool Equals(CloneType 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/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudAccountProvisioningState.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudAccountProvisioningState.cs new file mode 100644 index 000000000000..36382281a4c2 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudAccountProvisioningState.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// CloudAccountProvisioningState enum. + public readonly partial struct CloudAccountProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public CloudAccountProvisioningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PendingValue = "Pending"; + private const string ProvisioningValue = "Provisioning"; + private const string AvailableValue = "Available"; + + /// Pending - Initial state when Oracle cloud account is not configured. + public static CloudAccountProvisioningState Pending { get; } = new CloudAccountProvisioningState(PendingValue); + /// Provisioning - State when Oracle cloud account is being provisioned. + public static CloudAccountProvisioningState Provisioning { get; } = new CloudAccountProvisioningState(ProvisioningValue); + /// Available - State when Oracle cloud account cloud linking is complete and it is available. + public static CloudAccountProvisioningState Available { get; } = new CloudAccountProvisioningState(AvailableValue); + /// Determines if two values are the same. + public static bool operator ==(CloudAccountProvisioningState left, CloudAccountProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(CloudAccountProvisioningState left, CloudAccountProvisioningState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator CloudAccountProvisioningState(string value) => new CloudAccountProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is CloudAccountProvisioningState other && Equals(other); + /// + public bool Equals(CloudAccountProvisioningState 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/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudExadataInfrastructureLifecycleState.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudExadataInfrastructureLifecycleState.cs new file mode 100644 index 000000000000..8146d7488fe9 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudExadataInfrastructureLifecycleState.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// CloudExadataInfrastructureLifecycleState enum. + public readonly partial struct CloudExadataInfrastructureLifecycleState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public CloudExadataInfrastructureLifecycleState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ProvisioningValue = "Provisioning"; + private const string AvailableValue = "Available"; + private const string UpdatingValue = "Updating"; + private const string TerminatingValue = "Terminating"; + private const string TerminatedValue = "Terminated"; + private const string MaintenanceInProgressValue = "MaintenanceInProgress"; + private const string FailedValue = "Failed"; + + /// Indicates that resource in Provisioning state. + public static CloudExadataInfrastructureLifecycleState Provisioning { get; } = new CloudExadataInfrastructureLifecycleState(ProvisioningValue); + /// Indicates that resource in Available state. + public static CloudExadataInfrastructureLifecycleState Available { get; } = new CloudExadataInfrastructureLifecycleState(AvailableValue); + /// Indicates that resource in Updating state. + public static CloudExadataInfrastructureLifecycleState Updating { get; } = new CloudExadataInfrastructureLifecycleState(UpdatingValue); + /// Indicates that resource in Terminating state. + public static CloudExadataInfrastructureLifecycleState Terminating { get; } = new CloudExadataInfrastructureLifecycleState(TerminatingValue); + /// Indicates that resource in Terminated state. + public static CloudExadataInfrastructureLifecycleState Terminated { get; } = new CloudExadataInfrastructureLifecycleState(TerminatedValue); + /// Indicates that resource maintenance in progress state. + public static CloudExadataInfrastructureLifecycleState MaintenanceInProgress { get; } = new CloudExadataInfrastructureLifecycleState(MaintenanceInProgressValue); + /// Indicates that resource in Failed state. + public static CloudExadataInfrastructureLifecycleState Failed { get; } = new CloudExadataInfrastructureLifecycleState(FailedValue); + /// Determines if two values are the same. + public static bool operator ==(CloudExadataInfrastructureLifecycleState left, CloudExadataInfrastructureLifecycleState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(CloudExadataInfrastructureLifecycleState left, CloudExadataInfrastructureLifecycleState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator CloudExadataInfrastructureLifecycleState(string value) => new CloudExadataInfrastructureLifecycleState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is CloudExadataInfrastructureLifecycleState other && Equals(other); + /// + public bool Equals(CloudExadataInfrastructureLifecycleState 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/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudExadataInfrastructureListResult.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudExadataInfrastructureListResult.Serialization.cs new file mode 100644 index 000000000000..ee334679aed9 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudExadataInfrastructureListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + internal partial class CloudExadataInfrastructureListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CloudExadataInfrastructureListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + CloudExadataInfrastructureListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CloudExadataInfrastructureListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCloudExadataInfrastructureListResult(document.RootElement, options); + } + + internal static CloudExadataInfrastructureListResult DeserializeCloudExadataInfrastructureListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(CloudExadataInfrastructureData.DeserializeCloudExadataInfrastructureData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CloudExadataInfrastructureListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(CloudExadataInfrastructureListResult)} does not support writing '{options.Format}' format."); + } + } + + CloudExadataInfrastructureListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeCloudExadataInfrastructureListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CloudExadataInfrastructureListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudExadataInfrastructureListResult.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudExadataInfrastructureListResult.cs new file mode 100644 index 000000000000..e7dc1dc9f850 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudExadataInfrastructureListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// The response of a CloudExadataInfrastructure list operation. + internal partial class CloudExadataInfrastructureListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The CloudExadataInfrastructure items on this page. + /// is null. + internal CloudExadataInfrastructureListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The CloudExadataInfrastructure items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal CloudExadataInfrastructureListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal CloudExadataInfrastructureListResult() + { + } + + /// The CloudExadataInfrastructure items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudExadataInfrastructurePatch.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudExadataInfrastructurePatch.Serialization.cs new file mode 100644 index 000000000000..669e33c777af --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudExadataInfrastructurePatch.Serialization.cs @@ -0,0 +1,184 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + public partial class CloudExadataInfrastructurePatch : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CloudExadataInfrastructurePatch)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(Zones)) + { + writer.WritePropertyName("zones"u8); + writer.WriteStartArray(); + foreach (var item in Zones) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + CloudExadataInfrastructurePatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CloudExadataInfrastructurePatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCloudExadataInfrastructurePatch(document.RootElement, options); + } + + internal static CloudExadataInfrastructurePatch DeserializeCloudExadataInfrastructurePatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList zones = default; + IDictionary tags = default; + CloudExadataInfrastructureUpdateProperties properties = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("zones"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + zones = array; + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = CloudExadataInfrastructureUpdateProperties.DeserializeCloudExadataInfrastructureUpdateProperties(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CloudExadataInfrastructurePatch(zones ?? new ChangeTrackingList(), tags ?? new ChangeTrackingDictionary(), properties, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(CloudExadataInfrastructurePatch)} does not support writing '{options.Format}' format."); + } + } + + CloudExadataInfrastructurePatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeCloudExadataInfrastructurePatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CloudExadataInfrastructurePatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudExadataInfrastructurePatch.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudExadataInfrastructurePatch.cs new file mode 100644 index 000000000000..42364e92eec8 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudExadataInfrastructurePatch.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// The type used for update operations of the CloudExadataInfrastructure. + public partial class CloudExadataInfrastructurePatch + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public CloudExadataInfrastructurePatch() + { + Zones = new ChangeTrackingList(); + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// CloudExadataInfrastructure zones. + /// Resource tags. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal CloudExadataInfrastructurePatch(IList zones, IDictionary tags, CloudExadataInfrastructureUpdateProperties properties, IDictionary serializedAdditionalRawData) + { + Zones = zones; + Tags = tags; + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// CloudExadataInfrastructure zones. + public IList Zones { get; } + /// Resource tags. + public IDictionary Tags { get; } + /// The resource-specific properties for this resource. + public CloudExadataInfrastructureUpdateProperties Properties { get; set; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudExadataInfrastructureProperties.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudExadataInfrastructureProperties.Serialization.cs new file mode 100644 index 000000000000..e7ea387f4e4c --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudExadataInfrastructureProperties.Serialization.cs @@ -0,0 +1,641 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + public partial class CloudExadataInfrastructureProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CloudExadataInfrastructureProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsCollectionDefined(DefinedFileSystemConfiguration)) + { + writer.WritePropertyName("definedFileSystemConfiguration"u8); + writer.WriteStartArray(); + foreach (var item in DefinedFileSystemConfiguration) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(Ocid)) + { + writer.WritePropertyName("ocid"u8); + writer.WriteStringValue(Ocid); + } + if (Optional.IsDefined(ComputeCount)) + { + writer.WritePropertyName("computeCount"u8); + writer.WriteNumberValue(ComputeCount.Value); + } + if (Optional.IsDefined(StorageCount)) + { + writer.WritePropertyName("storageCount"u8); + writer.WriteNumberValue(StorageCount.Value); + } + if (options.Format != "W" && Optional.IsDefined(TotalStorageSizeInGbs)) + { + writer.WritePropertyName("totalStorageSizeInGbs"u8); + writer.WriteNumberValue(TotalStorageSizeInGbs.Value); + } + if (options.Format != "W" && Optional.IsDefined(AvailableStorageSizeInGbs)) + { + writer.WritePropertyName("availableStorageSizeInGbs"u8); + writer.WriteNumberValue(AvailableStorageSizeInGbs.Value); + } + if (options.Format != "W" && Optional.IsDefined(TimeCreated)) + { + writer.WritePropertyName("timeCreated"u8); + writer.WriteStringValue(TimeCreated); + } + if (options.Format != "W" && Optional.IsDefined(LifecycleDetails)) + { + writer.WritePropertyName("lifecycleDetails"u8); + writer.WriteStringValue(LifecycleDetails); + } + if (Optional.IsDefined(MaintenanceWindow)) + { + writer.WritePropertyName("maintenanceWindow"u8); + writer.WriteObjectValue(MaintenanceWindow, options); + } + if (options.Format != "W" && Optional.IsDefined(EstimatedPatchingTime)) + { + writer.WritePropertyName("estimatedPatchingTime"u8); + writer.WriteObjectValue(EstimatedPatchingTime, options); + } + if (Optional.IsCollectionDefined(CustomerContacts)) + { + writer.WritePropertyName("customerContacts"u8); + writer.WriteStartArray(); + foreach (var item in CustomerContacts) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(LifecycleState)) + { + writer.WritePropertyName("lifecycleState"u8); + writer.WriteStringValue(LifecycleState.Value.ToString()); + } + writer.WritePropertyName("shape"u8); + writer.WriteStringValue(Shape); + if (options.Format != "W" && Optional.IsDefined(OciUri)) + { + writer.WritePropertyName("ociUrl"u8); + writer.WriteStringValue(OciUri.AbsoluteUri); + } + if (options.Format != "W" && Optional.IsDefined(CpuCount)) + { + writer.WritePropertyName("cpuCount"u8); + writer.WriteNumberValue(CpuCount.Value); + } + if (options.Format != "W" && Optional.IsDefined(MaxCpuCount)) + { + writer.WritePropertyName("maxCpuCount"u8); + writer.WriteNumberValue(MaxCpuCount.Value); + } + if (options.Format != "W" && Optional.IsDefined(MemorySizeInGbs)) + { + writer.WritePropertyName("memorySizeInGbs"u8); + writer.WriteNumberValue(MemorySizeInGbs.Value); + } + if (options.Format != "W" && Optional.IsDefined(MaxMemoryInGbs)) + { + writer.WritePropertyName("maxMemoryInGbs"u8); + writer.WriteNumberValue(MaxMemoryInGbs.Value); + } + if (options.Format != "W" && Optional.IsDefined(DbNodeStorageSizeInGbs)) + { + writer.WritePropertyName("dbNodeStorageSizeInGbs"u8); + writer.WriteNumberValue(DbNodeStorageSizeInGbs.Value); + } + if (options.Format != "W" && Optional.IsDefined(MaxDbNodeStorageSizeInGbs)) + { + writer.WritePropertyName("maxDbNodeStorageSizeInGbs"u8); + writer.WriteNumberValue(MaxDbNodeStorageSizeInGbs.Value); + } + if (options.Format != "W" && Optional.IsDefined(DataStorageSizeInTbs)) + { + writer.WritePropertyName("dataStorageSizeInTbs"u8); + writer.WriteNumberValue(DataStorageSizeInTbs.Value); + } + if (options.Format != "W" && Optional.IsDefined(MaxDataStorageInTbs)) + { + writer.WritePropertyName("maxDataStorageInTbs"u8); + writer.WriteNumberValue(MaxDataStorageInTbs.Value); + } + if (options.Format != "W" && Optional.IsDefined(DbServerVersion)) + { + writer.WritePropertyName("dbServerVersion"u8); + writer.WriteStringValue(DbServerVersion); + } + if (options.Format != "W" && Optional.IsDefined(StorageServerVersion)) + { + writer.WritePropertyName("storageServerVersion"u8); + writer.WriteStringValue(StorageServerVersion); + } + if (options.Format != "W" && Optional.IsDefined(ActivatedStorageCount)) + { + writer.WritePropertyName("activatedStorageCount"u8); + writer.WriteNumberValue(ActivatedStorageCount.Value); + } + if (options.Format != "W" && Optional.IsDefined(AdditionalStorageCount)) + { + writer.WritePropertyName("additionalStorageCount"u8); + writer.WriteNumberValue(AdditionalStorageCount.Value); + } + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + if (options.Format != "W" && Optional.IsDefined(LastMaintenanceRunId)) + { + writer.WritePropertyName("lastMaintenanceRunId"u8); + writer.WriteStringValue(LastMaintenanceRunId); + } + if (options.Format != "W" && Optional.IsDefined(NextMaintenanceRunId)) + { + writer.WritePropertyName("nextMaintenanceRunId"u8); + writer.WriteStringValue(NextMaintenanceRunId); + } + if (options.Format != "W" && Optional.IsDefined(MonthlyDbServerVersion)) + { + writer.WritePropertyName("monthlyDbServerVersion"u8); + writer.WriteStringValue(MonthlyDbServerVersion); + } + if (options.Format != "W" && Optional.IsDefined(MonthlyStorageServerVersion)) + { + writer.WritePropertyName("monthlyStorageServerVersion"u8); + writer.WriteStringValue(MonthlyStorageServerVersion); + } + if (Optional.IsDefined(DatabaseServerType)) + { + writer.WritePropertyName("databaseServerType"u8); + writer.WriteStringValue(DatabaseServerType); + } + if (Optional.IsDefined(StorageServerType)) + { + writer.WritePropertyName("storageServerType"u8); + writer.WriteStringValue(StorageServerType); + } + if (options.Format != "W" && Optional.IsDefined(ComputeModel)) + { + writer.WritePropertyName("computeModel"u8); + writer.WriteStringValue(ComputeModel.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + CloudExadataInfrastructureProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CloudExadataInfrastructureProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCloudExadataInfrastructureProperties(document.RootElement, options); + } + + internal static CloudExadataInfrastructureProperties DeserializeCloudExadataInfrastructureProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList definedFileSystemConfiguration = default; + string ocid = default; + int? computeCount = default; + int? storageCount = default; + int? totalStorageSizeInGbs = default; + int? availableStorageSizeInGbs = default; + string timeCreated = default; + string lifecycleDetails = default; + MaintenanceWindow maintenanceWindow = default; + EstimatedPatchingTime estimatedPatchingTime = default; + IList customerContacts = default; + AzureResourceProvisioningState? provisioningState = default; + CloudExadataInfrastructureLifecycleState? lifecycleState = default; + string shape = default; + Uri ociUrl = default; + int? cpuCount = default; + int? maxCpuCount = default; + int? memorySizeInGbs = default; + int? maxMemoryInGbs = default; + int? dbNodeStorageSizeInGbs = default; + int? maxDbNodeStorageSizeInGbs = default; + double? dataStorageSizeInTbs = default; + double? maxDataStorageInTbs = default; + string dbServerVersion = default; + string storageServerVersion = default; + int? activatedStorageCount = default; + int? additionalStorageCount = default; + string displayName = default; + string lastMaintenanceRunId = default; + string nextMaintenanceRunId = default; + string monthlyDbServerVersion = default; + string monthlyStorageServerVersion = default; + string databaseServerType = default; + string storageServerType = default; + ComputeModel? computeModel = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("definedFileSystemConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(Models.DefinedFileSystemConfiguration.DeserializeDefinedFileSystemConfiguration(item, options)); + } + definedFileSystemConfiguration = array; + continue; + } + if (property.NameEquals("ocid"u8)) + { + ocid = property.Value.GetString(); + continue; + } + if (property.NameEquals("computeCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + computeCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("storageCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + storageCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("totalStorageSizeInGbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + totalStorageSizeInGbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("availableStorageSizeInGbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + availableStorageSizeInGbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("timeCreated"u8)) + { + timeCreated = property.Value.GetString(); + continue; + } + if (property.NameEquals("lifecycleDetails"u8)) + { + lifecycleDetails = property.Value.GetString(); + continue; + } + if (property.NameEquals("maintenanceWindow"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + maintenanceWindow = MaintenanceWindow.DeserializeMaintenanceWindow(property.Value, options); + continue; + } + if (property.NameEquals("estimatedPatchingTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + estimatedPatchingTime = EstimatedPatchingTime.DeserializeEstimatedPatchingTime(property.Value, options); + continue; + } + if (property.NameEquals("customerContacts"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(CustomerContact.DeserializeCustomerContact(item, options)); + } + customerContacts = array; + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new AzureResourceProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("lifecycleState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lifecycleState = new CloudExadataInfrastructureLifecycleState(property.Value.GetString()); + continue; + } + if (property.NameEquals("shape"u8)) + { + shape = property.Value.GetString(); + continue; + } + if (property.NameEquals("ociUrl"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + ociUrl = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("cpuCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + cpuCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("maxCpuCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + maxCpuCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("memorySizeInGbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + memorySizeInGbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("maxMemoryInGbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + maxMemoryInGbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("dbNodeStorageSizeInGbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dbNodeStorageSizeInGbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("maxDbNodeStorageSizeInGbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + maxDbNodeStorageSizeInGbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("dataStorageSizeInTbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dataStorageSizeInTbs = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("maxDataStorageInTbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + maxDataStorageInTbs = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("dbServerVersion"u8)) + { + dbServerVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("storageServerVersion"u8)) + { + storageServerVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("activatedStorageCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + activatedStorageCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("additionalStorageCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + additionalStorageCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("lastMaintenanceRunId"u8)) + { + lastMaintenanceRunId = property.Value.GetString(); + continue; + } + if (property.NameEquals("nextMaintenanceRunId"u8)) + { + nextMaintenanceRunId = property.Value.GetString(); + continue; + } + if (property.NameEquals("monthlyDbServerVersion"u8)) + { + monthlyDbServerVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("monthlyStorageServerVersion"u8)) + { + monthlyStorageServerVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("databaseServerType"u8)) + { + databaseServerType = property.Value.GetString(); + continue; + } + if (property.NameEquals("storageServerType"u8)) + { + storageServerType = property.Value.GetString(); + continue; + } + if (property.NameEquals("computeModel"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + computeModel = new ComputeModel(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CloudExadataInfrastructureProperties( + definedFileSystemConfiguration ?? new ChangeTrackingList(), + ocid, + computeCount, + storageCount, + totalStorageSizeInGbs, + availableStorageSizeInGbs, + timeCreated, + lifecycleDetails, + maintenanceWindow, + estimatedPatchingTime, + customerContacts ?? new ChangeTrackingList(), + provisioningState, + lifecycleState, + shape, + ociUrl, + cpuCount, + maxCpuCount, + memorySizeInGbs, + maxMemoryInGbs, + dbNodeStorageSizeInGbs, + maxDbNodeStorageSizeInGbs, + dataStorageSizeInTbs, + maxDataStorageInTbs, + dbServerVersion, + storageServerVersion, + activatedStorageCount, + additionalStorageCount, + displayName, + lastMaintenanceRunId, + nextMaintenanceRunId, + monthlyDbServerVersion, + monthlyStorageServerVersion, + databaseServerType, + storageServerType, + computeModel, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(CloudExadataInfrastructureProperties)} does not support writing '{options.Format}' format."); + } + } + + CloudExadataInfrastructureProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeCloudExadataInfrastructureProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CloudExadataInfrastructureProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudExadataInfrastructureProperties.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudExadataInfrastructureProperties.cs new file mode 100644 index 000000000000..6f7af4dd76ea --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudExadataInfrastructureProperties.cs @@ -0,0 +1,216 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// CloudExadataInfrastructure resource model. + public partial class CloudExadataInfrastructureProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The model name of the cloud Exadata infrastructure resource. + /// The name for the Exadata infrastructure. + /// or is null. + public CloudExadataInfrastructureProperties(string shape, string displayName) + { + Argument.AssertNotNull(shape, nameof(shape)); + Argument.AssertNotNull(displayName, nameof(displayName)); + + DefinedFileSystemConfiguration = new ChangeTrackingList(); + CustomerContacts = new ChangeTrackingList(); + Shape = shape; + DisplayName = displayName; + } + + /// Initializes a new instance of . + /// Defined file system configurations. + /// Exadata infra ocid. + /// The number of compute servers for the cloud Exadata infrastructure. + /// The number of storage servers for the cloud Exadata infrastructure. + /// The total storage allocated to the cloud Exadata infrastructure resource, in gigabytes (GB). + /// The available storage can be allocated to the cloud Exadata infrastructure resource, in gigabytes (GB). + /// The date and time the cloud Exadata infrastructure resource was created. + /// Additional information about the current lifecycle state. + /// maintenanceWindow property. + /// The estimated total time required in minutes for all patching operations (database server, storage server, and network switch patching). + /// The list of customer email addresses that receive information from Oracle about the specified OCI Database service resource. Oracle uses these email addresses to send notifications about planned and unplanned software maintenance updates, information about system hardware, and other information needed by administrators. Up to 10 email addresses can be added to the customer contacts for a cloud Exadata infrastructure instance. + /// CloudExadataInfrastructure provisioning state. + /// CloudExadataInfrastructure lifecycle state. + /// The model name of the cloud Exadata infrastructure resource. + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + /// The total number of CPU cores allocated. + /// The total number of CPU cores available. + /// The memory allocated in GBs. + /// The total memory available in GBs. + /// The local node storage to be allocated in GBs. + /// The total local node storage available in GBs. + /// The quantity of data in the database, in terabytes. + /// The total available DATA disk group size. + /// The software version of the database servers (dom0) in the Exadata infrastructure. + /// The software version of the storage servers (cells) in the Exadata infrastructure. + /// The requested number of additional storage servers activated for the Exadata infrastructure. + /// The requested number of additional storage servers for the Exadata infrastructure. + /// The name for the Exadata infrastructure. + /// The OCID of the last maintenance run. + /// The OCID of the next maintenance run. + /// Monthly Db Server version. + /// Monthly Storage Server version. + /// The database server model type of the cloud Exadata infrastructure resource. + /// The storage server model type of the cloud Exadata infrastructure resource. + /// The compute model of the Exadata Infrastructure. + /// Keeps track of any properties unknown to the library. + internal CloudExadataInfrastructureProperties(IReadOnlyList definedFileSystemConfiguration, string ocid, int? computeCount, int? storageCount, int? totalStorageSizeInGbs, int? availableStorageSizeInGbs, string timeCreated, string lifecycleDetails, MaintenanceWindow maintenanceWindow, EstimatedPatchingTime estimatedPatchingTime, IList customerContacts, AzureResourceProvisioningState? provisioningState, CloudExadataInfrastructureLifecycleState? lifecycleState, string shape, Uri ociUri, int? cpuCount, int? maxCpuCount, int? memorySizeInGbs, int? maxMemoryInGbs, int? dbNodeStorageSizeInGbs, int? maxDbNodeStorageSizeInGbs, double? dataStorageSizeInTbs, double? maxDataStorageInTbs, string dbServerVersion, string storageServerVersion, int? activatedStorageCount, int? additionalStorageCount, string displayName, string lastMaintenanceRunId, string nextMaintenanceRunId, string monthlyDbServerVersion, string monthlyStorageServerVersion, string databaseServerType, string storageServerType, ComputeModel? computeModel, IDictionary serializedAdditionalRawData) + { + DefinedFileSystemConfiguration = definedFileSystemConfiguration; + Ocid = ocid; + ComputeCount = computeCount; + StorageCount = storageCount; + TotalStorageSizeInGbs = totalStorageSizeInGbs; + AvailableStorageSizeInGbs = availableStorageSizeInGbs; + TimeCreated = timeCreated; + LifecycleDetails = lifecycleDetails; + MaintenanceWindow = maintenanceWindow; + EstimatedPatchingTime = estimatedPatchingTime; + CustomerContacts = customerContacts; + ProvisioningState = provisioningState; + LifecycleState = lifecycleState; + Shape = shape; + OciUri = ociUri; + CpuCount = cpuCount; + MaxCpuCount = maxCpuCount; + MemorySizeInGbs = memorySizeInGbs; + MaxMemoryInGbs = maxMemoryInGbs; + DbNodeStorageSizeInGbs = dbNodeStorageSizeInGbs; + MaxDbNodeStorageSizeInGbs = maxDbNodeStorageSizeInGbs; + DataStorageSizeInTbs = dataStorageSizeInTbs; + MaxDataStorageInTbs = maxDataStorageInTbs; + DbServerVersion = dbServerVersion; + StorageServerVersion = storageServerVersion; + ActivatedStorageCount = activatedStorageCount; + AdditionalStorageCount = additionalStorageCount; + DisplayName = displayName; + LastMaintenanceRunId = lastMaintenanceRunId; + NextMaintenanceRunId = nextMaintenanceRunId; + MonthlyDbServerVersion = monthlyDbServerVersion; + MonthlyStorageServerVersion = monthlyStorageServerVersion; + DatabaseServerType = databaseServerType; + StorageServerType = storageServerType; + ComputeModel = computeModel; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal CloudExadataInfrastructureProperties() + { + } + + /// Defined file system configurations. + public IReadOnlyList DefinedFileSystemConfiguration { get; } + /// Exadata infra ocid. + public string Ocid { get; } + /// The number of compute servers for the cloud Exadata infrastructure. + public int? ComputeCount { get; set; } + /// The number of storage servers for the cloud Exadata infrastructure. + public int? StorageCount { get; set; } + /// The total storage allocated to the cloud Exadata infrastructure resource, in gigabytes (GB). + public int? TotalStorageSizeInGbs { get; } + /// The available storage can be allocated to the cloud Exadata infrastructure resource, in gigabytes (GB). + public int? AvailableStorageSizeInGbs { get; } + /// The date and time the cloud Exadata infrastructure resource was created. + public string TimeCreated { get; } + /// Additional information about the current lifecycle state. + public string LifecycleDetails { get; } + /// maintenanceWindow property. + public MaintenanceWindow MaintenanceWindow { get; set; } + /// The estimated total time required in minutes for all patching operations (database server, storage server, and network switch patching). + public EstimatedPatchingTime EstimatedPatchingTime { get; } + /// The list of customer email addresses that receive information from Oracle about the specified OCI Database service resource. Oracle uses these email addresses to send notifications about planned and unplanned software maintenance updates, information about system hardware, and other information needed by administrators. Up to 10 email addresses can be added to the customer contacts for a cloud Exadata infrastructure instance. + public IList CustomerContacts { get; } + /// CloudExadataInfrastructure provisioning state. + public AzureResourceProvisioningState? ProvisioningState { get; } + /// CloudExadataInfrastructure lifecycle state. + public CloudExadataInfrastructureLifecycleState? LifecycleState { get; } + /// The model name of the cloud Exadata infrastructure resource. + public string Shape { get; set; } + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + public Uri OciUri { get; } + /// The total number of CPU cores allocated. + public int? CpuCount { get; } + /// The total number of CPU cores available. + public int? MaxCpuCount { get; } + /// The memory allocated in GBs. + public int? MemorySizeInGbs { get; } + /// The total memory available in GBs. + public int? MaxMemoryInGbs { get; } + /// The local node storage to be allocated in GBs. + public int? DbNodeStorageSizeInGbs { get; } + /// The total local node storage available in GBs. + public int? MaxDbNodeStorageSizeInGbs { get; } + /// The quantity of data in the database, in terabytes. + public double? DataStorageSizeInTbs { get; } + /// The total available DATA disk group size. + public double? MaxDataStorageInTbs { get; } + /// The software version of the database servers (dom0) in the Exadata infrastructure. + public string DbServerVersion { get; } + /// The software version of the storage servers (cells) in the Exadata infrastructure. + public string StorageServerVersion { get; } + /// The requested number of additional storage servers activated for the Exadata infrastructure. + public int? ActivatedStorageCount { get; } + /// The requested number of additional storage servers for the Exadata infrastructure. + public int? AdditionalStorageCount { get; } + /// The name for the Exadata infrastructure. + public string DisplayName { get; set; } + /// The OCID of the last maintenance run. + public string LastMaintenanceRunId { get; } + /// The OCID of the next maintenance run. + public string NextMaintenanceRunId { get; } + /// Monthly Db Server version. + public string MonthlyDbServerVersion { get; } + /// Monthly Storage Server version. + public string MonthlyStorageServerVersion { get; } + /// The database server model type of the cloud Exadata infrastructure resource. + public string DatabaseServerType { get; set; } + /// The storage server model type of the cloud Exadata infrastructure resource. + public string StorageServerType { get; set; } + /// The compute model of the Exadata Infrastructure. + public ComputeModel? ComputeModel { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudExadataInfrastructureUpdateProperties.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudExadataInfrastructureUpdateProperties.Serialization.cs new file mode 100644 index 000000000000..967ad40ff88a --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudExadataInfrastructureUpdateProperties.Serialization.cs @@ -0,0 +1,205 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + public partial class CloudExadataInfrastructureUpdateProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CloudExadataInfrastructureUpdateProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(ComputeCount)) + { + writer.WritePropertyName("computeCount"u8); + writer.WriteNumberValue(ComputeCount.Value); + } + if (Optional.IsDefined(StorageCount)) + { + writer.WritePropertyName("storageCount"u8); + writer.WriteNumberValue(StorageCount.Value); + } + if (Optional.IsDefined(MaintenanceWindow)) + { + writer.WritePropertyName("maintenanceWindow"u8); + writer.WriteObjectValue(MaintenanceWindow, options); + } + if (Optional.IsCollectionDefined(CustomerContacts)) + { + writer.WritePropertyName("customerContacts"u8); + writer.WriteStartArray(); + foreach (var item in CustomerContacts) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(DisplayName)) + { + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + CloudExadataInfrastructureUpdateProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CloudExadataInfrastructureUpdateProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCloudExadataInfrastructureUpdateProperties(document.RootElement, options); + } + + internal static CloudExadataInfrastructureUpdateProperties DeserializeCloudExadataInfrastructureUpdateProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int? computeCount = default; + int? storageCount = default; + MaintenanceWindow maintenanceWindow = default; + IList customerContacts = default; + string displayName = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("computeCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + computeCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("storageCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + storageCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("maintenanceWindow"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + maintenanceWindow = MaintenanceWindow.DeserializeMaintenanceWindow(property.Value, options); + continue; + } + if (property.NameEquals("customerContacts"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(CustomerContact.DeserializeCustomerContact(item, options)); + } + customerContacts = array; + continue; + } + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CloudExadataInfrastructureUpdateProperties( + computeCount, + storageCount, + maintenanceWindow, + customerContacts ?? new ChangeTrackingList(), + displayName, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(CloudExadataInfrastructureUpdateProperties)} does not support writing '{options.Format}' format."); + } + } + + CloudExadataInfrastructureUpdateProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeCloudExadataInfrastructureUpdateProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CloudExadataInfrastructureUpdateProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudExadataInfrastructureUpdateProperties.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudExadataInfrastructureUpdateProperties.cs new file mode 100644 index 000000000000..8b009fb81db6 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudExadataInfrastructureUpdateProperties.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// The updatable properties of the CloudExadataInfrastructure. + public partial class CloudExadataInfrastructureUpdateProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public CloudExadataInfrastructureUpdateProperties() + { + CustomerContacts = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The number of compute servers for the cloud Exadata infrastructure. + /// The number of storage servers for the cloud Exadata infrastructure. + /// maintenanceWindow property. + /// The list of customer email addresses that receive information from Oracle about the specified OCI Database service resource. Oracle uses these email addresses to send notifications about planned and unplanned software maintenance updates, information about system hardware, and other information needed by administrators. Up to 10 email addresses can be added to the customer contacts for a cloud Exadata infrastructure instance. + /// The name for the Exadata infrastructure. + /// Keeps track of any properties unknown to the library. + internal CloudExadataInfrastructureUpdateProperties(int? computeCount, int? storageCount, MaintenanceWindow maintenanceWindow, IList customerContacts, string displayName, IDictionary serializedAdditionalRawData) + { + ComputeCount = computeCount; + StorageCount = storageCount; + MaintenanceWindow = maintenanceWindow; + CustomerContacts = customerContacts; + DisplayName = displayName; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The number of compute servers for the cloud Exadata infrastructure. + public int? ComputeCount { get; set; } + /// The number of storage servers for the cloud Exadata infrastructure. + public int? StorageCount { get; set; } + /// maintenanceWindow property. + public MaintenanceWindow MaintenanceWindow { get; set; } + /// The list of customer email addresses that receive information from Oracle about the specified OCI Database service resource. Oracle uses these email addresses to send notifications about planned and unplanned software maintenance updates, information about system hardware, and other information needed by administrators. Up to 10 email addresses can be added to the customer contacts for a cloud Exadata infrastructure instance. + public IList CustomerContacts { get; } + /// The name for the Exadata infrastructure. + public string DisplayName { get; set; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudVmClusterLifecycleState.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudVmClusterLifecycleState.cs new file mode 100644 index 000000000000..b3d2b88efd17 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudVmClusterLifecycleState.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// Cloud VM Cluster lifecycle state enum. + public readonly partial struct CloudVmClusterLifecycleState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public CloudVmClusterLifecycleState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ProvisioningValue = "Provisioning"; + private const string AvailableValue = "Available"; + private const string UpdatingValue = "Updating"; + private const string TerminatingValue = "Terminating"; + private const string TerminatedValue = "Terminated"; + private const string MaintenanceInProgressValue = "MaintenanceInProgress"; + private const string FailedValue = "Failed"; + + /// Indicates that resource in Provisioning state. + public static CloudVmClusterLifecycleState Provisioning { get; } = new CloudVmClusterLifecycleState(ProvisioningValue); + /// Indicates that resource in Available state. + public static CloudVmClusterLifecycleState Available { get; } = new CloudVmClusterLifecycleState(AvailableValue); + /// Indicates that resource in Updating state. + public static CloudVmClusterLifecycleState Updating { get; } = new CloudVmClusterLifecycleState(UpdatingValue); + /// Indicates that resource in Terminating state. + public static CloudVmClusterLifecycleState Terminating { get; } = new CloudVmClusterLifecycleState(TerminatingValue); + /// Indicates that resource in Terminated state. + public static CloudVmClusterLifecycleState Terminated { get; } = new CloudVmClusterLifecycleState(TerminatedValue); + /// Indicates that resource Maintenance in progress state. + public static CloudVmClusterLifecycleState MaintenanceInProgress { get; } = new CloudVmClusterLifecycleState(MaintenanceInProgressValue); + /// Indicates that resource in Failed state. + public static CloudVmClusterLifecycleState Failed { get; } = new CloudVmClusterLifecycleState(FailedValue); + /// Determines if two values are the same. + public static bool operator ==(CloudVmClusterLifecycleState left, CloudVmClusterLifecycleState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(CloudVmClusterLifecycleState left, CloudVmClusterLifecycleState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator CloudVmClusterLifecycleState(string value) => new CloudVmClusterLifecycleState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is CloudVmClusterLifecycleState other && Equals(other); + /// + public bool Equals(CloudVmClusterLifecycleState 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/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudVmClusterListResult.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudVmClusterListResult.Serialization.cs new file mode 100644 index 000000000000..196f84ffb5e5 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudVmClusterListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + internal partial class CloudVmClusterListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CloudVmClusterListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + CloudVmClusterListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CloudVmClusterListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCloudVmClusterListResult(document.RootElement, options); + } + + internal static CloudVmClusterListResult DeserializeCloudVmClusterListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(CloudVmClusterData.DeserializeCloudVmClusterData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CloudVmClusterListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(CloudVmClusterListResult)} does not support writing '{options.Format}' format."); + } + } + + CloudVmClusterListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeCloudVmClusterListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CloudVmClusterListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudVmClusterListResult.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudVmClusterListResult.cs new file mode 100644 index 000000000000..b2c864c3ded2 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudVmClusterListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// The response of a CloudVmCluster list operation. + internal partial class CloudVmClusterListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The CloudVmCluster items on this page. + /// is null. + internal CloudVmClusterListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The CloudVmCluster items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal CloudVmClusterListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal CloudVmClusterListResult() + { + } + + /// The CloudVmCluster items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudVmClusterPatch.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudVmClusterPatch.Serialization.cs new file mode 100644 index 000000000000..809f4363c28a --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudVmClusterPatch.Serialization.cs @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + public partial class CloudVmClusterPatch : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CloudVmClusterPatch)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + CloudVmClusterPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CloudVmClusterPatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCloudVmClusterPatch(document.RootElement, options); + } + + internal static CloudVmClusterPatch DeserializeCloudVmClusterPatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary tags = default; + CloudVmClusterUpdateProperties properties = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = CloudVmClusterUpdateProperties.DeserializeCloudVmClusterUpdateProperties(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CloudVmClusterPatch(tags ?? new ChangeTrackingDictionary(), properties, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(CloudVmClusterPatch)} does not support writing '{options.Format}' format."); + } + } + + CloudVmClusterPatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeCloudVmClusterPatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CloudVmClusterPatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudVmClusterPatch.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudVmClusterPatch.cs new file mode 100644 index 000000000000..67473a1a7c53 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudVmClusterPatch.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// The type used for update operations of the CloudVmCluster. + public partial class CloudVmClusterPatch + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public CloudVmClusterPatch() + { + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// Resource tags. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal CloudVmClusterPatch(IDictionary tags, CloudVmClusterUpdateProperties properties, IDictionary serializedAdditionalRawData) + { + Tags = tags; + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Resource tags. + public IDictionary Tags { get; } + /// The resource-specific properties for this resource. + public CloudVmClusterUpdateProperties Properties { get; set; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudVmClusterProperties.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudVmClusterProperties.Serialization.cs new file mode 100644 index 000000000000..7c2dcb534b32 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudVmClusterProperties.Serialization.cs @@ -0,0 +1,877 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + public partial class CloudVmClusterProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CloudVmClusterProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(Ocid)) + { + writer.WritePropertyName("ocid"u8); + writer.WriteStringValue(Ocid); + } + if (options.Format != "W" && Optional.IsDefined(ListenerPort)) + { + writer.WritePropertyName("listenerPort"u8); + writer.WriteNumberValue(ListenerPort.Value); + } + if (options.Format != "W" && Optional.IsDefined(NodeCount)) + { + writer.WritePropertyName("nodeCount"u8); + writer.WriteNumberValue(NodeCount.Value); + } + if (Optional.IsDefined(StorageSizeInGbs)) + { + writer.WritePropertyName("storageSizeInGbs"u8); + writer.WriteNumberValue(StorageSizeInGbs.Value); + } + if (Optional.IsCollectionDefined(FileSystemConfigurationDetails)) + { + writer.WritePropertyName("fileSystemConfigurationDetails"u8); + writer.WriteStartArray(); + foreach (var item in FileSystemConfigurationDetails) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(DataStorageSizeInTbs)) + { + writer.WritePropertyName("dataStorageSizeInTbs"u8); + writer.WriteNumberValue(DataStorageSizeInTbs.Value); + } + if (Optional.IsDefined(DbNodeStorageSizeInGbs)) + { + writer.WritePropertyName("dbNodeStorageSizeInGbs"u8); + writer.WriteNumberValue(DbNodeStorageSizeInGbs.Value); + } + if (Optional.IsDefined(MemorySizeInGbs)) + { + writer.WritePropertyName("memorySizeInGbs"u8); + writer.WriteNumberValue(MemorySizeInGbs.Value); + } + if (options.Format != "W" && Optional.IsDefined(TimeCreated)) + { + writer.WritePropertyName("timeCreated"u8); + writer.WriteStringValue(TimeCreated.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(LifecycleDetails)) + { + writer.WritePropertyName("lifecycleDetails"u8); + writer.WriteStringValue(LifecycleDetails); + } + if (Optional.IsDefined(TimeZone)) + { + writer.WritePropertyName("timeZone"u8); + writer.WriteStringValue(TimeZone); + } + if (Optional.IsDefined(ZoneId)) + { + writer.WritePropertyName("zoneId"u8); + writer.WriteStringValue(ZoneId); + } + writer.WritePropertyName("hostname"u8); + writer.WriteStringValue(Hostname); + if (Optional.IsDefined(Domain)) + { + writer.WritePropertyName("domain"u8); + writer.WriteStringValue(Domain); + } + writer.WritePropertyName("cpuCoreCount"u8); + writer.WriteNumberValue(CpuCoreCount); + if (Optional.IsDefined(OcpuCount)) + { + writer.WritePropertyName("ocpuCount"u8); + writer.WriteNumberValue(OcpuCount.Value); + } + if (Optional.IsDefined(ClusterName)) + { + writer.WritePropertyName("clusterName"u8); + writer.WriteStringValue(ClusterName); + } + if (Optional.IsDefined(DataStoragePercentage)) + { + writer.WritePropertyName("dataStoragePercentage"u8); + writer.WriteNumberValue(DataStoragePercentage.Value); + } + if (Optional.IsDefined(IsLocalBackupEnabled)) + { + writer.WritePropertyName("isLocalBackupEnabled"u8); + writer.WriteBooleanValue(IsLocalBackupEnabled.Value); + } + writer.WritePropertyName("cloudExadataInfrastructureId"u8); + writer.WriteStringValue(CloudExadataInfrastructureId); + if (Optional.IsDefined(IsSparseDiskgroupEnabled)) + { + writer.WritePropertyName("isSparseDiskgroupEnabled"u8); + writer.WriteBooleanValue(IsSparseDiskgroupEnabled.Value); + } + if (Optional.IsDefined(SystemVersion)) + { + writer.WritePropertyName("systemVersion"u8); + writer.WriteStringValue(SystemVersion); + } + writer.WritePropertyName("sshPublicKeys"u8); + writer.WriteStartArray(); + foreach (var item in SshPublicKeys) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + if (Optional.IsDefined(LicenseModel)) + { + writer.WritePropertyName("licenseModel"u8); + writer.WriteStringValue(LicenseModel.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(DiskRedundancy)) + { + writer.WritePropertyName("diskRedundancy"u8); + writer.WriteStringValue(DiskRedundancy.Value.ToString()); + } + if (options.Format != "W" && Optional.IsCollectionDefined(ScanIPIds)) + { + writer.WritePropertyName("scanIpIds"u8); + writer.WriteStartArray(); + foreach (var item in ScanIPIds) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsCollectionDefined(VipIds)) + { + writer.WritePropertyName("vipIds"u8); + writer.WriteStartArray(); + foreach (var item in VipIds) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(ScanDnsName)) + { + writer.WritePropertyName("scanDnsName"u8); + writer.WriteStringValue(ScanDnsName); + } + if (Optional.IsDefined(ScanListenerPortTcp)) + { + writer.WritePropertyName("scanListenerPortTcp"u8); + writer.WriteNumberValue(ScanListenerPortTcp.Value); + } + if (Optional.IsDefined(ScanListenerPortTcpSsl)) + { + writer.WritePropertyName("scanListenerPortTcpSsl"u8); + writer.WriteNumberValue(ScanListenerPortTcpSsl.Value); + } + if (options.Format != "W" && Optional.IsDefined(ScanDnsRecordId)) + { + writer.WritePropertyName("scanDnsRecordId"u8); + writer.WriteStringValue(ScanDnsRecordId); + } + if (options.Format != "W" && Optional.IsDefined(Shape)) + { + writer.WritePropertyName("shape"u8); + writer.WriteStringValue(Shape); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(LifecycleState)) + { + writer.WritePropertyName("lifecycleState"u8); + writer.WriteStringValue(LifecycleState.Value.ToString()); + } + writer.WritePropertyName("vnetId"u8); + writer.WriteStringValue(VnetId); + writer.WritePropertyName("giVersion"u8); + writer.WriteStringValue(GiVersion); + if (options.Format != "W" && Optional.IsDefined(OciUri)) + { + writer.WritePropertyName("ociUrl"u8); + writer.WriteStringValue(OciUri.AbsoluteUri); + } + if (options.Format != "W" && Optional.IsDefined(NsgUri)) + { + writer.WritePropertyName("nsgUrl"u8); + writer.WriteStringValue(NsgUri.AbsoluteUri); + } + writer.WritePropertyName("subnetId"u8); + writer.WriteStringValue(SubnetId); + if (Optional.IsDefined(BackupSubnetCidr)) + { + writer.WritePropertyName("backupSubnetCidr"u8); + writer.WriteStringValue(BackupSubnetCidr); + } + if (Optional.IsCollectionDefined(NsgCidrs)) + { + writer.WritePropertyName("nsgCidrs"u8); + writer.WriteStartArray(); + foreach (var item in NsgCidrs) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(DataCollectionOptions)) + { + writer.WritePropertyName("dataCollectionOptions"u8); + writer.WriteObjectValue(DataCollectionOptions, options); + } + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + if (Optional.IsCollectionDefined(ComputeNodes)) + { + writer.WritePropertyName("computeNodes"u8); + writer.WriteStartArray(); + foreach (var item in ComputeNodes) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(IormConfigCache)) + { + writer.WritePropertyName("iormConfigCache"u8); + writer.WriteObjectValue(IormConfigCache, options); + } + if (options.Format != "W" && Optional.IsDefined(LastUpdateHistoryEntryId)) + { + writer.WritePropertyName("lastUpdateHistoryEntryId"u8); + writer.WriteStringValue(LastUpdateHistoryEntryId); + } + if (Optional.IsCollectionDefined(DbServers)) + { + writer.WritePropertyName("dbServers"u8); + writer.WriteStartArray(); + foreach (var item in DbServers) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(CompartmentId)) + { + writer.WritePropertyName("compartmentId"u8); + writer.WriteStringValue(CompartmentId); + } + if (options.Format != "W" && Optional.IsDefined(SubnetOcid)) + { + writer.WritePropertyName("subnetOcid"u8); + writer.WriteStringValue(SubnetOcid); + } + if (options.Format != "W" && Optional.IsDefined(ComputeModel)) + { + writer.WritePropertyName("computeModel"u8); + writer.WriteStringValue(ComputeModel.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + CloudVmClusterProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CloudVmClusterProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCloudVmClusterProperties(document.RootElement, options); + } + + internal static CloudVmClusterProperties DeserializeCloudVmClusterProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string ocid = default; + long? listenerPort = default; + int? nodeCount = default; + int? storageSizeInGbs = default; + IList fileSystemConfigurationDetails = default; + double? dataStorageSizeInTbs = default; + int? dbNodeStorageSizeInGbs = default; + int? memorySizeInGbs = default; + DateTimeOffset? timeCreated = default; + string lifecycleDetails = default; + string timeZone = default; + string zoneId = default; + string hostname = default; + string domain = default; + int cpuCoreCount = default; + float? ocpuCount = default; + string clusterName = default; + int? dataStoragePercentage = default; + bool? isLocalBackupEnabled = default; + ResourceIdentifier cloudExadataInfrastructureId = default; + bool? isSparseDiskgroupEnabled = default; + string systemVersion = default; + IList sshPublicKeys = default; + LicenseModel? licenseModel = default; + DiskRedundancy? diskRedundancy = default; + IReadOnlyList scanIPIds = default; + IReadOnlyList vipIds = default; + string scanDnsName = default; + int? scanListenerPortTcp = default; + int? scanListenerPortTcpSsl = default; + string scanDnsRecordId = default; + string shape = default; + AzureResourceProvisioningState? provisioningState = default; + CloudVmClusterLifecycleState? lifecycleState = default; + ResourceIdentifier vnetId = default; + string giVersion = default; + Uri ociUrl = default; + Uri nsgUrl = default; + ResourceIdentifier subnetId = default; + string backupSubnetCidr = default; + IList nsgCidrs = default; + DataCollectionOptions dataCollectionOptions = default; + string displayName = default; + IList computeNodes = default; + ExadataIormConfig iormConfigCache = default; + string lastUpdateHistoryEntryId = default; + IList dbServers = default; + string compartmentId = default; + string subnetOcid = default; + ComputeModel? computeModel = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("ocid"u8)) + { + ocid = property.Value.GetString(); + continue; + } + if (property.NameEquals("listenerPort"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + listenerPort = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("nodeCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nodeCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("storageSizeInGbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + storageSizeInGbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("fileSystemConfigurationDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(Models.FileSystemConfigurationDetails.DeserializeFileSystemConfigurationDetails(item, options)); + } + fileSystemConfigurationDetails = array; + continue; + } + if (property.NameEquals("dataStorageSizeInTbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dataStorageSizeInTbs = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("dbNodeStorageSizeInGbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dbNodeStorageSizeInGbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("memorySizeInGbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + memorySizeInGbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("timeCreated"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeCreated = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lifecycleDetails"u8)) + { + lifecycleDetails = property.Value.GetString(); + continue; + } + if (property.NameEquals("timeZone"u8)) + { + timeZone = property.Value.GetString(); + continue; + } + if (property.NameEquals("zoneId"u8)) + { + zoneId = property.Value.GetString(); + continue; + } + if (property.NameEquals("hostname"u8)) + { + hostname = property.Value.GetString(); + continue; + } + if (property.NameEquals("domain"u8)) + { + domain = property.Value.GetString(); + continue; + } + if (property.NameEquals("cpuCoreCount"u8)) + { + cpuCoreCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("ocpuCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + ocpuCount = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("clusterName"u8)) + { + clusterName = property.Value.GetString(); + continue; + } + if (property.NameEquals("dataStoragePercentage"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dataStoragePercentage = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("isLocalBackupEnabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isLocalBackupEnabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("cloudExadataInfrastructureId"u8)) + { + cloudExadataInfrastructureId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("isSparseDiskgroupEnabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isSparseDiskgroupEnabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("systemVersion"u8)) + { + systemVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("sshPublicKeys"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + sshPublicKeys = array; + continue; + } + if (property.NameEquals("licenseModel"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + licenseModel = new LicenseModel(property.Value.GetString()); + continue; + } + if (property.NameEquals("diskRedundancy"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + diskRedundancy = new DiskRedundancy(property.Value.GetString()); + continue; + } + if (property.NameEquals("scanIpIds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + scanIPIds = array; + continue; + } + if (property.NameEquals("vipIds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + vipIds = array; + continue; + } + if (property.NameEquals("scanDnsName"u8)) + { + scanDnsName = property.Value.GetString(); + continue; + } + if (property.NameEquals("scanListenerPortTcp"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + scanListenerPortTcp = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("scanListenerPortTcpSsl"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + scanListenerPortTcpSsl = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("scanDnsRecordId"u8)) + { + scanDnsRecordId = property.Value.GetString(); + continue; + } + if (property.NameEquals("shape"u8)) + { + shape = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new AzureResourceProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("lifecycleState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lifecycleState = new CloudVmClusterLifecycleState(property.Value.GetString()); + continue; + } + if (property.NameEquals("vnetId"u8)) + { + vnetId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("giVersion"u8)) + { + giVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("ociUrl"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + ociUrl = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("nsgUrl"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nsgUrl = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("subnetId"u8)) + { + subnetId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("backupSubnetCidr"u8)) + { + backupSubnetCidr = property.Value.GetString(); + continue; + } + if (property.NameEquals("nsgCidrs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(NsgCidr.DeserializeNsgCidr(item, options)); + } + nsgCidrs = array; + continue; + } + if (property.NameEquals("dataCollectionOptions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dataCollectionOptions = DataCollectionOptions.DeserializeDataCollectionOptions(property.Value, options); + continue; + } + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("computeNodes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + computeNodes = array; + continue; + } + if (property.NameEquals("iormConfigCache"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + iormConfigCache = ExadataIormConfig.DeserializeExadataIormConfig(property.Value, options); + continue; + } + if (property.NameEquals("lastUpdateHistoryEntryId"u8)) + { + lastUpdateHistoryEntryId = property.Value.GetString(); + continue; + } + if (property.NameEquals("dbServers"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + dbServers = array; + continue; + } + if (property.NameEquals("compartmentId"u8)) + { + compartmentId = property.Value.GetString(); + continue; + } + if (property.NameEquals("subnetOcid"u8)) + { + subnetOcid = property.Value.GetString(); + continue; + } + if (property.NameEquals("computeModel"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + computeModel = new ComputeModel(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CloudVmClusterProperties( + ocid, + listenerPort, + nodeCount, + storageSizeInGbs, + fileSystemConfigurationDetails ?? new ChangeTrackingList(), + dataStorageSizeInTbs, + dbNodeStorageSizeInGbs, + memorySizeInGbs, + timeCreated, + lifecycleDetails, + timeZone, + zoneId, + hostname, + domain, + cpuCoreCount, + ocpuCount, + clusterName, + dataStoragePercentage, + isLocalBackupEnabled, + cloudExadataInfrastructureId, + isSparseDiskgroupEnabled, + systemVersion, + sshPublicKeys, + licenseModel, + diskRedundancy, + scanIPIds ?? new ChangeTrackingList(), + vipIds ?? new ChangeTrackingList(), + scanDnsName, + scanListenerPortTcp, + scanListenerPortTcpSsl, + scanDnsRecordId, + shape, + provisioningState, + lifecycleState, + vnetId, + giVersion, + ociUrl, + nsgUrl, + subnetId, + backupSubnetCidr, + nsgCidrs ?? new ChangeTrackingList(), + dataCollectionOptions, + displayName, + computeNodes ?? new ChangeTrackingList(), + iormConfigCache, + lastUpdateHistoryEntryId, + dbServers ?? new ChangeTrackingList(), + compartmentId, + subnetOcid, + computeModel, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(CloudVmClusterProperties)} does not support writing '{options.Format}' format."); + } + } + + CloudVmClusterProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeCloudVmClusterProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CloudVmClusterProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudVmClusterProperties.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudVmClusterProperties.cs new file mode 100644 index 000000000000..d60ca6595848 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudVmClusterProperties.cs @@ -0,0 +1,299 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// CloudVmCluster resource model. + public partial class CloudVmClusterProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The hostname for the cloud VM cluster. + /// The number of CPU cores enabled on the cloud VM cluster. + /// Cloud Exadata Infrastructure ID. + /// The public key portion of one or more key pairs used for SSH access to the cloud VM cluster. + /// VNET for network connectivity. + /// Oracle Grid Infrastructure (GI) software version. + /// Client subnet. + /// Display Name. + /// , , , , , or is null. + public CloudVmClusterProperties(string hostname, int cpuCoreCount, ResourceIdentifier cloudExadataInfrastructureId, IEnumerable sshPublicKeys, ResourceIdentifier vnetId, string giVersion, ResourceIdentifier subnetId, string displayName) + { + Argument.AssertNotNull(hostname, nameof(hostname)); + Argument.AssertNotNull(cloudExadataInfrastructureId, nameof(cloudExadataInfrastructureId)); + Argument.AssertNotNull(sshPublicKeys, nameof(sshPublicKeys)); + Argument.AssertNotNull(vnetId, nameof(vnetId)); + Argument.AssertNotNull(giVersion, nameof(giVersion)); + Argument.AssertNotNull(subnetId, nameof(subnetId)); + Argument.AssertNotNull(displayName, nameof(displayName)); + + FileSystemConfigurationDetails = new ChangeTrackingList(); + Hostname = hostname; + CpuCoreCount = cpuCoreCount; + CloudExadataInfrastructureId = cloudExadataInfrastructureId; + SshPublicKeys = sshPublicKeys.ToList(); + ScanIPIds = new ChangeTrackingList(); + VipIds = new ChangeTrackingList(); + VnetId = vnetId; + GiVersion = giVersion; + SubnetId = subnetId; + NsgCidrs = new ChangeTrackingList(); + DisplayName = displayName; + ComputeNodes = new ChangeTrackingList(); + DbServers = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Cloud VM Cluster ocid. + /// The port number configured for the listener on the cloud VM cluster. + /// The number of nodes in the cloud VM cluster. + /// The data disk group size to be allocated in GBs per VM. + /// Array of mount path and size. + /// The data disk group size to be allocated in TBs. + /// The local node storage to be allocated in GBs. + /// The memory to be allocated in GBs. + /// The date and time that the cloud VM cluster was created. + /// Additional information about the current lifecycle state. + /// The time zone of the cloud VM cluster. For details, see [Exadata Infrastructure Time Zones](/Content/Database/References/timezones.htm). + /// The OCID of the zone the cloud VM cluster is associated with. + /// The hostname for the cloud VM cluster. + /// The domain name for the cloud VM cluster. + /// The number of CPU cores enabled on the cloud VM cluster. + /// The number of OCPU cores to enable on the cloud VM cluster. Only 1 decimal place is allowed for the fractional part. + /// The cluster name for cloud VM cluster. The cluster name must begin with an alphabetic character, and may contain hyphens (-). Underscores (_) are not permitted. The cluster name can be no longer than 11 characters and is not case sensitive. + /// The percentage assigned to DATA storage (user data and database files). The remaining percentage is assigned to RECO storage (database redo logs, archive logs, and recovery manager backups). Accepted values are 35, 40, 60 and 80. The default is 80 percent assigned to DATA storage. See [Storage Configuration](/Content/Database/Concepts/exaoverview.htm#Exadata) in the Exadata documentation for details on the impact of the configuration settings on storage. + /// If true, database backup on local Exadata storage is configured for the cloud VM cluster. If false, database backup on local Exadata storage is not available in the cloud VM cluster. + /// Cloud Exadata Infrastructure ID. + /// If true, sparse disk group is configured for the cloud VM cluster. If false, sparse disk group is not created. + /// Operating system version of the image. + /// The public key portion of one or more key pairs used for SSH access to the cloud VM cluster. + /// The Oracle license model that applies to the cloud VM cluster. The default is LICENSE_INCLUDED. + /// The type of redundancy configured for the cloud Vm cluster. NORMAL is 2-way redundancy. HIGH is 3-way redundancy. + /// The Single Client Access Name (SCAN) IP addresses associated with the cloud VM cluster. SCAN IP addresses are typically used for load balancing and are not assigned to any interface. Oracle Clusterware directs the requests to the appropriate nodes in the cluster. **Note:** For a single-node DB system, this list is empty. + /// The virtual IP (VIP) addresses associated with the cloud VM cluster. The Cluster Ready Services (CRS) creates and maintains one VIP address for each node in the Exadata Cloud Service instance to enable failover. If one node fails, the VIP is reassigned to another active node in the cluster. **Note:** For a single-node DB system, this list is empty. + /// The FQDN of the DNS record for the SCAN IP addresses that are associated with the cloud VM cluster. + /// The TCP Single Client Access Name (SCAN) port. The default port is 1521. + /// The TCPS Single Client Access Name (SCAN) port. The default port is 2484. + /// The OCID of the DNS record for the SCAN IP addresses that are associated with the cloud VM cluster. + /// The model name of the Exadata hardware running the cloud VM cluster. + /// CloudVmCluster provisioning state. + /// CloudVmCluster lifecycle state. + /// VNET for network connectivity. + /// Oracle Grid Infrastructure (GI) software version. + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + /// HTTPS link to OCI Network Security Group exposed to Azure Customer via the Azure Interface. + /// Client subnet. + /// Client OCI backup subnet CIDR, default is 192.168.252.0/22. + /// CIDR blocks for additional NSG ingress rules. The VNET CIDRs used to provision the VM Cluster will be added by default. + /// Indicates user preferences for the various diagnostic collection options for the VM cluster/Cloud VM cluster/VMBM DBCS. + /// Display Name. + /// The list of compute servers to be added to the cloud VM cluster. + /// iormConfigCache details for cloud VM cluster. + /// The OCID of the last maintenance update history entry. + /// The list of DB servers. + /// Cluster compartmentId. + /// Cluster subnet ocid. + /// The compute model of the VM Cluster. + /// Keeps track of any properties unknown to the library. + internal CloudVmClusterProperties(string ocid, long? listenerPort, int? nodeCount, int? storageSizeInGbs, IList fileSystemConfigurationDetails, double? dataStorageSizeInTbs, int? dbNodeStorageSizeInGbs, int? memorySizeInGbs, DateTimeOffset? timeCreated, string lifecycleDetails, string timeZone, string zoneId, string hostname, string domain, int cpuCoreCount, float? ocpuCount, string clusterName, int? dataStoragePercentage, bool? isLocalBackupEnabled, ResourceIdentifier cloudExadataInfrastructureId, bool? isSparseDiskgroupEnabled, string systemVersion, IList sshPublicKeys, LicenseModel? licenseModel, DiskRedundancy? diskRedundancy, IReadOnlyList scanIPIds, IReadOnlyList vipIds, string scanDnsName, int? scanListenerPortTcp, int? scanListenerPortTcpSsl, string scanDnsRecordId, string shape, AzureResourceProvisioningState? provisioningState, CloudVmClusterLifecycleState? lifecycleState, ResourceIdentifier vnetId, string giVersion, Uri ociUri, Uri nsgUri, ResourceIdentifier subnetId, string backupSubnetCidr, IList nsgCidrs, DataCollectionOptions dataCollectionOptions, string displayName, IList computeNodes, ExadataIormConfig iormConfigCache, string lastUpdateHistoryEntryId, IList dbServers, string compartmentId, string subnetOcid, ComputeModel? computeModel, IDictionary serializedAdditionalRawData) + { + Ocid = ocid; + ListenerPort = listenerPort; + NodeCount = nodeCount; + StorageSizeInGbs = storageSizeInGbs; + FileSystemConfigurationDetails = fileSystemConfigurationDetails; + DataStorageSizeInTbs = dataStorageSizeInTbs; + DbNodeStorageSizeInGbs = dbNodeStorageSizeInGbs; + MemorySizeInGbs = memorySizeInGbs; + TimeCreated = timeCreated; + LifecycleDetails = lifecycleDetails; + TimeZone = timeZone; + ZoneId = zoneId; + Hostname = hostname; + Domain = domain; + CpuCoreCount = cpuCoreCount; + OcpuCount = ocpuCount; + ClusterName = clusterName; + DataStoragePercentage = dataStoragePercentage; + IsLocalBackupEnabled = isLocalBackupEnabled; + CloudExadataInfrastructureId = cloudExadataInfrastructureId; + IsSparseDiskgroupEnabled = isSparseDiskgroupEnabled; + SystemVersion = systemVersion; + SshPublicKeys = sshPublicKeys; + LicenseModel = licenseModel; + DiskRedundancy = diskRedundancy; + ScanIPIds = scanIPIds; + VipIds = vipIds; + ScanDnsName = scanDnsName; + ScanListenerPortTcp = scanListenerPortTcp; + ScanListenerPortTcpSsl = scanListenerPortTcpSsl; + ScanDnsRecordId = scanDnsRecordId; + Shape = shape; + ProvisioningState = provisioningState; + LifecycleState = lifecycleState; + VnetId = vnetId; + GiVersion = giVersion; + OciUri = ociUri; + NsgUri = nsgUri; + SubnetId = subnetId; + BackupSubnetCidr = backupSubnetCidr; + NsgCidrs = nsgCidrs; + DataCollectionOptions = dataCollectionOptions; + DisplayName = displayName; + ComputeNodes = computeNodes; + IormConfigCache = iormConfigCache; + LastUpdateHistoryEntryId = lastUpdateHistoryEntryId; + DbServers = dbServers; + CompartmentId = compartmentId; + SubnetOcid = subnetOcid; + ComputeModel = computeModel; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal CloudVmClusterProperties() + { + } + + /// Cloud VM Cluster ocid. + public string Ocid { get; } + /// The port number configured for the listener on the cloud VM cluster. + public long? ListenerPort { get; } + /// The number of nodes in the cloud VM cluster. + public int? NodeCount { get; } + /// The data disk group size to be allocated in GBs per VM. + public int? StorageSizeInGbs { get; set; } + /// Array of mount path and size. + public IList FileSystemConfigurationDetails { get; } + /// The data disk group size to be allocated in TBs. + public double? DataStorageSizeInTbs { get; set; } + /// The local node storage to be allocated in GBs. + public int? DbNodeStorageSizeInGbs { get; set; } + /// The memory to be allocated in GBs. + public int? MemorySizeInGbs { get; set; } + /// The date and time that the cloud VM cluster was created. + public DateTimeOffset? TimeCreated { get; } + /// Additional information about the current lifecycle state. + public string LifecycleDetails { get; } + /// The time zone of the cloud VM cluster. For details, see [Exadata Infrastructure Time Zones](/Content/Database/References/timezones.htm). + public string TimeZone { get; set; } + /// The OCID of the zone the cloud VM cluster is associated with. + public string ZoneId { get; set; } + /// The hostname for the cloud VM cluster. + public string Hostname { get; set; } + /// The domain name for the cloud VM cluster. + public string Domain { get; set; } + /// The number of CPU cores enabled on the cloud VM cluster. + public int CpuCoreCount { get; set; } + /// The number of OCPU cores to enable on the cloud VM cluster. Only 1 decimal place is allowed for the fractional part. + public float? OcpuCount { get; set; } + /// The cluster name for cloud VM cluster. The cluster name must begin with an alphabetic character, and may contain hyphens (-). Underscores (_) are not permitted. The cluster name can be no longer than 11 characters and is not case sensitive. + public string ClusterName { get; set; } + /// The percentage assigned to DATA storage (user data and database files). The remaining percentage is assigned to RECO storage (database redo logs, archive logs, and recovery manager backups). Accepted values are 35, 40, 60 and 80. The default is 80 percent assigned to DATA storage. See [Storage Configuration](/Content/Database/Concepts/exaoverview.htm#Exadata) in the Exadata documentation for details on the impact of the configuration settings on storage. + public int? DataStoragePercentage { get; set; } + /// If true, database backup on local Exadata storage is configured for the cloud VM cluster. If false, database backup on local Exadata storage is not available in the cloud VM cluster. + public bool? IsLocalBackupEnabled { get; set; } + /// Cloud Exadata Infrastructure ID. + public ResourceIdentifier CloudExadataInfrastructureId { get; set; } + /// If true, sparse disk group is configured for the cloud VM cluster. If false, sparse disk group is not created. + public bool? IsSparseDiskgroupEnabled { get; set; } + /// Operating system version of the image. + public string SystemVersion { get; set; } + /// The public key portion of one or more key pairs used for SSH access to the cloud VM cluster. + public IList SshPublicKeys { get; } + /// The Oracle license model that applies to the cloud VM cluster. The default is LICENSE_INCLUDED. + public LicenseModel? LicenseModel { get; set; } + /// The type of redundancy configured for the cloud Vm cluster. NORMAL is 2-way redundancy. HIGH is 3-way redundancy. + public DiskRedundancy? DiskRedundancy { get; } + /// The Single Client Access Name (SCAN) IP addresses associated with the cloud VM cluster. SCAN IP addresses are typically used for load balancing and are not assigned to any interface. Oracle Clusterware directs the requests to the appropriate nodes in the cluster. **Note:** For a single-node DB system, this list is empty. + public IReadOnlyList ScanIPIds { get; } + /// The virtual IP (VIP) addresses associated with the cloud VM cluster. The Cluster Ready Services (CRS) creates and maintains one VIP address for each node in the Exadata Cloud Service instance to enable failover. If one node fails, the VIP is reassigned to another active node in the cluster. **Note:** For a single-node DB system, this list is empty. + public IReadOnlyList VipIds { get; } + /// The FQDN of the DNS record for the SCAN IP addresses that are associated with the cloud VM cluster. + public string ScanDnsName { get; } + /// The TCP Single Client Access Name (SCAN) port. The default port is 1521. + public int? ScanListenerPortTcp { get; set; } + /// The TCPS Single Client Access Name (SCAN) port. The default port is 2484. + public int? ScanListenerPortTcpSsl { get; set; } + /// The OCID of the DNS record for the SCAN IP addresses that are associated with the cloud VM cluster. + public string ScanDnsRecordId { get; } + /// The model name of the Exadata hardware running the cloud VM cluster. + public string Shape { get; } + /// CloudVmCluster provisioning state. + public AzureResourceProvisioningState? ProvisioningState { get; } + /// CloudVmCluster lifecycle state. + public CloudVmClusterLifecycleState? LifecycleState { get; } + /// VNET for network connectivity. + public ResourceIdentifier VnetId { get; set; } + /// Oracle Grid Infrastructure (GI) software version. + public string GiVersion { get; set; } + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + public Uri OciUri { get; } + /// HTTPS link to OCI Network Security Group exposed to Azure Customer via the Azure Interface. + public Uri NsgUri { get; } + /// Client subnet. + public ResourceIdentifier SubnetId { get; set; } + /// Client OCI backup subnet CIDR, default is 192.168.252.0/22. + public string BackupSubnetCidr { get; set; } + /// CIDR blocks for additional NSG ingress rules. The VNET CIDRs used to provision the VM Cluster will be added by default. + public IList NsgCidrs { get; } + /// Indicates user preferences for the various diagnostic collection options for the VM cluster/Cloud VM cluster/VMBM DBCS. + public DataCollectionOptions DataCollectionOptions { get; set; } + /// Display Name. + public string DisplayName { get; set; } + /// The list of compute servers to be added to the cloud VM cluster. + public IList ComputeNodes { get; } + /// iormConfigCache details for cloud VM cluster. + public ExadataIormConfig IormConfigCache { get; } + /// The OCID of the last maintenance update history entry. + public string LastUpdateHistoryEntryId { get; } + /// The list of DB servers. + public IList DbServers { get; } + /// Cluster compartmentId. + public string CompartmentId { get; } + /// Cluster subnet ocid. + public string SubnetOcid { get; } + /// The compute model of the VM Cluster. + public ComputeModel? ComputeModel { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudVmClusterUpdateProperties.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudVmClusterUpdateProperties.Serialization.cs new file mode 100644 index 000000000000..c0b836b1d1d8 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudVmClusterUpdateProperties.Serialization.cs @@ -0,0 +1,337 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + public partial class CloudVmClusterUpdateProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CloudVmClusterUpdateProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(StorageSizeInGbs)) + { + writer.WritePropertyName("storageSizeInGbs"u8); + writer.WriteNumberValue(StorageSizeInGbs.Value); + } + if (Optional.IsCollectionDefined(FileSystemConfigurationDetails)) + { + writer.WritePropertyName("fileSystemConfigurationDetails"u8); + writer.WriteStartArray(); + foreach (var item in FileSystemConfigurationDetails) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(DataStorageSizeInTbs)) + { + writer.WritePropertyName("dataStorageSizeInTbs"u8); + writer.WriteNumberValue(DataStorageSizeInTbs.Value); + } + if (Optional.IsDefined(DbNodeStorageSizeInGbs)) + { + writer.WritePropertyName("dbNodeStorageSizeInGbs"u8); + writer.WriteNumberValue(DbNodeStorageSizeInGbs.Value); + } + if (Optional.IsDefined(MemorySizeInGbs)) + { + writer.WritePropertyName("memorySizeInGbs"u8); + writer.WriteNumberValue(MemorySizeInGbs.Value); + } + if (Optional.IsDefined(CpuCoreCount)) + { + writer.WritePropertyName("cpuCoreCount"u8); + writer.WriteNumberValue(CpuCoreCount.Value); + } + if (Optional.IsDefined(OcpuCount)) + { + writer.WritePropertyName("ocpuCount"u8); + writer.WriteNumberValue(OcpuCount.Value); + } + if (Optional.IsCollectionDefined(SshPublicKeys)) + { + writer.WritePropertyName("sshPublicKeys"u8); + writer.WriteStartArray(); + foreach (var item in SshPublicKeys) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(LicenseModel)) + { + writer.WritePropertyName("licenseModel"u8); + writer.WriteStringValue(LicenseModel.Value.ToString()); + } + if (Optional.IsDefined(DataCollectionOptions)) + { + writer.WritePropertyName("dataCollectionOptions"u8); + writer.WriteObjectValue(DataCollectionOptions, options); + } + if (Optional.IsDefined(DisplayName)) + { + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + } + if (Optional.IsCollectionDefined(ComputeNodes)) + { + writer.WritePropertyName("computeNodes"u8); + writer.WriteStartArray(); + foreach (var item in ComputeNodes) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + CloudVmClusterUpdateProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CloudVmClusterUpdateProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCloudVmClusterUpdateProperties(document.RootElement, options); + } + + internal static CloudVmClusterUpdateProperties DeserializeCloudVmClusterUpdateProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int? storageSizeInGbs = default; + IList fileSystemConfigurationDetails = default; + double? dataStorageSizeInTbs = default; + int? dbNodeStorageSizeInGbs = default; + int? memorySizeInGbs = default; + int? cpuCoreCount = default; + float? ocpuCount = default; + IList sshPublicKeys = default; + LicenseModel? licenseModel = default; + DataCollectionOptions dataCollectionOptions = default; + string displayName = default; + IList computeNodes = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("storageSizeInGbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + storageSizeInGbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("fileSystemConfigurationDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(Models.FileSystemConfigurationDetails.DeserializeFileSystemConfigurationDetails(item, options)); + } + fileSystemConfigurationDetails = array; + continue; + } + if (property.NameEquals("dataStorageSizeInTbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dataStorageSizeInTbs = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("dbNodeStorageSizeInGbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dbNodeStorageSizeInGbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("memorySizeInGbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + memorySizeInGbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("cpuCoreCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + cpuCoreCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("ocpuCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + ocpuCount = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("sshPublicKeys"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + sshPublicKeys = array; + continue; + } + if (property.NameEquals("licenseModel"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + licenseModel = new LicenseModel(property.Value.GetString()); + continue; + } + if (property.NameEquals("dataCollectionOptions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dataCollectionOptions = DataCollectionOptions.DeserializeDataCollectionOptions(property.Value, options); + continue; + } + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("computeNodes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + computeNodes = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CloudVmClusterUpdateProperties( + storageSizeInGbs, + fileSystemConfigurationDetails ?? new ChangeTrackingList(), + dataStorageSizeInTbs, + dbNodeStorageSizeInGbs, + memorySizeInGbs, + cpuCoreCount, + ocpuCount, + sshPublicKeys ?? new ChangeTrackingList(), + licenseModel, + dataCollectionOptions, + displayName, + computeNodes ?? new ChangeTrackingList(), + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(CloudVmClusterUpdateProperties)} does not support writing '{options.Format}' format."); + } + } + + CloudVmClusterUpdateProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeCloudVmClusterUpdateProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CloudVmClusterUpdateProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudVmClusterUpdateProperties.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudVmClusterUpdateProperties.cs new file mode 100644 index 000000000000..1df5f808d21d --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudVmClusterUpdateProperties.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// The updatable properties of the CloudVmCluster. + public partial class CloudVmClusterUpdateProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public CloudVmClusterUpdateProperties() + { + FileSystemConfigurationDetails = new ChangeTrackingList(); + SshPublicKeys = new ChangeTrackingList(); + ComputeNodes = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The data disk group size to be allocated in GBs per VM. + /// Array of mount path and size. + /// The data disk group size to be allocated in TBs. + /// The local node storage to be allocated in GBs. + /// The memory to be allocated in GBs. + /// The number of CPU cores enabled on the cloud VM cluster. + /// The number of OCPU cores to enable on the cloud VM cluster. Only 1 decimal place is allowed for the fractional part. + /// The public key portion of one or more key pairs used for SSH access to the cloud VM cluster. + /// The Oracle license model that applies to the cloud VM cluster. The default is LICENSE_INCLUDED. + /// Indicates user preferences for the various diagnostic collection options for the VM cluster/Cloud VM cluster/VMBM DBCS. + /// Display Name. + /// The list of compute servers to be added to the cloud VM cluster. + /// Keeps track of any properties unknown to the library. + internal CloudVmClusterUpdateProperties(int? storageSizeInGbs, IList fileSystemConfigurationDetails, double? dataStorageSizeInTbs, int? dbNodeStorageSizeInGbs, int? memorySizeInGbs, int? cpuCoreCount, float? ocpuCount, IList sshPublicKeys, LicenseModel? licenseModel, DataCollectionOptions dataCollectionOptions, string displayName, IList computeNodes, IDictionary serializedAdditionalRawData) + { + StorageSizeInGbs = storageSizeInGbs; + FileSystemConfigurationDetails = fileSystemConfigurationDetails; + DataStorageSizeInTbs = dataStorageSizeInTbs; + DbNodeStorageSizeInGbs = dbNodeStorageSizeInGbs; + MemorySizeInGbs = memorySizeInGbs; + CpuCoreCount = cpuCoreCount; + OcpuCount = ocpuCount; + SshPublicKeys = sshPublicKeys; + LicenseModel = licenseModel; + DataCollectionOptions = dataCollectionOptions; + DisplayName = displayName; + ComputeNodes = computeNodes; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The data disk group size to be allocated in GBs per VM. + public int? StorageSizeInGbs { get; set; } + /// Array of mount path and size. + public IList FileSystemConfigurationDetails { get; } + /// The data disk group size to be allocated in TBs. + public double? DataStorageSizeInTbs { get; set; } + /// The local node storage to be allocated in GBs. + public int? DbNodeStorageSizeInGbs { get; set; } + /// The memory to be allocated in GBs. + public int? MemorySizeInGbs { get; set; } + /// The number of CPU cores enabled on the cloud VM cluster. + public int? CpuCoreCount { get; set; } + /// The number of OCPU cores to enable on the cloud VM cluster. Only 1 decimal place is allowed for the fractional part. + public float? OcpuCount { get; set; } + /// The public key portion of one or more key pairs used for SSH access to the cloud VM cluster. + public IList SshPublicKeys { get; } + /// The Oracle license model that applies to the cloud VM cluster. The default is LICENSE_INCLUDED. + public LicenseModel? LicenseModel { get; set; } + /// Indicates user preferences for the various diagnostic collection options for the VM cluster/Cloud VM cluster/VMBM DBCS. + public DataCollectionOptions DataCollectionOptions { get; set; } + /// Display Name. + public string DisplayName { get; set; } + /// The list of compute servers to be added to the cloud VM cluster. + public IList ComputeNodes { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ComputeModel.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ComputeModel.cs new file mode 100644 index 000000000000..d889e8abcbc6 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ComputeModel.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// Compute model enum. + public readonly partial struct ComputeModel : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ComputeModel(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ECPUValue = "ECPU"; + private const string OCPUValue = "OCPU"; + + /// ECPU model type. + public static ComputeModel ECPU { get; } = new ComputeModel(ECPUValue); + /// OCPU model type. + public static ComputeModel OCPU { get; } = new ComputeModel(OCPUValue); + /// Determines if two values are the same. + public static bool operator ==(ComputeModel left, ComputeModel right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ComputeModel left, ComputeModel right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ComputeModel(string value) => new ComputeModel(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ComputeModel other && Equals(other); + /// + public bool Equals(ComputeModel 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/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ConnectionStringType.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ConnectionStringType.Serialization.cs new file mode 100644 index 000000000000..bb8b3e172eb3 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ConnectionStringType.Serialization.cs @@ -0,0 +1,209 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + public partial class ConnectionStringType : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConnectionStringType)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(AllConnectionStrings)) + { + writer.WritePropertyName("allConnectionStrings"u8); + writer.WriteObjectValue(AllConnectionStrings, options); + } + if (Optional.IsDefined(Dedicated)) + { + writer.WritePropertyName("dedicated"u8); + writer.WriteStringValue(Dedicated); + } + if (Optional.IsDefined(High)) + { + writer.WritePropertyName("high"u8); + writer.WriteStringValue(High); + } + if (Optional.IsDefined(Low)) + { + writer.WritePropertyName("low"u8); + writer.WriteStringValue(Low); + } + if (Optional.IsDefined(Medium)) + { + writer.WritePropertyName("medium"u8); + writer.WriteStringValue(Medium); + } + if (Optional.IsCollectionDefined(Profiles)) + { + writer.WritePropertyName("profiles"u8); + writer.WriteStartArray(); + foreach (var item in Profiles) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ConnectionStringType IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConnectionStringType)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConnectionStringType(document.RootElement, options); + } + + internal static ConnectionStringType DeserializeConnectionStringType(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AllConnectionStringType allConnectionStrings = default; + string dedicated = default; + string high = default; + string low = default; + string medium = default; + IReadOnlyList profiles = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("allConnectionStrings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + allConnectionStrings = AllConnectionStringType.DeserializeAllConnectionStringType(property.Value, options); + continue; + } + if (property.NameEquals("dedicated"u8)) + { + dedicated = property.Value.GetString(); + continue; + } + if (property.NameEquals("high"u8)) + { + high = property.Value.GetString(); + continue; + } + if (property.NameEquals("low"u8)) + { + low = property.Value.GetString(); + continue; + } + if (property.NameEquals("medium"u8)) + { + medium = property.Value.GetString(); + continue; + } + if (property.NameEquals("profiles"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ProfileType.DeserializeProfileType(item, options)); + } + profiles = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ConnectionStringType( + allConnectionStrings, + dedicated, + high, + low, + medium, + profiles ?? new ChangeTrackingList(), + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConnectionStringType)} does not support writing '{options.Format}' format."); + } + } + + ConnectionStringType IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeConnectionStringType(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConnectionStringType)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ConnectionStringType.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ConnectionStringType.cs new file mode 100644 index 000000000000..75ab6f2bf445 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ConnectionStringType.cs @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// Connection strings to connect to an Oracle Autonomous Database. + public partial class ConnectionStringType + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal ConnectionStringType() + { + Profiles = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Returns all connection strings that can be used to connect to the Autonomous Database. + /// The database service provides the least level of resources to each SQL statement, but supports the most number of concurrent SQL statements. + /// The High database service provides the highest level of resources to each SQL statement resulting in the highest performance, but supports the fewest number of concurrent SQL statements. + /// The Low database service provides the least level of resources to each SQL statement, but supports the most number of concurrent SQL statements. + /// The Medium database service provides a lower level of resources to each SQL statement potentially resulting a lower level of performance, but supports more concurrent SQL statements. + /// A list of connection string profiles to allow clients to group, filter and select connection string values based on structured metadata. + /// Keeps track of any properties unknown to the library. + internal ConnectionStringType(AllConnectionStringType allConnectionStrings, string dedicated, string high, string low, string medium, IReadOnlyList profiles, IDictionary serializedAdditionalRawData) + { + AllConnectionStrings = allConnectionStrings; + Dedicated = dedicated; + High = high; + Low = low; + Medium = medium; + Profiles = profiles; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Returns all connection strings that can be used to connect to the Autonomous Database. + public AllConnectionStringType AllConnectionStrings { get; } + /// The database service provides the least level of resources to each SQL statement, but supports the most number of concurrent SQL statements. + public string Dedicated { get; } + /// The High database service provides the highest level of resources to each SQL statement resulting in the highest performance, but supports the fewest number of concurrent SQL statements. + public string High { get; } + /// The Low database service provides the least level of resources to each SQL statement, but supports the most number of concurrent SQL statements. + public string Low { get; } + /// The Medium database service provides a lower level of resources to each SQL statement potentially resulting a lower level of performance, but supports more concurrent SQL statements. + public string Medium { get; } + /// A list of connection string profiles to allow clients to group, filter and select connection string values based on structured metadata. + public IReadOnlyList Profiles { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ConnectionUrlType.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ConnectionUrlType.Serialization.cs new file mode 100644 index 000000000000..5498a7a4699a --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ConnectionUrlType.Serialization.cs @@ -0,0 +1,203 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + public partial class ConnectionUrlType : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConnectionUrlType)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(ApexUri)) + { + writer.WritePropertyName("apexUrl"u8); + writer.WriteStringValue(ApexUri); + } + if (Optional.IsDefined(DatabaseTransformsUri)) + { + writer.WritePropertyName("databaseTransformsUrl"u8); + writer.WriteStringValue(DatabaseTransformsUri); + } + if (Optional.IsDefined(GraphStudioUri)) + { + writer.WritePropertyName("graphStudioUrl"u8); + writer.WriteStringValue(GraphStudioUri); + } + if (Optional.IsDefined(MachineLearningNotebookUri)) + { + writer.WritePropertyName("machineLearningNotebookUrl"u8); + writer.WriteStringValue(MachineLearningNotebookUri); + } + if (Optional.IsDefined(MongoDbUri)) + { + writer.WritePropertyName("mongoDbUrl"u8); + writer.WriteStringValue(MongoDbUri); + } + if (Optional.IsDefined(OrdsUri)) + { + writer.WritePropertyName("ordsUrl"u8); + writer.WriteStringValue(OrdsUri); + } + if (Optional.IsDefined(SqlDevWebUri)) + { + writer.WritePropertyName("sqlDevWebUrl"u8); + writer.WriteStringValue(SqlDevWebUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ConnectionUrlType IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConnectionUrlType)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConnectionUrlType(document.RootElement, options); + } + + internal static ConnectionUrlType DeserializeConnectionUrlType(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string apexUrl = default; + string databaseTransformsUrl = default; + string graphStudioUrl = default; + string machineLearningNotebookUrl = default; + string mongoDbUrl = default; + string ordsUrl = default; + string sqlDevWebUrl = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("apexUrl"u8)) + { + apexUrl = property.Value.GetString(); + continue; + } + if (property.NameEquals("databaseTransformsUrl"u8)) + { + databaseTransformsUrl = property.Value.GetString(); + continue; + } + if (property.NameEquals("graphStudioUrl"u8)) + { + graphStudioUrl = property.Value.GetString(); + continue; + } + if (property.NameEquals("machineLearningNotebookUrl"u8)) + { + machineLearningNotebookUrl = property.Value.GetString(); + continue; + } + if (property.NameEquals("mongoDbUrl"u8)) + { + mongoDbUrl = property.Value.GetString(); + continue; + } + if (property.NameEquals("ordsUrl"u8)) + { + ordsUrl = property.Value.GetString(); + continue; + } + if (property.NameEquals("sqlDevWebUrl"u8)) + { + sqlDevWebUrl = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ConnectionUrlType( + apexUrl, + databaseTransformsUrl, + graphStudioUrl, + machineLearningNotebookUrl, + mongoDbUrl, + ordsUrl, + sqlDevWebUrl, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConnectionUrlType)} does not support writing '{options.Format}' format."); + } + } + + ConnectionUrlType IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeConnectionUrlType(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConnectionUrlType)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ConnectionUrlType.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ConnectionUrlType.cs new file mode 100644 index 000000000000..5694fc7e5b66 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ConnectionUrlType.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; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// The URLs for accessing Oracle Application Express (APEX) and SQL Developer Web with a browser from a Compute instance within your VCN or that has a direct connection to your VCN. + public partial class ConnectionUrlType + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal ConnectionUrlType() + { + } + + /// Initializes a new instance of . + /// Oracle Application Express (APEX) URL. + /// The URL of the Database Transforms for the Autonomous Database. + /// The URL of the Graph Studio for the Autonomous Database. + /// The URL of the Oracle Machine Learning (OML) Notebook for the Autonomous Database. + /// The URL of the MongoDB API for the Autonomous Database. + /// The Oracle REST Data Services (ORDS) URL of the Web Access for the Autonomous Database. + /// Oracle SQL Developer Web URL. + /// Keeps track of any properties unknown to the library. + internal ConnectionUrlType(string apexUri, string databaseTransformsUri, string graphStudioUri, string machineLearningNotebookUri, string mongoDbUri, string ordsUri, string sqlDevWebUri, IDictionary serializedAdditionalRawData) + { + ApexUri = apexUri; + DatabaseTransformsUri = databaseTransformsUri; + GraphStudioUri = graphStudioUri; + MachineLearningNotebookUri = machineLearningNotebookUri; + MongoDbUri = mongoDbUri; + OrdsUri = ordsUri; + SqlDevWebUri = sqlDevWebUri; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Oracle Application Express (APEX) URL. + public string ApexUri { get; } + /// The URL of the Database Transforms for the Autonomous Database. + public string DatabaseTransformsUri { get; } + /// The URL of the Graph Studio for the Autonomous Database. + public string GraphStudioUri { get; } + /// The URL of the Oracle Machine Learning (OML) Notebook for the Autonomous Database. + public string MachineLearningNotebookUri { get; } + /// The URL of the MongoDB API for the Autonomous Database. + public string MongoDbUri { get; } + /// The Oracle REST Data Services (ORDS) URL of the Web Access for the Autonomous Database. + public string OrdsUri { get; } + /// Oracle SQL Developer Web URL. + public string SqlDevWebUri { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ConsumerGroup.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ConsumerGroup.cs new file mode 100644 index 000000000000..d932177cd4ba --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ConsumerGroup.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// Consumer group enum. + public readonly partial struct ConsumerGroup : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ConsumerGroup(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string HighValue = "High"; + private const string MediumValue = "Medium"; + private const string LowValue = "Low"; + private const string TpValue = "Tp"; + private const string TpurgentValue = "Tpurgent"; + + /// High group. + public static ConsumerGroup High { get; } = new ConsumerGroup(HighValue); + /// Medium group. + public static ConsumerGroup Medium { get; } = new ConsumerGroup(MediumValue); + /// Low group. + public static ConsumerGroup Low { get; } = new ConsumerGroup(LowValue); + /// TP group. + public static ConsumerGroup Tp { get; } = new ConsumerGroup(TpValue); + /// TPurgent group. + public static ConsumerGroup Tpurgent { get; } = new ConsumerGroup(TpurgentValue); + /// Determines if two values are the same. + public static bool operator ==(ConsumerGroup left, ConsumerGroup right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ConsumerGroup left, ConsumerGroup right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ConsumerGroup(string value) => new ConsumerGroup(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ConsumerGroup other && Equals(other); + /// + public bool Equals(ConsumerGroup 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/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CustomerContact.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CustomerContact.Serialization.cs new file mode 100644 index 000000000000..cd8e5a53e107 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CustomerContact.Serialization.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + public partial class CustomerContact : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CustomerContact)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("email"u8); + writer.WriteStringValue(Email); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + CustomerContact IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CustomerContact)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCustomerContact(document.RootElement, options); + } + + internal static CustomerContact DeserializeCustomerContact(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string email = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("email"u8)) + { + email = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CustomerContact(email, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(CustomerContact)} does not support writing '{options.Format}' format."); + } + } + + CustomerContact IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeCustomerContact(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CustomerContact)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CustomerContact.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CustomerContact.cs new file mode 100644 index 000000000000..6a55a62855a3 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CustomerContact.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// CustomerContact resource properties. + public partial class CustomerContact + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The email address used by Oracle to send notifications regarding databases and infrastructure. + /// is null. + public CustomerContact(string email) + { + Argument.AssertNotNull(email, nameof(email)); + + Email = email; + } + + /// Initializes a new instance of . + /// The email address used by Oracle to send notifications regarding databases and infrastructure. + /// Keeps track of any properties unknown to the library. + internal CustomerContact(string email, IDictionary serializedAdditionalRawData) + { + Email = email; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal CustomerContact() + { + } + + /// The email address used by Oracle to send notifications regarding databases and infrastructure. + public string Email { get; set; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DataBaseType.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DataBaseType.cs new file mode 100644 index 000000000000..b22a49836386 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DataBaseType.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// Database type enum. + internal readonly partial struct DataBaseType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DataBaseType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string RegularValue = "Regular"; + private const string CloneValue = "Clone"; + private const string CloneFromBackupTimestampValue = "CloneFromBackupTimestamp"; + private const string CrossRegionDisasterRecoveryValue = "CrossRegionDisasterRecovery"; + + /// Regular DB. + public static DataBaseType Regular { get; } = new DataBaseType(RegularValue); + /// Clone DB. + public static DataBaseType Clone { get; } = new DataBaseType(CloneValue); + /// Clone DB from backup timestamp. + public static DataBaseType CloneFromBackupTimestamp { get; } = new DataBaseType(CloneFromBackupTimestampValue); + /// Cross Region Disaster Recovery. + public static DataBaseType CrossRegionDisasterRecovery { get; } = new DataBaseType(CrossRegionDisasterRecoveryValue); + /// Determines if two values are the same. + public static bool operator ==(DataBaseType left, DataBaseType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DataBaseType left, DataBaseType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DataBaseType(string value) => new DataBaseType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DataBaseType other && Equals(other); + /// + public bool Equals(DataBaseType 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/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DataCollectionOptions.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DataCollectionOptions.Serialization.cs new file mode 100644 index 000000000000..3fa3668e4a13 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DataCollectionOptions.Serialization.cs @@ -0,0 +1,163 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + public partial class DataCollectionOptions : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataCollectionOptions)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(IsDiagnosticsEventsEnabled)) + { + writer.WritePropertyName("isDiagnosticsEventsEnabled"u8); + writer.WriteBooleanValue(IsDiagnosticsEventsEnabled.Value); + } + if (Optional.IsDefined(IsHealthMonitoringEnabled)) + { + writer.WritePropertyName("isHealthMonitoringEnabled"u8); + writer.WriteBooleanValue(IsHealthMonitoringEnabled.Value); + } + if (Optional.IsDefined(IsIncidentLogsEnabled)) + { + writer.WritePropertyName("isIncidentLogsEnabled"u8); + writer.WriteBooleanValue(IsIncidentLogsEnabled.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DataCollectionOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataCollectionOptions)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataCollectionOptions(document.RootElement, options); + } + + internal static DataCollectionOptions DeserializeDataCollectionOptions(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool? isDiagnosticsEventsEnabled = default; + bool? isHealthMonitoringEnabled = default; + bool? isIncidentLogsEnabled = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("isDiagnosticsEventsEnabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isDiagnosticsEventsEnabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("isHealthMonitoringEnabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isHealthMonitoringEnabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("isIncidentLogsEnabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isIncidentLogsEnabled = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DataCollectionOptions(isDiagnosticsEventsEnabled, isHealthMonitoringEnabled, isIncidentLogsEnabled, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DataCollectionOptions)} does not support writing '{options.Format}' format."); + } + } + + DataCollectionOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataCollectionOptions(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataCollectionOptions)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DataCollectionOptions.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DataCollectionOptions.cs new file mode 100644 index 000000000000..571ad7b990f1 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DataCollectionOptions.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// DataCollectionOptions resource properties. + public partial class DataCollectionOptions + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DataCollectionOptions() + { + } + + /// Initializes a new instance of . + /// Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS. + /// Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// Keeps track of any properties unknown to the library. + internal DataCollectionOptions(bool? isDiagnosticsEventsEnabled, bool? isHealthMonitoringEnabled, bool? isIncidentLogsEnabled, IDictionary serializedAdditionalRawData) + { + IsDiagnosticsEventsEnabled = isDiagnosticsEventsEnabled; + IsHealthMonitoringEnabled = isHealthMonitoringEnabled; + IsIncidentLogsEnabled = isIncidentLogsEnabled; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS. + public bool? IsDiagnosticsEventsEnabled { get; set; } + /// Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + public bool? IsHealthMonitoringEnabled { get; set; } + /// Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + public bool? IsIncidentLogsEnabled { get; set; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DataSafeStatusType.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DataSafeStatusType.cs new file mode 100644 index 000000000000..da7b8b1377a6 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DataSafeStatusType.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// DataSafe status type enum. + public readonly partial struct DataSafeStatusType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DataSafeStatusType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string RegisteringValue = "Registering"; + private const string RegisteredValue = "Registered"; + private const string DeregisteringValue = "Deregistering"; + private const string NotRegisteredValue = "NotRegistered"; + private const string FailedValue = "Failed"; + + /// Registering status. + public static DataSafeStatusType Registering { get; } = new DataSafeStatusType(RegisteringValue); + /// Registered status. + public static DataSafeStatusType Registered { get; } = new DataSafeStatusType(RegisteredValue); + /// Deregistering status. + public static DataSafeStatusType Deregistering { get; } = new DataSafeStatusType(DeregisteringValue); + /// NotRegistered status. + public static DataSafeStatusType NotRegistered { get; } = new DataSafeStatusType(NotRegisteredValue); + /// Failed status. + public static DataSafeStatusType Failed { get; } = new DataSafeStatusType(FailedValue); + /// Determines if two values are the same. + public static bool operator ==(DataSafeStatusType left, DataSafeStatusType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DataSafeStatusType left, DataSafeStatusType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DataSafeStatusType(string value) => new DataSafeStatusType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DataSafeStatusType other && Equals(other); + /// + public bool Equals(DataSafeStatusType 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/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DatabaseEditionType.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DatabaseEditionType.cs new file mode 100644 index 000000000000..90f1ad605b20 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DatabaseEditionType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// Database edition type enum. + public readonly partial struct DatabaseEditionType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DatabaseEditionType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string StandardEditionValue = "StandardEdition"; + private const string EnterpriseEditionValue = "EnterpriseEdition"; + + /// Standard edition. + public static DatabaseEditionType StandardEdition { get; } = new DatabaseEditionType(StandardEditionValue); + /// Enterprise edition. + public static DatabaseEditionType EnterpriseEdition { get; } = new DatabaseEditionType(EnterpriseEditionValue); + /// Determines if two values are the same. + public static bool operator ==(DatabaseEditionType left, DatabaseEditionType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DatabaseEditionType left, DatabaseEditionType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DatabaseEditionType(string value) => new DatabaseEditionType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DatabaseEditionType other && Equals(other); + /// + public bool Equals(DatabaseEditionType 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/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DayOfWeek.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DayOfWeek.Serialization.cs new file mode 100644 index 000000000000..2c50ea07e73e --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DayOfWeek.Serialization.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + public partial class DayOfWeek : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DayOfWeek)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DayOfWeek IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DayOfWeek)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDayOfWeek(document.RootElement, options); + } + + internal static DayOfWeek DeserializeDayOfWeek(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DayOfWeekName name = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = new DayOfWeekName(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DayOfWeek(name, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DayOfWeek)} does not support writing '{options.Format}' format."); + } + } + + DayOfWeek IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDayOfWeek(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DayOfWeek)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DayOfWeek.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DayOfWeek.cs new file mode 100644 index 000000000000..e3944168f9c3 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DayOfWeek.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// DayOfWeek resource properties. + public partial class DayOfWeek + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Name of the day of the week. + public DayOfWeek(DayOfWeekName name) + { + Name = name; + } + + /// Initializes a new instance of . + /// Name of the day of the week. + /// Keeps track of any properties unknown to the library. + internal DayOfWeek(DayOfWeekName name, IDictionary serializedAdditionalRawData) + { + Name = name; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DayOfWeek() + { + } + + /// Name of the day of the week. + public DayOfWeekName Name { get; set; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DayOfWeekName.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DayOfWeekName.cs new file mode 100644 index 000000000000..64fb9de7b1ca --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DayOfWeekName.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// DayOfWeekName enum. + public readonly partial struct DayOfWeekName : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DayOfWeekName(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string MondayValue = "Monday"; + private const string TuesdayValue = "Tuesday"; + private const string WednesdayValue = "Wednesday"; + private const string ThursdayValue = "Thursday"; + private const string FridayValue = "Friday"; + private const string SaturdayValue = "Saturday"; + private const string SundayValue = "Sunday"; + + /// Monday value. + public static DayOfWeekName Monday { get; } = new DayOfWeekName(MondayValue); + /// Tuesday value. + public static DayOfWeekName Tuesday { get; } = new DayOfWeekName(TuesdayValue); + /// Wednesday value. + public static DayOfWeekName Wednesday { get; } = new DayOfWeekName(WednesdayValue); + /// Thursday value. + public static DayOfWeekName Thursday { get; } = new DayOfWeekName(ThursdayValue); + /// Friday value. + public static DayOfWeekName Friday { get; } = new DayOfWeekName(FridayValue); + /// Saturday value. + public static DayOfWeekName Saturday { get; } = new DayOfWeekName(SaturdayValue); + /// Sunday value. + public static DayOfWeekName Sunday { get; } = new DayOfWeekName(SundayValue); + /// Determines if two values are the same. + public static bool operator ==(DayOfWeekName left, DayOfWeekName right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DayOfWeekName left, DayOfWeekName right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DayOfWeekName(string value) => new DayOfWeekName(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DayOfWeekName other && Equals(other); + /// + public bool Equals(DayOfWeekName 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/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbActionResponse.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbActionResponse.Serialization.cs new file mode 100644 index 000000000000..3c1de1fcc75b --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbActionResponse.Serialization.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + public partial class DbActionResponse : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DbActionResponse)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DbActionResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DbActionResponse)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDbActionResponse(document.RootElement, options); + } + + internal static DbActionResponse DeserializeDbActionResponse(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AzureResourceProvisioningState? provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new AzureResourceProvisioningState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DbActionResponse(provisioningState, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DbActionResponse)} does not support writing '{options.Format}' format."); + } + } + + DbActionResponse IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDbActionResponse(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DbActionResponse)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbActionResponse.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbActionResponse.cs new file mode 100644 index 000000000000..52704da4539e --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbActionResponse.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// ExascaleDbNode action response. + public partial class DbActionResponse + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal DbActionResponse() + { + } + + /// Initializes a new instance of . + /// ExascaleDbNode provisioning state. + /// Keeps track of any properties unknown to the library. + internal DbActionResponse(AzureResourceProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) + { + ProvisioningState = provisioningState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// ExascaleDbNode provisioning state. + public AzureResourceProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbIormConfig.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbIormConfig.Serialization.cs new file mode 100644 index 000000000000..383447551bc4 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbIormConfig.Serialization.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + public partial class DbIormConfig : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DbIormConfig)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(DbName)) + { + writer.WritePropertyName("dbName"u8); + writer.WriteStringValue(DbName); + } + if (Optional.IsDefined(FlashCacheLimit)) + { + writer.WritePropertyName("flashCacheLimit"u8); + writer.WriteStringValue(FlashCacheLimit); + } + if (Optional.IsDefined(Share)) + { + writer.WritePropertyName("share"u8); + writer.WriteNumberValue(Share.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DbIormConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DbIormConfig)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDbIormConfig(document.RootElement, options); + } + + internal static DbIormConfig DeserializeDbIormConfig(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string dbName = default; + string flashCacheLimit = default; + int? share = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("dbName"u8)) + { + dbName = property.Value.GetString(); + continue; + } + if (property.NameEquals("flashCacheLimit"u8)) + { + flashCacheLimit = property.Value.GetString(); + continue; + } + if (property.NameEquals("share"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + share = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DbIormConfig(dbName, flashCacheLimit, share, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DbIormConfig)} does not support writing '{options.Format}' format."); + } + } + + DbIormConfig IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDbIormConfig(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DbIormConfig)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbIormConfig.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbIormConfig.cs new file mode 100644 index 000000000000..b655ba39fba3 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbIormConfig.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// DbIormConfig for cloud vm cluster. + public partial class DbIormConfig + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal DbIormConfig() + { + } + + /// Initializes a new instance of . + /// The database name. For the default DbPlan, the dbName is default. + /// The flash cache limit for this database. This value is internally configured based on the share value assigned to the database. + /// The relative priority of this database. + /// Keeps track of any properties unknown to the library. + internal DbIormConfig(string dbName, string flashCacheLimit, int? share, IDictionary serializedAdditionalRawData) + { + DbName = dbName; + FlashCacheLimit = flashCacheLimit; + Share = share; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The database name. For the default DbPlan, the dbName is default. + public string DbName { get; } + /// The flash cache limit for this database. This value is internally configured based on the share value assigned to the database. + public string FlashCacheLimit { get; } + /// The relative priority of this database. + public int? Share { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbNodeAction.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbNodeAction.Serialization.cs new file mode 100644 index 000000000000..58f581561bc9 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbNodeAction.Serialization.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + public partial class DbNodeAction : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DbNodeAction)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("action"u8); + writer.WriteStringValue(Action.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DbNodeAction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DbNodeAction)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDbNodeAction(document.RootElement, options); + } + + internal static DbNodeAction DeserializeDbNodeAction(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DbNodeActionEnum action = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("action"u8)) + { + action = new DbNodeActionEnum(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DbNodeAction(action, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DbNodeAction)} does not support writing '{options.Format}' format."); + } + } + + DbNodeAction IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDbNodeAction(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DbNodeAction)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbNodeAction.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbNodeAction.cs new file mode 100644 index 000000000000..beadeeb0650c --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbNodeAction.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// DbNode action object. + public partial class DbNodeAction + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Db action. + public DbNodeAction(DbNodeActionEnum action) + { + Action = action; + } + + /// Initializes a new instance of . + /// Db action. + /// Keeps track of any properties unknown to the library. + internal DbNodeAction(DbNodeActionEnum action, IDictionary serializedAdditionalRawData) + { + Action = action; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DbNodeAction() + { + } + + /// Db action. + public DbNodeActionEnum Action { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbNodeActionEnum.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbNodeActionEnum.cs new file mode 100644 index 000000000000..19da3a58571a --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbNodeActionEnum.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// DbNode action enum. + public readonly partial struct DbNodeActionEnum : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DbNodeActionEnum(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string StartValue = "Start"; + private const string StopValue = "Stop"; + private const string SoftResetValue = "SoftReset"; + private const string ResetValue = "Reset"; + + /// Start DbNode. + public static DbNodeActionEnum Start { get; } = new DbNodeActionEnum(StartValue); + /// Stop DbNode. + public static DbNodeActionEnum Stop { get; } = new DbNodeActionEnum(StopValue); + /// Soft reset DbNode. + public static DbNodeActionEnum SoftReset { get; } = new DbNodeActionEnum(SoftResetValue); + /// Reset DbNode. + public static DbNodeActionEnum Reset { get; } = new DbNodeActionEnum(ResetValue); + /// Determines if two values are the same. + public static bool operator ==(DbNodeActionEnum left, DbNodeActionEnum right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DbNodeActionEnum left, DbNodeActionEnum right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DbNodeActionEnum(string value) => new DbNodeActionEnum(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DbNodeActionEnum other && Equals(other); + /// + public bool Equals(DbNodeActionEnum 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/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbNodeDetails.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbNodeDetails.Serialization.cs new file mode 100644 index 000000000000..1e8b548dee0f --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbNodeDetails.Serialization.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + public partial class DbNodeDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DbNodeDetails)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("dbNodeId"u8); + writer.WriteStringValue(DbNodeId); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DbNodeDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DbNodeDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDbNodeDetails(document.RootElement, options); + } + + internal static DbNodeDetails DeserializeDbNodeDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier dbNodeId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("dbNodeId"u8)) + { + dbNodeId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DbNodeDetails(dbNodeId, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DbNodeDetails)} does not support writing '{options.Format}' format."); + } + } + + DbNodeDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDbNodeDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DbNodeDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbNodeDetails.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbNodeDetails.cs new file mode 100644 index 000000000000..6fe226c3c4a0 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbNodeDetails.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// Details of the ExaCS Db node. Applies to Exadata Database Service on Exascale Infrastructure only. + public partial class DbNodeDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Exascale DbNode Azure Resource ID. + /// is null. + public DbNodeDetails(ResourceIdentifier dbNodeId) + { + Argument.AssertNotNull(dbNodeId, nameof(dbNodeId)); + + DbNodeId = dbNodeId; + } + + /// Initializes a new instance of . + /// Exascale DbNode Azure Resource ID. + /// Keeps track of any properties unknown to the library. + internal DbNodeDetails(ResourceIdentifier dbNodeId, IDictionary serializedAdditionalRawData) + { + DbNodeId = dbNodeId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DbNodeDetails() + { + } + + /// Exascale DbNode Azure Resource ID. + public ResourceIdentifier DbNodeId { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbNodeListResult.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbNodeListResult.Serialization.cs new file mode 100644 index 000000000000..545d4b83b4e6 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbNodeListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + internal partial class DbNodeListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DbNodeListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DbNodeListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DbNodeListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDbNodeListResult(document.RootElement, options); + } + + internal static DbNodeListResult DeserializeDbNodeListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DbNodeData.DeserializeDbNodeData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DbNodeListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DbNodeListResult)} does not support writing '{options.Format}' format."); + } + } + + DbNodeListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDbNodeListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DbNodeListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbNodeListResult.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbNodeListResult.cs new file mode 100644 index 000000000000..e2a976acb24a --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbNodeListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// The response of a DbNode list operation. + internal partial class DbNodeListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The DbNode items on this page. + /// is null. + internal DbNodeListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The DbNode items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal DbNodeListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DbNodeListResult() + { + } + + /// The DbNode items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbNodeMaintenanceType.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbNodeMaintenanceType.cs new file mode 100644 index 000000000000..ffc9cb881a87 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbNodeMaintenanceType.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// The type of database node maintenance. + public readonly partial struct DbNodeMaintenanceType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DbNodeMaintenanceType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string VmdbRebootMigrationValue = "VmdbRebootMigration"; + + /// VMDB reboot migration maintenance type. + public static DbNodeMaintenanceType VmdbRebootMigration { get; } = new DbNodeMaintenanceType(VmdbRebootMigrationValue); + /// Determines if two values are the same. + public static bool operator ==(DbNodeMaintenanceType left, DbNodeMaintenanceType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DbNodeMaintenanceType left, DbNodeMaintenanceType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DbNodeMaintenanceType(string value) => new DbNodeMaintenanceType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DbNodeMaintenanceType other && Equals(other); + /// + public bool Equals(DbNodeMaintenanceType 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/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbNodeProperties.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbNodeProperties.Serialization.cs new file mode 100644 index 000000000000..4fba14fcd2b0 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbNodeProperties.Serialization.cs @@ -0,0 +1,412 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + public partial class DbNodeProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DbNodeProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("ocid"u8); + writer.WriteStringValue(Ocid); + if (Optional.IsDefined(AdditionalDetails)) + { + writer.WritePropertyName("additionalDetails"u8); + writer.WriteStringValue(AdditionalDetails); + } + if (Optional.IsDefined(BackupIPId)) + { + writer.WritePropertyName("backupIpId"u8); + writer.WriteStringValue(BackupIPId); + } + if (Optional.IsDefined(BackupVnic2Id)) + { + writer.WritePropertyName("backupVnic2Id"u8); + writer.WriteStringValue(BackupVnic2Id); + } + if (Optional.IsDefined(BackupVnicId)) + { + writer.WritePropertyName("backupVnicId"u8); + writer.WriteStringValue(BackupVnicId); + } + if (Optional.IsDefined(CpuCoreCount)) + { + writer.WritePropertyName("cpuCoreCount"u8); + writer.WriteNumberValue(CpuCoreCount.Value); + } + if (Optional.IsDefined(DbNodeStorageSizeInGbs)) + { + writer.WritePropertyName("dbNodeStorageSizeInGbs"u8); + writer.WriteNumberValue(DbNodeStorageSizeInGbs.Value); + } + if (Optional.IsDefined(DbServerId)) + { + writer.WritePropertyName("dbServerId"u8); + writer.WriteStringValue(DbServerId); + } + writer.WritePropertyName("dbSystemId"u8); + writer.WriteStringValue(DbSystemId); + if (Optional.IsDefined(FaultDomain)) + { + writer.WritePropertyName("faultDomain"u8); + writer.WriteStringValue(FaultDomain); + } + if (Optional.IsDefined(HostIPId)) + { + writer.WritePropertyName("hostIpId"u8); + writer.WriteStringValue(HostIPId); + } + if (Optional.IsDefined(Hostname)) + { + writer.WritePropertyName("hostname"u8); + writer.WriteStringValue(Hostname); + } + writer.WritePropertyName("lifecycleState"u8); + writer.WriteStringValue(LifecycleState.ToString()); + if (Optional.IsDefined(LifecycleDetails)) + { + writer.WritePropertyName("lifecycleDetails"u8); + writer.WriteStringValue(LifecycleDetails); + } + if (Optional.IsDefined(MaintenanceType)) + { + writer.WritePropertyName("maintenanceType"u8); + writer.WriteStringValue(MaintenanceType.Value.ToString()); + } + if (Optional.IsDefined(MemorySizeInGbs)) + { + writer.WritePropertyName("memorySizeInGbs"u8); + writer.WriteNumberValue(MemorySizeInGbs.Value); + } + if (Optional.IsDefined(SoftwareStorageSizeInGb)) + { + writer.WritePropertyName("softwareStorageSizeInGb"u8); + writer.WriteNumberValue(SoftwareStorageSizeInGb.Value); + } + writer.WritePropertyName("timeCreated"u8); + writer.WriteStringValue(TimeCreated, "O"); + if (Optional.IsDefined(TimeMaintenanceWindowEnd)) + { + writer.WritePropertyName("timeMaintenanceWindowEnd"u8); + writer.WriteStringValue(TimeMaintenanceWindowEnd.Value, "O"); + } + if (Optional.IsDefined(TimeMaintenanceWindowStart)) + { + writer.WritePropertyName("timeMaintenanceWindowStart"u8); + writer.WriteStringValue(TimeMaintenanceWindowStart.Value, "O"); + } + if (Optional.IsDefined(Vnic2Id)) + { + writer.WritePropertyName("vnic2Id"u8); + writer.WriteStringValue(Vnic2Id); + } + writer.WritePropertyName("vnicId"u8); + writer.WriteStringValue(VnicId); + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DbNodeProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DbNodeProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDbNodeProperties(document.RootElement, options); + } + + internal static DbNodeProperties DeserializeDbNodeProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string ocid = default; + string additionalDetails = default; + string backupIPId = default; + string backupVnic2Id = default; + string backupVnicId = default; + int? cpuCoreCount = default; + int? dbNodeStorageSizeInGbs = default; + string dbServerId = default; + string dbSystemId = default; + string faultDomain = default; + string hostIPId = default; + string hostname = default; + DbNodeProvisioningState lifecycleState = default; + string lifecycleDetails = default; + DbNodeMaintenanceType? maintenanceType = default; + int? memorySizeInGbs = default; + int? softwareStorageSizeInGb = default; + DateTimeOffset timeCreated = default; + DateTimeOffset? timeMaintenanceWindowEnd = default; + DateTimeOffset? timeMaintenanceWindowStart = default; + string vnic2Id = default; + string vnicId = default; + ResourceProvisioningState? provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("ocid"u8)) + { + ocid = property.Value.GetString(); + continue; + } + if (property.NameEquals("additionalDetails"u8)) + { + additionalDetails = property.Value.GetString(); + continue; + } + if (property.NameEquals("backupIpId"u8)) + { + backupIPId = property.Value.GetString(); + continue; + } + if (property.NameEquals("backupVnic2Id"u8)) + { + backupVnic2Id = property.Value.GetString(); + continue; + } + if (property.NameEquals("backupVnicId"u8)) + { + backupVnicId = property.Value.GetString(); + continue; + } + if (property.NameEquals("cpuCoreCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + cpuCoreCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("dbNodeStorageSizeInGbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dbNodeStorageSizeInGbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("dbServerId"u8)) + { + dbServerId = property.Value.GetString(); + continue; + } + if (property.NameEquals("dbSystemId"u8)) + { + dbSystemId = property.Value.GetString(); + continue; + } + if (property.NameEquals("faultDomain"u8)) + { + faultDomain = property.Value.GetString(); + continue; + } + if (property.NameEquals("hostIpId"u8)) + { + hostIPId = property.Value.GetString(); + continue; + } + if (property.NameEquals("hostname"u8)) + { + hostname = property.Value.GetString(); + continue; + } + if (property.NameEquals("lifecycleState"u8)) + { + lifecycleState = new DbNodeProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("lifecycleDetails"u8)) + { + lifecycleDetails = property.Value.GetString(); + continue; + } + if (property.NameEquals("maintenanceType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + maintenanceType = new DbNodeMaintenanceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("memorySizeInGbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + memorySizeInGbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("softwareStorageSizeInGb"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + softwareStorageSizeInGb = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("timeCreated"u8)) + { + timeCreated = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("timeMaintenanceWindowEnd"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeMaintenanceWindowEnd = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("timeMaintenanceWindowStart"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeMaintenanceWindowStart = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("vnic2Id"u8)) + { + vnic2Id = property.Value.GetString(); + continue; + } + if (property.NameEquals("vnicId"u8)) + { + vnicId = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new ResourceProvisioningState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DbNodeProperties( + ocid, + additionalDetails, + backupIPId, + backupVnic2Id, + backupVnicId, + cpuCoreCount, + dbNodeStorageSizeInGbs, + dbServerId, + dbSystemId, + faultDomain, + hostIPId, + hostname, + lifecycleState, + lifecycleDetails, + maintenanceType, + memorySizeInGbs, + softwareStorageSizeInGb, + timeCreated, + timeMaintenanceWindowEnd, + timeMaintenanceWindowStart, + vnic2Id, + vnicId, + provisioningState, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DbNodeProperties)} does not support writing '{options.Format}' format."); + } + } + + DbNodeProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDbNodeProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DbNodeProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbNodeProperties.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbNodeProperties.cs new file mode 100644 index 000000000000..83ccd26bb21b --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbNodeProperties.cs @@ -0,0 +1,173 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// The properties of DbNodeResource. + public partial class DbNodeProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// DbNode OCID. + /// The OCID of the DB system. + /// The current state of the database node. + /// The date and time that the database node was created. + /// The OCID of the VNIC. + /// , or is null. + internal DbNodeProperties(string ocid, string dbSystemId, DbNodeProvisioningState lifecycleState, DateTimeOffset timeCreated, string vnicId) + { + Argument.AssertNotNull(ocid, nameof(ocid)); + Argument.AssertNotNull(dbSystemId, nameof(dbSystemId)); + Argument.AssertNotNull(vnicId, nameof(vnicId)); + + Ocid = ocid; + DbSystemId = dbSystemId; + LifecycleState = lifecycleState; + TimeCreated = timeCreated; + VnicId = vnicId; + } + + /// Initializes a new instance of . + /// DbNode OCID. + /// Additional information about the planned maintenance. + /// The OCID of the backup IP address associated with the database node. + /// The OCID of the second backup VNIC. + /// The OCID of the backup VNIC. + /// The number of CPU cores enabled on the Db node. + /// The allocated local node storage in GBs on the Db node. + /// The OCID of the Exacc Db server associated with the database node. + /// The OCID of the DB system. + /// The name of the Fault Domain the instance is contained in. + /// The OCID of the host IP address associated with the database node. + /// The host name for the database node. + /// The current state of the database node. + /// Lifecycle details of Db Node. + /// The type of database node maintenance. + /// The allocated memory in GBs on the Db node. + /// The size (in GB) of the block storage volume allocation for the DB system. This attribute applies only for virtual machine DB systems. + /// The date and time that the database node was created. + /// End date and time of maintenance window. + /// Start date and time of maintenance window. + /// The OCID of the second VNIC. + /// The OCID of the VNIC. + /// Azure resource provisioning state. + /// Keeps track of any properties unknown to the library. + internal DbNodeProperties(string ocid, string additionalDetails, string backupIPId, string backupVnic2Id, string backupVnicId, int? cpuCoreCount, int? dbNodeStorageSizeInGbs, string dbServerId, string dbSystemId, string faultDomain, string hostIPId, string hostname, DbNodeProvisioningState lifecycleState, string lifecycleDetails, DbNodeMaintenanceType? maintenanceType, int? memorySizeInGbs, int? softwareStorageSizeInGb, DateTimeOffset timeCreated, DateTimeOffset? timeMaintenanceWindowEnd, DateTimeOffset? timeMaintenanceWindowStart, string vnic2Id, string vnicId, ResourceProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) + { + Ocid = ocid; + AdditionalDetails = additionalDetails; + BackupIPId = backupIPId; + BackupVnic2Id = backupVnic2Id; + BackupVnicId = backupVnicId; + CpuCoreCount = cpuCoreCount; + DbNodeStorageSizeInGbs = dbNodeStorageSizeInGbs; + DbServerId = dbServerId; + DbSystemId = dbSystemId; + FaultDomain = faultDomain; + HostIPId = hostIPId; + Hostname = hostname; + LifecycleState = lifecycleState; + LifecycleDetails = lifecycleDetails; + MaintenanceType = maintenanceType; + MemorySizeInGbs = memorySizeInGbs; + SoftwareStorageSizeInGb = softwareStorageSizeInGb; + TimeCreated = timeCreated; + TimeMaintenanceWindowEnd = timeMaintenanceWindowEnd; + TimeMaintenanceWindowStart = timeMaintenanceWindowStart; + Vnic2Id = vnic2Id; + VnicId = vnicId; + ProvisioningState = provisioningState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DbNodeProperties() + { + } + + /// DbNode OCID. + public string Ocid { get; } + /// Additional information about the planned maintenance. + public string AdditionalDetails { get; } + /// The OCID of the backup IP address associated with the database node. + public string BackupIPId { get; } + /// The OCID of the second backup VNIC. + public string BackupVnic2Id { get; } + /// The OCID of the backup VNIC. + public string BackupVnicId { get; } + /// The number of CPU cores enabled on the Db node. + public int? CpuCoreCount { get; } + /// The allocated local node storage in GBs on the Db node. + public int? DbNodeStorageSizeInGbs { get; } + /// The OCID of the Exacc Db server associated with the database node. + public string DbServerId { get; } + /// The OCID of the DB system. + public string DbSystemId { get; } + /// The name of the Fault Domain the instance is contained in. + public string FaultDomain { get; } + /// The OCID of the host IP address associated with the database node. + public string HostIPId { get; } + /// The host name for the database node. + public string Hostname { get; } + /// The current state of the database node. + public DbNodeProvisioningState LifecycleState { get; } + /// Lifecycle details of Db Node. + public string LifecycleDetails { get; } + /// The type of database node maintenance. + public DbNodeMaintenanceType? MaintenanceType { get; } + /// The allocated memory in GBs on the Db node. + public int? MemorySizeInGbs { get; } + /// The size (in GB) of the block storage volume allocation for the DB system. This attribute applies only for virtual machine DB systems. + public int? SoftwareStorageSizeInGb { get; } + /// The date and time that the database node was created. + public DateTimeOffset TimeCreated { get; } + /// End date and time of maintenance window. + public DateTimeOffset? TimeMaintenanceWindowEnd { get; } + /// Start date and time of maintenance window. + public DateTimeOffset? TimeMaintenanceWindowStart { get; } + /// The OCID of the second VNIC. + public string Vnic2Id { get; } + /// The OCID of the VNIC. + public string VnicId { get; } + /// Azure resource provisioning state. + public ResourceProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbNodeProvisioningState.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbNodeProvisioningState.cs new file mode 100644 index 000000000000..ad00956249a8 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbNodeProvisioningState.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// DnNode provisioning state enum. + public readonly partial struct DbNodeProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DbNodeProvisioningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ProvisioningValue = "Provisioning"; + private const string AvailableValue = "Available"; + private const string UpdatingValue = "Updating"; + private const string StoppingValue = "Stopping"; + private const string StoppedValue = "Stopped"; + private const string StartingValue = "Starting"; + private const string TerminatingValue = "Terminating"; + private const string TerminatedValue = "Terminated"; + private const string FailedValue = "Failed"; + + /// Indicates that resource in Provisioning state. + public static DbNodeProvisioningState Provisioning { get; } = new DbNodeProvisioningState(ProvisioningValue); + /// Indicates that resource in Available state. + public static DbNodeProvisioningState Available { get; } = new DbNodeProvisioningState(AvailableValue); + /// Indicates that resource in Updating state. + public static DbNodeProvisioningState Updating { get; } = new DbNodeProvisioningState(UpdatingValue); + /// Indicates that resource in Stopping state. + public static DbNodeProvisioningState Stopping { get; } = new DbNodeProvisioningState(StoppingValue); + /// Indicates that resource in Stopped state. + public static DbNodeProvisioningState Stopped { get; } = new DbNodeProvisioningState(StoppedValue); + /// Indicates that resource in Starting state. + public static DbNodeProvisioningState Starting { get; } = new DbNodeProvisioningState(StartingValue); + /// Indicates that resource in Terminating state. + public static DbNodeProvisioningState Terminating { get; } = new DbNodeProvisioningState(TerminatingValue); + /// Indicates that resource in Terminated state. + public static DbNodeProvisioningState Terminated { get; } = new DbNodeProvisioningState(TerminatedValue); + /// Indicates that resource in Failed state. + public static DbNodeProvisioningState Failed { get; } = new DbNodeProvisioningState(FailedValue); + /// Determines if two values are the same. + public static bool operator ==(DbNodeProvisioningState left, DbNodeProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DbNodeProvisioningState left, DbNodeProvisioningState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DbNodeProvisioningState(string value) => new DbNodeProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DbNodeProvisioningState other && Equals(other); + /// + public bool Equals(DbNodeProvisioningState 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/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbServerListResult.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbServerListResult.Serialization.cs new file mode 100644 index 000000000000..72adb95d62dd --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbServerListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + internal partial class DbServerListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DbServerListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DbServerListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DbServerListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDbServerListResult(document.RootElement, options); + } + + internal static DbServerListResult DeserializeDbServerListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DbServerData.DeserializeDbServerData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DbServerListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DbServerListResult)} does not support writing '{options.Format}' format."); + } + } + + DbServerListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDbServerListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DbServerListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbServerListResult.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbServerListResult.cs new file mode 100644 index 000000000000..6c677370ca74 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbServerListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// The response of a DbServer list operation. + internal partial class DbServerListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The DbServer items on this page. + /// is null. + internal DbServerListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The DbServer items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal DbServerListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DbServerListResult() + { + } + + /// The DbServer items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbServerPatchingDetails.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbServerPatchingDetails.Serialization.cs new file mode 100644 index 000000000000..01e64f42921a --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbServerPatchingDetails.Serialization.cs @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + public partial class DbServerPatchingDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DbServerPatchingDetails)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(EstimatedPatchDuration)) + { + writer.WritePropertyName("estimatedPatchDuration"u8); + writer.WriteNumberValue(EstimatedPatchDuration.Value); + } + if (options.Format != "W" && Optional.IsDefined(PatchingStatus)) + { + writer.WritePropertyName("patchingStatus"u8); + writer.WriteStringValue(PatchingStatus.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(TimePatchingEnded)) + { + writer.WritePropertyName("timePatchingEnded"u8); + writer.WriteStringValue(TimePatchingEnded.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(TimePatchingStarted)) + { + writer.WritePropertyName("timePatchingStarted"u8); + writer.WriteStringValue(TimePatchingStarted.Value, "O"); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DbServerPatchingDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DbServerPatchingDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDbServerPatchingDetails(document.RootElement, options); + } + + internal static DbServerPatchingDetails DeserializeDbServerPatchingDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int? estimatedPatchDuration = default; + DbServerPatchingStatus? patchingStatus = default; + DateTimeOffset? timePatchingEnded = default; + DateTimeOffset? timePatchingStarted = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("estimatedPatchDuration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + estimatedPatchDuration = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("patchingStatus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + patchingStatus = new DbServerPatchingStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("timePatchingEnded"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timePatchingEnded = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("timePatchingStarted"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timePatchingStarted = property.Value.GetDateTimeOffset("O"); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DbServerPatchingDetails(estimatedPatchDuration, patchingStatus, timePatchingEnded, timePatchingStarted, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DbServerPatchingDetails)} does not support writing '{options.Format}' format."); + } + } + + DbServerPatchingDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDbServerPatchingDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DbServerPatchingDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbServerPatchingDetails.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbServerPatchingDetails.cs new file mode 100644 index 000000000000..2e95b08d90d1 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbServerPatchingDetails.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// DbServer Patching Properties. + public partial class DbServerPatchingDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal DbServerPatchingDetails() + { + } + + /// Initializes a new instance of . + /// Estimated Patch Duration. + /// Patching Status. + /// Time Patching Ended. + /// Time Patching Started. + /// Keeps track of any properties unknown to the library. + internal DbServerPatchingDetails(int? estimatedPatchDuration, DbServerPatchingStatus? patchingStatus, DateTimeOffset? timePatchingEnded, DateTimeOffset? timePatchingStarted, IDictionary serializedAdditionalRawData) + { + EstimatedPatchDuration = estimatedPatchDuration; + PatchingStatus = patchingStatus; + TimePatchingEnded = timePatchingEnded; + TimePatchingStarted = timePatchingStarted; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Estimated Patch Duration. + public int? EstimatedPatchDuration { get; } + /// Patching Status. + public DbServerPatchingStatus? PatchingStatus { get; } + /// Time Patching Ended. + public DateTimeOffset? TimePatchingEnded { get; } + /// Time Patching Started. + public DateTimeOffset? TimePatchingStarted { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbServerPatchingStatus.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbServerPatchingStatus.cs new file mode 100644 index 000000000000..5534a53c7372 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbServerPatchingStatus.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// DB Server patching status enum. + public readonly partial struct DbServerPatchingStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DbServerPatchingStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ScheduledValue = "Scheduled"; + private const string MaintenanceInProgressValue = "MaintenanceInProgress"; + private const string FailedValue = "Failed"; + private const string CompleteValue = "Complete"; + + /// Patching scheduled. + public static DbServerPatchingStatus Scheduled { get; } = new DbServerPatchingStatus(ScheduledValue); + /// Patching in progress. + public static DbServerPatchingStatus MaintenanceInProgress { get; } = new DbServerPatchingStatus(MaintenanceInProgressValue); + /// Patching failed. + public static DbServerPatchingStatus Failed { get; } = new DbServerPatchingStatus(FailedValue); + /// Patching completed. + public static DbServerPatchingStatus Complete { get; } = new DbServerPatchingStatus(CompleteValue); + /// Determines if two values are the same. + public static bool operator ==(DbServerPatchingStatus left, DbServerPatchingStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DbServerPatchingStatus left, DbServerPatchingStatus right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DbServerPatchingStatus(string value) => new DbServerPatchingStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DbServerPatchingStatus other && Equals(other); + /// + public bool Equals(DbServerPatchingStatus 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/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbServerProperties.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbServerProperties.Serialization.cs new file mode 100644 index 000000000000..b2002e6002ba --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbServerProperties.Serialization.cs @@ -0,0 +1,471 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + public partial class DbServerProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DbServerProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(Ocid)) + { + writer.WritePropertyName("ocid"u8); + writer.WriteStringValue(Ocid); + } + if (options.Format != "W" && Optional.IsDefined(DisplayName)) + { + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + } + if (options.Format != "W" && Optional.IsDefined(CompartmentId)) + { + writer.WritePropertyName("compartmentId"u8); + writer.WriteStringValue(CompartmentId); + } + if (options.Format != "W" && Optional.IsDefined(ExadataInfrastructureId)) + { + writer.WritePropertyName("exadataInfrastructureId"u8); + writer.WriteStringValue(ExadataInfrastructureId); + } + if (options.Format != "W" && Optional.IsDefined(CpuCoreCount)) + { + writer.WritePropertyName("cpuCoreCount"u8); + writer.WriteNumberValue(CpuCoreCount.Value); + } + if (options.Format != "W" && Optional.IsDefined(DbServerPatchingDetails)) + { + writer.WritePropertyName("dbServerPatchingDetails"u8); + writer.WriteObjectValue(DbServerPatchingDetails, options); + } + if (options.Format != "W" && Optional.IsDefined(MaxMemoryInGbs)) + { + writer.WritePropertyName("maxMemoryInGbs"u8); + writer.WriteNumberValue(MaxMemoryInGbs.Value); + } + if (options.Format != "W" && Optional.IsDefined(DbNodeStorageSizeInGbs)) + { + writer.WritePropertyName("dbNodeStorageSizeInGbs"u8); + writer.WriteNumberValue(DbNodeStorageSizeInGbs.Value); + } + if (options.Format != "W" && Optional.IsCollectionDefined(VmClusterIds)) + { + writer.WritePropertyName("vmClusterIds"u8); + writer.WriteStartArray(); + foreach (var item in VmClusterIds) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsCollectionDefined(DbNodeIds)) + { + writer.WritePropertyName("dbNodeIds"u8); + writer.WriteStartArray(); + foreach (var item in DbNodeIds) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(LifecycleDetails)) + { + writer.WritePropertyName("lifecycleDetails"u8); + writer.WriteStringValue(LifecycleDetails); + } + if (options.Format != "W" && Optional.IsDefined(LifecycleState)) + { + writer.WritePropertyName("lifecycleState"u8); + writer.WriteStringValue(LifecycleState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(MaxCpuCount)) + { + writer.WritePropertyName("maxCpuCount"u8); + writer.WriteNumberValue(MaxCpuCount.Value); + } + if (options.Format != "W" && Optional.IsCollectionDefined(AutonomousVmClusterIds)) + { + writer.WritePropertyName("autonomousVmClusterIds"u8); + writer.WriteStartArray(); + foreach (var item in AutonomousVmClusterIds) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsCollectionDefined(AutonomousVirtualMachineIds)) + { + writer.WritePropertyName("autonomousVirtualMachineIds"u8); + writer.WriteStartArray(); + foreach (var item in AutonomousVirtualMachineIds) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(MaxDbNodeStorageInGbs)) + { + writer.WritePropertyName("maxDbNodeStorageInGbs"u8); + writer.WriteNumberValue(MaxDbNodeStorageInGbs.Value); + } + if (options.Format != "W" && Optional.IsDefined(MemorySizeInGbs)) + { + writer.WritePropertyName("memorySizeInGbs"u8); + writer.WriteNumberValue(MemorySizeInGbs.Value); + } + if (options.Format != "W" && Optional.IsDefined(Shape)) + { + writer.WritePropertyName("shape"u8); + writer.WriteStringValue(Shape); + } + if (options.Format != "W" && Optional.IsDefined(TimeCreated)) + { + writer.WritePropertyName("timeCreated"u8); + writer.WriteStringValue(TimeCreated.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(ComputeModel)) + { + writer.WritePropertyName("computeModel"u8); + writer.WriteStringValue(ComputeModel.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DbServerProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DbServerProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDbServerProperties(document.RootElement, options); + } + + internal static DbServerProperties DeserializeDbServerProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string ocid = default; + string displayName = default; + string compartmentId = default; + string exadataInfrastructureId = default; + int? cpuCoreCount = default; + DbServerPatchingDetails dbServerPatchingDetails = default; + int? maxMemoryInGbs = default; + int? dbNodeStorageSizeInGbs = default; + IReadOnlyList vmClusterIds = default; + IReadOnlyList dbNodeIds = default; + string lifecycleDetails = default; + DbServerProvisioningState? lifecycleState = default; + int? maxCpuCount = default; + IReadOnlyList autonomousVmClusterIds = default; + IReadOnlyList autonomousVirtualMachineIds = default; + int? maxDbNodeStorageInGbs = default; + int? memorySizeInGbs = default; + string shape = default; + DateTimeOffset? timeCreated = default; + ResourceProvisioningState? provisioningState = default; + ComputeModel? computeModel = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("ocid"u8)) + { + ocid = property.Value.GetString(); + continue; + } + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("compartmentId"u8)) + { + compartmentId = property.Value.GetString(); + continue; + } + if (property.NameEquals("exadataInfrastructureId"u8)) + { + exadataInfrastructureId = property.Value.GetString(); + continue; + } + if (property.NameEquals("cpuCoreCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + cpuCoreCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("dbServerPatchingDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dbServerPatchingDetails = DbServerPatchingDetails.DeserializeDbServerPatchingDetails(property.Value, options); + continue; + } + if (property.NameEquals("maxMemoryInGbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + maxMemoryInGbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("dbNodeStorageSizeInGbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dbNodeStorageSizeInGbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("vmClusterIds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + vmClusterIds = array; + continue; + } + if (property.NameEquals("dbNodeIds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + dbNodeIds = array; + continue; + } + if (property.NameEquals("lifecycleDetails"u8)) + { + lifecycleDetails = property.Value.GetString(); + continue; + } + if (property.NameEquals("lifecycleState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lifecycleState = new DbServerProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("maxCpuCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + maxCpuCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("autonomousVmClusterIds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + autonomousVmClusterIds = array; + continue; + } + if (property.NameEquals("autonomousVirtualMachineIds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + autonomousVirtualMachineIds = array; + continue; + } + if (property.NameEquals("maxDbNodeStorageInGbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + maxDbNodeStorageInGbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("memorySizeInGbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + memorySizeInGbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("shape"u8)) + { + shape = property.Value.GetString(); + continue; + } + if (property.NameEquals("timeCreated"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeCreated = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new ResourceProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("computeModel"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + computeModel = new ComputeModel(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DbServerProperties( + ocid, + displayName, + compartmentId, + exadataInfrastructureId, + cpuCoreCount, + dbServerPatchingDetails, + maxMemoryInGbs, + dbNodeStorageSizeInGbs, + vmClusterIds ?? new ChangeTrackingList(), + dbNodeIds ?? new ChangeTrackingList(), + lifecycleDetails, + lifecycleState, + maxCpuCount, + autonomousVmClusterIds ?? new ChangeTrackingList(), + autonomousVirtualMachineIds ?? new ChangeTrackingList(), + maxDbNodeStorageInGbs, + memorySizeInGbs, + shape, + timeCreated, + provisioningState, + computeModel, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DbServerProperties)} does not support writing '{options.Format}' format."); + } + } + + DbServerProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDbServerProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DbServerProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbServerProperties.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbServerProperties.cs new file mode 100644 index 000000000000..920cecc9a4f2 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbServerProperties.cs @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// DbServer resource properties. + public partial class DbServerProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal DbServerProperties() + { + VmClusterIds = new ChangeTrackingList(); + DbNodeIds = new ChangeTrackingList(); + AutonomousVmClusterIds = new ChangeTrackingList(); + AutonomousVirtualMachineIds = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Db server name. + /// The name for the Db Server. + /// The OCID of the compartment. + /// The OCID of the Exadata infrastructure. + /// The number of CPU cores enabled on the Db server. + /// dbServerPatching details of the Db server. + /// The total memory available in GBs. + /// The allocated local node storage in GBs on the Db server. + /// The OCID of the VM Clusters associated with the Db server. + /// The OCID of the Db nodes associated with the Db server. + /// Lifecycle details of dbServer. + /// DbServer provisioning state. + /// The total number of CPU cores available. + /// The list of OCIDs of the Autonomous VM Clusters associated with the Db server. + /// The list of OCIDs of the Autonomous Virtual Machines associated with the Db server. + /// The total max dbNode storage in GBs. + /// The total memory size in GBs. + /// The shape of the Db server. The shape determines the amount of CPU, storage, and memory resources available. + /// The date and time that the Db Server was created. + /// Azure resource provisioning state. + /// The compute model of the Exadata Infrastructure. + /// Keeps track of any properties unknown to the library. + internal DbServerProperties(string ocid, string displayName, string compartmentId, string exadataInfrastructureId, int? cpuCoreCount, DbServerPatchingDetails dbServerPatchingDetails, int? maxMemoryInGbs, int? dbNodeStorageSizeInGbs, IReadOnlyList vmClusterIds, IReadOnlyList dbNodeIds, string lifecycleDetails, DbServerProvisioningState? lifecycleState, int? maxCpuCount, IReadOnlyList autonomousVmClusterIds, IReadOnlyList autonomousVirtualMachineIds, int? maxDbNodeStorageInGbs, int? memorySizeInGbs, string shape, DateTimeOffset? timeCreated, ResourceProvisioningState? provisioningState, ComputeModel? computeModel, IDictionary serializedAdditionalRawData) + { + Ocid = ocid; + DisplayName = displayName; + CompartmentId = compartmentId; + ExadataInfrastructureId = exadataInfrastructureId; + CpuCoreCount = cpuCoreCount; + DbServerPatchingDetails = dbServerPatchingDetails; + MaxMemoryInGbs = maxMemoryInGbs; + DbNodeStorageSizeInGbs = dbNodeStorageSizeInGbs; + VmClusterIds = vmClusterIds; + DbNodeIds = dbNodeIds; + LifecycleDetails = lifecycleDetails; + LifecycleState = lifecycleState; + MaxCpuCount = maxCpuCount; + AutonomousVmClusterIds = autonomousVmClusterIds; + AutonomousVirtualMachineIds = autonomousVirtualMachineIds; + MaxDbNodeStorageInGbs = maxDbNodeStorageInGbs; + MemorySizeInGbs = memorySizeInGbs; + Shape = shape; + TimeCreated = timeCreated; + ProvisioningState = provisioningState; + ComputeModel = computeModel; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Db server name. + public string Ocid { get; } + /// The name for the Db Server. + public string DisplayName { get; } + /// The OCID of the compartment. + public string CompartmentId { get; } + /// The OCID of the Exadata infrastructure. + public string ExadataInfrastructureId { get; } + /// The number of CPU cores enabled on the Db server. + public int? CpuCoreCount { get; } + /// dbServerPatching details of the Db server. + public DbServerPatchingDetails DbServerPatchingDetails { get; } + /// The total memory available in GBs. + public int? MaxMemoryInGbs { get; } + /// The allocated local node storage in GBs on the Db server. + public int? DbNodeStorageSizeInGbs { get; } + /// The OCID of the VM Clusters associated with the Db server. + public IReadOnlyList VmClusterIds { get; } + /// The OCID of the Db nodes associated with the Db server. + public IReadOnlyList DbNodeIds { get; } + /// Lifecycle details of dbServer. + public string LifecycleDetails { get; } + /// DbServer provisioning state. + public DbServerProvisioningState? LifecycleState { get; } + /// The total number of CPU cores available. + public int? MaxCpuCount { get; } + /// The list of OCIDs of the Autonomous VM Clusters associated with the Db server. + public IReadOnlyList AutonomousVmClusterIds { get; } + /// The list of OCIDs of the Autonomous Virtual Machines associated with the Db server. + public IReadOnlyList AutonomousVirtualMachineIds { get; } + /// The total max dbNode storage in GBs. + public int? MaxDbNodeStorageInGbs { get; } + /// The total memory size in GBs. + public int? MemorySizeInGbs { get; } + /// The shape of the Db server. The shape determines the amount of CPU, storage, and memory resources available. + public string Shape { get; } + /// The date and time that the Db Server was created. + public DateTimeOffset? TimeCreated { get; } + /// Azure resource provisioning state. + public ResourceProvisioningState? ProvisioningState { get; } + /// The compute model of the Exadata Infrastructure. + public ComputeModel? ComputeModel { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbServerProvisioningState.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbServerProvisioningState.cs new file mode 100644 index 000000000000..f1b9f10791e9 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbServerProvisioningState.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// DbServerProvisioningState enum. + public readonly partial struct DbServerProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DbServerProvisioningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string CreatingValue = "Creating"; + private const string AvailableValue = "Available"; + private const string UnavailableValue = "Unavailable"; + private const string DeletingValue = "Deleting"; + private const string DeletedValue = "Deleted"; + private const string MaintenanceInProgressValue = "MaintenanceInProgress"; + + /// Indicates that resource in Creating state. + public static DbServerProvisioningState Creating { get; } = new DbServerProvisioningState(CreatingValue); + /// Indicates that resource in Available state. + public static DbServerProvisioningState Available { get; } = new DbServerProvisioningState(AvailableValue); + /// Indicates that resource in Unavailable state. + public static DbServerProvisioningState Unavailable { get; } = new DbServerProvisioningState(UnavailableValue); + /// Indicates that resource in Deleting state. + public static DbServerProvisioningState Deleting { get; } = new DbServerProvisioningState(DeletingValue); + /// Indicates that resource in Deleted state. + public static DbServerProvisioningState Deleted { get; } = new DbServerProvisioningState(DeletedValue); + /// Indicates that resource maintenance in progress state. + public static DbServerProvisioningState MaintenanceInProgress { get; } = new DbServerProvisioningState(MaintenanceInProgressValue); + /// Determines if two values are the same. + public static bool operator ==(DbServerProvisioningState left, DbServerProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DbServerProvisioningState left, DbServerProvisioningState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DbServerProvisioningState(string value) => new DbServerProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DbServerProvisioningState other && Equals(other); + /// + public bool Equals(DbServerProvisioningState 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/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbSystemShapeListResult.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbSystemShapeListResult.Serialization.cs new file mode 100644 index 000000000000..77baf8c40300 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbSystemShapeListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + internal partial class DbSystemShapeListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DbSystemShapeListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DbSystemShapeListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DbSystemShapeListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDbSystemShapeListResult(document.RootElement, options); + } + + internal static DbSystemShapeListResult DeserializeDbSystemShapeListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DbSystemShapeData.DeserializeDbSystemShapeData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DbSystemShapeListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DbSystemShapeListResult)} does not support writing '{options.Format}' format."); + } + } + + DbSystemShapeListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDbSystemShapeListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DbSystemShapeListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbSystemShapeListResult.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbSystemShapeListResult.cs new file mode 100644 index 000000000000..ad994bcaf78b --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbSystemShapeListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// The response of a DbSystemShape list operation. + internal partial class DbSystemShapeListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The DbSystemShape items on this page. + /// is null. + internal DbSystemShapeListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The DbSystemShape items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal DbSystemShapeListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DbSystemShapeListResult() + { + } + + /// The DbSystemShape items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbSystemShapeProperties.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbSystemShapeProperties.Serialization.cs new file mode 100644 index 000000000000..ee01253b48db --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbSystemShapeProperties.Serialization.cs @@ -0,0 +1,481 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + public partial class DbSystemShapeProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DbSystemShapeProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(ShapeFamily)) + { + writer.WritePropertyName("shapeFamily"u8); + writer.WriteStringValue(ShapeFamily); + } + writer.WritePropertyName("shapeName"u8); + writer.WriteStringValue(ShapeName); + writer.WritePropertyName("availableCoreCount"u8); + writer.WriteNumberValue(AvailableCoreCount); + if (Optional.IsDefined(MinimumCoreCount)) + { + writer.WritePropertyName("minimumCoreCount"u8); + writer.WriteNumberValue(MinimumCoreCount.Value); + } + if (Optional.IsDefined(RuntimeMinimumCoreCount)) + { + writer.WritePropertyName("runtimeMinimumCoreCount"u8); + writer.WriteNumberValue(RuntimeMinimumCoreCount.Value); + } + if (Optional.IsDefined(CoreCountIncrement)) + { + writer.WritePropertyName("coreCountIncrement"u8); + writer.WriteNumberValue(CoreCountIncrement.Value); + } + if (Optional.IsDefined(MinStorageCount)) + { + writer.WritePropertyName("minStorageCount"u8); + writer.WriteNumberValue(MinStorageCount.Value); + } + if (Optional.IsDefined(MaxStorageCount)) + { + writer.WritePropertyName("maxStorageCount"u8); + writer.WriteNumberValue(MaxStorageCount.Value); + } + if (Optional.IsDefined(AvailableDataStoragePerServerInTbs)) + { + writer.WritePropertyName("availableDataStoragePerServerInTbs"u8); + writer.WriteNumberValue(AvailableDataStoragePerServerInTbs.Value); + } + if (Optional.IsDefined(AvailableMemoryPerNodeInGbs)) + { + writer.WritePropertyName("availableMemoryPerNodeInGbs"u8); + writer.WriteNumberValue(AvailableMemoryPerNodeInGbs.Value); + } + if (Optional.IsDefined(AvailableDbNodePerNodeInGbs)) + { + writer.WritePropertyName("availableDbNodePerNodeInGbs"u8); + writer.WriteNumberValue(AvailableDbNodePerNodeInGbs.Value); + } + if (Optional.IsDefined(MinCoreCountPerNode)) + { + writer.WritePropertyName("minCoreCountPerNode"u8); + writer.WriteNumberValue(MinCoreCountPerNode.Value); + } + if (Optional.IsDefined(AvailableMemoryInGbs)) + { + writer.WritePropertyName("availableMemoryInGbs"u8); + writer.WriteNumberValue(AvailableMemoryInGbs.Value); + } + if (Optional.IsDefined(MinMemoryPerNodeInGbs)) + { + writer.WritePropertyName("minMemoryPerNodeInGbs"u8); + writer.WriteNumberValue(MinMemoryPerNodeInGbs.Value); + } + if (Optional.IsDefined(AvailableDbNodeStorageInGbs)) + { + writer.WritePropertyName("availableDbNodeStorageInGbs"u8); + writer.WriteNumberValue(AvailableDbNodeStorageInGbs.Value); + } + if (Optional.IsDefined(MinDbNodeStoragePerNodeInGbs)) + { + writer.WritePropertyName("minDbNodeStoragePerNodeInGbs"u8); + writer.WriteNumberValue(MinDbNodeStoragePerNodeInGbs.Value); + } + if (Optional.IsDefined(AvailableDataStorageInTbs)) + { + writer.WritePropertyName("availableDataStorageInTbs"u8); + writer.WriteNumberValue(AvailableDataStorageInTbs.Value); + } + if (Optional.IsDefined(MinDataStorageInTbs)) + { + writer.WritePropertyName("minDataStorageInTbs"u8); + writer.WriteNumberValue(MinDataStorageInTbs.Value); + } + if (Optional.IsDefined(MinimumNodeCount)) + { + writer.WritePropertyName("minimumNodeCount"u8); + writer.WriteNumberValue(MinimumNodeCount.Value); + } + if (Optional.IsDefined(MaximumNodeCount)) + { + writer.WritePropertyName("maximumNodeCount"u8); + writer.WriteNumberValue(MaximumNodeCount.Value); + } + if (Optional.IsDefined(AvailableCoreCountPerNode)) + { + writer.WritePropertyName("availableCoreCountPerNode"u8); + writer.WriteNumberValue(AvailableCoreCountPerNode.Value); + } + if (Optional.IsDefined(ComputeModel)) + { + writer.WritePropertyName("computeModel"u8); + writer.WriteStringValue(ComputeModel.Value.ToString()); + } + if (Optional.IsDefined(AreServerTypesSupported)) + { + writer.WritePropertyName("areServerTypesSupported"u8); + writer.WriteBooleanValue(AreServerTypesSupported.Value); + } + if (Optional.IsDefined(DisplayName)) + { + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DbSystemShapeProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DbSystemShapeProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDbSystemShapeProperties(document.RootElement, options); + } + + internal static DbSystemShapeProperties DeserializeDbSystemShapeProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string shapeFamily = default; + string shapeName = default; + int availableCoreCount = default; + int? minimumCoreCount = default; + int? runtimeMinimumCoreCount = default; + int? coreCountIncrement = default; + int? minStorageCount = default; + int? maxStorageCount = default; + double? availableDataStoragePerServerInTbs = default; + int? availableMemoryPerNodeInGbs = default; + int? availableDbNodePerNodeInGbs = default; + int? minCoreCountPerNode = default; + int? availableMemoryInGbs = default; + int? minMemoryPerNodeInGbs = default; + int? availableDbNodeStorageInGbs = default; + int? minDbNodeStoragePerNodeInGbs = default; + int? availableDataStorageInTbs = default; + int? minDataStorageInTbs = default; + int? minimumNodeCount = default; + int? maximumNodeCount = default; + int? availableCoreCountPerNode = default; + ComputeModel? computeModel = default; + bool? areServerTypesSupported = default; + string displayName = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("shapeFamily"u8)) + { + shapeFamily = property.Value.GetString(); + continue; + } + if (property.NameEquals("shapeName"u8)) + { + shapeName = property.Value.GetString(); + continue; + } + if (property.NameEquals("availableCoreCount"u8)) + { + availableCoreCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("minimumCoreCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + minimumCoreCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("runtimeMinimumCoreCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + runtimeMinimumCoreCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("coreCountIncrement"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + coreCountIncrement = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("minStorageCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + minStorageCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("maxStorageCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + maxStorageCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("availableDataStoragePerServerInTbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + availableDataStoragePerServerInTbs = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("availableMemoryPerNodeInGbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + availableMemoryPerNodeInGbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("availableDbNodePerNodeInGbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + availableDbNodePerNodeInGbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("minCoreCountPerNode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + minCoreCountPerNode = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("availableMemoryInGbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + availableMemoryInGbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("minMemoryPerNodeInGbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + minMemoryPerNodeInGbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("availableDbNodeStorageInGbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + availableDbNodeStorageInGbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("minDbNodeStoragePerNodeInGbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + minDbNodeStoragePerNodeInGbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("availableDataStorageInTbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + availableDataStorageInTbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("minDataStorageInTbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + minDataStorageInTbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("minimumNodeCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + minimumNodeCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("maximumNodeCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + maximumNodeCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("availableCoreCountPerNode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + availableCoreCountPerNode = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("computeModel"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + computeModel = new ComputeModel(property.Value.GetString()); + continue; + } + if (property.NameEquals("areServerTypesSupported"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + areServerTypesSupported = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DbSystemShapeProperties( + shapeFamily, + shapeName, + availableCoreCount, + minimumCoreCount, + runtimeMinimumCoreCount, + coreCountIncrement, + minStorageCount, + maxStorageCount, + availableDataStoragePerServerInTbs, + availableMemoryPerNodeInGbs, + availableDbNodePerNodeInGbs, + minCoreCountPerNode, + availableMemoryInGbs, + minMemoryPerNodeInGbs, + availableDbNodeStorageInGbs, + minDbNodeStoragePerNodeInGbs, + availableDataStorageInTbs, + minDataStorageInTbs, + minimumNodeCount, + maximumNodeCount, + availableCoreCountPerNode, + computeModel, + areServerTypesSupported, + displayName, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DbSystemShapeProperties)} does not support writing '{options.Format}' format."); + } + } + + DbSystemShapeProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDbSystemShapeProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DbSystemShapeProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbSystemShapeProperties.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbSystemShapeProperties.cs new file mode 100644 index 000000000000..67a314077419 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DbSystemShapeProperties.cs @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// DbSystemShape resource model. + public partial class DbSystemShapeProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The shape used for the DB system. + /// The maximum number of CPU cores that can be enabled on the DB system for this shape. + /// is null. + internal DbSystemShapeProperties(string shapeName, int availableCoreCount) + { + Argument.AssertNotNull(shapeName, nameof(shapeName)); + + ShapeName = shapeName; + AvailableCoreCount = availableCoreCount; + } + + /// Initializes a new instance of . + /// The family of the shape used for the DB system. + /// The shape used for the DB system. + /// The maximum number of CPU cores that can be enabled on the DB system for this shape. + /// The minimum number of CPU cores that can be enabled on the DB system for this shape. + /// The runtime minimum number of CPU cores that can be enabled on the DB system for this shape. + /// The discrete number by which the CPU core count for this shape can be increased or decreased. + /// The minimum number of Exadata storage servers available for the Exadata infrastructure. + /// The maximum number of Exadata storage servers available for the Exadata infrastructure. + /// The maximum data storage available per storage server for this shape. Only applicable to ExaCC Elastic shapes. + /// The maximum memory available per database node for this shape. Only applicable to ExaCC Elastic shapes. + /// The maximum Db Node storage available per database node for this shape. Only applicable to ExaCC Elastic shapes. + /// The minimum number of CPU cores that can be enabled per node for this shape. + /// The maximum memory that can be enabled for this shape. + /// The minimum memory that need be allocated per node for this shape. + /// The maximum Db Node storage that can be enabled for this shape. + /// The minimum Db Node storage that need be allocated per node for this shape. + /// The maximum DATA storage that can be enabled for this shape. + /// The minimum data storage that need be allocated for this shape. + /// The minimum number of database nodes available for this shape. + /// The maximum number of database nodes available for this shape. + /// The maximum number of CPU cores per database node that can be enabled for this shape. Only applicable to the flex Exadata shape and ExaCC Elastic shapes. + /// The compute model of the Exadata Infrastructure. + /// Indicates if the shape supports database and storage server types. + /// The display name of the shape used for the DB system. + /// Keeps track of any properties unknown to the library. + internal DbSystemShapeProperties(string shapeFamily, string shapeName, int availableCoreCount, int? minimumCoreCount, int? runtimeMinimumCoreCount, int? coreCountIncrement, int? minStorageCount, int? maxStorageCount, double? availableDataStoragePerServerInTbs, int? availableMemoryPerNodeInGbs, int? availableDbNodePerNodeInGbs, int? minCoreCountPerNode, int? availableMemoryInGbs, int? minMemoryPerNodeInGbs, int? availableDbNodeStorageInGbs, int? minDbNodeStoragePerNodeInGbs, int? availableDataStorageInTbs, int? minDataStorageInTbs, int? minimumNodeCount, int? maximumNodeCount, int? availableCoreCountPerNode, ComputeModel? computeModel, bool? areServerTypesSupported, string displayName, IDictionary serializedAdditionalRawData) + { + ShapeFamily = shapeFamily; + ShapeName = shapeName; + AvailableCoreCount = availableCoreCount; + MinimumCoreCount = minimumCoreCount; + RuntimeMinimumCoreCount = runtimeMinimumCoreCount; + CoreCountIncrement = coreCountIncrement; + MinStorageCount = minStorageCount; + MaxStorageCount = maxStorageCount; + AvailableDataStoragePerServerInTbs = availableDataStoragePerServerInTbs; + AvailableMemoryPerNodeInGbs = availableMemoryPerNodeInGbs; + AvailableDbNodePerNodeInGbs = availableDbNodePerNodeInGbs; + MinCoreCountPerNode = minCoreCountPerNode; + AvailableMemoryInGbs = availableMemoryInGbs; + MinMemoryPerNodeInGbs = minMemoryPerNodeInGbs; + AvailableDbNodeStorageInGbs = availableDbNodeStorageInGbs; + MinDbNodeStoragePerNodeInGbs = minDbNodeStoragePerNodeInGbs; + AvailableDataStorageInTbs = availableDataStorageInTbs; + MinDataStorageInTbs = minDataStorageInTbs; + MinimumNodeCount = minimumNodeCount; + MaximumNodeCount = maximumNodeCount; + AvailableCoreCountPerNode = availableCoreCountPerNode; + ComputeModel = computeModel; + AreServerTypesSupported = areServerTypesSupported; + DisplayName = displayName; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DbSystemShapeProperties() + { + } + + /// The family of the shape used for the DB system. + public string ShapeFamily { get; } + /// The shape used for the DB system. + public string ShapeName { get; } + /// The maximum number of CPU cores that can be enabled on the DB system for this shape. + public int AvailableCoreCount { get; } + /// The minimum number of CPU cores that can be enabled on the DB system for this shape. + public int? MinimumCoreCount { get; } + /// The runtime minimum number of CPU cores that can be enabled on the DB system for this shape. + public int? RuntimeMinimumCoreCount { get; } + /// The discrete number by which the CPU core count for this shape can be increased or decreased. + public int? CoreCountIncrement { get; } + /// The minimum number of Exadata storage servers available for the Exadata infrastructure. + public int? MinStorageCount { get; } + /// The maximum number of Exadata storage servers available for the Exadata infrastructure. + public int? MaxStorageCount { get; } + /// The maximum data storage available per storage server for this shape. Only applicable to ExaCC Elastic shapes. + public double? AvailableDataStoragePerServerInTbs { get; } + /// The maximum memory available per database node for this shape. Only applicable to ExaCC Elastic shapes. + public int? AvailableMemoryPerNodeInGbs { get; } + /// The maximum Db Node storage available per database node for this shape. Only applicable to ExaCC Elastic shapes. + public int? AvailableDbNodePerNodeInGbs { get; } + /// The minimum number of CPU cores that can be enabled per node for this shape. + public int? MinCoreCountPerNode { get; } + /// The maximum memory that can be enabled for this shape. + public int? AvailableMemoryInGbs { get; } + /// The minimum memory that need be allocated per node for this shape. + public int? MinMemoryPerNodeInGbs { get; } + /// The maximum Db Node storage that can be enabled for this shape. + public int? AvailableDbNodeStorageInGbs { get; } + /// The minimum Db Node storage that need be allocated per node for this shape. + public int? MinDbNodeStoragePerNodeInGbs { get; } + /// The maximum DATA storage that can be enabled for this shape. + public int? AvailableDataStorageInTbs { get; } + /// The minimum data storage that need be allocated for this shape. + public int? MinDataStorageInTbs { get; } + /// The minimum number of database nodes available for this shape. + public int? MinimumNodeCount { get; } + /// The maximum number of database nodes available for this shape. + public int? MaximumNodeCount { get; } + /// The maximum number of CPU cores per database node that can be enabled for this shape. Only applicable to the flex Exadata shape and ExaCC Elastic shapes. + public int? AvailableCoreCountPerNode { get; } + /// The compute model of the Exadata Infrastructure. + public ComputeModel? ComputeModel { get; } + /// Indicates if the shape supports database and storage server types. + public bool? AreServerTypesSupported { get; } + /// The display name of the shape used for the DB system. + public string DisplayName { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DefinedFileSystemConfiguration.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DefinedFileSystemConfiguration.Serialization.cs new file mode 100644 index 000000000000..b24c087704af --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DefinedFileSystemConfiguration.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; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + public partial class DefinedFileSystemConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DefinedFileSystemConfiguration)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(IsBackupPartition)) + { + writer.WritePropertyName("isBackupPartition"u8); + writer.WriteBooleanValue(IsBackupPartition.Value); + } + if (Optional.IsDefined(IsResizable)) + { + writer.WritePropertyName("isResizable"u8); + writer.WriteBooleanValue(IsResizable.Value); + } + if (Optional.IsDefined(MinSizeGb)) + { + writer.WritePropertyName("minSizeGb"u8); + writer.WriteNumberValue(MinSizeGb.Value); + } + if (Optional.IsDefined(MountPoint)) + { + writer.WritePropertyName("mountPoint"u8); + writer.WriteStringValue(MountPoint); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DefinedFileSystemConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DefinedFileSystemConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDefinedFileSystemConfiguration(document.RootElement, options); + } + + internal static DefinedFileSystemConfiguration DeserializeDefinedFileSystemConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool? isBackupPartition = default; + bool? isResizable = default; + int? minSizeGb = default; + string mountPoint = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("isBackupPartition"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isBackupPartition = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("isResizable"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isResizable = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("minSizeGb"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + minSizeGb = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("mountPoint"u8)) + { + mountPoint = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DefinedFileSystemConfiguration(isBackupPartition, isResizable, minSizeGb, mountPoint, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DefinedFileSystemConfiguration)} does not support writing '{options.Format}' format."); + } + } + + DefinedFileSystemConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDefinedFileSystemConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DefinedFileSystemConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DefinedFileSystemConfiguration.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DefinedFileSystemConfiguration.cs new file mode 100644 index 000000000000..a1adfc28521a --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DefinedFileSystemConfiguration.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// Predefined configurations for the file system. + public partial class DefinedFileSystemConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal DefinedFileSystemConfiguration() + { + } + + /// Initializes a new instance of . + /// Checks if the data can be backed up. + /// Checks if the mount path is resizable. + /// Minimum size of mount path in Gb. + /// Mount path for the file system. + /// Keeps track of any properties unknown to the library. + internal DefinedFileSystemConfiguration(bool? isBackupPartition, bool? isResizable, int? minSizeGb, string mountPoint, IDictionary serializedAdditionalRawData) + { + IsBackupPartition = isBackupPartition; + IsResizable = isResizable; + MinSizeGb = minSizeGb; + MountPoint = mountPoint; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Checks if the data can be backed up. + public bool? IsBackupPartition { get; } + /// Checks if the mount path is resizable. + public bool? IsResizable { get; } + /// Minimum size of mount path in Gb. + public int? MinSizeGb { get; } + /// Mount path for the file system. + public string MountPoint { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DisasterRecoveryConfigurationDetails.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DisasterRecoveryConfigurationDetails.Serialization.cs new file mode 100644 index 000000000000..7afb8644cd6c --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DisasterRecoveryConfigurationDetails.Serialization.cs @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + public partial class DisasterRecoveryConfigurationDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DisasterRecoveryConfigurationDetails)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(DisasterRecoveryType)) + { + writer.WritePropertyName("disasterRecoveryType"u8); + writer.WriteStringValue(DisasterRecoveryType.Value.ToString()); + } + if (Optional.IsDefined(TimeSnapshotStandbyEnabledTill)) + { + writer.WritePropertyName("timeSnapshotStandbyEnabledTill"u8); + writer.WriteStringValue(TimeSnapshotStandbyEnabledTill.Value, "O"); + } + if (Optional.IsDefined(IsSnapshotStandby)) + { + writer.WritePropertyName("isSnapshotStandby"u8); + writer.WriteBooleanValue(IsSnapshotStandby.Value); + } + if (Optional.IsDefined(IsReplicateAutomaticBackups)) + { + writer.WritePropertyName("isReplicateAutomaticBackups"u8); + writer.WriteBooleanValue(IsReplicateAutomaticBackups.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DisasterRecoveryConfigurationDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DisasterRecoveryConfigurationDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDisasterRecoveryConfigurationDetails(document.RootElement, options); + } + + internal static DisasterRecoveryConfigurationDetails DeserializeDisasterRecoveryConfigurationDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DisasterRecoveryType? disasterRecoveryType = default; + DateTimeOffset? timeSnapshotStandbyEnabledTill = default; + bool? isSnapshotStandby = default; + bool? isReplicateAutomaticBackups = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("disasterRecoveryType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + disasterRecoveryType = new DisasterRecoveryType(property.Value.GetString()); + continue; + } + if (property.NameEquals("timeSnapshotStandbyEnabledTill"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeSnapshotStandbyEnabledTill = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("isSnapshotStandby"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isSnapshotStandby = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("isReplicateAutomaticBackups"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isReplicateAutomaticBackups = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DisasterRecoveryConfigurationDetails(disasterRecoveryType, timeSnapshotStandbyEnabledTill, isSnapshotStandby, isReplicateAutomaticBackups, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DisasterRecoveryConfigurationDetails)} does not support writing '{options.Format}' format."); + } + } + + DisasterRecoveryConfigurationDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDisasterRecoveryConfigurationDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DisasterRecoveryConfigurationDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DisasterRecoveryConfigurationDetails.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DisasterRecoveryConfigurationDetails.cs new file mode 100644 index 000000000000..c018dac97a20 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DisasterRecoveryConfigurationDetails.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// Configurations of a Disaster Recovery Details. + public partial class DisasterRecoveryConfigurationDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DisasterRecoveryConfigurationDetails() + { + } + + /// Initializes a new instance of . + /// Indicates the disaster recovery (DR) type of the Autonomous Database Serverless instance. Autonomous Data Guard (ADG) DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover. Backup-based DR type provides lower cost DR with a slower RTO during failover or switchover. + /// Time and date stored as an RFC 3339 formatted timestamp string. For example, 2022-01-01T12:00:00.000Z would set a limit for the snapshot standby to be converted back to a cross-region standby database. + /// Indicates if user wants to convert to a snapshot standby. For example, true would set a standby database to snapshot standby database. False would set a snapshot standby database back to regular standby database. + /// If true, 7 days worth of backups are replicated across regions for Cross-Region ADB or Backup-Based DR between Primary and Standby. If false, the backups taken on the Primary are not replicated to the Standby database. + /// Keeps track of any properties unknown to the library. + internal DisasterRecoveryConfigurationDetails(DisasterRecoveryType? disasterRecoveryType, DateTimeOffset? timeSnapshotStandbyEnabledTill, bool? isSnapshotStandby, bool? isReplicateAutomaticBackups, IDictionary serializedAdditionalRawData) + { + DisasterRecoveryType = disasterRecoveryType; + TimeSnapshotStandbyEnabledTill = timeSnapshotStandbyEnabledTill; + IsSnapshotStandby = isSnapshotStandby; + IsReplicateAutomaticBackups = isReplicateAutomaticBackups; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Indicates the disaster recovery (DR) type of the Autonomous Database Serverless instance. Autonomous Data Guard (ADG) DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover. Backup-based DR type provides lower cost DR with a slower RTO during failover or switchover. + public DisasterRecoveryType? DisasterRecoveryType { get; set; } + /// Time and date stored as an RFC 3339 formatted timestamp string. For example, 2022-01-01T12:00:00.000Z would set a limit for the snapshot standby to be converted back to a cross-region standby database. + public DateTimeOffset? TimeSnapshotStandbyEnabledTill { get; set; } + /// Indicates if user wants to convert to a snapshot standby. For example, true would set a standby database to snapshot standby database. False would set a snapshot standby database back to regular standby database. + public bool? IsSnapshotStandby { get; set; } + /// If true, 7 days worth of backups are replicated across regions for Cross-Region ADB or Backup-Based DR between Primary and Standby. If false, the backups taken on the Primary are not replicated to the Standby database. + public bool? IsReplicateAutomaticBackups { get; set; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DisasterRecoveryType.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DisasterRecoveryType.cs new file mode 100644 index 000000000000..62bd74879f44 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DisasterRecoveryType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// Disaster recovery type enum. + public readonly partial struct DisasterRecoveryType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DisasterRecoveryType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AdgValue = "Adg"; + private const string BackupBasedValue = "BackupBased"; + + /// ADG type. + public static DisasterRecoveryType Adg { get; } = new DisasterRecoveryType(AdgValue); + /// Backup based type. + public static DisasterRecoveryType BackupBased { get; } = new DisasterRecoveryType(BackupBasedValue); + /// Determines if two values are the same. + public static bool operator ==(DisasterRecoveryType left, DisasterRecoveryType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DisasterRecoveryType left, DisasterRecoveryType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DisasterRecoveryType(string value) => new DisasterRecoveryType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DisasterRecoveryType other && Equals(other); + /// + public bool Equals(DisasterRecoveryType 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/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DiskRedundancy.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DiskRedundancy.cs new file mode 100644 index 000000000000..3accc80212a9 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DiskRedundancy.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// Disk redundancy enum. + public readonly partial struct DiskRedundancy : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DiskRedundancy(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string HighValue = "High"; + private const string NormalValue = "Normal"; + + /// High redundancy. + public static DiskRedundancy High { get; } = new DiskRedundancy(HighValue); + /// Normal redundancy. + public static DiskRedundancy Normal { get; } = new DiskRedundancy(NormalValue); + /// Determines if two values are the same. + public static bool operator ==(DiskRedundancy left, DiskRedundancy right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DiskRedundancy left, DiskRedundancy right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DiskRedundancy(string value) => new DiskRedundancy(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DiskRedundancy other && Equals(other); + /// + public bool Equals(DiskRedundancy 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/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DnsPrivateViewListResult.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DnsPrivateViewListResult.Serialization.cs new file mode 100644 index 000000000000..6461e2072c87 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DnsPrivateViewListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + internal partial class DnsPrivateViewListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DnsPrivateViewListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DnsPrivateViewListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DnsPrivateViewListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDnsPrivateViewListResult(document.RootElement, options); + } + + internal static DnsPrivateViewListResult DeserializeDnsPrivateViewListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DnsPrivateViewData.DeserializeDnsPrivateViewData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DnsPrivateViewListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DnsPrivateViewListResult)} does not support writing '{options.Format}' format."); + } + } + + DnsPrivateViewListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDnsPrivateViewListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DnsPrivateViewListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DnsPrivateViewListResult.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DnsPrivateViewListResult.cs new file mode 100644 index 000000000000..cf4a764b5805 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DnsPrivateViewListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// The response of a DnsPrivateView list operation. + internal partial class DnsPrivateViewListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The DnsPrivateView items on this page. + /// is null. + internal DnsPrivateViewListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The DnsPrivateView items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal DnsPrivateViewListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DnsPrivateViewListResult() + { + } + + /// The DnsPrivateView items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DnsPrivateViewProperties.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DnsPrivateViewProperties.Serialization.cs new file mode 100644 index 000000000000..3b951e86cfd4 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DnsPrivateViewProperties.Serialization.cs @@ -0,0 +1,198 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + public partial class DnsPrivateViewProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DnsPrivateViewProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("ocid"u8); + writer.WriteStringValue(Ocid); + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + writer.WritePropertyName("isProtected"u8); + writer.WriteBooleanValue(IsProtected); + writer.WritePropertyName("lifecycleState"u8); + writer.WriteStringValue(LifecycleState.ToString()); + writer.WritePropertyName("self"u8); + writer.WriteStringValue(Self); + writer.WritePropertyName("timeCreated"u8); + writer.WriteStringValue(TimeCreated, "O"); + writer.WritePropertyName("timeUpdated"u8); + writer.WriteStringValue(TimeUpdated, "O"); + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DnsPrivateViewProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DnsPrivateViewProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDnsPrivateViewProperties(document.RootElement, options); + } + + internal static DnsPrivateViewProperties DeserializeDnsPrivateViewProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string ocid = default; + string displayName = default; + bool isProtected = default; + DnsPrivateViewsLifecycleState lifecycleState = default; + string self = default; + DateTimeOffset timeCreated = default; + DateTimeOffset timeUpdated = default; + ResourceProvisioningState? provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("ocid"u8)) + { + ocid = property.Value.GetString(); + continue; + } + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("isProtected"u8)) + { + isProtected = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("lifecycleState"u8)) + { + lifecycleState = new DnsPrivateViewsLifecycleState(property.Value.GetString()); + continue; + } + if (property.NameEquals("self"u8)) + { + self = property.Value.GetString(); + continue; + } + if (property.NameEquals("timeCreated"u8)) + { + timeCreated = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("timeUpdated"u8)) + { + timeUpdated = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new ResourceProvisioningState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DnsPrivateViewProperties( + ocid, + displayName, + isProtected, + lifecycleState, + self, + timeCreated, + timeUpdated, + provisioningState, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DnsPrivateViewProperties)} does not support writing '{options.Format}' format."); + } + } + + DnsPrivateViewProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDnsPrivateViewProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DnsPrivateViewProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DnsPrivateViewProperties.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DnsPrivateViewProperties.cs new file mode 100644 index 000000000000..b7ec5205e39e --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DnsPrivateViewProperties.cs @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// Views resource model. + public partial class DnsPrivateViewProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The OCID of the view. + /// The display name of the view resource. + /// A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed. + /// Views lifecycleState. + /// The canonical absolute URL of the resource. + /// views timeCreated. + /// views timeCreated. + /// , or is null. + internal DnsPrivateViewProperties(string ocid, string displayName, bool isProtected, DnsPrivateViewsLifecycleState lifecycleState, string self, DateTimeOffset timeCreated, DateTimeOffset timeUpdated) + { + Argument.AssertNotNull(ocid, nameof(ocid)); + Argument.AssertNotNull(displayName, nameof(displayName)); + Argument.AssertNotNull(self, nameof(self)); + + Ocid = ocid; + DisplayName = displayName; + IsProtected = isProtected; + LifecycleState = lifecycleState; + Self = self; + TimeCreated = timeCreated; + TimeUpdated = timeUpdated; + } + + /// Initializes a new instance of . + /// The OCID of the view. + /// The display name of the view resource. + /// A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed. + /// Views lifecycleState. + /// The canonical absolute URL of the resource. + /// views timeCreated. + /// views timeCreated. + /// Azure resource provisioning state. + /// Keeps track of any properties unknown to the library. + internal DnsPrivateViewProperties(string ocid, string displayName, bool isProtected, DnsPrivateViewsLifecycleState lifecycleState, string self, DateTimeOffset timeCreated, DateTimeOffset timeUpdated, ResourceProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) + { + Ocid = ocid; + DisplayName = displayName; + IsProtected = isProtected; + LifecycleState = lifecycleState; + Self = self; + TimeCreated = timeCreated; + TimeUpdated = timeUpdated; + ProvisioningState = provisioningState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DnsPrivateViewProperties() + { + } + + /// The OCID of the view. + public string Ocid { get; } + /// The display name of the view resource. + public string DisplayName { get; } + /// A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed. + public bool IsProtected { get; } + /// Views lifecycleState. + public DnsPrivateViewsLifecycleState LifecycleState { get; } + /// The canonical absolute URL of the resource. + public string Self { get; } + /// views timeCreated. + public DateTimeOffset TimeCreated { get; } + /// views timeCreated. + public DateTimeOffset TimeUpdated { get; } + /// Azure resource provisioning state. + public ResourceProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DnsPrivateViewsLifecycleState.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DnsPrivateViewsLifecycleState.cs new file mode 100644 index 000000000000..e77805dc5bc5 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DnsPrivateViewsLifecycleState.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// DNS Private Views lifecycle state enum. + public readonly partial struct DnsPrivateViewsLifecycleState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DnsPrivateViewsLifecycleState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ActiveValue = "Active"; + private const string DeletedValue = "Deleted"; + private const string DeletingValue = "Deleting"; + private const string UpdatingValue = "Updating"; + + /// DNS Private View is active. + public static DnsPrivateViewsLifecycleState Active { get; } = new DnsPrivateViewsLifecycleState(ActiveValue); + /// DNS Private View is deleted. + public static DnsPrivateViewsLifecycleState Deleted { get; } = new DnsPrivateViewsLifecycleState(DeletedValue); + /// DNS Private View is deleting. + public static DnsPrivateViewsLifecycleState Deleting { get; } = new DnsPrivateViewsLifecycleState(DeletingValue); + /// DNS Private View is updating. + public static DnsPrivateViewsLifecycleState Updating { get; } = new DnsPrivateViewsLifecycleState(UpdatingValue); + /// Determines if two values are the same. + public static bool operator ==(DnsPrivateViewsLifecycleState left, DnsPrivateViewsLifecycleState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DnsPrivateViewsLifecycleState left, DnsPrivateViewsLifecycleState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DnsPrivateViewsLifecycleState(string value) => new DnsPrivateViewsLifecycleState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DnsPrivateViewsLifecycleState other && Equals(other); + /// + public bool Equals(DnsPrivateViewsLifecycleState 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/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DnsPrivateZoneListResult.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DnsPrivateZoneListResult.Serialization.cs new file mode 100644 index 000000000000..1912ce22c6e1 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DnsPrivateZoneListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + internal partial class DnsPrivateZoneListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DnsPrivateZoneListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DnsPrivateZoneListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DnsPrivateZoneListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDnsPrivateZoneListResult(document.RootElement, options); + } + + internal static DnsPrivateZoneListResult DeserializeDnsPrivateZoneListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DnsPrivateZoneData.DeserializeDnsPrivateZoneData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DnsPrivateZoneListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DnsPrivateZoneListResult)} does not support writing '{options.Format}' format."); + } + } + + DnsPrivateZoneListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDnsPrivateZoneListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DnsPrivateZoneListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DnsPrivateZoneListResult.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DnsPrivateZoneListResult.cs new file mode 100644 index 000000000000..8036ede88683 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DnsPrivateZoneListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// The response of a DnsPrivateZone list operation. + internal partial class DnsPrivateZoneListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The DnsPrivateZone items on this page. + /// is null. + internal DnsPrivateZoneListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The DnsPrivateZone items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal DnsPrivateZoneListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DnsPrivateZoneListResult() + { + } + + /// The DnsPrivateZone items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DnsPrivateZoneProperties.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DnsPrivateZoneProperties.Serialization.cs new file mode 100644 index 000000000000..75e860acc0ed --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DnsPrivateZoneProperties.Serialization.cs @@ -0,0 +1,219 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + public partial class DnsPrivateZoneProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DnsPrivateZoneProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("ocid"u8); + writer.WriteStringValue(Ocid); + writer.WritePropertyName("isProtected"u8); + writer.WriteBooleanValue(IsProtected); + writer.WritePropertyName("lifecycleState"u8); + writer.WriteStringValue(LifecycleState.ToString()); + writer.WritePropertyName("self"u8); + writer.WriteStringValue(Self); + writer.WritePropertyName("serial"u8); + writer.WriteNumberValue(Serial); + writer.WritePropertyName("version"u8); + writer.WriteStringValue(Version); + if (Optional.IsDefined(ViewId)) + { + writer.WritePropertyName("viewId"u8); + writer.WriteStringValue(ViewId); + } + writer.WritePropertyName("zoneType"u8); + writer.WriteStringValue(ZoneType.ToString()); + writer.WritePropertyName("timeCreated"u8); + writer.WriteStringValue(TimeCreated, "O"); + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DnsPrivateZoneProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DnsPrivateZoneProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDnsPrivateZoneProperties(document.RootElement, options); + } + + internal static DnsPrivateZoneProperties DeserializeDnsPrivateZoneProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string ocid = default; + bool isProtected = default; + DnsPrivateZonesLifecycleState lifecycleState = default; + string self = default; + int serial = default; + string version = default; + string viewId = default; + ZoneType zoneType = default; + DateTimeOffset timeCreated = default; + ResourceProvisioningState? provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("ocid"u8)) + { + ocid = property.Value.GetString(); + continue; + } + if (property.NameEquals("isProtected"u8)) + { + isProtected = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("lifecycleState"u8)) + { + lifecycleState = new DnsPrivateZonesLifecycleState(property.Value.GetString()); + continue; + } + if (property.NameEquals("self"u8)) + { + self = property.Value.GetString(); + continue; + } + if (property.NameEquals("serial"u8)) + { + serial = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("version"u8)) + { + version = property.Value.GetString(); + continue; + } + if (property.NameEquals("viewId"u8)) + { + viewId = property.Value.GetString(); + continue; + } + if (property.NameEquals("zoneType"u8)) + { + zoneType = new ZoneType(property.Value.GetString()); + continue; + } + if (property.NameEquals("timeCreated"u8)) + { + timeCreated = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new ResourceProvisioningState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DnsPrivateZoneProperties( + ocid, + isProtected, + lifecycleState, + self, + serial, + version, + viewId, + zoneType, + timeCreated, + provisioningState, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DnsPrivateZoneProperties)} does not support writing '{options.Format}' format."); + } + } + + DnsPrivateZoneProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDnsPrivateZoneProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DnsPrivateZoneProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DnsPrivateZoneProperties.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DnsPrivateZoneProperties.cs new file mode 100644 index 000000000000..339772cb70ce --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DnsPrivateZoneProperties.cs @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// Zones resource model. + public partial class DnsPrivateZoneProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The OCID of the Zone. + /// A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed. + /// Zones lifecycleState. + /// The canonical absolute URL of the resource. + /// The current serial of the zone. As seen in the zone's SOA record. + /// Version is the never-repeating, totally-orderable, version of the zone, from which the serial field of the zone's SOA record is derived. + /// The type of the zone. Must be either PRIMARY or SECONDARY. SECONDARY is only supported for GLOBAL zones. + /// Zones timeCreated. + /// , or is null. + internal DnsPrivateZoneProperties(string ocid, bool isProtected, DnsPrivateZonesLifecycleState lifecycleState, string self, int serial, string version, ZoneType zoneType, DateTimeOffset timeCreated) + { + Argument.AssertNotNull(ocid, nameof(ocid)); + Argument.AssertNotNull(self, nameof(self)); + Argument.AssertNotNull(version, nameof(version)); + + Ocid = ocid; + IsProtected = isProtected; + LifecycleState = lifecycleState; + Self = self; + Serial = serial; + Version = version; + ZoneType = zoneType; + TimeCreated = timeCreated; + } + + /// Initializes a new instance of . + /// The OCID of the Zone. + /// A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed. + /// Zones lifecycleState. + /// The canonical absolute URL of the resource. + /// The current serial of the zone. As seen in the zone's SOA record. + /// Version is the never-repeating, totally-orderable, version of the zone, from which the serial field of the zone's SOA record is derived. + /// The OCID of the private view containing the zone. This value will be null for zones in the global DNS, which are publicly resolvable and not part of a private view. + /// The type of the zone. Must be either PRIMARY or SECONDARY. SECONDARY is only supported for GLOBAL zones. + /// Zones timeCreated. + /// Azure resource provisioning state. + /// Keeps track of any properties unknown to the library. + internal DnsPrivateZoneProperties(string ocid, bool isProtected, DnsPrivateZonesLifecycleState lifecycleState, string self, int serial, string version, string viewId, ZoneType zoneType, DateTimeOffset timeCreated, ResourceProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) + { + Ocid = ocid; + IsProtected = isProtected; + LifecycleState = lifecycleState; + Self = self; + Serial = serial; + Version = version; + ViewId = viewId; + ZoneType = zoneType; + TimeCreated = timeCreated; + ProvisioningState = provisioningState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DnsPrivateZoneProperties() + { + } + + /// The OCID of the Zone. + public string Ocid { get; } + /// A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed. + public bool IsProtected { get; } + /// Zones lifecycleState. + public DnsPrivateZonesLifecycleState LifecycleState { get; } + /// The canonical absolute URL of the resource. + public string Self { get; } + /// The current serial of the zone. As seen in the zone's SOA record. + public int Serial { get; } + /// Version is the never-repeating, totally-orderable, version of the zone, from which the serial field of the zone's SOA record is derived. + public string Version { get; } + /// The OCID of the private view containing the zone. This value will be null for zones in the global DNS, which are publicly resolvable and not part of a private view. + public string ViewId { get; } + /// The type of the zone. Must be either PRIMARY or SECONDARY. SECONDARY is only supported for GLOBAL zones. + public ZoneType ZoneType { get; } + /// Zones timeCreated. + public DateTimeOffset TimeCreated { get; } + /// Azure resource provisioning state. + public ResourceProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DnsPrivateZonesLifecycleState.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DnsPrivateZonesLifecycleState.cs new file mode 100644 index 000000000000..278c8841d282 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DnsPrivateZonesLifecycleState.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// DNS Private Zones lifecycle state enum. + public readonly partial struct DnsPrivateZonesLifecycleState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DnsPrivateZonesLifecycleState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ActiveValue = "Active"; + private const string CreatingValue = "Creating"; + private const string DeletedValue = "Deleted"; + private const string DeletingValue = "Deleting"; + private const string UpdatingValue = "Updating"; + + /// DNS Private Zones is active. + public static DnsPrivateZonesLifecycleState Active { get; } = new DnsPrivateZonesLifecycleState(ActiveValue); + /// DNS Private Zones is creating. + public static DnsPrivateZonesLifecycleState Creating { get; } = new DnsPrivateZonesLifecycleState(CreatingValue); + /// DNS Private Zones is deleted. + public static DnsPrivateZonesLifecycleState Deleted { get; } = new DnsPrivateZonesLifecycleState(DeletedValue); + /// DNS Private Zones is deleting. + public static DnsPrivateZonesLifecycleState Deleting { get; } = new DnsPrivateZonesLifecycleState(DeletingValue); + /// DNS Private Zones is updating. + public static DnsPrivateZonesLifecycleState Updating { get; } = new DnsPrivateZonesLifecycleState(UpdatingValue); + /// Determines if two values are the same. + public static bool operator ==(DnsPrivateZonesLifecycleState left, DnsPrivateZonesLifecycleState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DnsPrivateZonesLifecycleState left, DnsPrivateZonesLifecycleState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DnsPrivateZonesLifecycleState(string value) => new DnsPrivateZonesLifecycleState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DnsPrivateZonesLifecycleState other && Equals(other); + /// + public bool Equals(DnsPrivateZonesLifecycleState 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/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/EstimatedPatchingTime.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/EstimatedPatchingTime.Serialization.cs new file mode 100644 index 000000000000..125ffb32b7f7 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/EstimatedPatchingTime.Serialization.cs @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + public partial class EstimatedPatchingTime : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EstimatedPatchingTime)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(EstimatedDbServerPatchingTime)) + { + writer.WritePropertyName("estimatedDbServerPatchingTime"u8); + writer.WriteNumberValue(EstimatedDbServerPatchingTime.Value); + } + if (options.Format != "W" && Optional.IsDefined(EstimatedNetworkSwitchesPatchingTime)) + { + writer.WritePropertyName("estimatedNetworkSwitchesPatchingTime"u8); + writer.WriteNumberValue(EstimatedNetworkSwitchesPatchingTime.Value); + } + if (options.Format != "W" && Optional.IsDefined(EstimatedStorageServerPatchingTime)) + { + writer.WritePropertyName("estimatedStorageServerPatchingTime"u8); + writer.WriteNumberValue(EstimatedStorageServerPatchingTime.Value); + } + if (options.Format != "W" && Optional.IsDefined(TotalEstimatedPatchingTime)) + { + writer.WritePropertyName("totalEstimatedPatchingTime"u8); + writer.WriteNumberValue(TotalEstimatedPatchingTime.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + EstimatedPatchingTime IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EstimatedPatchingTime)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEstimatedPatchingTime(document.RootElement, options); + } + + internal static EstimatedPatchingTime DeserializeEstimatedPatchingTime(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int? estimatedDbServerPatchingTime = default; + int? estimatedNetworkSwitchesPatchingTime = default; + int? estimatedStorageServerPatchingTime = default; + int? totalEstimatedPatchingTime = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("estimatedDbServerPatchingTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + estimatedDbServerPatchingTime = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("estimatedNetworkSwitchesPatchingTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + estimatedNetworkSwitchesPatchingTime = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("estimatedStorageServerPatchingTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + estimatedStorageServerPatchingTime = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("totalEstimatedPatchingTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + totalEstimatedPatchingTime = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EstimatedPatchingTime(estimatedDbServerPatchingTime, estimatedNetworkSwitchesPatchingTime, estimatedStorageServerPatchingTime, totalEstimatedPatchingTime, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(EstimatedPatchingTime)} does not support writing '{options.Format}' format."); + } + } + + EstimatedPatchingTime IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeEstimatedPatchingTime(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EstimatedPatchingTime)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/EstimatedPatchingTime.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/EstimatedPatchingTime.cs new file mode 100644 index 000000000000..2d90672508c1 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/EstimatedPatchingTime.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// The estimated total time required in minutes for all patching operations (database server, storage server, and network switch patching). + public partial class EstimatedPatchingTime + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal EstimatedPatchingTime() + { + } + + /// Initializes a new instance of . + /// The estimated time required in minutes for database server patching. + /// The estimated time required in minutes for network switch patching. + /// The estimated time required in minutes for storage server patching. + /// The estimated total time required in minutes for all patching operations. + /// Keeps track of any properties unknown to the library. + internal EstimatedPatchingTime(int? estimatedDbServerPatchingTime, int? estimatedNetworkSwitchesPatchingTime, int? estimatedStorageServerPatchingTime, int? totalEstimatedPatchingTime, IDictionary serializedAdditionalRawData) + { + EstimatedDbServerPatchingTime = estimatedDbServerPatchingTime; + EstimatedNetworkSwitchesPatchingTime = estimatedNetworkSwitchesPatchingTime; + EstimatedStorageServerPatchingTime = estimatedStorageServerPatchingTime; + TotalEstimatedPatchingTime = totalEstimatedPatchingTime; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The estimated time required in minutes for database server patching. + public int? EstimatedDbServerPatchingTime { get; } + /// The estimated time required in minutes for network switch patching. + public int? EstimatedNetworkSwitchesPatchingTime { get; } + /// The estimated time required in minutes for storage server patching. + public int? EstimatedStorageServerPatchingTime { get; } + /// The estimated total time required in minutes for all patching operations. + public int? TotalEstimatedPatchingTime { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExadataIormConfig.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExadataIormConfig.Serialization.cs new file mode 100644 index 000000000000..07ffc66d4730 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExadataIormConfig.Serialization.cs @@ -0,0 +1,184 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + public partial class ExadataIormConfig : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExadataIormConfig)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(DbPlans)) + { + writer.WritePropertyName("dbPlans"u8); + writer.WriteStartArray(); + foreach (var item in DbPlans) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(LifecycleDetails)) + { + writer.WritePropertyName("lifecycleDetails"u8); + writer.WriteStringValue(LifecycleDetails); + } + if (Optional.IsDefined(LifecycleState)) + { + writer.WritePropertyName("lifecycleState"u8); + writer.WriteStringValue(LifecycleState.Value.ToString()); + } + if (Optional.IsDefined(Objective)) + { + writer.WritePropertyName("objective"u8); + writer.WriteStringValue(Objective.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ExadataIormConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExadataIormConfig)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExadataIormConfig(document.RootElement, options); + } + + internal static ExadataIormConfig DeserializeExadataIormConfig(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList dbPlans = default; + string lifecycleDetails = default; + IormLifecycleState? lifecycleState = default; + Objective? objective = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("dbPlans"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DbIormConfig.DeserializeDbIormConfig(item, options)); + } + dbPlans = array; + continue; + } + if (property.NameEquals("lifecycleDetails"u8)) + { + lifecycleDetails = property.Value.GetString(); + continue; + } + if (property.NameEquals("lifecycleState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lifecycleState = new IormLifecycleState(property.Value.GetString()); + continue; + } + if (property.NameEquals("objective"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + objective = new Objective(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExadataIormConfig(dbPlans ?? new ChangeTrackingList(), lifecycleDetails, lifecycleState, objective, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExadataIormConfig)} does not support writing '{options.Format}' format."); + } + } + + ExadataIormConfig IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeExadataIormConfig(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExadataIormConfig)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExadataIormConfig.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExadataIormConfig.cs new file mode 100644 index 000000000000..7589ab690c9e --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExadataIormConfig.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// ExadataIormConfig for cloud vm cluster. + public partial class ExadataIormConfig + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal ExadataIormConfig() + { + DbPlans = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// An array of IORM settings for all the database in the Exadata DB system. + /// Additional information about the current lifecycleState. + /// The current state of IORM configuration for the Exadata DB system. + /// The current value for the IORM objective. The default is AUTO. + /// Keeps track of any properties unknown to the library. + internal ExadataIormConfig(IReadOnlyList dbPlans, string lifecycleDetails, IormLifecycleState? lifecycleState, Objective? objective, IDictionary serializedAdditionalRawData) + { + DbPlans = dbPlans; + LifecycleDetails = lifecycleDetails; + LifecycleState = lifecycleState; + Objective = objective; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// An array of IORM settings for all the database in the Exadata DB system. + public IReadOnlyList DbPlans { get; } + /// Additional information about the current lifecycleState. + public string LifecycleDetails { get; } + /// The current state of IORM configuration for the Exadata DB system. + public IormLifecycleState? LifecycleState { get; } + /// The current value for the IORM objective. The default is AUTO. + public Objective? Objective { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExadbVmClusterLifecycleState.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExadbVmClusterLifecycleState.cs new file mode 100644 index 000000000000..e8ea2cb028ed --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExadbVmClusterLifecycleState.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// Exadata VM cluster on Exascale Infrastructure lifecycle state enum. + public readonly partial struct ExadbVmClusterLifecycleState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ExadbVmClusterLifecycleState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ProvisioningValue = "Provisioning"; + private const string AvailableValue = "Available"; + private const string UpdatingValue = "Updating"; + private const string TerminatingValue = "Terminating"; + private const string TerminatedValue = "Terminated"; + private const string MaintenanceInProgressValue = "MaintenanceInProgress"; + private const string FailedValue = "Failed"; + + /// Indicates that resource in Provisioning state. + public static ExadbVmClusterLifecycleState Provisioning { get; } = new ExadbVmClusterLifecycleState(ProvisioningValue); + /// Indicates that resource in Available state. + public static ExadbVmClusterLifecycleState Available { get; } = new ExadbVmClusterLifecycleState(AvailableValue); + /// Indicates that resource in Updating state. + public static ExadbVmClusterLifecycleState Updating { get; } = new ExadbVmClusterLifecycleState(UpdatingValue); + /// Indicates that resource in Terminating state. + public static ExadbVmClusterLifecycleState Terminating { get; } = new ExadbVmClusterLifecycleState(TerminatingValue); + /// Indicates that resource in Terminated state. + public static ExadbVmClusterLifecycleState Terminated { get; } = new ExadbVmClusterLifecycleState(TerminatedValue); + /// Indicates that resource Maintenance in progress state. + public static ExadbVmClusterLifecycleState MaintenanceInProgress { get; } = new ExadbVmClusterLifecycleState(MaintenanceInProgressValue); + /// Indicates that resource in Failed state. + public static ExadbVmClusterLifecycleState Failed { get; } = new ExadbVmClusterLifecycleState(FailedValue); + /// Determines if two values are the same. + public static bool operator ==(ExadbVmClusterLifecycleState left, ExadbVmClusterLifecycleState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ExadbVmClusterLifecycleState left, ExadbVmClusterLifecycleState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ExadbVmClusterLifecycleState(string value) => new ExadbVmClusterLifecycleState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ExadbVmClusterLifecycleState other && Equals(other); + /// + public bool Equals(ExadbVmClusterLifecycleState 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/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExadbVmClusterListResult.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExadbVmClusterListResult.Serialization.cs new file mode 100644 index 000000000000..9a7fd7cd393d --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExadbVmClusterListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + internal partial class ExadbVmClusterListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExadbVmClusterListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ExadbVmClusterListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExadbVmClusterListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExadbVmClusterListResult(document.RootElement, options); + } + + internal static ExadbVmClusterListResult DeserializeExadbVmClusterListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ExadbVmClusterData.DeserializeExadbVmClusterData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExadbVmClusterListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExadbVmClusterListResult)} does not support writing '{options.Format}' format."); + } + } + + ExadbVmClusterListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeExadbVmClusterListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExadbVmClusterListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExadbVmClusterListResult.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExadbVmClusterListResult.cs new file mode 100644 index 000000000000..0b76d8b494a5 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExadbVmClusterListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// The response of a ExadbVmCluster list operation. + internal partial class ExadbVmClusterListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The ExadbVmCluster items on this page. + /// is null. + internal ExadbVmClusterListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The ExadbVmCluster items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal ExadbVmClusterListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ExadbVmClusterListResult() + { + } + + /// The ExadbVmCluster items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExadbVmClusterPatch.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExadbVmClusterPatch.Serialization.cs new file mode 100644 index 000000000000..7d4c2ebd7bd6 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExadbVmClusterPatch.Serialization.cs @@ -0,0 +1,184 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + public partial class ExadbVmClusterPatch : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExadbVmClusterPatch)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(Zones)) + { + writer.WritePropertyName("zones"u8); + writer.WriteStartArray(); + foreach (var item in Zones) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ExadbVmClusterPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExadbVmClusterPatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExadbVmClusterPatch(document.RootElement, options); + } + + internal static ExadbVmClusterPatch DeserializeExadbVmClusterPatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList zones = default; + IDictionary tags = default; + ExadbVmClusterUpdateProperties properties = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("zones"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + zones = array; + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = ExadbVmClusterUpdateProperties.DeserializeExadbVmClusterUpdateProperties(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExadbVmClusterPatch(zones ?? new ChangeTrackingList(), tags ?? new ChangeTrackingDictionary(), properties, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExadbVmClusterPatch)} does not support writing '{options.Format}' format."); + } + } + + ExadbVmClusterPatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeExadbVmClusterPatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExadbVmClusterPatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExadbVmClusterPatch.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExadbVmClusterPatch.cs new file mode 100644 index 000000000000..7519852ffaf6 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExadbVmClusterPatch.cs @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// The type used for update operations of the ExadbVmCluster. + public partial class ExadbVmClusterPatch + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ExadbVmClusterPatch() + { + Zones = new ChangeTrackingList(); + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// The availability zones. + /// Resource tags. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal ExadbVmClusterPatch(IList zones, IDictionary tags, ExadbVmClusterUpdateProperties properties, IDictionary serializedAdditionalRawData) + { + Zones = zones; + Tags = tags; + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The availability zones. + public IList Zones { get; } + /// Resource tags. + public IDictionary Tags { get; } + /// The resource-specific properties for this resource. + internal ExadbVmClusterUpdateProperties Properties { get; set; } + /// The number of nodes in the Exadata VM cluster on Exascale Infrastructure. + public int? ExadbVmClusterUpdateNodeCount + { + get => Properties is null ? default : Properties.NodeCount; + set + { + if (Properties is null) + Properties = new ExadbVmClusterUpdateProperties(); + Properties.NodeCount = value; + } + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExadbVmClusterProperties.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExadbVmClusterProperties.Serialization.cs new file mode 100644 index 000000000000..b49be826e241 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExadbVmClusterProperties.Serialization.cs @@ -0,0 +1,710 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + public partial class ExadbVmClusterProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExadbVmClusterProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(Ocid)) + { + writer.WritePropertyName("ocid"u8); + writer.WriteStringValue(Ocid); + } + if (Optional.IsDefined(ClusterName)) + { + writer.WritePropertyName("clusterName"u8); + writer.WriteStringValue(ClusterName); + } + if (Optional.IsDefined(BackupSubnetCidr)) + { + writer.WritePropertyName("backupSubnetCidr"u8); + writer.WriteStringValue(BackupSubnetCidr); + } + if (options.Format != "W" && Optional.IsDefined(NsgUri)) + { + writer.WritePropertyName("nsgUrl"u8); + writer.WriteStringValue(NsgUri.AbsoluteUri); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(LifecycleState)) + { + writer.WritePropertyName("lifecycleState"u8); + writer.WriteStringValue(LifecycleState.Value.ToString()); + } + writer.WritePropertyName("vnetId"u8); + writer.WriteStringValue(VnetId); + writer.WritePropertyName("subnetId"u8); + writer.WriteStringValue(SubnetId); + if (Optional.IsDefined(DataCollectionOptions)) + { + writer.WritePropertyName("dataCollectionOptions"u8); + writer.WriteObjectValue(DataCollectionOptions, options); + } + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + if (Optional.IsDefined(Domain)) + { + writer.WritePropertyName("domain"u8); + writer.WriteStringValue(Domain); + } + writer.WritePropertyName("enabledEcpuCount"u8); + writer.WriteNumberValue(EnabledEcpuCount); + writer.WritePropertyName("exascaleDbStorageVaultId"u8); + writer.WriteStringValue(ExascaleDbStorageVaultId); + if (Optional.IsDefined(GridImageOcid)) + { + writer.WritePropertyName("gridImageOcid"u8); + writer.WriteStringValue(GridImageOcid); + } + if (options.Format != "W" && Optional.IsDefined(GridImageType)) + { + writer.WritePropertyName("gridImageType"u8); + writer.WriteStringValue(GridImageType.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(GiVersion)) + { + writer.WritePropertyName("giVersion"u8); + writer.WriteStringValue(GiVersion); + } + writer.WritePropertyName("hostname"u8); + writer.WriteStringValue(Hostname); + if (Optional.IsDefined(LicenseModel)) + { + writer.WritePropertyName("licenseModel"u8); + writer.WriteStringValue(LicenseModel.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(MemorySizeInGbs)) + { + writer.WritePropertyName("memorySizeInGbs"u8); + writer.WriteNumberValue(MemorySizeInGbs.Value); + } + writer.WritePropertyName("nodeCount"u8); + writer.WriteNumberValue(NodeCount); + if (Optional.IsCollectionDefined(NsgCidrs)) + { + writer.WritePropertyName("nsgCidrs"u8); + writer.WriteStartArray(); + foreach (var item in NsgCidrs) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(ZoneOcid)) + { + writer.WritePropertyName("zoneOcid"u8); + writer.WriteStringValue(ZoneOcid); + } + if (Optional.IsDefined(PrivateZoneOcid)) + { + writer.WritePropertyName("privateZoneOcid"u8); + writer.WriteStringValue(PrivateZoneOcid); + } + if (Optional.IsDefined(ScanListenerPortTcp)) + { + writer.WritePropertyName("scanListenerPortTcp"u8); + writer.WriteNumberValue(ScanListenerPortTcp.Value); + } + if (Optional.IsDefined(ScanListenerPortTcpSsl)) + { + writer.WritePropertyName("scanListenerPortTcpSsl"u8); + writer.WriteNumberValue(ScanListenerPortTcpSsl.Value); + } + if (options.Format != "W" && Optional.IsDefined(ListenerPort)) + { + writer.WritePropertyName("listenerPort"u8); + writer.WriteNumberValue(ListenerPort.Value); + } + writer.WritePropertyName("shape"u8); + writer.WriteStringValue(Shape); + writer.WritePropertyName("sshPublicKeys"u8); + writer.WriteStartArray(); + foreach (var item in SshPublicKeys) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + if (Optional.IsDefined(SystemVersion)) + { + writer.WritePropertyName("systemVersion"u8); + writer.WriteStringValue(SystemVersion); + } + if (Optional.IsDefined(TimeZone)) + { + writer.WritePropertyName("timeZone"u8); + writer.WriteStringValue(TimeZone); + } + writer.WritePropertyName("totalEcpuCount"u8); + writer.WriteNumberValue(TotalEcpuCount); + writer.WritePropertyName("vmFileSystemStorage"u8); + writer.WriteObjectValue(VmFileSystemStorage, options); + if (options.Format != "W" && Optional.IsDefined(LifecycleDetails)) + { + writer.WritePropertyName("lifecycleDetails"u8); + writer.WriteStringValue(LifecycleDetails); + } + if (options.Format != "W" && Optional.IsDefined(ScanDnsName)) + { + writer.WritePropertyName("scanDnsName"u8); + writer.WriteStringValue(ScanDnsName); + } + if (options.Format != "W" && Optional.IsCollectionDefined(ScanIPIds)) + { + writer.WritePropertyName("scanIpIds"u8); + writer.WriteStartArray(); + foreach (var item in ScanIPIds) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(ScanDnsRecordId)) + { + writer.WritePropertyName("scanDnsRecordId"u8); + writer.WriteStringValue(ScanDnsRecordId); + } + if (options.Format != "W" && Optional.IsDefined(SnapshotFileSystemStorage)) + { + writer.WritePropertyName("snapshotFileSystemStorage"u8); + writer.WriteObjectValue(SnapshotFileSystemStorage, options); + } + if (options.Format != "W" && Optional.IsDefined(TotalFileSystemStorage)) + { + writer.WritePropertyName("totalFileSystemStorage"u8); + writer.WriteObjectValue(TotalFileSystemStorage, options); + } + if (options.Format != "W" && Optional.IsCollectionDefined(VipIds)) + { + writer.WritePropertyName("vipIds"u8); + writer.WriteStartArray(); + foreach (var item in VipIds) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(OciUri)) + { + writer.WritePropertyName("ociUrl"u8); + writer.WriteStringValue(OciUri.AbsoluteUri); + } + if (options.Format != "W" && Optional.IsDefined(IormConfigCache)) + { + writer.WritePropertyName("iormConfigCache"u8); + writer.WriteObjectValue(IormConfigCache, options); + } + if (options.Format != "W" && Optional.IsDefined(BackupSubnetOcid)) + { + writer.WritePropertyName("backupSubnetOcid"u8); + writer.WriteStringValue(BackupSubnetOcid); + } + if (options.Format != "W" && Optional.IsDefined(SubnetOcid)) + { + writer.WritePropertyName("subnetOcid"u8); + writer.WriteStringValue(SubnetOcid); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ExadbVmClusterProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExadbVmClusterProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExadbVmClusterProperties(document.RootElement, options); + } + + internal static ExadbVmClusterProperties DeserializeExadbVmClusterProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string ocid = default; + string clusterName = default; + string backupSubnetCidr = default; + Uri nsgUrl = default; + AzureResourceProvisioningState? provisioningState = default; + ExadbVmClusterLifecycleState? lifecycleState = default; + ResourceIdentifier vnetId = default; + ResourceIdentifier subnetId = default; + DataCollectionOptions dataCollectionOptions = default; + string displayName = default; + string domain = default; + int enabledEcpuCount = default; + ResourceIdentifier exascaleDbStorageVaultId = default; + string gridImageOcid = default; + GridImageType? gridImageType = default; + string giVersion = default; + string hostname = default; + LicenseModel? licenseModel = default; + int? memorySizeInGbs = default; + int nodeCount = default; + IList nsgCidrs = default; + string zoneOcid = default; + string privateZoneOcid = default; + int? scanListenerPortTcp = default; + int? scanListenerPortTcpSsl = default; + int? listenerPort = default; + string shape = default; + IList sshPublicKeys = default; + string systemVersion = default; + string timeZone = default; + int totalEcpuCount = default; + ExadbVmClusterStorageDetails vmFileSystemStorage = default; + string lifecycleDetails = default; + string scanDnsName = default; + IReadOnlyList scanIPIds = default; + string scanDnsRecordId = default; + ExadbVmClusterStorageDetails snapshotFileSystemStorage = default; + ExadbVmClusterStorageDetails totalFileSystemStorage = default; + IReadOnlyList vipIds = default; + Uri ociUrl = default; + ExadataIormConfig iormConfigCache = default; + string backupSubnetOcid = default; + string subnetOcid = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("ocid"u8)) + { + ocid = property.Value.GetString(); + continue; + } + if (property.NameEquals("clusterName"u8)) + { + clusterName = property.Value.GetString(); + continue; + } + if (property.NameEquals("backupSubnetCidr"u8)) + { + backupSubnetCidr = property.Value.GetString(); + continue; + } + if (property.NameEquals("nsgUrl"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nsgUrl = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new AzureResourceProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("lifecycleState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lifecycleState = new ExadbVmClusterLifecycleState(property.Value.GetString()); + continue; + } + if (property.NameEquals("vnetId"u8)) + { + vnetId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("subnetId"u8)) + { + subnetId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("dataCollectionOptions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dataCollectionOptions = DataCollectionOptions.DeserializeDataCollectionOptions(property.Value, options); + continue; + } + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("domain"u8)) + { + domain = property.Value.GetString(); + continue; + } + if (property.NameEquals("enabledEcpuCount"u8)) + { + enabledEcpuCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("exascaleDbStorageVaultId"u8)) + { + exascaleDbStorageVaultId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("gridImageOcid"u8)) + { + gridImageOcid = property.Value.GetString(); + continue; + } + if (property.NameEquals("gridImageType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + gridImageType = new GridImageType(property.Value.GetString()); + continue; + } + if (property.NameEquals("giVersion"u8)) + { + giVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("hostname"u8)) + { + hostname = property.Value.GetString(); + continue; + } + if (property.NameEquals("licenseModel"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + licenseModel = new LicenseModel(property.Value.GetString()); + continue; + } + if (property.NameEquals("memorySizeInGbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + memorySizeInGbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("nodeCount"u8)) + { + nodeCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("nsgCidrs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(NsgCidr.DeserializeNsgCidr(item, options)); + } + nsgCidrs = array; + continue; + } + if (property.NameEquals("zoneOcid"u8)) + { + zoneOcid = property.Value.GetString(); + continue; + } + if (property.NameEquals("privateZoneOcid"u8)) + { + privateZoneOcid = property.Value.GetString(); + continue; + } + if (property.NameEquals("scanListenerPortTcp"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + scanListenerPortTcp = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("scanListenerPortTcpSsl"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + scanListenerPortTcpSsl = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("listenerPort"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + listenerPort = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("shape"u8)) + { + shape = property.Value.GetString(); + continue; + } + if (property.NameEquals("sshPublicKeys"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + sshPublicKeys = array; + continue; + } + if (property.NameEquals("systemVersion"u8)) + { + systemVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("timeZone"u8)) + { + timeZone = property.Value.GetString(); + continue; + } + if (property.NameEquals("totalEcpuCount"u8)) + { + totalEcpuCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("vmFileSystemStorage"u8)) + { + vmFileSystemStorage = ExadbVmClusterStorageDetails.DeserializeExadbVmClusterStorageDetails(property.Value, options); + continue; + } + if (property.NameEquals("lifecycleDetails"u8)) + { + lifecycleDetails = property.Value.GetString(); + continue; + } + if (property.NameEquals("scanDnsName"u8)) + { + scanDnsName = property.Value.GetString(); + continue; + } + if (property.NameEquals("scanIpIds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + scanIPIds = array; + continue; + } + if (property.NameEquals("scanDnsRecordId"u8)) + { + scanDnsRecordId = property.Value.GetString(); + continue; + } + if (property.NameEquals("snapshotFileSystemStorage"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + snapshotFileSystemStorage = ExadbVmClusterStorageDetails.DeserializeExadbVmClusterStorageDetails(property.Value, options); + continue; + } + if (property.NameEquals("totalFileSystemStorage"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + totalFileSystemStorage = ExadbVmClusterStorageDetails.DeserializeExadbVmClusterStorageDetails(property.Value, options); + continue; + } + if (property.NameEquals("vipIds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + vipIds = array; + continue; + } + if (property.NameEquals("ociUrl"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + ociUrl = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("iormConfigCache"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + iormConfigCache = ExadataIormConfig.DeserializeExadataIormConfig(property.Value, options); + continue; + } + if (property.NameEquals("backupSubnetOcid"u8)) + { + backupSubnetOcid = property.Value.GetString(); + continue; + } + if (property.NameEquals("subnetOcid"u8)) + { + subnetOcid = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExadbVmClusterProperties( + ocid, + clusterName, + backupSubnetCidr, + nsgUrl, + provisioningState, + lifecycleState, + vnetId, + subnetId, + dataCollectionOptions, + displayName, + domain, + enabledEcpuCount, + exascaleDbStorageVaultId, + gridImageOcid, + gridImageType, + giVersion, + hostname, + licenseModel, + memorySizeInGbs, + nodeCount, + nsgCidrs ?? new ChangeTrackingList(), + zoneOcid, + privateZoneOcid, + scanListenerPortTcp, + scanListenerPortTcpSsl, + listenerPort, + shape, + sshPublicKeys, + systemVersion, + timeZone, + totalEcpuCount, + vmFileSystemStorage, + lifecycleDetails, + scanDnsName, + scanIPIds ?? new ChangeTrackingList(), + scanDnsRecordId, + snapshotFileSystemStorage, + totalFileSystemStorage, + vipIds ?? new ChangeTrackingList(), + ociUrl, + iormConfigCache, + backupSubnetOcid, + subnetOcid, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExadbVmClusterProperties)} does not support writing '{options.Format}' format."); + } + } + + ExadbVmClusterProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeExadbVmClusterProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExadbVmClusterProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExadbVmClusterProperties.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExadbVmClusterProperties.cs new file mode 100644 index 000000000000..a350c3a177ab --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExadbVmClusterProperties.cs @@ -0,0 +1,297 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// ExadbVmCluster resource model. + public partial class ExadbVmClusterProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// VNET for network connectivity. + /// Client subnet. + /// Display Name. + /// The number of ECPUs to enable for an Exadata VM cluster on Exascale Infrastructure. + /// The Azure Resource ID of the Exadata Database Storage Vault. + /// The hostname for the Exadata VM cluster on Exascale Infrastructure. + /// The number of nodes in the Exadata VM cluster on Exascale Infrastructure. + /// The shape of the Exadata VM cluster on Exascale Infrastructure resource. + /// The public key portion of one or more key pairs used for SSH access to the Exadata VM cluster on Exascale Infrastructure. + /// The number of Total ECPUs for an Exadata VM cluster on Exascale Infrastructure. + /// Filesystem storage details. + /// , , , , , , or is null. + public ExadbVmClusterProperties(ResourceIdentifier vnetId, ResourceIdentifier subnetId, string displayName, int enabledEcpuCount, ResourceIdentifier exascaleDbStorageVaultId, string hostname, int nodeCount, string shape, IEnumerable sshPublicKeys, int totalEcpuCount, ExadbVmClusterStorageDetails vmFileSystemStorage) + { + Argument.AssertNotNull(vnetId, nameof(vnetId)); + Argument.AssertNotNull(subnetId, nameof(subnetId)); + Argument.AssertNotNull(displayName, nameof(displayName)); + Argument.AssertNotNull(exascaleDbStorageVaultId, nameof(exascaleDbStorageVaultId)); + Argument.AssertNotNull(hostname, nameof(hostname)); + Argument.AssertNotNull(shape, nameof(shape)); + Argument.AssertNotNull(sshPublicKeys, nameof(sshPublicKeys)); + Argument.AssertNotNull(vmFileSystemStorage, nameof(vmFileSystemStorage)); + + VnetId = vnetId; + SubnetId = subnetId; + DisplayName = displayName; + EnabledEcpuCount = enabledEcpuCount; + ExascaleDbStorageVaultId = exascaleDbStorageVaultId; + Hostname = hostname; + NodeCount = nodeCount; + NsgCidrs = new ChangeTrackingList(); + Shape = shape; + SshPublicKeys = sshPublicKeys.ToList(); + TotalEcpuCount = totalEcpuCount; + VmFileSystemStorage = vmFileSystemStorage; + ScanIPIds = new ChangeTrackingList(); + VipIds = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// ExadbVmCluster ocid. + /// The cluster name for Exadata VM cluster on Exascale Infrastructure. The cluster name must begin with an alphabetic character, and may contain hyphens (-). Underscores (_) are not permitted. The cluster name can be no longer than 11 characters and is not case sensitive. + /// Client OCI backup subnet CIDR, default is 192.168.252.0/22. + /// HTTPS link to OCI Network Security Group exposed to Azure Customer via the Azure Interface. + /// Exadata VM cluster on Exascale Infrastructure provisioning state. + /// CloudVmCluster lifecycle state. + /// VNET for network connectivity. + /// Client subnet. + /// Indicates user preferences for the various diagnostic collection options for the VM cluster/Cloud VM cluster/VMBM DBCS. + /// Display Name. + /// A domain name used for the Exadata VM cluster on Exascale Infrastructure. + /// The number of ECPUs to enable for an Exadata VM cluster on Exascale Infrastructure. + /// The Azure Resource ID of the Exadata Database Storage Vault. + /// Grid Setup will be done using this Grid Image OCID. Can be obtained using giMinorVersions API. + /// The type of Grid Image. + /// Oracle Grid Infrastructure (GI) software version. + /// The hostname for the Exadata VM cluster on Exascale Infrastructure. + /// The Oracle license model that applies to the Exadata VM cluster on Exascale Infrastructure. The default is LICENSE_INCLUDED. + /// The memory that you want to be allocated in GBs. Memory is calculated based on 11 GB per VM core reserved. + /// The number of nodes in the Exadata VM cluster on Exascale Infrastructure. + /// CIDR blocks for additional NSG ingress rules. The VNET CIDRs used to provision the VM Cluster will be added by default. + /// The OCID of the zone the Exadata VM cluster on Exascale Infrastructure is associated with. + /// The OCID of the zone the Exadata VM cluster on Exascale Infrastructure is associated with. + /// The TCP Single Client Access Name (SCAN) port. The default port is 1521. + /// The TCPS Single Client Access Name (SCAN) port. The default port is 2484. + /// The port number configured for the listener on the Exadata VM cluster on Exascale Infrastructure. + /// The shape of the Exadata VM cluster on Exascale Infrastructure resource. + /// The public key portion of one or more key pairs used for SSH access to the Exadata VM cluster on Exascale Infrastructure. + /// Operating system version of the image. + /// The time zone of the Exadata VM cluster on Exascale Infrastructure. For details, see [Exadata Infrastructure Time Zones](/Content/Database/References/timezones.htm). + /// The number of Total ECPUs for an Exadata VM cluster on Exascale Infrastructure. + /// Filesystem storage details. + /// Additional information about the current lifecycle state. + /// The FQDN of the DNS record for the SCAN IP addresses that are associated with the Exadata VM cluster on Exascale Infrastructure. + /// The Single Client Access Name (SCAN) IP addresses associated with the Exadata VM cluster on Exascale Infrastructure. SCAN IP addresses are typically used for load balancing and are not assigned to any interface. Oracle Clusterware directs the requests to the appropriate nodes in the cluster. **Note:** For a single-node DB system, this list is empty. + /// The OCID of the DNS record for the SCAN IP addresses that are associated with the Exadata VM cluster on Exascale Infrastructure. + /// Snapshot filesystem storage details. + /// Total file system storage details. + /// The virtual IP (VIP) addresses associated with the Exadata VM cluster on Exascale Infrastructure. The Cluster Ready Services (CRS) creates and maintains one VIP address for each node in the Exadata Cloud Service instance to enable failover. If one node fails, the VIP is reassigned to another active node in the cluster. **Note:** For a single-node DB system, this list is empty. + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + /// iormConfigCache details for Exadata VM cluster on Exascale Infrastructure. + /// Cluster backup subnet ocid. + /// Cluster subnet ocid. + /// Keeps track of any properties unknown to the library. + internal ExadbVmClusterProperties(string ocid, string clusterName, string backupSubnetCidr, Uri nsgUri, AzureResourceProvisioningState? provisioningState, ExadbVmClusterLifecycleState? lifecycleState, ResourceIdentifier vnetId, ResourceIdentifier subnetId, DataCollectionOptions dataCollectionOptions, string displayName, string domain, int enabledEcpuCount, ResourceIdentifier exascaleDbStorageVaultId, string gridImageOcid, GridImageType? gridImageType, string giVersion, string hostname, LicenseModel? licenseModel, int? memorySizeInGbs, int nodeCount, IList nsgCidrs, string zoneOcid, string privateZoneOcid, int? scanListenerPortTcp, int? scanListenerPortTcpSsl, int? listenerPort, string shape, IList sshPublicKeys, string systemVersion, string timeZone, int totalEcpuCount, ExadbVmClusterStorageDetails vmFileSystemStorage, string lifecycleDetails, string scanDnsName, IReadOnlyList scanIPIds, string scanDnsRecordId, ExadbVmClusterStorageDetails snapshotFileSystemStorage, ExadbVmClusterStorageDetails totalFileSystemStorage, IReadOnlyList vipIds, Uri ociUri, ExadataIormConfig iormConfigCache, string backupSubnetOcid, string subnetOcid, IDictionary serializedAdditionalRawData) + { + Ocid = ocid; + ClusterName = clusterName; + BackupSubnetCidr = backupSubnetCidr; + NsgUri = nsgUri; + ProvisioningState = provisioningState; + LifecycleState = lifecycleState; + VnetId = vnetId; + SubnetId = subnetId; + DataCollectionOptions = dataCollectionOptions; + DisplayName = displayName; + Domain = domain; + EnabledEcpuCount = enabledEcpuCount; + ExascaleDbStorageVaultId = exascaleDbStorageVaultId; + GridImageOcid = gridImageOcid; + GridImageType = gridImageType; + GiVersion = giVersion; + Hostname = hostname; + LicenseModel = licenseModel; + MemorySizeInGbs = memorySizeInGbs; + NodeCount = nodeCount; + NsgCidrs = nsgCidrs; + ZoneOcid = zoneOcid; + PrivateZoneOcid = privateZoneOcid; + ScanListenerPortTcp = scanListenerPortTcp; + ScanListenerPortTcpSsl = scanListenerPortTcpSsl; + ListenerPort = listenerPort; + Shape = shape; + SshPublicKeys = sshPublicKeys; + SystemVersion = systemVersion; + TimeZone = timeZone; + TotalEcpuCount = totalEcpuCount; + VmFileSystemStorage = vmFileSystemStorage; + LifecycleDetails = lifecycleDetails; + ScanDnsName = scanDnsName; + ScanIPIds = scanIPIds; + ScanDnsRecordId = scanDnsRecordId; + SnapshotFileSystemStorage = snapshotFileSystemStorage; + TotalFileSystemStorage = totalFileSystemStorage; + VipIds = vipIds; + OciUri = ociUri; + IormConfigCache = iormConfigCache; + BackupSubnetOcid = backupSubnetOcid; + SubnetOcid = subnetOcid; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ExadbVmClusterProperties() + { + } + + /// ExadbVmCluster ocid. + public string Ocid { get; } + /// The cluster name for Exadata VM cluster on Exascale Infrastructure. The cluster name must begin with an alphabetic character, and may contain hyphens (-). Underscores (_) are not permitted. The cluster name can be no longer than 11 characters and is not case sensitive. + public string ClusterName { get; set; } + /// Client OCI backup subnet CIDR, default is 192.168.252.0/22. + public string BackupSubnetCidr { get; set; } + /// HTTPS link to OCI Network Security Group exposed to Azure Customer via the Azure Interface. + public Uri NsgUri { get; } + /// Exadata VM cluster on Exascale Infrastructure provisioning state. + public AzureResourceProvisioningState? ProvisioningState { get; } + /// CloudVmCluster lifecycle state. + public ExadbVmClusterLifecycleState? LifecycleState { get; } + /// VNET for network connectivity. + public ResourceIdentifier VnetId { get; set; } + /// Client subnet. + public ResourceIdentifier SubnetId { get; set; } + /// Indicates user preferences for the various diagnostic collection options for the VM cluster/Cloud VM cluster/VMBM DBCS. + public DataCollectionOptions DataCollectionOptions { get; set; } + /// Display Name. + public string DisplayName { get; set; } + /// A domain name used for the Exadata VM cluster on Exascale Infrastructure. + public string Domain { get; set; } + /// The number of ECPUs to enable for an Exadata VM cluster on Exascale Infrastructure. + public int EnabledEcpuCount { get; set; } + /// The Azure Resource ID of the Exadata Database Storage Vault. + public ResourceIdentifier ExascaleDbStorageVaultId { get; set; } + /// Grid Setup will be done using this Grid Image OCID. Can be obtained using giMinorVersions API. + public string GridImageOcid { get; set; } + /// The type of Grid Image. + public GridImageType? GridImageType { get; } + /// Oracle Grid Infrastructure (GI) software version. + public string GiVersion { get; } + /// The hostname for the Exadata VM cluster on Exascale Infrastructure. + public string Hostname { get; set; } + /// The Oracle license model that applies to the Exadata VM cluster on Exascale Infrastructure. The default is LICENSE_INCLUDED. + public LicenseModel? LicenseModel { get; set; } + /// The memory that you want to be allocated in GBs. Memory is calculated based on 11 GB per VM core reserved. + public int? MemorySizeInGbs { get; } + /// The number of nodes in the Exadata VM cluster on Exascale Infrastructure. + public int NodeCount { get; set; } + /// CIDR blocks for additional NSG ingress rules. The VNET CIDRs used to provision the VM Cluster will be added by default. + public IList NsgCidrs { get; } + /// The OCID of the zone the Exadata VM cluster on Exascale Infrastructure is associated with. + public string ZoneOcid { get; } + /// The OCID of the zone the Exadata VM cluster on Exascale Infrastructure is associated with. + public string PrivateZoneOcid { get; set; } + /// The TCP Single Client Access Name (SCAN) port. The default port is 1521. + public int? ScanListenerPortTcp { get; set; } + /// The TCPS Single Client Access Name (SCAN) port. The default port is 2484. + public int? ScanListenerPortTcpSsl { get; set; } + /// The port number configured for the listener on the Exadata VM cluster on Exascale Infrastructure. + public int? ListenerPort { get; } + /// The shape of the Exadata VM cluster on Exascale Infrastructure resource. + public string Shape { get; set; } + /// The public key portion of one or more key pairs used for SSH access to the Exadata VM cluster on Exascale Infrastructure. + public IList SshPublicKeys { get; } + /// Operating system version of the image. + public string SystemVersion { get; set; } + /// The time zone of the Exadata VM cluster on Exascale Infrastructure. For details, see [Exadata Infrastructure Time Zones](/Content/Database/References/timezones.htm). + public string TimeZone { get; set; } + /// The number of Total ECPUs for an Exadata VM cluster on Exascale Infrastructure. + public int TotalEcpuCount { get; set; } + /// Filesystem storage details. + internal ExadbVmClusterStorageDetails VmFileSystemStorage { get; set; } + /// Total Capacity. + public int? VmFileSystemStorageTotalSizeInGbs + { + get => VmFileSystemStorage is null ? default(int?) : VmFileSystemStorage.TotalSizeInGbs; + set + { + VmFileSystemStorage = value.HasValue ? new ExadbVmClusterStorageDetails(value.Value) : null; + } + } + + /// Additional information about the current lifecycle state. + public string LifecycleDetails { get; } + /// The FQDN of the DNS record for the SCAN IP addresses that are associated with the Exadata VM cluster on Exascale Infrastructure. + public string ScanDnsName { get; } + /// The Single Client Access Name (SCAN) IP addresses associated with the Exadata VM cluster on Exascale Infrastructure. SCAN IP addresses are typically used for load balancing and are not assigned to any interface. Oracle Clusterware directs the requests to the appropriate nodes in the cluster. **Note:** For a single-node DB system, this list is empty. + public IReadOnlyList ScanIPIds { get; } + /// The OCID of the DNS record for the SCAN IP addresses that are associated with the Exadata VM cluster on Exascale Infrastructure. + public string ScanDnsRecordId { get; } + /// Snapshot filesystem storage details. + internal ExadbVmClusterStorageDetails SnapshotFileSystemStorage { get; } + /// Total Capacity. + public int? SnapshotFileSystemStorageTotalSizeInGbs + { + get => SnapshotFileSystemStorage?.TotalSizeInGbs; + } + + /// Total file system storage details. + internal ExadbVmClusterStorageDetails TotalFileSystemStorage { get; } + /// Total Capacity. + public int? TotalSizeInGbs + { + get => TotalFileSystemStorage?.TotalSizeInGbs; + } + + /// The virtual IP (VIP) addresses associated with the Exadata VM cluster on Exascale Infrastructure. The Cluster Ready Services (CRS) creates and maintains one VIP address for each node in the Exadata Cloud Service instance to enable failover. If one node fails, the VIP is reassigned to another active node in the cluster. **Note:** For a single-node DB system, this list is empty. + public IReadOnlyList VipIds { get; } + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + public Uri OciUri { get; } + /// iormConfigCache details for Exadata VM cluster on Exascale Infrastructure. + public ExadataIormConfig IormConfigCache { get; } + /// Cluster backup subnet ocid. + public string BackupSubnetOcid { get; } + /// Cluster subnet ocid. + public string SubnetOcid { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExadbVmClusterStorageDetails.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExadbVmClusterStorageDetails.Serialization.cs new file mode 100644 index 000000000000..28ec6f2eb1aa --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExadbVmClusterStorageDetails.Serialization.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + public partial class ExadbVmClusterStorageDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExadbVmClusterStorageDetails)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("totalSizeInGbs"u8); + writer.WriteNumberValue(TotalSizeInGbs); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ExadbVmClusterStorageDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExadbVmClusterStorageDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExadbVmClusterStorageDetails(document.RootElement, options); + } + + internal static ExadbVmClusterStorageDetails DeserializeExadbVmClusterStorageDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int totalSizeInGbs = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("totalSizeInGbs"u8)) + { + totalSizeInGbs = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExadbVmClusterStorageDetails(totalSizeInGbs, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExadbVmClusterStorageDetails)} does not support writing '{options.Format}' format."); + } + } + + ExadbVmClusterStorageDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeExadbVmClusterStorageDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExadbVmClusterStorageDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExadbVmClusterStorageDetails.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExadbVmClusterStorageDetails.cs new file mode 100644 index 000000000000..0ba79b60cc13 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExadbVmClusterStorageDetails.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// Storage Details on the Exadata VM cluster. + public partial class ExadbVmClusterStorageDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Total Capacity. + public ExadbVmClusterStorageDetails(int totalSizeInGbs) + { + TotalSizeInGbs = totalSizeInGbs; + } + + /// Initializes a new instance of . + /// Total Capacity. + /// Keeps track of any properties unknown to the library. + internal ExadbVmClusterStorageDetails(int totalSizeInGbs, IDictionary serializedAdditionalRawData) + { + TotalSizeInGbs = totalSizeInGbs; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ExadbVmClusterStorageDetails() + { + } + + /// Total Capacity. + public int TotalSizeInGbs { get; set; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExadbVmClusterUpdateProperties.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExadbVmClusterUpdateProperties.Serialization.cs new file mode 100644 index 000000000000..bde831f19ebd --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExadbVmClusterUpdateProperties.Serialization.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + internal partial class ExadbVmClusterUpdateProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExadbVmClusterUpdateProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(NodeCount)) + { + writer.WritePropertyName("nodeCount"u8); + writer.WriteNumberValue(NodeCount.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ExadbVmClusterUpdateProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExadbVmClusterUpdateProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExadbVmClusterUpdateProperties(document.RootElement, options); + } + + internal static ExadbVmClusterUpdateProperties DeserializeExadbVmClusterUpdateProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int? nodeCount = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("nodeCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nodeCount = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExadbVmClusterUpdateProperties(nodeCount, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExadbVmClusterUpdateProperties)} does not support writing '{options.Format}' format."); + } + } + + ExadbVmClusterUpdateProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeExadbVmClusterUpdateProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExadbVmClusterUpdateProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExadbVmClusterUpdateProperties.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExadbVmClusterUpdateProperties.cs new file mode 100644 index 000000000000..3ac212e4beed --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExadbVmClusterUpdateProperties.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// The updatable properties of the ExadbVmCluster. + internal partial class ExadbVmClusterUpdateProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ExadbVmClusterUpdateProperties() + { + } + + /// Initializes a new instance of . + /// The number of nodes in the Exadata VM cluster on Exascale Infrastructure. + /// Keeps track of any properties unknown to the library. + internal ExadbVmClusterUpdateProperties(int? nodeCount, IDictionary serializedAdditionalRawData) + { + NodeCount = nodeCount; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The number of nodes in the Exadata VM cluster on Exascale Infrastructure. + public int? NodeCount { get; set; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDbNodeListResult.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDbNodeListResult.Serialization.cs new file mode 100644 index 000000000000..5ab5d7326008 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDbNodeListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + internal partial class ExascaleDbNodeListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExascaleDbNodeListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ExascaleDbNodeListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExascaleDbNodeListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExascaleDbNodeListResult(document.RootElement, options); + } + + internal static ExascaleDbNodeListResult DeserializeExascaleDbNodeListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ExascaleDbNodeData.DeserializeExascaleDbNodeData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExascaleDbNodeListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExascaleDbNodeListResult)} does not support writing '{options.Format}' format."); + } + } + + ExascaleDbNodeListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeExascaleDbNodeListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExascaleDbNodeListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDbNodeListResult.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDbNodeListResult.cs new file mode 100644 index 000000000000..2147beca326b --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDbNodeListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// The response of a ExascaleDbNode list operation. + internal partial class ExascaleDbNodeListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The ExascaleDbNode items on this page. + /// is null. + internal ExascaleDbNodeListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The ExascaleDbNode items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal ExascaleDbNodeListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ExascaleDbNodeListResult() + { + } + + /// The ExascaleDbNode items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDbNodeProperties.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDbNodeProperties.Serialization.cs new file mode 100644 index 000000000000..c87145a69a82 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDbNodeProperties.Serialization.cs @@ -0,0 +1,304 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + public partial class ExascaleDbNodeProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExascaleDbNodeProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("ocid"u8); + writer.WriteStringValue(Ocid); + if (Optional.IsDefined(AdditionalDetails)) + { + writer.WritePropertyName("additionalDetails"u8); + writer.WriteStringValue(AdditionalDetails); + } + if (Optional.IsDefined(CpuCoreCount)) + { + writer.WritePropertyName("cpuCoreCount"u8); + writer.WriteNumberValue(CpuCoreCount.Value); + } + if (Optional.IsDefined(DbNodeStorageSizeInGbs)) + { + writer.WritePropertyName("dbNodeStorageSizeInGbs"u8); + writer.WriteNumberValue(DbNodeStorageSizeInGbs.Value); + } + if (Optional.IsDefined(FaultDomain)) + { + writer.WritePropertyName("faultDomain"u8); + writer.WriteStringValue(FaultDomain); + } + if (Optional.IsDefined(Hostname)) + { + writer.WritePropertyName("hostname"u8); + writer.WriteStringValue(Hostname); + } + if (Optional.IsDefined(LifecycleState)) + { + writer.WritePropertyName("lifecycleState"u8); + writer.WriteStringValue(LifecycleState.Value.ToString()); + } + if (Optional.IsDefined(MaintenanceType)) + { + writer.WritePropertyName("maintenanceType"u8); + writer.WriteStringValue(MaintenanceType); + } + if (Optional.IsDefined(MemorySizeInGbs)) + { + writer.WritePropertyName("memorySizeInGbs"u8); + writer.WriteNumberValue(MemorySizeInGbs.Value); + } + if (Optional.IsDefined(SoftwareStorageSizeInGb)) + { + writer.WritePropertyName("softwareStorageSizeInGb"u8); + writer.WriteNumberValue(SoftwareStorageSizeInGb.Value); + } + if (Optional.IsDefined(TimeMaintenanceWindowEnd)) + { + writer.WritePropertyName("timeMaintenanceWindowEnd"u8); + writer.WriteStringValue(TimeMaintenanceWindowEnd.Value, "O"); + } + if (Optional.IsDefined(TimeMaintenanceWindowStart)) + { + writer.WritePropertyName("timeMaintenanceWindowStart"u8); + writer.WriteStringValue(TimeMaintenanceWindowStart.Value, "O"); + } + if (Optional.IsDefined(TotalCpuCoreCount)) + { + writer.WritePropertyName("totalCpuCoreCount"u8); + writer.WriteNumberValue(TotalCpuCoreCount.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ExascaleDbNodeProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExascaleDbNodeProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExascaleDbNodeProperties(document.RootElement, options); + } + + internal static ExascaleDbNodeProperties DeserializeExascaleDbNodeProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string ocid = default; + string additionalDetails = default; + int? cpuCoreCount = default; + int? dbNodeStorageSizeInGbs = default; + string faultDomain = default; + string hostname = default; + DbNodeProvisioningState? lifecycleState = default; + string maintenanceType = default; + int? memorySizeInGbs = default; + int? softwareStorageSizeInGb = default; + DateTimeOffset? timeMaintenanceWindowEnd = default; + DateTimeOffset? timeMaintenanceWindowStart = default; + int? totalCpuCoreCount = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("ocid"u8)) + { + ocid = property.Value.GetString(); + continue; + } + if (property.NameEquals("additionalDetails"u8)) + { + additionalDetails = property.Value.GetString(); + continue; + } + if (property.NameEquals("cpuCoreCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + cpuCoreCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("dbNodeStorageSizeInGbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dbNodeStorageSizeInGbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("faultDomain"u8)) + { + faultDomain = property.Value.GetString(); + continue; + } + if (property.NameEquals("hostname"u8)) + { + hostname = property.Value.GetString(); + continue; + } + if (property.NameEquals("lifecycleState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lifecycleState = new DbNodeProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("maintenanceType"u8)) + { + maintenanceType = property.Value.GetString(); + continue; + } + if (property.NameEquals("memorySizeInGbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + memorySizeInGbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("softwareStorageSizeInGb"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + softwareStorageSizeInGb = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("timeMaintenanceWindowEnd"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeMaintenanceWindowEnd = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("timeMaintenanceWindowStart"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeMaintenanceWindowStart = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("totalCpuCoreCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + totalCpuCoreCount = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExascaleDbNodeProperties( + ocid, + additionalDetails, + cpuCoreCount, + dbNodeStorageSizeInGbs, + faultDomain, + hostname, + lifecycleState, + maintenanceType, + memorySizeInGbs, + softwareStorageSizeInGb, + timeMaintenanceWindowEnd, + timeMaintenanceWindowStart, + totalCpuCoreCount, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExascaleDbNodeProperties)} does not support writing '{options.Format}' format."); + } + } + + ExascaleDbNodeProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeExascaleDbNodeProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExascaleDbNodeProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDbNodeProperties.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDbNodeProperties.cs new file mode 100644 index 000000000000..3a1c65e0b9ed --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDbNodeProperties.cs @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// The properties of DbNodeResource. + public partial class ExascaleDbNodeProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// DbNode OCID. + /// is null. + internal ExascaleDbNodeProperties(string ocid) + { + Argument.AssertNotNull(ocid, nameof(ocid)); + + Ocid = ocid; + } + + /// Initializes a new instance of . + /// DbNode OCID. + /// Additional information about the planned maintenance. + /// The number of CPU cores enabled on the Db node. + /// The allocated local node storage in GBs on the Db node. + /// The name of the Fault Domain the instance is contained in. + /// The host name for the database node. + /// The current state of the database node. + /// The type of database node maintenance. + /// The allocated memory in GBs on the Db node. + /// The size (in GB) of the block storage volume allocation for the DB system. This attribute applies only for virtual machine DB systems. + /// End date and time of maintenance window. + /// Start date and time of maintenance window. + /// The total number of CPU cores reserved on the Db node. + /// Keeps track of any properties unknown to the library. + internal ExascaleDbNodeProperties(string ocid, string additionalDetails, int? cpuCoreCount, int? dbNodeStorageSizeInGbs, string faultDomain, string hostname, DbNodeProvisioningState? lifecycleState, string maintenanceType, int? memorySizeInGbs, int? softwareStorageSizeInGb, DateTimeOffset? timeMaintenanceWindowEnd, DateTimeOffset? timeMaintenanceWindowStart, int? totalCpuCoreCount, IDictionary serializedAdditionalRawData) + { + Ocid = ocid; + AdditionalDetails = additionalDetails; + CpuCoreCount = cpuCoreCount; + DbNodeStorageSizeInGbs = dbNodeStorageSizeInGbs; + FaultDomain = faultDomain; + Hostname = hostname; + LifecycleState = lifecycleState; + MaintenanceType = maintenanceType; + MemorySizeInGbs = memorySizeInGbs; + SoftwareStorageSizeInGb = softwareStorageSizeInGb; + TimeMaintenanceWindowEnd = timeMaintenanceWindowEnd; + TimeMaintenanceWindowStart = timeMaintenanceWindowStart; + TotalCpuCoreCount = totalCpuCoreCount; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ExascaleDbNodeProperties() + { + } + + /// DbNode OCID. + public string Ocid { get; } + /// Additional information about the planned maintenance. + public string AdditionalDetails { get; } + /// The number of CPU cores enabled on the Db node. + public int? CpuCoreCount { get; } + /// The allocated local node storage in GBs on the Db node. + public int? DbNodeStorageSizeInGbs { get; } + /// The name of the Fault Domain the instance is contained in. + public string FaultDomain { get; } + /// The host name for the database node. + public string Hostname { get; } + /// The current state of the database node. + public DbNodeProvisioningState? LifecycleState { get; } + /// The type of database node maintenance. + public string MaintenanceType { get; } + /// The allocated memory in GBs on the Db node. + public int? MemorySizeInGbs { get; } + /// The size (in GB) of the block storage volume allocation for the DB system. This attribute applies only for virtual machine DB systems. + public int? SoftwareStorageSizeInGb { get; } + /// End date and time of maintenance window. + public DateTimeOffset? TimeMaintenanceWindowEnd { get; } + /// Start date and time of maintenance window. + public DateTimeOffset? TimeMaintenanceWindowStart { get; } + /// The total number of CPU cores reserved on the Db node. + public int? TotalCpuCoreCount { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDbStorageDetails.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDbStorageDetails.Serialization.cs new file mode 100644 index 000000000000..c9571560501b --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDbStorageDetails.Serialization.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + public partial class ExascaleDbStorageDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExascaleDbStorageDetails)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(AvailableSizeInGbs)) + { + writer.WritePropertyName("availableSizeInGbs"u8); + writer.WriteNumberValue(AvailableSizeInGbs.Value); + } + if (Optional.IsDefined(TotalSizeInGbs)) + { + writer.WritePropertyName("totalSizeInGbs"u8); + writer.WriteNumberValue(TotalSizeInGbs.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ExascaleDbStorageDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExascaleDbStorageDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExascaleDbStorageDetails(document.RootElement, options); + } + + internal static ExascaleDbStorageDetails DeserializeExascaleDbStorageDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int? availableSizeInGbs = default; + int? totalSizeInGbs = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("availableSizeInGbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + availableSizeInGbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("totalSizeInGbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + totalSizeInGbs = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExascaleDbStorageDetails(availableSizeInGbs, totalSizeInGbs, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExascaleDbStorageDetails)} does not support writing '{options.Format}' format."); + } + } + + ExascaleDbStorageDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeExascaleDbStorageDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExascaleDbStorageDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDbStorageDetails.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDbStorageDetails.cs new file mode 100644 index 000000000000..39969192abc1 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDbStorageDetails.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// Exadata Database Storage Details. + public partial class ExascaleDbStorageDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal ExascaleDbStorageDetails() + { + } + + /// Initializes a new instance of . + /// Available Capacity. + /// Total Capacity. + /// Keeps track of any properties unknown to the library. + internal ExascaleDbStorageDetails(int? availableSizeInGbs, int? totalSizeInGbs, IDictionary serializedAdditionalRawData) + { + AvailableSizeInGbs = availableSizeInGbs; + TotalSizeInGbs = totalSizeInGbs; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Available Capacity. + public int? AvailableSizeInGbs { get; } + /// Total Capacity. + public int? TotalSizeInGbs { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDbStorageInputDetails.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDbStorageInputDetails.Serialization.cs new file mode 100644 index 000000000000..93d3a0833aea --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDbStorageInputDetails.Serialization.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + public partial class ExascaleDbStorageInputDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExascaleDbStorageInputDetails)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("totalSizeInGbs"u8); + writer.WriteNumberValue(TotalSizeInGbs); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ExascaleDbStorageInputDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExascaleDbStorageInputDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExascaleDbStorageInputDetails(document.RootElement, options); + } + + internal static ExascaleDbStorageInputDetails DeserializeExascaleDbStorageInputDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int totalSizeInGbs = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("totalSizeInGbs"u8)) + { + totalSizeInGbs = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExascaleDbStorageInputDetails(totalSizeInGbs, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExascaleDbStorageInputDetails)} does not support writing '{options.Format}' format."); + } + } + + ExascaleDbStorageInputDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeExascaleDbStorageInputDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExascaleDbStorageInputDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDbStorageInputDetails.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDbStorageInputDetails.cs new file mode 100644 index 000000000000..cb7a178fdead --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDbStorageInputDetails.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// Create exadata Database Storage Details model. + public partial class ExascaleDbStorageInputDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Total Capacity. + public ExascaleDbStorageInputDetails(int totalSizeInGbs) + { + TotalSizeInGbs = totalSizeInGbs; + } + + /// Initializes a new instance of . + /// Total Capacity. + /// Keeps track of any properties unknown to the library. + internal ExascaleDbStorageInputDetails(int totalSizeInGbs, IDictionary serializedAdditionalRawData) + { + TotalSizeInGbs = totalSizeInGbs; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ExascaleDbStorageInputDetails() + { + } + + /// Total Capacity. + public int TotalSizeInGbs { get; set; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDbStorageVaultLifecycleState.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDbStorageVaultLifecycleState.cs new file mode 100644 index 000000000000..f94c70393a40 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDbStorageVaultLifecycleState.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// Exadata Database Storage Vault lifecycle state enum. + public readonly partial struct ExascaleDbStorageVaultLifecycleState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ExascaleDbStorageVaultLifecycleState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ProvisioningValue = "Provisioning"; + private const string AvailableValue = "Available"; + private const string UpdatingValue = "Updating"; + private const string TerminatingValue = "Terminating"; + private const string TerminatedValue = "Terminated"; + private const string FailedValue = "Failed"; + + /// Indicates that resource in Provisioning state. + public static ExascaleDbStorageVaultLifecycleState Provisioning { get; } = new ExascaleDbStorageVaultLifecycleState(ProvisioningValue); + /// Indicates that resource in Available state. + public static ExascaleDbStorageVaultLifecycleState Available { get; } = new ExascaleDbStorageVaultLifecycleState(AvailableValue); + /// Indicates that resource in Updating state. + public static ExascaleDbStorageVaultLifecycleState Updating { get; } = new ExascaleDbStorageVaultLifecycleState(UpdatingValue); + /// Indicates that resource in Terminating state. + public static ExascaleDbStorageVaultLifecycleState Terminating { get; } = new ExascaleDbStorageVaultLifecycleState(TerminatingValue); + /// Indicates that resource in Terminated state. + public static ExascaleDbStorageVaultLifecycleState Terminated { get; } = new ExascaleDbStorageVaultLifecycleState(TerminatedValue); + /// Indicates that resource in Failed state. + public static ExascaleDbStorageVaultLifecycleState Failed { get; } = new ExascaleDbStorageVaultLifecycleState(FailedValue); + /// Determines if two values are the same. + public static bool operator ==(ExascaleDbStorageVaultLifecycleState left, ExascaleDbStorageVaultLifecycleState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ExascaleDbStorageVaultLifecycleState left, ExascaleDbStorageVaultLifecycleState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ExascaleDbStorageVaultLifecycleState(string value) => new ExascaleDbStorageVaultLifecycleState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ExascaleDbStorageVaultLifecycleState other && Equals(other); + /// + public bool Equals(ExascaleDbStorageVaultLifecycleState 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/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDbStorageVaultListResult.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDbStorageVaultListResult.Serialization.cs new file mode 100644 index 000000000000..3770a3ddd200 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDbStorageVaultListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + internal partial class ExascaleDbStorageVaultListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExascaleDbStorageVaultListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ExascaleDbStorageVaultListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExascaleDbStorageVaultListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExascaleDbStorageVaultListResult(document.RootElement, options); + } + + internal static ExascaleDbStorageVaultListResult DeserializeExascaleDbStorageVaultListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ExascaleDbStorageVaultData.DeserializeExascaleDbStorageVaultData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExascaleDbStorageVaultListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExascaleDbStorageVaultListResult)} does not support writing '{options.Format}' format."); + } + } + + ExascaleDbStorageVaultListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeExascaleDbStorageVaultListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExascaleDbStorageVaultListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDbStorageVaultListResult.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDbStorageVaultListResult.cs new file mode 100644 index 000000000000..a68d8fd498e2 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDbStorageVaultListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// The response of a ExascaleDbStorageVault list operation. + internal partial class ExascaleDbStorageVaultListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The ExascaleDbStorageVault items on this page. + /// is null. + internal ExascaleDbStorageVaultListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The ExascaleDbStorageVault items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal ExascaleDbStorageVaultListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ExascaleDbStorageVaultListResult() + { + } + + /// The ExascaleDbStorageVault items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDbStorageVaultPatch.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDbStorageVaultPatch.Serialization.cs new file mode 100644 index 000000000000..87fde95c8ad2 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDbStorageVaultPatch.Serialization.cs @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + public partial class ExascaleDbStorageVaultPatch : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExascaleDbStorageVaultPatch)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ExascaleDbStorageVaultPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExascaleDbStorageVaultPatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExascaleDbStorageVaultPatch(document.RootElement, options); + } + + internal static ExascaleDbStorageVaultPatch DeserializeExascaleDbStorageVaultPatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary tags = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExascaleDbStorageVaultPatch(tags ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExascaleDbStorageVaultPatch)} does not support writing '{options.Format}' format."); + } + } + + ExascaleDbStorageVaultPatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeExascaleDbStorageVaultPatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExascaleDbStorageVaultPatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDbStorageVaultPatch.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDbStorageVaultPatch.cs new file mode 100644 index 000000000000..a623406ccb8f --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDbStorageVaultPatch.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// The type used for updating tags in ExascaleDbStorageVault resources. + public partial class ExascaleDbStorageVaultPatch + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ExascaleDbStorageVaultPatch() + { + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// Resource tags. + /// Keeps track of any properties unknown to the library. + internal ExascaleDbStorageVaultPatch(IDictionary tags, IDictionary serializedAdditionalRawData) + { + Tags = tags; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Resource tags. + public IDictionary Tags { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDbStorageVaultProperties.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDbStorageVaultProperties.Serialization.cs new file mode 100644 index 000000000000..f41710e24dec --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDbStorageVaultProperties.Serialization.cs @@ -0,0 +1,281 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + public partial class ExascaleDbStorageVaultProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExascaleDbStorageVaultProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(AdditionalFlashCacheInPercent)) + { + writer.WritePropertyName("additionalFlashCacheInPercent"u8); + writer.WriteNumberValue(AdditionalFlashCacheInPercent.Value); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + writer.WritePropertyName("highCapacityDatabaseStorageInput"u8); + writer.WriteObjectValue(HighCapacityDatabaseStorageInput, options); + if (options.Format != "W" && Optional.IsDefined(HighCapacityDatabaseStorage)) + { + writer.WritePropertyName("highCapacityDatabaseStorage"u8); + writer.WriteObjectValue(HighCapacityDatabaseStorage, options); + } + if (Optional.IsDefined(TimeZone)) + { + writer.WritePropertyName("timeZone"u8); + writer.WriteStringValue(TimeZone); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(LifecycleState)) + { + writer.WritePropertyName("lifecycleState"u8); + writer.WriteStringValue(LifecycleState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(LifecycleDetails)) + { + writer.WritePropertyName("lifecycleDetails"u8); + writer.WriteStringValue(LifecycleDetails); + } + if (options.Format != "W" && Optional.IsDefined(VmClusterCount)) + { + writer.WritePropertyName("vmClusterCount"u8); + writer.WriteNumberValue(VmClusterCount.Value); + } + if (options.Format != "W" && Optional.IsDefined(Ocid)) + { + writer.WritePropertyName("ocid"u8); + writer.WriteStringValue(Ocid); + } + if (options.Format != "W" && Optional.IsDefined(OciUri)) + { + writer.WritePropertyName("ociUrl"u8); + writer.WriteStringValue(OciUri.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ExascaleDbStorageVaultProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExascaleDbStorageVaultProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExascaleDbStorageVaultProperties(document.RootElement, options); + } + + internal static ExascaleDbStorageVaultProperties DeserializeExascaleDbStorageVaultProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int? additionalFlashCacheInPercent = default; + string description = default; + string displayName = default; + ExascaleDbStorageInputDetails highCapacityDatabaseStorageInput = default; + ExascaleDbStorageDetails highCapacityDatabaseStorage = default; + string timeZone = default; + AzureResourceProvisioningState? provisioningState = default; + ExascaleDbStorageVaultLifecycleState? lifecycleState = default; + string lifecycleDetails = default; + int? vmClusterCount = default; + string ocid = default; + Uri ociUrl = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("additionalFlashCacheInPercent"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + additionalFlashCacheInPercent = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("highCapacityDatabaseStorageInput"u8)) + { + highCapacityDatabaseStorageInput = ExascaleDbStorageInputDetails.DeserializeExascaleDbStorageInputDetails(property.Value, options); + continue; + } + if (property.NameEquals("highCapacityDatabaseStorage"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + highCapacityDatabaseStorage = ExascaleDbStorageDetails.DeserializeExascaleDbStorageDetails(property.Value, options); + continue; + } + if (property.NameEquals("timeZone"u8)) + { + timeZone = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new AzureResourceProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("lifecycleState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lifecycleState = new ExascaleDbStorageVaultLifecycleState(property.Value.GetString()); + continue; + } + if (property.NameEquals("lifecycleDetails"u8)) + { + lifecycleDetails = property.Value.GetString(); + continue; + } + if (property.NameEquals("vmClusterCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + vmClusterCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("ocid"u8)) + { + ocid = property.Value.GetString(); + continue; + } + if (property.NameEquals("ociUrl"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + ociUrl = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExascaleDbStorageVaultProperties( + additionalFlashCacheInPercent, + description, + displayName, + highCapacityDatabaseStorageInput, + highCapacityDatabaseStorage, + timeZone, + provisioningState, + lifecycleState, + lifecycleDetails, + vmClusterCount, + ocid, + ociUrl, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExascaleDbStorageVaultProperties)} does not support writing '{options.Format}' format."); + } + } + + ExascaleDbStorageVaultProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeExascaleDbStorageVaultProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExascaleDbStorageVaultProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDbStorageVaultProperties.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDbStorageVaultProperties.cs new file mode 100644 index 000000000000..65d84b30dc11 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDbStorageVaultProperties.cs @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// ExascaleDbStorageVault resource model. + public partial class ExascaleDbStorageVaultProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The user-friendly name for the Exadata Database Storage Vault. The name does not need to be unique. + /// Create exadata Database Storage Details. + /// or is null. + public ExascaleDbStorageVaultProperties(string displayName, ExascaleDbStorageInputDetails highCapacityDatabaseStorageInput) + { + Argument.AssertNotNull(displayName, nameof(displayName)); + Argument.AssertNotNull(highCapacityDatabaseStorageInput, nameof(highCapacityDatabaseStorageInput)); + + DisplayName = displayName; + HighCapacityDatabaseStorageInput = highCapacityDatabaseStorageInput; + } + + /// Initializes a new instance of . + /// The size of additional Flash Cache in percentage of High Capacity database storage. + /// Exadata Database Storage Vault description. + /// The user-friendly name for the Exadata Database Storage Vault. The name does not need to be unique. + /// Create exadata Database Storage Details. + /// Response exadata Database Storage Details. + /// The time zone that you want to use for the Exadata Database Storage Vault. + /// Exadata Database Storage Vault provisioning state. + /// Exadata Database Storage Vault lifecycle state. + /// Additional information about the current lifecycle state. + /// The number of Exadata VM clusters used the Exadata Database Storage Vault. + /// The OCID of the Exadata Database Storage Vault. + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + /// Keeps track of any properties unknown to the library. + internal ExascaleDbStorageVaultProperties(int? additionalFlashCacheInPercent, string description, string displayName, ExascaleDbStorageInputDetails highCapacityDatabaseStorageInput, ExascaleDbStorageDetails highCapacityDatabaseStorage, string timeZone, AzureResourceProvisioningState? provisioningState, ExascaleDbStorageVaultLifecycleState? lifecycleState, string lifecycleDetails, int? vmClusterCount, string ocid, Uri ociUri, IDictionary serializedAdditionalRawData) + { + AdditionalFlashCacheInPercent = additionalFlashCacheInPercent; + Description = description; + DisplayName = displayName; + HighCapacityDatabaseStorageInput = highCapacityDatabaseStorageInput; + HighCapacityDatabaseStorage = highCapacityDatabaseStorage; + TimeZone = timeZone; + ProvisioningState = provisioningState; + LifecycleState = lifecycleState; + LifecycleDetails = lifecycleDetails; + VmClusterCount = vmClusterCount; + Ocid = ocid; + OciUri = ociUri; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ExascaleDbStorageVaultProperties() + { + } + + /// The size of additional Flash Cache in percentage of High Capacity database storage. + public int? AdditionalFlashCacheInPercent { get; set; } + /// Exadata Database Storage Vault description. + public string Description { get; set; } + /// The user-friendly name for the Exadata Database Storage Vault. The name does not need to be unique. + public string DisplayName { get; set; } + /// Create exadata Database Storage Details. + internal ExascaleDbStorageInputDetails HighCapacityDatabaseStorageInput { get; set; } + /// Total Capacity. + public int? HighCapacityDatabaseStorageInputTotalSizeInGbs + { + get => HighCapacityDatabaseStorageInput is null ? default(int?) : HighCapacityDatabaseStorageInput.TotalSizeInGbs; + set + { + HighCapacityDatabaseStorageInput = value.HasValue ? new ExascaleDbStorageInputDetails(value.Value) : null; + } + } + + /// Response exadata Database Storage Details. + public ExascaleDbStorageDetails HighCapacityDatabaseStorage { get; } + /// The time zone that you want to use for the Exadata Database Storage Vault. + public string TimeZone { get; set; } + /// Exadata Database Storage Vault provisioning state. + public AzureResourceProvisioningState? ProvisioningState { get; } + /// Exadata Database Storage Vault lifecycle state. + public ExascaleDbStorageVaultLifecycleState? LifecycleState { get; } + /// Additional information about the current lifecycle state. + public string LifecycleDetails { get; } + /// The number of Exadata VM clusters used the Exadata Database Storage Vault. + public int? VmClusterCount { get; } + /// The OCID of the Exadata Database Storage Vault. + public string Ocid { get; } + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + public Uri OciUri { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/FileSystemConfigurationDetails.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/FileSystemConfigurationDetails.Serialization.cs new file mode 100644 index 000000000000..2e16921c5fc5 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/FileSystemConfigurationDetails.Serialization.cs @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + public partial class FileSystemConfigurationDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FileSystemConfigurationDetails)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(MountPoint)) + { + writer.WritePropertyName("mountPoint"u8); + writer.WriteStringValue(MountPoint); + } + if (Optional.IsDefined(FileSystemSizeGb)) + { + writer.WritePropertyName("fileSystemSizeGb"u8); + writer.WriteNumberValue(FileSystemSizeGb.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + FileSystemConfigurationDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FileSystemConfigurationDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFileSystemConfigurationDetails(document.RootElement, options); + } + + internal static FileSystemConfigurationDetails DeserializeFileSystemConfigurationDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string mountPoint = default; + int? fileSystemSizeGb = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("mountPoint"u8)) + { + mountPoint = property.Value.GetString(); + continue; + } + if (property.NameEquals("fileSystemSizeGb"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + fileSystemSizeGb = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FileSystemConfigurationDetails(mountPoint, fileSystemSizeGb, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(FileSystemConfigurationDetails)} does not support writing '{options.Format}' format."); + } + } + + FileSystemConfigurationDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeFileSystemConfigurationDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FileSystemConfigurationDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/FileSystemConfigurationDetails.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/FileSystemConfigurationDetails.cs new file mode 100644 index 000000000000..260492d0d899 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/FileSystemConfigurationDetails.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// File configuration options. + public partial class FileSystemConfigurationDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public FileSystemConfigurationDetails() + { + } + + /// Initializes a new instance of . + /// Mount path. + /// Size of the VM. + /// Keeps track of any properties unknown to the library. + internal FileSystemConfigurationDetails(string mountPoint, int? fileSystemSizeGb, IDictionary serializedAdditionalRawData) + { + MountPoint = mountPoint; + FileSystemSizeGb = fileSystemSizeGb; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Mount path. + public string MountPoint { get; set; } + /// Size of the VM. + public int? FileSystemSizeGb { get; set; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/FlexComponentListResult.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/FlexComponentListResult.Serialization.cs new file mode 100644 index 000000000000..ca02f1e1ecae --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/FlexComponentListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + internal partial class FlexComponentListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FlexComponentListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + FlexComponentListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FlexComponentListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFlexComponentListResult(document.RootElement, options); + } + + internal static FlexComponentListResult DeserializeFlexComponentListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(FlexComponentData.DeserializeFlexComponentData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FlexComponentListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(FlexComponentListResult)} does not support writing '{options.Format}' format."); + } + } + + FlexComponentListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeFlexComponentListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FlexComponentListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/FlexComponentListResult.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/FlexComponentListResult.cs new file mode 100644 index 000000000000..35dd7659fe1f --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/FlexComponentListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// The response of a FlexComponent list operation. + internal partial class FlexComponentListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The FlexComponent items on this page. + /// is null. + internal FlexComponentListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The FlexComponent items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal FlexComponentListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal FlexComponentListResult() + { + } + + /// The FlexComponent items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/FlexComponentProperties.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/FlexComponentProperties.Serialization.cs new file mode 100644 index 000000000000..8aea3244784d --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/FlexComponentProperties.Serialization.cs @@ -0,0 +1,267 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + public partial class FlexComponentProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FlexComponentProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(MinimumCoreCount)) + { + writer.WritePropertyName("minimumCoreCount"u8); + writer.WriteNumberValue(MinimumCoreCount.Value); + } + if (options.Format != "W" && Optional.IsDefined(AvailableCoreCount)) + { + writer.WritePropertyName("availableCoreCount"u8); + writer.WriteNumberValue(AvailableCoreCount.Value); + } + if (options.Format != "W" && Optional.IsDefined(AvailableDbStorageInGbs)) + { + writer.WritePropertyName("availableDbStorageInGbs"u8); + writer.WriteNumberValue(AvailableDbStorageInGbs.Value); + } + if (options.Format != "W" && Optional.IsDefined(RuntimeMinimumCoreCount)) + { + writer.WritePropertyName("runtimeMinimumCoreCount"u8); + writer.WriteNumberValue(RuntimeMinimumCoreCount.Value); + } + if (options.Format != "W" && Optional.IsDefined(Shape)) + { + writer.WritePropertyName("shape"u8); + writer.WriteStringValue(Shape); + } + if (options.Format != "W" && Optional.IsDefined(AvailableMemoryInGbs)) + { + writer.WritePropertyName("availableMemoryInGbs"u8); + writer.WriteNumberValue(AvailableMemoryInGbs.Value); + } + if (options.Format != "W" && Optional.IsDefined(AvailableLocalStorageInGbs)) + { + writer.WritePropertyName("availableLocalStorageInGbs"u8); + writer.WriteNumberValue(AvailableLocalStorageInGbs.Value); + } + if (options.Format != "W" && Optional.IsDefined(ComputeModel)) + { + writer.WritePropertyName("computeModel"u8); + writer.WriteStringValue(ComputeModel); + } + if (options.Format != "W" && Optional.IsDefined(HardwareType)) + { + writer.WritePropertyName("hardwareType"u8); + writer.WriteStringValue(HardwareType.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(DescriptionSummary)) + { + writer.WritePropertyName("descriptionSummary"u8); + writer.WriteStringValue(DescriptionSummary); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + FlexComponentProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FlexComponentProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFlexComponentProperties(document.RootElement, options); + } + + internal static FlexComponentProperties DeserializeFlexComponentProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int? minimumCoreCount = default; + int? availableCoreCount = default; + int? availableDbStorageInGbs = default; + int? runtimeMinimumCoreCount = default; + string shape = default; + int? availableMemoryInGbs = default; + int? availableLocalStorageInGbs = default; + string computeModel = default; + HardwareType? hardwareType = default; + string descriptionSummary = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("minimumCoreCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + minimumCoreCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("availableCoreCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + availableCoreCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("availableDbStorageInGbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + availableDbStorageInGbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("runtimeMinimumCoreCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + runtimeMinimumCoreCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("shape"u8)) + { + shape = property.Value.GetString(); + continue; + } + if (property.NameEquals("availableMemoryInGbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + availableMemoryInGbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("availableLocalStorageInGbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + availableLocalStorageInGbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("computeModel"u8)) + { + computeModel = property.Value.GetString(); + continue; + } + if (property.NameEquals("hardwareType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + hardwareType = new HardwareType(property.Value.GetString()); + continue; + } + if (property.NameEquals("descriptionSummary"u8)) + { + descriptionSummary = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FlexComponentProperties( + minimumCoreCount, + availableCoreCount, + availableDbStorageInGbs, + runtimeMinimumCoreCount, + shape, + availableMemoryInGbs, + availableLocalStorageInGbs, + computeModel, + hardwareType, + descriptionSummary, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(FlexComponentProperties)} does not support writing '{options.Format}' format."); + } + } + + FlexComponentProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeFlexComponentProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FlexComponentProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/FlexComponentProperties.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/FlexComponentProperties.cs new file mode 100644 index 000000000000..3854f94d2886 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/FlexComponentProperties.cs @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// FlexComponent resource model. + public partial class FlexComponentProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal FlexComponentProperties() + { + } + + /// Initializes a new instance of . + /// The minimum number of CPU cores that can be enabled on the DB Server for this Flex Component. + /// The maximum number of CPU cores that can be enabled on the DB Server for this Flex Component. + /// The maximum storage that can be enabled on the Storage Server for this Flex Component. + /// The runtime minimum number of CPU cores that can be enabled for this Flex Component. + /// The name of the DB system shape for this Flex Component. + /// The maximum memory size that can be enabled on the DB Server for this Flex Component. + /// The maximum local storage that can be enabled on the DB Server for this Flex Component. + /// The compute model of the DB Server for this Flex Component. + /// The hardware type of the DB (Compute) or Storage (Cell) Server for this Flex Component. + /// The description summary for this Flex Component. + /// Keeps track of any properties unknown to the library. + internal FlexComponentProperties(int? minimumCoreCount, int? availableCoreCount, int? availableDbStorageInGbs, int? runtimeMinimumCoreCount, string shape, int? availableMemoryInGbs, int? availableLocalStorageInGbs, string computeModel, HardwareType? hardwareType, string descriptionSummary, IDictionary serializedAdditionalRawData) + { + MinimumCoreCount = minimumCoreCount; + AvailableCoreCount = availableCoreCount; + AvailableDbStorageInGbs = availableDbStorageInGbs; + RuntimeMinimumCoreCount = runtimeMinimumCoreCount; + Shape = shape; + AvailableMemoryInGbs = availableMemoryInGbs; + AvailableLocalStorageInGbs = availableLocalStorageInGbs; + ComputeModel = computeModel; + HardwareType = hardwareType; + DescriptionSummary = descriptionSummary; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The minimum number of CPU cores that can be enabled on the DB Server for this Flex Component. + public int? MinimumCoreCount { get; } + /// The maximum number of CPU cores that can be enabled on the DB Server for this Flex Component. + public int? AvailableCoreCount { get; } + /// The maximum storage that can be enabled on the Storage Server for this Flex Component. + public int? AvailableDbStorageInGbs { get; } + /// The runtime minimum number of CPU cores that can be enabled for this Flex Component. + public int? RuntimeMinimumCoreCount { get; } + /// The name of the DB system shape for this Flex Component. + public string Shape { get; } + /// The maximum memory size that can be enabled on the DB Server for this Flex Component. + public int? AvailableMemoryInGbs { get; } + /// The maximum local storage that can be enabled on the DB Server for this Flex Component. + public int? AvailableLocalStorageInGbs { get; } + /// The compute model of the DB Server for this Flex Component. + public string ComputeModel { get; } + /// The hardware type of the DB (Compute) or Storage (Cell) Server for this Flex Component. + public HardwareType? HardwareType { get; } + /// The description summary for this Flex Component. + public string DescriptionSummary { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/GenerateAutonomousDatabaseWalletDetails.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/GenerateAutonomousDatabaseWalletDetails.Serialization.cs new file mode 100644 index 000000000000..981e327c3cfd --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/GenerateAutonomousDatabaseWalletDetails.Serialization.cs @@ -0,0 +1,156 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + public partial class GenerateAutonomousDatabaseWalletDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(GenerateAutonomousDatabaseWalletDetails)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(GenerateType)) + { + writer.WritePropertyName("generateType"u8); + writer.WriteStringValue(GenerateType.Value.ToString()); + } + if (Optional.IsDefined(IsRegional)) + { + writer.WritePropertyName("isRegional"u8); + writer.WriteBooleanValue(IsRegional.Value); + } + writer.WritePropertyName("password"u8); + writer.WriteStringValue(Password); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + GenerateAutonomousDatabaseWalletDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(GenerateAutonomousDatabaseWalletDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeGenerateAutonomousDatabaseWalletDetails(document.RootElement, options); + } + + internal static GenerateAutonomousDatabaseWalletDetails DeserializeGenerateAutonomousDatabaseWalletDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + GenerateType? generateType = default; + bool? isRegional = default; + string password = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("generateType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + generateType = new GenerateType(property.Value.GetString()); + continue; + } + if (property.NameEquals("isRegional"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isRegional = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("password"u8)) + { + password = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new GenerateAutonomousDatabaseWalletDetails(generateType, isRegional, password, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(GenerateAutonomousDatabaseWalletDetails)} does not support writing '{options.Format}' format."); + } + } + + GenerateAutonomousDatabaseWalletDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeGenerateAutonomousDatabaseWalletDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(GenerateAutonomousDatabaseWalletDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/GenerateAutonomousDatabaseWalletDetails.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/GenerateAutonomousDatabaseWalletDetails.cs new file mode 100644 index 000000000000..9854b4251fc1 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/GenerateAutonomousDatabaseWalletDetails.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// Autonomous Database Generate Wallet resource model. + public partial class GenerateAutonomousDatabaseWalletDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The password to encrypt the keys inside the wallet. + /// is null. + public GenerateAutonomousDatabaseWalletDetails(string password) + { + Argument.AssertNotNull(password, nameof(password)); + + Password = password; + } + + /// Initializes a new instance of . + /// The type of wallet to generate. + /// True when requesting regional connection strings in PDB connect info, applicable to cross-region DG only. + /// The password to encrypt the keys inside the wallet. + /// Keeps track of any properties unknown to the library. + internal GenerateAutonomousDatabaseWalletDetails(GenerateType? generateType, bool? isRegional, string password, IDictionary serializedAdditionalRawData) + { + GenerateType = generateType; + IsRegional = isRegional; + Password = password; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal GenerateAutonomousDatabaseWalletDetails() + { + } + + /// The type of wallet to generate. + public GenerateType? GenerateType { get; set; } + /// True when requesting regional connection strings in PDB connect info, applicable to cross-region DG only. + public bool? IsRegional { get; set; } + /// The password to encrypt the keys inside the wallet. + public string Password { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/GenerateType.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/GenerateType.cs new file mode 100644 index 000000000000..df927b5554e2 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/GenerateType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// Generate type enum. + public readonly partial struct GenerateType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public GenerateType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SingleValue = "Single"; + private const string AllValue = "All"; + + /// Generate single. + public static GenerateType Single { get; } = new GenerateType(SingleValue); + /// Generate all. + public static GenerateType All { get; } = new GenerateType(AllValue); + /// Determines if two values are the same. + public static bool operator ==(GenerateType left, GenerateType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(GenerateType left, GenerateType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator GenerateType(string value) => new GenerateType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is GenerateType other && Equals(other); + /// + public bool Equals(GenerateType 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/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/GiMinorVersionListResult.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/GiMinorVersionListResult.Serialization.cs new file mode 100644 index 000000000000..988ccb84a18b --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/GiMinorVersionListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + internal partial class GiMinorVersionListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(GiMinorVersionListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + GiMinorVersionListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(GiMinorVersionListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeGiMinorVersionListResult(document.RootElement, options); + } + + internal static GiMinorVersionListResult DeserializeGiMinorVersionListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(GiMinorVersionData.DeserializeGiMinorVersionData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new GiMinorVersionListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(GiMinorVersionListResult)} does not support writing '{options.Format}' format."); + } + } + + GiMinorVersionListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeGiMinorVersionListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(GiMinorVersionListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/GiMinorVersionListResult.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/GiMinorVersionListResult.cs new file mode 100644 index 000000000000..6f40be5d6c95 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/GiMinorVersionListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// The response of a GiMinorVersion list operation. + internal partial class GiMinorVersionListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The GiMinorVersion items on this page. + /// is null. + internal GiMinorVersionListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The GiMinorVersion items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal GiMinorVersionListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal GiMinorVersionListResult() + { + } + + /// The GiMinorVersion items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/GiMinorVersionProperties.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/GiMinorVersionProperties.Serialization.cs new file mode 100644 index 000000000000..cc1ddf6f1582 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/GiMinorVersionProperties.Serialization.cs @@ -0,0 +1,137 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + public partial class GiMinorVersionProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(GiMinorVersionProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("version"u8); + writer.WriteStringValue(Version); + if (Optional.IsDefined(GridImageOcid)) + { + writer.WritePropertyName("gridImageOcid"u8); + writer.WriteStringValue(GridImageOcid); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + GiMinorVersionProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(GiMinorVersionProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeGiMinorVersionProperties(document.RootElement, options); + } + + internal static GiMinorVersionProperties DeserializeGiMinorVersionProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string version = default; + string gridImageOcid = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("version"u8)) + { + version = property.Value.GetString(); + continue; + } + if (property.NameEquals("gridImageOcid"u8)) + { + gridImageOcid = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new GiMinorVersionProperties(version, gridImageOcid, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(GiMinorVersionProperties)} does not support writing '{options.Format}' format."); + } + } + + GiMinorVersionProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeGiMinorVersionProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(GiMinorVersionProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/GiMinorVersionProperties.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/GiMinorVersionProperties.cs new file mode 100644 index 000000000000..d4c6d427a466 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/GiMinorVersionProperties.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// The Oracle Grid Infrastructure (GI) minor version properties. + public partial class GiMinorVersionProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// A valid Oracle Grid Infrastructure (GI) software version. + /// is null. + internal GiMinorVersionProperties(string version) + { + Argument.AssertNotNull(version, nameof(version)); + + Version = version; + } + + /// Initializes a new instance of . + /// A valid Oracle Grid Infrastructure (GI) software version. + /// Grid Infrastructure Image Id. + /// Keeps track of any properties unknown to the library. + internal GiMinorVersionProperties(string version, string gridImageOcid, IDictionary serializedAdditionalRawData) + { + Version = version; + GridImageOcid = gridImageOcid; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal GiMinorVersionProperties() + { + } + + /// A valid Oracle Grid Infrastructure (GI) software version. + public string Version { get; } + /// Grid Infrastructure Image Id. + public string GridImageOcid { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/GiVersionListResult.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/GiVersionListResult.Serialization.cs new file mode 100644 index 000000000000..88dab947d2fe --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/GiVersionListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + internal partial class GiVersionListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(GiVersionListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + GiVersionListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(GiVersionListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeGiVersionListResult(document.RootElement, options); + } + + internal static GiVersionListResult DeserializeGiVersionListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(GiVersionData.DeserializeGiVersionData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new GiVersionListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(GiVersionListResult)} does not support writing '{options.Format}' format."); + } + } + + GiVersionListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeGiVersionListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(GiVersionListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/GiVersionListResult.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/GiVersionListResult.cs new file mode 100644 index 000000000000..c88a2088e6e5 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/GiVersionListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// The response of a GiVersion list operation. + internal partial class GiVersionListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The GiVersion items on this page. + /// is null. + internal GiVersionListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The GiVersion items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal GiVersionListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal GiVersionListResult() + { + } + + /// The GiVersion items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/GiVersionProperties.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/GiVersionProperties.Serialization.cs new file mode 100644 index 000000000000..e0b51d8bba0b --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/GiVersionProperties.Serialization.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + internal partial class GiVersionProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(GiVersionProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("version"u8); + writer.WriteStringValue(Version); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + GiVersionProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(GiVersionProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeGiVersionProperties(document.RootElement, options); + } + + internal static GiVersionProperties DeserializeGiVersionProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string version = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("version"u8)) + { + version = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new GiVersionProperties(version, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(GiVersionProperties)} does not support writing '{options.Format}' format."); + } + } + + GiVersionProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeGiVersionProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(GiVersionProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/GiVersionProperties.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/GiVersionProperties.cs new file mode 100644 index 000000000000..eff4bd992ef6 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/GiVersionProperties.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// GiVersion resource model. + internal partial class GiVersionProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// A valid Oracle Grid Infrastructure (GI) software version. + /// is null. + internal GiVersionProperties(string version) + { + Argument.AssertNotNull(version, nameof(version)); + + Version = version; + } + + /// Initializes a new instance of . + /// A valid Oracle Grid Infrastructure (GI) software version. + /// Keeps track of any properties unknown to the library. + internal GiVersionProperties(string version, IDictionary serializedAdditionalRawData) + { + Version = version; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal GiVersionProperties() + { + } + + /// A valid Oracle Grid Infrastructure (GI) software version. + public string Version { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/GridImageType.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/GridImageType.cs new file mode 100644 index 000000000000..9e8c86a38d34 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/GridImageType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// GridImageType enum. + public readonly partial struct GridImageType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public GridImageType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ReleaseUpdateValue = "ReleaseUpdate"; + private const string CustomImageValue = "CustomImage"; + + /// Release update. + public static GridImageType ReleaseUpdate { get; } = new GridImageType(ReleaseUpdateValue); + /// Custom image. + public static GridImageType CustomImage { get; } = new GridImageType(CustomImageValue); + /// Determines if two values are the same. + public static bool operator ==(GridImageType left, GridImageType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(GridImageType left, GridImageType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator GridImageType(string value) => new GridImageType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is GridImageType other && Equals(other); + /// + public bool Equals(GridImageType 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/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/HardwareType.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/HardwareType.cs new file mode 100644 index 000000000000..1738d2c36be3 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/HardwareType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// Hardware Type enum. + public readonly partial struct HardwareType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public HardwareType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string COMPUTEValue = "COMPUTE"; + private const string CELLValue = "CELL"; + + /// Hardware type is Database Server. + public static HardwareType COMPUTE { get; } = new HardwareType(COMPUTEValue); + /// Hardware type is Storage Server. + public static HardwareType CELL { get; } = new HardwareType(CELLValue); + /// Determines if two values are the same. + public static bool operator ==(HardwareType left, HardwareType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(HardwareType left, HardwareType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator HardwareType(string value) => new HardwareType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is HardwareType other && Equals(other); + /// + public bool Equals(HardwareType 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/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/HostFormatType.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/HostFormatType.cs new file mode 100644 index 000000000000..97a53491ba07 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/HostFormatType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// Host format type enum. + public readonly partial struct HostFormatType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public HostFormatType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string FqdnValue = "Fqdn"; + private const string IPValue = "Ip"; + + /// FQDN format. + public static HostFormatType Fqdn { get; } = new HostFormatType(FqdnValue); + /// IP format. + public static HostFormatType IP { get; } = new HostFormatType(IPValue); + /// Determines if two values are the same. + public static bool operator ==(HostFormatType left, HostFormatType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(HostFormatType left, HostFormatType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator HostFormatType(string value) => new HostFormatType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is HostFormatType other && Equals(other); + /// + public bool Equals(HostFormatType 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/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/Intent.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/Intent.cs new file mode 100644 index 000000000000..4cbc5e4037eb --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/Intent.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// Intent enum. + public readonly partial struct Intent : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public Intent(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string RetainValue = "Retain"; + private const string ResetValue = "Reset"; + + /// Retain intent. + public static Intent Retain { get; } = new Intent(RetainValue); + /// Reset intent. + public static Intent Reset { get; } = new Intent(ResetValue); + /// Determines if two values are the same. + public static bool operator ==(Intent left, Intent right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(Intent left, Intent right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator Intent(string value) => new Intent(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is Intent other && Equals(other); + /// + public bool Equals(Intent 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/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/IormLifecycleState.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/IormLifecycleState.cs new file mode 100644 index 000000000000..9952bb63c49f --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/IormLifecycleState.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// ORM lifecycle state enum. + public readonly partial struct IormLifecycleState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public IormLifecycleState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string BootStrappingValue = "BootStrapping"; + private const string EnabledValue = "Enabled"; + private const string DisabledValue = "Disabled"; + private const string UpdatingValue = "Updating"; + private const string FailedValue = "Failed"; + + /// Indicates that resource in Provisioning state. + public static IormLifecycleState BootStrapping { get; } = new IormLifecycleState(BootStrappingValue); + /// Indicates that resource in Enabled state. + public static IormLifecycleState Enabled { get; } = new IormLifecycleState(EnabledValue); + /// Indicates that resource in Disabled state. + public static IormLifecycleState Disabled { get; } = new IormLifecycleState(DisabledValue); + /// Indicates that resource in Updating state. + public static IormLifecycleState Updating { get; } = new IormLifecycleState(UpdatingValue); + /// Indicates that resource in Failed state. + public static IormLifecycleState Failed { get; } = new IormLifecycleState(FailedValue); + /// Determines if two values are the same. + public static bool operator ==(IormLifecycleState left, IormLifecycleState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(IormLifecycleState left, IormLifecycleState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator IormLifecycleState(string value) => new IormLifecycleState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is IormLifecycleState other && Equals(other); + /// + public bool Equals(IormLifecycleState 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/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/LicenseModel.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/LicenseModel.cs new file mode 100644 index 000000000000..dccf102bb701 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/LicenseModel.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// LicenseModel enum. + public readonly partial struct LicenseModel : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public LicenseModel(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string LicenseIncludedValue = "LicenseIncluded"; + private const string BringYourOwnLicenseValue = "BringYourOwnLicense"; + + /// License included. + public static LicenseModel LicenseIncluded { get; } = new LicenseModel(LicenseIncludedValue); + /// Bring Your Own License. + public static LicenseModel BringYourOwnLicense { get; } = new LicenseModel(BringYourOwnLicenseValue); + /// Determines if two values are the same. + public static bool operator ==(LicenseModel left, LicenseModel right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(LicenseModel left, LicenseModel right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator LicenseModel(string value) => new LicenseModel(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is LicenseModel other && Equals(other); + /// + public bool Equals(LicenseModel 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/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/LongTermBackUpScheduleDetails.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/LongTermBackUpScheduleDetails.Serialization.cs new file mode 100644 index 000000000000..12d6ee4c6f69 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/LongTermBackUpScheduleDetails.Serialization.cs @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + public partial class LongTermBackUpScheduleDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(LongTermBackUpScheduleDetails)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(RepeatCadence)) + { + writer.WritePropertyName("repeatCadence"u8); + writer.WriteStringValue(RepeatCadence.Value.ToString()); + } + if (Optional.IsDefined(TimeOfBackup)) + { + writer.WritePropertyName("timeOfBackup"u8); + writer.WriteStringValue(TimeOfBackup.Value, "O"); + } + if (Optional.IsDefined(RetentionPeriodInDays)) + { + writer.WritePropertyName("retentionPeriodInDays"u8); + writer.WriteNumberValue(RetentionPeriodInDays.Value); + } + if (Optional.IsDefined(IsDisabled)) + { + writer.WritePropertyName("isDisabled"u8); + writer.WriteBooleanValue(IsDisabled.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + LongTermBackUpScheduleDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(LongTermBackUpScheduleDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeLongTermBackUpScheduleDetails(document.RootElement, options); + } + + internal static LongTermBackUpScheduleDetails DeserializeLongTermBackUpScheduleDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + RepeatCadenceType? repeatCadence = default; + DateTimeOffset? timeOfBackup = default; + int? retentionPeriodInDays = default; + bool? isDisabled = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("repeatCadence"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + repeatCadence = new RepeatCadenceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("timeOfBackup"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeOfBackup = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("retentionPeriodInDays"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + retentionPeriodInDays = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("isDisabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isDisabled = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new LongTermBackUpScheduleDetails(repeatCadence, timeOfBackup, retentionPeriodInDays, isDisabled, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(LongTermBackUpScheduleDetails)} does not support writing '{options.Format}' format."); + } + } + + LongTermBackUpScheduleDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeLongTermBackUpScheduleDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(LongTermBackUpScheduleDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/LongTermBackUpScheduleDetails.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/LongTermBackUpScheduleDetails.cs new file mode 100644 index 000000000000..87c1a3c5fd83 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/LongTermBackUpScheduleDetails.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// Details for the long-term backup schedule. + public partial class LongTermBackUpScheduleDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public LongTermBackUpScheduleDetails() + { + } + + /// Initializes a new instance of . + /// The frequency of the long-term backup schedule. + /// The timestamp for the long-term backup schedule. For a MONTHLY cadence, months having fewer days than the provided date will have the backup taken on the last day of that month. + /// Retention period, in days, for backups. + /// Indicates if the long-term backup schedule should be deleted. The default value is `FALSE`. + /// Keeps track of any properties unknown to the library. + internal LongTermBackUpScheduleDetails(RepeatCadenceType? repeatCadence, DateTimeOffset? timeOfBackup, int? retentionPeriodInDays, bool? isDisabled, IDictionary serializedAdditionalRawData) + { + RepeatCadence = repeatCadence; + TimeOfBackup = timeOfBackup; + RetentionPeriodInDays = retentionPeriodInDays; + IsDisabled = isDisabled; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The frequency of the long-term backup schedule. + public RepeatCadenceType? RepeatCadence { get; set; } + /// The timestamp for the long-term backup schedule. For a MONTHLY cadence, months having fewer days than the provided date will have the backup taken on the last day of that month. + public DateTimeOffset? TimeOfBackup { get; set; } + /// Retention period, in days, for backups. + public int? RetentionPeriodInDays { get; set; } + /// Indicates if the long-term backup schedule should be deleted. The default value is `FALSE`. + public bool? IsDisabled { get; set; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/MaintenanceWindow.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/MaintenanceWindow.Serialization.cs new file mode 100644 index 000000000000..c54903899a95 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/MaintenanceWindow.Serialization.cs @@ -0,0 +1,319 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + public partial class MaintenanceWindow : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(MaintenanceWindow)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Preference)) + { + writer.WritePropertyName("preference"u8); + writer.WriteStringValue(Preference.Value.ToString()); + } + if (Optional.IsCollectionDefined(Months)) + { + writer.WritePropertyName("months"u8); + writer.WriteStartArray(); + foreach (var item in Months) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(WeeksOfMonth)) + { + writer.WritePropertyName("weeksOfMonth"u8); + writer.WriteStartArray(); + foreach (var item in WeeksOfMonth) + { + writer.WriteNumberValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(DaysOfWeek)) + { + writer.WritePropertyName("daysOfWeek"u8); + writer.WriteStartArray(); + foreach (var item in DaysOfWeek) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(HoursOfDay)) + { + writer.WritePropertyName("hoursOfDay"u8); + writer.WriteStartArray(); + foreach (var item in HoursOfDay) + { + writer.WriteNumberValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(LeadTimeInWeeks)) + { + writer.WritePropertyName("leadTimeInWeeks"u8); + writer.WriteNumberValue(LeadTimeInWeeks.Value); + } + if (Optional.IsDefined(PatchingMode)) + { + writer.WritePropertyName("patchingMode"u8); + writer.WriteStringValue(PatchingMode.Value.ToString()); + } + if (Optional.IsDefined(CustomActionTimeoutInMins)) + { + writer.WritePropertyName("customActionTimeoutInMins"u8); + writer.WriteNumberValue(CustomActionTimeoutInMins.Value); + } + if (Optional.IsDefined(IsCustomActionTimeoutEnabled)) + { + writer.WritePropertyName("isCustomActionTimeoutEnabled"u8); + writer.WriteBooleanValue(IsCustomActionTimeoutEnabled.Value); + } + if (Optional.IsDefined(IsMonthlyPatchingEnabled)) + { + writer.WritePropertyName("isMonthlyPatchingEnabled"u8); + writer.WriteBooleanValue(IsMonthlyPatchingEnabled.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + MaintenanceWindow IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(MaintenanceWindow)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeMaintenanceWindow(document.RootElement, options); + } + + internal static MaintenanceWindow DeserializeMaintenanceWindow(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Preference? preference = default; + IList months = default; + IList weeksOfMonth = default; + IList daysOfWeek = default; + IList hoursOfDay = default; + int? leadTimeInWeeks = default; + PatchingMode? patchingMode = default; + int? customActionTimeoutInMins = default; + bool? isCustomActionTimeoutEnabled = default; + bool? isMonthlyPatchingEnabled = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("preference"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + preference = new Preference(property.Value.GetString()); + continue; + } + if (property.NameEquals("months"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(Month.DeserializeMonth(item, options)); + } + months = array; + continue; + } + if (property.NameEquals("weeksOfMonth"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetInt32()); + } + weeksOfMonth = array; + continue; + } + if (property.NameEquals("daysOfWeek"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DayOfWeek.DeserializeDayOfWeek(item, options)); + } + daysOfWeek = array; + continue; + } + if (property.NameEquals("hoursOfDay"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetInt32()); + } + hoursOfDay = array; + continue; + } + if (property.NameEquals("leadTimeInWeeks"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + leadTimeInWeeks = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("patchingMode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + patchingMode = new PatchingMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("customActionTimeoutInMins"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + customActionTimeoutInMins = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("isCustomActionTimeoutEnabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isCustomActionTimeoutEnabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("isMonthlyPatchingEnabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isMonthlyPatchingEnabled = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new MaintenanceWindow( + preference, + months ?? new ChangeTrackingList(), + weeksOfMonth ?? new ChangeTrackingList(), + daysOfWeek ?? new ChangeTrackingList(), + hoursOfDay ?? new ChangeTrackingList(), + leadTimeInWeeks, + patchingMode, + customActionTimeoutInMins, + isCustomActionTimeoutEnabled, + isMonthlyPatchingEnabled, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(MaintenanceWindow)} does not support writing '{options.Format}' format."); + } + } + + MaintenanceWindow IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeMaintenanceWindow(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(MaintenanceWindow)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/MaintenanceWindow.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/MaintenanceWindow.cs new file mode 100644 index 000000000000..00bda7d97765 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/MaintenanceWindow.cs @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// MaintenanceWindow resource properties. + public partial class MaintenanceWindow + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public MaintenanceWindow() + { + Months = new ChangeTrackingList(); + WeeksOfMonth = new ChangeTrackingList(); + DaysOfWeek = new ChangeTrackingList(); + HoursOfDay = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The maintenance window scheduling preference. + /// Months during the year when maintenance should be performed. + /// Weeks during the month when maintenance should be performed. Weeks start on the 1st, 8th, 15th, and 22nd days of the month, and have a duration of 7 days. Weeks start and end based on calendar dates, not days of the week. For example, to allow maintenance during the 2nd week of the month (from the 8th day to the 14th day of the month), use the value 2. Maintenance cannot be scheduled for the fifth week of months that contain more than 28 days. Note that this parameter works in conjunction with the daysOfWeek and hoursOfDay parameters to allow you to specify specific days of the week and hours that maintenance will be performed. + /// Days during the week when maintenance should be performed. + /// The window of hours during the day when maintenance should be performed. The window is a 4 hour slot. Valid values are - 0 - represents time slot 0:00 - 3:59 UTC - 4 - represents time slot 4:00 - 7:59 UTC - 8 - represents time slot 8:00 - 11:59 UTC - 12 - represents time slot 12:00 - 15:59 UTC - 16 - represents time slot 16:00 - 19:59 UTC - 20 - represents time slot 20:00 - 23:59 UTC. + /// Lead time window allows user to set a lead time to prepare for a down time. The lead time is in weeks and valid value is between 1 to 4. + /// Cloud Exadata infrastructure node patching method. + /// Determines the amount of time the system will wait before the start of each database server patching operation. Custom action timeout is in minutes and valid value is between 15 to 120 (inclusive). + /// If true, enables the configuration of a custom action timeout (waiting period) between database server patching operations. + /// is Monthly Patching Enabled. + /// Keeps track of any properties unknown to the library. + internal MaintenanceWindow(Preference? preference, IList months, IList weeksOfMonth, IList daysOfWeek, IList hoursOfDay, int? leadTimeInWeeks, PatchingMode? patchingMode, int? customActionTimeoutInMins, bool? isCustomActionTimeoutEnabled, bool? isMonthlyPatchingEnabled, IDictionary serializedAdditionalRawData) + { + Preference = preference; + Months = months; + WeeksOfMonth = weeksOfMonth; + DaysOfWeek = daysOfWeek; + HoursOfDay = hoursOfDay; + LeadTimeInWeeks = leadTimeInWeeks; + PatchingMode = patchingMode; + CustomActionTimeoutInMins = customActionTimeoutInMins; + IsCustomActionTimeoutEnabled = isCustomActionTimeoutEnabled; + IsMonthlyPatchingEnabled = isMonthlyPatchingEnabled; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The maintenance window scheduling preference. + public Preference? Preference { get; set; } + /// Months during the year when maintenance should be performed. + public IList Months { get; } + /// Weeks during the month when maintenance should be performed. Weeks start on the 1st, 8th, 15th, and 22nd days of the month, and have a duration of 7 days. Weeks start and end based on calendar dates, not days of the week. For example, to allow maintenance during the 2nd week of the month (from the 8th day to the 14th day of the month), use the value 2. Maintenance cannot be scheduled for the fifth week of months that contain more than 28 days. Note that this parameter works in conjunction with the daysOfWeek and hoursOfDay parameters to allow you to specify specific days of the week and hours that maintenance will be performed. + public IList WeeksOfMonth { get; } + /// Days during the week when maintenance should be performed. + public IList DaysOfWeek { get; } + /// The window of hours during the day when maintenance should be performed. The window is a 4 hour slot. Valid values are - 0 - represents time slot 0:00 - 3:59 UTC - 4 - represents time slot 4:00 - 7:59 UTC - 8 - represents time slot 8:00 - 11:59 UTC - 12 - represents time slot 12:00 - 15:59 UTC - 16 - represents time slot 16:00 - 19:59 UTC - 20 - represents time slot 20:00 - 23:59 UTC. + public IList HoursOfDay { get; } + /// Lead time window allows user to set a lead time to prepare for a down time. The lead time is in weeks and valid value is between 1 to 4. + public int? LeadTimeInWeeks { get; set; } + /// Cloud Exadata infrastructure node patching method. + public PatchingMode? PatchingMode { get; set; } + /// Determines the amount of time the system will wait before the start of each database server patching operation. Custom action timeout is in minutes and valid value is between 15 to 120 (inclusive). + public int? CustomActionTimeoutInMins { get; set; } + /// If true, enables the configuration of a custom action timeout (waiting period) between database server patching operations. + public bool? IsCustomActionTimeoutEnabled { get; set; } + /// is Monthly Patching Enabled. + public bool? IsMonthlyPatchingEnabled { get; set; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/Month.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/Month.Serialization.cs new file mode 100644 index 000000000000..8c8f804e786b --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/Month.Serialization.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + public partial class Month : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(Month)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + Month IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(Month)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeMonth(document.RootElement, options); + } + + internal static Month DeserializeMonth(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + MonthName name = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = new MonthName(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new Month(name, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(Month)} does not support writing '{options.Format}' format."); + } + } + + Month IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeMonth(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(Month)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/Month.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/Month.cs new file mode 100644 index 000000000000..c27fcded6a90 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/Month.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// Month resource properties. + public partial class Month + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Name of the month of the year. + public Month(MonthName name) + { + Name = name; + } + + /// Initializes a new instance of . + /// Name of the month of the year. + /// Keeps track of any properties unknown to the library. + internal Month(MonthName name, IDictionary serializedAdditionalRawData) + { + Name = name; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal Month() + { + } + + /// Name of the month of the year. + public MonthName Name { get; set; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/MonthName.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/MonthName.cs new file mode 100644 index 000000000000..ed4fa2181db9 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/MonthName.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// MonthName enum. + public readonly partial struct MonthName : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MonthName(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string JanuaryValue = "January"; + private const string FebruaryValue = "February"; + private const string MarchValue = "March"; + private const string AprilValue = "April"; + private const string MayValue = "May"; + private const string JuneValue = "June"; + private const string JulyValue = "July"; + private const string AugustValue = "August"; + private const string SeptemberValue = "September"; + private const string OctoberValue = "October"; + private const string NovemberValue = "November"; + private const string DecemberValue = "December"; + + /// January value. + public static MonthName January { get; } = new MonthName(JanuaryValue); + /// February value. + public static MonthName February { get; } = new MonthName(FebruaryValue); + /// March value. + public static MonthName March { get; } = new MonthName(MarchValue); + /// April value. + public static MonthName April { get; } = new MonthName(AprilValue); + /// May value. + public static MonthName May { get; } = new MonthName(MayValue); + /// June value. + public static MonthName June { get; } = new MonthName(JuneValue); + /// July value. + public static MonthName July { get; } = new MonthName(JulyValue); + /// August value. + public static MonthName August { get; } = new MonthName(AugustValue); + /// September value. + public static MonthName September { get; } = new MonthName(SeptemberValue); + /// October value. + public static MonthName October { get; } = new MonthName(OctoberValue); + /// November value. + public static MonthName November { get; } = new MonthName(NovemberValue); + /// December value. + public static MonthName December { get; } = new MonthName(DecemberValue); + /// Determines if two values are the same. + public static bool operator ==(MonthName left, MonthName right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MonthName left, MonthName right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator MonthName(string value) => new MonthName(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MonthName other && Equals(other); + /// + public bool Equals(MonthName 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/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/NsgCidr.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/NsgCidr.Serialization.cs new file mode 100644 index 000000000000..536b7285465a --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/NsgCidr.Serialization.cs @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + public partial class NsgCidr : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NsgCidr)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("source"u8); + writer.WriteStringValue(Source); + if (Optional.IsDefined(DestinationPortRange)) + { + writer.WritePropertyName("destinationPortRange"u8); + writer.WriteObjectValue(DestinationPortRange, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + NsgCidr IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NsgCidr)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNsgCidr(document.RootElement, options); + } + + internal static NsgCidr DeserializeNsgCidr(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string source = default; + PortRange destinationPortRange = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("source"u8)) + { + source = property.Value.GetString(); + continue; + } + if (property.NameEquals("destinationPortRange"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + destinationPortRange = PortRange.DeserializePortRange(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NsgCidr(source, destinationPortRange, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(NsgCidr)} does not support writing '{options.Format}' format."); + } + } + + NsgCidr IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeNsgCidr(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NsgCidr)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/NsgCidr.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/NsgCidr.cs new file mode 100644 index 000000000000..d2a11d478748 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/NsgCidr.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// A rule for allowing inbound (INGRESS) IP packets. + public partial class NsgCidr + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Conceptually, this is the range of IP addresses that a packet coming into the instance can come from. + /// is null. + public NsgCidr(string source) + { + Argument.AssertNotNull(source, nameof(source)); + + Source = source; + } + + /// Initializes a new instance of . + /// Conceptually, this is the range of IP addresses that a packet coming into the instance can come from. + /// Destination port range to specify particular destination ports for TCP rules. + /// Keeps track of any properties unknown to the library. + internal NsgCidr(string source, PortRange destinationPortRange, IDictionary serializedAdditionalRawData) + { + Source = source; + DestinationPortRange = destinationPortRange; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal NsgCidr() + { + } + + /// Conceptually, this is the range of IP addresses that a packet coming into the instance can come from. + public string Source { get; set; } + /// Destination port range to specify particular destination ports for TCP rules. + public PortRange DestinationPortRange { get; set; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/Objective.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/Objective.cs new file mode 100644 index 000000000000..ba24d746b643 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/Objective.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// Objective enum. + public readonly partial struct Objective : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public Objective(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string LowLatencyValue = "LowLatency"; + private const string HighThroughputValue = "HighThroughput"; + private const string BalancedValue = "Balanced"; + private const string AutoValue = "Auto"; + private const string BasicValue = "Basic"; + + /// Low latency objective. + public static Objective LowLatency { get; } = new Objective(LowLatencyValue); + /// High throughput objective. + public static Objective HighThroughput { get; } = new Objective(HighThroughputValue); + /// Balanced objective. + public static Objective Balanced { get; } = new Objective(BalancedValue); + /// Auto objective. + public static Objective Auto { get; } = new Objective(AutoValue); + /// Basic objective. + public static Objective Basic { get; } = new Objective(BasicValue); + /// Determines if two values are the same. + public static bool operator ==(Objective left, Objective right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(Objective left, Objective right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator Objective(string value) => new Objective(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is Objective other && Equals(other); + /// + public bool Equals(Objective 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/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OpenModeType.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OpenModeType.cs new file mode 100644 index 000000000000..6b99e34c07db --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OpenModeType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// Open mode type enum. + public readonly partial struct OpenModeType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public OpenModeType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ReadOnlyValue = "ReadOnly"; + private const string ReadWriteValue = "ReadWrite"; + + /// ReadOnly mode. + public static OpenModeType ReadOnly { get; } = new OpenModeType(ReadOnlyValue); + /// ReadWrite mode. + public static OpenModeType ReadWrite { get; } = new OpenModeType(ReadWriteValue); + /// Determines if two values are the same. + public static bool operator ==(OpenModeType left, OpenModeType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(OpenModeType left, OpenModeType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator OpenModeType(string value) => new OpenModeType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is OpenModeType other && Equals(other); + /// + public bool Equals(OpenModeType 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/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OperationsInsightsStatusType.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OperationsInsightsStatusType.cs new file mode 100644 index 000000000000..dad1a19278d5 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OperationsInsightsStatusType.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// Operations Insights status type enum. + public readonly partial struct OperationsInsightsStatusType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public OperationsInsightsStatusType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnablingValue = "Enabling"; + private const string EnabledValue = "Enabled"; + private const string DisablingValue = "Disabling"; + private const string NotEnabledValue = "NotEnabled"; + private const string FailedEnablingValue = "FailedEnabling"; + private const string FailedDisablingValue = "FailedDisabling"; + + /// Enabling status. + public static OperationsInsightsStatusType Enabling { get; } = new OperationsInsightsStatusType(EnablingValue); + /// Enabled status. + public static OperationsInsightsStatusType Enabled { get; } = new OperationsInsightsStatusType(EnabledValue); + /// Disabling status. + public static OperationsInsightsStatusType Disabling { get; } = new OperationsInsightsStatusType(DisablingValue); + /// NotEnabled status. + public static OperationsInsightsStatusType NotEnabled { get; } = new OperationsInsightsStatusType(NotEnabledValue); + /// FailedEnabling status. + public static OperationsInsightsStatusType FailedEnabling { get; } = new OperationsInsightsStatusType(FailedEnablingValue); + /// FailedDisabling status. + public static OperationsInsightsStatusType FailedDisabling { get; } = new OperationsInsightsStatusType(FailedDisablingValue); + /// Determines if two values are the same. + public static bool operator ==(OperationsInsightsStatusType left, OperationsInsightsStatusType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(OperationsInsightsStatusType left, OperationsInsightsStatusType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator OperationsInsightsStatusType(string value) => new OperationsInsightsStatusType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is OperationsInsightsStatusType other && Equals(other); + /// + public bool Equals(OperationsInsightsStatusType 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/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleSubscriptionListResult.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleSubscriptionListResult.Serialization.cs new file mode 100644 index 000000000000..f09dd5899db9 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleSubscriptionListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + internal partial class OracleSubscriptionListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OracleSubscriptionListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + OracleSubscriptionListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OracleSubscriptionListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeOracleSubscriptionListResult(document.RootElement, options); + } + + internal static OracleSubscriptionListResult DeserializeOracleSubscriptionListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(OracleSubscriptionData.DeserializeOracleSubscriptionData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new OracleSubscriptionListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(OracleSubscriptionListResult)} does not support writing '{options.Format}' format."); + } + } + + OracleSubscriptionListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeOracleSubscriptionListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(OracleSubscriptionListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleSubscriptionListResult.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleSubscriptionListResult.cs new file mode 100644 index 000000000000..275e5e85d114 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleSubscriptionListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// The response of a OracleSubscription list operation. + internal partial class OracleSubscriptionListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The OracleSubscription items on this page. + /// is null. + internal OracleSubscriptionListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The OracleSubscription items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal OracleSubscriptionListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal OracleSubscriptionListResult() + { + } + + /// The OracleSubscription items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleSubscriptionPatch.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleSubscriptionPatch.Serialization.cs new file mode 100644 index 000000000000..d9f3908329a6 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleSubscriptionPatch.Serialization.cs @@ -0,0 +1,149 @@ +// 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.Models; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + public partial class OracleSubscriptionPatch : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OracleSubscriptionPatch)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Plan)) + { + writer.WritePropertyName("plan"u8); + JsonSerializer.Serialize(writer, Plan); + } + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + OracleSubscriptionPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OracleSubscriptionPatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeOracleSubscriptionPatch(document.RootElement, options); + } + + internal static OracleSubscriptionPatch DeserializeOracleSubscriptionPatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ArmPlan plan = default; + OracleSubscriptionUpdateProperties properties = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("plan"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + plan = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = OracleSubscriptionUpdateProperties.DeserializeOracleSubscriptionUpdateProperties(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new OracleSubscriptionPatch(plan, properties, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(OracleSubscriptionPatch)} does not support writing '{options.Format}' format."); + } + } + + OracleSubscriptionPatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeOracleSubscriptionPatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(OracleSubscriptionPatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleSubscriptionPatch.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleSubscriptionPatch.cs new file mode 100644 index 000000000000..0c3c8e379f39 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleSubscriptionPatch.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// The type used for update operations of the OracleSubscription. + public partial class OracleSubscriptionPatch + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public OracleSubscriptionPatch() + { + } + + /// Initializes a new instance of . + /// Details of the resource plan. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal OracleSubscriptionPatch(ArmPlan plan, OracleSubscriptionUpdateProperties properties, IDictionary serializedAdditionalRawData) + { + Plan = plan; + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Details of the resource plan. + public ArmPlan Plan { get; set; } + /// The resource-specific properties for this resource. + public OracleSubscriptionUpdateProperties Properties { get; set; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleSubscriptionProperties.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleSubscriptionProperties.Serialization.cs new file mode 100644 index 000000000000..a4af2ef3d686 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleSubscriptionProperties.Serialization.cs @@ -0,0 +1,269 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + public partial class OracleSubscriptionProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OracleSubscriptionProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(SaasSubscriptionId)) + { + writer.WritePropertyName("saasSubscriptionId"u8); + writer.WriteStringValue(SaasSubscriptionId); + } + if (options.Format != "W" && Optional.IsDefined(CloudAccountId)) + { + writer.WritePropertyName("cloudAccountId"u8); + writer.WriteStringValue(CloudAccountId); + } + if (options.Format != "W" && Optional.IsDefined(CloudAccountState)) + { + writer.WritePropertyName("cloudAccountState"u8); + writer.WriteStringValue(CloudAccountState.Value.ToString()); + } + if (Optional.IsDefined(TermUnit)) + { + writer.WritePropertyName("termUnit"u8); + writer.WriteStringValue(TermUnit); + } + if (Optional.IsDefined(ProductCode)) + { + writer.WritePropertyName("productCode"u8); + writer.WriteStringValue(ProductCode); + } + if (Optional.IsDefined(Intent)) + { + writer.WritePropertyName("intent"u8); + writer.WriteStringValue(Intent.Value.ToString()); + } + if (options.Format != "W" && Optional.IsCollectionDefined(AzureSubscriptionIds)) + { + writer.WritePropertyName("azureSubscriptionIds"u8); + writer.WriteStartArray(); + foreach (var item in AzureSubscriptionIds) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(AddSubscriptionOperationState)) + { + writer.WritePropertyName("addSubscriptionOperationState"u8); + writer.WriteStringValue(AddSubscriptionOperationState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(LastOperationStatusDetail)) + { + writer.WritePropertyName("lastOperationStatusDetail"u8); + writer.WriteStringValue(LastOperationStatusDetail); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + OracleSubscriptionProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OracleSubscriptionProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeOracleSubscriptionProperties(document.RootElement, options); + } + + internal static OracleSubscriptionProperties DeserializeOracleSubscriptionProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + OracleSubscriptionProvisioningState? provisioningState = default; + string saasSubscriptionId = default; + string cloudAccountId = default; + CloudAccountProvisioningState? cloudAccountState = default; + string termUnit = default; + string productCode = default; + Intent? intent = default; + IReadOnlyList azureSubscriptionIds = default; + AddSubscriptionOperationState? addSubscriptionOperationState = default; + string lastOperationStatusDetail = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new OracleSubscriptionProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("saasSubscriptionId"u8)) + { + saasSubscriptionId = property.Value.GetString(); + continue; + } + if (property.NameEquals("cloudAccountId"u8)) + { + cloudAccountId = property.Value.GetString(); + continue; + } + if (property.NameEquals("cloudAccountState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + cloudAccountState = new CloudAccountProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("termUnit"u8)) + { + termUnit = property.Value.GetString(); + continue; + } + if (property.NameEquals("productCode"u8)) + { + productCode = property.Value.GetString(); + continue; + } + if (property.NameEquals("intent"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + intent = new Intent(property.Value.GetString()); + continue; + } + if (property.NameEquals("azureSubscriptionIds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + azureSubscriptionIds = array; + continue; + } + if (property.NameEquals("addSubscriptionOperationState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + addSubscriptionOperationState = new AddSubscriptionOperationState(property.Value.GetString()); + continue; + } + if (property.NameEquals("lastOperationStatusDetail"u8)) + { + lastOperationStatusDetail = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new OracleSubscriptionProperties( + provisioningState, + saasSubscriptionId, + cloudAccountId, + cloudAccountState, + termUnit, + productCode, + intent, + azureSubscriptionIds ?? new ChangeTrackingList(), + addSubscriptionOperationState, + lastOperationStatusDetail, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(OracleSubscriptionProperties)} does not support writing '{options.Format}' format."); + } + } + + OracleSubscriptionProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeOracleSubscriptionProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(OracleSubscriptionProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleSubscriptionProperties.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleSubscriptionProperties.cs new file mode 100644 index 000000000000..51ba008b2137 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleSubscriptionProperties.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// Oracle Subscription resource model. + public partial class OracleSubscriptionProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public OracleSubscriptionProperties() + { + AzureSubscriptionIds = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// OracleSubscriptionProvisioningState provisioning state. + /// SAAS subscription ID generated by Marketplace. + /// Cloud Account Id. + /// Cloud Account provisioning state. + /// Term Unit. P1Y, P3Y, etc, see Durations https://en.wikipedia.org/wiki/ISO_8601. + /// Product code for the term unit. + /// Intent for the update operation. + /// Azure subscriptions to be added. + /// State of the add Azure subscription operation on Oracle subscription. + /// Status details of the last operation on Oracle subscription. + /// Keeps track of any properties unknown to the library. + internal OracleSubscriptionProperties(OracleSubscriptionProvisioningState? provisioningState, string saasSubscriptionId, string cloudAccountId, CloudAccountProvisioningState? cloudAccountState, string termUnit, string productCode, Intent? intent, IReadOnlyList azureSubscriptionIds, AddSubscriptionOperationState? addSubscriptionOperationState, string lastOperationStatusDetail, IDictionary serializedAdditionalRawData) + { + ProvisioningState = provisioningState; + SaasSubscriptionId = saasSubscriptionId; + CloudAccountId = cloudAccountId; + CloudAccountState = cloudAccountState; + TermUnit = termUnit; + ProductCode = productCode; + Intent = intent; + AzureSubscriptionIds = azureSubscriptionIds; + AddSubscriptionOperationState = addSubscriptionOperationState; + LastOperationStatusDetail = lastOperationStatusDetail; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// OracleSubscriptionProvisioningState provisioning state. + public OracleSubscriptionProvisioningState? ProvisioningState { get; } + /// SAAS subscription ID generated by Marketplace. + public string SaasSubscriptionId { get; } + /// Cloud Account Id. + public string CloudAccountId { get; } + /// Cloud Account provisioning state. + public CloudAccountProvisioningState? CloudAccountState { get; } + /// Term Unit. P1Y, P3Y, etc, see Durations https://en.wikipedia.org/wiki/ISO_8601. + public string TermUnit { get; set; } + /// Product code for the term unit. + public string ProductCode { get; set; } + /// Intent for the update operation. + public Intent? Intent { get; set; } + /// Azure subscriptions to be added. + public IReadOnlyList AzureSubscriptionIds { get; } + /// State of the add Azure subscription operation on Oracle subscription. + public AddSubscriptionOperationState? AddSubscriptionOperationState { get; } + /// Status details of the last operation on Oracle subscription. + public string LastOperationStatusDetail { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleSubscriptionProvisioningState.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleSubscriptionProvisioningState.cs new file mode 100644 index 000000000000..83c1766bbdf0 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleSubscriptionProvisioningState.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// OracleSubscriptionProvisioningState enum. + public readonly partial struct OracleSubscriptionProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public OracleSubscriptionProvisioningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + private const string CanceledValue = "Canceled"; + + /// Resource has been created. + public static OracleSubscriptionProvisioningState Succeeded { get; } = new OracleSubscriptionProvisioningState(SucceededValue); + /// Resource creation failed. + public static OracleSubscriptionProvisioningState Failed { get; } = new OracleSubscriptionProvisioningState(FailedValue); + /// Resource creation was canceled. + public static OracleSubscriptionProvisioningState Canceled { get; } = new OracleSubscriptionProvisioningState(CanceledValue); + /// Determines if two values are the same. + public static bool operator ==(OracleSubscriptionProvisioningState left, OracleSubscriptionProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(OracleSubscriptionProvisioningState left, OracleSubscriptionProvisioningState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator OracleSubscriptionProvisioningState(string value) => new OracleSubscriptionProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is OracleSubscriptionProvisioningState other && Equals(other); + /// + public bool Equals(OracleSubscriptionProvisioningState 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/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleSubscriptionUpdateProperties.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleSubscriptionUpdateProperties.Serialization.cs new file mode 100644 index 000000000000..6737c9ad3aa6 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleSubscriptionUpdateProperties.Serialization.cs @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + public partial class OracleSubscriptionUpdateProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OracleSubscriptionUpdateProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(ProductCode)) + { + writer.WritePropertyName("productCode"u8); + writer.WriteStringValue(ProductCode); + } + if (Optional.IsDefined(Intent)) + { + writer.WritePropertyName("intent"u8); + writer.WriteStringValue(Intent.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + OracleSubscriptionUpdateProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OracleSubscriptionUpdateProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeOracleSubscriptionUpdateProperties(document.RootElement, options); + } + + internal static OracleSubscriptionUpdateProperties DeserializeOracleSubscriptionUpdateProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string productCode = default; + Intent? intent = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("productCode"u8)) + { + productCode = property.Value.GetString(); + continue; + } + if (property.NameEquals("intent"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + intent = new Intent(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new OracleSubscriptionUpdateProperties(productCode, intent, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(OracleSubscriptionUpdateProperties)} does not support writing '{options.Format}' format."); + } + } + + OracleSubscriptionUpdateProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeOracleSubscriptionUpdateProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(OracleSubscriptionUpdateProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleSubscriptionUpdateProperties.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleSubscriptionUpdateProperties.cs new file mode 100644 index 000000000000..88f35c583f30 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleSubscriptionUpdateProperties.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// The updatable properties of the OracleSubscription. + public partial class OracleSubscriptionUpdateProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public OracleSubscriptionUpdateProperties() + { + } + + /// Initializes a new instance of . + /// Product code for the term unit. + /// Intent for the update operation. + /// Keeps track of any properties unknown to the library. + internal OracleSubscriptionUpdateProperties(string productCode, Intent? intent, IDictionary serializedAdditionalRawData) + { + ProductCode = productCode; + Intent = intent; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Product code for the term unit. + public string ProductCode { get; set; } + /// Intent for the update operation. + public Intent? Intent { get; set; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/PatchingMode.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/PatchingMode.cs new file mode 100644 index 000000000000..87ef8dcf4f40 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/PatchingMode.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// Patching mode enum. + public readonly partial struct PatchingMode : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public PatchingMode(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string RollingValue = "Rolling"; + private const string NonRollingValue = "NonRolling"; + + /// Rolling patching. + public static PatchingMode Rolling { get; } = new PatchingMode(RollingValue); + /// Non Rolling patching. + public static PatchingMode NonRolling { get; } = new PatchingMode(NonRollingValue); + /// Determines if two values are the same. + public static bool operator ==(PatchingMode left, PatchingMode right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(PatchingMode left, PatchingMode right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator PatchingMode(string value) => new PatchingMode(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is PatchingMode other && Equals(other); + /// + public bool Equals(PatchingMode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/PeerDbDetails.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/PeerDbDetails.Serialization.cs new file mode 100644 index 000000000000..789909a5fe0e --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/PeerDbDetails.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + public partial class PeerDbDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PeerDbDetails)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(PeerDbId)) + { + writer.WritePropertyName("peerDbId"u8); + writer.WriteStringValue(PeerDbId); + } + if (Optional.IsDefined(PeerDbOcid)) + { + writer.WritePropertyName("peerDbOcid"u8); + writer.WriteStringValue(PeerDbOcid); + } + if (Optional.IsDefined(PeerDbLocation)) + { + writer.WritePropertyName("peerDbLocation"u8); + writer.WriteStringValue(PeerDbLocation); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + PeerDbDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PeerDbDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePeerDbDetails(document.RootElement, options); + } + + internal static PeerDbDetails DeserializePeerDbDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string peerDbId = default; + string peerDbOcid = default; + string peerDbLocation = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("peerDbId"u8)) + { + peerDbId = property.Value.GetString(); + continue; + } + if (property.NameEquals("peerDbOcid"u8)) + { + peerDbOcid = property.Value.GetString(); + continue; + } + if (property.NameEquals("peerDbLocation"u8)) + { + peerDbLocation = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PeerDbDetails(peerDbId, peerDbOcid, peerDbLocation, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(PeerDbDetails)} does not support writing '{options.Format}' format."); + } + } + + PeerDbDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializePeerDbDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PeerDbDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/PeerDbDetails.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/PeerDbDetails.cs new file mode 100644 index 000000000000..d05c7147d2ed --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/PeerDbDetails.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// PeerDb Details. + public partial class PeerDbDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public PeerDbDetails() + { + } + + /// Initializes a new instance of . + /// The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current peer database. + /// Ocid of the Disaster Recovery peer database, which is located in a different region from the current peer database. + /// The location of the Disaster Recovery peer database. + /// Keeps track of any properties unknown to the library. + internal PeerDbDetails(string peerDbId, string peerDbOcid, string peerDbLocation, IDictionary serializedAdditionalRawData) + { + PeerDbId = peerDbId; + PeerDbOcid = peerDbOcid; + PeerDbLocation = peerDbLocation; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current peer database. + public string PeerDbId { get; set; } + /// Ocid of the Disaster Recovery peer database, which is located in a different region from the current peer database. + public string PeerDbOcid { get; set; } + /// The location of the Disaster Recovery peer database. + public string PeerDbLocation { get; set; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/PermissionLevelType.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/PermissionLevelType.cs new file mode 100644 index 000000000000..b71a62d48064 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/PermissionLevelType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// Permission level type enum. + public readonly partial struct PermissionLevelType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public PermissionLevelType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string RestrictedValue = "Restricted"; + private const string UnrestrictedValue = "Unrestricted"; + + /// Restricted permission level. + public static PermissionLevelType Restricted { get; } = new PermissionLevelType(RestrictedValue); + /// Unrestricted permission level. + public static PermissionLevelType Unrestricted { get; } = new PermissionLevelType(UnrestrictedValue); + /// Determines if two values are the same. + public static bool operator ==(PermissionLevelType left, PermissionLevelType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(PermissionLevelType left, PermissionLevelType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator PermissionLevelType(string value) => new PermissionLevelType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is PermissionLevelType other && Equals(other); + /// + public bool Equals(PermissionLevelType 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/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/PortRange.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/PortRange.Serialization.cs new file mode 100644 index 000000000000..1d95a6e6b8db --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/PortRange.Serialization.cs @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + public partial class PortRange : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PortRange)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("min"u8); + writer.WriteNumberValue(Min); + writer.WritePropertyName("max"u8); + writer.WriteNumberValue(Max); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + PortRange IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PortRange)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePortRange(document.RootElement, options); + } + + internal static PortRange DeserializePortRange(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int min = default; + int max = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("min"u8)) + { + min = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("max"u8)) + { + max = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PortRange(min, max, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(PortRange)} does not support writing '{options.Format}' format."); + } + } + + PortRange IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializePortRange(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PortRange)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/PortRange.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/PortRange.cs new file mode 100644 index 000000000000..9da88a20ae1c --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/PortRange.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// Port Range to specify particular destination ports for TCP rules. + public partial class PortRange + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The minimum port number, which must not be greater than the maximum port number. + /// The maximum port number, which must not be less than the minimum port number. To specify a single port number, set both the min and max to the same value. + public PortRange(int min, int max) + { + Min = min; + Max = max; + } + + /// Initializes a new instance of . + /// The minimum port number, which must not be greater than the maximum port number. + /// The maximum port number, which must not be less than the minimum port number. To specify a single port number, set both the min and max to the same value. + /// Keeps track of any properties unknown to the library. + internal PortRange(int min, int max, IDictionary serializedAdditionalRawData) + { + Min = min; + Max = max; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal PortRange() + { + } + + /// The minimum port number, which must not be greater than the maximum port number. + public int Min { get; set; } + /// The maximum port number, which must not be less than the minimum port number. To specify a single port number, set both the min and max to the same value. + public int Max { get; set; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/Preference.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/Preference.cs new file mode 100644 index 000000000000..034ba87a8a72 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/Preference.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// Preference enum. + public readonly partial struct Preference : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public Preference(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoPreferenceValue = "NoPreference"; + private const string CustomPreferenceValue = "CustomPreference"; + + /// No preference. + public static Preference NoPreference { get; } = new Preference(NoPreferenceValue); + /// Custom preference. + public static Preference CustomPreference { get; } = new Preference(CustomPreferenceValue); + /// Determines if two values are the same. + public static bool operator ==(Preference left, Preference right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(Preference left, Preference right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator Preference(string value) => new Preference(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is Preference other && Equals(other); + /// + public bool Equals(Preference 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/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/PrivateIPAddressProperties.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/PrivateIPAddressProperties.Serialization.cs new file mode 100644 index 000000000000..de2b2fecb136 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/PrivateIPAddressProperties.Serialization.cs @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + public partial class PrivateIPAddressProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PrivateIPAddressProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + writer.WritePropertyName("hostnameLabel"u8); + writer.WriteStringValue(HostnameLabel); + writer.WritePropertyName("ocid"u8); + writer.WriteStringValue(Ocid); + writer.WritePropertyName("ipAddress"u8); + writer.WriteStringValue(IPAddress); + writer.WritePropertyName("subnetId"u8); + writer.WriteStringValue(SubnetId); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + PrivateIPAddressProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PrivateIPAddressProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePrivateIPAddressProperties(document.RootElement, options); + } + + internal static PrivateIPAddressProperties DeserializePrivateIPAddressProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string displayName = default; + string hostnameLabel = default; + string ocid = default; + string ipAddress = default; + string subnetId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("hostnameLabel"u8)) + { + hostnameLabel = property.Value.GetString(); + continue; + } + if (property.NameEquals("ocid"u8)) + { + ocid = property.Value.GetString(); + continue; + } + if (property.NameEquals("ipAddress"u8)) + { + ipAddress = property.Value.GetString(); + continue; + } + if (property.NameEquals("subnetId"u8)) + { + subnetId = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PrivateIPAddressProperties( + displayName, + hostnameLabel, + ocid, + ipAddress, + subnetId, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(PrivateIPAddressProperties)} does not support writing '{options.Format}' format."); + } + } + + PrivateIPAddressProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializePrivateIPAddressProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PrivateIPAddressProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/PrivateIPAddressProperties.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/PrivateIPAddressProperties.cs new file mode 100644 index 000000000000..afee8e448c0f --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/PrivateIPAddressProperties.cs @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// PrivateIpAddress resource properties. + public partial class PrivateIPAddressProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// PrivateIpAddresses displayName. + /// PrivateIpAddresses hostnameLabel. + /// PrivateIpAddresses Id. + /// PrivateIpAddresses ipAddress. + /// PrivateIpAddresses subnetId. + /// , , , or is null. + internal PrivateIPAddressProperties(string displayName, string hostnameLabel, string ocid, string ipAddress, string subnetId) + { + Argument.AssertNotNull(displayName, nameof(displayName)); + Argument.AssertNotNull(hostnameLabel, nameof(hostnameLabel)); + Argument.AssertNotNull(ocid, nameof(ocid)); + Argument.AssertNotNull(ipAddress, nameof(ipAddress)); + Argument.AssertNotNull(subnetId, nameof(subnetId)); + + DisplayName = displayName; + HostnameLabel = hostnameLabel; + Ocid = ocid; + IPAddress = ipAddress; + SubnetId = subnetId; + } + + /// Initializes a new instance of . + /// PrivateIpAddresses displayName. + /// PrivateIpAddresses hostnameLabel. + /// PrivateIpAddresses Id. + /// PrivateIpAddresses ipAddress. + /// PrivateIpAddresses subnetId. + /// Keeps track of any properties unknown to the library. + internal PrivateIPAddressProperties(string displayName, string hostnameLabel, string ocid, string ipAddress, string subnetId, IDictionary serializedAdditionalRawData) + { + DisplayName = displayName; + HostnameLabel = hostnameLabel; + Ocid = ocid; + IPAddress = ipAddress; + SubnetId = subnetId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal PrivateIPAddressProperties() + { + } + + /// PrivateIpAddresses displayName. + public string DisplayName { get; } + /// PrivateIpAddresses hostnameLabel. + public string HostnameLabel { get; } + /// PrivateIpAddresses Id. + public string Ocid { get; } + /// PrivateIpAddresses ipAddress. + public string IPAddress { get; } + /// PrivateIpAddresses subnetId. + public string SubnetId { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/PrivateIPAddressesFilter.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/PrivateIPAddressesFilter.Serialization.cs new file mode 100644 index 000000000000..a9f1ead448cd --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/PrivateIPAddressesFilter.Serialization.cs @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + public partial class PrivateIPAddressesFilter : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PrivateIPAddressesFilter)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("subnetId"u8); + writer.WriteStringValue(SubnetId); + writer.WritePropertyName("vnicId"u8); + writer.WriteStringValue(VnicId); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + PrivateIPAddressesFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PrivateIPAddressesFilter)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePrivateIPAddressesFilter(document.RootElement, options); + } + + internal static PrivateIPAddressesFilter DeserializePrivateIPAddressesFilter(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string subnetId = default; + string vnicId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("subnetId"u8)) + { + subnetId = property.Value.GetString(); + continue; + } + if (property.NameEquals("vnicId"u8)) + { + vnicId = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PrivateIPAddressesFilter(subnetId, vnicId, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(PrivateIPAddressesFilter)} does not support writing '{options.Format}' format."); + } + } + + PrivateIPAddressesFilter IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializePrivateIPAddressesFilter(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PrivateIPAddressesFilter)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/PrivateIPAddressesFilter.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/PrivateIPAddressesFilter.cs new file mode 100644 index 000000000000..971d461f81e5 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/PrivateIPAddressesFilter.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// Private Ip Addresses filter. + public partial class PrivateIPAddressesFilter + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Subnet OCID. + /// VCN OCID. + /// or is null. + public PrivateIPAddressesFilter(string subnetId, string vnicId) + { + Argument.AssertNotNull(subnetId, nameof(subnetId)); + Argument.AssertNotNull(vnicId, nameof(vnicId)); + + SubnetId = subnetId; + VnicId = vnicId; + } + + /// Initializes a new instance of . + /// Subnet OCID. + /// VCN OCID. + /// Keeps track of any properties unknown to the library. + internal PrivateIPAddressesFilter(string subnetId, string vnicId, IDictionary serializedAdditionalRawData) + { + SubnetId = subnetId; + VnicId = vnicId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal PrivateIPAddressesFilter() + { + } + + /// Subnet OCID. + public string SubnetId { get; } + /// VCN OCID. + public string VnicId { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ProfileType.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ProfileType.Serialization.cs new file mode 100644 index 000000000000..8446b30b967a --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ProfileType.Serialization.cs @@ -0,0 +1,221 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + public partial class ProfileType : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProfileType)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(ConsumerGroup)) + { + writer.WritePropertyName("consumerGroup"u8); + writer.WriteStringValue(ConsumerGroup.Value.ToString()); + } + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + writer.WritePropertyName("hostFormat"u8); + writer.WriteStringValue(HostFormat.ToString()); + if (Optional.IsDefined(IsRegional)) + { + writer.WritePropertyName("isRegional"u8); + writer.WriteBooleanValue(IsRegional.Value); + } + writer.WritePropertyName("protocol"u8); + writer.WriteStringValue(Protocol.ToString()); + writer.WritePropertyName("sessionMode"u8); + writer.WriteStringValue(SessionMode.ToString()); + writer.WritePropertyName("syntaxFormat"u8); + writer.WriteStringValue(SyntaxFormat.ToString()); + if (Optional.IsDefined(TlsAuthentication)) + { + writer.WritePropertyName("tlsAuthentication"u8); + writer.WriteStringValue(TlsAuthentication.Value.ToString()); + } + writer.WritePropertyName("value"u8); + writer.WriteStringValue(Value); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ProfileType IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProfileType)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeProfileType(document.RootElement, options); + } + + internal static ProfileType DeserializeProfileType(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ConsumerGroup? consumerGroup = default; + string displayName = default; + HostFormatType hostFormat = default; + bool? isRegional = default; + ProtocolType protocol = default; + SessionModeType sessionMode = default; + SyntaxFormatType syntaxFormat = default; + TlsAuthenticationType? tlsAuthentication = default; + string value = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("consumerGroup"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + consumerGroup = new ConsumerGroup(property.Value.GetString()); + continue; + } + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("hostFormat"u8)) + { + hostFormat = new HostFormatType(property.Value.GetString()); + continue; + } + if (property.NameEquals("isRegional"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isRegional = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("protocol"u8)) + { + protocol = new ProtocolType(property.Value.GetString()); + continue; + } + if (property.NameEquals("sessionMode"u8)) + { + sessionMode = new SessionModeType(property.Value.GetString()); + continue; + } + if (property.NameEquals("syntaxFormat"u8)) + { + syntaxFormat = new SyntaxFormatType(property.Value.GetString()); + continue; + } + if (property.NameEquals("tlsAuthentication"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tlsAuthentication = new TlsAuthenticationType(property.Value.GetString()); + continue; + } + if (property.NameEquals("value"u8)) + { + value = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ProfileType( + consumerGroup, + displayName, + hostFormat, + isRegional, + protocol, + sessionMode, + syntaxFormat, + tlsAuthentication, + value, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ProfileType)} does not support writing '{options.Format}' format."); + } + } + + ProfileType IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeProfileType(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ProfileType)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ProfileType.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ProfileType.cs new file mode 100644 index 000000000000..dbb9165860dd --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ProfileType.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// The connection string profile to allow clients to group, filter and select connection string values based on structured metadata. + public partial class ProfileType + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// A user-friendly name for the connection. + /// Host format used in connection string. + /// Protocol used by the connection. + /// Specifies whether the listener performs a direct hand-off of the session, or redirects the session. + /// Specifies whether the connection string is using the long (LONG), Easy Connect (EZCONNECT), or Easy Connect Plus (EZCONNECTPLUS) format. + /// Connection string value. + /// or is null. + internal ProfileType(string displayName, HostFormatType hostFormat, ProtocolType protocol, SessionModeType sessionMode, SyntaxFormatType syntaxFormat, string value) + { + Argument.AssertNotNull(displayName, nameof(displayName)); + Argument.AssertNotNull(value, nameof(value)); + + DisplayName = displayName; + HostFormat = hostFormat; + Protocol = protocol; + SessionMode = sessionMode; + SyntaxFormat = syntaxFormat; + Value = value; + } + + /// Initializes a new instance of . + /// Consumer group used by the connection. + /// A user-friendly name for the connection. + /// Host format used in connection string. + /// True for a regional connection string, applicable to cross-region DG only. + /// Protocol used by the connection. + /// Specifies whether the listener performs a direct hand-off of the session, or redirects the session. + /// Specifies whether the connection string is using the long (LONG), Easy Connect (EZCONNECT), or Easy Connect Plus (EZCONNECTPLUS) format. + /// Specifies whether the TLS handshake is using one-way (SERVER) or mutual (MUTUAL) authentication. + /// Connection string value. + /// Keeps track of any properties unknown to the library. + internal ProfileType(ConsumerGroup? consumerGroup, string displayName, HostFormatType hostFormat, bool? isRegional, ProtocolType protocol, SessionModeType sessionMode, SyntaxFormatType syntaxFormat, TlsAuthenticationType? tlsAuthentication, string value, IDictionary serializedAdditionalRawData) + { + ConsumerGroup = consumerGroup; + DisplayName = displayName; + HostFormat = hostFormat; + IsRegional = isRegional; + Protocol = protocol; + SessionMode = sessionMode; + SyntaxFormat = syntaxFormat; + TlsAuthentication = tlsAuthentication; + Value = value; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ProfileType() + { + } + + /// Consumer group used by the connection. + public ConsumerGroup? ConsumerGroup { get; } + /// A user-friendly name for the connection. + public string DisplayName { get; } + /// Host format used in connection string. + public HostFormatType HostFormat { get; } + /// True for a regional connection string, applicable to cross-region DG only. + public bool? IsRegional { get; } + /// Protocol used by the connection. + public ProtocolType Protocol { get; } + /// Specifies whether the listener performs a direct hand-off of the session, or redirects the session. + public SessionModeType SessionMode { get; } + /// Specifies whether the connection string is using the long (LONG), Easy Connect (EZCONNECT), or Easy Connect Plus (EZCONNECTPLUS) format. + public SyntaxFormatType SyntaxFormat { get; } + /// Specifies whether the TLS handshake is using one-way (SERVER) or mutual (MUTUAL) authentication. + public TlsAuthenticationType? TlsAuthentication { get; } + /// Connection string value. + public string Value { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ProtocolType.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ProtocolType.cs new file mode 100644 index 000000000000..2b364ca99b4b --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ProtocolType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// Protocol type enum. + public readonly partial struct ProtocolType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ProtocolType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string TCPValue = "TCP"; + private const string TCPSValue = "TCPS"; + + /// TCP protocol. + public static ProtocolType TCP { get; } = new ProtocolType(TCPValue); + /// TCPS protocol. + public static ProtocolType TCPS { get; } = new ProtocolType(TCPSValue); + /// Determines if two values are the same. + public static bool operator ==(ProtocolType left, ProtocolType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ProtocolType left, ProtocolType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ProtocolType(string value) => new ProtocolType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ProtocolType other && Equals(other); + /// + public bool Equals(ProtocolType 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/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/RefreshableModelType.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/RefreshableModelType.cs new file mode 100644 index 000000000000..a6a140842c3b --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/RefreshableModelType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// Refreshable model type enum. + public readonly partial struct RefreshableModelType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public RefreshableModelType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AutomaticValue = "Automatic"; + private const string ManualValue = "Manual"; + + /// Automatic refreshable model type. + public static RefreshableModelType Automatic { get; } = new RefreshableModelType(AutomaticValue); + /// Manual refreshable model type. + public static RefreshableModelType Manual { get; } = new RefreshableModelType(ManualValue); + /// Determines if two values are the same. + public static bool operator ==(RefreshableModelType left, RefreshableModelType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(RefreshableModelType left, RefreshableModelType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator RefreshableModelType(string value) => new RefreshableModelType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is RefreshableModelType other && Equals(other); + /// + public bool Equals(RefreshableModelType 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/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/RefreshableStatusType.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/RefreshableStatusType.cs new file mode 100644 index 000000000000..02162cf82cc5 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/RefreshableStatusType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// Refreshable status type enum. + public readonly partial struct RefreshableStatusType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public RefreshableStatusType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string RefreshingValue = "Refreshing"; + private const string NotRefreshingValue = "NotRefreshing"; + + /// Refreshing status. + public static RefreshableStatusType Refreshing { get; } = new RefreshableStatusType(RefreshingValue); + /// NotRefreshing status. + public static RefreshableStatusType NotRefreshing { get; } = new RefreshableStatusType(NotRefreshingValue); + /// Determines if two values are the same. + public static bool operator ==(RefreshableStatusType left, RefreshableStatusType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(RefreshableStatusType left, RefreshableStatusType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator RefreshableStatusType(string value) => new RefreshableStatusType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is RefreshableStatusType other && Equals(other); + /// + public bool Equals(RefreshableStatusType 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/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/RemoveVirtualMachineFromExadbVmClusterDetails.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/RemoveVirtualMachineFromExadbVmClusterDetails.Serialization.cs new file mode 100644 index 000000000000..689e51f77708 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/RemoveVirtualMachineFromExadbVmClusterDetails.Serialization.cs @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + public partial class RemoveVirtualMachineFromExadbVmClusterDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RemoveVirtualMachineFromExadbVmClusterDetails)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("dbNodes"u8); + writer.WriteStartArray(); + foreach (var item in DbNodes) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + RemoveVirtualMachineFromExadbVmClusterDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RemoveVirtualMachineFromExadbVmClusterDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeRemoveVirtualMachineFromExadbVmClusterDetails(document.RootElement, options); + } + + internal static RemoveVirtualMachineFromExadbVmClusterDetails DeserializeRemoveVirtualMachineFromExadbVmClusterDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList dbNodes = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("dbNodes"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DbNodeDetails.DeserializeDbNodeDetails(item, options)); + } + dbNodes = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new RemoveVirtualMachineFromExadbVmClusterDetails(dbNodes, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(RemoveVirtualMachineFromExadbVmClusterDetails)} does not support writing '{options.Format}' format."); + } + } + + RemoveVirtualMachineFromExadbVmClusterDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeRemoveVirtualMachineFromExadbVmClusterDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(RemoveVirtualMachineFromExadbVmClusterDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/RemoveVirtualMachineFromExadbVmClusterDetails.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/RemoveVirtualMachineFromExadbVmClusterDetails.cs new file mode 100644 index 000000000000..166310f15da0 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/RemoveVirtualMachineFromExadbVmClusterDetails.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// Details of removing Virtual Machines from the Exadata VM cluster on Exascale Infrastructure. Applies to Exadata Database Service on Exascale Infrastructure only. + public partial class RemoveVirtualMachineFromExadbVmClusterDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The list of ExaCS DB nodes for the Exadata VM cluster on Exascale Infrastructure to be removed. + /// is null. + public RemoveVirtualMachineFromExadbVmClusterDetails(IEnumerable dbNodes) + { + Argument.AssertNotNull(dbNodes, nameof(dbNodes)); + + DbNodes = dbNodes.ToList(); + } + + /// Initializes a new instance of . + /// The list of ExaCS DB nodes for the Exadata VM cluster on Exascale Infrastructure to be removed. + /// Keeps track of any properties unknown to the library. + internal RemoveVirtualMachineFromExadbVmClusterDetails(IList dbNodes, IDictionary serializedAdditionalRawData) + { + DbNodes = dbNodes; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal RemoveVirtualMachineFromExadbVmClusterDetails() + { + } + + /// The list of ExaCS DB nodes for the Exadata VM cluster on Exascale Infrastructure to be removed. + public IList DbNodes { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/RepeatCadenceType.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/RepeatCadenceType.cs new file mode 100644 index 000000000000..f1cd9eb8c104 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/RepeatCadenceType.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// Repeat cadence type enum. + public readonly partial struct RepeatCadenceType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public RepeatCadenceType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string OneTimeValue = "OneTime"; + private const string WeeklyValue = "Weekly"; + private const string MonthlyValue = "Monthly"; + private const string YearlyValue = "Yearly"; + + /// Repeat one time. + public static RepeatCadenceType OneTime { get; } = new RepeatCadenceType(OneTimeValue); + /// Repeat weekly. + public static RepeatCadenceType Weekly { get; } = new RepeatCadenceType(WeeklyValue); + /// Repeat monthly. + public static RepeatCadenceType Monthly { get; } = new RepeatCadenceType(MonthlyValue); + /// Repeat yearly. + public static RepeatCadenceType Yearly { get; } = new RepeatCadenceType(YearlyValue); + /// Determines if two values are the same. + public static bool operator ==(RepeatCadenceType left, RepeatCadenceType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(RepeatCadenceType left, RepeatCadenceType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator RepeatCadenceType(string value) => new RepeatCadenceType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is RepeatCadenceType other && Equals(other); + /// + public bool Equals(RepeatCadenceType 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/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ResourceProvisioningState.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ResourceProvisioningState.cs new file mode 100644 index 000000000000..efb39ea8ad8b --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ResourceProvisioningState.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// The provisioning state of a resource type. + public readonly partial struct ResourceProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ResourceProvisioningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + private const string CanceledValue = "Canceled"; + + /// Resource has been created. + public static ResourceProvisioningState Succeeded { get; } = new ResourceProvisioningState(SucceededValue); + /// Resource creation failed. + public static ResourceProvisioningState Failed { get; } = new ResourceProvisioningState(FailedValue); + /// Resource creation was canceled. + public static ResourceProvisioningState Canceled { get; } = new ResourceProvisioningState(CanceledValue); + /// Determines if two values are the same. + public static bool operator ==(ResourceProvisioningState left, ResourceProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ResourceProvisioningState left, ResourceProvisioningState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ResourceProvisioningState(string value) => new ResourceProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ResourceProvisioningState other && Equals(other); + /// + public bool Equals(ResourceProvisioningState 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/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/RestoreAutonomousDatabaseDetails.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/RestoreAutonomousDatabaseDetails.Serialization.cs new file mode 100644 index 000000000000..fb47b8679661 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/RestoreAutonomousDatabaseDetails.Serialization.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + public partial class RestoreAutonomousDatabaseDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RestoreAutonomousDatabaseDetails)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("timestamp"u8); + writer.WriteStringValue(Timestamp, "O"); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + RestoreAutonomousDatabaseDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RestoreAutonomousDatabaseDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeRestoreAutonomousDatabaseDetails(document.RootElement, options); + } + + internal static RestoreAutonomousDatabaseDetails DeserializeRestoreAutonomousDatabaseDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DateTimeOffset timestamp = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("timestamp"u8)) + { + timestamp = property.Value.GetDateTimeOffset("O"); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new RestoreAutonomousDatabaseDetails(timestamp, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(RestoreAutonomousDatabaseDetails)} does not support writing '{options.Format}' format."); + } + } + + RestoreAutonomousDatabaseDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeRestoreAutonomousDatabaseDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(RestoreAutonomousDatabaseDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/RestoreAutonomousDatabaseDetails.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/RestoreAutonomousDatabaseDetails.cs new file mode 100644 index 000000000000..25ad822e6386 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/RestoreAutonomousDatabaseDetails.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// Details to restore an Oracle Autonomous Database. + public partial class RestoreAutonomousDatabaseDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The time to restore the database to. + public RestoreAutonomousDatabaseDetails(DateTimeOffset timestamp) + { + Timestamp = timestamp; + } + + /// Initializes a new instance of . + /// The time to restore the database to. + /// Keeps track of any properties unknown to the library. + internal RestoreAutonomousDatabaseDetails(DateTimeOffset timestamp, IDictionary serializedAdditionalRawData) + { + Timestamp = timestamp; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal RestoreAutonomousDatabaseDetails() + { + } + + /// The time to restore the database to. + public DateTimeOffset Timestamp { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/RoleType.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/RoleType.cs new file mode 100644 index 000000000000..56d3d180c3de --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/RoleType.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// Role type enum. + public readonly partial struct RoleType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public RoleType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PrimaryValue = "Primary"; + private const string StandbyValue = "Standby"; + private const string DisabledStandbyValue = "DisabledStandby"; + private const string BackupCopyValue = "BackupCopy"; + private const string SnapshotStandbyValue = "SnapshotStandby"; + + /// Primary role. + public static RoleType Primary { get; } = new RoleType(PrimaryValue); + /// Standby role. + public static RoleType Standby { get; } = new RoleType(StandbyValue); + /// DisabledStandby role. + public static RoleType DisabledStandby { get; } = new RoleType(DisabledStandbyValue); + /// BackupCopy role. + public static RoleType BackupCopy { get; } = new RoleType(BackupCopyValue); + /// SnapshotStandby role. + public static RoleType SnapshotStandby { get; } = new RoleType(SnapshotStandbyValue); + /// Determines if two values are the same. + public static bool operator ==(RoleType left, RoleType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(RoleType left, RoleType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator RoleType(string value) => new RoleType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is RoleType other && Equals(other); + /// + public bool Equals(RoleType 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/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ScheduledOperationsType.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ScheduledOperationsType.Serialization.cs new file mode 100644 index 000000000000..db6693f1608f --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ScheduledOperationsType.Serialization.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + public partial class ScheduledOperationsType : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ScheduledOperationsType)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("dayOfWeek"u8); + writer.WriteObjectValue(DayOfWeek, options); + if (Optional.IsDefined(ScheduledStartTime)) + { + writer.WritePropertyName("scheduledStartTime"u8); + writer.WriteStringValue(ScheduledStartTime); + } + if (Optional.IsDefined(ScheduledStopTime)) + { + writer.WritePropertyName("scheduledStopTime"u8); + writer.WriteStringValue(ScheduledStopTime); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ScheduledOperationsType IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ScheduledOperationsType)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeScheduledOperationsType(document.RootElement, options); + } + + internal static ScheduledOperationsType DeserializeScheduledOperationsType(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DayOfWeek dayOfWeek = default; + string scheduledStartTime = default; + string scheduledStopTime = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("dayOfWeek"u8)) + { + dayOfWeek = DayOfWeek.DeserializeDayOfWeek(property.Value, options); + continue; + } + if (property.NameEquals("scheduledStartTime"u8)) + { + scheduledStartTime = property.Value.GetString(); + continue; + } + if (property.NameEquals("scheduledStopTime"u8)) + { + scheduledStopTime = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ScheduledOperationsType(dayOfWeek, scheduledStartTime, scheduledStopTime, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ScheduledOperationsType)} does not support writing '{options.Format}' format."); + } + } + + ScheduledOperationsType IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeScheduledOperationsType(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ScheduledOperationsType)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ScheduledOperationsType.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ScheduledOperationsType.cs new file mode 100644 index 000000000000..bacd0cbd7183 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ScheduledOperationsType.cs @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// The list of scheduled operations. + public partial class ScheduledOperationsType + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Day of week. + /// is null. + public ScheduledOperationsType(DayOfWeek dayOfWeek) + { + Argument.AssertNotNull(dayOfWeek, nameof(dayOfWeek)); + + DayOfWeek = dayOfWeek; + } + + /// Initializes a new instance of . + /// Day of week. + /// auto start time. value must be of ISO-8601 format HH:mm. + /// auto stop time. value must be of ISO-8601 format HH:mm. + /// Keeps track of any properties unknown to the library. + internal ScheduledOperationsType(DayOfWeek dayOfWeek, string scheduledStartTime, string scheduledStopTime, IDictionary serializedAdditionalRawData) + { + DayOfWeek = dayOfWeek; + ScheduledStartTime = scheduledStartTime; + ScheduledStopTime = scheduledStopTime; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ScheduledOperationsType() + { + } + + /// Day of week. + internal DayOfWeek DayOfWeek { get; set; } + /// Name of the day of the week. + public DayOfWeekName? DayOfWeekName + { + get => DayOfWeek is null ? default(DayOfWeekName?) : DayOfWeek.Name; + set + { + DayOfWeek = value.HasValue ? new DayOfWeek(value.Value) : null; + } + } + + /// auto start time. value must be of ISO-8601 format HH:mm. + public string ScheduledStartTime { get; set; } + /// auto stop time. value must be of ISO-8601 format HH:mm. + public string ScheduledStopTime { get; set; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/SessionModeType.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/SessionModeType.cs new file mode 100644 index 000000000000..5169914fe4ac --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/SessionModeType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// Session mode type enum. + public readonly partial struct SessionModeType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SessionModeType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DirectValue = "Direct"; + private const string RedirectValue = "Redirect"; + + /// Direct session mode. + public static SessionModeType Direct { get; } = new SessionModeType(DirectValue); + /// Redirect session mode. + public static SessionModeType Redirect { get; } = new SessionModeType(RedirectValue); + /// Determines if two values are the same. + public static bool operator ==(SessionModeType left, SessionModeType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SessionModeType left, SessionModeType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator SessionModeType(string value) => new SessionModeType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SessionModeType other && Equals(other); + /// + public bool Equals(SessionModeType 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/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ShapeFamily.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ShapeFamily.cs new file mode 100644 index 000000000000..5eefe1bf5e62 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ShapeFamily.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// Allowed values for GI Minor Versions shapeFamily filter. + public readonly partial struct ShapeFamily : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ShapeFamily(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ExadataValue = "EXADATA"; + private const string ExadbXsValue = "EXADB_XS"; + + /// Family value for Exadata Shape. + public static ShapeFamily Exadata { get; } = new ShapeFamily(ExadataValue); + /// Family value for Exadb XS Shape. + public static ShapeFamily ExadbXs { get; } = new ShapeFamily(ExadbXsValue); + /// Determines if two values are the same. + public static bool operator ==(ShapeFamily left, ShapeFamily right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ShapeFamily left, ShapeFamily right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ShapeFamily(string value) => new ShapeFamily(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ShapeFamily other && Equals(other); + /// + public bool Equals(ShapeFamily 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/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/SourceType.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/SourceType.cs new file mode 100644 index 000000000000..9174d6cc359a --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/SourceType.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// Source type enum. + public readonly partial struct SourceType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SourceType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoneValue = "None"; + private const string DatabaseValue = "Database"; + private const string BackupFromIdValue = "BackupFromId"; + private const string BackupFromTimestampValue = "BackupFromTimestamp"; + private const string CloneToRefreshableValue = "CloneToRefreshable"; + private const string CrossRegionDataguardValue = "CrossRegionDataguard"; + private const string CrossRegionDisasterRecoveryValue = "CrossRegionDisasterRecovery"; + + /// None source. + public static SourceType None { get; } = new SourceType(NoneValue); + /// Database source. + public static SourceType Database { get; } = new SourceType(DatabaseValue); + /// Backup from ID source. + public static SourceType BackupFromId { get; } = new SourceType(BackupFromIdValue); + /// Backup from timestamp source. + public static SourceType BackupFromTimestamp { get; } = new SourceType(BackupFromTimestampValue); + /// Clone to refreshable source. + public static SourceType CloneToRefreshable { get; } = new SourceType(CloneToRefreshableValue); + /// Cross region dataguard source. + public static SourceType CrossRegionDataguard { get; } = new SourceType(CrossRegionDataguardValue); + /// cross region disaster recovery source. + public static SourceType CrossRegionDisasterRecovery { get; } = new SourceType(CrossRegionDisasterRecoveryValue); + /// Determines if two values are the same. + public static bool operator ==(SourceType left, SourceType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SourceType left, SourceType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator SourceType(string value) => new SourceType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SourceType other && Equals(other); + /// + public bool Equals(SourceType 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/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/SyntaxFormatType.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/SyntaxFormatType.cs new file mode 100644 index 000000000000..69b89b441143 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/SyntaxFormatType.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// Syntax format type enum. + public readonly partial struct SyntaxFormatType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SyntaxFormatType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string LongValue = "Long"; + private const string EzconnectValue = "Ezconnect"; + private const string EzconnectplusValue = "Ezconnectplus"; + + /// Long format. + public static SyntaxFormatType Long { get; } = new SyntaxFormatType(LongValue); + /// Ezconnect format. + public static SyntaxFormatType Ezconnect { get; } = new SyntaxFormatType(EzconnectValue); + /// Ezconnectplus format. + public static SyntaxFormatType Ezconnectplus { get; } = new SyntaxFormatType(EzconnectplusValue); + /// Determines if two values are the same. + public static bool operator ==(SyntaxFormatType left, SyntaxFormatType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SyntaxFormatType left, SyntaxFormatType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator SyntaxFormatType(string value) => new SyntaxFormatType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SyntaxFormatType other && Equals(other); + /// + public bool Equals(SyntaxFormatType 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/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/SystemShape.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/SystemShape.cs new file mode 100644 index 000000000000..583b0dc82075 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/SystemShape.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// Allowed values for System Shapes. + public readonly partial struct SystemShape : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SystemShape(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ExadataX9MValue = "Exadata.X9M"; + private const string ExadataX11MValue = "Exadata.X11M"; + private const string ExaDbXsValue = "ExaDbXS"; + + /// Exadata X9M shape. + public static SystemShape ExadataX9M { get; } = new SystemShape(ExadataX9MValue); + /// Exadata X11M shape. + public static SystemShape ExadataX11M { get; } = new SystemShape(ExadataX11MValue); + /// Exadata DB on Exascale Infrastructure shape. + public static SystemShape ExaDbXs { get; } = new SystemShape(ExaDbXsValue); + /// Determines if two values are the same. + public static bool operator ==(SystemShape left, SystemShape right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SystemShape left, SystemShape right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator SystemShape(string value) => new SystemShape(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SystemShape other && Equals(other); + /// + public bool Equals(SystemShape 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/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/SystemVersionListResult.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/SystemVersionListResult.Serialization.cs new file mode 100644 index 000000000000..18f8328497f1 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/SystemVersionListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + internal partial class SystemVersionListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SystemVersionListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SystemVersionListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SystemVersionListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSystemVersionListResult(document.RootElement, options); + } + + internal static SystemVersionListResult DeserializeSystemVersionListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SystemVersionData.DeserializeSystemVersionData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SystemVersionListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SystemVersionListResult)} does not support writing '{options.Format}' format."); + } + } + + SystemVersionListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSystemVersionListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SystemVersionListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/SystemVersionListResult.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/SystemVersionListResult.cs new file mode 100644 index 000000000000..c063ee4a9b9a --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/SystemVersionListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// The response of a SystemVersion list operation. + internal partial class SystemVersionListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The SystemVersion items on this page. + /// is null. + internal SystemVersionListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The SystemVersion items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal SystemVersionListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SystemVersionListResult() + { + } + + /// The SystemVersion items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/SystemVersionProperties.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/SystemVersionProperties.Serialization.cs new file mode 100644 index 000000000000..7dd18241abef --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/SystemVersionProperties.Serialization.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + internal partial class SystemVersionProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SystemVersionProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("systemVersion"u8); + writer.WriteStringValue(SystemVersion); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SystemVersionProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SystemVersionProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSystemVersionProperties(document.RootElement, options); + } + + internal static SystemVersionProperties DeserializeSystemVersionProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string systemVersion = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("systemVersion"u8)) + { + systemVersion = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SystemVersionProperties(systemVersion, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SystemVersionProperties)} does not support writing '{options.Format}' format."); + } + } + + SystemVersionProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSystemVersionProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SystemVersionProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/SystemVersionProperties.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/SystemVersionProperties.cs new file mode 100644 index 000000000000..0fac8f4e622c --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/SystemVersionProperties.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// System Version Resource model. + internal partial class SystemVersionProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// A valid Oracle System Version. + /// is null. + internal SystemVersionProperties(string systemVersion) + { + Argument.AssertNotNull(systemVersion, nameof(systemVersion)); + + SystemVersion = systemVersion; + } + + /// Initializes a new instance of . + /// A valid Oracle System Version. + /// Keeps track of any properties unknown to the library. + internal SystemVersionProperties(string systemVersion, IDictionary serializedAdditionalRawData) + { + SystemVersion = systemVersion; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SystemVersionProperties() + { + } + + /// A valid Oracle System Version. + public string SystemVersion { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/TlsAuthenticationType.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/TlsAuthenticationType.cs new file mode 100644 index 000000000000..8821a8ec81b3 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/TlsAuthenticationType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// TLS authentication type enum. + public readonly partial struct TlsAuthenticationType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public TlsAuthenticationType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ServerValue = "Server"; + private const string MutualValue = "Mutual"; + + /// Server authentication. + public static TlsAuthenticationType Server { get; } = new TlsAuthenticationType(ServerValue); + /// Mutual TLS. + public static TlsAuthenticationType Mutual { get; } = new TlsAuthenticationType(MutualValue); + /// Determines if two values are the same. + public static bool operator ==(TlsAuthenticationType left, TlsAuthenticationType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(TlsAuthenticationType left, TlsAuthenticationType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator TlsAuthenticationType(string value) => new TlsAuthenticationType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is TlsAuthenticationType other && Equals(other); + /// + public bool Equals(TlsAuthenticationType 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/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/UnknownAutonomousDatabaseBaseProperties.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/UnknownAutonomousDatabaseBaseProperties.Serialization.cs new file mode 100644 index 000000000000..447a993a3758 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/UnknownAutonomousDatabaseBaseProperties.Serialization.cs @@ -0,0 +1,890 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + internal partial class UnknownAutonomousDatabaseBaseProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AutonomousDatabaseBaseProperties)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + AutonomousDatabaseBaseProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AutonomousDatabaseBaseProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAutonomousDatabaseBaseProperties(document.RootElement, options); + } + + internal static UnknownAutonomousDatabaseBaseProperties DeserializeUnknownAutonomousDatabaseBaseProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string adminPassword = default; + DataBaseType dataBaseType = "Unknown"; + AutonomousMaintenanceScheduleType? autonomousMaintenanceScheduleType = default; + string characterSet = default; + float? computeCount = default; + ComputeModel? computeModel = default; + int? cpuCoreCount = default; + IList customerContacts = default; + int? dataStorageSizeInTbs = default; + int? dataStorageSizeInGbs = default; + string dbVersion = default; + WorkloadType? dbWorkload = default; + string displayName = default; + bool? isAutoScalingEnabled = default; + bool? isAutoScalingForStorageEnabled = default; + IReadOnlyList peerDbIds = default; + string peerDbId = default; + bool? isLocalDataGuardEnabled = default; + bool? isRemoteDataGuardEnabled = default; + DisasterRecoveryType? localDisasterRecoveryType = default; + DateTimeOffset? timeDisasterRecoveryRoleChanged = default; + DisasterRecoveryConfigurationDetails remoteDisasterRecoveryConfiguration = default; + AutonomousDatabaseStandbySummary localStandbyDb = default; + int? failedDataRecoveryInSeconds = default; + bool? isMtlsConnectionRequired = default; + bool? isPreviewVersionWithServiceTermsAccepted = default; + LicenseModel? licenseModel = default; + string ncharacterSet = default; + string lifecycleDetails = default; + AzureResourceProvisioningState? provisioningState = default; + AutonomousDatabaseLifecycleState? lifecycleState = default; + ScheduledOperationsType scheduledOperations = default; + string privateEndpointIP = default; + string privateEndpointLabel = default; + string ociUrl = default; + ResourceIdentifier subnetId = default; + ResourceIdentifier vnetId = default; + DateTimeOffset? timeCreated = default; + DateTimeOffset? timeMaintenanceBegin = default; + DateTimeOffset? timeMaintenanceEnd = default; + double? actualUsedDataStorageSizeInTbs = default; + double? allocatedStorageSizeInTbs = default; + ApexDetailsType apexDetails = default; + IReadOnlyList availableUpgradeVersions = default; + ConnectionStringType connectionStrings = default; + ConnectionUrlType connectionUrls = default; + DataSafeStatusType? dataSafeStatus = default; + DatabaseEditionType? databaseEdition = default; + ResourceIdentifier autonomousDatabaseId = default; + int? inMemoryAreaInGbs = default; + DateTimeOffset? nextLongTermBackupTimeStamp = default; + LongTermBackUpScheduleDetails longTermBackupSchedule = default; + bool? isPreview = default; + int? localAdgAutoFailoverMaxDataLossLimit = default; + int? memoryPerOracleComputeUnitInGbs = default; + OpenModeType? openMode = default; + OperationsInsightsStatusType? operationsInsightsStatus = default; + PermissionLevelType? permissionLevel = default; + string privateEndpoint = default; + IReadOnlyList provisionableCpus = default; + RoleType? role = default; + string serviceConsoleUrl = default; + string sqlWebDeveloperUrl = default; + IReadOnlyList supportedRegionsToCloneTo = default; + string timeDataGuardRoleChanged = default; + string timeDeletionOfFreeAutonomousDatabase = default; + string timeLocalDataGuardEnabled = default; + string timeOfLastFailover = default; + string timeOfLastRefresh = default; + string timeOfLastRefreshPoint = default; + string timeOfLastSwitchover = default; + string timeReclamationOfFreeAutonomousDatabase = default; + int? usedDataStorageSizeInGbs = default; + int? usedDataStorageSizeInTbs = default; + string ocid = default; + int? backupRetentionPeriodInDays = default; + IList whitelistedIPs = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("adminPassword"u8)) + { + adminPassword = property.Value.GetString(); + continue; + } + if (property.NameEquals("dataBaseType"u8)) + { + dataBaseType = new DataBaseType(property.Value.GetString()); + continue; + } + if (property.NameEquals("autonomousMaintenanceScheduleType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + autonomousMaintenanceScheduleType = new AutonomousMaintenanceScheduleType(property.Value.GetString()); + continue; + } + if (property.NameEquals("characterSet"u8)) + { + characterSet = property.Value.GetString(); + continue; + } + if (property.NameEquals("computeCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + computeCount = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("computeModel"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + computeModel = new ComputeModel(property.Value.GetString()); + continue; + } + if (property.NameEquals("cpuCoreCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + cpuCoreCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("customerContacts"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(CustomerContact.DeserializeCustomerContact(item, options)); + } + customerContacts = array; + continue; + } + if (property.NameEquals("dataStorageSizeInTbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dataStorageSizeInTbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("dataStorageSizeInGbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dataStorageSizeInGbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("dbVersion"u8)) + { + dbVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("dbWorkload"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dbWorkload = new WorkloadType(property.Value.GetString()); + continue; + } + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("isAutoScalingEnabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isAutoScalingEnabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("isAutoScalingForStorageEnabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isAutoScalingForStorageEnabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("peerDbIds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + peerDbIds = array; + continue; + } + if (property.NameEquals("peerDbId"u8)) + { + peerDbId = property.Value.GetString(); + continue; + } + if (property.NameEquals("isLocalDataGuardEnabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isLocalDataGuardEnabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("isRemoteDataGuardEnabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isRemoteDataGuardEnabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("localDisasterRecoveryType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + localDisasterRecoveryType = new DisasterRecoveryType(property.Value.GetString()); + continue; + } + if (property.NameEquals("timeDisasterRecoveryRoleChanged"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeDisasterRecoveryRoleChanged = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("remoteDisasterRecoveryConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + remoteDisasterRecoveryConfiguration = DisasterRecoveryConfigurationDetails.DeserializeDisasterRecoveryConfigurationDetails(property.Value, options); + continue; + } + if (property.NameEquals("localStandbyDb"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + localStandbyDb = AutonomousDatabaseStandbySummary.DeserializeAutonomousDatabaseStandbySummary(property.Value, options); + continue; + } + if (property.NameEquals("failedDataRecoveryInSeconds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + failedDataRecoveryInSeconds = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("isMtlsConnectionRequired"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isMtlsConnectionRequired = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("isPreviewVersionWithServiceTermsAccepted"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isPreviewVersionWithServiceTermsAccepted = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("licenseModel"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + licenseModel = new LicenseModel(property.Value.GetString()); + continue; + } + if (property.NameEquals("ncharacterSet"u8)) + { + ncharacterSet = property.Value.GetString(); + continue; + } + if (property.NameEquals("lifecycleDetails"u8)) + { + lifecycleDetails = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new AzureResourceProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("lifecycleState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lifecycleState = new AutonomousDatabaseLifecycleState(property.Value.GetString()); + continue; + } + if (property.NameEquals("scheduledOperations"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + scheduledOperations = ScheduledOperationsType.DeserializeScheduledOperationsType(property.Value, options); + continue; + } + if (property.NameEquals("privateEndpointIp"u8)) + { + privateEndpointIP = property.Value.GetString(); + continue; + } + if (property.NameEquals("privateEndpointLabel"u8)) + { + privateEndpointLabel = property.Value.GetString(); + continue; + } + if (property.NameEquals("ociUrl"u8)) + { + ociUrl = property.Value.GetString(); + continue; + } + if (property.NameEquals("subnetId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + subnetId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("vnetId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + vnetId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("timeCreated"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeCreated = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("timeMaintenanceBegin"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeMaintenanceBegin = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("timeMaintenanceEnd"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeMaintenanceEnd = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("actualUsedDataStorageSizeInTbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + actualUsedDataStorageSizeInTbs = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("allocatedStorageSizeInTbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + allocatedStorageSizeInTbs = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("apexDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + apexDetails = ApexDetailsType.DeserializeApexDetailsType(property.Value, options); + continue; + } + if (property.NameEquals("availableUpgradeVersions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + availableUpgradeVersions = array; + continue; + } + if (property.NameEquals("connectionStrings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectionStrings = ConnectionStringType.DeserializeConnectionStringType(property.Value, options); + continue; + } + if (property.NameEquals("connectionUrls"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectionUrls = ConnectionUrlType.DeserializeConnectionUrlType(property.Value, options); + continue; + } + if (property.NameEquals("dataSafeStatus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dataSafeStatus = new DataSafeStatusType(property.Value.GetString()); + continue; + } + if (property.NameEquals("databaseEdition"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + databaseEdition = new DatabaseEditionType(property.Value.GetString()); + continue; + } + if (property.NameEquals("autonomousDatabaseId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + autonomousDatabaseId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("inMemoryAreaInGbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + inMemoryAreaInGbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("nextLongTermBackupTimeStamp"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLongTermBackupTimeStamp = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("longTermBackupSchedule"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + longTermBackupSchedule = LongTermBackUpScheduleDetails.DeserializeLongTermBackUpScheduleDetails(property.Value, options); + continue; + } + if (property.NameEquals("isPreview"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isPreview = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("localAdgAutoFailoverMaxDataLossLimit"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + localAdgAutoFailoverMaxDataLossLimit = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("memoryPerOracleComputeUnitInGbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + memoryPerOracleComputeUnitInGbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("openMode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + openMode = new OpenModeType(property.Value.GetString()); + continue; + } + if (property.NameEquals("operationsInsightsStatus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + operationsInsightsStatus = new OperationsInsightsStatusType(property.Value.GetString()); + continue; + } + if (property.NameEquals("permissionLevel"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + permissionLevel = new PermissionLevelType(property.Value.GetString()); + continue; + } + if (property.NameEquals("privateEndpoint"u8)) + { + privateEndpoint = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisionableCpus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetInt32()); + } + provisionableCpus = array; + continue; + } + if (property.NameEquals("role"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + role = new RoleType(property.Value.GetString()); + continue; + } + if (property.NameEquals("serviceConsoleUrl"u8)) + { + serviceConsoleUrl = property.Value.GetString(); + continue; + } + if (property.NameEquals("sqlWebDeveloperUrl"u8)) + { + sqlWebDeveloperUrl = property.Value.GetString(); + continue; + } + if (property.NameEquals("supportedRegionsToCloneTo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + supportedRegionsToCloneTo = array; + continue; + } + if (property.NameEquals("timeDataGuardRoleChanged"u8)) + { + timeDataGuardRoleChanged = property.Value.GetString(); + continue; + } + if (property.NameEquals("timeDeletionOfFreeAutonomousDatabase"u8)) + { + timeDeletionOfFreeAutonomousDatabase = property.Value.GetString(); + continue; + } + if (property.NameEquals("timeLocalDataGuardEnabled"u8)) + { + timeLocalDataGuardEnabled = property.Value.GetString(); + continue; + } + if (property.NameEquals("timeOfLastFailover"u8)) + { + timeOfLastFailover = property.Value.GetString(); + continue; + } + if (property.NameEquals("timeOfLastRefresh"u8)) + { + timeOfLastRefresh = property.Value.GetString(); + continue; + } + if (property.NameEquals("timeOfLastRefreshPoint"u8)) + { + timeOfLastRefreshPoint = property.Value.GetString(); + continue; + } + if (property.NameEquals("timeOfLastSwitchover"u8)) + { + timeOfLastSwitchover = property.Value.GetString(); + continue; + } + if (property.NameEquals("timeReclamationOfFreeAutonomousDatabase"u8)) + { + timeReclamationOfFreeAutonomousDatabase = property.Value.GetString(); + continue; + } + if (property.NameEquals("usedDataStorageSizeInGbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + usedDataStorageSizeInGbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("usedDataStorageSizeInTbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + usedDataStorageSizeInTbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("ocid"u8)) + { + ocid = property.Value.GetString(); + continue; + } + if (property.NameEquals("backupRetentionPeriodInDays"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + backupRetentionPeriodInDays = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("whitelistedIps"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + whitelistedIPs = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownAutonomousDatabaseBaseProperties( + adminPassword, + dataBaseType, + autonomousMaintenanceScheduleType, + characterSet, + computeCount, + computeModel, + cpuCoreCount, + customerContacts ?? new ChangeTrackingList(), + dataStorageSizeInTbs, + dataStorageSizeInGbs, + dbVersion, + dbWorkload, + displayName, + isAutoScalingEnabled, + isAutoScalingForStorageEnabled, + peerDbIds ?? new ChangeTrackingList(), + peerDbId, + isLocalDataGuardEnabled, + isRemoteDataGuardEnabled, + localDisasterRecoveryType, + timeDisasterRecoveryRoleChanged, + remoteDisasterRecoveryConfiguration, + localStandbyDb, + failedDataRecoveryInSeconds, + isMtlsConnectionRequired, + isPreviewVersionWithServiceTermsAccepted, + licenseModel, + ncharacterSet, + lifecycleDetails, + provisioningState, + lifecycleState, + scheduledOperations, + privateEndpointIP, + privateEndpointLabel, + ociUrl, + subnetId, + vnetId, + timeCreated, + timeMaintenanceBegin, + timeMaintenanceEnd, + actualUsedDataStorageSizeInTbs, + allocatedStorageSizeInTbs, + apexDetails, + availableUpgradeVersions ?? new ChangeTrackingList(), + connectionStrings, + connectionUrls, + dataSafeStatus, + databaseEdition, + autonomousDatabaseId, + inMemoryAreaInGbs, + nextLongTermBackupTimeStamp, + longTermBackupSchedule, + isPreview, + localAdgAutoFailoverMaxDataLossLimit, + memoryPerOracleComputeUnitInGbs, + openMode, + operationsInsightsStatus, + permissionLevel, + privateEndpoint, + provisionableCpus ?? new ChangeTrackingList(), + role, + serviceConsoleUrl, + sqlWebDeveloperUrl, + supportedRegionsToCloneTo ?? new ChangeTrackingList(), + timeDataGuardRoleChanged, + timeDeletionOfFreeAutonomousDatabase, + timeLocalDataGuardEnabled, + timeOfLastFailover, + timeOfLastRefresh, + timeOfLastRefreshPoint, + timeOfLastSwitchover, + timeReclamationOfFreeAutonomousDatabase, + usedDataStorageSizeInGbs, + usedDataStorageSizeInTbs, + ocid, + backupRetentionPeriodInDays, + whitelistedIPs ?? new ChangeTrackingList(), + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AutonomousDatabaseBaseProperties)} does not support writing '{options.Format}' format."); + } + } + + AutonomousDatabaseBaseProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAutonomousDatabaseBaseProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AutonomousDatabaseBaseProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/UnknownAutonomousDatabaseBaseProperties.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/UnknownAutonomousDatabaseBaseProperties.cs new file mode 100644 index 000000000000..0f83cf6074a9 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/UnknownAutonomousDatabaseBaseProperties.cs @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// Unknown version of AutonomousDatabaseBaseProperties. + internal partial class UnknownAutonomousDatabaseBaseProperties : AutonomousDatabaseBaseProperties + { + /// Initializes a new instance of . + /// Admin password. + /// Database type to be created. + /// The maintenance schedule type of the Autonomous Database Serverless. + /// The character set for the autonomous database. + /// The compute amount (CPUs) available to the database. + /// The compute model of the Autonomous Database. + /// The number of CPU cores to be made available to the database. + /// Customer Contacts. + /// The quantity of data in the database, in terabytes. + /// The size, in gigabytes, of the data volume that will be created and attached to the database. + /// A valid Oracle Database version for Autonomous Database. + /// The Autonomous Database workload type. + /// The user-friendly name for the Autonomous Database. + /// Indicates if auto scaling is enabled for the Autonomous Database CPU core count. + /// Indicates if auto scaling is enabled for the Autonomous Database storage. + /// The list of Azure resource IDs of standby databases located in Autonomous Data Guard remote regions that are associated with the source database. Note that for Autonomous Database Serverless instances, standby databases located in the same region as the source primary database do not have Azure IDs. + /// The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current peer database. + /// Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. + /// Indicates whether the Autonomous Database has Cross Region Data Guard enabled. + /// Indicates the local disaster recovery (DR) type of the Autonomous Database Serverless instance.Autonomous Data Guard (ADG) DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover.Backup-based DR type provides lower cost DR with a slower RTO during failover or switchover. + /// The date and time the Disaster Recovery role was switched for the standby Autonomous Database. + /// Indicates remote disaster recovery configuration. + /// Local Autonomous Disaster Recovery standby database details. + /// Indicates the number of seconds of data loss for a Data Guard failover. + /// Specifies if the Autonomous Database requires mTLS connections. + /// Specifies if the Autonomous Database preview version is being provisioned. + /// The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED. + /// The character set for the Autonomous Database. + /// Additional information about the current lifecycle state. + /// Azure resource provisioning state. + /// Views lifecycleState. + /// The list of scheduled operations. + /// The private endpoint Ip address for the resource. + /// The resource's private endpoint label. + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + /// Client subnet. + /// VNET for network connectivity. + /// The date and time that the database was created. + /// The date and time when maintenance will begin. + /// The date and time when maintenance will end. + /// The current amount of storage in use for user and system data, in terabytes (TB). + /// The amount of storage currently allocated for the database tables and billed for, rounded up. + /// Information about Oracle APEX Application Development. + /// List of Oracle Database versions available for a database upgrade. If there are no version upgrades available, this list is empty. + /// The connection string used to connect to the Autonomous Database. + /// The URLs for accessing Oracle Application Express (APEX) and SQL Developer Web with a browser from a Compute instance within your VCN or that has a direct connection to your VCN. + /// Status of the Data Safe registration for this Autonomous Database. + /// The Oracle Database Edition that applies to the Autonomous databases. + /// Autonomous Database ID. + /// The area assigned to In-Memory tables in Autonomous Database. + /// The date and time when the next long-term backup would be created. + /// Details for the long-term backup schedule. + /// Indicates if the Autonomous Database version is a preview version. + /// Parameter that allows users to select an acceptable maximum data loss limit in seconds, up to which Automatic Failover will be triggered when necessary for a Local Autonomous Data Guard. + /// The amount of memory (in GBs) enabled per ECPU or OCPU. + /// Indicates the Autonomous Database mode. + /// Status of Operations Insights for this Autonomous Database. + /// The Autonomous Database permission level. + /// The private endpoint for the resource. + /// An array of CPU values that an Autonomous Database can be scaled to. + /// The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. + /// The URL of the Service Console for the Autonomous Database. + /// The SQL Web Developer URL for the Oracle Autonomous Database. + /// The list of regions that support the creation of an Autonomous Database clone or an Autonomous Data Guard standby database. + /// The date and time the Autonomous Data Guard role was switched for the Autonomous Database. + /// The date and time the Always Free database will be automatically deleted because of inactivity. + /// The date and time that Autonomous Data Guard was enabled for an Autonomous Database where the standby was provisioned in the same region as the primary database. + /// The timestamp of the last failover operation. + /// The date and time when last refresh happened. + /// The refresh point timestamp (UTC). + /// The timestamp of the last switchover operation for the Autonomous Database. + /// The date and time the Always Free database will be stopped because of inactivity. + /// The storage space consumed by Autonomous Database in GBs. + /// The amount of storage that has been used, in terabytes. + /// Database ocid. + /// Retention period, in days, for long-term backups. + /// The client IP access control list (ACL). This is an array of CIDR notations and/or IP addresses. Values should be separate strings, separated by commas. Example: ['1.1.1.1','1.1.1.0/24','1.1.2.25']. + /// Keeps track of any properties unknown to the library. + internal UnknownAutonomousDatabaseBaseProperties(string adminPassword, DataBaseType dataBaseType, AutonomousMaintenanceScheduleType? autonomousMaintenanceScheduleType, string characterSet, float? computeCount, ComputeModel? computeModel, int? cpuCoreCount, IList customerContacts, int? dataStorageSizeInTbs, int? dataStorageSizeInGbs, string dbVersion, WorkloadType? dbWorkload, string displayName, bool? isAutoScalingEnabled, bool? isAutoScalingForStorageEnabled, IReadOnlyList peerDbIds, string peerDbId, bool? isLocalDataGuardEnabled, bool? isRemoteDataGuardEnabled, DisasterRecoveryType? localDisasterRecoveryType, DateTimeOffset? timeDisasterRecoveryRoleChanged, DisasterRecoveryConfigurationDetails remoteDisasterRecoveryConfiguration, AutonomousDatabaseStandbySummary localStandbyDb, int? failedDataRecoveryInSeconds, bool? isMtlsConnectionRequired, bool? isPreviewVersionWithServiceTermsAccepted, LicenseModel? licenseModel, string ncharacterSet, string lifecycleDetails, AzureResourceProvisioningState? provisioningState, AutonomousDatabaseLifecycleState? lifecycleState, ScheduledOperationsType scheduledOperations, string privateEndpointIP, string privateEndpointLabel, string ociUri, ResourceIdentifier subnetId, ResourceIdentifier vnetId, DateTimeOffset? timeCreated, DateTimeOffset? timeMaintenanceBegin, DateTimeOffset? timeMaintenanceEnd, double? actualUsedDataStorageSizeInTbs, double? allocatedStorageSizeInTbs, ApexDetailsType apexDetails, IReadOnlyList availableUpgradeVersions, ConnectionStringType connectionStrings, ConnectionUrlType connectionUrls, DataSafeStatusType? dataSafeStatus, DatabaseEditionType? databaseEdition, ResourceIdentifier autonomousDatabaseId, int? inMemoryAreaInGbs, DateTimeOffset? nextLongTermBackupTimeStamp, LongTermBackUpScheduleDetails longTermBackupSchedule, bool? isPreview, int? localAdgAutoFailoverMaxDataLossLimit, int? memoryPerOracleComputeUnitInGbs, OpenModeType? openMode, OperationsInsightsStatusType? operationsInsightsStatus, PermissionLevelType? permissionLevel, string privateEndpoint, IReadOnlyList provisionableCpus, RoleType? role, string serviceConsoleUri, string sqlWebDeveloperUri, IReadOnlyList supportedRegionsToCloneTo, string timeDataGuardRoleChanged, string timeDeletionOfFreeAutonomousDatabase, string timeLocalDataGuardEnabled, string timeOfLastFailover, string timeOfLastRefresh, string timeOfLastRefreshPoint, string timeOfLastSwitchover, string timeReclamationOfFreeAutonomousDatabase, int? usedDataStorageSizeInGbs, int? usedDataStorageSizeInTbs, string ocid, int? backupRetentionPeriodInDays, IList whitelistedIPs, IDictionary serializedAdditionalRawData) : base(adminPassword, dataBaseType, autonomousMaintenanceScheduleType, characterSet, computeCount, computeModel, cpuCoreCount, customerContacts, dataStorageSizeInTbs, dataStorageSizeInGbs, dbVersion, dbWorkload, displayName, isAutoScalingEnabled, isAutoScalingForStorageEnabled, peerDbIds, peerDbId, isLocalDataGuardEnabled, isRemoteDataGuardEnabled, localDisasterRecoveryType, timeDisasterRecoveryRoleChanged, remoteDisasterRecoveryConfiguration, localStandbyDb, failedDataRecoveryInSeconds, isMtlsConnectionRequired, isPreviewVersionWithServiceTermsAccepted, licenseModel, ncharacterSet, lifecycleDetails, provisioningState, lifecycleState, scheduledOperations, privateEndpointIP, privateEndpointLabel, ociUri, subnetId, vnetId, timeCreated, timeMaintenanceBegin, timeMaintenanceEnd, actualUsedDataStorageSizeInTbs, allocatedStorageSizeInTbs, apexDetails, availableUpgradeVersions, connectionStrings, connectionUrls, dataSafeStatus, databaseEdition, autonomousDatabaseId, inMemoryAreaInGbs, nextLongTermBackupTimeStamp, longTermBackupSchedule, isPreview, localAdgAutoFailoverMaxDataLossLimit, memoryPerOracleComputeUnitInGbs, openMode, operationsInsightsStatus, permissionLevel, privateEndpoint, provisionableCpus, role, serviceConsoleUri, sqlWebDeveloperUri, supportedRegionsToCloneTo, timeDataGuardRoleChanged, timeDeletionOfFreeAutonomousDatabase, timeLocalDataGuardEnabled, timeOfLastFailover, timeOfLastRefresh, timeOfLastRefreshPoint, timeOfLastSwitchover, timeReclamationOfFreeAutonomousDatabase, usedDataStorageSizeInGbs, usedDataStorageSizeInTbs, ocid, backupRetentionPeriodInDays, whitelistedIPs, serializedAdditionalRawData) + { + DataBaseType = dataBaseType; + } + + /// Initializes a new instance of for deserialization. + internal UnknownAutonomousDatabaseBaseProperties() + { + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/VirtualNetworkAddressLifecycleState.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/VirtualNetworkAddressLifecycleState.cs new file mode 100644 index 000000000000..2fc4c539b55f --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/VirtualNetworkAddressLifecycleState.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// VirtualNetworkAddressLifecycleState enum. + public readonly partial struct VirtualNetworkAddressLifecycleState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public VirtualNetworkAddressLifecycleState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ProvisioningValue = "Provisioning"; + private const string AvailableValue = "Available"; + private const string TerminatingValue = "Terminating"; + private const string TerminatedValue = "Terminated"; + private const string FailedValue = "Failed"; + + /// Indicates that resource in Provisioning state. + public static VirtualNetworkAddressLifecycleState Provisioning { get; } = new VirtualNetworkAddressLifecycleState(ProvisioningValue); + /// Indicates that resource in Available state. + public static VirtualNetworkAddressLifecycleState Available { get; } = new VirtualNetworkAddressLifecycleState(AvailableValue); + /// Indicates that resource in Terminating state. + public static VirtualNetworkAddressLifecycleState Terminating { get; } = new VirtualNetworkAddressLifecycleState(TerminatingValue); + /// Indicates that resource in Terminated state. + public static VirtualNetworkAddressLifecycleState Terminated { get; } = new VirtualNetworkAddressLifecycleState(TerminatedValue); + /// Indicates that resource in Failed state. + public static VirtualNetworkAddressLifecycleState Failed { get; } = new VirtualNetworkAddressLifecycleState(FailedValue); + /// Determines if two values are the same. + public static bool operator ==(VirtualNetworkAddressLifecycleState left, VirtualNetworkAddressLifecycleState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(VirtualNetworkAddressLifecycleState left, VirtualNetworkAddressLifecycleState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator VirtualNetworkAddressLifecycleState(string value) => new VirtualNetworkAddressLifecycleState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is VirtualNetworkAddressLifecycleState other && Equals(other); + /// + public bool Equals(VirtualNetworkAddressLifecycleState 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/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/VirtualNetworkAddressListResult.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/VirtualNetworkAddressListResult.Serialization.cs new file mode 100644 index 000000000000..b9d81a4a5892 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/VirtualNetworkAddressListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + internal partial class VirtualNetworkAddressListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(VirtualNetworkAddressListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + VirtualNetworkAddressListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(VirtualNetworkAddressListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeVirtualNetworkAddressListResult(document.RootElement, options); + } + + internal static VirtualNetworkAddressListResult DeserializeVirtualNetworkAddressListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(VirtualNetworkAddressData.DeserializeVirtualNetworkAddressData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new VirtualNetworkAddressListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(VirtualNetworkAddressListResult)} does not support writing '{options.Format}' format."); + } + } + + VirtualNetworkAddressListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeVirtualNetworkAddressListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(VirtualNetworkAddressListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/VirtualNetworkAddressListResult.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/VirtualNetworkAddressListResult.cs new file mode 100644 index 000000000000..219beb2ad7bb --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/VirtualNetworkAddressListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// The response of a VirtualNetworkAddress list operation. + internal partial class VirtualNetworkAddressListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The VirtualNetworkAddress items on this page. + /// is null. + internal VirtualNetworkAddressListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The VirtualNetworkAddress items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal VirtualNetworkAddressListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal VirtualNetworkAddressListResult() + { + } + + /// The VirtualNetworkAddress items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/VirtualNetworkAddressProperties.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/VirtualNetworkAddressProperties.Serialization.cs new file mode 100644 index 000000000000..0ecaf87f7ecd --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/VirtualNetworkAddressProperties.Serialization.cs @@ -0,0 +1,227 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + public partial class VirtualNetworkAddressProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(VirtualNetworkAddressProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(IPAddress)) + { + writer.WritePropertyName("ipAddress"u8); + writer.WriteStringValue(IPAddress); + } + if (Optional.IsDefined(VmOcid)) + { + writer.WritePropertyName("vmOcid"u8); + writer.WriteStringValue(VmOcid); + } + if (options.Format != "W" && Optional.IsDefined(Ocid)) + { + writer.WritePropertyName("ocid"u8); + writer.WriteStringValue(Ocid); + } + if (options.Format != "W" && Optional.IsDefined(Domain)) + { + writer.WritePropertyName("domain"u8); + writer.WriteStringValue(Domain); + } + if (options.Format != "W" && Optional.IsDefined(LifecycleDetails)) + { + writer.WritePropertyName("lifecycleDetails"u8); + writer.WriteStringValue(LifecycleDetails); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(LifecycleState)) + { + writer.WritePropertyName("lifecycleState"u8); + writer.WriteStringValue(LifecycleState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(TimeAssigned)) + { + writer.WritePropertyName("timeAssigned"u8); + writer.WriteStringValue(TimeAssigned.Value, "O"); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + VirtualNetworkAddressProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(VirtualNetworkAddressProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeVirtualNetworkAddressProperties(document.RootElement, options); + } + + internal static VirtualNetworkAddressProperties DeserializeVirtualNetworkAddressProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string ipAddress = default; + string vmOcid = default; + string ocid = default; + string domain = default; + string lifecycleDetails = default; + AzureResourceProvisioningState? provisioningState = default; + VirtualNetworkAddressLifecycleState? lifecycleState = default; + DateTimeOffset? timeAssigned = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("ipAddress"u8)) + { + ipAddress = property.Value.GetString(); + continue; + } + if (property.NameEquals("vmOcid"u8)) + { + vmOcid = property.Value.GetString(); + continue; + } + if (property.NameEquals("ocid"u8)) + { + ocid = property.Value.GetString(); + continue; + } + if (property.NameEquals("domain"u8)) + { + domain = property.Value.GetString(); + continue; + } + if (property.NameEquals("lifecycleDetails"u8)) + { + lifecycleDetails = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new AzureResourceProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("lifecycleState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lifecycleState = new VirtualNetworkAddressLifecycleState(property.Value.GetString()); + continue; + } + if (property.NameEquals("timeAssigned"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeAssigned = property.Value.GetDateTimeOffset("O"); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new VirtualNetworkAddressProperties( + ipAddress, + vmOcid, + ocid, + domain, + lifecycleDetails, + provisioningState, + lifecycleState, + timeAssigned, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(VirtualNetworkAddressProperties)} does not support writing '{options.Format}' format."); + } + } + + VirtualNetworkAddressProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeVirtualNetworkAddressProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(VirtualNetworkAddressProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/VirtualNetworkAddressProperties.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/VirtualNetworkAddressProperties.cs new file mode 100644 index 000000000000..f424a6b592ef --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/VirtualNetworkAddressProperties.cs @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// virtualNetworkAddress resource properties. + public partial class VirtualNetworkAddressProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public VirtualNetworkAddressProperties() + { + } + + /// Initializes a new instance of . + /// Virtual network Address address. + /// Virtual Machine OCID. + /// Application VIP OCID. + /// Virtual network address fully qualified domain name. + /// Additional information about the current lifecycle state of the application virtual IP (VIP) address. + /// Azure resource provisioning state. + /// virtual network address lifecycle state. + /// The date and time when the create operation for the application virtual IP (VIP) address completed. + /// Keeps track of any properties unknown to the library. + internal VirtualNetworkAddressProperties(string ipAddress, string vmOcid, string ocid, string domain, string lifecycleDetails, AzureResourceProvisioningState? provisioningState, VirtualNetworkAddressLifecycleState? lifecycleState, DateTimeOffset? timeAssigned, IDictionary serializedAdditionalRawData) + { + IPAddress = ipAddress; + VmOcid = vmOcid; + Ocid = ocid; + Domain = domain; + LifecycleDetails = lifecycleDetails; + ProvisioningState = provisioningState; + LifecycleState = lifecycleState; + TimeAssigned = timeAssigned; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Virtual network Address address. + public string IPAddress { get; set; } + /// Virtual Machine OCID. + public string VmOcid { get; set; } + /// Application VIP OCID. + public string Ocid { get; } + /// Virtual network address fully qualified domain name. + public string Domain { get; } + /// Additional information about the current lifecycle state of the application virtual IP (VIP) address. + public string LifecycleDetails { get; } + /// Azure resource provisioning state. + public AzureResourceProvisioningState? ProvisioningState { get; } + /// virtual network address lifecycle state. + public VirtualNetworkAddressLifecycleState? LifecycleState { get; } + /// The date and time when the create operation for the application virtual IP (VIP) address completed. + public DateTimeOffset? TimeAssigned { get; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/WorkloadType.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/WorkloadType.cs new file mode 100644 index 000000000000..f9aa03dc16a3 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/WorkloadType.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// WorkloadType enum. + public readonly partial struct WorkloadType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public WorkloadType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string OLTPValue = "OLTP"; + private const string DWValue = "DW"; + private const string AJDValue = "AJD"; + private const string APEXValue = "APEX"; + + /// OLTP - indicates an Autonomous Transaction Processing database. + public static WorkloadType OLTP { get; } = new WorkloadType(OLTPValue); + /// DW - indicates an Autonomous Data Warehouse database. + public static WorkloadType DW { get; } = new WorkloadType(DWValue); + /// AJD - indicates an Autonomous JSON Database. + public static WorkloadType AJD { get; } = new WorkloadType(AJDValue); + /// APEX - indicates an Autonomous Database with the Oracle APEX Application Development workload type. + public static WorkloadType APEX { get; } = new WorkloadType(APEXValue); + /// Determines if two values are the same. + public static bool operator ==(WorkloadType left, WorkloadType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(WorkloadType left, WorkloadType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator WorkloadType(string value) => new WorkloadType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is WorkloadType other && Equals(other); + /// + public bool Equals(WorkloadType 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/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ZoneType.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ZoneType.cs new file mode 100644 index 000000000000..8a302a4cd1b6 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ZoneType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// Zone type enum. + public readonly partial struct ZoneType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ZoneType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PrimaryValue = "Primary"; + private const string SecondaryValue = "Secondary"; + + /// Primary zone. + public static ZoneType Primary { get; } = new ZoneType(PrimaryValue); + /// Secondary zone. + public static ZoneType Secondary { get; } = new ZoneType(SecondaryValue); + /// Determines if two values are the same. + public static bool operator ==(ZoneType left, ZoneType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ZoneType left, ZoneType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ZoneType(string value) => new ZoneType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ZoneType other && Equals(other); + /// + public bool Equals(ZoneType 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/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/OracleSubscriptionData.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/OracleSubscriptionData.Serialization.cs new file mode 100644 index 000000000000..fd6c97b590fd --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/OracleSubscriptionData.Serialization.cs @@ -0,0 +1,171 @@ +// 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.Models; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + public partial class OracleSubscriptionData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OracleSubscriptionData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (Optional.IsDefined(Plan)) + { + writer.WritePropertyName("plan"u8); + JsonSerializer.Serialize(writer, Plan); + } + } + + OracleSubscriptionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OracleSubscriptionData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeOracleSubscriptionData(document.RootElement, options); + } + + internal static OracleSubscriptionData DeserializeOracleSubscriptionData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + OracleSubscriptionProperties properties = default; + ArmPlan plan = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = OracleSubscriptionProperties.DeserializeOracleSubscriptionProperties(property.Value, options); + continue; + } + if (property.NameEquals("plan"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + plan = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new OracleSubscriptionData( + id, + name, + type, + systemData, + properties, + plan, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(OracleSubscriptionData)} does not support writing '{options.Format}' format."); + } + } + + OracleSubscriptionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeOracleSubscriptionData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(OracleSubscriptionData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/OracleSubscriptionData.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/OracleSubscriptionData.cs new file mode 100644 index 000000000000..7e82204b896b --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/OracleSubscriptionData.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + /// + /// A class representing the OracleSubscription data model. + /// OracleSubscription resource definition + /// + public partial class OracleSubscriptionData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public OracleSubscriptionData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// Details of the resource plan. + /// Keeps track of any properties unknown to the library. + internal OracleSubscriptionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, OracleSubscriptionProperties properties, ArmPlan plan, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + Plan = plan; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public OracleSubscriptionProperties Properties { get; set; } + /// Details of the resource plan. + public ArmPlan Plan { get; set; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/OracleSubscriptionResource.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/OracleSubscriptionResource.Serialization.cs new file mode 100644 index 000000000000..ba0b6b83d075 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/OracleSubscriptionResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.OracleDatabase +{ + public partial class OracleSubscriptionResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + OracleSubscriptionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + OracleSubscriptionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/OracleSubscriptionResource.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/OracleSubscriptionResource.cs new file mode 100644 index 000000000000..49354d62bef1 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/OracleSubscriptionResource.cs @@ -0,0 +1,782 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.OracleDatabase.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.OracleDatabase +{ + /// + /// A Class representing an OracleSubscription along with the instance operations that can be performed on it. + /// If you have a you can construct an + /// from an instance of using the GetOracleSubscriptionResource method. + /// Otherwise you can get one from its parent resource using the GetOracleSubscription method. + /// + public partial class OracleSubscriptionResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId) + { + var resourceId = $"/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _oracleSubscriptionClientDiagnostics; + private readonly OracleSubscriptionsRestOperations _oracleSubscriptionRestClient; + private readonly OracleSubscriptionData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Oracle.Database/oracleSubscriptions"; + + /// Initializes a new instance of the class for mocking. + protected OracleSubscriptionResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal OracleSubscriptionResource(ArmClient client, OracleSubscriptionData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal OracleSubscriptionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _oracleSubscriptionClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.OracleDatabase", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string oracleSubscriptionApiVersion); + _oracleSubscriptionRestClient = new OracleSubscriptionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, oracleSubscriptionApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual OracleSubscriptionData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get a OracleSubscription + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default + /// + /// + /// Operation Id + /// OracleSubscription_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _oracleSubscriptionClientDiagnostics.CreateScope("OracleSubscriptionResource.Get"); + scope.Start(); + try + { + var response = await _oracleSubscriptionRestClient.GetAsync(Id.SubscriptionId, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new OracleSubscriptionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a OracleSubscription + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default + /// + /// + /// Operation Id + /// OracleSubscription_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _oracleSubscriptionClientDiagnostics.CreateScope("OracleSubscriptionResource.Get"); + scope.Start(); + try + { + var response = _oracleSubscriptionRestClient.Get(Id.SubscriptionId, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new OracleSubscriptionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a OracleSubscription + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default + /// + /// + /// Operation Id + /// OracleSubscription_Delete + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _oracleSubscriptionClientDiagnostics.CreateScope("OracleSubscriptionResource.Delete"); + scope.Start(); + try + { + var response = await _oracleSubscriptionRestClient.DeleteAsync(Id.SubscriptionId, cancellationToken).ConfigureAwait(false); + var operation = new OracleDatabaseArmOperation(_oracleSubscriptionClientDiagnostics, Pipeline, _oracleSubscriptionRestClient.CreateDeleteRequest(Id.SubscriptionId).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a OracleSubscription + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default + /// + /// + /// Operation Id + /// OracleSubscription_Delete + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _oracleSubscriptionClientDiagnostics.CreateScope("OracleSubscriptionResource.Delete"); + scope.Start(); + try + { + var response = _oracleSubscriptionRestClient.Delete(Id.SubscriptionId, cancellationToken); + var operation = new OracleDatabaseArmOperation(_oracleSubscriptionClientDiagnostics, Pipeline, _oracleSubscriptionRestClient.CreateDeleteRequest(Id.SubscriptionId).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a OracleSubscription + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default + /// + /// + /// Operation Id + /// OracleSubscription_Update + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, OracleSubscriptionPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _oracleSubscriptionClientDiagnostics.CreateScope("OracleSubscriptionResource.Update"); + scope.Start(); + try + { + var response = await _oracleSubscriptionRestClient.UpdateAsync(Id.SubscriptionId, patch, cancellationToken).ConfigureAwait(false); + var operation = new OracleDatabaseArmOperation(new OracleSubscriptionOperationSource(Client), _oracleSubscriptionClientDiagnostics, Pipeline, _oracleSubscriptionRestClient.CreateUpdateRequest(Id.SubscriptionId, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a OracleSubscription + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default + /// + /// + /// Operation Id + /// OracleSubscription_Update + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, OracleSubscriptionPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _oracleSubscriptionClientDiagnostics.CreateScope("OracleSubscriptionResource.Update"); + scope.Start(); + try + { + var response = _oracleSubscriptionRestClient.Update(Id.SubscriptionId, patch, cancellationToken); + var operation = new OracleDatabaseArmOperation(new OracleSubscriptionOperationSource(Client), _oracleSubscriptionClientDiagnostics, Pipeline, _oracleSubscriptionRestClient.CreateUpdateRequest(Id.SubscriptionId, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a OracleSubscription + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default + /// + /// + /// Operation Id + /// OracleSubscription_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Resource create parameters. + /// The cancellation token to use. + /// is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, OracleSubscriptionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _oracleSubscriptionClientDiagnostics.CreateScope("OracleSubscriptionResource.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _oracleSubscriptionRestClient.CreateOrUpdateAsync(Id.SubscriptionId, data, cancellationToken).ConfigureAwait(false); + var operation = new OracleDatabaseArmOperation(new OracleSubscriptionOperationSource(Client), _oracleSubscriptionClientDiagnostics, Pipeline, _oracleSubscriptionRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a OracleSubscription + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default + /// + /// + /// Operation Id + /// OracleSubscription_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Resource create parameters. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, OracleSubscriptionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _oracleSubscriptionClientDiagnostics.CreateScope("OracleSubscriptionResource.CreateOrUpdate"); + scope.Start(); + try + { + var response = _oracleSubscriptionRestClient.CreateOrUpdate(Id.SubscriptionId, data, cancellationToken); + var operation = new OracleDatabaseArmOperation(new OracleSubscriptionOperationSource(Client), _oracleSubscriptionClientDiagnostics, Pipeline, _oracleSubscriptionRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List Cloud Account Details + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default/listCloudAccountDetails + /// + /// + /// Operation Id + /// OracleSubscriptions_ListCloudAccountDetails + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task GetCloudAccountDetailsAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _oracleSubscriptionClientDiagnostics.CreateScope("OracleSubscriptionResource.GetCloudAccountDetails"); + scope.Start(); + try + { + var response = await _oracleSubscriptionRestClient.ListCloudAccountDetailsAsync(Id.SubscriptionId, cancellationToken).ConfigureAwait(false); + var operation = new OracleDatabaseArmOperation(_oracleSubscriptionClientDiagnostics, Pipeline, _oracleSubscriptionRestClient.CreateListCloudAccountDetailsRequest(Id.SubscriptionId).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List Cloud Account Details + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default/listCloudAccountDetails + /// + /// + /// Operation Id + /// OracleSubscriptions_ListCloudAccountDetails + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation GetCloudAccountDetails(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _oracleSubscriptionClientDiagnostics.CreateScope("OracleSubscriptionResource.GetCloudAccountDetails"); + scope.Start(); + try + { + var response = _oracleSubscriptionRestClient.ListCloudAccountDetails(Id.SubscriptionId, cancellationToken); + var operation = new OracleDatabaseArmOperation(_oracleSubscriptionClientDiagnostics, Pipeline, _oracleSubscriptionRestClient.CreateListCloudAccountDetailsRequest(Id.SubscriptionId).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List Saas Subscription Details + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default/listSaasSubscriptionDetails + /// + /// + /// Operation Id + /// OracleSubscriptions_ListSaasSubscriptionDetails + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task GetSaasSubscriptionDetailsAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _oracleSubscriptionClientDiagnostics.CreateScope("OracleSubscriptionResource.GetSaasSubscriptionDetails"); + scope.Start(); + try + { + var response = await _oracleSubscriptionRestClient.ListSaasSubscriptionDetailsAsync(Id.SubscriptionId, cancellationToken).ConfigureAwait(false); + var operation = new OracleDatabaseArmOperation(_oracleSubscriptionClientDiagnostics, Pipeline, _oracleSubscriptionRestClient.CreateListSaasSubscriptionDetailsRequest(Id.SubscriptionId).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List Saas Subscription Details + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default/listSaasSubscriptionDetails + /// + /// + /// Operation Id + /// OracleSubscriptions_ListSaasSubscriptionDetails + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation GetSaasSubscriptionDetails(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _oracleSubscriptionClientDiagnostics.CreateScope("OracleSubscriptionResource.GetSaasSubscriptionDetails"); + scope.Start(); + try + { + var response = _oracleSubscriptionRestClient.ListSaasSubscriptionDetails(Id.SubscriptionId, cancellationToken); + var operation = new OracleDatabaseArmOperation(_oracleSubscriptionClientDiagnostics, Pipeline, _oracleSubscriptionRestClient.CreateListSaasSubscriptionDetailsRequest(Id.SubscriptionId).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List Activation Links + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default/listActivationLinks + /// + /// + /// Operation Id + /// OracleSubscriptions_ListActivationLinks + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task GetActivationLinksAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _oracleSubscriptionClientDiagnostics.CreateScope("OracleSubscriptionResource.GetActivationLinks"); + scope.Start(); + try + { + var response = await _oracleSubscriptionRestClient.ListActivationLinksAsync(Id.SubscriptionId, cancellationToken).ConfigureAwait(false); + var operation = new OracleDatabaseArmOperation(_oracleSubscriptionClientDiagnostics, Pipeline, _oracleSubscriptionRestClient.CreateListActivationLinksRequest(Id.SubscriptionId).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List Activation Links + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default/listActivationLinks + /// + /// + /// Operation Id + /// OracleSubscriptions_ListActivationLinks + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation GetActivationLinks(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _oracleSubscriptionClientDiagnostics.CreateScope("OracleSubscriptionResource.GetActivationLinks"); + scope.Start(); + try + { + var response = _oracleSubscriptionRestClient.ListActivationLinks(Id.SubscriptionId, cancellationToken); + var operation = new OracleDatabaseArmOperation(_oracleSubscriptionClientDiagnostics, Pipeline, _oracleSubscriptionRestClient.CreateListActivationLinksRequest(Id.SubscriptionId).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add Azure Subscriptions + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default/addAzureSubscriptions + /// + /// + /// Operation Id + /// OracleSubscriptions_AddAzureSubscriptions + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual async Task AddAzureSubscriptionsAsync(WaitUntil waitUntil, AzureSubscriptions body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using var scope = _oracleSubscriptionClientDiagnostics.CreateScope("OracleSubscriptionResource.AddAzureSubscriptions"); + scope.Start(); + try + { + var response = await _oracleSubscriptionRestClient.AddAzureSubscriptionsAsync(Id.SubscriptionId, body, cancellationToken).ConfigureAwait(false); + var operation = new OracleDatabaseArmOperation(_oracleSubscriptionClientDiagnostics, Pipeline, _oracleSubscriptionRestClient.CreateAddAzureSubscriptionsRequest(Id.SubscriptionId, body).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add Azure Subscriptions + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default/addAzureSubscriptions + /// + /// + /// Operation Id + /// OracleSubscriptions_AddAzureSubscriptions + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation AddAzureSubscriptions(WaitUntil waitUntil, AzureSubscriptions body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using var scope = _oracleSubscriptionClientDiagnostics.CreateScope("OracleSubscriptionResource.AddAzureSubscriptions"); + scope.Start(); + try + { + var response = _oracleSubscriptionRestClient.AddAzureSubscriptions(Id.SubscriptionId, body, cancellationToken); + var operation = new OracleDatabaseArmOperation(_oracleSubscriptionClientDiagnostics, Pipeline, _oracleSubscriptionRestClient.CreateAddAzureSubscriptionsRequest(Id.SubscriptionId, body).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/ProviderConstants.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/ProviderConstants.cs new file mode 100644 index 000000000000..04122ef70d65 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/ProviderConstants.cs @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.OracleDatabase +{ + internal static class ProviderConstants + { + public static string DefaultProviderNamespace { get; } = ClientDiagnostics.GetResourceProviderNamespace(typeof(ProviderConstants).Assembly); + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/AutonomousDatabaseBackupsRestOperations.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/AutonomousDatabaseBackupsRestOperations.cs new file mode 100644 index 000000000000..50f3913bc3b1 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/AutonomousDatabaseBackupsRestOperations.cs @@ -0,0 +1,613 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + internal partial class AutonomousDatabaseBackupsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of AutonomousDatabaseBackupsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public AutonomousDatabaseBackupsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-03-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string autonomousdatabasename, string adbbackupid, AutonomousDatabaseBackupData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/autonomousDatabases/", false); + uri.AppendPath(autonomousdatabasename, true); + uri.AppendPath("/autonomousDatabaseBackups/", false); + uri.AppendPath(adbbackupid, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string autonomousdatabasename, string adbbackupid, AutonomousDatabaseBackupData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/autonomousDatabases/", false); + uri.AppendPath(autonomousdatabasename, true); + uri.AppendPath("/autonomousDatabaseBackups/", false); + uri.AppendPath(adbbackupid, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create a AutonomousDatabaseBackup. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// AutonomousDatabaseBackup id. + /// Resource create parameters. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string autonomousdatabasename, string adbbackupid, AutonomousDatabaseBackupData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(autonomousdatabasename, nameof(autonomousdatabasename)); + Argument.AssertNotNullOrEmpty(adbbackupid, nameof(adbbackupid)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, autonomousdatabasename, adbbackupid, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create a AutonomousDatabaseBackup. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// AutonomousDatabaseBackup id. + /// Resource create parameters. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string autonomousdatabasename, string adbbackupid, AutonomousDatabaseBackupData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(autonomousdatabasename, nameof(autonomousdatabasename)); + Argument.AssertNotNullOrEmpty(adbbackupid, nameof(adbbackupid)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, autonomousdatabasename, adbbackupid, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string autonomousdatabasename, string adbbackupid) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/autonomousDatabases/", false); + uri.AppendPath(autonomousdatabasename, true); + uri.AppendPath("/autonomousDatabaseBackups/", false); + uri.AppendPath(adbbackupid, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string autonomousdatabasename, string adbbackupid) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/autonomousDatabases/", false); + uri.AppendPath(autonomousdatabasename, true); + uri.AppendPath("/autonomousDatabaseBackups/", false); + uri.AppendPath(adbbackupid, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a AutonomousDatabaseBackup. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// AutonomousDatabaseBackup id. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string autonomousdatabasename, string adbbackupid, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(autonomousdatabasename, nameof(autonomousdatabasename)); + Argument.AssertNotNullOrEmpty(adbbackupid, nameof(adbbackupid)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, autonomousdatabasename, adbbackupid); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AutonomousDatabaseBackupData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = AutonomousDatabaseBackupData.DeserializeAutonomousDatabaseBackupData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((AutonomousDatabaseBackupData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a AutonomousDatabaseBackup. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// AutonomousDatabaseBackup id. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string autonomousdatabasename, string adbbackupid, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(autonomousdatabasename, nameof(autonomousdatabasename)); + Argument.AssertNotNullOrEmpty(adbbackupid, nameof(adbbackupid)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, autonomousdatabasename, adbbackupid); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AutonomousDatabaseBackupData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = AutonomousDatabaseBackupData.DeserializeAutonomousDatabaseBackupData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((AutonomousDatabaseBackupData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string autonomousdatabasename, string adbbackupid) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/autonomousDatabases/", false); + uri.AppendPath(autonomousdatabasename, true); + uri.AppendPath("/autonomousDatabaseBackups/", false); + uri.AppendPath(adbbackupid, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string autonomousdatabasename, string adbbackupid) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/autonomousDatabases/", false); + uri.AppendPath(autonomousdatabasename, true); + uri.AppendPath("/autonomousDatabaseBackups/", false); + uri.AppendPath(adbbackupid, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a AutonomousDatabaseBackup. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// AutonomousDatabaseBackup id. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string autonomousdatabasename, string adbbackupid, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(autonomousdatabasename, nameof(autonomousdatabasename)); + Argument.AssertNotNullOrEmpty(adbbackupid, nameof(adbbackupid)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, autonomousdatabasename, adbbackupid); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete a AutonomousDatabaseBackup. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// AutonomousDatabaseBackup id. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string autonomousdatabasename, string adbbackupid, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(autonomousdatabasename, nameof(autonomousdatabasename)); + Argument.AssertNotNullOrEmpty(adbbackupid, nameof(adbbackupid)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, autonomousdatabasename, adbbackupid); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string autonomousdatabasename, string adbbackupid, AutonomousDatabaseBackupData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/autonomousDatabases/", false); + uri.AppendPath(autonomousdatabasename, true); + uri.AppendPath("/autonomousDatabaseBackups/", false); + uri.AppendPath(adbbackupid, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string autonomousdatabasename, string adbbackupid, AutonomousDatabaseBackupData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/autonomousDatabases/", false); + uri.AppendPath(autonomousdatabasename, true); + uri.AppendPath("/autonomousDatabaseBackups/", false); + uri.AppendPath(adbbackupid, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Update a AutonomousDatabaseBackup. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// AutonomousDatabaseBackup id. + /// The resource properties to be updated. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string autonomousdatabasename, string adbbackupid, AutonomousDatabaseBackupData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(autonomousdatabasename, nameof(autonomousdatabasename)); + Argument.AssertNotNullOrEmpty(adbbackupid, nameof(adbbackupid)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, autonomousdatabasename, adbbackupid, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Update a AutonomousDatabaseBackup. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// AutonomousDatabaseBackup id. + /// The resource properties to be updated. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string autonomousdatabasename, string adbbackupid, AutonomousDatabaseBackupData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(autonomousdatabasename, nameof(autonomousdatabasename)); + Argument.AssertNotNullOrEmpty(adbbackupid, nameof(adbbackupid)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, autonomousdatabasename, adbbackupid, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByParentRequestUri(string subscriptionId, string resourceGroupName, string autonomousdatabasename) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/autonomousDatabases/", false); + uri.AppendPath(autonomousdatabasename, true); + uri.AppendPath("/autonomousDatabaseBackups", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByParentRequest(string subscriptionId, string resourceGroupName, string autonomousdatabasename) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/autonomousDatabases/", false); + uri.AppendPath(autonomousdatabasename, true); + uri.AppendPath("/autonomousDatabaseBackups", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List AutonomousDatabaseBackup resources by AutonomousDatabase. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByParentAsync(string subscriptionId, string resourceGroupName, string autonomousdatabasename, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(autonomousdatabasename, nameof(autonomousdatabasename)); + + using var message = CreateListByParentRequest(subscriptionId, resourceGroupName, autonomousdatabasename); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AutonomousDatabaseBackupListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = AutonomousDatabaseBackupListResult.DeserializeAutonomousDatabaseBackupListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List AutonomousDatabaseBackup resources by AutonomousDatabase. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByParent(string subscriptionId, string resourceGroupName, string autonomousdatabasename, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(autonomousdatabasename, nameof(autonomousdatabasename)); + + using var message = CreateListByParentRequest(subscriptionId, resourceGroupName, autonomousdatabasename); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AutonomousDatabaseBackupListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = AutonomousDatabaseBackupListResult.DeserializeAutonomousDatabaseBackupListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByParentNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string autonomousdatabasename) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByParentNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string autonomousdatabasename) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List AutonomousDatabaseBackup resources by AutonomousDatabase. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByParentNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string autonomousdatabasename, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(autonomousdatabasename, nameof(autonomousdatabasename)); + + using var message = CreateListByParentNextPageRequest(nextLink, subscriptionId, resourceGroupName, autonomousdatabasename); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AutonomousDatabaseBackupListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = AutonomousDatabaseBackupListResult.DeserializeAutonomousDatabaseBackupListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List AutonomousDatabaseBackup resources by AutonomousDatabase. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByParentNextPage(string nextLink, string subscriptionId, string resourceGroupName, string autonomousdatabasename, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(autonomousdatabasename, nameof(autonomousdatabasename)); + + using var message = CreateListByParentNextPageRequest(nextLink, subscriptionId, resourceGroupName, autonomousdatabasename); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AutonomousDatabaseBackupListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = AutonomousDatabaseBackupListResult.DeserializeAutonomousDatabaseBackupListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/AutonomousDatabaseCharacterSetsRestOperations.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/AutonomousDatabaseCharacterSetsRestOperations.cs new file mode 100644 index 000000000000..4859aba3864f --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/AutonomousDatabaseCharacterSetsRestOperations.cs @@ -0,0 +1,295 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + internal partial class AutonomousDatabaseCharacterSetsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of AutonomousDatabaseCharacterSetsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public AutonomousDatabaseCharacterSetsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-03-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, AzureLocation location, string adbscharsetname) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Oracle.Database/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/autonomousDatabaseCharacterSets/", false); + uri.AppendPath(adbscharsetname, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, AzureLocation location, string adbscharsetname) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Oracle.Database/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/autonomousDatabaseCharacterSets/", false); + uri.AppendPath(adbscharsetname, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a AutonomousDatabaseCharacterSet. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// AutonomousDatabaseCharacterSet name. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, AzureLocation location, string adbscharsetname, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(adbscharsetname, nameof(adbscharsetname)); + + using var message = CreateGetRequest(subscriptionId, location, adbscharsetname); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AutonomousDatabaseCharacterSetData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = AutonomousDatabaseCharacterSetData.DeserializeAutonomousDatabaseCharacterSetData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((AutonomousDatabaseCharacterSetData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a AutonomousDatabaseCharacterSet. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// AutonomousDatabaseCharacterSet name. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, AzureLocation location, string adbscharsetname, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(adbscharsetname, nameof(adbscharsetname)); + + using var message = CreateGetRequest(subscriptionId, location, adbscharsetname); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AutonomousDatabaseCharacterSetData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = AutonomousDatabaseCharacterSetData.DeserializeAutonomousDatabaseCharacterSetData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((AutonomousDatabaseCharacterSetData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByLocationRequestUri(string subscriptionId, AzureLocation location) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Oracle.Database/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/autonomousDatabaseCharacterSets", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByLocationRequest(string subscriptionId, AzureLocation location) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Oracle.Database/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/autonomousDatabaseCharacterSets", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List AutonomousDatabaseCharacterSet resources by SubscriptionLocationResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListByLocationAsync(string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListByLocationRequest(subscriptionId, location); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AutonomousDatabaseCharacterSetListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = AutonomousDatabaseCharacterSetListResult.DeserializeAutonomousDatabaseCharacterSetListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List AutonomousDatabaseCharacterSet resources by SubscriptionLocationResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response ListByLocation(string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListByLocationRequest(subscriptionId, location); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AutonomousDatabaseCharacterSetListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = AutonomousDatabaseCharacterSetListResult.DeserializeAutonomousDatabaseCharacterSetListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByLocationNextPageRequestUri(string nextLink, string subscriptionId, AzureLocation location) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByLocationNextPageRequest(string nextLink, string subscriptionId, AzureLocation location) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List AutonomousDatabaseCharacterSet resources by SubscriptionLocationResource. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListByLocationNextPageAsync(string nextLink, string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListByLocationNextPageRequest(nextLink, subscriptionId, location); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AutonomousDatabaseCharacterSetListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = AutonomousDatabaseCharacterSetListResult.DeserializeAutonomousDatabaseCharacterSetListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List AutonomousDatabaseCharacterSet resources by SubscriptionLocationResource. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ListByLocationNextPage(string nextLink, string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListByLocationNextPageRequest(nextLink, subscriptionId, location); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AutonomousDatabaseCharacterSetListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = AutonomousDatabaseCharacterSetListResult.DeserializeAutonomousDatabaseCharacterSetListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/AutonomousDatabaseNationalCharacterSetsRestOperations.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/AutonomousDatabaseNationalCharacterSetsRestOperations.cs new file mode 100644 index 000000000000..02bfbe6147ab --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/AutonomousDatabaseNationalCharacterSetsRestOperations.cs @@ -0,0 +1,295 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + internal partial class AutonomousDatabaseNationalCharacterSetsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of AutonomousDatabaseNationalCharacterSetsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public AutonomousDatabaseNationalCharacterSetsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-03-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, AzureLocation location, string adbsncharsetname) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Oracle.Database/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/autonomousDatabaseNationalCharacterSets/", false); + uri.AppendPath(adbsncharsetname, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, AzureLocation location, string adbsncharsetname) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Oracle.Database/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/autonomousDatabaseNationalCharacterSets/", false); + uri.AppendPath(adbsncharsetname, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a AutonomousDatabaseNationalCharacterSet. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// AutonomousDatabaseNationalCharacterSets name. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, AzureLocation location, string adbsncharsetname, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(adbsncharsetname, nameof(adbsncharsetname)); + + using var message = CreateGetRequest(subscriptionId, location, adbsncharsetname); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AutonomousDatabaseNationalCharacterSetData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = AutonomousDatabaseNationalCharacterSetData.DeserializeAutonomousDatabaseNationalCharacterSetData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((AutonomousDatabaseNationalCharacterSetData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a AutonomousDatabaseNationalCharacterSet. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// AutonomousDatabaseNationalCharacterSets name. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, AzureLocation location, string adbsncharsetname, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(adbsncharsetname, nameof(adbsncharsetname)); + + using var message = CreateGetRequest(subscriptionId, location, adbsncharsetname); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AutonomousDatabaseNationalCharacterSetData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = AutonomousDatabaseNationalCharacterSetData.DeserializeAutonomousDatabaseNationalCharacterSetData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((AutonomousDatabaseNationalCharacterSetData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByLocationRequestUri(string subscriptionId, AzureLocation location) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Oracle.Database/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/autonomousDatabaseNationalCharacterSets", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByLocationRequest(string subscriptionId, AzureLocation location) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Oracle.Database/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/autonomousDatabaseNationalCharacterSets", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List AutonomousDatabaseNationalCharacterSet resources by SubscriptionLocationResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListByLocationAsync(string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListByLocationRequest(subscriptionId, location); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AutonomousDatabaseNationalCharacterSetListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = AutonomousDatabaseNationalCharacterSetListResult.DeserializeAutonomousDatabaseNationalCharacterSetListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List AutonomousDatabaseNationalCharacterSet resources by SubscriptionLocationResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response ListByLocation(string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListByLocationRequest(subscriptionId, location); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AutonomousDatabaseNationalCharacterSetListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = AutonomousDatabaseNationalCharacterSetListResult.DeserializeAutonomousDatabaseNationalCharacterSetListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByLocationNextPageRequestUri(string nextLink, string subscriptionId, AzureLocation location) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByLocationNextPageRequest(string nextLink, string subscriptionId, AzureLocation location) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List AutonomousDatabaseNationalCharacterSet resources by SubscriptionLocationResource. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListByLocationNextPageAsync(string nextLink, string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListByLocationNextPageRequest(nextLink, subscriptionId, location); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AutonomousDatabaseNationalCharacterSetListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = AutonomousDatabaseNationalCharacterSetListResult.DeserializeAutonomousDatabaseNationalCharacterSetListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List AutonomousDatabaseNationalCharacterSet resources by SubscriptionLocationResource. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ListByLocationNextPage(string nextLink, string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListByLocationNextPageRequest(nextLink, subscriptionId, location); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AutonomousDatabaseNationalCharacterSetListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = AutonomousDatabaseNationalCharacterSetListResult.DeserializeAutonomousDatabaseNationalCharacterSetListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/AutonomousDatabaseVersionsRestOperations.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/AutonomousDatabaseVersionsRestOperations.cs new file mode 100644 index 000000000000..abc8585251cf --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/AutonomousDatabaseVersionsRestOperations.cs @@ -0,0 +1,295 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + internal partial class AutonomousDatabaseVersionsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of AutonomousDatabaseVersionsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public AutonomousDatabaseVersionsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-03-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, AzureLocation location, string autonomousdbversionsname) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Oracle.Database/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/autonomousDbVersions/", false); + uri.AppendPath(autonomousdbversionsname, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, AzureLocation location, string autonomousdbversionsname) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Oracle.Database/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/autonomousDbVersions/", false); + uri.AppendPath(autonomousdbversionsname, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a AutonomousDbVersion. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// AutonomousDbVersion name. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, AzureLocation location, string autonomousdbversionsname, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(autonomousdbversionsname, nameof(autonomousdbversionsname)); + + using var message = CreateGetRequest(subscriptionId, location, autonomousdbversionsname); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AutonomousDbVersionData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = AutonomousDbVersionData.DeserializeAutonomousDbVersionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((AutonomousDbVersionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a AutonomousDbVersion. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// AutonomousDbVersion name. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, AzureLocation location, string autonomousdbversionsname, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(autonomousdbversionsname, nameof(autonomousdbversionsname)); + + using var message = CreateGetRequest(subscriptionId, location, autonomousdbversionsname); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AutonomousDbVersionData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = AutonomousDbVersionData.DeserializeAutonomousDbVersionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((AutonomousDbVersionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByLocationRequestUri(string subscriptionId, AzureLocation location) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Oracle.Database/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/autonomousDbVersions", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByLocationRequest(string subscriptionId, AzureLocation location) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Oracle.Database/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/autonomousDbVersions", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List AutonomousDbVersion resources by SubscriptionLocationResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListByLocationAsync(string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListByLocationRequest(subscriptionId, location); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AutonomousDbVersionListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = AutonomousDbVersionListResult.DeserializeAutonomousDbVersionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List AutonomousDbVersion resources by SubscriptionLocationResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response ListByLocation(string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListByLocationRequest(subscriptionId, location); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AutonomousDbVersionListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = AutonomousDbVersionListResult.DeserializeAutonomousDbVersionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByLocationNextPageRequestUri(string nextLink, string subscriptionId, AzureLocation location) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByLocationNextPageRequest(string nextLink, string subscriptionId, AzureLocation location) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List AutonomousDbVersion resources by SubscriptionLocationResource. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListByLocationNextPageAsync(string nextLink, string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListByLocationNextPageRequest(nextLink, subscriptionId, location); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AutonomousDbVersionListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = AutonomousDbVersionListResult.DeserializeAutonomousDbVersionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List AutonomousDbVersion resources by SubscriptionLocationResource. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ListByLocationNextPage(string nextLink, string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListByLocationNextPageRequest(nextLink, subscriptionId, location); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AutonomousDbVersionListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = AutonomousDbVersionListResult.DeserializeAutonomousDbVersionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/AutonomousDatabasesRestOperations.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/AutonomousDatabasesRestOperations.cs new file mode 100644 index 000000000000..87100faadda5 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/AutonomousDatabasesRestOperations.cs @@ -0,0 +1,1287 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + internal partial class AutonomousDatabasesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of AutonomousDatabasesRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public AutonomousDatabasesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-03-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListBySubscriptionRequestUri(string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Oracle.Database/autonomousDatabases", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Oracle.Database/autonomousDatabases", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List AutonomousDatabase resources by subscription ID. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionAsync(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AutonomousDatabaseListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = AutonomousDatabaseListResult.DeserializeAutonomousDatabaseListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List AutonomousDatabase resources by subscription ID. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscription(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AutonomousDatabaseListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = AutonomousDatabaseListResult.DeserializeAutonomousDatabaseListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string autonomousdatabasename, AutonomousDatabaseData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/autonomousDatabases/", false); + uri.AppendPath(autonomousdatabasename, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string autonomousdatabasename, AutonomousDatabaseData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/autonomousDatabases/", false); + uri.AppendPath(autonomousdatabasename, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create a AutonomousDatabase. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// Resource create parameters. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string autonomousdatabasename, AutonomousDatabaseData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(autonomousdatabasename, nameof(autonomousdatabasename)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, autonomousdatabasename, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create a AutonomousDatabase. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// Resource create parameters. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string autonomousdatabasename, AutonomousDatabaseData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(autonomousdatabasename, nameof(autonomousdatabasename)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, autonomousdatabasename, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string autonomousdatabasename) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/autonomousDatabases/", false); + uri.AppendPath(autonomousdatabasename, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string autonomousdatabasename) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/autonomousDatabases/", false); + uri.AppendPath(autonomousdatabasename, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a AutonomousDatabase. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string autonomousdatabasename, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(autonomousdatabasename, nameof(autonomousdatabasename)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, autonomousdatabasename); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AutonomousDatabaseData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = AutonomousDatabaseData.DeserializeAutonomousDatabaseData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((AutonomousDatabaseData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a AutonomousDatabase. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string autonomousdatabasename, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(autonomousdatabasename, nameof(autonomousdatabasename)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, autonomousdatabasename); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AutonomousDatabaseData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = AutonomousDatabaseData.DeserializeAutonomousDatabaseData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((AutonomousDatabaseData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string autonomousdatabasename, AutonomousDatabasePatch patch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/autonomousDatabases/", false); + uri.AppendPath(autonomousdatabasename, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string autonomousdatabasename, AutonomousDatabasePatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/autonomousDatabases/", false); + uri.AppendPath(autonomousdatabasename, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Update a AutonomousDatabase. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// The resource properties to be updated. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string autonomousdatabasename, AutonomousDatabasePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(autonomousdatabasename, nameof(autonomousdatabasename)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, autonomousdatabasename, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Update a AutonomousDatabase. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// The resource properties to be updated. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string autonomousdatabasename, AutonomousDatabasePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(autonomousdatabasename, nameof(autonomousdatabasename)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, autonomousdatabasename, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string autonomousdatabasename) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/autonomousDatabases/", false); + uri.AppendPath(autonomousdatabasename, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string autonomousdatabasename) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/autonomousDatabases/", false); + uri.AppendPath(autonomousdatabasename, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a AutonomousDatabase. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string autonomousdatabasename, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(autonomousdatabasename, nameof(autonomousdatabasename)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, autonomousdatabasename); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete a AutonomousDatabase. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string autonomousdatabasename, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(autonomousdatabasename, nameof(autonomousdatabasename)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, autonomousdatabasename); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByResourceGroupRequestUri(string subscriptionId, string resourceGroupName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/autonomousDatabases", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, string resourceGroupName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/autonomousDatabases", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List AutonomousDatabase resources by resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupAsync(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AutonomousDatabaseListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = AutonomousDatabaseListResult.DeserializeAutonomousDatabaseListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List AutonomousDatabase resources by resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroup(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AutonomousDatabaseListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = AutonomousDatabaseListResult.DeserializeAutonomousDatabaseListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateSwitchoverRequestUri(string subscriptionId, string resourceGroupName, string autonomousdatabasename, PeerDbDetails details) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/autonomousDatabases/", false); + uri.AppendPath(autonomousdatabasename, true); + uri.AppendPath("/switchover", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateSwitchoverRequest(string subscriptionId, string resourceGroupName, string autonomousdatabasename, PeerDbDetails details) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/autonomousDatabases/", false); + uri.AppendPath(autonomousdatabasename, true); + uri.AppendPath("/switchover", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(details, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Perform switchover action on Autonomous Database. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// The content of the action request. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task SwitchoverAsync(string subscriptionId, string resourceGroupName, string autonomousdatabasename, PeerDbDetails details, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(autonomousdatabasename, nameof(autonomousdatabasename)); + Argument.AssertNotNull(details, nameof(details)); + + using var message = CreateSwitchoverRequest(subscriptionId, resourceGroupName, autonomousdatabasename, details); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Perform switchover action on Autonomous Database. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// The content of the action request. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Switchover(string subscriptionId, string resourceGroupName, string autonomousdatabasename, PeerDbDetails details, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(autonomousdatabasename, nameof(autonomousdatabasename)); + Argument.AssertNotNull(details, nameof(details)); + + using var message = CreateSwitchoverRequest(subscriptionId, resourceGroupName, autonomousdatabasename, details); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateFailoverRequestUri(string subscriptionId, string resourceGroupName, string autonomousdatabasename, PeerDbDetails details) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/autonomousDatabases/", false); + uri.AppendPath(autonomousdatabasename, true); + uri.AppendPath("/failover", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateFailoverRequest(string subscriptionId, string resourceGroupName, string autonomousdatabasename, PeerDbDetails details) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/autonomousDatabases/", false); + uri.AppendPath(autonomousdatabasename, true); + uri.AppendPath("/failover", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(details, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Perform failover action on Autonomous Database. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// The content of the action request. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task FailoverAsync(string subscriptionId, string resourceGroupName, string autonomousdatabasename, PeerDbDetails details, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(autonomousdatabasename, nameof(autonomousdatabasename)); + Argument.AssertNotNull(details, nameof(details)); + + using var message = CreateFailoverRequest(subscriptionId, resourceGroupName, autonomousdatabasename, details); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Perform failover action on Autonomous Database. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// The content of the action request. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Failover(string subscriptionId, string resourceGroupName, string autonomousdatabasename, PeerDbDetails details, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(autonomousdatabasename, nameof(autonomousdatabasename)); + Argument.AssertNotNull(details, nameof(details)); + + using var message = CreateFailoverRequest(subscriptionId, resourceGroupName, autonomousdatabasename, details); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGenerateWalletRequestUri(string subscriptionId, string resourceGroupName, string autonomousdatabasename, GenerateAutonomousDatabaseWalletDetails details) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/autonomousDatabases/", false); + uri.AppendPath(autonomousdatabasename, true); + uri.AppendPath("/generateWallet", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGenerateWalletRequest(string subscriptionId, string resourceGroupName, string autonomousdatabasename, GenerateAutonomousDatabaseWalletDetails details) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/autonomousDatabases/", false); + uri.AppendPath(autonomousdatabasename, true); + uri.AppendPath("/generateWallet", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(details, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Generate wallet action on Autonomous Database. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// The content of the action request. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GenerateWalletAsync(string subscriptionId, string resourceGroupName, string autonomousdatabasename, GenerateAutonomousDatabaseWalletDetails details, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(autonomousdatabasename, nameof(autonomousdatabasename)); + Argument.AssertNotNull(details, nameof(details)); + + using var message = CreateGenerateWalletRequest(subscriptionId, resourceGroupName, autonomousdatabasename, details); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AutonomousDatabaseWalletFile value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = AutonomousDatabaseWalletFile.DeserializeAutonomousDatabaseWalletFile(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Generate wallet action on Autonomous Database. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// The content of the action request. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response GenerateWallet(string subscriptionId, string resourceGroupName, string autonomousdatabasename, GenerateAutonomousDatabaseWalletDetails details, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(autonomousdatabasename, nameof(autonomousdatabasename)); + Argument.AssertNotNull(details, nameof(details)); + + using var message = CreateGenerateWalletRequest(subscriptionId, resourceGroupName, autonomousdatabasename, details); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AutonomousDatabaseWalletFile value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = AutonomousDatabaseWalletFile.DeserializeAutonomousDatabaseWalletFile(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateRestoreRequestUri(string subscriptionId, string resourceGroupName, string autonomousdatabasename, RestoreAutonomousDatabaseDetails details) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/autonomousDatabases/", false); + uri.AppendPath(autonomousdatabasename, true); + uri.AppendPath("/restore", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateRestoreRequest(string subscriptionId, string resourceGroupName, string autonomousdatabasename, RestoreAutonomousDatabaseDetails details) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/autonomousDatabases/", false); + uri.AppendPath(autonomousdatabasename, true); + uri.AppendPath("/restore", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(details, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Restores an Autonomous Database based on the provided request parameters. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// The content of the action request. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task RestoreAsync(string subscriptionId, string resourceGroupName, string autonomousdatabasename, RestoreAutonomousDatabaseDetails details, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(autonomousdatabasename, nameof(autonomousdatabasename)); + Argument.AssertNotNull(details, nameof(details)); + + using var message = CreateRestoreRequest(subscriptionId, resourceGroupName, autonomousdatabasename, details); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Restores an Autonomous Database based on the provided request parameters. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// The content of the action request. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Restore(string subscriptionId, string resourceGroupName, string autonomousdatabasename, RestoreAutonomousDatabaseDetails details, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(autonomousdatabasename, nameof(autonomousdatabasename)); + Argument.AssertNotNull(details, nameof(details)); + + using var message = CreateRestoreRequest(subscriptionId, resourceGroupName, autonomousdatabasename, details); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateShrinkRequestUri(string subscriptionId, string resourceGroupName, string autonomousdatabasename) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/autonomousDatabases/", false); + uri.AppendPath(autonomousdatabasename, true); + uri.AppendPath("/shrink", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateShrinkRequest(string subscriptionId, string resourceGroupName, string autonomousdatabasename) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/autonomousDatabases/", false); + uri.AppendPath(autonomousdatabasename, true); + uri.AppendPath("/shrink", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// This operation shrinks the current allocated storage down to the current actual used data storage. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task ShrinkAsync(string subscriptionId, string resourceGroupName, string autonomousdatabasename, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(autonomousdatabasename, nameof(autonomousdatabasename)); + + using var message = CreateShrinkRequest(subscriptionId, resourceGroupName, autonomousdatabasename); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// This operation shrinks the current allocated storage down to the current actual used data storage. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Shrink(string subscriptionId, string resourceGroupName, string autonomousdatabasename, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(autonomousdatabasename, nameof(autonomousdatabasename)); + + using var message = CreateShrinkRequest(subscriptionId, resourceGroupName, autonomousdatabasename); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateChangeDisasterRecoveryConfigurationRequestUri(string subscriptionId, string resourceGroupName, string autonomousdatabasename, DisasterRecoveryConfigurationDetails details) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/autonomousDatabases/", false); + uri.AppendPath(autonomousdatabasename, true); + uri.AppendPath("/changeDisasterRecoveryConfiguration", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateChangeDisasterRecoveryConfigurationRequest(string subscriptionId, string resourceGroupName, string autonomousdatabasename, DisasterRecoveryConfigurationDetails details) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/autonomousDatabases/", false); + uri.AppendPath(autonomousdatabasename, true); + uri.AppendPath("/changeDisasterRecoveryConfiguration", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(details, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Perform ChangeDisasterRecoveryConfiguration action on Autonomous Database. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// The content of the action request. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task ChangeDisasterRecoveryConfigurationAsync(string subscriptionId, string resourceGroupName, string autonomousdatabasename, DisasterRecoveryConfigurationDetails details, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(autonomousdatabasename, nameof(autonomousdatabasename)); + Argument.AssertNotNull(details, nameof(details)); + + using var message = CreateChangeDisasterRecoveryConfigurationRequest(subscriptionId, resourceGroupName, autonomousdatabasename, details); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Perform ChangeDisasterRecoveryConfiguration action on Autonomous Database. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// The content of the action request. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ChangeDisasterRecoveryConfiguration(string subscriptionId, string resourceGroupName, string autonomousdatabasename, DisasterRecoveryConfigurationDetails details, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(autonomousdatabasename, nameof(autonomousdatabasename)); + Argument.AssertNotNull(details, nameof(details)); + + using var message = CreateChangeDisasterRecoveryConfigurationRequest(subscriptionId, resourceGroupName, autonomousdatabasename, details); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListBySubscriptionNextPageRequestUri(string nextLink, string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, string subscriptionId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List AutonomousDatabase resources by subscription ID. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionNextPageAsync(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AutonomousDatabaseListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = AutonomousDatabaseListResult.DeserializeAutonomousDatabaseListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List AutonomousDatabase resources by subscription ID. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscriptionNextPage(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AutonomousDatabaseListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = AutonomousDatabaseListResult.DeserializeAutonomousDatabaseListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByResourceGroupNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List AutonomousDatabase resources by resource group. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AutonomousDatabaseListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = AutonomousDatabaseListResult.DeserializeAutonomousDatabaseListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List AutonomousDatabase resources by resource group. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroupNextPage(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AutonomousDatabaseListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = AutonomousDatabaseListResult.DeserializeAutonomousDatabaseListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/CloudExadataInfrastructuresRestOperations.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/CloudExadataInfrastructuresRestOperations.cs new file mode 100644 index 000000000000..8c2023d85672 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/CloudExadataInfrastructuresRestOperations.cs @@ -0,0 +1,809 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + internal partial class CloudExadataInfrastructuresRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of CloudExadataInfrastructuresRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public CloudExadataInfrastructuresRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-03-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListBySubscriptionRequestUri(string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Oracle.Database/cloudExadataInfrastructures", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Oracle.Database/cloudExadataInfrastructures", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List CloudExadataInfrastructure resources by subscription ID. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionAsync(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + CloudExadataInfrastructureListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = CloudExadataInfrastructureListResult.DeserializeCloudExadataInfrastructureListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List CloudExadataInfrastructure resources by subscription ID. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscription(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + CloudExadataInfrastructureListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = CloudExadataInfrastructureListResult.DeserializeCloudExadataInfrastructureListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename, CloudExadataInfrastructureData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/cloudExadataInfrastructures/", false); + uri.AppendPath(cloudexadatainfrastructurename, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename, CloudExadataInfrastructureData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/cloudExadataInfrastructures/", false); + uri.AppendPath(cloudexadatainfrastructurename, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create a CloudExadataInfrastructure. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudExadataInfrastructure name. + /// Resource create parameters. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename, CloudExadataInfrastructureData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(cloudexadatainfrastructurename, nameof(cloudexadatainfrastructurename)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, cloudexadatainfrastructurename, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create a CloudExadataInfrastructure. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudExadataInfrastructure name. + /// Resource create parameters. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename, CloudExadataInfrastructureData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(cloudexadatainfrastructurename, nameof(cloudexadatainfrastructurename)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, cloudexadatainfrastructurename, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/cloudExadataInfrastructures/", false); + uri.AppendPath(cloudexadatainfrastructurename, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/cloudExadataInfrastructures/", false); + uri.AppendPath(cloudexadatainfrastructurename, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a CloudExadataInfrastructure. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudExadataInfrastructure name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(cloudexadatainfrastructurename, nameof(cloudexadatainfrastructurename)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, cloudexadatainfrastructurename); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + CloudExadataInfrastructureData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = CloudExadataInfrastructureData.DeserializeCloudExadataInfrastructureData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((CloudExadataInfrastructureData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a CloudExadataInfrastructure. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudExadataInfrastructure name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(cloudexadatainfrastructurename, nameof(cloudexadatainfrastructurename)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, cloudexadatainfrastructurename); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + CloudExadataInfrastructureData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = CloudExadataInfrastructureData.DeserializeCloudExadataInfrastructureData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((CloudExadataInfrastructureData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename, CloudExadataInfrastructurePatch patch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/cloudExadataInfrastructures/", false); + uri.AppendPath(cloudexadatainfrastructurename, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename, CloudExadataInfrastructurePatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/cloudExadataInfrastructures/", false); + uri.AppendPath(cloudexadatainfrastructurename, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Update a CloudExadataInfrastructure. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudExadataInfrastructure name. + /// The resource properties to be updated. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename, CloudExadataInfrastructurePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(cloudexadatainfrastructurename, nameof(cloudexadatainfrastructurename)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, cloudexadatainfrastructurename, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Update a CloudExadataInfrastructure. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudExadataInfrastructure name. + /// The resource properties to be updated. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename, CloudExadataInfrastructurePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(cloudexadatainfrastructurename, nameof(cloudexadatainfrastructurename)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, cloudexadatainfrastructurename, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/cloudExadataInfrastructures/", false); + uri.AppendPath(cloudexadatainfrastructurename, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/cloudExadataInfrastructures/", false); + uri.AppendPath(cloudexadatainfrastructurename, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a CloudExadataInfrastructure. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudExadataInfrastructure name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(cloudexadatainfrastructurename, nameof(cloudexadatainfrastructurename)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, cloudexadatainfrastructurename); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete a CloudExadataInfrastructure. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudExadataInfrastructure name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(cloudexadatainfrastructurename, nameof(cloudexadatainfrastructurename)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, cloudexadatainfrastructurename); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByResourceGroupRequestUri(string subscriptionId, string resourceGroupName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/cloudExadataInfrastructures", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, string resourceGroupName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/cloudExadataInfrastructures", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List CloudExadataInfrastructure resources by resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupAsync(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + CloudExadataInfrastructureListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = CloudExadataInfrastructureListResult.DeserializeCloudExadataInfrastructureListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List CloudExadataInfrastructure resources by resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroup(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + CloudExadataInfrastructureListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = CloudExadataInfrastructureListResult.DeserializeCloudExadataInfrastructureListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateAddStorageCapacityRequestUri(string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/cloudExadataInfrastructures/", false); + uri.AppendPath(cloudexadatainfrastructurename, true); + uri.AppendPath("/addStorageCapacity", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateAddStorageCapacityRequest(string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/cloudExadataInfrastructures/", false); + uri.AppendPath(cloudexadatainfrastructurename, true); + uri.AppendPath("/addStorageCapacity", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Perform add storage capacity on exadata infra. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudExadataInfrastructure name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task AddStorageCapacityAsync(string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(cloudexadatainfrastructurename, nameof(cloudexadatainfrastructurename)); + + using var message = CreateAddStorageCapacityRequest(subscriptionId, resourceGroupName, cloudexadatainfrastructurename); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Perform add storage capacity on exadata infra. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudExadataInfrastructure name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response AddStorageCapacity(string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(cloudexadatainfrastructurename, nameof(cloudexadatainfrastructurename)); + + using var message = CreateAddStorageCapacityRequest(subscriptionId, resourceGroupName, cloudexadatainfrastructurename); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListBySubscriptionNextPageRequestUri(string nextLink, string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, string subscriptionId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List CloudExadataInfrastructure resources by subscription ID. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionNextPageAsync(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + CloudExadataInfrastructureListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = CloudExadataInfrastructureListResult.DeserializeCloudExadataInfrastructureListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List CloudExadataInfrastructure resources by subscription ID. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscriptionNextPage(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + CloudExadataInfrastructureListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = CloudExadataInfrastructureListResult.DeserializeCloudExadataInfrastructureListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByResourceGroupNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List CloudExadataInfrastructure resources by resource group. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + CloudExadataInfrastructureListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = CloudExadataInfrastructureListResult.DeserializeCloudExadataInfrastructureListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List CloudExadataInfrastructure resources by resource group. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroupNextPage(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + CloudExadataInfrastructureListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = CloudExadataInfrastructureListResult.DeserializeCloudExadataInfrastructureListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/CloudVmClustersRestOperations.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/CloudVmClustersRestOperations.cs new file mode 100644 index 000000000000..dd178ebae702 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/CloudVmClustersRestOperations.cs @@ -0,0 +1,1024 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + internal partial class CloudVmClustersRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of CloudVmClustersRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public CloudVmClustersRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-03-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListBySubscriptionRequestUri(string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Oracle.Database/cloudVmClusters", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Oracle.Database/cloudVmClusters", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List CloudVmCluster resources by subscription ID. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionAsync(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + CloudVmClusterListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = CloudVmClusterListResult.DeserializeCloudVmClusterListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List CloudVmCluster resources by subscription ID. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscription(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + CloudVmClusterListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = CloudVmClusterListResult.DeserializeCloudVmClusterListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string cloudvmclustername, CloudVmClusterData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/cloudVmClusters/", false); + uri.AppendPath(cloudvmclustername, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string cloudvmclustername, CloudVmClusterData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/cloudVmClusters/", false); + uri.AppendPath(cloudvmclustername, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create a CloudVmCluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name. + /// Resource create parameters. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string cloudvmclustername, CloudVmClusterData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(cloudvmclustername, nameof(cloudvmclustername)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, cloudvmclustername, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create a CloudVmCluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name. + /// Resource create parameters. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string cloudvmclustername, CloudVmClusterData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(cloudvmclustername, nameof(cloudvmclustername)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, cloudvmclustername, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string cloudvmclustername) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/cloudVmClusters/", false); + uri.AppendPath(cloudvmclustername, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string cloudvmclustername) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/cloudVmClusters/", false); + uri.AppendPath(cloudvmclustername, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a CloudVmCluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string cloudvmclustername, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(cloudvmclustername, nameof(cloudvmclustername)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, cloudvmclustername); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + CloudVmClusterData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = CloudVmClusterData.DeserializeCloudVmClusterData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((CloudVmClusterData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a CloudVmCluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string cloudvmclustername, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(cloudvmclustername, nameof(cloudvmclustername)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, cloudvmclustername); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + CloudVmClusterData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = CloudVmClusterData.DeserializeCloudVmClusterData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((CloudVmClusterData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string cloudvmclustername, CloudVmClusterPatch patch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/cloudVmClusters/", false); + uri.AppendPath(cloudvmclustername, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string cloudvmclustername, CloudVmClusterPatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/cloudVmClusters/", false); + uri.AppendPath(cloudvmclustername, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Update a CloudVmCluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name. + /// The resource properties to be updated. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string cloudvmclustername, CloudVmClusterPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(cloudvmclustername, nameof(cloudvmclustername)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, cloudvmclustername, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Update a CloudVmCluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name. + /// The resource properties to be updated. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string cloudvmclustername, CloudVmClusterPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(cloudvmclustername, nameof(cloudvmclustername)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, cloudvmclustername, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string cloudvmclustername) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/cloudVmClusters/", false); + uri.AppendPath(cloudvmclustername, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string cloudvmclustername) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/cloudVmClusters/", false); + uri.AppendPath(cloudvmclustername, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a CloudVmCluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string cloudvmclustername, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(cloudvmclustername, nameof(cloudvmclustername)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, cloudvmclustername); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete a CloudVmCluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string cloudvmclustername, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(cloudvmclustername, nameof(cloudvmclustername)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, cloudvmclustername); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByResourceGroupRequestUri(string subscriptionId, string resourceGroupName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/cloudVmClusters", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, string resourceGroupName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/cloudVmClusters", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List CloudVmCluster resources by resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupAsync(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + CloudVmClusterListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = CloudVmClusterListResult.DeserializeCloudVmClusterListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List CloudVmCluster resources by resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroup(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + CloudVmClusterListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = CloudVmClusterListResult.DeserializeCloudVmClusterListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateAddVmsRequestUri(string subscriptionId, string resourceGroupName, string cloudvmclustername, AddRemoveDbNode body) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/cloudVmClusters/", false); + uri.AppendPath(cloudvmclustername, true); + uri.AppendPath("/addVms", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateAddVmsRequest(string subscriptionId, string resourceGroupName, string cloudvmclustername, AddRemoveDbNode body) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/cloudVmClusters/", false); + uri.AppendPath(cloudvmclustername, true); + uri.AppendPath("/addVms", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(body, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Add VMs to the VM Cluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name. + /// The content of the action request. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task AddVmsAsync(string subscriptionId, string resourceGroupName, string cloudvmclustername, AddRemoveDbNode body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(cloudvmclustername, nameof(cloudvmclustername)); + Argument.AssertNotNull(body, nameof(body)); + + using var message = CreateAddVmsRequest(subscriptionId, resourceGroupName, cloudvmclustername, body); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Add VMs to the VM Cluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name. + /// The content of the action request. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response AddVms(string subscriptionId, string resourceGroupName, string cloudvmclustername, AddRemoveDbNode body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(cloudvmclustername, nameof(cloudvmclustername)); + Argument.AssertNotNull(body, nameof(body)); + + using var message = CreateAddVmsRequest(subscriptionId, resourceGroupName, cloudvmclustername, body); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateRemoveVmsRequestUri(string subscriptionId, string resourceGroupName, string cloudvmclustername, AddRemoveDbNode body) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/cloudVmClusters/", false); + uri.AppendPath(cloudvmclustername, true); + uri.AppendPath("/removeVms", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateRemoveVmsRequest(string subscriptionId, string resourceGroupName, string cloudvmclustername, AddRemoveDbNode body) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/cloudVmClusters/", false); + uri.AppendPath(cloudvmclustername, true); + uri.AppendPath("/removeVms", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(body, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Remove VMs from the VM Cluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name. + /// The content of the action request. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task RemoveVmsAsync(string subscriptionId, string resourceGroupName, string cloudvmclustername, AddRemoveDbNode body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(cloudvmclustername, nameof(cloudvmclustername)); + Argument.AssertNotNull(body, nameof(body)); + + using var message = CreateRemoveVmsRequest(subscriptionId, resourceGroupName, cloudvmclustername, body); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Remove VMs from the VM Cluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name. + /// The content of the action request. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response RemoveVms(string subscriptionId, string resourceGroupName, string cloudvmclustername, AddRemoveDbNode body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(cloudvmclustername, nameof(cloudvmclustername)); + Argument.AssertNotNull(body, nameof(body)); + + using var message = CreateRemoveVmsRequest(subscriptionId, resourceGroupName, cloudvmclustername, body); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListPrivateIPAddressesRequestUri(string subscriptionId, string resourceGroupName, string cloudvmclustername, PrivateIPAddressesFilter body) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/cloudVmClusters/", false); + uri.AppendPath(cloudvmclustername, true); + uri.AppendPath("/listPrivateIpAddresses", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListPrivateIPAddressesRequest(string subscriptionId, string resourceGroupName, string cloudvmclustername, PrivateIPAddressesFilter body) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/cloudVmClusters/", false); + uri.AppendPath(cloudvmclustername, true); + uri.AppendPath("/listPrivateIpAddresses", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(body, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// List Private IP Addresses by the provided filter. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name. + /// The content of the action request. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task>> ListPrivateIPAddressesAsync(string subscriptionId, string resourceGroupName, string cloudvmclustername, PrivateIPAddressesFilter body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(cloudvmclustername, nameof(cloudvmclustername)); + Argument.AssertNotNull(body, nameof(body)); + + using var message = CreateListPrivateIPAddressesRequest(subscriptionId, resourceGroupName, cloudvmclustername, body); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + IReadOnlyList value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + List array = new List(); + foreach (var item in document.RootElement.EnumerateArray()) + { + array.Add(PrivateIPAddressProperties.DeserializePrivateIPAddressProperties(item)); + } + value = array; + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Private IP Addresses by the provided filter. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name. + /// The content of the action request. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response> ListPrivateIPAddresses(string subscriptionId, string resourceGroupName, string cloudvmclustername, PrivateIPAddressesFilter body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(cloudvmclustername, nameof(cloudvmclustername)); + Argument.AssertNotNull(body, nameof(body)); + + using var message = CreateListPrivateIPAddressesRequest(subscriptionId, resourceGroupName, cloudvmclustername, body); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + IReadOnlyList value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + List array = new List(); + foreach (var item in document.RootElement.EnumerateArray()) + { + array.Add(PrivateIPAddressProperties.DeserializePrivateIPAddressProperties(item)); + } + value = array; + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListBySubscriptionNextPageRequestUri(string nextLink, string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, string subscriptionId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List CloudVmCluster resources by subscription ID. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionNextPageAsync(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + CloudVmClusterListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = CloudVmClusterListResult.DeserializeCloudVmClusterListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List CloudVmCluster resources by subscription ID. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscriptionNextPage(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + CloudVmClusterListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = CloudVmClusterListResult.DeserializeCloudVmClusterListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByResourceGroupNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List CloudVmCluster resources by resource group. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + CloudVmClusterListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = CloudVmClusterListResult.DeserializeCloudVmClusterListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List CloudVmCluster resources by resource group. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroupNextPage(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + CloudVmClusterListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = CloudVmClusterListResult.DeserializeCloudVmClusterListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/DbNodesRestOperations.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/DbNodesRestOperations.cs new file mode 100644 index 000000000000..6028aa75cabf --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/DbNodesRestOperations.cs @@ -0,0 +1,423 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + internal partial class DbNodesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of DbNodesRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public DbNodesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-03-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string cloudvmclustername, string dbnodeocid) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/cloudVmClusters/", false); + uri.AppendPath(cloudvmclustername, true); + uri.AppendPath("/dbNodes/", false); + uri.AppendPath(dbnodeocid, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string cloudvmclustername, string dbnodeocid) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/cloudVmClusters/", false); + uri.AppendPath(cloudvmclustername, true); + uri.AppendPath("/dbNodes/", false); + uri.AppendPath(dbnodeocid, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a DbNode. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name. + /// DbNode OCID. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string cloudvmclustername, string dbnodeocid, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(cloudvmclustername, nameof(cloudvmclustername)); + Argument.AssertNotNullOrEmpty(dbnodeocid, nameof(dbnodeocid)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, cloudvmclustername, dbnodeocid); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DbNodeData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DbNodeData.DeserializeDbNodeData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DbNodeData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a DbNode. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name. + /// DbNode OCID. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string cloudvmclustername, string dbnodeocid, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(cloudvmclustername, nameof(cloudvmclustername)); + Argument.AssertNotNullOrEmpty(dbnodeocid, nameof(dbnodeocid)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, cloudvmclustername, dbnodeocid); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DbNodeData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DbNodeData.DeserializeDbNodeData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DbNodeData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByParentRequestUri(string subscriptionId, string resourceGroupName, string cloudvmclustername) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/cloudVmClusters/", false); + uri.AppendPath(cloudvmclustername, true); + uri.AppendPath("/dbNodes", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByParentRequest(string subscriptionId, string resourceGroupName, string cloudvmclustername) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/cloudVmClusters/", false); + uri.AppendPath(cloudvmclustername, true); + uri.AppendPath("/dbNodes", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List DbNode resources by CloudVmCluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByParentAsync(string subscriptionId, string resourceGroupName, string cloudvmclustername, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(cloudvmclustername, nameof(cloudvmclustername)); + + using var message = CreateListByParentRequest(subscriptionId, resourceGroupName, cloudvmclustername); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DbNodeListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DbNodeListResult.DeserializeDbNodeListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List DbNode resources by CloudVmCluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByParent(string subscriptionId, string resourceGroupName, string cloudvmclustername, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(cloudvmclustername, nameof(cloudvmclustername)); + + using var message = CreateListByParentRequest(subscriptionId, resourceGroupName, cloudvmclustername); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DbNodeListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DbNodeListResult.DeserializeDbNodeListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateActionRequestUri(string subscriptionId, string resourceGroupName, string cloudvmclustername, string dbnodeocid, DbNodeAction body) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/cloudVmClusters/", false); + uri.AppendPath(cloudvmclustername, true); + uri.AppendPath("/dbNodes/", false); + uri.AppendPath(dbnodeocid, true); + uri.AppendPath("/action", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateActionRequest(string subscriptionId, string resourceGroupName, string cloudvmclustername, string dbnodeocid, DbNodeAction body) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/cloudVmClusters/", false); + uri.AppendPath(cloudvmclustername, true); + uri.AppendPath("/dbNodes/", false); + uri.AppendPath(dbnodeocid, true); + uri.AppendPath("/action", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(body, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// VM actions on DbNode of VM Cluster by the provided filter. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name. + /// DbNode OCID. + /// The content of the action request. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task ActionAsync(string subscriptionId, string resourceGroupName, string cloudvmclustername, string dbnodeocid, DbNodeAction body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(cloudvmclustername, nameof(cloudvmclustername)); + Argument.AssertNotNullOrEmpty(dbnodeocid, nameof(dbnodeocid)); + Argument.AssertNotNull(body, nameof(body)); + + using var message = CreateActionRequest(subscriptionId, resourceGroupName, cloudvmclustername, dbnodeocid, body); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// VM actions on DbNode of VM Cluster by the provided filter. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name. + /// DbNode OCID. + /// The content of the action request. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Action(string subscriptionId, string resourceGroupName, string cloudvmclustername, string dbnodeocid, DbNodeAction body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(cloudvmclustername, nameof(cloudvmclustername)); + Argument.AssertNotNullOrEmpty(dbnodeocid, nameof(dbnodeocid)); + Argument.AssertNotNull(body, nameof(body)); + + using var message = CreateActionRequest(subscriptionId, resourceGroupName, cloudvmclustername, dbnodeocid, body); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByParentNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string cloudvmclustername) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByParentNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string cloudvmclustername) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List DbNode resources by CloudVmCluster. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByParentNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string cloudvmclustername, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(cloudvmclustername, nameof(cloudvmclustername)); + + using var message = CreateListByParentNextPageRequest(nextLink, subscriptionId, resourceGroupName, cloudvmclustername); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DbNodeListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DbNodeListResult.DeserializeDbNodeListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List DbNode resources by CloudVmCluster. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByParentNextPage(string nextLink, string subscriptionId, string resourceGroupName, string cloudvmclustername, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(cloudvmclustername, nameof(cloudvmclustername)); + + using var message = CreateListByParentNextPageRequest(nextLink, subscriptionId, resourceGroupName, cloudvmclustername); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DbNodeListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DbNodeListResult.DeserializeDbNodeListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/DbServersRestOperations.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/DbServersRestOperations.cs new file mode 100644 index 000000000000..71b1d9981168 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/DbServersRestOperations.cs @@ -0,0 +1,321 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + internal partial class DbServersRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of DbServersRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public DbServersRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-03-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename, string dbserverocid) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/cloudExadataInfrastructures/", false); + uri.AppendPath(cloudexadatainfrastructurename, true); + uri.AppendPath("/dbServers/", false); + uri.AppendPath(dbserverocid, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename, string dbserverocid) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/cloudExadataInfrastructures/", false); + uri.AppendPath(cloudexadatainfrastructurename, true); + uri.AppendPath("/dbServers/", false); + uri.AppendPath(dbserverocid, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a DbServer. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudExadataInfrastructure name. + /// DbServer OCID. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename, string dbserverocid, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(cloudexadatainfrastructurename, nameof(cloudexadatainfrastructurename)); + Argument.AssertNotNullOrEmpty(dbserverocid, nameof(dbserverocid)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, cloudexadatainfrastructurename, dbserverocid); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DbServerData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DbServerData.DeserializeDbServerData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DbServerData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a DbServer. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudExadataInfrastructure name. + /// DbServer OCID. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename, string dbserverocid, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(cloudexadatainfrastructurename, nameof(cloudexadatainfrastructurename)); + Argument.AssertNotNullOrEmpty(dbserverocid, nameof(dbserverocid)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, cloudexadatainfrastructurename, dbserverocid); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DbServerData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DbServerData.DeserializeDbServerData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DbServerData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByParentRequestUri(string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/cloudExadataInfrastructures/", false); + uri.AppendPath(cloudexadatainfrastructurename, true); + uri.AppendPath("/dbServers", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByParentRequest(string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/cloudExadataInfrastructures/", false); + uri.AppendPath(cloudexadatainfrastructurename, true); + uri.AppendPath("/dbServers", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List DbServer resources by CloudExadataInfrastructure. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudExadataInfrastructure name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByParentAsync(string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(cloudexadatainfrastructurename, nameof(cloudexadatainfrastructurename)); + + using var message = CreateListByParentRequest(subscriptionId, resourceGroupName, cloudexadatainfrastructurename); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DbServerListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DbServerListResult.DeserializeDbServerListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List DbServer resources by CloudExadataInfrastructure. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudExadataInfrastructure name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByParent(string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(cloudexadatainfrastructurename, nameof(cloudexadatainfrastructurename)); + + using var message = CreateListByParentRequest(subscriptionId, resourceGroupName, cloudexadatainfrastructurename); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DbServerListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DbServerListResult.DeserializeDbServerListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByParentNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByParentNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List DbServer resources by CloudExadataInfrastructure. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudExadataInfrastructure name. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByParentNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(cloudexadatainfrastructurename, nameof(cloudexadatainfrastructurename)); + + using var message = CreateListByParentNextPageRequest(nextLink, subscriptionId, resourceGroupName, cloudexadatainfrastructurename); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DbServerListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DbServerListResult.DeserializeDbServerListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List DbServer resources by CloudExadataInfrastructure. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudExadataInfrastructure name. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByParentNextPage(string nextLink, string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(cloudexadatainfrastructurename, nameof(cloudexadatainfrastructurename)); + + using var message = CreateListByParentNextPageRequest(nextLink, subscriptionId, resourceGroupName, cloudexadatainfrastructurename); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DbServerListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DbServerListResult.DeserializeDbServerListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/DbSystemShapesRestOperations.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/DbSystemShapesRestOperations.cs new file mode 100644 index 000000000000..0b8d2443df5b --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/DbSystemShapesRestOperations.cs @@ -0,0 +1,307 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + internal partial class DbSystemShapesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of DbSystemShapesRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public DbSystemShapesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-03-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, AzureLocation location, string dbsystemshapename) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Oracle.Database/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/dbSystemShapes/", false); + uri.AppendPath(dbsystemshapename, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, AzureLocation location, string dbsystemshapename) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Oracle.Database/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/dbSystemShapes/", false); + uri.AppendPath(dbsystemshapename, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a DbSystemShape. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// DbSystemShape name. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, AzureLocation location, string dbsystemshapename, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(dbsystemshapename, nameof(dbsystemshapename)); + + using var message = CreateGetRequest(subscriptionId, location, dbsystemshapename); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DbSystemShapeData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DbSystemShapeData.DeserializeDbSystemShapeData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DbSystemShapeData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a DbSystemShape. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// DbSystemShape name. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, AzureLocation location, string dbsystemshapename, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(dbsystemshapename, nameof(dbsystemshapename)); + + using var message = CreateGetRequest(subscriptionId, location, dbsystemshapename); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DbSystemShapeData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DbSystemShapeData.DeserializeDbSystemShapeData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DbSystemShapeData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByLocationRequestUri(string subscriptionId, AzureLocation location, string zone) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Oracle.Database/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/dbSystemShapes", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (zone != null) + { + uri.AppendQuery("zone", zone, true); + } + return uri; + } + + internal HttpMessage CreateListByLocationRequest(string subscriptionId, AzureLocation location, string zone) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Oracle.Database/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/dbSystemShapes", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (zone != null) + { + uri.AppendQuery("zone", zone, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List DbSystemShape resources by SubscriptionLocationResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// Filters the result for the given Azure Availability Zone. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListByLocationAsync(string subscriptionId, AzureLocation location, string zone = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListByLocationRequest(subscriptionId, location, zone); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DbSystemShapeListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DbSystemShapeListResult.DeserializeDbSystemShapeListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List DbSystemShape resources by SubscriptionLocationResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// Filters the result for the given Azure Availability Zone. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response ListByLocation(string subscriptionId, AzureLocation location, string zone = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListByLocationRequest(subscriptionId, location, zone); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DbSystemShapeListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DbSystemShapeListResult.DeserializeDbSystemShapeListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByLocationNextPageRequestUri(string nextLink, string subscriptionId, AzureLocation location, string zone) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByLocationNextPageRequest(string nextLink, string subscriptionId, AzureLocation location, string zone) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List DbSystemShape resources by SubscriptionLocationResource. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// Filters the result for the given Azure Availability Zone. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListByLocationNextPageAsync(string nextLink, string subscriptionId, AzureLocation location, string zone = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListByLocationNextPageRequest(nextLink, subscriptionId, location, zone); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DbSystemShapeListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DbSystemShapeListResult.DeserializeDbSystemShapeListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List DbSystemShape resources by SubscriptionLocationResource. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// Filters the result for the given Azure Availability Zone. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ListByLocationNextPage(string nextLink, string subscriptionId, AzureLocation location, string zone = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListByLocationNextPageRequest(nextLink, subscriptionId, location, zone); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DbSystemShapeListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DbSystemShapeListResult.DeserializeDbSystemShapeListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/DnsPrivateViewsRestOperations.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/DnsPrivateViewsRestOperations.cs new file mode 100644 index 000000000000..9cebec515b85 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/DnsPrivateViewsRestOperations.cs @@ -0,0 +1,295 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + internal partial class DnsPrivateViewsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of DnsPrivateViewsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public DnsPrivateViewsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-03-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, AzureLocation location, string dnsprivateviewocid) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Oracle.Database/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/dnsPrivateViews/", false); + uri.AppendPath(dnsprivateviewocid, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, AzureLocation location, string dnsprivateviewocid) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Oracle.Database/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/dnsPrivateViews/", false); + uri.AppendPath(dnsprivateviewocid, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a DnsPrivateView. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// DnsPrivateView OCID. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, AzureLocation location, string dnsprivateviewocid, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(dnsprivateviewocid, nameof(dnsprivateviewocid)); + + using var message = CreateGetRequest(subscriptionId, location, dnsprivateviewocid); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DnsPrivateViewData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DnsPrivateViewData.DeserializeDnsPrivateViewData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DnsPrivateViewData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a DnsPrivateView. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// DnsPrivateView OCID. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, AzureLocation location, string dnsprivateviewocid, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(dnsprivateviewocid, nameof(dnsprivateviewocid)); + + using var message = CreateGetRequest(subscriptionId, location, dnsprivateviewocid); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DnsPrivateViewData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DnsPrivateViewData.DeserializeDnsPrivateViewData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DnsPrivateViewData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByLocationRequestUri(string subscriptionId, AzureLocation location) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Oracle.Database/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/dnsPrivateViews", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByLocationRequest(string subscriptionId, AzureLocation location) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Oracle.Database/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/dnsPrivateViews", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List DnsPrivateView resources by SubscriptionLocationResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListByLocationAsync(string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListByLocationRequest(subscriptionId, location); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DnsPrivateViewListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DnsPrivateViewListResult.DeserializeDnsPrivateViewListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List DnsPrivateView resources by SubscriptionLocationResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response ListByLocation(string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListByLocationRequest(subscriptionId, location); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DnsPrivateViewListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DnsPrivateViewListResult.DeserializeDnsPrivateViewListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByLocationNextPageRequestUri(string nextLink, string subscriptionId, AzureLocation location) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByLocationNextPageRequest(string nextLink, string subscriptionId, AzureLocation location) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List DnsPrivateView resources by SubscriptionLocationResource. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListByLocationNextPageAsync(string nextLink, string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListByLocationNextPageRequest(nextLink, subscriptionId, location); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DnsPrivateViewListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DnsPrivateViewListResult.DeserializeDnsPrivateViewListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List DnsPrivateView resources by SubscriptionLocationResource. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ListByLocationNextPage(string nextLink, string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListByLocationNextPageRequest(nextLink, subscriptionId, location); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DnsPrivateViewListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DnsPrivateViewListResult.DeserializeDnsPrivateViewListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/DnsPrivateZonesRestOperations.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/DnsPrivateZonesRestOperations.cs new file mode 100644 index 000000000000..9f19975be4ad --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/DnsPrivateZonesRestOperations.cs @@ -0,0 +1,295 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + internal partial class DnsPrivateZonesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of DnsPrivateZonesRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public DnsPrivateZonesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-03-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, AzureLocation location, string dnsprivatezonename) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Oracle.Database/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/dnsPrivateZones/", false); + uri.AppendPath(dnsprivatezonename, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, AzureLocation location, string dnsprivatezonename) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Oracle.Database/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/dnsPrivateZones/", false); + uri.AppendPath(dnsprivatezonename, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a DnsPrivateZone. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// DnsPrivateZone name. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, AzureLocation location, string dnsprivatezonename, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(dnsprivatezonename, nameof(dnsprivatezonename)); + + using var message = CreateGetRequest(subscriptionId, location, dnsprivatezonename); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DnsPrivateZoneData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DnsPrivateZoneData.DeserializeDnsPrivateZoneData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DnsPrivateZoneData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a DnsPrivateZone. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// DnsPrivateZone name. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, AzureLocation location, string dnsprivatezonename, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(dnsprivatezonename, nameof(dnsprivatezonename)); + + using var message = CreateGetRequest(subscriptionId, location, dnsprivatezonename); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DnsPrivateZoneData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DnsPrivateZoneData.DeserializeDnsPrivateZoneData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DnsPrivateZoneData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByLocationRequestUri(string subscriptionId, AzureLocation location) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Oracle.Database/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/dnsPrivateZones", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByLocationRequest(string subscriptionId, AzureLocation location) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Oracle.Database/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/dnsPrivateZones", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List DnsPrivateZone resources by SubscriptionLocationResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListByLocationAsync(string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListByLocationRequest(subscriptionId, location); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DnsPrivateZoneListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DnsPrivateZoneListResult.DeserializeDnsPrivateZoneListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List DnsPrivateZone resources by SubscriptionLocationResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response ListByLocation(string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListByLocationRequest(subscriptionId, location); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DnsPrivateZoneListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DnsPrivateZoneListResult.DeserializeDnsPrivateZoneListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByLocationNextPageRequestUri(string nextLink, string subscriptionId, AzureLocation location) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByLocationNextPageRequest(string nextLink, string subscriptionId, AzureLocation location) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List DnsPrivateZone resources by SubscriptionLocationResource. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListByLocationNextPageAsync(string nextLink, string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListByLocationNextPageRequest(nextLink, subscriptionId, location); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DnsPrivateZoneListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DnsPrivateZoneListResult.DeserializeDnsPrivateZoneListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List DnsPrivateZone resources by SubscriptionLocationResource. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ListByLocationNextPage(string nextLink, string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListByLocationNextPageRequest(nextLink, subscriptionId, location); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DnsPrivateZoneListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DnsPrivateZoneListResult.DeserializeDnsPrivateZoneListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/ExadbVmClustersRestOperations.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/ExadbVmClustersRestOperations.cs new file mode 100644 index 000000000000..2b41f881acff --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/ExadbVmClustersRestOperations.cs @@ -0,0 +1,817 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + internal partial class ExadbVmClustersRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ExadbVmClustersRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public ExadbVmClustersRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-03-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListBySubscriptionRequestUri(string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Oracle.Database/exadbVmClusters", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Oracle.Database/exadbVmClusters", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List ExadbVmCluster resources by subscription ID. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionAsync(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ExadbVmClusterListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ExadbVmClusterListResult.DeserializeExadbVmClusterListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List ExadbVmCluster resources by subscription ID. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscription(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ExadbVmClusterListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ExadbVmClusterListResult.DeserializeExadbVmClusterListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string exadbVmClusterName, ExadbVmClusterData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/exadbVmClusters/", false); + uri.AppendPath(exadbVmClusterName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string exadbVmClusterName, ExadbVmClusterData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/exadbVmClusters/", false); + uri.AppendPath(exadbVmClusterName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create a ExadbVmCluster. + /// 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 ExadbVmCluster. + /// Resource create parameters. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string exadbVmClusterName, ExadbVmClusterData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(exadbVmClusterName, nameof(exadbVmClusterName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, exadbVmClusterName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create a ExadbVmCluster. + /// 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 ExadbVmCluster. + /// Resource create parameters. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string exadbVmClusterName, ExadbVmClusterData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(exadbVmClusterName, nameof(exadbVmClusterName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, exadbVmClusterName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string exadbVmClusterName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/exadbVmClusters/", false); + uri.AppendPath(exadbVmClusterName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string exadbVmClusterName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/exadbVmClusters/", false); + uri.AppendPath(exadbVmClusterName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a ExadbVmCluster. + /// 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 ExadbVmCluster. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string exadbVmClusterName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(exadbVmClusterName, nameof(exadbVmClusterName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, exadbVmClusterName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ExadbVmClusterData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ExadbVmClusterData.DeserializeExadbVmClusterData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ExadbVmClusterData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a ExadbVmCluster. + /// 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 ExadbVmCluster. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string exadbVmClusterName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(exadbVmClusterName, nameof(exadbVmClusterName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, exadbVmClusterName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ExadbVmClusterData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ExadbVmClusterData.DeserializeExadbVmClusterData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ExadbVmClusterData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string exadbVmClusterName, ExadbVmClusterPatch patch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/exadbVmClusters/", false); + uri.AppendPath(exadbVmClusterName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string exadbVmClusterName, ExadbVmClusterPatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/exadbVmClusters/", false); + uri.AppendPath(exadbVmClusterName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Update a ExadbVmCluster. + /// 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 ExadbVmCluster. + /// The resource properties to be updated. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string exadbVmClusterName, ExadbVmClusterPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(exadbVmClusterName, nameof(exadbVmClusterName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, exadbVmClusterName, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Update a ExadbVmCluster. + /// 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 ExadbVmCluster. + /// The resource properties to be updated. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string exadbVmClusterName, ExadbVmClusterPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(exadbVmClusterName, nameof(exadbVmClusterName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, exadbVmClusterName, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string exadbVmClusterName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/exadbVmClusters/", false); + uri.AppendPath(exadbVmClusterName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string exadbVmClusterName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/exadbVmClusters/", false); + uri.AppendPath(exadbVmClusterName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a ExadbVmCluster. + /// 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 ExadbVmCluster. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string exadbVmClusterName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(exadbVmClusterName, nameof(exadbVmClusterName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, exadbVmClusterName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete a ExadbVmCluster. + /// 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 ExadbVmCluster. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string exadbVmClusterName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(exadbVmClusterName, nameof(exadbVmClusterName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, exadbVmClusterName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByResourceGroupRequestUri(string subscriptionId, string resourceGroupName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/exadbVmClusters", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, string resourceGroupName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/exadbVmClusters", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List ExadbVmCluster resources by resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupAsync(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ExadbVmClusterListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ExadbVmClusterListResult.DeserializeExadbVmClusterListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List ExadbVmCluster resources by resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroup(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ExadbVmClusterListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ExadbVmClusterListResult.DeserializeExadbVmClusterListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateRemoveVmsRequestUri(string subscriptionId, string resourceGroupName, string exadbVmClusterName, RemoveVirtualMachineFromExadbVmClusterDetails details) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/exadbVmClusters/", false); + uri.AppendPath(exadbVmClusterName, true); + uri.AppendPath("/removeVms", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateRemoveVmsRequest(string subscriptionId, string resourceGroupName, string exadbVmClusterName, RemoveVirtualMachineFromExadbVmClusterDetails details) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/exadbVmClusters/", false); + uri.AppendPath(exadbVmClusterName, true); + uri.AppendPath("/removeVms", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(details, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Remove VMs from the VM Cluster. + /// 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 ExadbVmCluster. + /// The content of the action request. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task RemoveVmsAsync(string subscriptionId, string resourceGroupName, string exadbVmClusterName, RemoveVirtualMachineFromExadbVmClusterDetails details, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(exadbVmClusterName, nameof(exadbVmClusterName)); + Argument.AssertNotNull(details, nameof(details)); + + using var message = CreateRemoveVmsRequest(subscriptionId, resourceGroupName, exadbVmClusterName, details); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Remove VMs from the VM Cluster. + /// 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 ExadbVmCluster. + /// The content of the action request. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response RemoveVms(string subscriptionId, string resourceGroupName, string exadbVmClusterName, RemoveVirtualMachineFromExadbVmClusterDetails details, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(exadbVmClusterName, nameof(exadbVmClusterName)); + Argument.AssertNotNull(details, nameof(details)); + + using var message = CreateRemoveVmsRequest(subscriptionId, resourceGroupName, exadbVmClusterName, details); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListBySubscriptionNextPageRequestUri(string nextLink, string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, string subscriptionId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List ExadbVmCluster resources by subscription ID. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionNextPageAsync(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ExadbVmClusterListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ExadbVmClusterListResult.DeserializeExadbVmClusterListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List ExadbVmCluster resources by subscription ID. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscriptionNextPage(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ExadbVmClusterListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ExadbVmClusterListResult.DeserializeExadbVmClusterListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByResourceGroupNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List ExadbVmCluster resources by resource group. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ExadbVmClusterListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ExadbVmClusterListResult.DeserializeExadbVmClusterListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List ExadbVmCluster resources by resource group. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroupNextPage(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ExadbVmClusterListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ExadbVmClusterListResult.DeserializeExadbVmClusterListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/ExascaleDbNodesRestOperations.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/ExascaleDbNodesRestOperations.cs new file mode 100644 index 000000000000..320ca8912912 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/ExascaleDbNodesRestOperations.cs @@ -0,0 +1,423 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + internal partial class ExascaleDbNodesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ExascaleDbNodesRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public ExascaleDbNodesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-03-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string exadbVmClusterName, string exascaleDbNodeName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/exadbVmClusters/", false); + uri.AppendPath(exadbVmClusterName, true); + uri.AppendPath("/dbNodes/", false); + uri.AppendPath(exascaleDbNodeName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string exadbVmClusterName, string exascaleDbNodeName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/exadbVmClusters/", false); + uri.AppendPath(exadbVmClusterName, true); + uri.AppendPath("/dbNodes/", false); + uri.AppendPath(exascaleDbNodeName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a ExascaleDbNode. + /// 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 ExadbVmCluster. + /// The name of the ExascaleDbNode. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string exadbVmClusterName, string exascaleDbNodeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(exadbVmClusterName, nameof(exadbVmClusterName)); + Argument.AssertNotNullOrEmpty(exascaleDbNodeName, nameof(exascaleDbNodeName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, exadbVmClusterName, exascaleDbNodeName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ExascaleDbNodeData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ExascaleDbNodeData.DeserializeExascaleDbNodeData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ExascaleDbNodeData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a ExascaleDbNode. + /// 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 ExadbVmCluster. + /// The name of the ExascaleDbNode. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string exadbVmClusterName, string exascaleDbNodeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(exadbVmClusterName, nameof(exadbVmClusterName)); + Argument.AssertNotNullOrEmpty(exascaleDbNodeName, nameof(exascaleDbNodeName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, exadbVmClusterName, exascaleDbNodeName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ExascaleDbNodeData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ExascaleDbNodeData.DeserializeExascaleDbNodeData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ExascaleDbNodeData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByParentRequestUri(string subscriptionId, string resourceGroupName, string exadbVmClusterName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/exadbVmClusters/", false); + uri.AppendPath(exadbVmClusterName, true); + uri.AppendPath("/dbNodes", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByParentRequest(string subscriptionId, string resourceGroupName, string exadbVmClusterName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/exadbVmClusters/", false); + uri.AppendPath(exadbVmClusterName, true); + uri.AppendPath("/dbNodes", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List ExascaleDbNode resources by ExadbVmCluster. + /// 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 ExadbVmCluster. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByParentAsync(string subscriptionId, string resourceGroupName, string exadbVmClusterName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(exadbVmClusterName, nameof(exadbVmClusterName)); + + using var message = CreateListByParentRequest(subscriptionId, resourceGroupName, exadbVmClusterName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ExascaleDbNodeListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ExascaleDbNodeListResult.DeserializeExascaleDbNodeListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List ExascaleDbNode resources by ExadbVmCluster. + /// 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 ExadbVmCluster. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByParent(string subscriptionId, string resourceGroupName, string exadbVmClusterName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(exadbVmClusterName, nameof(exadbVmClusterName)); + + using var message = CreateListByParentRequest(subscriptionId, resourceGroupName, exadbVmClusterName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ExascaleDbNodeListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ExascaleDbNodeListResult.DeserializeExascaleDbNodeListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateActionRequestUri(string subscriptionId, string resourceGroupName, string exadbVmClusterName, string exascaleDbNodeName, DbNodeAction body) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/exadbVmClusters/", false); + uri.AppendPath(exadbVmClusterName, true); + uri.AppendPath("/dbNodes/", false); + uri.AppendPath(exascaleDbNodeName, true); + uri.AppendPath("/action", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateActionRequest(string subscriptionId, string resourceGroupName, string exadbVmClusterName, string exascaleDbNodeName, DbNodeAction body) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/exadbVmClusters/", false); + uri.AppendPath(exadbVmClusterName, true); + uri.AppendPath("/dbNodes/", false); + uri.AppendPath(exascaleDbNodeName, true); + uri.AppendPath("/action", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(body, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// VM actions on DbNode of ExadbVmCluster by the provided filter. + /// 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 ExadbVmCluster. + /// The name of the ExascaleDbNode. + /// The content of the action request. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task ActionAsync(string subscriptionId, string resourceGroupName, string exadbVmClusterName, string exascaleDbNodeName, DbNodeAction body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(exadbVmClusterName, nameof(exadbVmClusterName)); + Argument.AssertNotNullOrEmpty(exascaleDbNodeName, nameof(exascaleDbNodeName)); + Argument.AssertNotNull(body, nameof(body)); + + using var message = CreateActionRequest(subscriptionId, resourceGroupName, exadbVmClusterName, exascaleDbNodeName, body); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// VM actions on DbNode of ExadbVmCluster by the provided filter. + /// 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 ExadbVmCluster. + /// The name of the ExascaleDbNode. + /// The content of the action request. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Action(string subscriptionId, string resourceGroupName, string exadbVmClusterName, string exascaleDbNodeName, DbNodeAction body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(exadbVmClusterName, nameof(exadbVmClusterName)); + Argument.AssertNotNullOrEmpty(exascaleDbNodeName, nameof(exascaleDbNodeName)); + Argument.AssertNotNull(body, nameof(body)); + + using var message = CreateActionRequest(subscriptionId, resourceGroupName, exadbVmClusterName, exascaleDbNodeName, body); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByParentNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string exadbVmClusterName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByParentNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string exadbVmClusterName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List ExascaleDbNode resources by ExadbVmCluster. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ExadbVmCluster. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByParentNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string exadbVmClusterName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(exadbVmClusterName, nameof(exadbVmClusterName)); + + using var message = CreateListByParentNextPageRequest(nextLink, subscriptionId, resourceGroupName, exadbVmClusterName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ExascaleDbNodeListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ExascaleDbNodeListResult.DeserializeExascaleDbNodeListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List ExascaleDbNode resources by ExadbVmCluster. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ExadbVmCluster. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByParentNextPage(string nextLink, string subscriptionId, string resourceGroupName, string exadbVmClusterName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(exadbVmClusterName, nameof(exadbVmClusterName)); + + using var message = CreateListByParentNextPageRequest(nextLink, subscriptionId, resourceGroupName, exadbVmClusterName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ExascaleDbNodeListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ExascaleDbNodeListResult.DeserializeExascaleDbNodeListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/ExascaleDbStorageVaultsRestOperations.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/ExascaleDbStorageVaultsRestOperations.cs new file mode 100644 index 000000000000..cf0d29fc3dc5 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/ExascaleDbStorageVaultsRestOperations.cs @@ -0,0 +1,723 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + internal partial class ExascaleDbStorageVaultsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ExascaleDbStorageVaultsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public ExascaleDbStorageVaultsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-03-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string exascaleDbStorageVaultName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/exascaleDbStorageVaults/", false); + uri.AppendPath(exascaleDbStorageVaultName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string exascaleDbStorageVaultName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/exascaleDbStorageVaults/", false); + uri.AppendPath(exascaleDbStorageVaultName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a ExascaleDbStorageVault. + /// 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 ExascaleDbStorageVault. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string exascaleDbStorageVaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(exascaleDbStorageVaultName, nameof(exascaleDbStorageVaultName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, exascaleDbStorageVaultName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ExascaleDbStorageVaultData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ExascaleDbStorageVaultData.DeserializeExascaleDbStorageVaultData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ExascaleDbStorageVaultData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a ExascaleDbStorageVault. + /// 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 ExascaleDbStorageVault. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string exascaleDbStorageVaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(exascaleDbStorageVaultName, nameof(exascaleDbStorageVaultName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, exascaleDbStorageVaultName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ExascaleDbStorageVaultData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ExascaleDbStorageVaultData.DeserializeExascaleDbStorageVaultData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ExascaleDbStorageVaultData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateRequestUri(string subscriptionId, string resourceGroupName, string exascaleDbStorageVaultName, ExascaleDbStorageVaultData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/exascaleDbStorageVaults/", false); + uri.AppendPath(exascaleDbStorageVaultName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string exascaleDbStorageVaultName, ExascaleDbStorageVaultData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/exascaleDbStorageVaults/", false); + uri.AppendPath(exascaleDbStorageVaultName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create a ExascaleDbStorageVault. + /// 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 ExascaleDbStorageVault. + /// Resource create parameters. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task CreateAsync(string subscriptionId, string resourceGroupName, string exascaleDbStorageVaultName, ExascaleDbStorageVaultData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(exascaleDbStorageVaultName, nameof(exascaleDbStorageVaultName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, exascaleDbStorageVaultName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create a ExascaleDbStorageVault. + /// 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 ExascaleDbStorageVault. + /// Resource create parameters. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Create(string subscriptionId, string resourceGroupName, string exascaleDbStorageVaultName, ExascaleDbStorageVaultData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(exascaleDbStorageVaultName, nameof(exascaleDbStorageVaultName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, exascaleDbStorageVaultName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string exascaleDbStorageVaultName, ExascaleDbStorageVaultPatch patch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/exascaleDbStorageVaults/", false); + uri.AppendPath(exascaleDbStorageVaultName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string exascaleDbStorageVaultName, ExascaleDbStorageVaultPatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/exascaleDbStorageVaults/", false); + uri.AppendPath(exascaleDbStorageVaultName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Update a ExascaleDbStorageVault. + /// 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 ExascaleDbStorageVault. + /// The resource properties to be updated. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string exascaleDbStorageVaultName, ExascaleDbStorageVaultPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(exascaleDbStorageVaultName, nameof(exascaleDbStorageVaultName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, exascaleDbStorageVaultName, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Update a ExascaleDbStorageVault. + /// 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 ExascaleDbStorageVault. + /// The resource properties to be updated. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string exascaleDbStorageVaultName, ExascaleDbStorageVaultPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(exascaleDbStorageVaultName, nameof(exascaleDbStorageVaultName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, exascaleDbStorageVaultName, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string exascaleDbStorageVaultName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/exascaleDbStorageVaults/", false); + uri.AppendPath(exascaleDbStorageVaultName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string exascaleDbStorageVaultName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/exascaleDbStorageVaults/", false); + uri.AppendPath(exascaleDbStorageVaultName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a ExascaleDbStorageVault. + /// 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 ExascaleDbStorageVault. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string exascaleDbStorageVaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(exascaleDbStorageVaultName, nameof(exascaleDbStorageVaultName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, exascaleDbStorageVaultName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete a ExascaleDbStorageVault. + /// 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 ExascaleDbStorageVault. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string exascaleDbStorageVaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(exascaleDbStorageVaultName, nameof(exascaleDbStorageVaultName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, exascaleDbStorageVaultName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByResourceGroupRequestUri(string subscriptionId, string resourceGroupName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/exascaleDbStorageVaults", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, string resourceGroupName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/exascaleDbStorageVaults", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List ExascaleDbStorageVault resources by resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupAsync(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ExascaleDbStorageVaultListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ExascaleDbStorageVaultListResult.DeserializeExascaleDbStorageVaultListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List ExascaleDbStorageVault resources by resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroup(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ExascaleDbStorageVaultListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ExascaleDbStorageVaultListResult.DeserializeExascaleDbStorageVaultListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListBySubscriptionRequestUri(string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Oracle.Database/exascaleDbStorageVaults", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Oracle.Database/exascaleDbStorageVaults", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List ExascaleDbStorageVault resources by subscription ID. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionAsync(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ExascaleDbStorageVaultListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ExascaleDbStorageVaultListResult.DeserializeExascaleDbStorageVaultListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List ExascaleDbStorageVault resources by subscription ID. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscription(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ExascaleDbStorageVaultListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ExascaleDbStorageVaultListResult.DeserializeExascaleDbStorageVaultListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByResourceGroupNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List ExascaleDbStorageVault resources by resource group. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ExascaleDbStorageVaultListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ExascaleDbStorageVaultListResult.DeserializeExascaleDbStorageVaultListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List ExascaleDbStorageVault resources by resource group. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroupNextPage(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ExascaleDbStorageVaultListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ExascaleDbStorageVaultListResult.DeserializeExascaleDbStorageVaultListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListBySubscriptionNextPageRequestUri(string nextLink, string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, string subscriptionId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List ExascaleDbStorageVault resources by subscription ID. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionNextPageAsync(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ExascaleDbStorageVaultListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ExascaleDbStorageVaultListResult.DeserializeExascaleDbStorageVaultListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List ExascaleDbStorageVault resources by subscription ID. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscriptionNextPage(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ExascaleDbStorageVaultListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ExascaleDbStorageVaultListResult.DeserializeExascaleDbStorageVaultListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/FlexComponentsRestOperations.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/FlexComponentsRestOperations.cs new file mode 100644 index 000000000000..9a76b2e91f5f --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/FlexComponentsRestOperations.cs @@ -0,0 +1,307 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + internal partial class FlexComponentsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of FlexComponentsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public FlexComponentsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-03-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, AzureLocation location, string flexComponentName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Oracle.Database/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/flexComponents/", false); + uri.AppendPath(flexComponentName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, AzureLocation location, string flexComponentName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Oracle.Database/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/flexComponents/", false); + uri.AppendPath(flexComponentName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a FlexComponent. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// The name of the FlexComponent. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, AzureLocation location, string flexComponentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(flexComponentName, nameof(flexComponentName)); + + using var message = CreateGetRequest(subscriptionId, location, flexComponentName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + FlexComponentData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = FlexComponentData.DeserializeFlexComponentData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((FlexComponentData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a FlexComponent. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// The name of the FlexComponent. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, AzureLocation location, string flexComponentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(flexComponentName, nameof(flexComponentName)); + + using var message = CreateGetRequest(subscriptionId, location, flexComponentName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + FlexComponentData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = FlexComponentData.DeserializeFlexComponentData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((FlexComponentData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByParentRequestUri(string subscriptionId, AzureLocation location, SystemShape? shape) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Oracle.Database/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/flexComponents", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (shape != null) + { + uri.AppendQuery("shape", shape.Value.ToString(), true); + } + return uri; + } + + internal HttpMessage CreateListByParentRequest(string subscriptionId, AzureLocation location, SystemShape? shape) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Oracle.Database/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/flexComponents", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (shape != null) + { + uri.AppendQuery("shape", shape.Value.ToString(), true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List FlexComponent resources by SubscriptionLocationResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// If provided, filters the results for the given shape. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListByParentAsync(string subscriptionId, AzureLocation location, SystemShape? shape = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListByParentRequest(subscriptionId, location, shape); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + FlexComponentListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = FlexComponentListResult.DeserializeFlexComponentListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List FlexComponent resources by SubscriptionLocationResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// If provided, filters the results for the given shape. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response ListByParent(string subscriptionId, AzureLocation location, SystemShape? shape = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListByParentRequest(subscriptionId, location, shape); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + FlexComponentListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = FlexComponentListResult.DeserializeFlexComponentListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByParentNextPageRequestUri(string nextLink, string subscriptionId, AzureLocation location, SystemShape? shape) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByParentNextPageRequest(string nextLink, string subscriptionId, AzureLocation location, SystemShape? shape) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List FlexComponent resources by SubscriptionLocationResource. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// If provided, filters the results for the given shape. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListByParentNextPageAsync(string nextLink, string subscriptionId, AzureLocation location, SystemShape? shape = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListByParentNextPageRequest(nextLink, subscriptionId, location, shape); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + FlexComponentListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = FlexComponentListResult.DeserializeFlexComponentListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List FlexComponent resources by SubscriptionLocationResource. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// If provided, filters the results for the given shape. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ListByParentNextPage(string nextLink, string subscriptionId, AzureLocation location, SystemShape? shape = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListByParentNextPageRequest(nextLink, subscriptionId, location, shape); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + FlexComponentListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = FlexComponentListResult.DeserializeFlexComponentListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/GiMinorVersionsRestOperations.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/GiMinorVersionsRestOperations.cs new file mode 100644 index 000000000000..b75755f7b65e --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/GiMinorVersionsRestOperations.cs @@ -0,0 +1,339 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + internal partial class GiMinorVersionsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of GiMinorVersionsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public GiMinorVersionsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-03-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListByParentRequestUri(string subscriptionId, AzureLocation location, string giversionname, ShapeFamily? shapeFamily, string zone) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Oracle.Database/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/giVersions/", false); + uri.AppendPath(giversionname, true); + uri.AppendPath("/giMinorVersions", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (shapeFamily != null) + { + uri.AppendQuery("shapeFamily", shapeFamily.Value.ToString(), true); + } + if (zone != null) + { + uri.AppendQuery("zone", zone, true); + } + return uri; + } + + internal HttpMessage CreateListByParentRequest(string subscriptionId, AzureLocation location, string giversionname, ShapeFamily? shapeFamily, string zone) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Oracle.Database/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/giVersions/", false); + uri.AppendPath(giversionname, true); + uri.AppendPath("/giMinorVersions", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (shapeFamily != null) + { + uri.AppendQuery("shapeFamily", shapeFamily.Value.ToString(), true); + } + if (zone != null) + { + uri.AppendQuery("zone", zone, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List GiMinorVersion resources by GiVersion. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// GiVersion name. + /// If provided, filters the results to the set of database versions which are supported for the given shape family. + /// Filters the result for the given Azure Availability Zone. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByParentAsync(string subscriptionId, AzureLocation location, string giversionname, ShapeFamily? shapeFamily = null, string zone = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(giversionname, nameof(giversionname)); + + using var message = CreateListByParentRequest(subscriptionId, location, giversionname, shapeFamily, zone); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + GiMinorVersionListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = GiMinorVersionListResult.DeserializeGiMinorVersionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List GiMinorVersion resources by GiVersion. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// GiVersion name. + /// If provided, filters the results to the set of database versions which are supported for the given shape family. + /// Filters the result for the given Azure Availability Zone. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByParent(string subscriptionId, AzureLocation location, string giversionname, ShapeFamily? shapeFamily = null, string zone = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(giversionname, nameof(giversionname)); + + using var message = CreateListByParentRequest(subscriptionId, location, giversionname, shapeFamily, zone); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + GiMinorVersionListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = GiMinorVersionListResult.DeserializeGiMinorVersionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, AzureLocation location, string giversionname, string giMinorVersionName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Oracle.Database/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/giVersions/", false); + uri.AppendPath(giversionname, true); + uri.AppendPath("/giMinorVersions/", false); + uri.AppendPath(giMinorVersionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, AzureLocation location, string giversionname, string giMinorVersionName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Oracle.Database/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/giVersions/", false); + uri.AppendPath(giversionname, true); + uri.AppendPath("/giMinorVersions/", false); + uri.AppendPath(giMinorVersionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a GiMinorVersion. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// GiVersion name. + /// The name of the GiMinorVersion. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, AzureLocation location, string giversionname, string giMinorVersionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(giversionname, nameof(giversionname)); + Argument.AssertNotNullOrEmpty(giMinorVersionName, nameof(giMinorVersionName)); + + using var message = CreateGetRequest(subscriptionId, location, giversionname, giMinorVersionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + GiMinorVersionData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = GiMinorVersionData.DeserializeGiMinorVersionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((GiMinorVersionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a GiMinorVersion. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// GiVersion name. + /// The name of the GiMinorVersion. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, AzureLocation location, string giversionname, string giMinorVersionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(giversionname, nameof(giversionname)); + Argument.AssertNotNullOrEmpty(giMinorVersionName, nameof(giMinorVersionName)); + + using var message = CreateGetRequest(subscriptionId, location, giversionname, giMinorVersionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + GiMinorVersionData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = GiMinorVersionData.DeserializeGiMinorVersionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((GiMinorVersionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByParentNextPageRequestUri(string nextLink, string subscriptionId, AzureLocation location, string giversionname, ShapeFamily? shapeFamily, string zone) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByParentNextPageRequest(string nextLink, string subscriptionId, AzureLocation location, string giversionname, ShapeFamily? shapeFamily, string zone) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List GiMinorVersion resources by GiVersion. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// GiVersion name. + /// If provided, filters the results to the set of database versions which are supported for the given shape family. + /// Filters the result for the given Azure Availability Zone. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByParentNextPageAsync(string nextLink, string subscriptionId, AzureLocation location, string giversionname, ShapeFamily? shapeFamily = null, string zone = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(giversionname, nameof(giversionname)); + + using var message = CreateListByParentNextPageRequest(nextLink, subscriptionId, location, giversionname, shapeFamily, zone); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + GiMinorVersionListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = GiMinorVersionListResult.DeserializeGiMinorVersionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List GiMinorVersion resources by GiVersion. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// GiVersion name. + /// If provided, filters the results to the set of database versions which are supported for the given shape family. + /// Filters the result for the given Azure Availability Zone. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByParentNextPage(string nextLink, string subscriptionId, AzureLocation location, string giversionname, ShapeFamily? shapeFamily = null, string zone = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(giversionname, nameof(giversionname)); + + using var message = CreateListByParentNextPageRequest(nextLink, subscriptionId, location, giversionname, shapeFamily, zone); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + GiMinorVersionListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = GiMinorVersionListResult.DeserializeGiMinorVersionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/GiVersionsRestOperations.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/GiVersionsRestOperations.cs new file mode 100644 index 000000000000..d1ad8b1391cc --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/GiVersionsRestOperations.cs @@ -0,0 +1,319 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + internal partial class GiVersionsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of GiVersionsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public GiVersionsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-03-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, AzureLocation location, string giversionname) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Oracle.Database/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/giVersions/", false); + uri.AppendPath(giversionname, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, AzureLocation location, string giversionname) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Oracle.Database/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/giVersions/", false); + uri.AppendPath(giversionname, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a GiVersion. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// GiVersion name. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, AzureLocation location, string giversionname, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(giversionname, nameof(giversionname)); + + using var message = CreateGetRequest(subscriptionId, location, giversionname); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + GiVersionData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = GiVersionData.DeserializeGiVersionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((GiVersionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a GiVersion. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// GiVersion name. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, AzureLocation location, string giversionname, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(giversionname, nameof(giversionname)); + + using var message = CreateGetRequest(subscriptionId, location, giversionname); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + GiVersionData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = GiVersionData.DeserializeGiVersionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((GiVersionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByLocationRequestUri(string subscriptionId, AzureLocation location, SystemShape? shape, string zone) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Oracle.Database/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/giVersions", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (shape != null) + { + uri.AppendQuery("shape", shape.Value.ToString(), true); + } + if (zone != null) + { + uri.AppendQuery("zone", zone, true); + } + return uri; + } + + internal HttpMessage CreateListByLocationRequest(string subscriptionId, AzureLocation location, SystemShape? shape, string zone) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Oracle.Database/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/giVersions", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (shape != null) + { + uri.AppendQuery("shape", shape.Value.ToString(), true); + } + if (zone != null) + { + uri.AppendQuery("zone", zone, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List GiVersion resources by SubscriptionLocationResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// If provided, filters the results for the given shape. + /// Filters the result for the given Azure Availability Zone. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListByLocationAsync(string subscriptionId, AzureLocation location, SystemShape? shape = null, string zone = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListByLocationRequest(subscriptionId, location, shape, zone); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + GiVersionListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = GiVersionListResult.DeserializeGiVersionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List GiVersion resources by SubscriptionLocationResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// If provided, filters the results for the given shape. + /// Filters the result for the given Azure Availability Zone. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response ListByLocation(string subscriptionId, AzureLocation location, SystemShape? shape = null, string zone = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListByLocationRequest(subscriptionId, location, shape, zone); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + GiVersionListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = GiVersionListResult.DeserializeGiVersionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByLocationNextPageRequestUri(string nextLink, string subscriptionId, AzureLocation location, SystemShape? shape, string zone) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByLocationNextPageRequest(string nextLink, string subscriptionId, AzureLocation location, SystemShape? shape, string zone) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List GiVersion resources by SubscriptionLocationResource. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// If provided, filters the results for the given shape. + /// Filters the result for the given Azure Availability Zone. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListByLocationNextPageAsync(string nextLink, string subscriptionId, AzureLocation location, SystemShape? shape = null, string zone = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListByLocationNextPageRequest(nextLink, subscriptionId, location, shape, zone); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + GiVersionListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = GiVersionListResult.DeserializeGiVersionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List GiVersion resources by SubscriptionLocationResource. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// If provided, filters the results for the given shape. + /// Filters the result for the given Azure Availability Zone. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ListByLocationNextPage(string nextLink, string subscriptionId, AzureLocation location, SystemShape? shape = null, string zone = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListByLocationNextPageRequest(nextLink, subscriptionId, location, shape, zone); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + GiVersionListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = GiVersionListResult.DeserializeGiVersionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/OracleSubscriptionsRestOperations.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/OracleSubscriptionsRestOperations.cs new file mode 100644 index 000000000000..c637c890d617 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/OracleSubscriptionsRestOperations.cs @@ -0,0 +1,787 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + internal partial class OracleSubscriptionsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of OracleSubscriptionsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public OracleSubscriptionsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-03-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListBySubscriptionRequestUri(string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Oracle.Database/oracleSubscriptions", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Oracle.Database/oracleSubscriptions", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List OracleSubscription resources by subscription ID. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionAsync(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + OracleSubscriptionListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = OracleSubscriptionListResult.DeserializeOracleSubscriptionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List OracleSubscription resources by subscription ID. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscription(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + OracleSubscriptionListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = OracleSubscriptionListResult.DeserializeOracleSubscriptionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, OracleSubscriptionData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Oracle.Database/oracleSubscriptions/default", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, OracleSubscriptionData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Oracle.Database/oracleSubscriptions/default", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create a OracleSubscription. + /// The ID of the target subscription. The value must be an UUID. + /// Resource create parameters. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, OracleSubscriptionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create a OracleSubscription. + /// The ID of the target subscription. The value must be an UUID. + /// Resource create parameters. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, OracleSubscriptionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Oracle.Database/oracleSubscriptions/default", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Oracle.Database/oracleSubscriptions/default", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a OracleSubscription. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateGetRequest(subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + OracleSubscriptionData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = OracleSubscriptionData.DeserializeOracleSubscriptionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((OracleSubscriptionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a OracleSubscription. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateGetRequest(subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + OracleSubscriptionData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = OracleSubscriptionData.DeserializeOracleSubscriptionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((OracleSubscriptionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, OracleSubscriptionPatch patch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Oracle.Database/oracleSubscriptions/default", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, OracleSubscriptionPatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Oracle.Database/oracleSubscriptions/default", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Update a OracleSubscription. + /// The ID of the target subscription. The value must be an UUID. + /// The resource properties to be updated. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, OracleSubscriptionPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Update a OracleSubscription. + /// The ID of the target subscription. The value must be an UUID. + /// The resource properties to be updated. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, OracleSubscriptionPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Oracle.Database/oracleSubscriptions/default", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Oracle.Database/oracleSubscriptions/default", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a OracleSubscription. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateDeleteRequest(subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete a OracleSubscription. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateDeleteRequest(subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListCloudAccountDetailsRequestUri(string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Oracle.Database/oracleSubscriptions/default/listCloudAccountDetails", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListCloudAccountDetailsRequest(string subscriptionId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Oracle.Database/oracleSubscriptions/default/listCloudAccountDetails", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List Cloud Account Details. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task ListCloudAccountDetailsAsync(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListCloudAccountDetailsRequest(subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Cloud Account Details. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response ListCloudAccountDetails(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListCloudAccountDetailsRequest(subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListSaasSubscriptionDetailsRequestUri(string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Oracle.Database/oracleSubscriptions/default/listSaasSubscriptionDetails", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListSaasSubscriptionDetailsRequest(string subscriptionId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Oracle.Database/oracleSubscriptions/default/listSaasSubscriptionDetails", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List Saas Subscription Details. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task ListSaasSubscriptionDetailsAsync(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListSaasSubscriptionDetailsRequest(subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Saas Subscription Details. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response ListSaasSubscriptionDetails(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListSaasSubscriptionDetailsRequest(subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListActivationLinksRequestUri(string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Oracle.Database/oracleSubscriptions/default/listActivationLinks", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListActivationLinksRequest(string subscriptionId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Oracle.Database/oracleSubscriptions/default/listActivationLinks", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List Activation Links. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task ListActivationLinksAsync(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListActivationLinksRequest(subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Activation Links. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response ListActivationLinks(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListActivationLinksRequest(subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateAddAzureSubscriptionsRequestUri(string subscriptionId, AzureSubscriptions body) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Oracle.Database/oracleSubscriptions/default/addAzureSubscriptions", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateAddAzureSubscriptionsRequest(string subscriptionId, AzureSubscriptions body) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Oracle.Database/oracleSubscriptions/default/addAzureSubscriptions", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(body, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Add Azure Subscriptions. + /// The ID of the target subscription. The value must be an UUID. + /// The content of the action request. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task AddAzureSubscriptionsAsync(string subscriptionId, AzureSubscriptions body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(body, nameof(body)); + + using var message = CreateAddAzureSubscriptionsRequest(subscriptionId, body); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Add Azure Subscriptions. + /// The ID of the target subscription. The value must be an UUID. + /// The content of the action request. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response AddAzureSubscriptions(string subscriptionId, AzureSubscriptions body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(body, nameof(body)); + + using var message = CreateAddAzureSubscriptionsRequest(subscriptionId, body); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListBySubscriptionNextPageRequestUri(string nextLink, string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, string subscriptionId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List OracleSubscription resources by subscription ID. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionNextPageAsync(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + OracleSubscriptionListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = OracleSubscriptionListResult.DeserializeOracleSubscriptionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List OracleSubscription resources by subscription ID. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscriptionNextPage(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + OracleSubscriptionListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = OracleSubscriptionListResult.DeserializeOracleSubscriptionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/SystemVersionsRestOperations.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/SystemVersionsRestOperations.cs new file mode 100644 index 000000000000..2edd20323817 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/SystemVersionsRestOperations.cs @@ -0,0 +1,295 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + internal partial class SystemVersionsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of SystemVersionsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public SystemVersionsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-03-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, AzureLocation location, string systemversionname) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Oracle.Database/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/systemVersions/", false); + uri.AppendPath(systemversionname, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, AzureLocation location, string systemversionname) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Oracle.Database/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/systemVersions/", false); + uri.AppendPath(systemversionname, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a SystemVersion. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// SystemVersion name. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, AzureLocation location, string systemversionname, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(systemversionname, nameof(systemversionname)); + + using var message = CreateGetRequest(subscriptionId, location, systemversionname); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SystemVersionData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SystemVersionData.DeserializeSystemVersionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((SystemVersionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a SystemVersion. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// SystemVersion name. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, AzureLocation location, string systemversionname, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(systemversionname, nameof(systemversionname)); + + using var message = CreateGetRequest(subscriptionId, location, systemversionname); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SystemVersionData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SystemVersionData.DeserializeSystemVersionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((SystemVersionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByLocationRequestUri(string subscriptionId, AzureLocation location) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Oracle.Database/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/systemVersions", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByLocationRequest(string subscriptionId, AzureLocation location) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Oracle.Database/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/systemVersions", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List SystemVersion resources by SubscriptionLocationResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListByLocationAsync(string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListByLocationRequest(subscriptionId, location); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SystemVersionListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SystemVersionListResult.DeserializeSystemVersionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List SystemVersion resources by SubscriptionLocationResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response ListByLocation(string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListByLocationRequest(subscriptionId, location); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SystemVersionListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SystemVersionListResult.DeserializeSystemVersionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByLocationNextPageRequestUri(string nextLink, string subscriptionId, AzureLocation location) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByLocationNextPageRequest(string nextLink, string subscriptionId, AzureLocation location) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List SystemVersion resources by SubscriptionLocationResource. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListByLocationNextPageAsync(string nextLink, string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListByLocationNextPageRequest(nextLink, subscriptionId, location); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SystemVersionListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SystemVersionListResult.DeserializeSystemVersionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List SystemVersion resources by SubscriptionLocationResource. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ListByLocationNextPage(string nextLink, string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListByLocationNextPageRequest(nextLink, subscriptionId, location); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SystemVersionListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SystemVersionListResult.DeserializeSystemVersionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/VirtualNetworkAddressesRestOperations.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/VirtualNetworkAddressesRestOperations.cs new file mode 100644 index 000000000000..a31bf43aeec2 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/VirtualNetworkAddressesRestOperations.cs @@ -0,0 +1,513 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + internal partial class VirtualNetworkAddressesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of VirtualNetworkAddressesRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public VirtualNetworkAddressesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-03-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string cloudvmclustername, string virtualnetworkaddressname, VirtualNetworkAddressData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/cloudVmClusters/", false); + uri.AppendPath(cloudvmclustername, true); + uri.AppendPath("/virtualNetworkAddresses/", false); + uri.AppendPath(virtualnetworkaddressname, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string cloudvmclustername, string virtualnetworkaddressname, VirtualNetworkAddressData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/cloudVmClusters/", false); + uri.AppendPath(cloudvmclustername, true); + uri.AppendPath("/virtualNetworkAddresses/", false); + uri.AppendPath(virtualnetworkaddressname, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create a VirtualNetworkAddress. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name. + /// Virtual IP address hostname. + /// Resource create parameters. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string cloudvmclustername, string virtualnetworkaddressname, VirtualNetworkAddressData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(cloudvmclustername, nameof(cloudvmclustername)); + Argument.AssertNotNullOrEmpty(virtualnetworkaddressname, nameof(virtualnetworkaddressname)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, cloudvmclustername, virtualnetworkaddressname, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create a VirtualNetworkAddress. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name. + /// Virtual IP address hostname. + /// Resource create parameters. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string cloudvmclustername, string virtualnetworkaddressname, VirtualNetworkAddressData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(cloudvmclustername, nameof(cloudvmclustername)); + Argument.AssertNotNullOrEmpty(virtualnetworkaddressname, nameof(virtualnetworkaddressname)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, cloudvmclustername, virtualnetworkaddressname, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string cloudvmclustername, string virtualnetworkaddressname) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/cloudVmClusters/", false); + uri.AppendPath(cloudvmclustername, true); + uri.AppendPath("/virtualNetworkAddresses/", false); + uri.AppendPath(virtualnetworkaddressname, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string cloudvmclustername, string virtualnetworkaddressname) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/cloudVmClusters/", false); + uri.AppendPath(cloudvmclustername, true); + uri.AppendPath("/virtualNetworkAddresses/", false); + uri.AppendPath(virtualnetworkaddressname, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a VirtualNetworkAddress. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name. + /// Virtual IP address hostname. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string cloudvmclustername, string virtualnetworkaddressname, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(cloudvmclustername, nameof(cloudvmclustername)); + Argument.AssertNotNullOrEmpty(virtualnetworkaddressname, nameof(virtualnetworkaddressname)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, cloudvmclustername, virtualnetworkaddressname); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + VirtualNetworkAddressData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = VirtualNetworkAddressData.DeserializeVirtualNetworkAddressData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((VirtualNetworkAddressData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a VirtualNetworkAddress. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name. + /// Virtual IP address hostname. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string cloudvmclustername, string virtualnetworkaddressname, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(cloudvmclustername, nameof(cloudvmclustername)); + Argument.AssertNotNullOrEmpty(virtualnetworkaddressname, nameof(virtualnetworkaddressname)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, cloudvmclustername, virtualnetworkaddressname); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + VirtualNetworkAddressData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = VirtualNetworkAddressData.DeserializeVirtualNetworkAddressData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((VirtualNetworkAddressData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string cloudvmclustername, string virtualnetworkaddressname) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/cloudVmClusters/", false); + uri.AppendPath(cloudvmclustername, true); + uri.AppendPath("/virtualNetworkAddresses/", false); + uri.AppendPath(virtualnetworkaddressname, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string cloudvmclustername, string virtualnetworkaddressname) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/cloudVmClusters/", false); + uri.AppendPath(cloudvmclustername, true); + uri.AppendPath("/virtualNetworkAddresses/", false); + uri.AppendPath(virtualnetworkaddressname, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a VirtualNetworkAddress. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name. + /// Virtual IP address hostname. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string cloudvmclustername, string virtualnetworkaddressname, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(cloudvmclustername, nameof(cloudvmclustername)); + Argument.AssertNotNullOrEmpty(virtualnetworkaddressname, nameof(virtualnetworkaddressname)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, cloudvmclustername, virtualnetworkaddressname); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete a VirtualNetworkAddress. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name. + /// Virtual IP address hostname. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string cloudvmclustername, string virtualnetworkaddressname, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(cloudvmclustername, nameof(cloudvmclustername)); + Argument.AssertNotNullOrEmpty(virtualnetworkaddressname, nameof(virtualnetworkaddressname)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, cloudvmclustername, virtualnetworkaddressname); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByParentRequestUri(string subscriptionId, string resourceGroupName, string cloudvmclustername) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/cloudVmClusters/", false); + uri.AppendPath(cloudvmclustername, true); + uri.AppendPath("/virtualNetworkAddresses", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByParentRequest(string subscriptionId, string resourceGroupName, string cloudvmclustername) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Oracle.Database/cloudVmClusters/", false); + uri.AppendPath(cloudvmclustername, true); + uri.AppendPath("/virtualNetworkAddresses", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List VirtualNetworkAddress resources by CloudVmCluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByParentAsync(string subscriptionId, string resourceGroupName, string cloudvmclustername, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(cloudvmclustername, nameof(cloudvmclustername)); + + using var message = CreateListByParentRequest(subscriptionId, resourceGroupName, cloudvmclustername); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + VirtualNetworkAddressListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = VirtualNetworkAddressListResult.DeserializeVirtualNetworkAddressListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List VirtualNetworkAddress resources by CloudVmCluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByParent(string subscriptionId, string resourceGroupName, string cloudvmclustername, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(cloudvmclustername, nameof(cloudvmclustername)); + + using var message = CreateListByParentRequest(subscriptionId, resourceGroupName, cloudvmclustername); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + VirtualNetworkAddressListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = VirtualNetworkAddressListResult.DeserializeVirtualNetworkAddressListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByParentNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string cloudvmclustername) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByParentNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string cloudvmclustername) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List VirtualNetworkAddress resources by CloudVmCluster. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByParentNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string cloudvmclustername, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(cloudvmclustername, nameof(cloudvmclustername)); + + using var message = CreateListByParentNextPageRequest(nextLink, subscriptionId, resourceGroupName, cloudvmclustername); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + VirtualNetworkAddressListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = VirtualNetworkAddressListResult.DeserializeVirtualNetworkAddressListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List VirtualNetworkAddress resources by CloudVmCluster. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByParentNextPage(string nextLink, string subscriptionId, string resourceGroupName, string cloudvmclustername, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(cloudvmclustername, nameof(cloudvmclustername)); + + using var message = CreateListByParentNextPageRequest(nextLink, subscriptionId, resourceGroupName, cloudvmclustername); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + VirtualNetworkAddressListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = VirtualNetworkAddressListResult.DeserializeVirtualNetworkAddressListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/SystemVersionCollection.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/SystemVersionCollection.cs new file mode 100644 index 000000000000..cec05e331a7a --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/SystemVersionCollection.cs @@ -0,0 +1,399 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.OracleDatabase +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetSystemVersions method from an instance of . + /// + public partial class SystemVersionCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _systemVersionClientDiagnostics; + private readonly SystemVersionsRestOperations _systemVersionRestClient; + private readonly AzureLocation _location; + + /// Initializes a new instance of the class for mocking. + protected SystemVersionCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + /// The name of the Azure region. + internal SystemVersionCollection(ArmClient client, ResourceIdentifier id, AzureLocation location) : base(client, id) + { + _location = location; + _systemVersionClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.OracleDatabase", SystemVersionResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(SystemVersionResource.ResourceType, out string systemVersionApiVersion); + _systemVersionRestClient = new SystemVersionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, systemVersionApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != SubscriptionResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, SubscriptionResource.ResourceType), nameof(id)); + } + + /// + /// Get a SystemVersion + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/systemVersions/{systemversionname} + /// + /// + /// Operation Id + /// SystemVersion_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// SystemVersion name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string systemversionname, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(systemversionname, nameof(systemversionname)); + + using var scope = _systemVersionClientDiagnostics.CreateScope("SystemVersionCollection.Get"); + scope.Start(); + try + { + var response = await _systemVersionRestClient.GetAsync(Id.SubscriptionId, new AzureLocation(_location), systemversionname, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SystemVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a SystemVersion + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/systemVersions/{systemversionname} + /// + /// + /// Operation Id + /// SystemVersion_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// SystemVersion name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string systemversionname, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(systemversionname, nameof(systemversionname)); + + using var scope = _systemVersionClientDiagnostics.CreateScope("SystemVersionCollection.Get"); + scope.Start(); + try + { + var response = _systemVersionRestClient.Get(Id.SubscriptionId, new AzureLocation(_location), systemversionname, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SystemVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List SystemVersion resources by SubscriptionLocationResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/systemVersions + /// + /// + /// Operation Id + /// SystemVersion_ListByLocation + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _systemVersionRestClient.CreateListByLocationRequest(Id.SubscriptionId, new AzureLocation(_location)); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _systemVersionRestClient.CreateListByLocationNextPageRequest(nextLink, Id.SubscriptionId, new AzureLocation(_location)); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new SystemVersionResource(Client, SystemVersionData.DeserializeSystemVersionData(e)), _systemVersionClientDiagnostics, Pipeline, "SystemVersionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List SystemVersion resources by SubscriptionLocationResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/systemVersions + /// + /// + /// Operation Id + /// SystemVersion_ListByLocation + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _systemVersionRestClient.CreateListByLocationRequest(Id.SubscriptionId, new AzureLocation(_location)); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _systemVersionRestClient.CreateListByLocationNextPageRequest(nextLink, Id.SubscriptionId, new AzureLocation(_location)); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new SystemVersionResource(Client, SystemVersionData.DeserializeSystemVersionData(e)), _systemVersionClientDiagnostics, Pipeline, "SystemVersionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/systemVersions/{systemversionname} + /// + /// + /// Operation Id + /// SystemVersion_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// SystemVersion name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string systemversionname, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(systemversionname, nameof(systemversionname)); + + using var scope = _systemVersionClientDiagnostics.CreateScope("SystemVersionCollection.Exists"); + scope.Start(); + try + { + var response = await _systemVersionRestClient.GetAsync(Id.SubscriptionId, new AzureLocation(_location), systemversionname, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/systemVersions/{systemversionname} + /// + /// + /// Operation Id + /// SystemVersion_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// SystemVersion name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string systemversionname, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(systemversionname, nameof(systemversionname)); + + using var scope = _systemVersionClientDiagnostics.CreateScope("SystemVersionCollection.Exists"); + scope.Start(); + try + { + var response = _systemVersionRestClient.Get(Id.SubscriptionId, new AzureLocation(_location), systemversionname, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/systemVersions/{systemversionname} + /// + /// + /// Operation Id + /// SystemVersion_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// SystemVersion name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string systemversionname, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(systemversionname, nameof(systemversionname)); + + using var scope = _systemVersionClientDiagnostics.CreateScope("SystemVersionCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _systemVersionRestClient.GetAsync(Id.SubscriptionId, new AzureLocation(_location), systemversionname, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new SystemVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/systemVersions/{systemversionname} + /// + /// + /// Operation Id + /// SystemVersion_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// SystemVersion name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string systemversionname, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(systemversionname, nameof(systemversionname)); + + using var scope = _systemVersionClientDiagnostics.CreateScope("SystemVersionCollection.GetIfExists"); + scope.Start(); + try + { + var response = _systemVersionRestClient.Get(Id.SubscriptionId, new AzureLocation(_location), systemversionname, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new SystemVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/SystemVersionData.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/SystemVersionData.Serialization.cs new file mode 100644 index 000000000000..a383b4755ceb --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/SystemVersionData.Serialization.cs @@ -0,0 +1,155 @@ +// 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.Models; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + public partial class SystemVersionData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SystemVersionData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + SystemVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SystemVersionData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSystemVersionData(document.RootElement, options); + } + + internal static SystemVersionData DeserializeSystemVersionData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + SystemVersionProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = SystemVersionProperties.DeserializeSystemVersionProperties(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SystemVersionData( + id, + name, + type, + systemData, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SystemVersionData)} does not support writing '{options.Format}' format."); + } + } + + SystemVersionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSystemVersionData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SystemVersionData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/SystemVersionData.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/SystemVersionData.cs new file mode 100644 index 000000000000..aeb14f7043d2 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/SystemVersionData.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + /// + /// A class representing the SystemVersion data model. + /// SystemVersion resource Definition + /// + public partial class SystemVersionData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal SystemVersionData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal SystemVersionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, SystemVersionProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + internal SystemVersionProperties Properties { get; } + /// A valid Oracle System Version. + public string SystemVersion + { + get => Properties?.SystemVersion; + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/SystemVersionResource.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/SystemVersionResource.Serialization.cs new file mode 100644 index 000000000000..b92fc857d12f --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/SystemVersionResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.OracleDatabase +{ + public partial class SystemVersionResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + SystemVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + SystemVersionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/SystemVersionResource.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/SystemVersionResource.cs new file mode 100644 index 000000000000..62c501f48410 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/SystemVersionResource.cs @@ -0,0 +1,171 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.OracleDatabase +{ + /// + /// A Class representing a SystemVersion along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetSystemVersionResource method. + /// Otherwise you can get one from its parent resource using the GetSystemVersion method. + /// + public partial class SystemVersionResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The location. + /// The systemversionname. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, AzureLocation location, string systemversionname) + { + var resourceId = $"/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/systemVersions/{systemversionname}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _systemVersionClientDiagnostics; + private readonly SystemVersionsRestOperations _systemVersionRestClient; + private readonly SystemVersionData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Oracle.Database/locations/systemVersions"; + + /// Initializes a new instance of the class for mocking. + protected SystemVersionResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal SystemVersionResource(ArmClient client, SystemVersionData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal SystemVersionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _systemVersionClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.OracleDatabase", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string systemVersionApiVersion); + _systemVersionRestClient = new SystemVersionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, systemVersionApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual SystemVersionData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get a SystemVersion + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/systemVersions/{systemversionname} + /// + /// + /// Operation Id + /// SystemVersion_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _systemVersionClientDiagnostics.CreateScope("SystemVersionResource.Get"); + scope.Start(); + try + { + var response = await _systemVersionRestClient.GetAsync(Id.SubscriptionId, new AzureLocation(Id.Parent.Name), Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SystemVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a SystemVersion + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/systemVersions/{systemversionname} + /// + /// + /// Operation Id + /// SystemVersion_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _systemVersionClientDiagnostics.CreateScope("SystemVersionResource.Get"); + scope.Start(); + try + { + var response = _systemVersionRestClient.Get(Id.SubscriptionId, new AzureLocation(Id.Parent.Name), Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SystemVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/VirtualNetworkAddressCollection.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/VirtualNetworkAddressCollection.cs new file mode 100644 index 000000000000..45cfd01cc58b --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/VirtualNetworkAddressCollection.cs @@ -0,0 +1,493 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.OracleDatabase +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetVirtualNetworkAddresses method from an instance of . + /// + public partial class VirtualNetworkAddressCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _virtualNetworkAddressClientDiagnostics; + private readonly VirtualNetworkAddressesRestOperations _virtualNetworkAddressRestClient; + + /// Initializes a new instance of the class for mocking. + protected VirtualNetworkAddressCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal VirtualNetworkAddressCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _virtualNetworkAddressClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.OracleDatabase", VirtualNetworkAddressResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(VirtualNetworkAddressResource.ResourceType, out string virtualNetworkAddressApiVersion); + _virtualNetworkAddressRestClient = new VirtualNetworkAddressesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, virtualNetworkAddressApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != CloudVmClusterResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, CloudVmClusterResource.ResourceType), nameof(id)); + } + + /// + /// Create a VirtualNetworkAddress + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/virtualNetworkAddresses/{virtualnetworkaddressname} + /// + /// + /// Operation Id + /// VirtualNetworkAddress_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// 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. + /// Virtual IP address hostname. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string virtualnetworkaddressname, VirtualNetworkAddressData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(virtualnetworkaddressname, nameof(virtualnetworkaddressname)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _virtualNetworkAddressClientDiagnostics.CreateScope("VirtualNetworkAddressCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _virtualNetworkAddressRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, virtualnetworkaddressname, data, cancellationToken).ConfigureAwait(false); + var operation = new OracleDatabaseArmOperation(new VirtualNetworkAddressOperationSource(Client), _virtualNetworkAddressClientDiagnostics, Pipeline, _virtualNetworkAddressRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, virtualnetworkaddressname, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a VirtualNetworkAddress + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/virtualNetworkAddresses/{virtualnetworkaddressname} + /// + /// + /// Operation Id + /// VirtualNetworkAddress_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// 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. + /// Virtual IP address hostname. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string virtualnetworkaddressname, VirtualNetworkAddressData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(virtualnetworkaddressname, nameof(virtualnetworkaddressname)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _virtualNetworkAddressClientDiagnostics.CreateScope("VirtualNetworkAddressCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _virtualNetworkAddressRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, virtualnetworkaddressname, data, cancellationToken); + var operation = new OracleDatabaseArmOperation(new VirtualNetworkAddressOperationSource(Client), _virtualNetworkAddressClientDiagnostics, Pipeline, _virtualNetworkAddressRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, virtualnetworkaddressname, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a VirtualNetworkAddress + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/virtualNetworkAddresses/{virtualnetworkaddressname} + /// + /// + /// Operation Id + /// VirtualNetworkAddress_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Virtual IP address hostname. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string virtualnetworkaddressname, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(virtualnetworkaddressname, nameof(virtualnetworkaddressname)); + + using var scope = _virtualNetworkAddressClientDiagnostics.CreateScope("VirtualNetworkAddressCollection.Get"); + scope.Start(); + try + { + var response = await _virtualNetworkAddressRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, virtualnetworkaddressname, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new VirtualNetworkAddressResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a VirtualNetworkAddress + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/virtualNetworkAddresses/{virtualnetworkaddressname} + /// + /// + /// Operation Id + /// VirtualNetworkAddress_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Virtual IP address hostname. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string virtualnetworkaddressname, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(virtualnetworkaddressname, nameof(virtualnetworkaddressname)); + + using var scope = _virtualNetworkAddressClientDiagnostics.CreateScope("VirtualNetworkAddressCollection.Get"); + scope.Start(); + try + { + var response = _virtualNetworkAddressRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, virtualnetworkaddressname, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new VirtualNetworkAddressResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List VirtualNetworkAddress resources by CloudVmCluster + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/virtualNetworkAddresses + /// + /// + /// Operation Id + /// VirtualNetworkAddress_ListByParent + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _virtualNetworkAddressRestClient.CreateListByParentRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _virtualNetworkAddressRestClient.CreateListByParentNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new VirtualNetworkAddressResource(Client, VirtualNetworkAddressData.DeserializeVirtualNetworkAddressData(e)), _virtualNetworkAddressClientDiagnostics, Pipeline, "VirtualNetworkAddressCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List VirtualNetworkAddress resources by CloudVmCluster + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/virtualNetworkAddresses + /// + /// + /// Operation Id + /// VirtualNetworkAddress_ListByParent + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _virtualNetworkAddressRestClient.CreateListByParentRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _virtualNetworkAddressRestClient.CreateListByParentNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new VirtualNetworkAddressResource(Client, VirtualNetworkAddressData.DeserializeVirtualNetworkAddressData(e)), _virtualNetworkAddressClientDiagnostics, Pipeline, "VirtualNetworkAddressCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/virtualNetworkAddresses/{virtualnetworkaddressname} + /// + /// + /// Operation Id + /// VirtualNetworkAddress_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Virtual IP address hostname. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string virtualnetworkaddressname, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(virtualnetworkaddressname, nameof(virtualnetworkaddressname)); + + using var scope = _virtualNetworkAddressClientDiagnostics.CreateScope("VirtualNetworkAddressCollection.Exists"); + scope.Start(); + try + { + var response = await _virtualNetworkAddressRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, virtualnetworkaddressname, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/virtualNetworkAddresses/{virtualnetworkaddressname} + /// + /// + /// Operation Id + /// VirtualNetworkAddress_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Virtual IP address hostname. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string virtualnetworkaddressname, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(virtualnetworkaddressname, nameof(virtualnetworkaddressname)); + + using var scope = _virtualNetworkAddressClientDiagnostics.CreateScope("VirtualNetworkAddressCollection.Exists"); + scope.Start(); + try + { + var response = _virtualNetworkAddressRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, virtualnetworkaddressname, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/virtualNetworkAddresses/{virtualnetworkaddressname} + /// + /// + /// Operation Id + /// VirtualNetworkAddress_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Virtual IP address hostname. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string virtualnetworkaddressname, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(virtualnetworkaddressname, nameof(virtualnetworkaddressname)); + + using var scope = _virtualNetworkAddressClientDiagnostics.CreateScope("VirtualNetworkAddressCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _virtualNetworkAddressRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, virtualnetworkaddressname, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new VirtualNetworkAddressResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/virtualNetworkAddresses/{virtualnetworkaddressname} + /// + /// + /// Operation Id + /// VirtualNetworkAddress_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Virtual IP address hostname. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string virtualnetworkaddressname, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(virtualnetworkaddressname, nameof(virtualnetworkaddressname)); + + using var scope = _virtualNetworkAddressClientDiagnostics.CreateScope("VirtualNetworkAddressCollection.GetIfExists"); + scope.Start(); + try + { + var response = _virtualNetworkAddressRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, virtualnetworkaddressname, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new VirtualNetworkAddressResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/VirtualNetworkAddressData.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/VirtualNetworkAddressData.Serialization.cs new file mode 100644 index 000000000000..5a2f37ca80ca --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/VirtualNetworkAddressData.Serialization.cs @@ -0,0 +1,155 @@ +// 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.Models; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + public partial class VirtualNetworkAddressData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(VirtualNetworkAddressData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + VirtualNetworkAddressData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(VirtualNetworkAddressData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeVirtualNetworkAddressData(document.RootElement, options); + } + + internal static VirtualNetworkAddressData DeserializeVirtualNetworkAddressData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + VirtualNetworkAddressProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = VirtualNetworkAddressProperties.DeserializeVirtualNetworkAddressProperties(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new VirtualNetworkAddressData( + id, + name, + type, + systemData, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(VirtualNetworkAddressData)} does not support writing '{options.Format}' format."); + } + } + + VirtualNetworkAddressData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeVirtualNetworkAddressData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(VirtualNetworkAddressData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/VirtualNetworkAddressData.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/VirtualNetworkAddressData.cs new file mode 100644 index 000000000000..519b00ad62ca --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/VirtualNetworkAddressData.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + /// + /// A class representing the VirtualNetworkAddress data model. + /// Virtual IP resource belonging to a vm cluster resource. + /// + public partial class VirtualNetworkAddressData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public VirtualNetworkAddressData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal VirtualNetworkAddressData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, VirtualNetworkAddressProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public VirtualNetworkAddressProperties Properties { get; set; } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/VirtualNetworkAddressResource.Serialization.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/VirtualNetworkAddressResource.Serialization.cs new file mode 100644 index 000000000000..fee7a89ea94d --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/VirtualNetworkAddressResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.OracleDatabase +{ + public partial class VirtualNetworkAddressResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + VirtualNetworkAddressData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + VirtualNetworkAddressData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/VirtualNetworkAddressResource.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/VirtualNetworkAddressResource.cs new file mode 100644 index 000000000000..9a49dc568427 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Generated/VirtualNetworkAddressResource.cs @@ -0,0 +1,347 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.OracleDatabase +{ + /// + /// A Class representing a VirtualNetworkAddress along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetVirtualNetworkAddressResource method. + /// Otherwise you can get one from its parent resource using the GetVirtualNetworkAddress method. + /// + public partial class VirtualNetworkAddressResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The cloudvmclustername. + /// The virtualnetworkaddressname. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string cloudvmclustername, string virtualnetworkaddressname) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/virtualNetworkAddresses/{virtualnetworkaddressname}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _virtualNetworkAddressClientDiagnostics; + private readonly VirtualNetworkAddressesRestOperations _virtualNetworkAddressRestClient; + private readonly VirtualNetworkAddressData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Oracle.Database/cloudVmClusters/virtualNetworkAddresses"; + + /// Initializes a new instance of the class for mocking. + protected VirtualNetworkAddressResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal VirtualNetworkAddressResource(ArmClient client, VirtualNetworkAddressData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal VirtualNetworkAddressResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _virtualNetworkAddressClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.OracleDatabase", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string virtualNetworkAddressApiVersion); + _virtualNetworkAddressRestClient = new VirtualNetworkAddressesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, virtualNetworkAddressApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual VirtualNetworkAddressData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get a VirtualNetworkAddress + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/virtualNetworkAddresses/{virtualnetworkaddressname} + /// + /// + /// Operation Id + /// VirtualNetworkAddress_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _virtualNetworkAddressClientDiagnostics.CreateScope("VirtualNetworkAddressResource.Get"); + scope.Start(); + try + { + var response = await _virtualNetworkAddressRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new VirtualNetworkAddressResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a VirtualNetworkAddress + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/virtualNetworkAddresses/{virtualnetworkaddressname} + /// + /// + /// Operation Id + /// VirtualNetworkAddress_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _virtualNetworkAddressClientDiagnostics.CreateScope("VirtualNetworkAddressResource.Get"); + scope.Start(); + try + { + var response = _virtualNetworkAddressRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new VirtualNetworkAddressResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a VirtualNetworkAddress + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/virtualNetworkAddresses/{virtualnetworkaddressname} + /// + /// + /// Operation Id + /// VirtualNetworkAddress_Delete + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _virtualNetworkAddressClientDiagnostics.CreateScope("VirtualNetworkAddressResource.Delete"); + scope.Start(); + try + { + var response = await _virtualNetworkAddressRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new OracleDatabaseArmOperation(_virtualNetworkAddressClientDiagnostics, Pipeline, _virtualNetworkAddressRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a VirtualNetworkAddress + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/virtualNetworkAddresses/{virtualnetworkaddressname} + /// + /// + /// Operation Id + /// VirtualNetworkAddress_Delete + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _virtualNetworkAddressClientDiagnostics.CreateScope("VirtualNetworkAddressResource.Delete"); + scope.Start(); + try + { + var response = _virtualNetworkAddressRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new OracleDatabaseArmOperation(_virtualNetworkAddressClientDiagnostics, Pipeline, _virtualNetworkAddressRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a VirtualNetworkAddress + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/virtualNetworkAddresses/{virtualnetworkaddressname} + /// + /// + /// Operation Id + /// VirtualNetworkAddress_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Resource create parameters. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, VirtualNetworkAddressData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _virtualNetworkAddressClientDiagnostics.CreateScope("VirtualNetworkAddressResource.Update"); + scope.Start(); + try + { + var response = await _virtualNetworkAddressRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new OracleDatabaseArmOperation(new VirtualNetworkAddressOperationSource(Client), _virtualNetworkAddressClientDiagnostics, Pipeline, _virtualNetworkAddressRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a VirtualNetworkAddress + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/virtualNetworkAddresses/{virtualnetworkaddressname} + /// + /// + /// Operation Id + /// VirtualNetworkAddress_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Resource create parameters. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, VirtualNetworkAddressData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _virtualNetworkAddressClientDiagnostics.CreateScope("VirtualNetworkAddressResource.Update"); + scope.Start(); + try + { + var response = _virtualNetworkAddressRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new OracleDatabaseArmOperation(new VirtualNetworkAddressOperationSource(Client), _virtualNetworkAddressClientDiagnostics, Pipeline, _virtualNetworkAddressRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Properties/AssemblyInfo.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..8175b672ae2b --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/src/Properties/AssemblyInfo.cs @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo("Azure.ResourceManager.OracleDatabase.Tests, PublicKey = 0024000004800000940000000602000000240000525341310004000001000100d15ddcb29688295338af4b7686603fe614abd555e09efba8fb88ee09e1f7b1ccaeed2e8f823fa9eef3fdd60217fc012ea67d2479751a0b8c087a4185541b851bd8b16f8d91b840e51b1cb0ba6fe647997e57429265e85ef62d565db50a69ae1647d54d7bd855e4db3d8a91510e5bcbd0edfbbecaa20a7bd9ae74593daa7b11b4")] + +// Replace Microsoft.Test with the correct resource provider namepace for your service and uncomment. +// See https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/azure-services-resource-providers +// for the list of possible values. +[assembly: Azure.Core.AzureResourceProviderNamespace("OracleDatabase")] diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/tests/Azure.ResourceManager.OracleDatabase.Tests.csproj b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/tests/Azure.ResourceManager.OracleDatabase.Tests.csproj new file mode 100644 index 000000000000..84daabbb8df1 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/tests/Azure.ResourceManager.OracleDatabase.Tests.csproj @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/tests/OracleDatabaseManagementTestBase.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/tests/OracleDatabaseManagementTestBase.cs new file mode 100644 index 000000000000..061bfbffc4be --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/tests/OracleDatabaseManagementTestBase.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure; +using Azure.Core; +using Azure.Core.TestFramework; +using Azure.ResourceManager; +using Azure.ResourceManager.Resources; +using Azure.ResourceManager.TestFramework; +using NUnit.Framework; +using System.Threading.Tasks; + +namespace Azure.ResourceManager.OracleDatabase.Tests +{ + public class OracleDatabaseManagementTestBase : ManagementRecordedTestBase + { + protected ArmClient Client { get; private set; } + protected SubscriptionResource DefaultSubscription { get; private set; } + + protected OracleDatabaseManagementTestBase(bool isAsync, RecordedTestMode mode) + : base(isAsync, mode) + { + } + + protected OracleDatabaseManagementTestBase(bool isAsync) + : base(isAsync) + { + } + + [SetUp] + public async Task CreateCommonClient() + { + Client = GetArmClient(); + DefaultSubscription = await Client.GetDefaultSubscriptionAsync().ConfigureAwait(false); + } + + protected async Task CreateResourceGroup(SubscriptionResource subscription, string rgNamePrefix, AzureLocation location) + { + string rgName = Recording.GenerateAssetName(rgNamePrefix); + ResourceGroupData input = new ResourceGroupData(location); + var lro = await subscription.GetResourceGroups().CreateOrUpdateAsync(WaitUntil.Completed, rgName, input); + return lro.Value; + } + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/tests/OracleDatabaseManagementTestEnvironment.cs b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/tests/OracleDatabaseManagementTestEnvironment.cs new file mode 100644 index 000000000000..b2cb5d932b65 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/tests/OracleDatabaseManagementTestEnvironment.cs @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core.TestFramework; + +namespace Azure.ResourceManager.OracleDatabase.Tests +{ + public class OracleDatabaseManagementTestEnvironment : TestEnvironment + { + } +} diff --git a/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/tsp-location.yaml b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/tsp-location.yaml new file mode 100644 index 000000000000..b97e75257613 --- /dev/null +++ b/sdk/oracledatabase/Azure.ResourceManager.OracleDatabase/tsp-location.yaml @@ -0,0 +1,5 @@ +directory: specification/oracle/Oracle.Database.Management +commit: 1a8dcbc31c561409f253e5f7a924ff577b583da7 +repo: Azure/azure-rest-api-specs +additionalDirectories: +- specification/oracle/Oracle.Database.Management/models diff --git a/sdk/oracledatabase/ci.mgmt.yml b/sdk/oracledatabase/ci.mgmt.yml new file mode 100644 index 000000000000..17fa8bd165a0 --- /dev/null +++ b/sdk/oracledatabase/ci.mgmt.yml @@ -0,0 +1,26 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. + +trigger: none + +pr: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/oracledatabase /ci.mgmt.yml + - sdk/oracledatabase /Azure.ResourceManager.OracleDatabase / + + +extends: + template: /eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: oracledatabase + ArtifactName: packages + LimitForPullRequest: true + Artifacts: + - name: Azure.ResourceManager.OracleDatabase + safeName: AzureResourceManagerOracleDatabase diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/Azure.ResourceManager.RecoveryServicesDataReplication.sln b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/Azure.ResourceManager.RecoveryServicesDataReplication.sln new file mode 100644 index 000000000000..fa8a7db58bc9 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/Azure.ResourceManager.RecoveryServicesDataReplication.sln @@ -0,0 +1,56 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29709.97 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.ResourceManager.RecoveryServicesDataReplication.Samples", "samples\Azure.ResourceManager.RecoveryServicesDataReplication.Samples.csproj", "{7A2DFF15-5746-49F4-BD0F-C6C35337088A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.ResourceManager.RecoveryServicesDataReplication", "src\Azure.ResourceManager.RecoveryServicesDataReplication.csproj", "{28FF4005-4467-4E36-92E7-DEA27DEB1519}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.ResourceManager.RecoveryServicesDataReplication.Tests", "tests\Azure.ResourceManager.RecoveryServicesDataReplication.Tests.csproj", "{1F1CD1D4-9932-4B73-99D8-C252A67D4B46}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.Build.0 = Release|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.Build.0 = Release|Any CPU + {7A2DFF15-5746-49F4-BD0F-C6C35337088A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7A2DFF15-5746-49F4-BD0F-C6C35337088A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7A2DFF15-5746-49F4-BD0F-C6C35337088A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7A2DFF15-5746-49F4-BD0F-C6C35337088A}.Release|Any CPU.Build.0 = Release|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Release|Any CPU.Build.0 = Release|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Release|Any CPU.Build.0 = Release|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Release|Any CPU.Build.0 = Release|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Debug|Any CPU.Build.0 = Debug|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Release|Any CPU.ActiveCfg = Release|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Release|Any CPU.Build.0 = Release|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {A97F4B90-2591-4689-B1F8-5F21FE6D6CAE} + EndGlobalSection +EndGlobal diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/CHANGELOG.md b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/CHANGELOG.md new file mode 100644 index 000000000000..8b33f0fedccc --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/CHANGELOG.md @@ -0,0 +1,11 @@ +# Release History + +## 1.0.0-beta.1 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes \ No newline at end of file diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/Directory.Build.props b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/Directory.Build.props new file mode 100644 index 000000000000..63bd836ad44b --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/Directory.Build.props @@ -0,0 +1,6 @@ + + + + diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/README.md b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/README.md new file mode 100644 index 000000000000..8531bbf7e62c --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/README.md @@ -0,0 +1,80 @@ +# Microsoft Azure RecoveryServicesDataReplication management client library for .NET + +**[Describe the service briefly first.]** + +This library follows the [new Azure SDK guidelines](https://azure.github.io/azure-sdk/general_introduction.html), and provides many core capabilities: + + - Support MSAL.NET, Azure.Identity is out of box for supporting MSAL.NET. + - Support [OpenTelemetry](https://opentelemetry.io/) for distributed tracing. + - HTTP pipeline with custom policies. + - Better error-handling. + - Support uniform telemetry across all languages. + +## Getting started + +### Install the package + +Install the Microsoft Azure RecoveryServicesDataReplication management library for .NET with [NuGet](https://www.nuget.org/): + +```dotnetcli +dotnet add package Azure.ResourceManager.RecoveryServicesDataReplication --prerelease +``` + +### Prerequisites + +* You must have an [Microsoft Azure subscription](https://azure.microsoft.com/free/dotnet/). + +### Authenticate the Client + +To create an authenticated client and start interacting with Microsoft Azure resources, see the [quickstart guide here](https://github.com/Azure/azure-sdk-for-net/blob/main/doc/dev/mgmt_quickstart.md). + +## Key concepts + +Key concepts of the Microsoft Azure SDK for .NET can be found [here](https://azure.github.io/azure-sdk/dotnet_introduction.html) + +## Documentation + +Documentation is available to help you learn how to use this package: + +- [Quickstart](https://github.com/Azure/azure-sdk-for-net/blob/main/doc/dev/mgmt_quickstart.md). +- [API References](https://learn.microsoft.com/dotnet/api/?view=azure-dotnet). +- [Authentication](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/README.md). + +## Examples + +Code samples for using the management library for .NET can be found in the following locations +- [.NET Management Library Code Samples](https://aka.ms/azuresdk-net-mgmt-samples) + +## Troubleshooting + +- File an issue via [GitHub Issues](https://github.com/Azure/azure-sdk-for-net/issues). +- Check [previous questions](https://stackoverflow.com/questions/tagged/azure+.net) or ask new ones on Stack Overflow using Azure and .NET tags. + +## Next steps + +For more information about Microsoft Azure SDK, see [this website](https://azure.github.io/azure-sdk/). + +## Contributing + +For details on contributing to this repository, see the [contributing +guide][cg]. + +This project welcomes contributions and suggestions. Most contributions +require you to agree to a Contributor License Agreement (CLA) declaring +that you have the right to, and actually do, grant us the rights to use +your contribution. For details, visit . + +When you submit a pull request, a CLA-bot will automatically determine +whether you need to provide a CLA and decorate the PR appropriately +(for example, label, comment). Follow the instructions provided by the +bot. You'll only need to do this action once across all repositories +using our CLA. + +This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For +more information, see the [Code of Conduct FAQ][coc_faq] or contact + with any other questions or comments. + + +[cg]: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/resourcemanager/Azure.ResourceManager/docs/CONTRIBUTING.md +[coc]: https://opensource.microsoft.com/codeofconduct/ +[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ \ No newline at end of file diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/api/Azure.ResourceManager.RecoveryServicesDataReplication.net8.0.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/api/Azure.ResourceManager.RecoveryServicesDataReplication.net8.0.cs new file mode 100644 index 000000000000..b1039fce0a9e --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/api/Azure.ResourceManager.RecoveryServicesDataReplication.net8.0.cs @@ -0,0 +1,2383 @@ +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + public partial class DataReplicationEmailConfigurationCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DataReplicationEmailConfigurationCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string emailConfigurationName, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationEmailConfigurationData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string emailConfigurationName, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationEmailConfigurationData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string emailConfigurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string emailConfigurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string emailConfigurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string emailConfigurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string emailConfigurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string emailConfigurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class DataReplicationEmailConfigurationData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataReplicationEmailConfigurationData() { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationEmailConfigurationProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationEmailConfigurationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationEmailConfigurationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataReplicationEmailConfigurationResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DataReplicationEmailConfigurationResource() { } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationEmailConfigurationData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string vaultName, string emailConfigurationName) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationEmailConfigurationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationEmailConfigurationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationEmailConfigurationData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationEmailConfigurationData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class DataReplicationEventCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DataReplicationEventCollection() { } + public virtual Azure.Response Exists(string eventName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string eventName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string eventName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string odataOptions = null, string continuationToken = null, int? pageSize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string odataOptions = null, string continuationToken = null, int? pageSize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string eventName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string eventName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string eventName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class DataReplicationEventData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DataReplicationEventData() { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationEventProperties Properties { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationEventData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataReplicationEventResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DataReplicationEventResource() { } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationEventData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string vaultName, string eventName) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationEventData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataReplicationExtensionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DataReplicationExtensionCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string replicationExtensionName, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationExtensionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string replicationExtensionName, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationExtensionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string replicationExtensionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string replicationExtensionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string replicationExtensionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string replicationExtensionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string replicationExtensionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string replicationExtensionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class DataReplicationExtensionData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataReplicationExtensionData() { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationExtensionProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationExtensionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationExtensionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataReplicationExtensionResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DataReplicationExtensionResource() { } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationExtensionData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string vaultName, string replicationExtensionName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationExtensionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationExtensionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationExtensionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationExtensionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class DataReplicationFabricAgentCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DataReplicationFabricAgentCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string fabricAgentName, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationFabricAgentData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string fabricAgentName, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationFabricAgentData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string fabricAgentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string fabricAgentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string fabricAgentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string fabricAgentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string fabricAgentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string fabricAgentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class DataReplicationFabricAgentData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataReplicationFabricAgentData() { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationFabricAgentProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationFabricAgentData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationFabricAgentData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataReplicationFabricAgentResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DataReplicationFabricAgentResource() { } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationFabricAgentData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string fabricName, string fabricAgentName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationFabricAgentData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationFabricAgentData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationFabricAgentData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationFabricAgentData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class DataReplicationFabricCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DataReplicationFabricCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string fabricName, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationFabricData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string fabricName, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationFabricData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string fabricName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string fabricName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string fabricName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string continuationToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string continuationToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string fabricName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string fabricName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string fabricName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class DataReplicationFabricData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataReplicationFabricData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationFabricProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationFabricData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationFabricData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataReplicationFabricResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DataReplicationFabricResource() { } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationFabricData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string fabricName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetDataReplicationFabricAgent(string fabricAgentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDataReplicationFabricAgentAsync(string fabricAgentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationFabricAgentCollection GetDataReplicationFabricAgents() { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationFabricData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationFabricData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationFabricPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationFabricPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class DataReplicationJobCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DataReplicationJobCollection() { } + public virtual Azure.Response Exists(string jobName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string jobName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string jobName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string odataOptions = null, string continuationToken = null, int? pageSize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string odataOptions = null, string continuationToken = null, int? pageSize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string jobName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string jobName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string jobName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class DataReplicationJobData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DataReplicationJobData() { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobProperties Properties { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationJobData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationJobData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataReplicationJobResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DataReplicationJobResource() { } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationJobData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string vaultName, string jobName) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationJobData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationJobData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataReplicationPolicyCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DataReplicationPolicyCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string policyName, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string policyName, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string policyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string policyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string policyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string policyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string policyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string policyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class DataReplicationPolicyData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataReplicationPolicyData() { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPolicyProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPolicyData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPolicyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataReplicationPolicyResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DataReplicationPolicyResource() { } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPolicyData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string vaultName, string policyName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPolicyData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPolicyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class DataReplicationPrivateEndpointConnectionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DataReplicationPrivateEndpointConnectionCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string privateEndpointConnectionName, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPrivateEndpointConnectionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string privateEndpointConnectionName, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPrivateEndpointConnectionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class DataReplicationPrivateEndpointConnectionData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataReplicationPrivateEndpointConnectionData() { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPrivateEndpointConnectionProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPrivateEndpointConnectionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPrivateEndpointConnectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataReplicationPrivateEndpointConnectionProxyCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DataReplicationPrivateEndpointConnectionProxyCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string privateEndpointConnectionProxyName, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPrivateEndpointConnectionProxyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string privateEndpointConnectionProxyName, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPrivateEndpointConnectionProxyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string privateEndpointConnectionProxyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string privateEndpointConnectionProxyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string privateEndpointConnectionProxyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string privateEndpointConnectionProxyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string privateEndpointConnectionProxyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string privateEndpointConnectionProxyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class DataReplicationPrivateEndpointConnectionProxyData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataReplicationPrivateEndpointConnectionProxyData() { } + public Azure.ETag? ETag { get { throw null; } set { } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPrivateEndpointConnectionProxyProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPrivateEndpointConnectionProxyData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPrivateEndpointConnectionProxyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataReplicationPrivateEndpointConnectionProxyResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DataReplicationPrivateEndpointConnectionProxyResource() { } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPrivateEndpointConnectionProxyData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string vaultName, string privateEndpointConnectionProxyName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPrivateEndpointConnectionProxyData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPrivateEndpointConnectionProxyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPrivateEndpointConnectionProxyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPrivateEndpointConnectionProxyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Validate(Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPrivateEndpointConnectionProxyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ValidateAsync(Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPrivateEndpointConnectionProxyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class DataReplicationPrivateEndpointConnectionResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DataReplicationPrivateEndpointConnectionResource() { } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPrivateEndpointConnectionData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string vaultName, string privateEndpointConnectionName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPrivateEndpointConnectionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPrivateEndpointConnectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPrivateEndpointConnectionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPrivateEndpointConnectionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class DataReplicationPrivateLinkResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DataReplicationPrivateLinkResource() { } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPrivateLinkResourceData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string vaultName, string privateLinkResourceName) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPrivateLinkResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPrivateLinkResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataReplicationPrivateLinkResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DataReplicationPrivateLinkResourceCollection() { } + public virtual Azure.Response Exists(string privateLinkResourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string privateLinkResourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string privateLinkResourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string privateLinkResourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string privateLinkResourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string privateLinkResourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class DataReplicationPrivateLinkResourceData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DataReplicationPrivateLinkResourceData() { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPrivateLinkResourceProperties Properties { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPrivateLinkResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPrivateLinkResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataReplicationProtectedItemCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DataReplicationProtectedItemCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string protectedItemName, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationProtectedItemData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string protectedItemName, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationProtectedItemData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string protectedItemName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string protectedItemName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string protectedItemName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string odataOptions = null, string continuationToken = null, int? pageSize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string odataOptions = null, string continuationToken = null, int? pageSize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string protectedItemName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string protectedItemName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string protectedItemName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class DataReplicationProtectedItemData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataReplicationProtectedItemData() { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectedItemProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationProtectedItemData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationProtectedItemData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataReplicationProtectedItemResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DataReplicationProtectedItemResource() { } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationProtectedItemData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, bool? forceDelete = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, bool? forceDelete = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetDataReplicationRecoveryPoint(string recoveryPointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDataReplicationRecoveryPointAsync(string recoveryPointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationRecoveryPointCollection GetDataReplicationRecoveryPoints() { throw null; } + public virtual Azure.ResourceManager.ArmOperation PlannedFailover(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.Models.PlannedFailover body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> PlannedFailoverAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.Models.PlannedFailover body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationProtectedItemData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationProtectedItemData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectedItemPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectedItemPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class DataReplicationRecoveryPointCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DataReplicationRecoveryPointCollection() { } + public virtual Azure.Response Exists(string recoveryPointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string recoveryPointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string recoveryPointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string recoveryPointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string recoveryPointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string recoveryPointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class DataReplicationRecoveryPointData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DataReplicationRecoveryPointData() { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationRecoveryPointProperties Properties { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationRecoveryPointData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationRecoveryPointData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataReplicationRecoveryPointResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DataReplicationRecoveryPointResource() { } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationRecoveryPointData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, string recoveryPointName) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationRecoveryPointData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationRecoveryPointData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataReplicationVaultCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DataReplicationVaultCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string vaultName, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationVaultData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string vaultName, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationVaultData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string vaultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string vaultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string vaultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string continuationToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string continuationToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string vaultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string vaultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string vaultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class DataReplicationVaultData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataReplicationVaultData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationVaultProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationVaultData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationVaultData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataReplicationVaultResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DataReplicationVaultResource() { } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationVaultData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string vaultName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetDataReplicationEmailConfiguration(string emailConfigurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDataReplicationEmailConfigurationAsync(string emailConfigurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationEmailConfigurationCollection GetDataReplicationEmailConfigurations() { throw null; } + public virtual Azure.Response GetDataReplicationEvent(string eventName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDataReplicationEventAsync(string eventName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationEventCollection GetDataReplicationEvents() { throw null; } + public virtual Azure.Response GetDataReplicationExtension(string replicationExtensionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDataReplicationExtensionAsync(string replicationExtensionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationExtensionCollection GetDataReplicationExtensions() { throw null; } + public virtual Azure.Response GetDataReplicationJob(string jobName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDataReplicationJobAsync(string jobName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationJobCollection GetDataReplicationJobs() { throw null; } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPolicyCollection GetDataReplicationPolicies() { throw null; } + public virtual Azure.Response GetDataReplicationPolicy(string policyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDataReplicationPolicyAsync(string policyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetDataReplicationPrivateEndpointConnection(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDataReplicationPrivateEndpointConnectionAsync(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPrivateEndpointConnectionProxyCollection GetDataReplicationPrivateEndpointConnectionProxies() { throw null; } + public virtual Azure.Response GetDataReplicationPrivateEndpointConnectionProxy(string privateEndpointConnectionProxyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDataReplicationPrivateEndpointConnectionProxyAsync(string privateEndpointConnectionProxyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPrivateEndpointConnectionCollection GetDataReplicationPrivateEndpointConnections() { throw null; } + public virtual Azure.Response GetDataReplicationPrivateLinkResource(string privateLinkResourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDataReplicationPrivateLinkResourceAsync(string privateLinkResourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPrivateLinkResourceCollection GetDataReplicationPrivateLinkResources() { throw null; } + public virtual Azure.Response GetDataReplicationProtectedItem(string protectedItemName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDataReplicationProtectedItemAsync(string protectedItemName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationProtectedItemCollection GetDataReplicationProtectedItems() { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationVaultData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationVaultData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationVaultPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationVaultPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public static partial class RecoveryServicesDataReplicationExtensions + { + public static Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationEmailConfigurationResource GetDataReplicationEmailConfigurationResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationEventResource GetDataReplicationEventResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationExtensionResource GetDataReplicationExtensionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Response GetDataReplicationFabric(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string fabricName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationFabricAgentResource GetDataReplicationFabricAgentResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static System.Threading.Tasks.Task> GetDataReplicationFabricAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string fabricName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationFabricResource GetDataReplicationFabricResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationFabricCollection GetDataReplicationFabrics(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetDataReplicationFabrics(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetDataReplicationFabricsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationJobResource GetDataReplicationJobResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPolicyResource GetDataReplicationPolicyResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPrivateEndpointConnectionProxyResource GetDataReplicationPrivateEndpointConnectionProxyResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPrivateEndpointConnectionResource GetDataReplicationPrivateEndpointConnectionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPrivateLinkResource GetDataReplicationPrivateLinkResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationProtectedItemResource GetDataReplicationProtectedItemResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationRecoveryPointResource GetDataReplicationRecoveryPointResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Response GetDataReplicationVault(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string vaultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetDataReplicationVaultAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string vaultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationVaultResource GetDataReplicationVaultResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationVaultCollection GetDataReplicationVaults(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetDataReplicationVaults(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetDataReplicationVaultsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response PostCheckNameAvailability(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationNameAvailabilityContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> PostCheckNameAvailabilityAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationNameAvailabilityContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response PostDeploymentPreflight(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string deploymentId, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DeploymentPreflight body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> PostDeploymentPreflightAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string deploymentId, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DeploymentPreflight body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Mocking +{ + public partial class MockableRecoveryServicesDataReplicationArmClient : Azure.ResourceManager.ArmResource + { + protected MockableRecoveryServicesDataReplicationArmClient() { } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationEmailConfigurationResource GetDataReplicationEmailConfigurationResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationEventResource GetDataReplicationEventResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationExtensionResource GetDataReplicationExtensionResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationFabricAgentResource GetDataReplicationFabricAgentResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationFabricResource GetDataReplicationFabricResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationJobResource GetDataReplicationJobResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPolicyResource GetDataReplicationPolicyResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPrivateEndpointConnectionProxyResource GetDataReplicationPrivateEndpointConnectionProxyResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPrivateEndpointConnectionResource GetDataReplicationPrivateEndpointConnectionResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPrivateLinkResource GetDataReplicationPrivateLinkResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationProtectedItemResource GetDataReplicationProtectedItemResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationRecoveryPointResource GetDataReplicationRecoveryPointResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationVaultResource GetDataReplicationVaultResource(Azure.Core.ResourceIdentifier id) { throw null; } + } + public partial class MockableRecoveryServicesDataReplicationResourceGroupResource : Azure.ResourceManager.ArmResource + { + protected MockableRecoveryServicesDataReplicationResourceGroupResource() { } + public virtual Azure.Response GetDataReplicationFabric(string fabricName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDataReplicationFabricAsync(string fabricName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationFabricCollection GetDataReplicationFabrics() { throw null; } + public virtual Azure.Response GetDataReplicationVault(string vaultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDataReplicationVaultAsync(string vaultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationVaultCollection GetDataReplicationVaults() { throw null; } + public virtual Azure.Response PostDeploymentPreflight(string deploymentId, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DeploymentPreflight body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> PostDeploymentPreflightAsync(string deploymentId, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DeploymentPreflight body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class MockableRecoveryServicesDataReplicationSubscriptionResource : Azure.ResourceManager.ArmResource + { + protected MockableRecoveryServicesDataReplicationSubscriptionResource() { } + public virtual Azure.Pageable GetDataReplicationFabrics(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetDataReplicationFabricsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetDataReplicationVaults(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetDataReplicationVaultsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response PostCheckNameAvailability(Azure.Core.AzureLocation location, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationNameAvailabilityContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> PostCheckNameAvailabilityAsync(Azure.Core.AzureLocation location, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationNameAvailabilityContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public static partial class ArmRecoveryServicesDataReplicationModelFactory + { + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.AzStackHciFabricCustomProperties AzStackHciFabricCustomProperties(Azure.Core.ResourceIdentifier azStackHciSiteId = null, System.Collections.Generic.IEnumerable applianceName = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.AzStackHciClusterProperties cluster = null, Azure.Core.ResourceIdentifier fabricResourceId = null, Azure.Core.ResourceIdentifier fabricContainerId = null, Azure.Core.ResourceIdentifier migrationSolutionId = null, System.Uri migrationHubUri = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationEmailConfigurationData DataReplicationEmailConfigurationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationEmailConfigurationProperties properties = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationEmailConfigurationProperties DataReplicationEmailConfigurationProperties(bool sendToOwners = false, System.Collections.Generic.IEnumerable customEmailAddresses = null, string locale = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState? provisioningState = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState?)) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationErrorInfo DataReplicationErrorInfo(string code = null, string type = null, string severity = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), string message = null, string causes = null, string recommendation = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationEventData DataReplicationEventData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationEventProperties properties = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationEventProperties DataReplicationEventProperties(Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), string resourceName = null, string eventType = null, string eventName = null, System.DateTimeOffset? occurredOn = default(System.DateTimeOffset?), string severity = null, string description = null, string correlationId = null, System.Collections.Generic.IEnumerable healthErrors = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationEventCustomProperties customProperties = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState? provisioningState = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState?)) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationExtensionData DataReplicationExtensionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationExtensionProperties properties = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationExtensionProperties DataReplicationExtensionProperties(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState? provisioningState = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState?), Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationExtensionCustomProperties customProperties = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationFabricAgentData DataReplicationFabricAgentData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationFabricAgentProperties properties = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationFabricAgentProperties DataReplicationFabricAgentProperties(string correlationId = null, string machineId = null, string machineName = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationIdentity authenticationIdentity = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationIdentity resourceAccessIdentity = null, bool? isResponsive = default(bool?), System.DateTimeOffset? lastHeartbeatOn = default(System.DateTimeOffset?), string versionNumber = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState? provisioningState = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState?), System.Collections.Generic.IEnumerable healthErrors = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationFabricAgentCustomProperties customProperties = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationFabricData DataReplicationFabricData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationFabricProperties properties = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationFabricPatch DataReplicationFabricPatch(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationFabricProperties properties = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationFabricProperties DataReplicationFabricProperties(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState? provisioningState = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState?), string serviceEndpoint = null, Azure.Core.ResourceIdentifier serviceResourceId = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationHealthStatus? health = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationHealthStatus?), System.Collections.Generic.IEnumerable healthErrors = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationFabricCustomProperties customProperties = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationHealthErrorInfo DataReplicationHealthErrorInfo(Azure.Core.ResourceType? affectedResourceType = default(Azure.Core.ResourceType?), System.Collections.Generic.IEnumerable affectedResourceCorrelationIds = null, System.Collections.Generic.IEnumerable childErrors = null, string code = null, string healthCategory = null, string category = null, string severity = null, string source = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), bool? isCustomerResolvable = default(bool?), string summary = null, string message = null, string causes = null, string recommendation = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationInnerHealthErrorInfo DataReplicationInnerHealthErrorInfo(string code = null, string healthCategory = null, string category = null, string severity = null, string source = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), bool? isCustomerResolvable = default(bool?), string summary = null, string message = null, string causes = null, string recommendation = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobCustomProperties DataReplicationJobCustomProperties(string instanceType = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.JobModelCustomPropertiesAffectedObjectDetails affectedObjectDetails = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationJobData DataReplicationJobData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobProperties properties = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobProperties DataReplicationJobProperties(string displayName = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobState? state = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobState?), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), string objectId = null, string objectName = null, string objectInternalId = null, string objectInternalName = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobObjectType? objectType = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobObjectType?), string replicationProviderId = null, string sourceFabricProviderId = null, string targetFabricProviderId = null, System.Collections.Generic.IEnumerable allowedActions = null, string activityId = null, System.Collections.Generic.IEnumerable tasks = null, System.Collections.Generic.IEnumerable errors = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobCustomProperties customProperties = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState? provisioningState = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState?)) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationNameAvailabilityResult DataReplicationNameAvailabilityResult(bool? isNameAvailable = default(bool?), string reason = null, string message = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPolicyData DataReplicationPolicyData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPolicyProperties properties = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPolicyProperties DataReplicationPolicyProperties(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState? provisioningState = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState?), Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPolicyCustomProperties customProperties = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPrivateEndpointConnectionData DataReplicationPrivateEndpointConnectionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPrivateEndpointConnectionProperties properties = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPrivateEndpointConnectionProperties DataReplicationPrivateEndpointConnectionProperties(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState? provisioningState = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState?), Azure.Core.ResourceIdentifier privateEndpointId = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPrivateLinkServiceConnectionState privateLinkServiceConnectionState = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPrivateEndpointConnectionProxyData DataReplicationPrivateEndpointConnectionProxyData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPrivateEndpointConnectionProxyProperties properties = null, Azure.ETag? etag = default(Azure.ETag?)) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPrivateEndpointConnectionProxyProperties DataReplicationPrivateEndpointConnectionProxyProperties(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState? provisioningState = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState?), Azure.ResourceManager.RecoveryServicesDataReplication.Models.RemotePrivateEndpoint remotePrivateEndpoint = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPrivateLinkResourceData DataReplicationPrivateLinkResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPrivateLinkResourceProperties properties = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPrivateLinkResourceProperties DataReplicationPrivateLinkResourceProperties(string groupId = null, System.Collections.Generic.IEnumerable requiredMembers = null, System.Collections.Generic.IEnumerable requiredZoneNames = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState? provisioningState = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState?)) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationProtectedItemData DataReplicationProtectedItemData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectedItemProperties properties = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectedItemPatch DataReplicationProtectedItemPatch(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectedItemCustomPropertiesUpdate customProperties = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectedItemProperties DataReplicationProtectedItemProperties(string policyName = null, string replicationExtensionName = null, string correlationId = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState? provisioningState = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState?), Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState? protectionState = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState?), string protectionStateDescription = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTestFailoverState? testFailoverState = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTestFailoverState?), string testFailoverStateDescription = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationResynchronizationState? resynchronizationState = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationResynchronizationState?), string fabricObjectId = null, string fabricObjectName = null, string sourceFabricProviderId = null, string targetFabricProviderId = null, string fabricId = null, string targetFabricId = null, string fabricAgentId = null, string targetFabricAgentId = null, bool? isResyncRequired = default(bool?), System.DateTimeOffset? lastSuccessfulPlannedFailoverOn = default(System.DateTimeOffset?), System.DateTimeOffset? lastSuccessfulUnplannedFailoverOn = default(System.DateTimeOffset?), System.DateTimeOffset? lastSuccessfulTestFailoverOn = default(System.DateTimeOffset?), Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemJobProperties currentJob = null, System.Collections.Generic.IEnumerable allowedJobs = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemJobProperties lastFailedEnableProtectionJob = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemJobProperties lastFailedPlannedFailoverJob = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemJobProperties lastTestFailoverJob = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationHealthStatus? replicationHealth = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationHealthStatus?), System.Collections.Generic.IEnumerable healthErrors = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectedItemCustomProperties customProperties = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationRecoveryPointData DataReplicationRecoveryPointData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationRecoveryPointProperties properties = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationRecoveryPointProperties DataReplicationRecoveryPointProperties(System.DateTimeOffset recoveryPointOn = default(System.DateTimeOffset), Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationRecoveryPointType recoveryPointType = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationRecoveryPointType), Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationRecoveryPointCustomProperties customProperties = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState? provisioningState = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState?)) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTask DataReplicationTask(string taskName = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTaskState? state = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTaskState?), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), string customInstanceType = null, System.Collections.Generic.IEnumerable childrenJobs = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationVaultData DataReplicationVaultData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationVaultProperties properties = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationVaultPatch DataReplicationVaultPatch(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationVaultProperties properties = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationVaultProperties DataReplicationVaultProperties(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState? provisioningState = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState?), Azure.Core.ResourceIdentifier serviceResourceId = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationVaultType? vaultType = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationVaultType?)) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.FailoverJobCustomProperties FailoverJobCustomProperties(Azure.ResourceManager.RecoveryServicesDataReplication.Models.JobModelCustomPropertiesAffectedObjectDetails affectedObjectDetails = null, System.Collections.Generic.IEnumerable protectedItemDetails = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.FailoverProtectedItemProperties FailoverProtectedItemProperties(string protectedItemName = null, string vmName = null, string testVmName = null, string recoveryPointId = null, System.DateTimeOffset? recoveryPointOn = default(System.DateTimeOffset?), string networkName = null, string subnet = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVMigrateFabricCustomProperties HyperVMigrateFabricCustomProperties(Azure.Core.ResourceIdentifier hyperVSiteId = null, Azure.Core.ResourceIdentifier fabricResourceId = null, Azure.Core.ResourceIdentifier fabricContainerId = null, Azure.Core.ResourceIdentifier migrationSolutionId = null, System.Uri migrationHubUri = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHciEventCustomProperties HyperVToAzStackHciEventCustomProperties(string eventSourceFriendlyName = null, string protectedItemFriendlyName = null, string sourceApplianceName = null, string targetApplianceName = null, string serverType = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHciNicInput HyperVToAzStackHciNicInput(string nicId = null, string networkName = null, string targetNetworkId = null, string testNetworkId = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection selectionTypeForFailover = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection), bool? isStaticIPMigrationEnabled = default(bool?), bool? isMacMigrationEnabled = default(bool?)) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHciProtectedDiskProperties HyperVToAzStackHciProtectedDiskProperties(Azure.Core.ResourceIdentifier storageContainerId = null, string storageContainerLocalPath = null, string sourceDiskId = null, string sourceDiskName = null, string seedDiskName = null, string testMigrateDiskName = null, string migrateDiskName = null, bool? isOSDisk = default(bool?), long? capacityInBytes = default(long?), bool? isDynamic = default(bool?), string diskType = null, long? diskBlockSize = default(long?), long? diskLogicalSectorSize = default(long?), long? diskPhysicalSectorSize = default(long?)) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHciProtectedItemCustomProperties HyperVToAzStackHciProtectedItemCustomProperties(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemActiveLocation? activeLocation = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemActiveLocation?), Azure.Core.ResourceIdentifier targetHciClusterId = null, Azure.Core.ResourceIdentifier targetArcClusterCustomLocationId = null, string targetAzStackHciClusterName = null, Azure.Core.ResourceIdentifier fabricDiscoveryMachineId = null, System.Collections.Generic.IEnumerable disksToInclude = null, System.Collections.Generic.IEnumerable nicsToInclude = null, string sourceVmName = null, int? sourceCpuCores = default(int?), double? sourceMemoryInMegaBytes = default(double?), string targetVmName = null, Azure.Core.ResourceIdentifier targetResourceGroupId = null, Azure.Core.ResourceIdentifier storageContainerId = null, string hyperVGeneration = null, string targetNetworkId = null, string testNetworkId = null, int? targetCpuCores = default(int?), bool? isDynamicRam = default(bool?), Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemDynamicMemoryConfig dynamicMemoryConfig = null, int? targetMemoryInMegaBytes = default(int?), string runAsAccountId = null, string sourceFabricAgentName = null, string targetFabricAgentName = null, string sourceApplianceName = null, string targetApplianceName = null, string osType = null, string osName = null, string firmwareType = null, string targetLocation = null, string customLocationRegion = null, string failoverRecoveryPointId = null, System.DateTimeOffset? lastRecoveryPointReceivedOn = default(System.DateTimeOffset?), string lastRecoveryPointId = null, int? initialReplicationProgressPercentage = default(int?), int? resyncProgressPercentage = default(int?), System.Collections.Generic.IEnumerable protectedDisks = null, System.Collections.Generic.IEnumerable protectedNics = null, string targetVmBiosId = null, System.DateTimeOffset? lastReplicationUpdateOn = default(System.DateTimeOffset?)) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHciProtectedNicProperties HyperVToAzStackHciProtectedNicProperties(string nicId = null, string macAddress = null, string networkName = null, string targetNetworkId = null, string testNetworkId = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection? selectionTypeForFailover = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection?)) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHciRecoveryPointCustomProperties HyperVToAzStackHciRecoveryPointCustomProperties(System.Collections.Generic.IEnumerable diskIds = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHciReplicationExtensionCustomProperties HyperVToAzStackHciReplicationExtensionCustomProperties(Azure.Core.ResourceIdentifier hyperVFabricArmId = null, Azure.Core.ResourceIdentifier hyperVSiteId = null, Azure.Core.ResourceIdentifier azStackHciFabricArmId = null, Azure.Core.ResourceIdentifier azStackHciSiteId = null, string storageAccountId = null, string storageAccountSasSecretName = null, System.Uri asrServiceUri = null, System.Uri rcmServiceUri = null, System.Uri gatewayServiceUri = null, string sourceGatewayServiceId = null, string targetGatewayServiceId = null, string sourceStorageContainerName = null, string targetStorageContainerName = null, string resourceLocation = null, string subscriptionId = null, string resourceGroup = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.JobModelCustomPropertiesAffectedObjectDetails JobModelCustomPropertiesAffectedObjectDetails(string description = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.JobModelCustomPropertiesAffectedObjectDetailsType? type = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.JobModelCustomPropertiesAffectedObjectDetailsType?)) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemJobProperties ProtectedItemJobProperties(string scenarioName = null, string id = null, string name = null, string displayName = null, string state = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?)) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.TestFailoverCleanupJobCustomProperties TestFailoverCleanupJobCustomProperties(Azure.ResourceManager.RecoveryServicesDataReplication.Models.JobModelCustomPropertiesAffectedObjectDetails affectedObjectDetails = null, string comments = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.TestFailoverJobCustomProperties TestFailoverJobCustomProperties(Azure.ResourceManager.RecoveryServicesDataReplication.Models.JobModelCustomPropertiesAffectedObjectDetails affectedObjectDetails = null, System.Collections.Generic.IEnumerable protectedItemDetails = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzStackHciEventCustomProperties VMwareToAzStackHciEventCustomProperties(string eventSourceFriendlyName = null, string protectedItemFriendlyName = null, string sourceApplianceName = null, string targetApplianceName = null, string serverType = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzStackHciNicInput VMwareToAzStackHciNicInput(string nicId = null, string label = null, string networkName = null, string targetNetworkId = null, string testNetworkId = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection selectionTypeForFailover = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection), bool? isStaticIPMigrationEnabled = default(bool?), bool? isMacMigrationEnabled = default(bool?)) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzStackHciProtectedDiskProperties VMwareToAzStackHciProtectedDiskProperties(Azure.Core.ResourceIdentifier storageContainerId = null, string storageContainerLocalPath = null, string sourceDiskId = null, string sourceDiskName = null, string seedDiskName = null, string testMigrateDiskName = null, string migrateDiskName = null, bool? isOSDisk = default(bool?), long? capacityInBytes = default(long?), bool? isDynamic = default(bool?), string diskType = null, long? diskBlockSize = default(long?), long? diskLogicalSectorSize = default(long?), long? diskPhysicalSectorSize = default(long?)) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzStackHciProtectedItemCustomProperties VMwareToAzStackHciProtectedItemCustomProperties(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemActiveLocation? activeLocation = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemActiveLocation?), Azure.Core.ResourceIdentifier targetHciClusterId = null, Azure.Core.ResourceIdentifier targetArcClusterCustomLocationId = null, string targetAzStackHciClusterName = null, Azure.Core.ResourceIdentifier storageContainerId = null, Azure.Core.ResourceIdentifier targetResourceGroupId = null, string targetLocation = null, string customLocationRegion = null, System.Collections.Generic.IEnumerable disksToInclude = null, System.Collections.Generic.IEnumerable nicsToInclude = null, System.Collections.Generic.IEnumerable protectedDisks = null, System.Collections.Generic.IEnumerable protectedNics = null, string targetVmBiosId = null, string targetVmName = null, string hyperVGeneration = null, string targetNetworkId = null, string testNetworkId = null, int? targetCpuCores = default(int?), bool? isDynamicRam = default(bool?), Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemDynamicMemoryConfig dynamicMemoryConfig = null, int? targetMemoryInMegaBytes = default(int?), string osType = null, string osName = null, string firmwareType = null, Azure.Core.ResourceIdentifier fabricDiscoveryMachineId = null, string sourceVmName = null, int? sourceCpuCores = default(int?), double? sourceMemoryInMegaBytes = default(double?), string runAsAccountId = null, string sourceFabricAgentName = null, string targetFabricAgentName = null, string sourceApplianceName = null, string targetApplianceName = null, string failoverRecoveryPointId = null, System.DateTimeOffset? lastRecoveryPointReceivedOn = default(System.DateTimeOffset?), string lastRecoveryPointId = null, int? initialReplicationProgressPercentage = default(int?), int? migrationProgressPercentage = default(int?), int? resumeProgressPercentage = default(int?), int? resyncProgressPercentage = default(int?), long? resyncRetryCount = default(long?), bool? resyncRequired = default(bool?), Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzureMigrateResyncState? resyncState = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzureMigrateResyncState?), bool? performAutoResync = default(bool?), long? resumeRetryCount = default(long?), System.DateTimeOffset? lastReplicationUpdateOn = default(System.DateTimeOffset?)) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzStackHciProtectedNicProperties VMwareToAzStackHciProtectedNicProperties(string nicId = null, string macAddress = null, string label = null, bool? isPrimaryNic = default(bool?), string networkName = null, string targetNetworkId = null, string testNetworkId = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection? selectionTypeForFailover = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection?)) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzStackHciRecoveryPointCustomProperties VMwareToAzStackHciRecoveryPointCustomProperties(System.Collections.Generic.IEnumerable diskIds = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzStackHciReplicationExtensionCustomProperties VMwareToAzStackHciReplicationExtensionCustomProperties(Azure.Core.ResourceIdentifier vmwareFabricArmId = null, Azure.Core.ResourceIdentifier vmwareSiteId = null, Azure.Core.ResourceIdentifier azStackHciFabricArmId = null, Azure.Core.ResourceIdentifier azStackHciSiteId = null, string storageAccountId = null, string storageAccountSasSecretName = null, System.Uri asrServiceUri = null, System.Uri rcmServiceUri = null, System.Uri gatewayServiceUri = null, string sourceGatewayServiceId = null, string targetGatewayServiceId = null, string sourceStorageContainerName = null, string targetStorageContainerName = null, string resourceLocation = null, string subscriptionId = null, string resourceGroup = null) { throw null; } + } + public partial class AzStackHciClusterProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AzStackHciClusterProperties(string clusterName, string resourceName, string storageAccountName, System.Collections.Generic.IEnumerable storageContainers) { } + public string ClusterName { get { throw null; } set { } } + public string ResourceName { get { throw null; } set { } } + public string StorageAccountName { get { throw null; } set { } } + public System.Collections.Generic.IList StorageContainers { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.AzStackHciClusterProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.AzStackHciClusterProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AzStackHciFabricCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationFabricCustomProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AzStackHciFabricCustomProperties(Azure.Core.ResourceIdentifier azStackHciSiteId, Azure.ResourceManager.RecoveryServicesDataReplication.Models.AzStackHciClusterProperties cluster, Azure.Core.ResourceIdentifier migrationSolutionId) { } + public System.Collections.Generic.IReadOnlyList ApplianceName { get { throw null; } } + public Azure.Core.ResourceIdentifier AzStackHciSiteId { get { throw null; } set { } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.AzStackHciClusterProperties Cluster { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier FabricContainerId { get { throw null; } } + public Azure.Core.ResourceIdentifier FabricResourceId { get { throw null; } } + public System.Uri MigrationHubUri { get { throw null; } } + public Azure.Core.ResourceIdentifier MigrationSolutionId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.AzStackHciFabricCustomProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.AzStackHciFabricCustomProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataReplicationDiskControllerInputs : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataReplicationDiskControllerInputs(string controllerName, int controllerId, int controllerLocation) { } + public int ControllerId { get { throw null; } set { } } + public int ControllerLocation { get { throw null; } set { } } + public string ControllerName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationDiskControllerInputs System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationDiskControllerInputs System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataReplicationEmailConfigurationProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataReplicationEmailConfigurationProperties(bool sendToOwners) { } + public System.Collections.Generic.IList CustomEmailAddresses { get { throw null; } } + public string Locale { get { throw null; } set { } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState? ProvisioningState { get { throw null; } } + public bool SendToOwners { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationEmailConfigurationProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationEmailConfigurationProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataReplicationErrorInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DataReplicationErrorInfo() { } + public string Causes { get { throw null; } } + public string Code { get { throw null; } } + public System.DateTimeOffset? CreatedOn { get { throw null; } } + public string Message { get { throw null; } } + public string Recommendation { get { throw null; } } + public string Severity { get { throw null; } } + public string Type { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationErrorInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationErrorInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public abstract partial class DataReplicationEventCustomProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected DataReplicationEventCustomProperties() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationEventCustomProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationEventCustomProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataReplicationEventProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DataReplicationEventProperties() { } + public string CorrelationId { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationEventCustomProperties CustomProperties { get { throw null; } } + public string Description { get { throw null; } } + public string EventName { get { throw null; } } + public string EventType { get { throw null; } } + public System.Collections.Generic.IReadOnlyList HealthErrors { get { throw null; } } + public System.DateTimeOffset? OccurredOn { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState? ProvisioningState { get { throw null; } } + public string ResourceName { get { throw null; } } + public Azure.Core.ResourceType? ResourceType { get { throw null; } } + public string Severity { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationEventProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationEventProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public abstract partial class DataReplicationExtensionCustomProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected DataReplicationExtensionCustomProperties() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationExtensionCustomProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationExtensionCustomProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataReplicationExtensionProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataReplicationExtensionProperties(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationExtensionCustomProperties customProperties) { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationExtensionCustomProperties CustomProperties { get { throw null; } set { } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState? ProvisioningState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationExtensionProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationExtensionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public abstract partial class DataReplicationFabricAgentCustomProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected DataReplicationFabricAgentCustomProperties() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationFabricAgentCustomProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationFabricAgentCustomProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataReplicationFabricAgentProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataReplicationFabricAgentProperties(string machineId, string machineName, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationIdentity authenticationIdentity, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationIdentity resourceAccessIdentity, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationFabricAgentCustomProperties customProperties) { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationIdentity AuthenticationIdentity { get { throw null; } set { } } + public string CorrelationId { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationFabricAgentCustomProperties CustomProperties { get { throw null; } set { } } + public System.Collections.Generic.IReadOnlyList HealthErrors { get { throw null; } } + public bool? IsResponsive { get { throw null; } } + public System.DateTimeOffset? LastHeartbeatOn { get { throw null; } } + public string MachineId { get { throw null; } set { } } + public string MachineName { get { throw null; } set { } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationIdentity ResourceAccessIdentity { get { throw null; } set { } } + public string VersionNumber { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationFabricAgentProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationFabricAgentProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public abstract partial class DataReplicationFabricCustomProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected DataReplicationFabricCustomProperties() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationFabricCustomProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationFabricCustomProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataReplicationFabricPatch : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataReplicationFabricPatch() { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationFabricProperties Properties { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationFabricPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationFabricPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataReplicationFabricProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataReplicationFabricProperties(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationFabricCustomProperties customProperties) { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationFabricCustomProperties CustomProperties { get { throw null; } set { } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationHealthStatus? Health { get { throw null; } } + public System.Collections.Generic.IReadOnlyList HealthErrors { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState? ProvisioningState { get { throw null; } } + public string ServiceEndpoint { get { throw null; } } + public Azure.Core.ResourceIdentifier ServiceResourceId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationFabricProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationFabricProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataReplicationHealthErrorInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DataReplicationHealthErrorInfo() { } + public System.Collections.Generic.IReadOnlyList AffectedResourceCorrelationIds { get { throw null; } } + public Azure.Core.ResourceType? AffectedResourceType { get { throw null; } } + public string Category { get { throw null; } } + public string Causes { get { throw null; } } + public System.Collections.Generic.IReadOnlyList ChildErrors { get { throw null; } } + public string Code { get { throw null; } } + public System.DateTimeOffset? CreatedOn { get { throw null; } } + public string HealthCategory { get { throw null; } } + public bool? IsCustomerResolvable { get { throw null; } } + public string Message { get { throw null; } } + public string Recommendation { get { throw null; } } + public string Severity { get { throw null; } } + public string Source { get { throw null; } } + public string Summary { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationHealthErrorInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationHealthErrorInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DataReplicationHealthStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DataReplicationHealthStatus(string value) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationHealthStatus Critical { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationHealthStatus Normal { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationHealthStatus Warning { get { throw null; } } + public bool Equals(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationHealthStatus other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationHealthStatus left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationHealthStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationHealthStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationHealthStatus left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationHealthStatus right) { throw null; } + public override string ToString() { throw null; } + } + public partial class DataReplicationIdentity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataReplicationIdentity(System.Guid tenantId, string applicationId, string objectId, string audience, string aadAuthority) { } + public string AadAuthority { get { throw null; } set { } } + public string ApplicationId { get { throw null; } set { } } + public string Audience { get { throw null; } set { } } + public string ObjectId { get { throw null; } set { } } + public System.Guid TenantId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationIdentity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationIdentity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataReplicationInnerHealthErrorInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DataReplicationInnerHealthErrorInfo() { } + public string Category { get { throw null; } } + public string Causes { get { throw null; } } + public string Code { get { throw null; } } + public System.DateTimeOffset? CreatedOn { get { throw null; } } + public string HealthCategory { get { throw null; } } + public bool? IsCustomerResolvable { get { throw null; } } + public string Message { get { throw null; } } + public string Recommendation { get { throw null; } } + public string Severity { get { throw null; } } + public string Source { get { throw null; } } + public string Summary { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationInnerHealthErrorInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationInnerHealthErrorInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public abstract partial class DataReplicationJobCustomProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected DataReplicationJobCustomProperties() { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.JobModelCustomPropertiesAffectedObjectDetails AffectedObjectDetails { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobCustomProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobCustomProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DataReplicationJobObjectType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DataReplicationJobObjectType(string value) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobObjectType AvsDiskPool { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobObjectType Fabric { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobObjectType FabricAgent { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobObjectType Policy { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobObjectType ProtectedItem { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobObjectType RecoveryPlan { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobObjectType ReplicationExtension { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobObjectType Vault { get { throw null; } } + public bool Equals(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobObjectType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobObjectType left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobObjectType right) { throw null; } + public static implicit operator Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobObjectType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobObjectType left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobObjectType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class DataReplicationJobProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DataReplicationJobProperties() { } + public string ActivityId { get { throw null; } } + public System.Collections.Generic.IReadOnlyList AllowedActions { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobCustomProperties CustomProperties { get { throw null; } } + public string DisplayName { get { throw null; } } + public System.DateTimeOffset? EndOn { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public string ObjectId { get { throw null; } } + public string ObjectInternalId { get { throw null; } } + public string ObjectInternalName { get { throw null; } } + public string ObjectName { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobObjectType? ObjectType { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState? ProvisioningState { get { throw null; } } + public string ReplicationProviderId { get { throw null; } } + public string SourceFabricProviderId { get { throw null; } } + public System.DateTimeOffset? StartOn { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobState? State { get { throw null; } } + public string TargetFabricProviderId { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Tasks { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DataReplicationJobState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DataReplicationJobState(string value) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobState Cancelled { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobState Cancelling { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobState CompletedWithErrors { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobState CompletedWithInformation { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobState CompletedWithWarnings { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobState Failed { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobState Pending { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobState Started { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobState Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobState left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobState right) { throw null; } + public static implicit operator Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobState left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class DataReplicationNameAvailabilityContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataReplicationNameAvailabilityContent() { } + public string Name { get { throw null; } set { } } + public Azure.Core.ResourceType? Type { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationNameAvailabilityContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationNameAvailabilityContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataReplicationNameAvailabilityResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DataReplicationNameAvailabilityResult() { } + public bool? IsNameAvailable { get { throw null; } } + public string Message { get { throw null; } } + public string Reason { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationNameAvailabilityResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationNameAvailabilityResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public abstract partial class DataReplicationPolicyCustomProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected DataReplicationPolicyCustomProperties() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPolicyCustomProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPolicyCustomProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataReplicationPolicyProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataReplicationPolicyProperties(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPolicyCustomProperties customProperties) { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPolicyCustomProperties CustomProperties { get { throw null; } set { } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState? ProvisioningState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPolicyProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPolicyProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataReplicationPrivateEndpointConnectionProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataReplicationPrivateEndpointConnectionProperties() { } + public Azure.Core.ResourceIdentifier PrivateEndpointId { get { throw null; } set { } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPrivateLinkServiceConnectionState PrivateLinkServiceConnectionState { get { throw null; } set { } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState? ProvisioningState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPrivateEndpointConnectionProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPrivateEndpointConnectionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataReplicationPrivateEndpointConnectionProxyProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataReplicationPrivateEndpointConnectionProxyProperties() { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.RemotePrivateEndpoint RemotePrivateEndpoint { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPrivateEndpointConnectionProxyProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPrivateEndpointConnectionProxyProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DataReplicationPrivateEndpointConnectionStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DataReplicationPrivateEndpointConnectionStatus(string value) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPrivateEndpointConnectionStatus Approved { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPrivateEndpointConnectionStatus Disconnected { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPrivateEndpointConnectionStatus Pending { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPrivateEndpointConnectionStatus Rejected { get { throw null; } } + public bool Equals(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPrivateEndpointConnectionStatus other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPrivateEndpointConnectionStatus left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPrivateEndpointConnectionStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPrivateEndpointConnectionStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPrivateEndpointConnectionStatus left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPrivateEndpointConnectionStatus right) { throw null; } + public override string ToString() { throw null; } + } + public partial class DataReplicationPrivateLinkResourceProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DataReplicationPrivateLinkResourceProperties() { } + public string GroupId { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState? ProvisioningState { get { throw null; } } + public System.Collections.Generic.IReadOnlyList RequiredMembers { get { throw null; } } + public System.Collections.Generic.IReadOnlyList RequiredZoneNames { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPrivateLinkResourceProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPrivateLinkResourceProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataReplicationPrivateLinkServiceConnection : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataReplicationPrivateLinkServiceConnection() { } + public System.Collections.Generic.IList GroupIds { get { throw null; } } + public string Name { get { throw null; } set { } } + public string RequestMessage { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPrivateLinkServiceConnection System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPrivateLinkServiceConnection System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataReplicationPrivateLinkServiceConnectionState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataReplicationPrivateLinkServiceConnectionState() { } + public string ActionsRequired { get { throw null; } set { } } + public string Description { get { throw null; } set { } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPrivateEndpointConnectionStatus? Status { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPrivateLinkServiceConnectionState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPrivateLinkServiceConnectionState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataReplicationPrivateLinkServiceProxy : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataReplicationPrivateLinkServiceProxy() { } + public System.Collections.Generic.IList GroupConnectivityInformation { get { throw null; } } + public string Id { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier RemotePrivateEndpointConnectionId { get { throw null; } set { } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPrivateLinkServiceConnectionState RemotePrivateLinkServiceConnectionState { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPrivateLinkServiceProxy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPrivateLinkServiceProxy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public abstract partial class DataReplicationProtectedItemCustomProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected DataReplicationProtectedItemCustomProperties() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectedItemCustomProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectedItemCustomProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public abstract partial class DataReplicationProtectedItemCustomPropertiesUpdate : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected DataReplicationProtectedItemCustomPropertiesUpdate() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectedItemCustomPropertiesUpdate System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectedItemCustomPropertiesUpdate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataReplicationProtectedItemPatch : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataReplicationProtectedItemPatch() { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectedItemCustomPropertiesUpdate CustomProperties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectedItemPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectedItemPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataReplicationProtectedItemProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataReplicationProtectedItemProperties(string policyName, string replicationExtensionName, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectedItemCustomProperties customProperties) { } + public System.Collections.Generic.IReadOnlyList AllowedJobs { get { throw null; } } + public string CorrelationId { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemJobProperties CurrentJob { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectedItemCustomProperties CustomProperties { get { throw null; } set { } } + public string FabricAgentId { get { throw null; } } + public string FabricId { get { throw null; } } + public string FabricObjectId { get { throw null; } } + public string FabricObjectName { get { throw null; } } + public System.Collections.Generic.IReadOnlyList HealthErrors { get { throw null; } } + public bool? IsResyncRequired { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemJobProperties LastFailedEnableProtectionJob { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemJobProperties LastFailedPlannedFailoverJob { get { throw null; } } + public System.DateTimeOffset? LastSuccessfulPlannedFailoverOn { get { throw null; } } + public System.DateTimeOffset? LastSuccessfulTestFailoverOn { get { throw null; } } + public System.DateTimeOffset? LastSuccessfulUnplannedFailoverOn { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemJobProperties LastTestFailoverJob { get { throw null; } } + public string PolicyName { get { throw null; } set { } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState? ProtectionState { get { throw null; } } + public string ProtectionStateDescription { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState? ProvisioningState { get { throw null; } } + public string ReplicationExtensionName { get { throw null; } set { } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationHealthStatus? ReplicationHealth { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationResynchronizationState? ResynchronizationState { get { throw null; } } + public string SourceFabricProviderId { get { throw null; } } + public string TargetFabricAgentId { get { throw null; } } + public string TargetFabricId { get { throw null; } } + public string TargetFabricProviderId { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTestFailoverState? TestFailoverState { get { throw null; } } + public string TestFailoverStateDescription { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectedItemProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectedItemProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DataReplicationProtectionState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DataReplicationProtectionState(string value) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState CancelFailoverFailedOnPrimary { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState CancelFailoverFailedOnRecovery { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState CancelFailoverInProgressOnPrimary { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState CancelFailoverInProgressOnRecovery { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState CancelFailoverStatesBegin { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState CancelFailoverStatesEnd { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState ChangeRecoveryPointCompleted { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState ChangeRecoveryPointFailed { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState ChangeRecoveryPointInitiated { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState ChangeRecoveryPointStatesBegin { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState ChangeRecoveryPointStatesEnd { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState CommitFailoverCompleted { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState CommitFailoverFailedOnPrimary { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState CommitFailoverFailedOnRecovery { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState CommitFailoverInProgressOnPrimary { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState CommitFailoverInProgressOnRecovery { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState CommitFailoverStatesBegin { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState CommitFailoverStatesEnd { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState DisablingFailed { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState DisablingProtection { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState EnablingFailed { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState EnablingProtection { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState InitialReplicationCompletedOnPrimary { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState InitialReplicationCompletedOnRecovery { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState InitialReplicationFailed { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState InitialReplicationInProgress { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState InitialReplicationStatesBegin { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState InitialReplicationStatesEnd { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState MarkedForDeletion { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState PlannedFailoverCompleted { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState PlannedFailoverCompleting { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState PlannedFailoverCompletionFailed { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState PlannedFailoverFailed { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState PlannedFailoverInitiated { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState PlannedFailoverTransitionStatesBegin { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState PlannedFailoverTransitionStatesEnd { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState Protected { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState ProtectedStatesBegin { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState ProtectedStatesEnd { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState ReprotectFailed { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState ReprotectInitiated { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState ReprotectStatesBegin { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState ReprotectStatesEnd { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState UnplannedFailoverCompleted { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState UnplannedFailoverCompleting { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState UnplannedFailoverCompletionFailed { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState UnplannedFailoverFailed { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState UnplannedFailoverInitiated { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState UnplannedFailoverTransitionStatesBegin { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState UnplannedFailoverTransitionStatesEnd { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState UnprotectedStatesBegin { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState UnprotectedStatesEnd { get { throw null; } } + public bool Equals(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState right) { throw null; } + public static implicit operator Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DataReplicationProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DataReplicationProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState Creating { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState Deleted { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + public abstract partial class DataReplicationRecoveryPointCustomProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected DataReplicationRecoveryPointCustomProperties() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationRecoveryPointCustomProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationRecoveryPointCustomProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataReplicationRecoveryPointProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DataReplicationRecoveryPointProperties() { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationRecoveryPointCustomProperties CustomProperties { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState? ProvisioningState { get { throw null; } } + public System.DateTimeOffset RecoveryPointOn { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationRecoveryPointType RecoveryPointType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationRecoveryPointProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationRecoveryPointProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DataReplicationRecoveryPointType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DataReplicationRecoveryPointType(string value) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationRecoveryPointType ApplicationConsistent { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationRecoveryPointType CrashConsistent { get { throw null; } } + public bool Equals(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationRecoveryPointType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationRecoveryPointType left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationRecoveryPointType right) { throw null; } + public static implicit operator Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationRecoveryPointType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationRecoveryPointType left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationRecoveryPointType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DataReplicationResynchronizationState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DataReplicationResynchronizationState(string value) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationResynchronizationState None { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationResynchronizationState ResynchronizationCompleted { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationResynchronizationState ResynchronizationFailed { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationResynchronizationState ResynchronizationInitiated { get { throw null; } } + public bool Equals(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationResynchronizationState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationResynchronizationState left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationResynchronizationState right) { throw null; } + public static implicit operator Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationResynchronizationState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationResynchronizationState left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationResynchronizationState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class DataReplicationTask : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DataReplicationTask() { } + public System.Collections.Generic.IReadOnlyList ChildrenJobs { get { throw null; } } + public string CustomInstanceType { get { throw null; } } + public System.DateTimeOffset? EndOn { get { throw null; } } + public System.DateTimeOffset? StartOn { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTaskState? State { get { throw null; } } + public string TaskName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTask System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTask System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DataReplicationTaskState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DataReplicationTaskState(string value) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTaskState Cancelled { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTaskState Failed { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTaskState Pending { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTaskState Skipped { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTaskState Started { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTaskState Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTaskState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTaskState left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTaskState right) { throw null; } + public static implicit operator Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTaskState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTaskState left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTaskState right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DataReplicationTestFailoverState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DataReplicationTestFailoverState(string value) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTestFailoverState MarkedForDeletion { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTestFailoverState None { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTestFailoverState TestFailoverCleanupCompleting { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTestFailoverState TestFailoverCleanupInitiated { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTestFailoverState TestFailoverCompleted { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTestFailoverState TestFailoverCompleting { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTestFailoverState TestFailoverCompletionFailed { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTestFailoverState TestFailoverFailed { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTestFailoverState TestFailoverInitiated { get { throw null; } } + public bool Equals(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTestFailoverState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTestFailoverState left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTestFailoverState right) { throw null; } + public static implicit operator Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTestFailoverState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTestFailoverState left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTestFailoverState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class DataReplicationVaultPatch : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataReplicationVaultPatch() { } + public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationVaultProperties Properties { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationVaultPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationVaultPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataReplicationVaultProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataReplicationVaultProperties() { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState? ProvisioningState { get { throw null; } } + public Azure.Core.ResourceIdentifier ServiceResourceId { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationVaultType? VaultType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationVaultProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationVaultProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DataReplicationVaultType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DataReplicationVaultType(string value) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationVaultType DisasterRecovery { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationVaultType Migrate { get { throw null; } } + public bool Equals(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationVaultType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationVaultType left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationVaultType right) { throw null; } + public static implicit operator Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationVaultType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationVaultType left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationVaultType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class DeploymentPreflight : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DeploymentPreflight() { } + public System.Collections.Generic.IList Resources { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DeploymentPreflight System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DeploymentPreflight System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DeploymentPreflightResourceInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DeploymentPreflightResourceInfo() { } + public string ApiVersion { get { throw null; } set { } } + public Azure.Core.AzureLocation? Location { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + public System.BinaryData Properties { get { throw null; } set { } } + public Azure.Core.ResourceType? Type { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DeploymentPreflightResourceInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DeploymentPreflightResourceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class FailoverJobCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobCustomProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal FailoverJobCustomProperties() { } + public System.Collections.Generic.IReadOnlyList ProtectedItemDetails { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.FailoverJobCustomProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.FailoverJobCustomProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class FailoverProtectedItemProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal FailoverProtectedItemProperties() { } + public string NetworkName { get { throw null; } } + public string ProtectedItemName { get { throw null; } } + public string RecoveryPointId { get { throw null; } } + public System.DateTimeOffset? RecoveryPointOn { get { throw null; } } + public string Subnet { get { throw null; } } + public string TestVmName { get { throw null; } } + public string VmName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.FailoverProtectedItemProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.FailoverProtectedItemProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class GroupConnectivityInformation : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public GroupConnectivityInformation() { } + public System.Collections.Generic.IList CustomerVisibleFqdns { get { throw null; } } + public string GroupId { get { throw null; } set { } } + public string InternalFqdn { get { throw null; } set { } } + public string MemberName { get { throw null; } set { } } + public string PrivateLinkServiceArmRegion { get { throw null; } set { } } + public string RedirectMapId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.GroupConnectivityInformation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.GroupConnectivityInformation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class HyperVMigrateFabricCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationFabricCustomProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public HyperVMigrateFabricCustomProperties(Azure.Core.ResourceIdentifier hyperVSiteId, Azure.Core.ResourceIdentifier migrationSolutionId) { } + public Azure.Core.ResourceIdentifier FabricContainerId { get { throw null; } } + public Azure.Core.ResourceIdentifier FabricResourceId { get { throw null; } } + public Azure.Core.ResourceIdentifier HyperVSiteId { get { throw null; } set { } } + public System.Uri MigrationHubUri { get { throw null; } } + public Azure.Core.ResourceIdentifier MigrationSolutionId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVMigrateFabricCustomProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVMigrateFabricCustomProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class HyperVToAzStackHciDiskInput : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public HyperVToAzStackHciDiskInput(string diskId, long diskSizeGB, string diskFileFormat, bool isOSDisk) { } + public long? DiskBlockSize { get { throw null; } set { } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationDiskControllerInputs DiskController { get { throw null; } set { } } + public string DiskFileFormat { get { throw null; } set { } } + public string DiskId { get { throw null; } set { } } + public string DiskIdentifier { get { throw null; } set { } } + public long? DiskLogicalSectorSize { get { throw null; } set { } } + public long? DiskPhysicalSectorSize { get { throw null; } set { } } + public long DiskSizeGB { get { throw null; } set { } } + public bool? IsDynamic { get { throw null; } set { } } + public bool IsOSDisk { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier StorageContainerId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHciDiskInput System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHciDiskInput System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class HyperVToAzStackHciEventCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationEventCustomProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal HyperVToAzStackHciEventCustomProperties() { } + public string EventSourceFriendlyName { get { throw null; } } + public string ProtectedItemFriendlyName { get { throw null; } } + public string ServerType { get { throw null; } } + public string SourceApplianceName { get { throw null; } } + public string TargetApplianceName { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHciEventCustomProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHciEventCustomProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class HyperVToAzStackHciNicInput : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public HyperVToAzStackHciNicInput(string nicId, Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection selectionTypeForFailover) { } + public bool? IsMacMigrationEnabled { get { throw null; } set { } } + public bool? IsStaticIPMigrationEnabled { get { throw null; } set { } } + public string NetworkName { get { throw null; } } + public string NicId { get { throw null; } set { } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection SelectionTypeForFailover { get { throw null; } set { } } + public string TargetNetworkId { get { throw null; } set { } } + public string TestNetworkId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHciNicInput System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHciNicInput System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class HyperVToAzStackHciPlannedFailoverCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.PlannedFailoverCustomProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public HyperVToAzStackHciPlannedFailoverCustomProperties(bool shutdownSourceVm) { } + public bool ShutdownSourceVm { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHciPlannedFailoverCustomProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHciPlannedFailoverCustomProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class HyperVToAzStackHciPolicyCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPolicyCustomProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public HyperVToAzStackHciPolicyCustomProperties(int recoveryPointHistoryInMinutes, int crashConsistentFrequencyInMinutes, int appConsistentFrequencyInMinutes) { } + public int AppConsistentFrequencyInMinutes { get { throw null; } set { } } + public int CrashConsistentFrequencyInMinutes { get { throw null; } set { } } + public int RecoveryPointHistoryInMinutes { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHciPolicyCustomProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHciPolicyCustomProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class HyperVToAzStackHciProtectedDiskProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal HyperVToAzStackHciProtectedDiskProperties() { } + public long? CapacityInBytes { get { throw null; } } + public long? DiskBlockSize { get { throw null; } } + public long? DiskLogicalSectorSize { get { throw null; } } + public long? DiskPhysicalSectorSize { get { throw null; } } + public string DiskType { get { throw null; } } + public bool? IsDynamic { get { throw null; } } + public bool? IsOSDisk { get { throw null; } } + public string MigrateDiskName { get { throw null; } } + public string SeedDiskName { get { throw null; } } + public string SourceDiskId { get { throw null; } } + public string SourceDiskName { get { throw null; } } + public Azure.Core.ResourceIdentifier StorageContainerId { get { throw null; } } + public string StorageContainerLocalPath { get { throw null; } } + public string TestMigrateDiskName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHciProtectedDiskProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHciProtectedDiskProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class HyperVToAzStackHciProtectedItemCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectedItemCustomProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public HyperVToAzStackHciProtectedItemCustomProperties(Azure.Core.ResourceIdentifier targetHciClusterId, Azure.Core.ResourceIdentifier targetArcClusterCustomLocationId, Azure.Core.ResourceIdentifier fabricDiscoveryMachineId, System.Collections.Generic.IEnumerable disksToInclude, System.Collections.Generic.IEnumerable nicsToInclude, Azure.Core.ResourceIdentifier targetResourceGroupId, Azure.Core.ResourceIdentifier storageContainerId, string hyperVGeneration, string runAsAccountId, string sourceFabricAgentName, string targetFabricAgentName, string customLocationRegion) { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemActiveLocation? ActiveLocation { get { throw null; } } + public string CustomLocationRegion { get { throw null; } set { } } + public System.Collections.Generic.IList DisksToInclude { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemDynamicMemoryConfig DynamicMemoryConfig { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier FabricDiscoveryMachineId { get { throw null; } set { } } + public string FailoverRecoveryPointId { get { throw null; } } + public string FirmwareType { get { throw null; } } + public string HyperVGeneration { get { throw null; } set { } } + public int? InitialReplicationProgressPercentage { get { throw null; } } + public bool? IsDynamicRam { get { throw null; } set { } } + public string LastRecoveryPointId { get { throw null; } } + public System.DateTimeOffset? LastRecoveryPointReceivedOn { get { throw null; } } + public System.DateTimeOffset? LastReplicationUpdateOn { get { throw null; } } + public System.Collections.Generic.IList NicsToInclude { get { throw null; } } + public string OSName { get { throw null; } } + public string OSType { get { throw null; } } + public System.Collections.Generic.IReadOnlyList ProtectedDisks { get { throw null; } } + public System.Collections.Generic.IReadOnlyList ProtectedNics { get { throw null; } } + public int? ResyncProgressPercentage { get { throw null; } } + public string RunAsAccountId { get { throw null; } set { } } + public string SourceApplianceName { get { throw null; } } + public int? SourceCpuCores { get { throw null; } } + public string SourceFabricAgentName { get { throw null; } set { } } + public double? SourceMemoryInMegaBytes { get { throw null; } } + public string SourceVmName { get { throw null; } } + public Azure.Core.ResourceIdentifier StorageContainerId { get { throw null; } set { } } + public string TargetApplianceName { get { throw null; } } + public Azure.Core.ResourceIdentifier TargetArcClusterCustomLocationId { get { throw null; } set { } } + public string TargetAzStackHciClusterName { get { throw null; } } + public int? TargetCpuCores { get { throw null; } set { } } + public string TargetFabricAgentName { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier TargetHciClusterId { get { throw null; } set { } } + public string TargetLocation { get { throw null; } } + public int? TargetMemoryInMegaBytes { get { throw null; } set { } } + public string TargetNetworkId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier TargetResourceGroupId { get { throw null; } set { } } + public string TargetVmBiosId { get { throw null; } } + public string TargetVmName { get { throw null; } set { } } + public string TestNetworkId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHciProtectedItemCustomProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHciProtectedItemCustomProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class HyperVToAzStackHciProtectedItemCustomPropertiesUpdate : Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectedItemCustomPropertiesUpdate, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public HyperVToAzStackHciProtectedItemCustomPropertiesUpdate() { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemDynamicMemoryConfig DynamicMemoryConfig { get { throw null; } set { } } + public bool? IsDynamicRam { get { throw null; } set { } } + public System.Collections.Generic.IList NicsToInclude { get { throw null; } } + public string OSType { get { throw null; } set { } } + public int? TargetCpuCores { get { throw null; } set { } } + public int? TargetMemoryInMegaBytes { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHciProtectedItemCustomPropertiesUpdate System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHciProtectedItemCustomPropertiesUpdate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class HyperVToAzStackHciProtectedNicProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal HyperVToAzStackHciProtectedNicProperties() { } + public string MacAddress { get { throw null; } } + public string NetworkName { get { throw null; } } + public string NicId { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection? SelectionTypeForFailover { get { throw null; } } + public string TargetNetworkId { get { throw null; } } + public string TestNetworkId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHciProtectedNicProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHciProtectedNicProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class HyperVToAzStackHciRecoveryPointCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationRecoveryPointCustomProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal HyperVToAzStackHciRecoveryPointCustomProperties() { } + public System.Collections.Generic.IReadOnlyList DiskIds { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHciRecoveryPointCustomProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHciRecoveryPointCustomProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class HyperVToAzStackHciReplicationExtensionCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationExtensionCustomProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public HyperVToAzStackHciReplicationExtensionCustomProperties(Azure.Core.ResourceIdentifier hyperVFabricArmId, Azure.Core.ResourceIdentifier azStackHciFabricArmId) { } + public System.Uri AsrServiceUri { get { throw null; } } + public Azure.Core.ResourceIdentifier AzStackHciFabricArmId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier AzStackHciSiteId { get { throw null; } } + public System.Uri GatewayServiceUri { get { throw null; } } + public Azure.Core.ResourceIdentifier HyperVFabricArmId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier HyperVSiteId { get { throw null; } } + public System.Uri RcmServiceUri { get { throw null; } } + public string ResourceGroup { get { throw null; } } + public string ResourceLocation { get { throw null; } } + public string SourceGatewayServiceId { get { throw null; } } + public string SourceStorageContainerName { get { throw null; } } + public string StorageAccountId { get { throw null; } set { } } + public string StorageAccountSasSecretName { get { throw null; } set { } } + public string SubscriptionId { get { throw null; } } + public string TargetGatewayServiceId { get { throw null; } } + public string TargetStorageContainerName { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHciReplicationExtensionCustomProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHciReplicationExtensionCustomProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class JobModelCustomPropertiesAffectedObjectDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal JobModelCustomPropertiesAffectedObjectDetails() { } + public string Description { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.JobModelCustomPropertiesAffectedObjectDetailsType? Type { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.JobModelCustomPropertiesAffectedObjectDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.JobModelCustomPropertiesAffectedObjectDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct JobModelCustomPropertiesAffectedObjectDetailsType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public JobModelCustomPropertiesAffectedObjectDetailsType(string value) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.JobModelCustomPropertiesAffectedObjectDetailsType Object { get { throw null; } } + public bool Equals(Azure.ResourceManager.RecoveryServicesDataReplication.Models.JobModelCustomPropertiesAffectedObjectDetailsType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.RecoveryServicesDataReplication.Models.JobModelCustomPropertiesAffectedObjectDetailsType left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.JobModelCustomPropertiesAffectedObjectDetailsType right) { throw null; } + public static implicit operator Azure.ResourceManager.RecoveryServicesDataReplication.Models.JobModelCustomPropertiesAffectedObjectDetailsType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.RecoveryServicesDataReplication.Models.JobModelCustomPropertiesAffectedObjectDetailsType left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.JobModelCustomPropertiesAffectedObjectDetailsType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class PlannedFailover : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PlannedFailover(Azure.ResourceManager.RecoveryServicesDataReplication.Models.PlannedFailoverProperties properties) { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.PlannedFailoverCustomProperties PlannedFailoverCustomProperties { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.PlannedFailover System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.PlannedFailover System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public abstract partial class PlannedFailoverCustomProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected PlannedFailoverCustomProperties() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.PlannedFailoverCustomProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.PlannedFailoverCustomProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PlannedFailoverProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PlannedFailoverProperties(Azure.ResourceManager.RecoveryServicesDataReplication.Models.PlannedFailoverCustomProperties customProperties) { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.PlannedFailoverCustomProperties CustomProperties { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.PlannedFailoverProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.PlannedFailoverProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ProtectedItemActiveLocation : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ProtectedItemActiveLocation(string value) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemActiveLocation Primary { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemActiveLocation Recovery { get { throw null; } } + public bool Equals(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemActiveLocation other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemActiveLocation left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemActiveLocation right) { throw null; } + public static implicit operator Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemActiveLocation (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemActiveLocation left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemActiveLocation right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ProtectedItemDynamicMemoryConfig : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ProtectedItemDynamicMemoryConfig(long maximumMemoryInMegaBytes, long minimumMemoryInMegaBytes, int targetMemoryBufferPercentage) { } + public long MaximumMemoryInMegaBytes { get { throw null; } set { } } + public long MinimumMemoryInMegaBytes { get { throw null; } set { } } + public int TargetMemoryBufferPercentage { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemDynamicMemoryConfig System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemDynamicMemoryConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ProtectedItemJobProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ProtectedItemJobProperties() { } + public string DisplayName { get { throw null; } } + public System.DateTimeOffset? EndOn { get { throw null; } } + public string Id { get { throw null; } } + public string Name { get { throw null; } } + public string ScenarioName { get { throw null; } } + public System.DateTimeOffset? StartOn { get { throw null; } } + public string State { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemJobProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemJobProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class RemotePrivateEndpoint : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public RemotePrivateEndpoint(string id) { } + public System.Collections.Generic.IList ConnectionDetails { get { throw null; } } + public string Id { get { throw null; } set { } } + public System.Collections.Generic.IList ManualPrivateLinkServiceConnections { get { throw null; } } + public System.Collections.Generic.IList PrivateLinkServiceConnections { get { throw null; } } + public System.Collections.Generic.IList PrivateLinkServiceProxies { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.RemotePrivateEndpoint System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.RemotePrivateEndpoint System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class RemotePrivateEndpointConnectionDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public RemotePrivateEndpointConnectionDetails() { } + public string GroupId { get { throw null; } set { } } + public string Id { get { throw null; } set { } } + public string LinkIdentifier { get { throw null; } set { } } + public string MemberName { get { throw null; } set { } } + public string PrivateIPAddress { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.RemotePrivateEndpointConnectionDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.RemotePrivateEndpointConnectionDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class StorageContainerProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public StorageContainerProperties(string name, string clusterSharedVolumePath) { } + public string ClusterSharedVolumePath { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.StorageContainerProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.StorageContainerProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TestFailoverCleanupJobCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobCustomProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal TestFailoverCleanupJobCustomProperties() { } + public string Comments { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.TestFailoverCleanupJobCustomProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.TestFailoverCleanupJobCustomProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TestFailoverJobCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobCustomProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal TestFailoverJobCustomProperties() { } + public System.Collections.Generic.IReadOnlyList ProtectedItemDetails { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.TestFailoverJobCustomProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.TestFailoverJobCustomProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct VmNicSelection : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public VmNicSelection(string value) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection NotSelected { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection SelectedByDefault { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection SelectedByUser { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection SelectedByUserOverride { get { throw null; } } + public bool Equals(Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection right) { throw null; } + public static implicit operator Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection right) { throw null; } + public override string ToString() { throw null; } + } + public partial class VMwareFabricAgentCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationFabricAgentCustomProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public VMwareFabricAgentCustomProperties(string biosId, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationIdentity marsAuthenticationIdentity) { } + public string BiosId { get { throw null; } set { } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationIdentity MarsAuthenticationIdentity { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareFabricAgentCustomProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareFabricAgentCustomProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class VMwareMigrateFabricCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationFabricCustomProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public VMwareMigrateFabricCustomProperties(Azure.Core.ResourceIdentifier vmwareSiteId, Azure.Core.ResourceIdentifier migrationSolutionId) { } + public Azure.Core.ResourceIdentifier MigrationSolutionId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier VmwareSiteId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareMigrateFabricCustomProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareMigrateFabricCustomProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class VMwareToAzStackHciDiskInput : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public VMwareToAzStackHciDiskInput(string diskId, long diskSizeGB, string diskFileFormat, bool isOSDisk) { } + public long? DiskBlockSize { get { throw null; } set { } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationDiskControllerInputs DiskController { get { throw null; } set { } } + public string DiskFileFormat { get { throw null; } set { } } + public string DiskId { get { throw null; } set { } } + public string DiskIdentifier { get { throw null; } set { } } + public long? DiskLogicalSectorSize { get { throw null; } set { } } + public long? DiskPhysicalSectorSize { get { throw null; } set { } } + public long DiskSizeGB { get { throw null; } set { } } + public bool? IsDynamic { get { throw null; } set { } } + public bool IsOSDisk { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier StorageContainerId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzStackHciDiskInput System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzStackHciDiskInput System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class VMwareToAzStackHciEventCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationEventCustomProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal VMwareToAzStackHciEventCustomProperties() { } + public string EventSourceFriendlyName { get { throw null; } } + public string ProtectedItemFriendlyName { get { throw null; } } + public string ServerType { get { throw null; } } + public string SourceApplianceName { get { throw null; } } + public string TargetApplianceName { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzStackHciEventCustomProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzStackHciEventCustomProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class VMwareToAzStackHciNicInput : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public VMwareToAzStackHciNicInput(string nicId, string label, Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection selectionTypeForFailover) { } + public bool? IsMacMigrationEnabled { get { throw null; } set { } } + public bool? IsStaticIPMigrationEnabled { get { throw null; } set { } } + public string Label { get { throw null; } set { } } + public string NetworkName { get { throw null; } } + public string NicId { get { throw null; } set { } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection SelectionTypeForFailover { get { throw null; } set { } } + public string TargetNetworkId { get { throw null; } set { } } + public string TestNetworkId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzStackHciNicInput System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzStackHciNicInput System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class VMwareToAzStackHciPlannedFailoverCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.PlannedFailoverCustomProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public VMwareToAzStackHciPlannedFailoverCustomProperties(bool shutdownSourceVm) { } + public bool ShutdownSourceVm { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzStackHciPlannedFailoverCustomProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzStackHciPlannedFailoverCustomProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class VMwareToAzStackHciPolicyCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPolicyCustomProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public VMwareToAzStackHciPolicyCustomProperties(int recoveryPointHistoryInMinutes, int crashConsistentFrequencyInMinutes, int appConsistentFrequencyInMinutes) { } + public int AppConsistentFrequencyInMinutes { get { throw null; } set { } } + public int CrashConsistentFrequencyInMinutes { get { throw null; } set { } } + public int RecoveryPointHistoryInMinutes { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzStackHciPolicyCustomProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzStackHciPolicyCustomProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class VMwareToAzStackHciProtectedDiskProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal VMwareToAzStackHciProtectedDiskProperties() { } + public long? CapacityInBytes { get { throw null; } } + public long? DiskBlockSize { get { throw null; } } + public long? DiskLogicalSectorSize { get { throw null; } } + public long? DiskPhysicalSectorSize { get { throw null; } } + public string DiskType { get { throw null; } } + public bool? IsDynamic { get { throw null; } } + public bool? IsOSDisk { get { throw null; } } + public string MigrateDiskName { get { throw null; } } + public string SeedDiskName { get { throw null; } } + public string SourceDiskId { get { throw null; } } + public string SourceDiskName { get { throw null; } } + public Azure.Core.ResourceIdentifier StorageContainerId { get { throw null; } } + public string StorageContainerLocalPath { get { throw null; } } + public string TestMigrateDiskName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzStackHciProtectedDiskProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzStackHciProtectedDiskProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class VMwareToAzStackHciProtectedItemCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectedItemCustomProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public VMwareToAzStackHciProtectedItemCustomProperties(Azure.Core.ResourceIdentifier targetHciClusterId, Azure.Core.ResourceIdentifier targetArcClusterCustomLocationId, Azure.Core.ResourceIdentifier storageContainerId, Azure.Core.ResourceIdentifier targetResourceGroupId, string customLocationRegion, System.Collections.Generic.IEnumerable disksToInclude, System.Collections.Generic.IEnumerable nicsToInclude, string hyperVGeneration, Azure.Core.ResourceIdentifier fabricDiscoveryMachineId, string runAsAccountId, string sourceFabricAgentName, string targetFabricAgentName) { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemActiveLocation? ActiveLocation { get { throw null; } } + public string CustomLocationRegion { get { throw null; } set { } } + public System.Collections.Generic.IList DisksToInclude { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemDynamicMemoryConfig DynamicMemoryConfig { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier FabricDiscoveryMachineId { get { throw null; } set { } } + public string FailoverRecoveryPointId { get { throw null; } } + public string FirmwareType { get { throw null; } } + public string HyperVGeneration { get { throw null; } set { } } + public int? InitialReplicationProgressPercentage { get { throw null; } } + public bool? IsDynamicRam { get { throw null; } set { } } + public string LastRecoveryPointId { get { throw null; } } + public System.DateTimeOffset? LastRecoveryPointReceivedOn { get { throw null; } } + public System.DateTimeOffset? LastReplicationUpdateOn { get { throw null; } } + public int? MigrationProgressPercentage { get { throw null; } } + public System.Collections.Generic.IList NicsToInclude { get { throw null; } } + public string OSName { get { throw null; } } + public string OSType { get { throw null; } } + public bool? PerformAutoResync { get { throw null; } set { } } + public System.Collections.Generic.IReadOnlyList ProtectedDisks { get { throw null; } } + public System.Collections.Generic.IReadOnlyList ProtectedNics { get { throw null; } } + public int? ResumeProgressPercentage { get { throw null; } } + public long? ResumeRetryCount { get { throw null; } } + public int? ResyncProgressPercentage { get { throw null; } } + public bool? ResyncRequired { get { throw null; } } + public long? ResyncRetryCount { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzureMigrateResyncState? ResyncState { get { throw null; } } + public string RunAsAccountId { get { throw null; } set { } } + public string SourceApplianceName { get { throw null; } } + public int? SourceCpuCores { get { throw null; } } + public string SourceFabricAgentName { get { throw null; } set { } } + public double? SourceMemoryInMegaBytes { get { throw null; } } + public string SourceVmName { get { throw null; } } + public Azure.Core.ResourceIdentifier StorageContainerId { get { throw null; } set { } } + public string TargetApplianceName { get { throw null; } } + public Azure.Core.ResourceIdentifier TargetArcClusterCustomLocationId { get { throw null; } set { } } + public string TargetAzStackHciClusterName { get { throw null; } } + public int? TargetCpuCores { get { throw null; } set { } } + public string TargetFabricAgentName { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier TargetHciClusterId { get { throw null; } set { } } + public string TargetLocation { get { throw null; } } + public int? TargetMemoryInMegaBytes { get { throw null; } set { } } + public string TargetNetworkId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier TargetResourceGroupId { get { throw null; } set { } } + public string TargetVmBiosId { get { throw null; } } + public string TargetVmName { get { throw null; } set { } } + public string TestNetworkId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzStackHciProtectedItemCustomProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzStackHciProtectedItemCustomProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class VMwareToAzStackHciProtectedItemCustomPropertiesUpdate : Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectedItemCustomPropertiesUpdate, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public VMwareToAzStackHciProtectedItemCustomPropertiesUpdate() { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemDynamicMemoryConfig DynamicMemoryConfig { get { throw null; } set { } } + public bool? IsDynamicRam { get { throw null; } set { } } + public System.Collections.Generic.IList NicsToInclude { get { throw null; } } + public string OSType { get { throw null; } set { } } + public int? TargetCpuCores { get { throw null; } set { } } + public int? TargetMemoryInMegaBytes { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzStackHciProtectedItemCustomPropertiesUpdate System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzStackHciProtectedItemCustomPropertiesUpdate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class VMwareToAzStackHciProtectedNicProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal VMwareToAzStackHciProtectedNicProperties() { } + public bool? IsPrimaryNic { get { throw null; } } + public string Label { get { throw null; } } + public string MacAddress { get { throw null; } } + public string NetworkName { get { throw null; } } + public string NicId { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection? SelectionTypeForFailover { get { throw null; } } + public string TargetNetworkId { get { throw null; } } + public string TestNetworkId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzStackHciProtectedNicProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzStackHciProtectedNicProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class VMwareToAzStackHciRecoveryPointCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationRecoveryPointCustomProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal VMwareToAzStackHciRecoveryPointCustomProperties() { } + public System.Collections.Generic.IReadOnlyList DiskIds { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzStackHciRecoveryPointCustomProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzStackHciRecoveryPointCustomProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class VMwareToAzStackHciReplicationExtensionCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationExtensionCustomProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public VMwareToAzStackHciReplicationExtensionCustomProperties(Azure.Core.ResourceIdentifier vmwareFabricArmId, Azure.Core.ResourceIdentifier azStackHciFabricArmId) { } + public System.Uri AsrServiceUri { get { throw null; } } + public Azure.Core.ResourceIdentifier AzStackHciFabricArmId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier AzStackHciSiteId { get { throw null; } } + public System.Uri GatewayServiceUri { get { throw null; } } + public System.Uri RcmServiceUri { get { throw null; } } + public string ResourceGroup { get { throw null; } } + public string ResourceLocation { get { throw null; } } + public string SourceGatewayServiceId { get { throw null; } } + public string SourceStorageContainerName { get { throw null; } } + public string StorageAccountId { get { throw null; } set { } } + public string StorageAccountSasSecretName { get { throw null; } set { } } + public string SubscriptionId { get { throw null; } } + public string TargetGatewayServiceId { get { throw null; } } + public string TargetStorageContainerName { get { throw null; } } + public Azure.Core.ResourceIdentifier VmwareFabricArmId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier VmwareSiteId { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzStackHciReplicationExtensionCustomProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzStackHciReplicationExtensionCustomProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct VMwareToAzureMigrateResyncState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public VMwareToAzureMigrateResyncState(string value) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzureMigrateResyncState None { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzureMigrateResyncState PreparedForResynchronization { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzureMigrateResyncState StartedResynchronization { get { throw null; } } + public bool Equals(Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzureMigrateResyncState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzureMigrateResyncState left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzureMigrateResyncState right) { throw null; } + public static implicit operator Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzureMigrateResyncState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzureMigrateResyncState left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzureMigrateResyncState right) { throw null; } + public override string ToString() { throw null; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/api/Azure.ResourceManager.RecoveryServicesDataReplication.netstandard2.0.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/api/Azure.ResourceManager.RecoveryServicesDataReplication.netstandard2.0.cs new file mode 100644 index 000000000000..b1039fce0a9e --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/api/Azure.ResourceManager.RecoveryServicesDataReplication.netstandard2.0.cs @@ -0,0 +1,2383 @@ +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + public partial class DataReplicationEmailConfigurationCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DataReplicationEmailConfigurationCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string emailConfigurationName, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationEmailConfigurationData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string emailConfigurationName, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationEmailConfigurationData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string emailConfigurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string emailConfigurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string emailConfigurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string emailConfigurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string emailConfigurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string emailConfigurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class DataReplicationEmailConfigurationData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataReplicationEmailConfigurationData() { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationEmailConfigurationProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationEmailConfigurationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationEmailConfigurationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataReplicationEmailConfigurationResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DataReplicationEmailConfigurationResource() { } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationEmailConfigurationData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string vaultName, string emailConfigurationName) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationEmailConfigurationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationEmailConfigurationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationEmailConfigurationData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationEmailConfigurationData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class DataReplicationEventCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DataReplicationEventCollection() { } + public virtual Azure.Response Exists(string eventName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string eventName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string eventName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string odataOptions = null, string continuationToken = null, int? pageSize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string odataOptions = null, string continuationToken = null, int? pageSize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string eventName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string eventName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string eventName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class DataReplicationEventData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DataReplicationEventData() { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationEventProperties Properties { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationEventData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataReplicationEventResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DataReplicationEventResource() { } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationEventData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string vaultName, string eventName) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationEventData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataReplicationExtensionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DataReplicationExtensionCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string replicationExtensionName, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationExtensionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string replicationExtensionName, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationExtensionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string replicationExtensionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string replicationExtensionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string replicationExtensionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string replicationExtensionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string replicationExtensionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string replicationExtensionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class DataReplicationExtensionData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataReplicationExtensionData() { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationExtensionProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationExtensionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationExtensionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataReplicationExtensionResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DataReplicationExtensionResource() { } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationExtensionData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string vaultName, string replicationExtensionName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationExtensionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationExtensionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationExtensionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationExtensionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class DataReplicationFabricAgentCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DataReplicationFabricAgentCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string fabricAgentName, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationFabricAgentData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string fabricAgentName, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationFabricAgentData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string fabricAgentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string fabricAgentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string fabricAgentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string fabricAgentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string fabricAgentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string fabricAgentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class DataReplicationFabricAgentData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataReplicationFabricAgentData() { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationFabricAgentProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationFabricAgentData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationFabricAgentData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataReplicationFabricAgentResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DataReplicationFabricAgentResource() { } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationFabricAgentData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string fabricName, string fabricAgentName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationFabricAgentData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationFabricAgentData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationFabricAgentData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationFabricAgentData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class DataReplicationFabricCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DataReplicationFabricCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string fabricName, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationFabricData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string fabricName, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationFabricData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string fabricName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string fabricName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string fabricName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string continuationToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string continuationToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string fabricName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string fabricName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string fabricName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class DataReplicationFabricData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataReplicationFabricData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationFabricProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationFabricData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationFabricData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataReplicationFabricResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DataReplicationFabricResource() { } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationFabricData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string fabricName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetDataReplicationFabricAgent(string fabricAgentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDataReplicationFabricAgentAsync(string fabricAgentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationFabricAgentCollection GetDataReplicationFabricAgents() { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationFabricData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationFabricData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationFabricPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationFabricPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class DataReplicationJobCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DataReplicationJobCollection() { } + public virtual Azure.Response Exists(string jobName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string jobName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string jobName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string odataOptions = null, string continuationToken = null, int? pageSize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string odataOptions = null, string continuationToken = null, int? pageSize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string jobName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string jobName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string jobName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class DataReplicationJobData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DataReplicationJobData() { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobProperties Properties { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationJobData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationJobData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataReplicationJobResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DataReplicationJobResource() { } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationJobData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string vaultName, string jobName) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationJobData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationJobData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataReplicationPolicyCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DataReplicationPolicyCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string policyName, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string policyName, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string policyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string policyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string policyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string policyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string policyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string policyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class DataReplicationPolicyData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataReplicationPolicyData() { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPolicyProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPolicyData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPolicyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataReplicationPolicyResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DataReplicationPolicyResource() { } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPolicyData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string vaultName, string policyName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPolicyData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPolicyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPolicyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class DataReplicationPrivateEndpointConnectionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DataReplicationPrivateEndpointConnectionCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string privateEndpointConnectionName, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPrivateEndpointConnectionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string privateEndpointConnectionName, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPrivateEndpointConnectionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class DataReplicationPrivateEndpointConnectionData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataReplicationPrivateEndpointConnectionData() { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPrivateEndpointConnectionProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPrivateEndpointConnectionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPrivateEndpointConnectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataReplicationPrivateEndpointConnectionProxyCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DataReplicationPrivateEndpointConnectionProxyCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string privateEndpointConnectionProxyName, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPrivateEndpointConnectionProxyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string privateEndpointConnectionProxyName, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPrivateEndpointConnectionProxyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string privateEndpointConnectionProxyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string privateEndpointConnectionProxyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string privateEndpointConnectionProxyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string privateEndpointConnectionProxyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string privateEndpointConnectionProxyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string privateEndpointConnectionProxyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class DataReplicationPrivateEndpointConnectionProxyData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataReplicationPrivateEndpointConnectionProxyData() { } + public Azure.ETag? ETag { get { throw null; } set { } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPrivateEndpointConnectionProxyProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPrivateEndpointConnectionProxyData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPrivateEndpointConnectionProxyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataReplicationPrivateEndpointConnectionProxyResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DataReplicationPrivateEndpointConnectionProxyResource() { } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPrivateEndpointConnectionProxyData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string vaultName, string privateEndpointConnectionProxyName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPrivateEndpointConnectionProxyData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPrivateEndpointConnectionProxyData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPrivateEndpointConnectionProxyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPrivateEndpointConnectionProxyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Validate(Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPrivateEndpointConnectionProxyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ValidateAsync(Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPrivateEndpointConnectionProxyData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class DataReplicationPrivateEndpointConnectionResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DataReplicationPrivateEndpointConnectionResource() { } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPrivateEndpointConnectionData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string vaultName, string privateEndpointConnectionName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPrivateEndpointConnectionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPrivateEndpointConnectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPrivateEndpointConnectionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPrivateEndpointConnectionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class DataReplicationPrivateLinkResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DataReplicationPrivateLinkResource() { } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPrivateLinkResourceData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string vaultName, string privateLinkResourceName) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPrivateLinkResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPrivateLinkResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataReplicationPrivateLinkResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DataReplicationPrivateLinkResourceCollection() { } + public virtual Azure.Response Exists(string privateLinkResourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string privateLinkResourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string privateLinkResourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string privateLinkResourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string privateLinkResourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string privateLinkResourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class DataReplicationPrivateLinkResourceData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DataReplicationPrivateLinkResourceData() { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPrivateLinkResourceProperties Properties { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPrivateLinkResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPrivateLinkResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataReplicationProtectedItemCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DataReplicationProtectedItemCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string protectedItemName, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationProtectedItemData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string protectedItemName, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationProtectedItemData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string protectedItemName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string protectedItemName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string protectedItemName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string odataOptions = null, string continuationToken = null, int? pageSize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string odataOptions = null, string continuationToken = null, int? pageSize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string protectedItemName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string protectedItemName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string protectedItemName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class DataReplicationProtectedItemData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataReplicationProtectedItemData() { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectedItemProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationProtectedItemData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationProtectedItemData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataReplicationProtectedItemResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DataReplicationProtectedItemResource() { } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationProtectedItemData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, bool? forceDelete = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, bool? forceDelete = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetDataReplicationRecoveryPoint(string recoveryPointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDataReplicationRecoveryPointAsync(string recoveryPointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationRecoveryPointCollection GetDataReplicationRecoveryPoints() { throw null; } + public virtual Azure.ResourceManager.ArmOperation PlannedFailover(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.Models.PlannedFailover body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> PlannedFailoverAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.Models.PlannedFailover body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationProtectedItemData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationProtectedItemData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectedItemPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectedItemPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class DataReplicationRecoveryPointCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DataReplicationRecoveryPointCollection() { } + public virtual Azure.Response Exists(string recoveryPointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string recoveryPointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string recoveryPointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string recoveryPointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string recoveryPointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string recoveryPointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class DataReplicationRecoveryPointData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DataReplicationRecoveryPointData() { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationRecoveryPointProperties Properties { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationRecoveryPointData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationRecoveryPointData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataReplicationRecoveryPointResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DataReplicationRecoveryPointResource() { } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationRecoveryPointData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, string recoveryPointName) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationRecoveryPointData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationRecoveryPointData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataReplicationVaultCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DataReplicationVaultCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string vaultName, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationVaultData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string vaultName, Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationVaultData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string vaultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string vaultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string vaultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string continuationToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string continuationToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string vaultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string vaultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string vaultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class DataReplicationVaultData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataReplicationVaultData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationVaultProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationVaultData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationVaultData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataReplicationVaultResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DataReplicationVaultResource() { } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationVaultData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string vaultName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetDataReplicationEmailConfiguration(string emailConfigurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDataReplicationEmailConfigurationAsync(string emailConfigurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationEmailConfigurationCollection GetDataReplicationEmailConfigurations() { throw null; } + public virtual Azure.Response GetDataReplicationEvent(string eventName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDataReplicationEventAsync(string eventName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationEventCollection GetDataReplicationEvents() { throw null; } + public virtual Azure.Response GetDataReplicationExtension(string replicationExtensionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDataReplicationExtensionAsync(string replicationExtensionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationExtensionCollection GetDataReplicationExtensions() { throw null; } + public virtual Azure.Response GetDataReplicationJob(string jobName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDataReplicationJobAsync(string jobName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationJobCollection GetDataReplicationJobs() { throw null; } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPolicyCollection GetDataReplicationPolicies() { throw null; } + public virtual Azure.Response GetDataReplicationPolicy(string policyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDataReplicationPolicyAsync(string policyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetDataReplicationPrivateEndpointConnection(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDataReplicationPrivateEndpointConnectionAsync(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPrivateEndpointConnectionProxyCollection GetDataReplicationPrivateEndpointConnectionProxies() { throw null; } + public virtual Azure.Response GetDataReplicationPrivateEndpointConnectionProxy(string privateEndpointConnectionProxyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDataReplicationPrivateEndpointConnectionProxyAsync(string privateEndpointConnectionProxyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPrivateEndpointConnectionCollection GetDataReplicationPrivateEndpointConnections() { throw null; } + public virtual Azure.Response GetDataReplicationPrivateLinkResource(string privateLinkResourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDataReplicationPrivateLinkResourceAsync(string privateLinkResourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPrivateLinkResourceCollection GetDataReplicationPrivateLinkResources() { throw null; } + public virtual Azure.Response GetDataReplicationProtectedItem(string protectedItemName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDataReplicationProtectedItemAsync(string protectedItemName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationProtectedItemCollection GetDataReplicationProtectedItems() { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationVaultData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationVaultData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationVaultPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationVaultPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public static partial class RecoveryServicesDataReplicationExtensions + { + public static Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationEmailConfigurationResource GetDataReplicationEmailConfigurationResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationEventResource GetDataReplicationEventResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationExtensionResource GetDataReplicationExtensionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Response GetDataReplicationFabric(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string fabricName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationFabricAgentResource GetDataReplicationFabricAgentResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static System.Threading.Tasks.Task> GetDataReplicationFabricAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string fabricName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationFabricResource GetDataReplicationFabricResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationFabricCollection GetDataReplicationFabrics(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetDataReplicationFabrics(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetDataReplicationFabricsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationJobResource GetDataReplicationJobResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPolicyResource GetDataReplicationPolicyResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPrivateEndpointConnectionProxyResource GetDataReplicationPrivateEndpointConnectionProxyResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPrivateEndpointConnectionResource GetDataReplicationPrivateEndpointConnectionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPrivateLinkResource GetDataReplicationPrivateLinkResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationProtectedItemResource GetDataReplicationProtectedItemResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationRecoveryPointResource GetDataReplicationRecoveryPointResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Response GetDataReplicationVault(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string vaultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetDataReplicationVaultAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string vaultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationVaultResource GetDataReplicationVaultResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationVaultCollection GetDataReplicationVaults(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetDataReplicationVaults(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetDataReplicationVaultsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response PostCheckNameAvailability(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationNameAvailabilityContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> PostCheckNameAvailabilityAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationNameAvailabilityContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response PostDeploymentPreflight(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string deploymentId, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DeploymentPreflight body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> PostDeploymentPreflightAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string deploymentId, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DeploymentPreflight body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Mocking +{ + public partial class MockableRecoveryServicesDataReplicationArmClient : Azure.ResourceManager.ArmResource + { + protected MockableRecoveryServicesDataReplicationArmClient() { } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationEmailConfigurationResource GetDataReplicationEmailConfigurationResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationEventResource GetDataReplicationEventResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationExtensionResource GetDataReplicationExtensionResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationFabricAgentResource GetDataReplicationFabricAgentResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationFabricResource GetDataReplicationFabricResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationJobResource GetDataReplicationJobResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPolicyResource GetDataReplicationPolicyResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPrivateEndpointConnectionProxyResource GetDataReplicationPrivateEndpointConnectionProxyResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPrivateEndpointConnectionResource GetDataReplicationPrivateEndpointConnectionResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPrivateLinkResource GetDataReplicationPrivateLinkResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationProtectedItemResource GetDataReplicationProtectedItemResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationRecoveryPointResource GetDataReplicationRecoveryPointResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationVaultResource GetDataReplicationVaultResource(Azure.Core.ResourceIdentifier id) { throw null; } + } + public partial class MockableRecoveryServicesDataReplicationResourceGroupResource : Azure.ResourceManager.ArmResource + { + protected MockableRecoveryServicesDataReplicationResourceGroupResource() { } + public virtual Azure.Response GetDataReplicationFabric(string fabricName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDataReplicationFabricAsync(string fabricName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationFabricCollection GetDataReplicationFabrics() { throw null; } + public virtual Azure.Response GetDataReplicationVault(string vaultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDataReplicationVaultAsync(string vaultName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationVaultCollection GetDataReplicationVaults() { throw null; } + public virtual Azure.Response PostDeploymentPreflight(string deploymentId, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DeploymentPreflight body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> PostDeploymentPreflightAsync(string deploymentId, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DeploymentPreflight body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class MockableRecoveryServicesDataReplicationSubscriptionResource : Azure.ResourceManager.ArmResource + { + protected MockableRecoveryServicesDataReplicationSubscriptionResource() { } + public virtual Azure.Pageable GetDataReplicationFabrics(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetDataReplicationFabricsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetDataReplicationVaults(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetDataReplicationVaultsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response PostCheckNameAvailability(Azure.Core.AzureLocation location, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationNameAvailabilityContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> PostCheckNameAvailabilityAsync(Azure.Core.AzureLocation location, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationNameAvailabilityContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public static partial class ArmRecoveryServicesDataReplicationModelFactory + { + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.AzStackHciFabricCustomProperties AzStackHciFabricCustomProperties(Azure.Core.ResourceIdentifier azStackHciSiteId = null, System.Collections.Generic.IEnumerable applianceName = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.AzStackHciClusterProperties cluster = null, Azure.Core.ResourceIdentifier fabricResourceId = null, Azure.Core.ResourceIdentifier fabricContainerId = null, Azure.Core.ResourceIdentifier migrationSolutionId = null, System.Uri migrationHubUri = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationEmailConfigurationData DataReplicationEmailConfigurationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationEmailConfigurationProperties properties = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationEmailConfigurationProperties DataReplicationEmailConfigurationProperties(bool sendToOwners = false, System.Collections.Generic.IEnumerable customEmailAddresses = null, string locale = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState? provisioningState = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState?)) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationErrorInfo DataReplicationErrorInfo(string code = null, string type = null, string severity = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), string message = null, string causes = null, string recommendation = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationEventData DataReplicationEventData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationEventProperties properties = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationEventProperties DataReplicationEventProperties(Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), string resourceName = null, string eventType = null, string eventName = null, System.DateTimeOffset? occurredOn = default(System.DateTimeOffset?), string severity = null, string description = null, string correlationId = null, System.Collections.Generic.IEnumerable healthErrors = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationEventCustomProperties customProperties = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState? provisioningState = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState?)) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationExtensionData DataReplicationExtensionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationExtensionProperties properties = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationExtensionProperties DataReplicationExtensionProperties(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState? provisioningState = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState?), Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationExtensionCustomProperties customProperties = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationFabricAgentData DataReplicationFabricAgentData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationFabricAgentProperties properties = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationFabricAgentProperties DataReplicationFabricAgentProperties(string correlationId = null, string machineId = null, string machineName = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationIdentity authenticationIdentity = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationIdentity resourceAccessIdentity = null, bool? isResponsive = default(bool?), System.DateTimeOffset? lastHeartbeatOn = default(System.DateTimeOffset?), string versionNumber = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState? provisioningState = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState?), System.Collections.Generic.IEnumerable healthErrors = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationFabricAgentCustomProperties customProperties = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationFabricData DataReplicationFabricData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationFabricProperties properties = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationFabricPatch DataReplicationFabricPatch(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationFabricProperties properties = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationFabricProperties DataReplicationFabricProperties(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState? provisioningState = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState?), string serviceEndpoint = null, Azure.Core.ResourceIdentifier serviceResourceId = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationHealthStatus? health = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationHealthStatus?), System.Collections.Generic.IEnumerable healthErrors = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationFabricCustomProperties customProperties = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationHealthErrorInfo DataReplicationHealthErrorInfo(Azure.Core.ResourceType? affectedResourceType = default(Azure.Core.ResourceType?), System.Collections.Generic.IEnumerable affectedResourceCorrelationIds = null, System.Collections.Generic.IEnumerable childErrors = null, string code = null, string healthCategory = null, string category = null, string severity = null, string source = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), bool? isCustomerResolvable = default(bool?), string summary = null, string message = null, string causes = null, string recommendation = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationInnerHealthErrorInfo DataReplicationInnerHealthErrorInfo(string code = null, string healthCategory = null, string category = null, string severity = null, string source = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), bool? isCustomerResolvable = default(bool?), string summary = null, string message = null, string causes = null, string recommendation = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobCustomProperties DataReplicationJobCustomProperties(string instanceType = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.JobModelCustomPropertiesAffectedObjectDetails affectedObjectDetails = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationJobData DataReplicationJobData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobProperties properties = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobProperties DataReplicationJobProperties(string displayName = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobState? state = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobState?), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), string objectId = null, string objectName = null, string objectInternalId = null, string objectInternalName = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobObjectType? objectType = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobObjectType?), string replicationProviderId = null, string sourceFabricProviderId = null, string targetFabricProviderId = null, System.Collections.Generic.IEnumerable allowedActions = null, string activityId = null, System.Collections.Generic.IEnumerable tasks = null, System.Collections.Generic.IEnumerable errors = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobCustomProperties customProperties = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState? provisioningState = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState?)) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationNameAvailabilityResult DataReplicationNameAvailabilityResult(bool? isNameAvailable = default(bool?), string reason = null, string message = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPolicyData DataReplicationPolicyData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPolicyProperties properties = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPolicyProperties DataReplicationPolicyProperties(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState? provisioningState = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState?), Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPolicyCustomProperties customProperties = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPrivateEndpointConnectionData DataReplicationPrivateEndpointConnectionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPrivateEndpointConnectionProperties properties = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPrivateEndpointConnectionProperties DataReplicationPrivateEndpointConnectionProperties(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState? provisioningState = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState?), Azure.Core.ResourceIdentifier privateEndpointId = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPrivateLinkServiceConnectionState privateLinkServiceConnectionState = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPrivateEndpointConnectionProxyData DataReplicationPrivateEndpointConnectionProxyData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPrivateEndpointConnectionProxyProperties properties = null, Azure.ETag? etag = default(Azure.ETag?)) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPrivateEndpointConnectionProxyProperties DataReplicationPrivateEndpointConnectionProxyProperties(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState? provisioningState = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState?), Azure.ResourceManager.RecoveryServicesDataReplication.Models.RemotePrivateEndpoint remotePrivateEndpoint = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationPrivateLinkResourceData DataReplicationPrivateLinkResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPrivateLinkResourceProperties properties = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPrivateLinkResourceProperties DataReplicationPrivateLinkResourceProperties(string groupId = null, System.Collections.Generic.IEnumerable requiredMembers = null, System.Collections.Generic.IEnumerable requiredZoneNames = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState? provisioningState = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState?)) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationProtectedItemData DataReplicationProtectedItemData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectedItemProperties properties = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectedItemPatch DataReplicationProtectedItemPatch(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectedItemCustomPropertiesUpdate customProperties = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectedItemProperties DataReplicationProtectedItemProperties(string policyName = null, string replicationExtensionName = null, string correlationId = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState? provisioningState = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState?), Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState? protectionState = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState?), string protectionStateDescription = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTestFailoverState? testFailoverState = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTestFailoverState?), string testFailoverStateDescription = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationResynchronizationState? resynchronizationState = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationResynchronizationState?), string fabricObjectId = null, string fabricObjectName = null, string sourceFabricProviderId = null, string targetFabricProviderId = null, string fabricId = null, string targetFabricId = null, string fabricAgentId = null, string targetFabricAgentId = null, bool? isResyncRequired = default(bool?), System.DateTimeOffset? lastSuccessfulPlannedFailoverOn = default(System.DateTimeOffset?), System.DateTimeOffset? lastSuccessfulUnplannedFailoverOn = default(System.DateTimeOffset?), System.DateTimeOffset? lastSuccessfulTestFailoverOn = default(System.DateTimeOffset?), Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemJobProperties currentJob = null, System.Collections.Generic.IEnumerable allowedJobs = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemJobProperties lastFailedEnableProtectionJob = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemJobProperties lastFailedPlannedFailoverJob = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemJobProperties lastTestFailoverJob = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationHealthStatus? replicationHealth = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationHealthStatus?), System.Collections.Generic.IEnumerable healthErrors = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectedItemCustomProperties customProperties = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationRecoveryPointData DataReplicationRecoveryPointData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationRecoveryPointProperties properties = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationRecoveryPointProperties DataReplicationRecoveryPointProperties(System.DateTimeOffset recoveryPointOn = default(System.DateTimeOffset), Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationRecoveryPointType recoveryPointType = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationRecoveryPointType), Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationRecoveryPointCustomProperties customProperties = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState? provisioningState = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState?)) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTask DataReplicationTask(string taskName = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTaskState? state = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTaskState?), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), string customInstanceType = null, System.Collections.Generic.IEnumerable childrenJobs = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.DataReplicationVaultData DataReplicationVaultData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationVaultProperties properties = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationVaultPatch DataReplicationVaultPatch(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationVaultProperties properties = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationVaultProperties DataReplicationVaultProperties(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState? provisioningState = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState?), Azure.Core.ResourceIdentifier serviceResourceId = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationVaultType? vaultType = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationVaultType?)) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.FailoverJobCustomProperties FailoverJobCustomProperties(Azure.ResourceManager.RecoveryServicesDataReplication.Models.JobModelCustomPropertiesAffectedObjectDetails affectedObjectDetails = null, System.Collections.Generic.IEnumerable protectedItemDetails = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.FailoverProtectedItemProperties FailoverProtectedItemProperties(string protectedItemName = null, string vmName = null, string testVmName = null, string recoveryPointId = null, System.DateTimeOffset? recoveryPointOn = default(System.DateTimeOffset?), string networkName = null, string subnet = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVMigrateFabricCustomProperties HyperVMigrateFabricCustomProperties(Azure.Core.ResourceIdentifier hyperVSiteId = null, Azure.Core.ResourceIdentifier fabricResourceId = null, Azure.Core.ResourceIdentifier fabricContainerId = null, Azure.Core.ResourceIdentifier migrationSolutionId = null, System.Uri migrationHubUri = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHciEventCustomProperties HyperVToAzStackHciEventCustomProperties(string eventSourceFriendlyName = null, string protectedItemFriendlyName = null, string sourceApplianceName = null, string targetApplianceName = null, string serverType = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHciNicInput HyperVToAzStackHciNicInput(string nicId = null, string networkName = null, string targetNetworkId = null, string testNetworkId = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection selectionTypeForFailover = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection), bool? isStaticIPMigrationEnabled = default(bool?), bool? isMacMigrationEnabled = default(bool?)) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHciProtectedDiskProperties HyperVToAzStackHciProtectedDiskProperties(Azure.Core.ResourceIdentifier storageContainerId = null, string storageContainerLocalPath = null, string sourceDiskId = null, string sourceDiskName = null, string seedDiskName = null, string testMigrateDiskName = null, string migrateDiskName = null, bool? isOSDisk = default(bool?), long? capacityInBytes = default(long?), bool? isDynamic = default(bool?), string diskType = null, long? diskBlockSize = default(long?), long? diskLogicalSectorSize = default(long?), long? diskPhysicalSectorSize = default(long?)) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHciProtectedItemCustomProperties HyperVToAzStackHciProtectedItemCustomProperties(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemActiveLocation? activeLocation = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemActiveLocation?), Azure.Core.ResourceIdentifier targetHciClusterId = null, Azure.Core.ResourceIdentifier targetArcClusterCustomLocationId = null, string targetAzStackHciClusterName = null, Azure.Core.ResourceIdentifier fabricDiscoveryMachineId = null, System.Collections.Generic.IEnumerable disksToInclude = null, System.Collections.Generic.IEnumerable nicsToInclude = null, string sourceVmName = null, int? sourceCpuCores = default(int?), double? sourceMemoryInMegaBytes = default(double?), string targetVmName = null, Azure.Core.ResourceIdentifier targetResourceGroupId = null, Azure.Core.ResourceIdentifier storageContainerId = null, string hyperVGeneration = null, string targetNetworkId = null, string testNetworkId = null, int? targetCpuCores = default(int?), bool? isDynamicRam = default(bool?), Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemDynamicMemoryConfig dynamicMemoryConfig = null, int? targetMemoryInMegaBytes = default(int?), string runAsAccountId = null, string sourceFabricAgentName = null, string targetFabricAgentName = null, string sourceApplianceName = null, string targetApplianceName = null, string osType = null, string osName = null, string firmwareType = null, string targetLocation = null, string customLocationRegion = null, string failoverRecoveryPointId = null, System.DateTimeOffset? lastRecoveryPointReceivedOn = default(System.DateTimeOffset?), string lastRecoveryPointId = null, int? initialReplicationProgressPercentage = default(int?), int? resyncProgressPercentage = default(int?), System.Collections.Generic.IEnumerable protectedDisks = null, System.Collections.Generic.IEnumerable protectedNics = null, string targetVmBiosId = null, System.DateTimeOffset? lastReplicationUpdateOn = default(System.DateTimeOffset?)) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHciProtectedNicProperties HyperVToAzStackHciProtectedNicProperties(string nicId = null, string macAddress = null, string networkName = null, string targetNetworkId = null, string testNetworkId = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection? selectionTypeForFailover = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection?)) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHciRecoveryPointCustomProperties HyperVToAzStackHciRecoveryPointCustomProperties(System.Collections.Generic.IEnumerable diskIds = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHciReplicationExtensionCustomProperties HyperVToAzStackHciReplicationExtensionCustomProperties(Azure.Core.ResourceIdentifier hyperVFabricArmId = null, Azure.Core.ResourceIdentifier hyperVSiteId = null, Azure.Core.ResourceIdentifier azStackHciFabricArmId = null, Azure.Core.ResourceIdentifier azStackHciSiteId = null, string storageAccountId = null, string storageAccountSasSecretName = null, System.Uri asrServiceUri = null, System.Uri rcmServiceUri = null, System.Uri gatewayServiceUri = null, string sourceGatewayServiceId = null, string targetGatewayServiceId = null, string sourceStorageContainerName = null, string targetStorageContainerName = null, string resourceLocation = null, string subscriptionId = null, string resourceGroup = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.JobModelCustomPropertiesAffectedObjectDetails JobModelCustomPropertiesAffectedObjectDetails(string description = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.JobModelCustomPropertiesAffectedObjectDetailsType? type = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.JobModelCustomPropertiesAffectedObjectDetailsType?)) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemJobProperties ProtectedItemJobProperties(string scenarioName = null, string id = null, string name = null, string displayName = null, string state = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?)) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.TestFailoverCleanupJobCustomProperties TestFailoverCleanupJobCustomProperties(Azure.ResourceManager.RecoveryServicesDataReplication.Models.JobModelCustomPropertiesAffectedObjectDetails affectedObjectDetails = null, string comments = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.TestFailoverJobCustomProperties TestFailoverJobCustomProperties(Azure.ResourceManager.RecoveryServicesDataReplication.Models.JobModelCustomPropertiesAffectedObjectDetails affectedObjectDetails = null, System.Collections.Generic.IEnumerable protectedItemDetails = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzStackHciEventCustomProperties VMwareToAzStackHciEventCustomProperties(string eventSourceFriendlyName = null, string protectedItemFriendlyName = null, string sourceApplianceName = null, string targetApplianceName = null, string serverType = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzStackHciNicInput VMwareToAzStackHciNicInput(string nicId = null, string label = null, string networkName = null, string targetNetworkId = null, string testNetworkId = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection selectionTypeForFailover = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection), bool? isStaticIPMigrationEnabled = default(bool?), bool? isMacMigrationEnabled = default(bool?)) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzStackHciProtectedDiskProperties VMwareToAzStackHciProtectedDiskProperties(Azure.Core.ResourceIdentifier storageContainerId = null, string storageContainerLocalPath = null, string sourceDiskId = null, string sourceDiskName = null, string seedDiskName = null, string testMigrateDiskName = null, string migrateDiskName = null, bool? isOSDisk = default(bool?), long? capacityInBytes = default(long?), bool? isDynamic = default(bool?), string diskType = null, long? diskBlockSize = default(long?), long? diskLogicalSectorSize = default(long?), long? diskPhysicalSectorSize = default(long?)) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzStackHciProtectedItemCustomProperties VMwareToAzStackHciProtectedItemCustomProperties(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemActiveLocation? activeLocation = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemActiveLocation?), Azure.Core.ResourceIdentifier targetHciClusterId = null, Azure.Core.ResourceIdentifier targetArcClusterCustomLocationId = null, string targetAzStackHciClusterName = null, Azure.Core.ResourceIdentifier storageContainerId = null, Azure.Core.ResourceIdentifier targetResourceGroupId = null, string targetLocation = null, string customLocationRegion = null, System.Collections.Generic.IEnumerable disksToInclude = null, System.Collections.Generic.IEnumerable nicsToInclude = null, System.Collections.Generic.IEnumerable protectedDisks = null, System.Collections.Generic.IEnumerable protectedNics = null, string targetVmBiosId = null, string targetVmName = null, string hyperVGeneration = null, string targetNetworkId = null, string testNetworkId = null, int? targetCpuCores = default(int?), bool? isDynamicRam = default(bool?), Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemDynamicMemoryConfig dynamicMemoryConfig = null, int? targetMemoryInMegaBytes = default(int?), string osType = null, string osName = null, string firmwareType = null, Azure.Core.ResourceIdentifier fabricDiscoveryMachineId = null, string sourceVmName = null, int? sourceCpuCores = default(int?), double? sourceMemoryInMegaBytes = default(double?), string runAsAccountId = null, string sourceFabricAgentName = null, string targetFabricAgentName = null, string sourceApplianceName = null, string targetApplianceName = null, string failoverRecoveryPointId = null, System.DateTimeOffset? lastRecoveryPointReceivedOn = default(System.DateTimeOffset?), string lastRecoveryPointId = null, int? initialReplicationProgressPercentage = default(int?), int? migrationProgressPercentage = default(int?), int? resumeProgressPercentage = default(int?), int? resyncProgressPercentage = default(int?), long? resyncRetryCount = default(long?), bool? resyncRequired = default(bool?), Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzureMigrateResyncState? resyncState = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzureMigrateResyncState?), bool? performAutoResync = default(bool?), long? resumeRetryCount = default(long?), System.DateTimeOffset? lastReplicationUpdateOn = default(System.DateTimeOffset?)) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzStackHciProtectedNicProperties VMwareToAzStackHciProtectedNicProperties(string nicId = null, string macAddress = null, string label = null, bool? isPrimaryNic = default(bool?), string networkName = null, string targetNetworkId = null, string testNetworkId = null, Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection? selectionTypeForFailover = default(Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection?)) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzStackHciRecoveryPointCustomProperties VMwareToAzStackHciRecoveryPointCustomProperties(System.Collections.Generic.IEnumerable diskIds = null) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzStackHciReplicationExtensionCustomProperties VMwareToAzStackHciReplicationExtensionCustomProperties(Azure.Core.ResourceIdentifier vmwareFabricArmId = null, Azure.Core.ResourceIdentifier vmwareSiteId = null, Azure.Core.ResourceIdentifier azStackHciFabricArmId = null, Azure.Core.ResourceIdentifier azStackHciSiteId = null, string storageAccountId = null, string storageAccountSasSecretName = null, System.Uri asrServiceUri = null, System.Uri rcmServiceUri = null, System.Uri gatewayServiceUri = null, string sourceGatewayServiceId = null, string targetGatewayServiceId = null, string sourceStorageContainerName = null, string targetStorageContainerName = null, string resourceLocation = null, string subscriptionId = null, string resourceGroup = null) { throw null; } + } + public partial class AzStackHciClusterProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AzStackHciClusterProperties(string clusterName, string resourceName, string storageAccountName, System.Collections.Generic.IEnumerable storageContainers) { } + public string ClusterName { get { throw null; } set { } } + public string ResourceName { get { throw null; } set { } } + public string StorageAccountName { get { throw null; } set { } } + public System.Collections.Generic.IList StorageContainers { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.AzStackHciClusterProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.AzStackHciClusterProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AzStackHciFabricCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationFabricCustomProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AzStackHciFabricCustomProperties(Azure.Core.ResourceIdentifier azStackHciSiteId, Azure.ResourceManager.RecoveryServicesDataReplication.Models.AzStackHciClusterProperties cluster, Azure.Core.ResourceIdentifier migrationSolutionId) { } + public System.Collections.Generic.IReadOnlyList ApplianceName { get { throw null; } } + public Azure.Core.ResourceIdentifier AzStackHciSiteId { get { throw null; } set { } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.AzStackHciClusterProperties Cluster { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier FabricContainerId { get { throw null; } } + public Azure.Core.ResourceIdentifier FabricResourceId { get { throw null; } } + public System.Uri MigrationHubUri { get { throw null; } } + public Azure.Core.ResourceIdentifier MigrationSolutionId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.AzStackHciFabricCustomProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.AzStackHciFabricCustomProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataReplicationDiskControllerInputs : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataReplicationDiskControllerInputs(string controllerName, int controllerId, int controllerLocation) { } + public int ControllerId { get { throw null; } set { } } + public int ControllerLocation { get { throw null; } set { } } + public string ControllerName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationDiskControllerInputs System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationDiskControllerInputs System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataReplicationEmailConfigurationProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataReplicationEmailConfigurationProperties(bool sendToOwners) { } + public System.Collections.Generic.IList CustomEmailAddresses { get { throw null; } } + public string Locale { get { throw null; } set { } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState? ProvisioningState { get { throw null; } } + public bool SendToOwners { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationEmailConfigurationProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationEmailConfigurationProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataReplicationErrorInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DataReplicationErrorInfo() { } + public string Causes { get { throw null; } } + public string Code { get { throw null; } } + public System.DateTimeOffset? CreatedOn { get { throw null; } } + public string Message { get { throw null; } } + public string Recommendation { get { throw null; } } + public string Severity { get { throw null; } } + public string Type { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationErrorInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationErrorInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public abstract partial class DataReplicationEventCustomProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected DataReplicationEventCustomProperties() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationEventCustomProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationEventCustomProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataReplicationEventProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DataReplicationEventProperties() { } + public string CorrelationId { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationEventCustomProperties CustomProperties { get { throw null; } } + public string Description { get { throw null; } } + public string EventName { get { throw null; } } + public string EventType { get { throw null; } } + public System.Collections.Generic.IReadOnlyList HealthErrors { get { throw null; } } + public System.DateTimeOffset? OccurredOn { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState? ProvisioningState { get { throw null; } } + public string ResourceName { get { throw null; } } + public Azure.Core.ResourceType? ResourceType { get { throw null; } } + public string Severity { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationEventProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationEventProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public abstract partial class DataReplicationExtensionCustomProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected DataReplicationExtensionCustomProperties() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationExtensionCustomProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationExtensionCustomProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataReplicationExtensionProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataReplicationExtensionProperties(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationExtensionCustomProperties customProperties) { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationExtensionCustomProperties CustomProperties { get { throw null; } set { } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState? ProvisioningState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationExtensionProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationExtensionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public abstract partial class DataReplicationFabricAgentCustomProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected DataReplicationFabricAgentCustomProperties() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationFabricAgentCustomProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationFabricAgentCustomProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataReplicationFabricAgentProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataReplicationFabricAgentProperties(string machineId, string machineName, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationIdentity authenticationIdentity, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationIdentity resourceAccessIdentity, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationFabricAgentCustomProperties customProperties) { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationIdentity AuthenticationIdentity { get { throw null; } set { } } + public string CorrelationId { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationFabricAgentCustomProperties CustomProperties { get { throw null; } set { } } + public System.Collections.Generic.IReadOnlyList HealthErrors { get { throw null; } } + public bool? IsResponsive { get { throw null; } } + public System.DateTimeOffset? LastHeartbeatOn { get { throw null; } } + public string MachineId { get { throw null; } set { } } + public string MachineName { get { throw null; } set { } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationIdentity ResourceAccessIdentity { get { throw null; } set { } } + public string VersionNumber { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationFabricAgentProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationFabricAgentProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public abstract partial class DataReplicationFabricCustomProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected DataReplicationFabricCustomProperties() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationFabricCustomProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationFabricCustomProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataReplicationFabricPatch : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataReplicationFabricPatch() { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationFabricProperties Properties { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationFabricPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationFabricPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataReplicationFabricProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataReplicationFabricProperties(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationFabricCustomProperties customProperties) { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationFabricCustomProperties CustomProperties { get { throw null; } set { } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationHealthStatus? Health { get { throw null; } } + public System.Collections.Generic.IReadOnlyList HealthErrors { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState? ProvisioningState { get { throw null; } } + public string ServiceEndpoint { get { throw null; } } + public Azure.Core.ResourceIdentifier ServiceResourceId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationFabricProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationFabricProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataReplicationHealthErrorInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DataReplicationHealthErrorInfo() { } + public System.Collections.Generic.IReadOnlyList AffectedResourceCorrelationIds { get { throw null; } } + public Azure.Core.ResourceType? AffectedResourceType { get { throw null; } } + public string Category { get { throw null; } } + public string Causes { get { throw null; } } + public System.Collections.Generic.IReadOnlyList ChildErrors { get { throw null; } } + public string Code { get { throw null; } } + public System.DateTimeOffset? CreatedOn { get { throw null; } } + public string HealthCategory { get { throw null; } } + public bool? IsCustomerResolvable { get { throw null; } } + public string Message { get { throw null; } } + public string Recommendation { get { throw null; } } + public string Severity { get { throw null; } } + public string Source { get { throw null; } } + public string Summary { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationHealthErrorInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationHealthErrorInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DataReplicationHealthStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DataReplicationHealthStatus(string value) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationHealthStatus Critical { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationHealthStatus Normal { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationHealthStatus Warning { get { throw null; } } + public bool Equals(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationHealthStatus other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationHealthStatus left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationHealthStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationHealthStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationHealthStatus left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationHealthStatus right) { throw null; } + public override string ToString() { throw null; } + } + public partial class DataReplicationIdentity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataReplicationIdentity(System.Guid tenantId, string applicationId, string objectId, string audience, string aadAuthority) { } + public string AadAuthority { get { throw null; } set { } } + public string ApplicationId { get { throw null; } set { } } + public string Audience { get { throw null; } set { } } + public string ObjectId { get { throw null; } set { } } + public System.Guid TenantId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationIdentity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationIdentity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataReplicationInnerHealthErrorInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DataReplicationInnerHealthErrorInfo() { } + public string Category { get { throw null; } } + public string Causes { get { throw null; } } + public string Code { get { throw null; } } + public System.DateTimeOffset? CreatedOn { get { throw null; } } + public string HealthCategory { get { throw null; } } + public bool? IsCustomerResolvable { get { throw null; } } + public string Message { get { throw null; } } + public string Recommendation { get { throw null; } } + public string Severity { get { throw null; } } + public string Source { get { throw null; } } + public string Summary { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationInnerHealthErrorInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationInnerHealthErrorInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public abstract partial class DataReplicationJobCustomProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected DataReplicationJobCustomProperties() { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.JobModelCustomPropertiesAffectedObjectDetails AffectedObjectDetails { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobCustomProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobCustomProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DataReplicationJobObjectType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DataReplicationJobObjectType(string value) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobObjectType AvsDiskPool { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobObjectType Fabric { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobObjectType FabricAgent { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobObjectType Policy { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobObjectType ProtectedItem { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobObjectType RecoveryPlan { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobObjectType ReplicationExtension { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobObjectType Vault { get { throw null; } } + public bool Equals(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobObjectType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobObjectType left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobObjectType right) { throw null; } + public static implicit operator Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobObjectType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobObjectType left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobObjectType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class DataReplicationJobProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DataReplicationJobProperties() { } + public string ActivityId { get { throw null; } } + public System.Collections.Generic.IReadOnlyList AllowedActions { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobCustomProperties CustomProperties { get { throw null; } } + public string DisplayName { get { throw null; } } + public System.DateTimeOffset? EndOn { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public string ObjectId { get { throw null; } } + public string ObjectInternalId { get { throw null; } } + public string ObjectInternalName { get { throw null; } } + public string ObjectName { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobObjectType? ObjectType { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState? ProvisioningState { get { throw null; } } + public string ReplicationProviderId { get { throw null; } } + public string SourceFabricProviderId { get { throw null; } } + public System.DateTimeOffset? StartOn { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobState? State { get { throw null; } } + public string TargetFabricProviderId { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Tasks { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DataReplicationJobState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DataReplicationJobState(string value) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobState Cancelled { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobState Cancelling { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobState CompletedWithErrors { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobState CompletedWithInformation { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobState CompletedWithWarnings { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobState Failed { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobState Pending { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobState Started { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobState Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobState left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobState right) { throw null; } + public static implicit operator Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobState left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class DataReplicationNameAvailabilityContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataReplicationNameAvailabilityContent() { } + public string Name { get { throw null; } set { } } + public Azure.Core.ResourceType? Type { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationNameAvailabilityContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationNameAvailabilityContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataReplicationNameAvailabilityResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DataReplicationNameAvailabilityResult() { } + public bool? IsNameAvailable { get { throw null; } } + public string Message { get { throw null; } } + public string Reason { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationNameAvailabilityResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationNameAvailabilityResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public abstract partial class DataReplicationPolicyCustomProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected DataReplicationPolicyCustomProperties() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPolicyCustomProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPolicyCustomProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataReplicationPolicyProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataReplicationPolicyProperties(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPolicyCustomProperties customProperties) { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPolicyCustomProperties CustomProperties { get { throw null; } set { } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState? ProvisioningState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPolicyProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPolicyProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataReplicationPrivateEndpointConnectionProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataReplicationPrivateEndpointConnectionProperties() { } + public Azure.Core.ResourceIdentifier PrivateEndpointId { get { throw null; } set { } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPrivateLinkServiceConnectionState PrivateLinkServiceConnectionState { get { throw null; } set { } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState? ProvisioningState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPrivateEndpointConnectionProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPrivateEndpointConnectionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataReplicationPrivateEndpointConnectionProxyProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataReplicationPrivateEndpointConnectionProxyProperties() { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.RemotePrivateEndpoint RemotePrivateEndpoint { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPrivateEndpointConnectionProxyProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPrivateEndpointConnectionProxyProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DataReplicationPrivateEndpointConnectionStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DataReplicationPrivateEndpointConnectionStatus(string value) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPrivateEndpointConnectionStatus Approved { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPrivateEndpointConnectionStatus Disconnected { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPrivateEndpointConnectionStatus Pending { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPrivateEndpointConnectionStatus Rejected { get { throw null; } } + public bool Equals(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPrivateEndpointConnectionStatus other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPrivateEndpointConnectionStatus left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPrivateEndpointConnectionStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPrivateEndpointConnectionStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPrivateEndpointConnectionStatus left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPrivateEndpointConnectionStatus right) { throw null; } + public override string ToString() { throw null; } + } + public partial class DataReplicationPrivateLinkResourceProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DataReplicationPrivateLinkResourceProperties() { } + public string GroupId { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState? ProvisioningState { get { throw null; } } + public System.Collections.Generic.IReadOnlyList RequiredMembers { get { throw null; } } + public System.Collections.Generic.IReadOnlyList RequiredZoneNames { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPrivateLinkResourceProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPrivateLinkResourceProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataReplicationPrivateLinkServiceConnection : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataReplicationPrivateLinkServiceConnection() { } + public System.Collections.Generic.IList GroupIds { get { throw null; } } + public string Name { get { throw null; } set { } } + public string RequestMessage { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPrivateLinkServiceConnection System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPrivateLinkServiceConnection System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataReplicationPrivateLinkServiceConnectionState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataReplicationPrivateLinkServiceConnectionState() { } + public string ActionsRequired { get { throw null; } set { } } + public string Description { get { throw null; } set { } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPrivateEndpointConnectionStatus? Status { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPrivateLinkServiceConnectionState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPrivateLinkServiceConnectionState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataReplicationPrivateLinkServiceProxy : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataReplicationPrivateLinkServiceProxy() { } + public System.Collections.Generic.IList GroupConnectivityInformation { get { throw null; } } + public string Id { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier RemotePrivateEndpointConnectionId { get { throw null; } set { } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPrivateLinkServiceConnectionState RemotePrivateLinkServiceConnectionState { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPrivateLinkServiceProxy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPrivateLinkServiceProxy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public abstract partial class DataReplicationProtectedItemCustomProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected DataReplicationProtectedItemCustomProperties() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectedItemCustomProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectedItemCustomProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public abstract partial class DataReplicationProtectedItemCustomPropertiesUpdate : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected DataReplicationProtectedItemCustomPropertiesUpdate() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectedItemCustomPropertiesUpdate System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectedItemCustomPropertiesUpdate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataReplicationProtectedItemPatch : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataReplicationProtectedItemPatch() { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectedItemCustomPropertiesUpdate CustomProperties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectedItemPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectedItemPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataReplicationProtectedItemProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataReplicationProtectedItemProperties(string policyName, string replicationExtensionName, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectedItemCustomProperties customProperties) { } + public System.Collections.Generic.IReadOnlyList AllowedJobs { get { throw null; } } + public string CorrelationId { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemJobProperties CurrentJob { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectedItemCustomProperties CustomProperties { get { throw null; } set { } } + public string FabricAgentId { get { throw null; } } + public string FabricId { get { throw null; } } + public string FabricObjectId { get { throw null; } } + public string FabricObjectName { get { throw null; } } + public System.Collections.Generic.IReadOnlyList HealthErrors { get { throw null; } } + public bool? IsResyncRequired { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemJobProperties LastFailedEnableProtectionJob { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemJobProperties LastFailedPlannedFailoverJob { get { throw null; } } + public System.DateTimeOffset? LastSuccessfulPlannedFailoverOn { get { throw null; } } + public System.DateTimeOffset? LastSuccessfulTestFailoverOn { get { throw null; } } + public System.DateTimeOffset? LastSuccessfulUnplannedFailoverOn { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemJobProperties LastTestFailoverJob { get { throw null; } } + public string PolicyName { get { throw null; } set { } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState? ProtectionState { get { throw null; } } + public string ProtectionStateDescription { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState? ProvisioningState { get { throw null; } } + public string ReplicationExtensionName { get { throw null; } set { } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationHealthStatus? ReplicationHealth { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationResynchronizationState? ResynchronizationState { get { throw null; } } + public string SourceFabricProviderId { get { throw null; } } + public string TargetFabricAgentId { get { throw null; } } + public string TargetFabricId { get { throw null; } } + public string TargetFabricProviderId { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTestFailoverState? TestFailoverState { get { throw null; } } + public string TestFailoverStateDescription { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectedItemProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectedItemProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DataReplicationProtectionState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DataReplicationProtectionState(string value) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState CancelFailoverFailedOnPrimary { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState CancelFailoverFailedOnRecovery { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState CancelFailoverInProgressOnPrimary { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState CancelFailoverInProgressOnRecovery { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState CancelFailoverStatesBegin { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState CancelFailoverStatesEnd { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState ChangeRecoveryPointCompleted { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState ChangeRecoveryPointFailed { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState ChangeRecoveryPointInitiated { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState ChangeRecoveryPointStatesBegin { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState ChangeRecoveryPointStatesEnd { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState CommitFailoverCompleted { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState CommitFailoverFailedOnPrimary { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState CommitFailoverFailedOnRecovery { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState CommitFailoverInProgressOnPrimary { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState CommitFailoverInProgressOnRecovery { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState CommitFailoverStatesBegin { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState CommitFailoverStatesEnd { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState DisablingFailed { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState DisablingProtection { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState EnablingFailed { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState EnablingProtection { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState InitialReplicationCompletedOnPrimary { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState InitialReplicationCompletedOnRecovery { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState InitialReplicationFailed { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState InitialReplicationInProgress { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState InitialReplicationStatesBegin { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState InitialReplicationStatesEnd { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState MarkedForDeletion { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState PlannedFailoverCompleted { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState PlannedFailoverCompleting { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState PlannedFailoverCompletionFailed { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState PlannedFailoverFailed { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState PlannedFailoverInitiated { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState PlannedFailoverTransitionStatesBegin { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState PlannedFailoverTransitionStatesEnd { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState Protected { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState ProtectedStatesBegin { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState ProtectedStatesEnd { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState ReprotectFailed { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState ReprotectInitiated { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState ReprotectStatesBegin { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState ReprotectStatesEnd { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState UnplannedFailoverCompleted { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState UnplannedFailoverCompleting { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState UnplannedFailoverCompletionFailed { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState UnplannedFailoverFailed { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState UnplannedFailoverInitiated { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState UnplannedFailoverTransitionStatesBegin { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState UnplannedFailoverTransitionStatesEnd { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState UnprotectedStatesBegin { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState UnprotectedStatesEnd { get { throw null; } } + public bool Equals(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState right) { throw null; } + public static implicit operator Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectionState right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DataReplicationProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DataReplicationProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState Creating { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState Deleted { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + public abstract partial class DataReplicationRecoveryPointCustomProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected DataReplicationRecoveryPointCustomProperties() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationRecoveryPointCustomProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationRecoveryPointCustomProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataReplicationRecoveryPointProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DataReplicationRecoveryPointProperties() { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationRecoveryPointCustomProperties CustomProperties { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState? ProvisioningState { get { throw null; } } + public System.DateTimeOffset RecoveryPointOn { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationRecoveryPointType RecoveryPointType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationRecoveryPointProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationRecoveryPointProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DataReplicationRecoveryPointType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DataReplicationRecoveryPointType(string value) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationRecoveryPointType ApplicationConsistent { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationRecoveryPointType CrashConsistent { get { throw null; } } + public bool Equals(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationRecoveryPointType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationRecoveryPointType left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationRecoveryPointType right) { throw null; } + public static implicit operator Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationRecoveryPointType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationRecoveryPointType left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationRecoveryPointType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DataReplicationResynchronizationState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DataReplicationResynchronizationState(string value) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationResynchronizationState None { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationResynchronizationState ResynchronizationCompleted { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationResynchronizationState ResynchronizationFailed { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationResynchronizationState ResynchronizationInitiated { get { throw null; } } + public bool Equals(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationResynchronizationState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationResynchronizationState left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationResynchronizationState right) { throw null; } + public static implicit operator Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationResynchronizationState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationResynchronizationState left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationResynchronizationState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class DataReplicationTask : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DataReplicationTask() { } + public System.Collections.Generic.IReadOnlyList ChildrenJobs { get { throw null; } } + public string CustomInstanceType { get { throw null; } } + public System.DateTimeOffset? EndOn { get { throw null; } } + public System.DateTimeOffset? StartOn { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTaskState? State { get { throw null; } } + public string TaskName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTask System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTask System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DataReplicationTaskState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DataReplicationTaskState(string value) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTaskState Cancelled { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTaskState Failed { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTaskState Pending { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTaskState Skipped { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTaskState Started { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTaskState Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTaskState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTaskState left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTaskState right) { throw null; } + public static implicit operator Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTaskState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTaskState left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTaskState right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DataReplicationTestFailoverState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DataReplicationTestFailoverState(string value) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTestFailoverState MarkedForDeletion { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTestFailoverState None { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTestFailoverState TestFailoverCleanupCompleting { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTestFailoverState TestFailoverCleanupInitiated { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTestFailoverState TestFailoverCompleted { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTestFailoverState TestFailoverCompleting { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTestFailoverState TestFailoverCompletionFailed { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTestFailoverState TestFailoverFailed { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTestFailoverState TestFailoverInitiated { get { throw null; } } + public bool Equals(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTestFailoverState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTestFailoverState left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTestFailoverState right) { throw null; } + public static implicit operator Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTestFailoverState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTestFailoverState left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationTestFailoverState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class DataReplicationVaultPatch : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataReplicationVaultPatch() { } + public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationVaultProperties Properties { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationVaultPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationVaultPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataReplicationVaultProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataReplicationVaultProperties() { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProvisioningState? ProvisioningState { get { throw null; } } + public Azure.Core.ResourceIdentifier ServiceResourceId { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationVaultType? VaultType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationVaultProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationVaultProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DataReplicationVaultType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DataReplicationVaultType(string value) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationVaultType DisasterRecovery { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationVaultType Migrate { get { throw null; } } + public bool Equals(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationVaultType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationVaultType left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationVaultType right) { throw null; } + public static implicit operator Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationVaultType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationVaultType left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationVaultType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class DeploymentPreflight : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DeploymentPreflight() { } + public System.Collections.Generic.IList Resources { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DeploymentPreflight System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DeploymentPreflight System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DeploymentPreflightResourceInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DeploymentPreflightResourceInfo() { } + public string ApiVersion { get { throw null; } set { } } + public Azure.Core.AzureLocation? Location { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + public System.BinaryData Properties { get { throw null; } set { } } + public Azure.Core.ResourceType? Type { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DeploymentPreflightResourceInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.DeploymentPreflightResourceInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class FailoverJobCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobCustomProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal FailoverJobCustomProperties() { } + public System.Collections.Generic.IReadOnlyList ProtectedItemDetails { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.FailoverJobCustomProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.FailoverJobCustomProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class FailoverProtectedItemProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal FailoverProtectedItemProperties() { } + public string NetworkName { get { throw null; } } + public string ProtectedItemName { get { throw null; } } + public string RecoveryPointId { get { throw null; } } + public System.DateTimeOffset? RecoveryPointOn { get { throw null; } } + public string Subnet { get { throw null; } } + public string TestVmName { get { throw null; } } + public string VmName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.FailoverProtectedItemProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.FailoverProtectedItemProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class GroupConnectivityInformation : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public GroupConnectivityInformation() { } + public System.Collections.Generic.IList CustomerVisibleFqdns { get { throw null; } } + public string GroupId { get { throw null; } set { } } + public string InternalFqdn { get { throw null; } set { } } + public string MemberName { get { throw null; } set { } } + public string PrivateLinkServiceArmRegion { get { throw null; } set { } } + public string RedirectMapId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.GroupConnectivityInformation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.GroupConnectivityInformation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class HyperVMigrateFabricCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationFabricCustomProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public HyperVMigrateFabricCustomProperties(Azure.Core.ResourceIdentifier hyperVSiteId, Azure.Core.ResourceIdentifier migrationSolutionId) { } + public Azure.Core.ResourceIdentifier FabricContainerId { get { throw null; } } + public Azure.Core.ResourceIdentifier FabricResourceId { get { throw null; } } + public Azure.Core.ResourceIdentifier HyperVSiteId { get { throw null; } set { } } + public System.Uri MigrationHubUri { get { throw null; } } + public Azure.Core.ResourceIdentifier MigrationSolutionId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVMigrateFabricCustomProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVMigrateFabricCustomProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class HyperVToAzStackHciDiskInput : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public HyperVToAzStackHciDiskInput(string diskId, long diskSizeGB, string diskFileFormat, bool isOSDisk) { } + public long? DiskBlockSize { get { throw null; } set { } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationDiskControllerInputs DiskController { get { throw null; } set { } } + public string DiskFileFormat { get { throw null; } set { } } + public string DiskId { get { throw null; } set { } } + public string DiskIdentifier { get { throw null; } set { } } + public long? DiskLogicalSectorSize { get { throw null; } set { } } + public long? DiskPhysicalSectorSize { get { throw null; } set { } } + public long DiskSizeGB { get { throw null; } set { } } + public bool? IsDynamic { get { throw null; } set { } } + public bool IsOSDisk { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier StorageContainerId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHciDiskInput System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHciDiskInput System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class HyperVToAzStackHciEventCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationEventCustomProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal HyperVToAzStackHciEventCustomProperties() { } + public string EventSourceFriendlyName { get { throw null; } } + public string ProtectedItemFriendlyName { get { throw null; } } + public string ServerType { get { throw null; } } + public string SourceApplianceName { get { throw null; } } + public string TargetApplianceName { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHciEventCustomProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHciEventCustomProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class HyperVToAzStackHciNicInput : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public HyperVToAzStackHciNicInput(string nicId, Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection selectionTypeForFailover) { } + public bool? IsMacMigrationEnabled { get { throw null; } set { } } + public bool? IsStaticIPMigrationEnabled { get { throw null; } set { } } + public string NetworkName { get { throw null; } } + public string NicId { get { throw null; } set { } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection SelectionTypeForFailover { get { throw null; } set { } } + public string TargetNetworkId { get { throw null; } set { } } + public string TestNetworkId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHciNicInput System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHciNicInput System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class HyperVToAzStackHciPlannedFailoverCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.PlannedFailoverCustomProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public HyperVToAzStackHciPlannedFailoverCustomProperties(bool shutdownSourceVm) { } + public bool ShutdownSourceVm { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHciPlannedFailoverCustomProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHciPlannedFailoverCustomProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class HyperVToAzStackHciPolicyCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPolicyCustomProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public HyperVToAzStackHciPolicyCustomProperties(int recoveryPointHistoryInMinutes, int crashConsistentFrequencyInMinutes, int appConsistentFrequencyInMinutes) { } + public int AppConsistentFrequencyInMinutes { get { throw null; } set { } } + public int CrashConsistentFrequencyInMinutes { get { throw null; } set { } } + public int RecoveryPointHistoryInMinutes { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHciPolicyCustomProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHciPolicyCustomProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class HyperVToAzStackHciProtectedDiskProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal HyperVToAzStackHciProtectedDiskProperties() { } + public long? CapacityInBytes { get { throw null; } } + public long? DiskBlockSize { get { throw null; } } + public long? DiskLogicalSectorSize { get { throw null; } } + public long? DiskPhysicalSectorSize { get { throw null; } } + public string DiskType { get { throw null; } } + public bool? IsDynamic { get { throw null; } } + public bool? IsOSDisk { get { throw null; } } + public string MigrateDiskName { get { throw null; } } + public string SeedDiskName { get { throw null; } } + public string SourceDiskId { get { throw null; } } + public string SourceDiskName { get { throw null; } } + public Azure.Core.ResourceIdentifier StorageContainerId { get { throw null; } } + public string StorageContainerLocalPath { get { throw null; } } + public string TestMigrateDiskName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHciProtectedDiskProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHciProtectedDiskProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class HyperVToAzStackHciProtectedItemCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectedItemCustomProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public HyperVToAzStackHciProtectedItemCustomProperties(Azure.Core.ResourceIdentifier targetHciClusterId, Azure.Core.ResourceIdentifier targetArcClusterCustomLocationId, Azure.Core.ResourceIdentifier fabricDiscoveryMachineId, System.Collections.Generic.IEnumerable disksToInclude, System.Collections.Generic.IEnumerable nicsToInclude, Azure.Core.ResourceIdentifier targetResourceGroupId, Azure.Core.ResourceIdentifier storageContainerId, string hyperVGeneration, string runAsAccountId, string sourceFabricAgentName, string targetFabricAgentName, string customLocationRegion) { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemActiveLocation? ActiveLocation { get { throw null; } } + public string CustomLocationRegion { get { throw null; } set { } } + public System.Collections.Generic.IList DisksToInclude { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemDynamicMemoryConfig DynamicMemoryConfig { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier FabricDiscoveryMachineId { get { throw null; } set { } } + public string FailoverRecoveryPointId { get { throw null; } } + public string FirmwareType { get { throw null; } } + public string HyperVGeneration { get { throw null; } set { } } + public int? InitialReplicationProgressPercentage { get { throw null; } } + public bool? IsDynamicRam { get { throw null; } set { } } + public string LastRecoveryPointId { get { throw null; } } + public System.DateTimeOffset? LastRecoveryPointReceivedOn { get { throw null; } } + public System.DateTimeOffset? LastReplicationUpdateOn { get { throw null; } } + public System.Collections.Generic.IList NicsToInclude { get { throw null; } } + public string OSName { get { throw null; } } + public string OSType { get { throw null; } } + public System.Collections.Generic.IReadOnlyList ProtectedDisks { get { throw null; } } + public System.Collections.Generic.IReadOnlyList ProtectedNics { get { throw null; } } + public int? ResyncProgressPercentage { get { throw null; } } + public string RunAsAccountId { get { throw null; } set { } } + public string SourceApplianceName { get { throw null; } } + public int? SourceCpuCores { get { throw null; } } + public string SourceFabricAgentName { get { throw null; } set { } } + public double? SourceMemoryInMegaBytes { get { throw null; } } + public string SourceVmName { get { throw null; } } + public Azure.Core.ResourceIdentifier StorageContainerId { get { throw null; } set { } } + public string TargetApplianceName { get { throw null; } } + public Azure.Core.ResourceIdentifier TargetArcClusterCustomLocationId { get { throw null; } set { } } + public string TargetAzStackHciClusterName { get { throw null; } } + public int? TargetCpuCores { get { throw null; } set { } } + public string TargetFabricAgentName { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier TargetHciClusterId { get { throw null; } set { } } + public string TargetLocation { get { throw null; } } + public int? TargetMemoryInMegaBytes { get { throw null; } set { } } + public string TargetNetworkId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier TargetResourceGroupId { get { throw null; } set { } } + public string TargetVmBiosId { get { throw null; } } + public string TargetVmName { get { throw null; } set { } } + public string TestNetworkId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHciProtectedItemCustomProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHciProtectedItemCustomProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class HyperVToAzStackHciProtectedItemCustomPropertiesUpdate : Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectedItemCustomPropertiesUpdate, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public HyperVToAzStackHciProtectedItemCustomPropertiesUpdate() { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemDynamicMemoryConfig DynamicMemoryConfig { get { throw null; } set { } } + public bool? IsDynamicRam { get { throw null; } set { } } + public System.Collections.Generic.IList NicsToInclude { get { throw null; } } + public string OSType { get { throw null; } set { } } + public int? TargetCpuCores { get { throw null; } set { } } + public int? TargetMemoryInMegaBytes { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHciProtectedItemCustomPropertiesUpdate System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHciProtectedItemCustomPropertiesUpdate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class HyperVToAzStackHciProtectedNicProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal HyperVToAzStackHciProtectedNicProperties() { } + public string MacAddress { get { throw null; } } + public string NetworkName { get { throw null; } } + public string NicId { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection? SelectionTypeForFailover { get { throw null; } } + public string TargetNetworkId { get { throw null; } } + public string TestNetworkId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHciProtectedNicProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHciProtectedNicProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class HyperVToAzStackHciRecoveryPointCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationRecoveryPointCustomProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal HyperVToAzStackHciRecoveryPointCustomProperties() { } + public System.Collections.Generic.IReadOnlyList DiskIds { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHciRecoveryPointCustomProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHciRecoveryPointCustomProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class HyperVToAzStackHciReplicationExtensionCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationExtensionCustomProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public HyperVToAzStackHciReplicationExtensionCustomProperties(Azure.Core.ResourceIdentifier hyperVFabricArmId, Azure.Core.ResourceIdentifier azStackHciFabricArmId) { } + public System.Uri AsrServiceUri { get { throw null; } } + public Azure.Core.ResourceIdentifier AzStackHciFabricArmId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier AzStackHciSiteId { get { throw null; } } + public System.Uri GatewayServiceUri { get { throw null; } } + public Azure.Core.ResourceIdentifier HyperVFabricArmId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier HyperVSiteId { get { throw null; } } + public System.Uri RcmServiceUri { get { throw null; } } + public string ResourceGroup { get { throw null; } } + public string ResourceLocation { get { throw null; } } + public string SourceGatewayServiceId { get { throw null; } } + public string SourceStorageContainerName { get { throw null; } } + public string StorageAccountId { get { throw null; } set { } } + public string StorageAccountSasSecretName { get { throw null; } set { } } + public string SubscriptionId { get { throw null; } } + public string TargetGatewayServiceId { get { throw null; } } + public string TargetStorageContainerName { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHciReplicationExtensionCustomProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.HyperVToAzStackHciReplicationExtensionCustomProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class JobModelCustomPropertiesAffectedObjectDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal JobModelCustomPropertiesAffectedObjectDetails() { } + public string Description { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.JobModelCustomPropertiesAffectedObjectDetailsType? Type { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.JobModelCustomPropertiesAffectedObjectDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.JobModelCustomPropertiesAffectedObjectDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct JobModelCustomPropertiesAffectedObjectDetailsType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public JobModelCustomPropertiesAffectedObjectDetailsType(string value) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.JobModelCustomPropertiesAffectedObjectDetailsType Object { get { throw null; } } + public bool Equals(Azure.ResourceManager.RecoveryServicesDataReplication.Models.JobModelCustomPropertiesAffectedObjectDetailsType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.RecoveryServicesDataReplication.Models.JobModelCustomPropertiesAffectedObjectDetailsType left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.JobModelCustomPropertiesAffectedObjectDetailsType right) { throw null; } + public static implicit operator Azure.ResourceManager.RecoveryServicesDataReplication.Models.JobModelCustomPropertiesAffectedObjectDetailsType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.RecoveryServicesDataReplication.Models.JobModelCustomPropertiesAffectedObjectDetailsType left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.JobModelCustomPropertiesAffectedObjectDetailsType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class PlannedFailover : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PlannedFailover(Azure.ResourceManager.RecoveryServicesDataReplication.Models.PlannedFailoverProperties properties) { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.PlannedFailoverCustomProperties PlannedFailoverCustomProperties { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.PlannedFailover System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.PlannedFailover System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public abstract partial class PlannedFailoverCustomProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected PlannedFailoverCustomProperties() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.PlannedFailoverCustomProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.PlannedFailoverCustomProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PlannedFailoverProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PlannedFailoverProperties(Azure.ResourceManager.RecoveryServicesDataReplication.Models.PlannedFailoverCustomProperties customProperties) { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.PlannedFailoverCustomProperties CustomProperties { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.PlannedFailoverProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.PlannedFailoverProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ProtectedItemActiveLocation : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ProtectedItemActiveLocation(string value) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemActiveLocation Primary { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemActiveLocation Recovery { get { throw null; } } + public bool Equals(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemActiveLocation other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemActiveLocation left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemActiveLocation right) { throw null; } + public static implicit operator Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemActiveLocation (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemActiveLocation left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemActiveLocation right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ProtectedItemDynamicMemoryConfig : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ProtectedItemDynamicMemoryConfig(long maximumMemoryInMegaBytes, long minimumMemoryInMegaBytes, int targetMemoryBufferPercentage) { } + public long MaximumMemoryInMegaBytes { get { throw null; } set { } } + public long MinimumMemoryInMegaBytes { get { throw null; } set { } } + public int TargetMemoryBufferPercentage { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemDynamicMemoryConfig System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemDynamicMemoryConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ProtectedItemJobProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ProtectedItemJobProperties() { } + public string DisplayName { get { throw null; } } + public System.DateTimeOffset? EndOn { get { throw null; } } + public string Id { get { throw null; } } + public string Name { get { throw null; } } + public string ScenarioName { get { throw null; } } + public System.DateTimeOffset? StartOn { get { throw null; } } + public string State { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemJobProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemJobProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class RemotePrivateEndpoint : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public RemotePrivateEndpoint(string id) { } + public System.Collections.Generic.IList ConnectionDetails { get { throw null; } } + public string Id { get { throw null; } set { } } + public System.Collections.Generic.IList ManualPrivateLinkServiceConnections { get { throw null; } } + public System.Collections.Generic.IList PrivateLinkServiceConnections { get { throw null; } } + public System.Collections.Generic.IList PrivateLinkServiceProxies { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.RemotePrivateEndpoint System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.RemotePrivateEndpoint System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class RemotePrivateEndpointConnectionDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public RemotePrivateEndpointConnectionDetails() { } + public string GroupId { get { throw null; } set { } } + public string Id { get { throw null; } set { } } + public string LinkIdentifier { get { throw null; } set { } } + public string MemberName { get { throw null; } set { } } + public string PrivateIPAddress { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.RemotePrivateEndpointConnectionDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.RemotePrivateEndpointConnectionDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class StorageContainerProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public StorageContainerProperties(string name, string clusterSharedVolumePath) { } + public string ClusterSharedVolumePath { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.StorageContainerProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.StorageContainerProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TestFailoverCleanupJobCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobCustomProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal TestFailoverCleanupJobCustomProperties() { } + public string Comments { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.TestFailoverCleanupJobCustomProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.TestFailoverCleanupJobCustomProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TestFailoverJobCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationJobCustomProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal TestFailoverJobCustomProperties() { } + public System.Collections.Generic.IReadOnlyList ProtectedItemDetails { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.TestFailoverJobCustomProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.TestFailoverJobCustomProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct VmNicSelection : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public VmNicSelection(string value) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection NotSelected { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection SelectedByDefault { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection SelectedByUser { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection SelectedByUserOverride { get { throw null; } } + public bool Equals(Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection right) { throw null; } + public static implicit operator Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection right) { throw null; } + public override string ToString() { throw null; } + } + public partial class VMwareFabricAgentCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationFabricAgentCustomProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public VMwareFabricAgentCustomProperties(string biosId, Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationIdentity marsAuthenticationIdentity) { } + public string BiosId { get { throw null; } set { } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationIdentity MarsAuthenticationIdentity { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareFabricAgentCustomProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareFabricAgentCustomProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class VMwareMigrateFabricCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationFabricCustomProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public VMwareMigrateFabricCustomProperties(Azure.Core.ResourceIdentifier vmwareSiteId, Azure.Core.ResourceIdentifier migrationSolutionId) { } + public Azure.Core.ResourceIdentifier MigrationSolutionId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier VmwareSiteId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareMigrateFabricCustomProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareMigrateFabricCustomProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class VMwareToAzStackHciDiskInput : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public VMwareToAzStackHciDiskInput(string diskId, long diskSizeGB, string diskFileFormat, bool isOSDisk) { } + public long? DiskBlockSize { get { throw null; } set { } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationDiskControllerInputs DiskController { get { throw null; } set { } } + public string DiskFileFormat { get { throw null; } set { } } + public string DiskId { get { throw null; } set { } } + public string DiskIdentifier { get { throw null; } set { } } + public long? DiskLogicalSectorSize { get { throw null; } set { } } + public long? DiskPhysicalSectorSize { get { throw null; } set { } } + public long DiskSizeGB { get { throw null; } set { } } + public bool? IsDynamic { get { throw null; } set { } } + public bool IsOSDisk { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier StorageContainerId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzStackHciDiskInput System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzStackHciDiskInput System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class VMwareToAzStackHciEventCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationEventCustomProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal VMwareToAzStackHciEventCustomProperties() { } + public string EventSourceFriendlyName { get { throw null; } } + public string ProtectedItemFriendlyName { get { throw null; } } + public string ServerType { get { throw null; } } + public string SourceApplianceName { get { throw null; } } + public string TargetApplianceName { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzStackHciEventCustomProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzStackHciEventCustomProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class VMwareToAzStackHciNicInput : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public VMwareToAzStackHciNicInput(string nicId, string label, Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection selectionTypeForFailover) { } + public bool? IsMacMigrationEnabled { get { throw null; } set { } } + public bool? IsStaticIPMigrationEnabled { get { throw null; } set { } } + public string Label { get { throw null; } set { } } + public string NetworkName { get { throw null; } } + public string NicId { get { throw null; } set { } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection SelectionTypeForFailover { get { throw null; } set { } } + public string TargetNetworkId { get { throw null; } set { } } + public string TestNetworkId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzStackHciNicInput System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzStackHciNicInput System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class VMwareToAzStackHciPlannedFailoverCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.PlannedFailoverCustomProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public VMwareToAzStackHciPlannedFailoverCustomProperties(bool shutdownSourceVm) { } + public bool ShutdownSourceVm { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzStackHciPlannedFailoverCustomProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzStackHciPlannedFailoverCustomProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class VMwareToAzStackHciPolicyCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationPolicyCustomProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public VMwareToAzStackHciPolicyCustomProperties(int recoveryPointHistoryInMinutes, int crashConsistentFrequencyInMinutes, int appConsistentFrequencyInMinutes) { } + public int AppConsistentFrequencyInMinutes { get { throw null; } set { } } + public int CrashConsistentFrequencyInMinutes { get { throw null; } set { } } + public int RecoveryPointHistoryInMinutes { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzStackHciPolicyCustomProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzStackHciPolicyCustomProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class VMwareToAzStackHciProtectedDiskProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal VMwareToAzStackHciProtectedDiskProperties() { } + public long? CapacityInBytes { get { throw null; } } + public long? DiskBlockSize { get { throw null; } } + public long? DiskLogicalSectorSize { get { throw null; } } + public long? DiskPhysicalSectorSize { get { throw null; } } + public string DiskType { get { throw null; } } + public bool? IsDynamic { get { throw null; } } + public bool? IsOSDisk { get { throw null; } } + public string MigrateDiskName { get { throw null; } } + public string SeedDiskName { get { throw null; } } + public string SourceDiskId { get { throw null; } } + public string SourceDiskName { get { throw null; } } + public Azure.Core.ResourceIdentifier StorageContainerId { get { throw null; } } + public string StorageContainerLocalPath { get { throw null; } } + public string TestMigrateDiskName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzStackHciProtectedDiskProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzStackHciProtectedDiskProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class VMwareToAzStackHciProtectedItemCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectedItemCustomProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public VMwareToAzStackHciProtectedItemCustomProperties(Azure.Core.ResourceIdentifier targetHciClusterId, Azure.Core.ResourceIdentifier targetArcClusterCustomLocationId, Azure.Core.ResourceIdentifier storageContainerId, Azure.Core.ResourceIdentifier targetResourceGroupId, string customLocationRegion, System.Collections.Generic.IEnumerable disksToInclude, System.Collections.Generic.IEnumerable nicsToInclude, string hyperVGeneration, Azure.Core.ResourceIdentifier fabricDiscoveryMachineId, string runAsAccountId, string sourceFabricAgentName, string targetFabricAgentName) { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemActiveLocation? ActiveLocation { get { throw null; } } + public string CustomLocationRegion { get { throw null; } set { } } + public System.Collections.Generic.IList DisksToInclude { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemDynamicMemoryConfig DynamicMemoryConfig { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier FabricDiscoveryMachineId { get { throw null; } set { } } + public string FailoverRecoveryPointId { get { throw null; } } + public string FirmwareType { get { throw null; } } + public string HyperVGeneration { get { throw null; } set { } } + public int? InitialReplicationProgressPercentage { get { throw null; } } + public bool? IsDynamicRam { get { throw null; } set { } } + public string LastRecoveryPointId { get { throw null; } } + public System.DateTimeOffset? LastRecoveryPointReceivedOn { get { throw null; } } + public System.DateTimeOffset? LastReplicationUpdateOn { get { throw null; } } + public int? MigrationProgressPercentage { get { throw null; } } + public System.Collections.Generic.IList NicsToInclude { get { throw null; } } + public string OSName { get { throw null; } } + public string OSType { get { throw null; } } + public bool? PerformAutoResync { get { throw null; } set { } } + public System.Collections.Generic.IReadOnlyList ProtectedDisks { get { throw null; } } + public System.Collections.Generic.IReadOnlyList ProtectedNics { get { throw null; } } + public int? ResumeProgressPercentage { get { throw null; } } + public long? ResumeRetryCount { get { throw null; } } + public int? ResyncProgressPercentage { get { throw null; } } + public bool? ResyncRequired { get { throw null; } } + public long? ResyncRetryCount { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzureMigrateResyncState? ResyncState { get { throw null; } } + public string RunAsAccountId { get { throw null; } set { } } + public string SourceApplianceName { get { throw null; } } + public int? SourceCpuCores { get { throw null; } } + public string SourceFabricAgentName { get { throw null; } set { } } + public double? SourceMemoryInMegaBytes { get { throw null; } } + public string SourceVmName { get { throw null; } } + public Azure.Core.ResourceIdentifier StorageContainerId { get { throw null; } set { } } + public string TargetApplianceName { get { throw null; } } + public Azure.Core.ResourceIdentifier TargetArcClusterCustomLocationId { get { throw null; } set { } } + public string TargetAzStackHciClusterName { get { throw null; } } + public int? TargetCpuCores { get { throw null; } set { } } + public string TargetFabricAgentName { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier TargetHciClusterId { get { throw null; } set { } } + public string TargetLocation { get { throw null; } } + public int? TargetMemoryInMegaBytes { get { throw null; } set { } } + public string TargetNetworkId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier TargetResourceGroupId { get { throw null; } set { } } + public string TargetVmBiosId { get { throw null; } } + public string TargetVmName { get { throw null; } set { } } + public string TestNetworkId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzStackHciProtectedItemCustomProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzStackHciProtectedItemCustomProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class VMwareToAzStackHciProtectedItemCustomPropertiesUpdate : Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationProtectedItemCustomPropertiesUpdate, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public VMwareToAzStackHciProtectedItemCustomPropertiesUpdate() { } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.ProtectedItemDynamicMemoryConfig DynamicMemoryConfig { get { throw null; } set { } } + public bool? IsDynamicRam { get { throw null; } set { } } + public System.Collections.Generic.IList NicsToInclude { get { throw null; } } + public string OSType { get { throw null; } set { } } + public int? TargetCpuCores { get { throw null; } set { } } + public int? TargetMemoryInMegaBytes { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzStackHciProtectedItemCustomPropertiesUpdate System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzStackHciProtectedItemCustomPropertiesUpdate System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class VMwareToAzStackHciProtectedNicProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal VMwareToAzStackHciProtectedNicProperties() { } + public bool? IsPrimaryNic { get { throw null; } } + public string Label { get { throw null; } } + public string MacAddress { get { throw null; } } + public string NetworkName { get { throw null; } } + public string NicId { get { throw null; } } + public Azure.ResourceManager.RecoveryServicesDataReplication.Models.VmNicSelection? SelectionTypeForFailover { get { throw null; } } + public string TargetNetworkId { get { throw null; } } + public string TestNetworkId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzStackHciProtectedNicProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzStackHciProtectedNicProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class VMwareToAzStackHciRecoveryPointCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationRecoveryPointCustomProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal VMwareToAzStackHciRecoveryPointCustomProperties() { } + public System.Collections.Generic.IReadOnlyList DiskIds { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzStackHciRecoveryPointCustomProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzStackHciRecoveryPointCustomProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class VMwareToAzStackHciReplicationExtensionCustomProperties : Azure.ResourceManager.RecoveryServicesDataReplication.Models.DataReplicationExtensionCustomProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public VMwareToAzStackHciReplicationExtensionCustomProperties(Azure.Core.ResourceIdentifier vmwareFabricArmId, Azure.Core.ResourceIdentifier azStackHciFabricArmId) { } + public System.Uri AsrServiceUri { get { throw null; } } + public Azure.Core.ResourceIdentifier AzStackHciFabricArmId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier AzStackHciSiteId { get { throw null; } } + public System.Uri GatewayServiceUri { get { throw null; } } + public System.Uri RcmServiceUri { get { throw null; } } + public string ResourceGroup { get { throw null; } } + public string ResourceLocation { get { throw null; } } + public string SourceGatewayServiceId { get { throw null; } } + public string SourceStorageContainerName { get { throw null; } } + public string StorageAccountId { get { throw null; } set { } } + public string StorageAccountSasSecretName { get { throw null; } set { } } + public string SubscriptionId { get { throw null; } } + public string TargetGatewayServiceId { get { throw null; } } + public string TargetStorageContainerName { get { throw null; } } + public Azure.Core.ResourceIdentifier VmwareFabricArmId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier VmwareSiteId { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzStackHciReplicationExtensionCustomProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzStackHciReplicationExtensionCustomProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct VMwareToAzureMigrateResyncState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public VMwareToAzureMigrateResyncState(string value) { throw null; } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzureMigrateResyncState None { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzureMigrateResyncState PreparedForResynchronization { get { throw null; } } + public static Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzureMigrateResyncState StartedResynchronization { get { throw null; } } + public bool Equals(Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzureMigrateResyncState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzureMigrateResyncState left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzureMigrateResyncState right) { throw null; } + public static implicit operator Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzureMigrateResyncState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzureMigrateResyncState left, Azure.ResourceManager.RecoveryServicesDataReplication.Models.VMwareToAzureMigrateResyncState right) { throw null; } + public override string ToString() { throw null; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/assets.json b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/assets.json new file mode 100644 index 000000000000..f70a74c582ba --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/assets.json @@ -0,0 +1,7 @@ + +{ + "AssetsRepo": "Azure/azure-sdk-assets", + "AssetsRepoPrefixPath": "net", + "TagPrefix": "net/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication", + "Tag": "" +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Azure.ResourceManager.RecoveryServicesDataReplication.Samples.csproj b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Azure.ResourceManager.RecoveryServicesDataReplication.Samples.csproj new file mode 100644 index 000000000000..cebebad85cc8 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Azure.ResourceManager.RecoveryServicesDataReplication.Samples.csproj @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationEmailConfigurationCollection.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationEmailConfigurationCollection.cs new file mode 100644 index 000000000000..8937987d88b3 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationEmailConfigurationCollection.cs @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Samples +{ + public partial class Sample_DataReplicationEmailConfigurationCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreatesEmailConfigurationSettings() + { + // Generated from example definition: 2024-09-01/EmailConfiguration_Create.json + // this example is just showing the usage of "EmailConfigurationModel_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationVaultResource created on azure + // for more information of creating DataReplicationVaultResource, please refer to the document of DataReplicationVaultResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgswagger_2024-09-01"; + string vaultName = "4"; + ResourceIdentifier dataReplicationVaultResourceId = DataReplicationVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName); + DataReplicationVaultResource dataReplicationVault = client.GetDataReplicationVaultResource(dataReplicationVaultResourceId); + + // get the collection of this DataReplicationEmailConfigurationResource + DataReplicationEmailConfigurationCollection collection = dataReplicationVault.GetDataReplicationEmailConfigurations(); + + // invoke the operation + string emailConfigurationName = "0"; + DataReplicationEmailConfigurationData data = new DataReplicationEmailConfigurationData + { + Properties = new DataReplicationEmailConfigurationProperties(true) + { + CustomEmailAddresses = { "ketvbducyailcny" }, + Locale = "vpnjxjvdqtebnucyxiyrjiko", + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, emailConfigurationName, data); + DataReplicationEmailConfigurationResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationEmailConfigurationData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GetsTheEmailConfigurationSetting() + { + // Generated from example definition: 2024-09-01/EmailConfiguration_Get.json + // this example is just showing the usage of "EmailConfigurationModel_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationVaultResource created on azure + // for more information of creating DataReplicationVaultResource, please refer to the document of DataReplicationVaultResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgswagger_2024-09-01"; + string vaultName = "4"; + ResourceIdentifier dataReplicationVaultResourceId = DataReplicationVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName); + DataReplicationVaultResource dataReplicationVault = client.GetDataReplicationVaultResource(dataReplicationVaultResourceId); + + // get the collection of this DataReplicationEmailConfigurationResource + DataReplicationEmailConfigurationCollection collection = dataReplicationVault.GetDataReplicationEmailConfigurations(); + + // invoke the operation + string emailConfigurationName = "0"; + DataReplicationEmailConfigurationResource result = await collection.GetAsync(emailConfigurationName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationEmailConfigurationData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_ListsTheEmailConfigurationSettings() + { + // Generated from example definition: 2024-09-01/EmailConfiguration_List.json + // this example is just showing the usage of "EmailConfigurationModel_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationVaultResource created on azure + // for more information of creating DataReplicationVaultResource, please refer to the document of DataReplicationVaultResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgswagger_2024-09-01"; + string vaultName = "4"; + ResourceIdentifier dataReplicationVaultResourceId = DataReplicationVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName); + DataReplicationVaultResource dataReplicationVault = client.GetDataReplicationVaultResource(dataReplicationVaultResourceId); + + // get the collection of this DataReplicationEmailConfigurationResource + DataReplicationEmailConfigurationCollection collection = dataReplicationVault.GetDataReplicationEmailConfigurations(); + + // invoke the operation and iterate over the result + await foreach (DataReplicationEmailConfigurationResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationEmailConfigurationData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_GetsTheEmailConfigurationSetting() + { + // Generated from example definition: 2024-09-01/EmailConfiguration_Get.json + // this example is just showing the usage of "EmailConfigurationModel_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationVaultResource created on azure + // for more information of creating DataReplicationVaultResource, please refer to the document of DataReplicationVaultResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgswagger_2024-09-01"; + string vaultName = "4"; + ResourceIdentifier dataReplicationVaultResourceId = DataReplicationVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName); + DataReplicationVaultResource dataReplicationVault = client.GetDataReplicationVaultResource(dataReplicationVaultResourceId); + + // get the collection of this DataReplicationEmailConfigurationResource + DataReplicationEmailConfigurationCollection collection = dataReplicationVault.GetDataReplicationEmailConfigurations(); + + // invoke the operation + string emailConfigurationName = "0"; + bool result = await collection.ExistsAsync(emailConfigurationName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_GetsTheEmailConfigurationSetting() + { + // Generated from example definition: 2024-09-01/EmailConfiguration_Get.json + // this example is just showing the usage of "EmailConfigurationModel_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationVaultResource created on azure + // for more information of creating DataReplicationVaultResource, please refer to the document of DataReplicationVaultResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgswagger_2024-09-01"; + string vaultName = "4"; + ResourceIdentifier dataReplicationVaultResourceId = DataReplicationVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName); + DataReplicationVaultResource dataReplicationVault = client.GetDataReplicationVaultResource(dataReplicationVaultResourceId); + + // get the collection of this DataReplicationEmailConfigurationResource + DataReplicationEmailConfigurationCollection collection = dataReplicationVault.GetDataReplicationEmailConfigurations(); + + // invoke the operation + string emailConfigurationName = "0"; + NullableResponse response = await collection.GetIfExistsAsync(emailConfigurationName); + DataReplicationEmailConfigurationResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationEmailConfigurationData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationEmailConfigurationResource.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationEmailConfigurationResource.cs new file mode 100644 index 000000000000..3c4b0cc028a9 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationEmailConfigurationResource.cs @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Samples +{ + public partial class Sample_DataReplicationEmailConfigurationResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GetsTheEmailConfigurationSetting() + { + // Generated from example definition: 2024-09-01/EmailConfiguration_Get.json + // this example is just showing the usage of "EmailConfigurationModel_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationEmailConfigurationResource created on azure + // for more information of creating DataReplicationEmailConfigurationResource, please refer to the document of DataReplicationEmailConfigurationResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgswagger_2024-09-01"; + string vaultName = "4"; + string emailConfigurationName = "0"; + ResourceIdentifier dataReplicationEmailConfigurationResourceId = DataReplicationEmailConfigurationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName, emailConfigurationName); + DataReplicationEmailConfigurationResource dataReplicationEmailConfiguration = client.GetDataReplicationEmailConfigurationResource(dataReplicationEmailConfigurationResourceId); + + // invoke the operation + DataReplicationEmailConfigurationResource result = await dataReplicationEmailConfiguration.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationEmailConfigurationData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_CreatesEmailConfigurationSettings() + { + // Generated from example definition: 2024-09-01/EmailConfiguration_Create.json + // this example is just showing the usage of "EmailConfigurationModel_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationEmailConfigurationResource created on azure + // for more information of creating DataReplicationEmailConfigurationResource, please refer to the document of DataReplicationEmailConfigurationResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgswagger_2024-09-01"; + string vaultName = "4"; + string emailConfigurationName = "0"; + ResourceIdentifier dataReplicationEmailConfigurationResourceId = DataReplicationEmailConfigurationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName, emailConfigurationName); + DataReplicationEmailConfigurationResource dataReplicationEmailConfiguration = client.GetDataReplicationEmailConfigurationResource(dataReplicationEmailConfigurationResourceId); + + // invoke the operation + DataReplicationEmailConfigurationData data = new DataReplicationEmailConfigurationData + { + Properties = new DataReplicationEmailConfigurationProperties(true) + { + CustomEmailAddresses = { "ketvbducyailcny" }, + Locale = "vpnjxjvdqtebnucyxiyrjiko", + }, + }; + ArmOperation lro = await dataReplicationEmailConfiguration.UpdateAsync(WaitUntil.Completed, data); + DataReplicationEmailConfigurationResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationEmailConfigurationData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationEventCollection.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationEventCollection.cs new file mode 100644 index 000000000000..3a0cf69cd8eb --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationEventCollection.cs @@ -0,0 +1,161 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Samples +{ + public partial class Sample_DataReplicationEventCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GetsTheEvent() + { + // Generated from example definition: 2024-09-01/Event_Get.json + // this example is just showing the usage of "EventModel_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationVaultResource created on azure + // for more information of creating DataReplicationVaultResource, please refer to the document of DataReplicationVaultResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgswagger_2024-09-01"; + string vaultName = "4"; + ResourceIdentifier dataReplicationVaultResourceId = DataReplicationVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName); + DataReplicationVaultResource dataReplicationVault = client.GetDataReplicationVaultResource(dataReplicationVaultResourceId); + + // get the collection of this DataReplicationEventResource + DataReplicationEventCollection collection = dataReplicationVault.GetDataReplicationEvents(); + + // invoke the operation + string eventName = "231CIG"; + DataReplicationEventResource result = await collection.GetAsync(eventName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationEventData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_ListsTheEvents() + { + // Generated from example definition: 2024-09-01/Event_List.json + // this example is just showing the usage of "EventModel_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationVaultResource created on azure + // for more information of creating DataReplicationVaultResource, please refer to the document of DataReplicationVaultResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgswagger_2024-09-01"; + string vaultName = "4"; + ResourceIdentifier dataReplicationVaultResourceId = DataReplicationVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName); + DataReplicationVaultResource dataReplicationVault = client.GetDataReplicationVaultResource(dataReplicationVaultResourceId); + + // get the collection of this DataReplicationEventResource + DataReplicationEventCollection collection = dataReplicationVault.GetDataReplicationEvents(); + + // invoke the operation and iterate over the result + string continuationToken = "gabpzsxrifposvleqqcjnvofz"; + await foreach (DataReplicationEventResource item in collection.GetAllAsync(continuationToken: continuationToken)) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationEventData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_GetsTheEvent() + { + // Generated from example definition: 2024-09-01/Event_Get.json + // this example is just showing the usage of "EventModel_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationVaultResource created on azure + // for more information of creating DataReplicationVaultResource, please refer to the document of DataReplicationVaultResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgswagger_2024-09-01"; + string vaultName = "4"; + ResourceIdentifier dataReplicationVaultResourceId = DataReplicationVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName); + DataReplicationVaultResource dataReplicationVault = client.GetDataReplicationVaultResource(dataReplicationVaultResourceId); + + // get the collection of this DataReplicationEventResource + DataReplicationEventCollection collection = dataReplicationVault.GetDataReplicationEvents(); + + // invoke the operation + string eventName = "231CIG"; + bool result = await collection.ExistsAsync(eventName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_GetsTheEvent() + { + // Generated from example definition: 2024-09-01/Event_Get.json + // this example is just showing the usage of "EventModel_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationVaultResource created on azure + // for more information of creating DataReplicationVaultResource, please refer to the document of DataReplicationVaultResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgswagger_2024-09-01"; + string vaultName = "4"; + ResourceIdentifier dataReplicationVaultResourceId = DataReplicationVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName); + DataReplicationVaultResource dataReplicationVault = client.GetDataReplicationVaultResource(dataReplicationVaultResourceId); + + // get the collection of this DataReplicationEventResource + DataReplicationEventCollection collection = dataReplicationVault.GetDataReplicationEvents(); + + // invoke the operation + string eventName = "231CIG"; + NullableResponse response = await collection.GetIfExistsAsync(eventName); + DataReplicationEventResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationEventData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationEventResource.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationEventResource.cs new file mode 100644 index 000000000000..f0646e012c1f --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationEventResource.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Samples +{ + public partial class Sample_DataReplicationEventResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GetsTheEvent() + { + // Generated from example definition: 2024-09-01/Event_Get.json + // this example is just showing the usage of "EventModel_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationEventResource created on azure + // for more information of creating DataReplicationEventResource, please refer to the document of DataReplicationEventResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgswagger_2024-09-01"; + string vaultName = "4"; + string eventName = "231CIG"; + ResourceIdentifier dataReplicationEventResourceId = DataReplicationEventResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName, eventName); + DataReplicationEventResource dataReplicationEvent = client.GetDataReplicationEventResource(dataReplicationEventResourceId); + + // invoke the operation + DataReplicationEventResource result = await dataReplicationEvent.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationEventData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationExtensionCollection.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationExtensionCollection.cs new file mode 100644 index 000000000000..8333737e2075 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationExtensionCollection.cs @@ -0,0 +1,200 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Samples +{ + public partial class Sample_DataReplicationExtensionCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_PutsTheReplicationExtension() + { + // Generated from example definition: 2024-09-01/ReplicationExtension_Create.json + // this example is just showing the usage of "ReplicationExtensionModel_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationVaultResource created on azure + // for more information of creating DataReplicationVaultResource, please refer to the document of DataReplicationVaultResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + ResourceIdentifier dataReplicationVaultResourceId = DataReplicationVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName); + DataReplicationVaultResource dataReplicationVault = client.GetDataReplicationVaultResource(dataReplicationVaultResourceId); + + // get the collection of this DataReplicationExtensionResource + DataReplicationExtensionCollection collection = dataReplicationVault.GetDataReplicationExtensions(); + + // invoke the operation + string replicationExtensionName = "g16yjJ"; + DataReplicationExtensionData data = new DataReplicationExtensionData + { + Properties = new DataReplicationExtensionProperties(null), + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, replicationExtensionName, data); + DataReplicationExtensionResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationExtensionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GetsTheReplicationExtension() + { + // Generated from example definition: 2024-09-01/ReplicationExtension_Get.json + // this example is just showing the usage of "ReplicationExtensionModel_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationVaultResource created on azure + // for more information of creating DataReplicationVaultResource, please refer to the document of DataReplicationVaultResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + ResourceIdentifier dataReplicationVaultResourceId = DataReplicationVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName); + DataReplicationVaultResource dataReplicationVault = client.GetDataReplicationVaultResource(dataReplicationVaultResourceId); + + // get the collection of this DataReplicationExtensionResource + DataReplicationExtensionCollection collection = dataReplicationVault.GetDataReplicationExtensions(); + + // invoke the operation + string replicationExtensionName = "g16yjJ"; + DataReplicationExtensionResource result = await collection.GetAsync(replicationExtensionName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationExtensionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_ListsTheReplicationExtensions() + { + // Generated from example definition: 2024-09-01/ReplicationExtension_List.json + // this example is just showing the usage of "ReplicationExtensionModel_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationVaultResource created on azure + // for more information of creating DataReplicationVaultResource, please refer to the document of DataReplicationVaultResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + ResourceIdentifier dataReplicationVaultResourceId = DataReplicationVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName); + DataReplicationVaultResource dataReplicationVault = client.GetDataReplicationVaultResource(dataReplicationVaultResourceId); + + // get the collection of this DataReplicationExtensionResource + DataReplicationExtensionCollection collection = dataReplicationVault.GetDataReplicationExtensions(); + + // invoke the operation and iterate over the result + await foreach (DataReplicationExtensionResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationExtensionData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_GetsTheReplicationExtension() + { + // Generated from example definition: 2024-09-01/ReplicationExtension_Get.json + // this example is just showing the usage of "ReplicationExtensionModel_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationVaultResource created on azure + // for more information of creating DataReplicationVaultResource, please refer to the document of DataReplicationVaultResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + ResourceIdentifier dataReplicationVaultResourceId = DataReplicationVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName); + DataReplicationVaultResource dataReplicationVault = client.GetDataReplicationVaultResource(dataReplicationVaultResourceId); + + // get the collection of this DataReplicationExtensionResource + DataReplicationExtensionCollection collection = dataReplicationVault.GetDataReplicationExtensions(); + + // invoke the operation + string replicationExtensionName = "g16yjJ"; + bool result = await collection.ExistsAsync(replicationExtensionName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_GetsTheReplicationExtension() + { + // Generated from example definition: 2024-09-01/ReplicationExtension_Get.json + // this example is just showing the usage of "ReplicationExtensionModel_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationVaultResource created on azure + // for more information of creating DataReplicationVaultResource, please refer to the document of DataReplicationVaultResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + ResourceIdentifier dataReplicationVaultResourceId = DataReplicationVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName); + DataReplicationVaultResource dataReplicationVault = client.GetDataReplicationVaultResource(dataReplicationVaultResourceId); + + // get the collection of this DataReplicationExtensionResource + DataReplicationExtensionCollection collection = dataReplicationVault.GetDataReplicationExtensions(); + + // invoke the operation + string replicationExtensionName = "g16yjJ"; + NullableResponse response = await collection.GetIfExistsAsync(replicationExtensionName); + DataReplicationExtensionResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationExtensionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationExtensionResource.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationExtensionResource.cs new file mode 100644 index 000000000000..237c968b26c9 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationExtensionResource.cs @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Samples +{ + public partial class Sample_DataReplicationExtensionResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GetsTheReplicationExtension() + { + // Generated from example definition: 2024-09-01/ReplicationExtension_Get.json + // this example is just showing the usage of "ReplicationExtensionModel_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationExtensionResource created on azure + // for more information of creating DataReplicationExtensionResource, please refer to the document of DataReplicationExtensionResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + string replicationExtensionName = "g16yjJ"; + ResourceIdentifier dataReplicationExtensionResourceId = DataReplicationExtensionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName, replicationExtensionName); + DataReplicationExtensionResource dataReplicationExtension = client.GetDataReplicationExtensionResource(dataReplicationExtensionResourceId); + + // invoke the operation + DataReplicationExtensionResource result = await dataReplicationExtension.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationExtensionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_DeletesTheReplicationExtension() + { + // Generated from example definition: 2024-09-01/ReplicationExtension_Delete.json + // this example is just showing the usage of "ReplicationExtensionModel_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationExtensionResource created on azure + // for more information of creating DataReplicationExtensionResource, please refer to the document of DataReplicationExtensionResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + string replicationExtensionName = "g16yjJ"; + ResourceIdentifier dataReplicationExtensionResourceId = DataReplicationExtensionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName, replicationExtensionName); + DataReplicationExtensionResource dataReplicationExtension = client.GetDataReplicationExtensionResource(dataReplicationExtensionResourceId); + + // invoke the operation + await dataReplicationExtension.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_PutsTheReplicationExtension() + { + // Generated from example definition: 2024-09-01/ReplicationExtension_Create.json + // this example is just showing the usage of "ReplicationExtensionModel_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationExtensionResource created on azure + // for more information of creating DataReplicationExtensionResource, please refer to the document of DataReplicationExtensionResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + string replicationExtensionName = "g16yjJ"; + ResourceIdentifier dataReplicationExtensionResourceId = DataReplicationExtensionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName, replicationExtensionName); + DataReplicationExtensionResource dataReplicationExtension = client.GetDataReplicationExtensionResource(dataReplicationExtensionResourceId); + + // invoke the operation + DataReplicationExtensionData data = new DataReplicationExtensionData + { + Properties = new DataReplicationExtensionProperties(null), + }; + ArmOperation lro = await dataReplicationExtension.UpdateAsync(WaitUntil.Completed, data); + DataReplicationExtensionResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationExtensionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationFabricAgentCollection.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationFabricAgentCollection.cs new file mode 100644 index 000000000000..53cd90f00db8 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationFabricAgentCollection.cs @@ -0,0 +1,200 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Samples +{ + public partial class Sample_DataReplicationFabricAgentCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_PutsTheFabricAgent() + { + // Generated from example definition: 2024-09-01/FabricAgent_Create.json + // this example is just showing the usage of "FabricAgentModel_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationFabricResource created on azure + // for more information of creating DataReplicationFabricResource, please refer to the document of DataReplicationFabricResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgswagger_2024-09-01"; + string fabricName = "wPR"; + ResourceIdentifier dataReplicationFabricResourceId = DataReplicationFabricResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fabricName); + DataReplicationFabricResource dataReplicationFabric = client.GetDataReplicationFabricResource(dataReplicationFabricResourceId); + + // get the collection of this DataReplicationFabricAgentResource + DataReplicationFabricAgentCollection collection = dataReplicationFabric.GetDataReplicationFabricAgents(); + + // invoke the operation + string fabricAgentName = "M"; + DataReplicationFabricAgentData data = new DataReplicationFabricAgentData + { + Properties = new DataReplicationFabricAgentProperties("envzcoijbqhtrpncbjbhk", "y", new DataReplicationIdentity(Guid.Parse("joclkkdovixwapephhxaqtefubhhmq"), "cwktzrwajuvfyyymfstpey", "khsiaqfbpuhp", "dkjobanyqgzenivyxhvavottpc", "bubwwbowfhdmujrt"), new DataReplicationIdentity(Guid.Parse("joclkkdovixwapephhxaqtefubhhmq"), "cwktzrwajuvfyyymfstpey", "khsiaqfbpuhp", "dkjobanyqgzenivyxhvavottpc", "bubwwbowfhdmujrt"), null), + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, fabricAgentName, data); + DataReplicationFabricAgentResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationFabricAgentData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GetsTheFabricAgent() + { + // Generated from example definition: 2024-09-01/FabricAgent_Get.json + // this example is just showing the usage of "FabricAgentModel_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationFabricResource created on azure + // for more information of creating DataReplicationFabricResource, please refer to the document of DataReplicationFabricResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string fabricName = "wPR"; + ResourceIdentifier dataReplicationFabricResourceId = DataReplicationFabricResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fabricName); + DataReplicationFabricResource dataReplicationFabric = client.GetDataReplicationFabricResource(dataReplicationFabricResourceId); + + // get the collection of this DataReplicationFabricAgentResource + DataReplicationFabricAgentCollection collection = dataReplicationFabric.GetDataReplicationFabricAgents(); + + // invoke the operation + string fabricAgentName = "M"; + DataReplicationFabricAgentResource result = await collection.GetAsync(fabricAgentName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationFabricAgentData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_ListsTheFabricAgents() + { + // Generated from example definition: 2024-09-01/FabricAgent_List.json + // this example is just showing the usage of "FabricAgentModel_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationFabricResource created on azure + // for more information of creating DataReplicationFabricResource, please refer to the document of DataReplicationFabricResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgswagger_2024-09-01"; + string fabricName = "wPR"; + ResourceIdentifier dataReplicationFabricResourceId = DataReplicationFabricResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fabricName); + DataReplicationFabricResource dataReplicationFabric = client.GetDataReplicationFabricResource(dataReplicationFabricResourceId); + + // get the collection of this DataReplicationFabricAgentResource + DataReplicationFabricAgentCollection collection = dataReplicationFabric.GetDataReplicationFabricAgents(); + + // invoke the operation and iterate over the result + await foreach (DataReplicationFabricAgentResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationFabricAgentData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_GetsTheFabricAgent() + { + // Generated from example definition: 2024-09-01/FabricAgent_Get.json + // this example is just showing the usage of "FabricAgentModel_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationFabricResource created on azure + // for more information of creating DataReplicationFabricResource, please refer to the document of DataReplicationFabricResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string fabricName = "wPR"; + ResourceIdentifier dataReplicationFabricResourceId = DataReplicationFabricResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fabricName); + DataReplicationFabricResource dataReplicationFabric = client.GetDataReplicationFabricResource(dataReplicationFabricResourceId); + + // get the collection of this DataReplicationFabricAgentResource + DataReplicationFabricAgentCollection collection = dataReplicationFabric.GetDataReplicationFabricAgents(); + + // invoke the operation + string fabricAgentName = "M"; + bool result = await collection.ExistsAsync(fabricAgentName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_GetsTheFabricAgent() + { + // Generated from example definition: 2024-09-01/FabricAgent_Get.json + // this example is just showing the usage of "FabricAgentModel_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationFabricResource created on azure + // for more information of creating DataReplicationFabricResource, please refer to the document of DataReplicationFabricResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string fabricName = "wPR"; + ResourceIdentifier dataReplicationFabricResourceId = DataReplicationFabricResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fabricName); + DataReplicationFabricResource dataReplicationFabric = client.GetDataReplicationFabricResource(dataReplicationFabricResourceId); + + // get the collection of this DataReplicationFabricAgentResource + DataReplicationFabricAgentCollection collection = dataReplicationFabric.GetDataReplicationFabricAgents(); + + // invoke the operation + string fabricAgentName = "M"; + NullableResponse response = await collection.GetIfExistsAsync(fabricAgentName); + DataReplicationFabricAgentResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationFabricAgentData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationFabricAgentResource.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationFabricAgentResource.cs new file mode 100644 index 000000000000..f02d276b5c8f --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationFabricAgentResource.cs @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Samples +{ + public partial class Sample_DataReplicationFabricAgentResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GetsTheFabricAgent() + { + // Generated from example definition: 2024-09-01/FabricAgent_Get.json + // this example is just showing the usage of "FabricAgentModel_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationFabricAgentResource created on azure + // for more information of creating DataReplicationFabricAgentResource, please refer to the document of DataReplicationFabricAgentResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string fabricName = "wPR"; + string fabricAgentName = "M"; + ResourceIdentifier dataReplicationFabricAgentResourceId = DataReplicationFabricAgentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fabricName, fabricAgentName); + DataReplicationFabricAgentResource dataReplicationFabricAgent = client.GetDataReplicationFabricAgentResource(dataReplicationFabricAgentResourceId); + + // invoke the operation + DataReplicationFabricAgentResource result = await dataReplicationFabricAgent.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationFabricAgentData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_DeletesTheFabricAgent() + { + // Generated from example definition: 2024-09-01/FabricAgent_Delete.json + // this example is just showing the usage of "FabricAgentModel_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationFabricAgentResource created on azure + // for more information of creating DataReplicationFabricAgentResource, please refer to the document of DataReplicationFabricAgentResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgswagger_2024-09-01"; + string fabricName = "wPR"; + string fabricAgentName = "M"; + ResourceIdentifier dataReplicationFabricAgentResourceId = DataReplicationFabricAgentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fabricName, fabricAgentName); + DataReplicationFabricAgentResource dataReplicationFabricAgent = client.GetDataReplicationFabricAgentResource(dataReplicationFabricAgentResourceId); + + // invoke the operation + await dataReplicationFabricAgent.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_PutsTheFabricAgent() + { + // Generated from example definition: 2024-09-01/FabricAgent_Create.json + // this example is just showing the usage of "FabricAgentModel_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationFabricAgentResource created on azure + // for more information of creating DataReplicationFabricAgentResource, please refer to the document of DataReplicationFabricAgentResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgswagger_2024-09-01"; + string fabricName = "wPR"; + string fabricAgentName = "M"; + ResourceIdentifier dataReplicationFabricAgentResourceId = DataReplicationFabricAgentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fabricName, fabricAgentName); + DataReplicationFabricAgentResource dataReplicationFabricAgent = client.GetDataReplicationFabricAgentResource(dataReplicationFabricAgentResourceId); + + // invoke the operation + DataReplicationFabricAgentData data = new DataReplicationFabricAgentData + { + Properties = new DataReplicationFabricAgentProperties("envzcoijbqhtrpncbjbhk", "y", new DataReplicationIdentity(Guid.Parse("joclkkdovixwapephhxaqtefubhhmq"), "cwktzrwajuvfyyymfstpey", "khsiaqfbpuhp", "dkjobanyqgzenivyxhvavottpc", "bubwwbowfhdmujrt"), new DataReplicationIdentity(Guid.Parse("joclkkdovixwapephhxaqtefubhhmq"), "cwktzrwajuvfyyymfstpey", "khsiaqfbpuhp", "dkjobanyqgzenivyxhvavottpc", "bubwwbowfhdmujrt"), null), + }; + ArmOperation lro = await dataReplicationFabricAgent.UpdateAsync(WaitUntil.Completed, data); + DataReplicationFabricAgentResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationFabricAgentData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationFabricCollection.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationFabricCollection.cs new file mode 100644 index 000000000000..6578b367b17c --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationFabricCollection.cs @@ -0,0 +1,197 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; +using Azure.ResourceManager.Resources; +using NUnit.Framework; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Samples +{ + public partial class Sample_DataReplicationFabricCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_PutsTheFabric() + { + // Generated from example definition: 2024-09-01/Fabric_Create.json + // this example is just showing the usage of "FabricModel_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgswagger_2024-09-01"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this DataReplicationFabricResource + DataReplicationFabricCollection collection = resourceGroupResource.GetDataReplicationFabrics(); + + // invoke the operation + string fabricName = "wPR"; + DataReplicationFabricData data = new DataReplicationFabricData(new AzureLocation("tqygutlpob")) + { + Properties = new DataReplicationFabricProperties(null), + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, fabricName, data); + DataReplicationFabricResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationFabricData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GetsTheFabric() + { + // Generated from example definition: 2024-09-01/Fabric_Get.json + // this example is just showing the usage of "FabricModel_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this DataReplicationFabricResource + DataReplicationFabricCollection collection = resourceGroupResource.GetDataReplicationFabrics(); + + // invoke the operation + string fabricName = "wPR"; + DataReplicationFabricResource result = await collection.GetAsync(fabricName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationFabricData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_ListsTheFabrics() + { + // Generated from example definition: 2024-09-01/Fabric_List.json + // this example is just showing the usage of "FabricModel_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgswagger_2024-09-01"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this DataReplicationFabricResource + DataReplicationFabricCollection collection = resourceGroupResource.GetDataReplicationFabrics(); + + // invoke the operation and iterate over the result + string continuationToken = "jw"; + await foreach (DataReplicationFabricResource item in collection.GetAllAsync(continuationToken: continuationToken)) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationFabricData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_GetsTheFabric() + { + // Generated from example definition: 2024-09-01/Fabric_Get.json + // this example is just showing the usage of "FabricModel_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this DataReplicationFabricResource + DataReplicationFabricCollection collection = resourceGroupResource.GetDataReplicationFabrics(); + + // invoke the operation + string fabricName = "wPR"; + bool result = await collection.ExistsAsync(fabricName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_GetsTheFabric() + { + // Generated from example definition: 2024-09-01/Fabric_Get.json + // this example is just showing the usage of "FabricModel_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this DataReplicationFabricResource + DataReplicationFabricCollection collection = resourceGroupResource.GetDataReplicationFabrics(); + + // invoke the operation + string fabricName = "wPR"; + NullableResponse response = await collection.GetIfExistsAsync(fabricName); + DataReplicationFabricResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationFabricData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationFabricResource.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationFabricResource.cs new file mode 100644 index 000000000000..e3b3757ec21a --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationFabricResource.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Samples +{ + public partial class Sample_DataReplicationFabricResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GetsTheFabric() + { + // Generated from example definition: 2024-09-01/Fabric_Get.json + // this example is just showing the usage of "FabricModel_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationFabricResource created on azure + // for more information of creating DataReplicationFabricResource, please refer to the document of DataReplicationFabricResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string fabricName = "wPR"; + ResourceIdentifier dataReplicationFabricResourceId = DataReplicationFabricResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fabricName); + DataReplicationFabricResource dataReplicationFabric = client.GetDataReplicationFabricResource(dataReplicationFabricResourceId); + + // invoke the operation + DataReplicationFabricResource result = await dataReplicationFabric.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationFabricData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_DeletesTheFabric() + { + // Generated from example definition: 2024-09-01/Fabric_Delete.json + // this example is just showing the usage of "FabricModel_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationFabricResource created on azure + // for more information of creating DataReplicationFabricResource, please refer to the document of DataReplicationFabricResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string fabricName = "wPR"; + ResourceIdentifier dataReplicationFabricResourceId = DataReplicationFabricResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fabricName); + DataReplicationFabricResource dataReplicationFabric = client.GetDataReplicationFabricResource(dataReplicationFabricResourceId); + + // invoke the operation + await dataReplicationFabric.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_UpdatesTheFabric() + { + // Generated from example definition: 2024-09-01/Fabric_Update.json + // this example is just showing the usage of "FabricModel_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationFabricResource created on azure + // for more information of creating DataReplicationFabricResource, please refer to the document of DataReplicationFabricResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgswagger_2024-09-01"; + string fabricName = "wPR"; + ResourceIdentifier dataReplicationFabricResourceId = DataReplicationFabricResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, fabricName); + DataReplicationFabricResource dataReplicationFabric = client.GetDataReplicationFabricResource(dataReplicationFabricResourceId); + + // invoke the operation + DataReplicationFabricPatch patch = new DataReplicationFabricPatch + { + Tags = { }, + Properties = new DataReplicationFabricProperties(null), + }; + ArmOperation lro = await dataReplicationFabric.UpdateAsync(WaitUntil.Completed, patch); + DataReplicationFabricResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationFabricData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationJobCollection.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationJobCollection.cs new file mode 100644 index 000000000000..295a2fc2e6ed --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationJobCollection.cs @@ -0,0 +1,161 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Samples +{ + public partial class Sample_DataReplicationJobCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GetsTheJob() + { + // Generated from example definition: 2024-09-01/Job_Get.json + // this example is just showing the usage of "JobModel_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationVaultResource created on azure + // for more information of creating DataReplicationVaultResource, please refer to the document of DataReplicationVaultResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + ResourceIdentifier dataReplicationVaultResourceId = DataReplicationVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName); + DataReplicationVaultResource dataReplicationVault = client.GetDataReplicationVaultResource(dataReplicationVaultResourceId); + + // get the collection of this DataReplicationJobResource + DataReplicationJobCollection collection = dataReplicationVault.GetDataReplicationJobs(); + + // invoke the operation + string jobName = "ZGH4y"; + DataReplicationJobResource result = await collection.GetAsync(jobName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationJobData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_ListsTheJobs() + { + // Generated from example definition: 2024-09-01/Job_List.json + // this example is just showing the usage of "JobModel_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationVaultResource created on azure + // for more information of creating DataReplicationVaultResource, please refer to the document of DataReplicationVaultResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + ResourceIdentifier dataReplicationVaultResourceId = DataReplicationVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName); + DataReplicationVaultResource dataReplicationVault = client.GetDataReplicationVaultResource(dataReplicationVaultResourceId); + + // get the collection of this DataReplicationJobResource + DataReplicationJobCollection collection = dataReplicationVault.GetDataReplicationJobs(); + + // invoke the operation and iterate over the result + string continuationToken = "rdavrzbethhslmkqgajontnxsue"; + await foreach (DataReplicationJobResource item in collection.GetAllAsync(continuationToken: continuationToken)) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationJobData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_GetsTheJob() + { + // Generated from example definition: 2024-09-01/Job_Get.json + // this example is just showing the usage of "JobModel_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationVaultResource created on azure + // for more information of creating DataReplicationVaultResource, please refer to the document of DataReplicationVaultResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + ResourceIdentifier dataReplicationVaultResourceId = DataReplicationVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName); + DataReplicationVaultResource dataReplicationVault = client.GetDataReplicationVaultResource(dataReplicationVaultResourceId); + + // get the collection of this DataReplicationJobResource + DataReplicationJobCollection collection = dataReplicationVault.GetDataReplicationJobs(); + + // invoke the operation + string jobName = "ZGH4y"; + bool result = await collection.ExistsAsync(jobName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_GetsTheJob() + { + // Generated from example definition: 2024-09-01/Job_Get.json + // this example is just showing the usage of "JobModel_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationVaultResource created on azure + // for more information of creating DataReplicationVaultResource, please refer to the document of DataReplicationVaultResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + ResourceIdentifier dataReplicationVaultResourceId = DataReplicationVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName); + DataReplicationVaultResource dataReplicationVault = client.GetDataReplicationVaultResource(dataReplicationVaultResourceId); + + // get the collection of this DataReplicationJobResource + DataReplicationJobCollection collection = dataReplicationVault.GetDataReplicationJobs(); + + // invoke the operation + string jobName = "ZGH4y"; + NullableResponse response = await collection.GetIfExistsAsync(jobName); + DataReplicationJobResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationJobData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationJobResource.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationJobResource.cs new file mode 100644 index 000000000000..4d35112545de --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationJobResource.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Samples +{ + public partial class Sample_DataReplicationJobResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GetsTheJob() + { + // Generated from example definition: 2024-09-01/Job_Get.json + // this example is just showing the usage of "JobModel_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationJobResource created on azure + // for more information of creating DataReplicationJobResource, please refer to the document of DataReplicationJobResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + string jobName = "ZGH4y"; + ResourceIdentifier dataReplicationJobResourceId = DataReplicationJobResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName, jobName); + DataReplicationJobResource dataReplicationJob = client.GetDataReplicationJobResource(dataReplicationJobResourceId); + + // invoke the operation + DataReplicationJobResource result = await dataReplicationJob.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationJobData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationPolicyCollection.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationPolicyCollection.cs new file mode 100644 index 000000000000..aad7c15fac50 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationPolicyCollection.cs @@ -0,0 +1,200 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Samples +{ + public partial class Sample_DataReplicationPolicyCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_PutsThePolicy() + { + // Generated from example definition: 2024-09-01/Policy_Create.json + // this example is just showing the usage of "PolicyModel_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationVaultResource created on azure + // for more information of creating DataReplicationVaultResource, please refer to the document of DataReplicationVaultResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + ResourceIdentifier dataReplicationVaultResourceId = DataReplicationVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName); + DataReplicationVaultResource dataReplicationVault = client.GetDataReplicationVaultResource(dataReplicationVaultResourceId); + + // get the collection of this DataReplicationPolicyResource + DataReplicationPolicyCollection collection = dataReplicationVault.GetDataReplicationPolicies(); + + // invoke the operation + string policyName = "fafqwc"; + DataReplicationPolicyData data = new DataReplicationPolicyData + { + Properties = new DataReplicationPolicyProperties(null), + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, policyName, data); + DataReplicationPolicyResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationPolicyData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GetsThePolicy() + { + // Generated from example definition: 2024-09-01/Policy_Get.json + // this example is just showing the usage of "PolicyModel_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationVaultResource created on azure + // for more information of creating DataReplicationVaultResource, please refer to the document of DataReplicationVaultResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + ResourceIdentifier dataReplicationVaultResourceId = DataReplicationVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName); + DataReplicationVaultResource dataReplicationVault = client.GetDataReplicationVaultResource(dataReplicationVaultResourceId); + + // get the collection of this DataReplicationPolicyResource + DataReplicationPolicyCollection collection = dataReplicationVault.GetDataReplicationPolicies(); + + // invoke the operation + string policyName = "wdqsacasc"; + DataReplicationPolicyResource result = await collection.GetAsync(policyName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationPolicyData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_ListsThePolicies() + { + // Generated from example definition: 2024-09-01/Policy_List.json + // this example is just showing the usage of "PolicyModel_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationVaultResource created on azure + // for more information of creating DataReplicationVaultResource, please refer to the document of DataReplicationVaultResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + ResourceIdentifier dataReplicationVaultResourceId = DataReplicationVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName); + DataReplicationVaultResource dataReplicationVault = client.GetDataReplicationVaultResource(dataReplicationVaultResourceId); + + // get the collection of this DataReplicationPolicyResource + DataReplicationPolicyCollection collection = dataReplicationVault.GetDataReplicationPolicies(); + + // invoke the operation and iterate over the result + await foreach (DataReplicationPolicyResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationPolicyData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_GetsThePolicy() + { + // Generated from example definition: 2024-09-01/Policy_Get.json + // this example is just showing the usage of "PolicyModel_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationVaultResource created on azure + // for more information of creating DataReplicationVaultResource, please refer to the document of DataReplicationVaultResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + ResourceIdentifier dataReplicationVaultResourceId = DataReplicationVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName); + DataReplicationVaultResource dataReplicationVault = client.GetDataReplicationVaultResource(dataReplicationVaultResourceId); + + // get the collection of this DataReplicationPolicyResource + DataReplicationPolicyCollection collection = dataReplicationVault.GetDataReplicationPolicies(); + + // invoke the operation + string policyName = "wdqsacasc"; + bool result = await collection.ExistsAsync(policyName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_GetsThePolicy() + { + // Generated from example definition: 2024-09-01/Policy_Get.json + // this example is just showing the usage of "PolicyModel_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationVaultResource created on azure + // for more information of creating DataReplicationVaultResource, please refer to the document of DataReplicationVaultResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + ResourceIdentifier dataReplicationVaultResourceId = DataReplicationVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName); + DataReplicationVaultResource dataReplicationVault = client.GetDataReplicationVaultResource(dataReplicationVaultResourceId); + + // get the collection of this DataReplicationPolicyResource + DataReplicationPolicyCollection collection = dataReplicationVault.GetDataReplicationPolicies(); + + // invoke the operation + string policyName = "wdqsacasc"; + NullableResponse response = await collection.GetIfExistsAsync(policyName); + DataReplicationPolicyResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationPolicyData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationPolicyResource.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationPolicyResource.cs new file mode 100644 index 000000000000..e76b004b6589 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationPolicyResource.cs @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Samples +{ + public partial class Sample_DataReplicationPolicyResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GetsThePolicy() + { + // Generated from example definition: 2024-09-01/Policy_Get.json + // this example is just showing the usage of "PolicyModel_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationPolicyResource created on azure + // for more information of creating DataReplicationPolicyResource, please refer to the document of DataReplicationPolicyResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + string policyName = "wdqsacasc"; + ResourceIdentifier dataReplicationPolicyResourceId = DataReplicationPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName, policyName); + DataReplicationPolicyResource dataReplicationPolicy = client.GetDataReplicationPolicyResource(dataReplicationPolicyResourceId); + + // invoke the operation + DataReplicationPolicyResource result = await dataReplicationPolicy.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationPolicyData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_DeletesThePolicy() + { + // Generated from example definition: 2024-09-01/Policy_Delete.json + // this example is just showing the usage of "PolicyModel_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationPolicyResource created on azure + // for more information of creating DataReplicationPolicyResource, please refer to the document of DataReplicationPolicyResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + string policyName = "wqfscsdv"; + ResourceIdentifier dataReplicationPolicyResourceId = DataReplicationPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName, policyName); + DataReplicationPolicyResource dataReplicationPolicy = client.GetDataReplicationPolicyResource(dataReplicationPolicyResourceId); + + // invoke the operation + await dataReplicationPolicy.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_PutsThePolicy() + { + // Generated from example definition: 2024-09-01/Policy_Create.json + // this example is just showing the usage of "PolicyModel_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationPolicyResource created on azure + // for more information of creating DataReplicationPolicyResource, please refer to the document of DataReplicationPolicyResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + string policyName = "fafqwc"; + ResourceIdentifier dataReplicationPolicyResourceId = DataReplicationPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName, policyName); + DataReplicationPolicyResource dataReplicationPolicy = client.GetDataReplicationPolicyResource(dataReplicationPolicyResourceId); + + // invoke the operation + DataReplicationPolicyData data = new DataReplicationPolicyData + { + Properties = new DataReplicationPolicyProperties(null), + }; + ArmOperation lro = await dataReplicationPolicy.UpdateAsync(WaitUntil.Completed, data); + DataReplicationPolicyResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationPolicyData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationPrivateEndpointConnectionCollection.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationPrivateEndpointConnectionCollection.cs new file mode 100644 index 000000000000..a01eefd0873b --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationPrivateEndpointConnectionCollection.cs @@ -0,0 +1,209 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Samples +{ + public partial class Sample_DataReplicationPrivateEndpointConnectionCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_UpdatesThePrivateEndpointConnection() + { + // Generated from example definition: 2024-09-01/PrivateEndpointConnection_Update.json + // this example is just showing the usage of "PrivateEndpointConnection_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationVaultResource created on azure + // for more information of creating DataReplicationVaultResource, please refer to the document of DataReplicationVaultResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgswagger_2024-09-01"; + string vaultName = "4"; + ResourceIdentifier dataReplicationVaultResourceId = DataReplicationVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName); + DataReplicationVaultResource dataReplicationVault = client.GetDataReplicationVaultResource(dataReplicationVaultResourceId); + + // get the collection of this DataReplicationPrivateEndpointConnectionResource + DataReplicationPrivateEndpointConnectionCollection collection = dataReplicationVault.GetDataReplicationPrivateEndpointConnections(); + + // invoke the operation + string privateEndpointConnectionName = "jitf"; + DataReplicationPrivateEndpointConnectionData data = new DataReplicationPrivateEndpointConnectionData + { + Properties = new DataReplicationPrivateEndpointConnectionProperties + { + PrivateEndpointId = new ResourceIdentifier("cwcdqoynostmqwdwy"), + PrivateLinkServiceConnectionState = new DataReplicationPrivateLinkServiceConnectionState + { + Status = DataReplicationPrivateEndpointConnectionStatus.Approved, + Description = "y", + ActionsRequired = "afwbq", + }, + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, privateEndpointConnectionName, data); + DataReplicationPrivateEndpointConnectionResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationPrivateEndpointConnectionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GetsThePrivateEndpointConnection() + { + // Generated from example definition: 2024-09-01/PrivateEndpointConnection_Get.json + // this example is just showing the usage of "PrivateEndpointConnection_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationVaultResource created on azure + // for more information of creating DataReplicationVaultResource, please refer to the document of DataReplicationVaultResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgswagger_2024-09-01"; + string vaultName = "4"; + ResourceIdentifier dataReplicationVaultResourceId = DataReplicationVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName); + DataReplicationVaultResource dataReplicationVault = client.GetDataReplicationVaultResource(dataReplicationVaultResourceId); + + // get the collection of this DataReplicationPrivateEndpointConnectionResource + DataReplicationPrivateEndpointConnectionCollection collection = dataReplicationVault.GetDataReplicationPrivateEndpointConnections(); + + // invoke the operation + string privateEndpointConnectionName = "vbkm"; + DataReplicationPrivateEndpointConnectionResource result = await collection.GetAsync(privateEndpointConnectionName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationPrivateEndpointConnectionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_ListsThePrivateEndpointConnections() + { + // Generated from example definition: 2024-09-01/PrivateEndpointConnection_List.json + // this example is just showing the usage of "PrivateEndpointConnection_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationVaultResource created on azure + // for more information of creating DataReplicationVaultResource, please refer to the document of DataReplicationVaultResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgswagger_2024-09-01"; + string vaultName = "4"; + ResourceIdentifier dataReplicationVaultResourceId = DataReplicationVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName); + DataReplicationVaultResource dataReplicationVault = client.GetDataReplicationVaultResource(dataReplicationVaultResourceId); + + // get the collection of this DataReplicationPrivateEndpointConnectionResource + DataReplicationPrivateEndpointConnectionCollection collection = dataReplicationVault.GetDataReplicationPrivateEndpointConnections(); + + // invoke the operation and iterate over the result + await foreach (DataReplicationPrivateEndpointConnectionResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationPrivateEndpointConnectionData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_GetsThePrivateEndpointConnection() + { + // Generated from example definition: 2024-09-01/PrivateEndpointConnection_Get.json + // this example is just showing the usage of "PrivateEndpointConnection_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationVaultResource created on azure + // for more information of creating DataReplicationVaultResource, please refer to the document of DataReplicationVaultResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgswagger_2024-09-01"; + string vaultName = "4"; + ResourceIdentifier dataReplicationVaultResourceId = DataReplicationVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName); + DataReplicationVaultResource dataReplicationVault = client.GetDataReplicationVaultResource(dataReplicationVaultResourceId); + + // get the collection of this DataReplicationPrivateEndpointConnectionResource + DataReplicationPrivateEndpointConnectionCollection collection = dataReplicationVault.GetDataReplicationPrivateEndpointConnections(); + + // invoke the operation + string privateEndpointConnectionName = "vbkm"; + bool result = await collection.ExistsAsync(privateEndpointConnectionName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_GetsThePrivateEndpointConnection() + { + // Generated from example definition: 2024-09-01/PrivateEndpointConnection_Get.json + // this example is just showing the usage of "PrivateEndpointConnection_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationVaultResource created on azure + // for more information of creating DataReplicationVaultResource, please refer to the document of DataReplicationVaultResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgswagger_2024-09-01"; + string vaultName = "4"; + ResourceIdentifier dataReplicationVaultResourceId = DataReplicationVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName); + DataReplicationVaultResource dataReplicationVault = client.GetDataReplicationVaultResource(dataReplicationVaultResourceId); + + // get the collection of this DataReplicationPrivateEndpointConnectionResource + DataReplicationPrivateEndpointConnectionCollection collection = dataReplicationVault.GetDataReplicationPrivateEndpointConnections(); + + // invoke the operation + string privateEndpointConnectionName = "vbkm"; + NullableResponse response = await collection.GetIfExistsAsync(privateEndpointConnectionName); + DataReplicationPrivateEndpointConnectionResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationPrivateEndpointConnectionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationPrivateEndpointConnectionProxyCollection.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationPrivateEndpointConnectionProxyCollection.cs new file mode 100644 index 000000000000..3478399b0a8d --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationPrivateEndpointConnectionProxyCollection.cs @@ -0,0 +1,246 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Samples +{ + public partial class Sample_DataReplicationPrivateEndpointConnectionProxyCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreatesThePrivateEndpointConnectionProxy() + { + // Generated from example definition: 2024-09-01/PrivateEndpointConnectionProxy_Create.json + // this example is just showing the usage of "PrivateEndpointConnectionProxy_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationVaultResource created on azure + // for more information of creating DataReplicationVaultResource, please refer to the document of DataReplicationVaultResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgswagger_2024-09-01"; + string vaultName = "4"; + ResourceIdentifier dataReplicationVaultResourceId = DataReplicationVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName); + DataReplicationVaultResource dataReplicationVault = client.GetDataReplicationVaultResource(dataReplicationVaultResourceId); + + // get the collection of this DataReplicationPrivateEndpointConnectionProxyResource + DataReplicationPrivateEndpointConnectionProxyCollection collection = dataReplicationVault.GetDataReplicationPrivateEndpointConnectionProxies(); + + // invoke the operation + string privateEndpointConnectionProxyName = "d"; + DataReplicationPrivateEndpointConnectionProxyData data = new DataReplicationPrivateEndpointConnectionProxyData + { + Properties = new DataReplicationPrivateEndpointConnectionProxyProperties + { + RemotePrivateEndpoint = new RemotePrivateEndpoint("yipalno") + { + PrivateLinkServiceConnections = {new DataReplicationPrivateLinkServiceConnection +{ +Name = "jqwntlzfsksl", +GroupIds = {"hvejynjktikteipnioyeja"}, +RequestMessage = "bukgzpkvcvfbmcdmpcbiigbvugicqa", +}}, + ManualPrivateLinkServiceConnections = {new DataReplicationPrivateLinkServiceConnection +{ +Name = "jqwntlzfsksl", +GroupIds = {"hvejynjktikteipnioyeja"}, +RequestMessage = "bukgzpkvcvfbmcdmpcbiigbvugicqa", +}}, + PrivateLinkServiceProxies = {new DataReplicationPrivateLinkServiceProxy +{ +Id = "nzqxevuyqeedrqnkbnlcyrrrbzxvl", +RemotePrivateLinkServiceConnectionState = new DataReplicationPrivateLinkServiceConnectionState +{ +Status = DataReplicationPrivateEndpointConnectionStatus.Approved, +Description = "y", +ActionsRequired = "afwbq", +}, +RemotePrivateEndpointConnectionId = new ResourceIdentifier("ocunsgawjsqohkrcyxiv"), +GroupConnectivityInformation = {new GroupConnectivityInformation +{ +GroupId = "per", +MemberName = "ybptuypgdqoxkuwqx", +CustomerVisibleFqdns = {"vedcg"}, +InternalFqdn = "maqavwhxwzzhbzjbryyquvitmup", +RedirectMapId = "pezncxcq", +PrivateLinkServiceArmRegion = "rerkqqxinteevmlbrdkktaqhcch", +}}, +}}, + ConnectionDetails = {new RemotePrivateEndpointConnectionDetails +{ +Id = "lenqkogzkes", +PrivateIPAddress = "cyiacdzzyqmxjpijjbwgasegehtqe", +LinkIdentifier = "ravfufhkdowufd", +GroupId = "pjrlygpadir", +MemberName = "ybuysjrlfupewxe", +}}, + }, + }, + ETag = new ETag("hruibxrezstxroxrxweh"), + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, privateEndpointConnectionProxyName, data); + DataReplicationPrivateEndpointConnectionProxyResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationPrivateEndpointConnectionProxyData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GetPrivateEndpointConnectionProxy() + { + // Generated from example definition: 2024-09-01/PrivateEndpointConnectionProxy_Get.json + // this example is just showing the usage of "PrivateEndpointConnectionProxy_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationVaultResource created on azure + // for more information of creating DataReplicationVaultResource, please refer to the document of DataReplicationVaultResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgswagger_2024-09-01"; + string vaultName = "4"; + ResourceIdentifier dataReplicationVaultResourceId = DataReplicationVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName); + DataReplicationVaultResource dataReplicationVault = client.GetDataReplicationVaultResource(dataReplicationVaultResourceId); + + // get the collection of this DataReplicationPrivateEndpointConnectionProxyResource + DataReplicationPrivateEndpointConnectionProxyCollection collection = dataReplicationVault.GetDataReplicationPrivateEndpointConnectionProxies(); + + // invoke the operation + string privateEndpointConnectionProxyName = "d"; + DataReplicationPrivateEndpointConnectionProxyResource result = await collection.GetAsync(privateEndpointConnectionProxyName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationPrivateEndpointConnectionProxyData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_ListsThePrivateEndpointConnectionProxy() + { + // Generated from example definition: 2024-09-01/PrivateEndpointConnectionProxy_List.json + // this example is just showing the usage of "PrivateEndpointConnectionProxy_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationVaultResource created on azure + // for more information of creating DataReplicationVaultResource, please refer to the document of DataReplicationVaultResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgswagger_2024-09-01"; + string vaultName = "4"; + ResourceIdentifier dataReplicationVaultResourceId = DataReplicationVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName); + DataReplicationVaultResource dataReplicationVault = client.GetDataReplicationVaultResource(dataReplicationVaultResourceId); + + // get the collection of this DataReplicationPrivateEndpointConnectionProxyResource + DataReplicationPrivateEndpointConnectionProxyCollection collection = dataReplicationVault.GetDataReplicationPrivateEndpointConnectionProxies(); + + // invoke the operation and iterate over the result + await foreach (DataReplicationPrivateEndpointConnectionProxyResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationPrivateEndpointConnectionProxyData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_GetPrivateEndpointConnectionProxy() + { + // Generated from example definition: 2024-09-01/PrivateEndpointConnectionProxy_Get.json + // this example is just showing the usage of "PrivateEndpointConnectionProxy_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationVaultResource created on azure + // for more information of creating DataReplicationVaultResource, please refer to the document of DataReplicationVaultResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgswagger_2024-09-01"; + string vaultName = "4"; + ResourceIdentifier dataReplicationVaultResourceId = DataReplicationVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName); + DataReplicationVaultResource dataReplicationVault = client.GetDataReplicationVaultResource(dataReplicationVaultResourceId); + + // get the collection of this DataReplicationPrivateEndpointConnectionProxyResource + DataReplicationPrivateEndpointConnectionProxyCollection collection = dataReplicationVault.GetDataReplicationPrivateEndpointConnectionProxies(); + + // invoke the operation + string privateEndpointConnectionProxyName = "d"; + bool result = await collection.ExistsAsync(privateEndpointConnectionProxyName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_GetPrivateEndpointConnectionProxy() + { + // Generated from example definition: 2024-09-01/PrivateEndpointConnectionProxy_Get.json + // this example is just showing the usage of "PrivateEndpointConnectionProxy_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationVaultResource created on azure + // for more information of creating DataReplicationVaultResource, please refer to the document of DataReplicationVaultResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgswagger_2024-09-01"; + string vaultName = "4"; + ResourceIdentifier dataReplicationVaultResourceId = DataReplicationVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName); + DataReplicationVaultResource dataReplicationVault = client.GetDataReplicationVaultResource(dataReplicationVaultResourceId); + + // get the collection of this DataReplicationPrivateEndpointConnectionProxyResource + DataReplicationPrivateEndpointConnectionProxyCollection collection = dataReplicationVault.GetDataReplicationPrivateEndpointConnectionProxies(); + + // invoke the operation + string privateEndpointConnectionProxyName = "d"; + NullableResponse response = await collection.GetIfExistsAsync(privateEndpointConnectionProxyName); + DataReplicationPrivateEndpointConnectionProxyResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationPrivateEndpointConnectionProxyData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationPrivateEndpointConnectionProxyResource.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationPrivateEndpointConnectionProxyResource.cs new file mode 100644 index 000000000000..c8786067cd31 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationPrivateEndpointConnectionProxyResource.cs @@ -0,0 +1,240 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Samples +{ + public partial class Sample_DataReplicationPrivateEndpointConnectionProxyResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GetPrivateEndpointConnectionProxy() + { + // Generated from example definition: 2024-09-01/PrivateEndpointConnectionProxy_Get.json + // this example is just showing the usage of "PrivateEndpointConnectionProxy_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationPrivateEndpointConnectionProxyResource created on azure + // for more information of creating DataReplicationPrivateEndpointConnectionProxyResource, please refer to the document of DataReplicationPrivateEndpointConnectionProxyResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgswagger_2024-09-01"; + string vaultName = "4"; + string privateEndpointConnectionProxyName = "d"; + ResourceIdentifier dataReplicationPrivateEndpointConnectionProxyResourceId = DataReplicationPrivateEndpointConnectionProxyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName, privateEndpointConnectionProxyName); + DataReplicationPrivateEndpointConnectionProxyResource dataReplicationPrivateEndpointConnectionProxy = client.GetDataReplicationPrivateEndpointConnectionProxyResource(dataReplicationPrivateEndpointConnectionProxyResourceId); + + // invoke the operation + DataReplicationPrivateEndpointConnectionProxyResource result = await dataReplicationPrivateEndpointConnectionProxy.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationPrivateEndpointConnectionProxyData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_DeletesThePrivateEndpointProxyConnection() + { + // Generated from example definition: 2024-09-01/PrivateEndpointConnectionProxy_Delete.json + // this example is just showing the usage of "PrivateEndpointConnectionProxy_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationPrivateEndpointConnectionProxyResource created on azure + // for more information of creating DataReplicationPrivateEndpointConnectionProxyResource, please refer to the document of DataReplicationPrivateEndpointConnectionProxyResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgswagger_2024-09-01"; + string vaultName = "4"; + string privateEndpointConnectionProxyName = "d"; + ResourceIdentifier dataReplicationPrivateEndpointConnectionProxyResourceId = DataReplicationPrivateEndpointConnectionProxyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName, privateEndpointConnectionProxyName); + DataReplicationPrivateEndpointConnectionProxyResource dataReplicationPrivateEndpointConnectionProxy = client.GetDataReplicationPrivateEndpointConnectionProxyResource(dataReplicationPrivateEndpointConnectionProxyResourceId); + + // invoke the operation + await dataReplicationPrivateEndpointConnectionProxy.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_CreatesThePrivateEndpointConnectionProxy() + { + // Generated from example definition: 2024-09-01/PrivateEndpointConnectionProxy_Create.json + // this example is just showing the usage of "PrivateEndpointConnectionProxy_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationPrivateEndpointConnectionProxyResource created on azure + // for more information of creating DataReplicationPrivateEndpointConnectionProxyResource, please refer to the document of DataReplicationPrivateEndpointConnectionProxyResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgswagger_2024-09-01"; + string vaultName = "4"; + string privateEndpointConnectionProxyName = "d"; + ResourceIdentifier dataReplicationPrivateEndpointConnectionProxyResourceId = DataReplicationPrivateEndpointConnectionProxyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName, privateEndpointConnectionProxyName); + DataReplicationPrivateEndpointConnectionProxyResource dataReplicationPrivateEndpointConnectionProxy = client.GetDataReplicationPrivateEndpointConnectionProxyResource(dataReplicationPrivateEndpointConnectionProxyResourceId); + + // invoke the operation + DataReplicationPrivateEndpointConnectionProxyData data = new DataReplicationPrivateEndpointConnectionProxyData + { + Properties = new DataReplicationPrivateEndpointConnectionProxyProperties + { + RemotePrivateEndpoint = new RemotePrivateEndpoint("yipalno") + { + PrivateLinkServiceConnections = {new DataReplicationPrivateLinkServiceConnection +{ +Name = "jqwntlzfsksl", +GroupIds = {"hvejynjktikteipnioyeja"}, +RequestMessage = "bukgzpkvcvfbmcdmpcbiigbvugicqa", +}}, + ManualPrivateLinkServiceConnections = {new DataReplicationPrivateLinkServiceConnection +{ +Name = "jqwntlzfsksl", +GroupIds = {"hvejynjktikteipnioyeja"}, +RequestMessage = "bukgzpkvcvfbmcdmpcbiigbvugicqa", +}}, + PrivateLinkServiceProxies = {new DataReplicationPrivateLinkServiceProxy +{ +Id = "nzqxevuyqeedrqnkbnlcyrrrbzxvl", +RemotePrivateLinkServiceConnectionState = new DataReplicationPrivateLinkServiceConnectionState +{ +Status = DataReplicationPrivateEndpointConnectionStatus.Approved, +Description = "y", +ActionsRequired = "afwbq", +}, +RemotePrivateEndpointConnectionId = new ResourceIdentifier("ocunsgawjsqohkrcyxiv"), +GroupConnectivityInformation = {new GroupConnectivityInformation +{ +GroupId = "per", +MemberName = "ybptuypgdqoxkuwqx", +CustomerVisibleFqdns = {"vedcg"}, +InternalFqdn = "maqavwhxwzzhbzjbryyquvitmup", +RedirectMapId = "pezncxcq", +PrivateLinkServiceArmRegion = "rerkqqxinteevmlbrdkktaqhcch", +}}, +}}, + ConnectionDetails = {new RemotePrivateEndpointConnectionDetails +{ +Id = "lenqkogzkes", +PrivateIPAddress = "cyiacdzzyqmxjpijjbwgasegehtqe", +LinkIdentifier = "ravfufhkdowufd", +GroupId = "pjrlygpadir", +MemberName = "ybuysjrlfupewxe", +}}, + }, + }, + ETag = new ETag("hruibxrezstxroxrxweh"), + }; + ArmOperation lro = await dataReplicationPrivateEndpointConnectionProxy.UpdateAsync(WaitUntil.Completed, data); + DataReplicationPrivateEndpointConnectionProxyResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationPrivateEndpointConnectionProxyData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Validate_ValidatesThePrivateEndpointConnectionProxy() + { + // Generated from example definition: 2024-09-01/PrivateEndpointConnectionProxy_Validate.json + // this example is just showing the usage of "PrivateEndpointConnectionProxies_Validate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationPrivateEndpointConnectionProxyResource created on azure + // for more information of creating DataReplicationPrivateEndpointConnectionProxyResource, please refer to the document of DataReplicationPrivateEndpointConnectionProxyResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgswagger_2024-09-01"; + string vaultName = "4"; + string privateEndpointConnectionProxyName = "d"; + ResourceIdentifier dataReplicationPrivateEndpointConnectionProxyResourceId = DataReplicationPrivateEndpointConnectionProxyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName, privateEndpointConnectionProxyName); + DataReplicationPrivateEndpointConnectionProxyResource dataReplicationPrivateEndpointConnectionProxy = client.GetDataReplicationPrivateEndpointConnectionProxyResource(dataReplicationPrivateEndpointConnectionProxyResourceId); + + // invoke the operation + DataReplicationPrivateEndpointConnectionProxyData data = new DataReplicationPrivateEndpointConnectionProxyData + { + Properties = new DataReplicationPrivateEndpointConnectionProxyProperties + { + RemotePrivateEndpoint = new RemotePrivateEndpoint("yipalno") + { + PrivateLinkServiceConnections = {new DataReplicationPrivateLinkServiceConnection +{ +Name = "jqwntlzfsksl", +GroupIds = {"hvejynjktikteipnioyeja"}, +RequestMessage = "bukgzpkvcvfbmcdmpcbiigbvugicqa", +}}, + ManualPrivateLinkServiceConnections = {new DataReplicationPrivateLinkServiceConnection +{ +Name = "jqwntlzfsksl", +GroupIds = {"hvejynjktikteipnioyeja"}, +RequestMessage = "bukgzpkvcvfbmcdmpcbiigbvugicqa", +}}, + PrivateLinkServiceProxies = {new DataReplicationPrivateLinkServiceProxy +{ +Id = "nzqxevuyqeedrqnkbnlcyrrrbzxvl", +RemotePrivateLinkServiceConnectionState = new DataReplicationPrivateLinkServiceConnectionState +{ +Status = DataReplicationPrivateEndpointConnectionStatus.Approved, +Description = "y", +ActionsRequired = "afwbq", +}, +RemotePrivateEndpointConnectionId = new ResourceIdentifier("ocunsgawjsqohkrcyxiv"), +GroupConnectivityInformation = {new GroupConnectivityInformation +{ +GroupId = "per", +MemberName = "ybptuypgdqoxkuwqx", +CustomerVisibleFqdns = {"vedcg"}, +InternalFqdn = "maqavwhxwzzhbzjbryyquvitmup", +RedirectMapId = "pezncxcq", +PrivateLinkServiceArmRegion = "rerkqqxinteevmlbrdkktaqhcch", +}}, +}}, + ConnectionDetails = {new RemotePrivateEndpointConnectionDetails +{ +Id = "lenqkogzkes", +PrivateIPAddress = "cyiacdzzyqmxjpijjbwgasegehtqe", +LinkIdentifier = "ravfufhkdowufd", +GroupId = "pjrlygpadir", +MemberName = "ybuysjrlfupewxe", +}}, + }, + }, + ETag = new ETag("hruibxrezstxroxrxweh"), + }; + DataReplicationPrivateEndpointConnectionProxyResource result = await dataReplicationPrivateEndpointConnectionProxy.ValidateAsync(data); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationPrivateEndpointConnectionProxyData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationPrivateEndpointConnectionResource.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationPrivateEndpointConnectionResource.cs new file mode 100644 index 000000000000..a7e99a69865d --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationPrivateEndpointConnectionResource.cs @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Samples +{ + public partial class Sample_DataReplicationPrivateEndpointConnectionResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GetsThePrivateEndpointConnection() + { + // Generated from example definition: 2024-09-01/PrivateEndpointConnection_Get.json + // this example is just showing the usage of "PrivateEndpointConnection_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationPrivateEndpointConnectionResource created on azure + // for more information of creating DataReplicationPrivateEndpointConnectionResource, please refer to the document of DataReplicationPrivateEndpointConnectionResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgswagger_2024-09-01"; + string vaultName = "4"; + string privateEndpointConnectionName = "vbkm"; + ResourceIdentifier dataReplicationPrivateEndpointConnectionResourceId = DataReplicationPrivateEndpointConnectionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName, privateEndpointConnectionName); + DataReplicationPrivateEndpointConnectionResource dataReplicationPrivateEndpointConnection = client.GetDataReplicationPrivateEndpointConnectionResource(dataReplicationPrivateEndpointConnectionResourceId); + + // invoke the operation + DataReplicationPrivateEndpointConnectionResource result = await dataReplicationPrivateEndpointConnection.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationPrivateEndpointConnectionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_DeletesThePrivateEndpointConnection() + { + // Generated from example definition: 2024-09-01/PrivateEndpointConnection_Delete.json + // this example is just showing the usage of "PrivateEndpointConnection_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationPrivateEndpointConnectionResource created on azure + // for more information of creating DataReplicationPrivateEndpointConnectionResource, please refer to the document of DataReplicationPrivateEndpointConnectionResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgswagger_2024-09-01"; + string vaultName = "4"; + string privateEndpointConnectionName = "sdwqtfhigjirrzhpbmqtzgs"; + ResourceIdentifier dataReplicationPrivateEndpointConnectionResourceId = DataReplicationPrivateEndpointConnectionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName, privateEndpointConnectionName); + DataReplicationPrivateEndpointConnectionResource dataReplicationPrivateEndpointConnection = client.GetDataReplicationPrivateEndpointConnectionResource(dataReplicationPrivateEndpointConnectionResourceId); + + // invoke the operation + await dataReplicationPrivateEndpointConnection.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_UpdatesThePrivateEndpointConnection() + { + // Generated from example definition: 2024-09-01/PrivateEndpointConnection_Update.json + // this example is just showing the usage of "PrivateEndpointConnection_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationPrivateEndpointConnectionResource created on azure + // for more information of creating DataReplicationPrivateEndpointConnectionResource, please refer to the document of DataReplicationPrivateEndpointConnectionResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgswagger_2024-09-01"; + string vaultName = "4"; + string privateEndpointConnectionName = "jitf"; + ResourceIdentifier dataReplicationPrivateEndpointConnectionResourceId = DataReplicationPrivateEndpointConnectionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName, privateEndpointConnectionName); + DataReplicationPrivateEndpointConnectionResource dataReplicationPrivateEndpointConnection = client.GetDataReplicationPrivateEndpointConnectionResource(dataReplicationPrivateEndpointConnectionResourceId); + + // invoke the operation + DataReplicationPrivateEndpointConnectionData data = new DataReplicationPrivateEndpointConnectionData + { + Properties = new DataReplicationPrivateEndpointConnectionProperties + { + PrivateEndpointId = new ResourceIdentifier("cwcdqoynostmqwdwy"), + PrivateLinkServiceConnectionState = new DataReplicationPrivateLinkServiceConnectionState + { + Status = DataReplicationPrivateEndpointConnectionStatus.Approved, + Description = "y", + ActionsRequired = "afwbq", + }, + }, + }; + ArmOperation lro = await dataReplicationPrivateEndpointConnection.UpdateAsync(WaitUntil.Completed, data); + DataReplicationPrivateEndpointConnectionResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationPrivateEndpointConnectionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationPrivateLinkResource.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationPrivateLinkResource.cs new file mode 100644 index 000000000000..fb3c2f216692 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationPrivateLinkResource.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Samples +{ + public partial class Sample_DataReplicationPrivateLinkResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GetPrivateLinkResource() + { + // Generated from example definition: 2024-09-01/PrivateLinkResource_Get.json + // this example is just showing the usage of "PrivateLinkResource_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationPrivateLinkResource created on azure + // for more information of creating DataReplicationPrivateLinkResource, please refer to the document of DataReplicationPrivateLinkResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgswagger_2024-09-01"; + string vaultName = "4"; + string privateLinkResourceName = "d"; + ResourceIdentifier dataReplicationPrivateLinkResourceId = DataReplicationPrivateLinkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName, privateLinkResourceName); + DataReplicationPrivateLinkResource dataReplicationPrivateLinkResource = client.GetDataReplicationPrivateLinkResource(dataReplicationPrivateLinkResourceId); + + // invoke the operation + DataReplicationPrivateLinkResource result = await dataReplicationPrivateLinkResource.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationPrivateLinkResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationPrivateLinkResourceCollection.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationPrivateLinkResourceCollection.cs new file mode 100644 index 000000000000..ed489b30f9b9 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationPrivateLinkResourceCollection.cs @@ -0,0 +1,160 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Samples +{ + public partial class Sample_DataReplicationPrivateLinkResourceCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GetPrivateLinkResource() + { + // Generated from example definition: 2024-09-01/PrivateLinkResource_Get.json + // this example is just showing the usage of "PrivateLinkResource_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationVaultResource created on azure + // for more information of creating DataReplicationVaultResource, please refer to the document of DataReplicationVaultResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgswagger_2024-09-01"; + string vaultName = "4"; + ResourceIdentifier dataReplicationVaultResourceId = DataReplicationVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName); + DataReplicationVaultResource dataReplicationVault = client.GetDataReplicationVaultResource(dataReplicationVaultResourceId); + + // get the collection of this DataReplicationPrivateLinkResource + DataReplicationPrivateLinkResourceCollection collection = dataReplicationVault.GetDataReplicationPrivateLinkResources(); + + // invoke the operation + string privateLinkResourceName = "d"; + DataReplicationPrivateLinkResource result = await collection.GetAsync(privateLinkResourceName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationPrivateLinkResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_PrivateLinkResourceListGeneratedByMaximumSetRule() + { + // Generated from example definition: 2024-09-01/PrivateLinkResource_List.json + // this example is just showing the usage of "PrivateLinkResource_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationVaultResource created on azure + // for more information of creating DataReplicationVaultResource, please refer to the document of DataReplicationVaultResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgswagger_2024-09-01"; + string vaultName = "4"; + ResourceIdentifier dataReplicationVaultResourceId = DataReplicationVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName); + DataReplicationVaultResource dataReplicationVault = client.GetDataReplicationVaultResource(dataReplicationVaultResourceId); + + // get the collection of this DataReplicationPrivateLinkResource + DataReplicationPrivateLinkResourceCollection collection = dataReplicationVault.GetDataReplicationPrivateLinkResources(); + + // invoke the operation and iterate over the result + await foreach (DataReplicationPrivateLinkResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationPrivateLinkResourceData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_GetPrivateLinkResource() + { + // Generated from example definition: 2024-09-01/PrivateLinkResource_Get.json + // this example is just showing the usage of "PrivateLinkResource_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationVaultResource created on azure + // for more information of creating DataReplicationVaultResource, please refer to the document of DataReplicationVaultResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgswagger_2024-09-01"; + string vaultName = "4"; + ResourceIdentifier dataReplicationVaultResourceId = DataReplicationVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName); + DataReplicationVaultResource dataReplicationVault = client.GetDataReplicationVaultResource(dataReplicationVaultResourceId); + + // get the collection of this DataReplicationPrivateLinkResource + DataReplicationPrivateLinkResourceCollection collection = dataReplicationVault.GetDataReplicationPrivateLinkResources(); + + // invoke the operation + string privateLinkResourceName = "d"; + bool result = await collection.ExistsAsync(privateLinkResourceName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_GetPrivateLinkResource() + { + // Generated from example definition: 2024-09-01/PrivateLinkResource_Get.json + // this example is just showing the usage of "PrivateLinkResource_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationVaultResource created on azure + // for more information of creating DataReplicationVaultResource, please refer to the document of DataReplicationVaultResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgswagger_2024-09-01"; + string vaultName = "4"; + ResourceIdentifier dataReplicationVaultResourceId = DataReplicationVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName); + DataReplicationVaultResource dataReplicationVault = client.GetDataReplicationVaultResource(dataReplicationVaultResourceId); + + // get the collection of this DataReplicationPrivateLinkResource + DataReplicationPrivateLinkResourceCollection collection = dataReplicationVault.GetDataReplicationPrivateLinkResources(); + + // invoke the operation + string privateLinkResourceName = "d"; + NullableResponse response = await collection.GetIfExistsAsync(privateLinkResourceName); + DataReplicationPrivateLinkResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationPrivateLinkResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationProtectedItemCollection.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationProtectedItemCollection.cs new file mode 100644 index 000000000000..e57e7bc5ee7e --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationProtectedItemCollection.cs @@ -0,0 +1,200 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Samples +{ + public partial class Sample_DataReplicationProtectedItemCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_PutsTheProtectedItem() + { + // Generated from example definition: 2024-09-01/ProtectedItem_Create.json + // this example is just showing the usage of "ProtectedItemModel_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationVaultResource created on azure + // for more information of creating DataReplicationVaultResource, please refer to the document of DataReplicationVaultResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + ResourceIdentifier dataReplicationVaultResourceId = DataReplicationVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName); + DataReplicationVaultResource dataReplicationVault = client.GetDataReplicationVaultResource(dataReplicationVaultResourceId); + + // get the collection of this DataReplicationProtectedItemResource + DataReplicationProtectedItemCollection collection = dataReplicationVault.GetDataReplicationProtectedItems(); + + // invoke the operation + string protectedItemName = "d"; + DataReplicationProtectedItemData data = new DataReplicationProtectedItemData + { + Properties = new DataReplicationProtectedItemProperties("tjoeiynplt", "jwxdo", null), + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, protectedItemName, data); + DataReplicationProtectedItemResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationProtectedItemData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GetsTheProtectedItem() + { + // Generated from example definition: 2024-09-01/ProtectedItem_Get.json + // this example is just showing the usage of "ProtectedItemModel_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationVaultResource created on azure + // for more information of creating DataReplicationVaultResource, please refer to the document of DataReplicationVaultResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + ResourceIdentifier dataReplicationVaultResourceId = DataReplicationVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName); + DataReplicationVaultResource dataReplicationVault = client.GetDataReplicationVaultResource(dataReplicationVaultResourceId); + + // get the collection of this DataReplicationProtectedItemResource + DataReplicationProtectedItemCollection collection = dataReplicationVault.GetDataReplicationProtectedItems(); + + // invoke the operation + string protectedItemName = "d"; + DataReplicationProtectedItemResource result = await collection.GetAsync(protectedItemName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationProtectedItemData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_ListsTheProtectedItems() + { + // Generated from example definition: 2024-09-01/ProtectedItem_List.json + // this example is just showing the usage of "ProtectedItemModel_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationVaultResource created on azure + // for more information of creating DataReplicationVaultResource, please refer to the document of DataReplicationVaultResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + ResourceIdentifier dataReplicationVaultResourceId = DataReplicationVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName); + DataReplicationVaultResource dataReplicationVault = client.GetDataReplicationVaultResource(dataReplicationVaultResourceId); + + // get the collection of this DataReplicationProtectedItemResource + DataReplicationProtectedItemCollection collection = dataReplicationVault.GetDataReplicationProtectedItems(); + + // invoke the operation and iterate over the result + await foreach (DataReplicationProtectedItemResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationProtectedItemData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_GetsTheProtectedItem() + { + // Generated from example definition: 2024-09-01/ProtectedItem_Get.json + // this example is just showing the usage of "ProtectedItemModel_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationVaultResource created on azure + // for more information of creating DataReplicationVaultResource, please refer to the document of DataReplicationVaultResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + ResourceIdentifier dataReplicationVaultResourceId = DataReplicationVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName); + DataReplicationVaultResource dataReplicationVault = client.GetDataReplicationVaultResource(dataReplicationVaultResourceId); + + // get the collection of this DataReplicationProtectedItemResource + DataReplicationProtectedItemCollection collection = dataReplicationVault.GetDataReplicationProtectedItems(); + + // invoke the operation + string protectedItemName = "d"; + bool result = await collection.ExistsAsync(protectedItemName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_GetsTheProtectedItem() + { + // Generated from example definition: 2024-09-01/ProtectedItem_Get.json + // this example is just showing the usage of "ProtectedItemModel_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationVaultResource created on azure + // for more information of creating DataReplicationVaultResource, please refer to the document of DataReplicationVaultResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + ResourceIdentifier dataReplicationVaultResourceId = DataReplicationVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName); + DataReplicationVaultResource dataReplicationVault = client.GetDataReplicationVaultResource(dataReplicationVaultResourceId); + + // get the collection of this DataReplicationProtectedItemResource + DataReplicationProtectedItemCollection collection = dataReplicationVault.GetDataReplicationProtectedItems(); + + // invoke the operation + string protectedItemName = "d"; + NullableResponse response = await collection.GetIfExistsAsync(protectedItemName); + DataReplicationProtectedItemResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationProtectedItemData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationProtectedItemResource.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationProtectedItemResource.cs new file mode 100644 index 000000000000..0ea8a0e7859c --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationProtectedItemResource.cs @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Samples +{ + public partial class Sample_DataReplicationProtectedItemResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GetsTheProtectedItem() + { + // Generated from example definition: 2024-09-01/ProtectedItem_Get.json + // this example is just showing the usage of "ProtectedItemModel_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationProtectedItemResource created on azure + // for more information of creating DataReplicationProtectedItemResource, please refer to the document of DataReplicationProtectedItemResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + string protectedItemName = "d"; + ResourceIdentifier dataReplicationProtectedItemResourceId = DataReplicationProtectedItemResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName, protectedItemName); + DataReplicationProtectedItemResource dataReplicationProtectedItem = client.GetDataReplicationProtectedItemResource(dataReplicationProtectedItemResourceId); + + // invoke the operation + DataReplicationProtectedItemResource result = await dataReplicationProtectedItem.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationProtectedItemData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_DeletesTheProtectedItem() + { + // Generated from example definition: 2024-09-01/ProtectedItem_Delete.json + // this example is just showing the usage of "ProtectedItemModel_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationProtectedItemResource created on azure + // for more information of creating DataReplicationProtectedItemResource, please refer to the document of DataReplicationProtectedItemResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + string protectedItemName = "d"; + ResourceIdentifier dataReplicationProtectedItemResourceId = DataReplicationProtectedItemResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName, protectedItemName); + DataReplicationProtectedItemResource dataReplicationProtectedItem = client.GetDataReplicationProtectedItemResource(dataReplicationProtectedItemResourceId); + + // invoke the operation + bool? forceDelete = true; + await dataReplicationProtectedItem.DeleteAsync(WaitUntil.Completed, forceDelete: forceDelete); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_UpdateProtectedItem() + { + // Generated from example definition: 2024-09-01/ProtectedItem_Update.json + // this example is just showing the usage of "ProtectedItemModel_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationProtectedItemResource created on azure + // for more information of creating DataReplicationProtectedItemResource, please refer to the document of DataReplicationProtectedItemResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgswagger_2024-09-01"; + string vaultName = "4"; + string protectedItemName = "d"; + ResourceIdentifier dataReplicationProtectedItemResourceId = DataReplicationProtectedItemResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName, protectedItemName); + DataReplicationProtectedItemResource dataReplicationProtectedItem = client.GetDataReplicationProtectedItemResource(dataReplicationProtectedItemResourceId); + + // invoke the operation + DataReplicationProtectedItemPatch patch = new DataReplicationProtectedItemPatch(); + ArmOperation lro = await dataReplicationProtectedItem.UpdateAsync(WaitUntil.Completed, patch); + DataReplicationProtectedItemResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationProtectedItemData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task PlannedFailover_PerformsPlannedFailover() + { + // Generated from example definition: 2024-09-01/ProtectedItem_PlannedFailover.json + // this example is just showing the usage of "ProtectedItem_PlannedFailover" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationProtectedItemResource created on azure + // for more information of creating DataReplicationProtectedItemResource, please refer to the document of DataReplicationProtectedItemResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + string protectedItemName = "d"; + ResourceIdentifier dataReplicationProtectedItemResourceId = DataReplicationProtectedItemResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName, protectedItemName); + DataReplicationProtectedItemResource dataReplicationProtectedItem = client.GetDataReplicationProtectedItemResource(dataReplicationProtectedItemResourceId); + + // invoke the operation + PlannedFailover body = new PlannedFailover(new PlannedFailoverProperties(null)); + ArmOperation lro = await dataReplicationProtectedItem.PlannedFailoverAsync(WaitUntil.Completed, body); + PlannedFailover result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationRecoveryPointCollection.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationRecoveryPointCollection.cs new file mode 100644 index 000000000000..a39049a8d26a --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationRecoveryPointCollection.cs @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Samples +{ + public partial class Sample_DataReplicationRecoveryPointCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GetsTheRecoveryPoint() + { + // Generated from example definition: 2024-09-01/RecoveryPoints_Get.json + // this example is just showing the usage of "RecoveryPointModel_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationProtectedItemResource created on azure + // for more information of creating DataReplicationProtectedItemResource, please refer to the document of DataReplicationProtectedItemResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + string protectedItemName = "d"; + ResourceIdentifier dataReplicationProtectedItemResourceId = DataReplicationProtectedItemResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName, protectedItemName); + DataReplicationProtectedItemResource dataReplicationProtectedItem = client.GetDataReplicationProtectedItemResource(dataReplicationProtectedItemResourceId); + + // get the collection of this DataReplicationRecoveryPointResource + DataReplicationRecoveryPointCollection collection = dataReplicationProtectedItem.GetDataReplicationRecoveryPoints(); + + // invoke the operation + string recoveryPointName = "1X"; + DataReplicationRecoveryPointResource result = await collection.GetAsync(recoveryPointName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationRecoveryPointData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_ListsTheRecoveryPoints() + { + // Generated from example definition: 2024-09-01/RecoveryPoints_List.json + // this example is just showing the usage of "RecoveryPointModel_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationProtectedItemResource created on azure + // for more information of creating DataReplicationProtectedItemResource, please refer to the document of DataReplicationProtectedItemResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + string protectedItemName = "d"; + ResourceIdentifier dataReplicationProtectedItemResourceId = DataReplicationProtectedItemResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName, protectedItemName); + DataReplicationProtectedItemResource dataReplicationProtectedItem = client.GetDataReplicationProtectedItemResource(dataReplicationProtectedItemResourceId); + + // get the collection of this DataReplicationRecoveryPointResource + DataReplicationRecoveryPointCollection collection = dataReplicationProtectedItem.GetDataReplicationRecoveryPoints(); + + // invoke the operation and iterate over the result + await foreach (DataReplicationRecoveryPointResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationRecoveryPointData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_GetsTheRecoveryPoint() + { + // Generated from example definition: 2024-09-01/RecoveryPoints_Get.json + // this example is just showing the usage of "RecoveryPointModel_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationProtectedItemResource created on azure + // for more information of creating DataReplicationProtectedItemResource, please refer to the document of DataReplicationProtectedItemResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + string protectedItemName = "d"; + ResourceIdentifier dataReplicationProtectedItemResourceId = DataReplicationProtectedItemResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName, protectedItemName); + DataReplicationProtectedItemResource dataReplicationProtectedItem = client.GetDataReplicationProtectedItemResource(dataReplicationProtectedItemResourceId); + + // get the collection of this DataReplicationRecoveryPointResource + DataReplicationRecoveryPointCollection collection = dataReplicationProtectedItem.GetDataReplicationRecoveryPoints(); + + // invoke the operation + string recoveryPointName = "1X"; + bool result = await collection.ExistsAsync(recoveryPointName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_GetsTheRecoveryPoint() + { + // Generated from example definition: 2024-09-01/RecoveryPoints_Get.json + // this example is just showing the usage of "RecoveryPointModel_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationProtectedItemResource created on azure + // for more information of creating DataReplicationProtectedItemResource, please refer to the document of DataReplicationProtectedItemResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + string protectedItemName = "d"; + ResourceIdentifier dataReplicationProtectedItemResourceId = DataReplicationProtectedItemResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName, protectedItemName); + DataReplicationProtectedItemResource dataReplicationProtectedItem = client.GetDataReplicationProtectedItemResource(dataReplicationProtectedItemResourceId); + + // get the collection of this DataReplicationRecoveryPointResource + DataReplicationRecoveryPointCollection collection = dataReplicationProtectedItem.GetDataReplicationRecoveryPoints(); + + // invoke the operation + string recoveryPointName = "1X"; + NullableResponse response = await collection.GetIfExistsAsync(recoveryPointName); + DataReplicationRecoveryPointResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationRecoveryPointData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationRecoveryPointResource.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationRecoveryPointResource.cs new file mode 100644 index 000000000000..f598d5f26dc4 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationRecoveryPointResource.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Samples +{ + public partial class Sample_DataReplicationRecoveryPointResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GetsTheRecoveryPoint() + { + // Generated from example definition: 2024-09-01/RecoveryPoints_Get.json + // this example is just showing the usage of "RecoveryPointModel_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationRecoveryPointResource created on azure + // for more information of creating DataReplicationRecoveryPointResource, please refer to the document of DataReplicationRecoveryPointResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + string protectedItemName = "d"; + string recoveryPointName = "1X"; + ResourceIdentifier dataReplicationRecoveryPointResourceId = DataReplicationRecoveryPointResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName, protectedItemName, recoveryPointName); + DataReplicationRecoveryPointResource dataReplicationRecoveryPoint = client.GetDataReplicationRecoveryPointResource(dataReplicationRecoveryPointResourceId); + + // invoke the operation + DataReplicationRecoveryPointResource result = await dataReplicationRecoveryPoint.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationRecoveryPointData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationVaultCollection.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationVaultCollection.cs new file mode 100644 index 000000000000..d23d7f613704 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationVaultCollection.cs @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; +using Azure.ResourceManager.Resources; +using NUnit.Framework; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Samples +{ + public partial class Sample_DataReplicationVaultCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_PutsTheVault() + { + // Generated from example definition: 2024-09-01/Vault_Create.json + // this example is just showing the usage of "VaultModel_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this DataReplicationVaultResource + DataReplicationVaultCollection collection = resourceGroupResource.GetDataReplicationVaults(); + + // invoke the operation + string vaultName = "4"; + DataReplicationVaultData data = new DataReplicationVaultData(new AzureLocation("eck")) + { + Properties = new DataReplicationVaultProperties + { + VaultType = DataReplicationVaultType.DisasterRecovery, + }, + Tags = +{ +["key5359"] = "ljfilxolxzuxrauopwtyxghrp" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, vaultName, data); + DataReplicationVaultResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationVaultData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GetsTheVault() + { + // Generated from example definition: 2024-09-01/Vault_Get.json + // this example is just showing the usage of "VaultModel_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this DataReplicationVaultResource + DataReplicationVaultCollection collection = resourceGroupResource.GetDataReplicationVaults(); + + // invoke the operation + string vaultName = "4"; + DataReplicationVaultResource result = await collection.GetAsync(vaultName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationVaultData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_ListsTheVaults() + { + // Generated from example definition: 2024-09-01/Vault_List.json + // this example is just showing the usage of "VaultModel_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this DataReplicationVaultResource + DataReplicationVaultCollection collection = resourceGroupResource.GetDataReplicationVaults(); + + // invoke the operation and iterate over the result + string continuationToken = "mwculdaqndp"; + await foreach (DataReplicationVaultResource item in collection.GetAllAsync(continuationToken: continuationToken)) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationVaultData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_GetsTheVault() + { + // Generated from example definition: 2024-09-01/Vault_Get.json + // this example is just showing the usage of "VaultModel_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this DataReplicationVaultResource + DataReplicationVaultCollection collection = resourceGroupResource.GetDataReplicationVaults(); + + // invoke the operation + string vaultName = "4"; + bool result = await collection.ExistsAsync(vaultName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_GetsTheVault() + { + // Generated from example definition: 2024-09-01/Vault_Get.json + // this example is just showing the usage of "VaultModel_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this DataReplicationVaultResource + DataReplicationVaultCollection collection = resourceGroupResource.GetDataReplicationVaults(); + + // invoke the operation + string vaultName = "4"; + NullableResponse response = await collection.GetIfExistsAsync(vaultName); + DataReplicationVaultResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationVaultData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationVaultResource.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationVaultResource.cs new file mode 100644 index 000000000000..03fe545f4ea8 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_DataReplicationVaultResource.cs @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Samples +{ + public partial class Sample_DataReplicationVaultResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GetsTheVault() + { + // Generated from example definition: 2024-09-01/Vault_Get.json + // this example is just showing the usage of "VaultModel_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationVaultResource created on azure + // for more information of creating DataReplicationVaultResource, please refer to the document of DataReplicationVaultResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + ResourceIdentifier dataReplicationVaultResourceId = DataReplicationVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName); + DataReplicationVaultResource dataReplicationVault = client.GetDataReplicationVaultResource(dataReplicationVaultResourceId); + + // invoke the operation + DataReplicationVaultResource result = await dataReplicationVault.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationVaultData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_DeletesTheVault() + { + // Generated from example definition: 2024-09-01/Vault_Delete.json + // this example is just showing the usage of "VaultModel_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationVaultResource created on azure + // for more information of creating DataReplicationVaultResource, please refer to the document of DataReplicationVaultResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + ResourceIdentifier dataReplicationVaultResourceId = DataReplicationVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName); + DataReplicationVaultResource dataReplicationVault = client.GetDataReplicationVaultResource(dataReplicationVaultResourceId); + + // invoke the operation + await dataReplicationVault.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_UpdatesTheVault() + { + // Generated from example definition: 2024-09-01/Vault_Update.json + // this example is just showing the usage of "VaultModel_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataReplicationVaultResource created on azure + // for more information of creating DataReplicationVaultResource, please refer to the document of DataReplicationVaultResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgrecoveryservicesdatareplication"; + string vaultName = "4"; + ResourceIdentifier dataReplicationVaultResourceId = DataReplicationVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName); + DataReplicationVaultResource dataReplicationVault = client.GetDataReplicationVaultResource(dataReplicationVaultResourceId); + + // invoke the operation + DataReplicationVaultPatch patch = new DataReplicationVaultPatch + { + Tags = +{ +["key8872"] = "pvtc" +}, + Properties = new DataReplicationVaultProperties + { + VaultType = DataReplicationVaultType.DisasterRecovery, + }, + }; + ArmOperation lro = await dataReplicationVault.UpdateAsync(WaitUntil.Completed, patch); + DataReplicationVaultResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationVaultData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs new file mode 100644 index 000000000000..62c2faffdd2e --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; +using Azure.ResourceManager.Resources; +using NUnit.Framework; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Samples +{ + public partial class Sample_ResourceGroupResourceExtensions + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task PostDeploymentPreflight_PerformsResourceDeploymentValidation() + { + // Generated from example definition: 2024-09-01/DeploymentPreflight_Post.json + // this example is just showing the usage of "DeploymentPreflight_Post" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + string resourceGroupName = "rgswagger_2024-09-01"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // invoke the operation + string deploymentId = "lnfcwsmlowbwkndkztzvaj"; + DeploymentPreflight body = new DeploymentPreflight + { + Resources = {new DeploymentPreflightResourceInfo +{ +Name = "xtgugoflfc", +Type = new ResourceType("nsnaptduolqcxsikrewvgjbxqpt"), +Location = new AzureLocation("cbsgtxkjdzwbyp"), +ApiVersion = "otihymhvzblycdoxo", +}}, + }; + DeploymentPreflight result = await resourceGroupResource.PostDeploymentPreflightAsync(deploymentId, body: body); + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs new file mode 100644 index 000000000000..1e5f0264ceeb --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; +using Azure.ResourceManager.Resources; +using NUnit.Framework; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Samples +{ + public partial class Sample_SubscriptionResourceExtensions + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetDataReplicationVaults_ListsTheVaultsBySubscription() + { + // Generated from example definition: 2024-09-01/Vault_ListBySubscription.json + // this example is just showing the usage of "VaultModel_ListBySubscription" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + await foreach (DataReplicationVaultResource item in subscriptionResource.GetDataReplicationVaultsAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationVaultData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetDataReplicationFabrics_ListsTheFabricsBySubscription() + { + // Generated from example definition: 2024-09-01/Fabric_ListBySubscription.json + // this example is just showing the usage of "FabricModel_ListBySubscription" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + await foreach (DataReplicationFabricResource item in subscriptionResource.GetDataReplicationFabricsAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataReplicationFabricData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task PostCheckNameAvailability_PerformsTheResourceNameAvailabilityCheck() + { + // Generated from example definition: 2024-09-01/CheckNameAvailability_Post.json + // this example is just showing the usage of "CheckNameAvailability_Post" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "930CEC23-4430-4513-B855-DBA237E2F3BF"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation + AzureLocation location = new AzureLocation("trfqtbtmusswpibw"); + DataReplicationNameAvailabilityContent content = new DataReplicationNameAvailabilityContent + { + Name = "updkdcixs", + Type = new ResourceType("gngmcancdauwhdixjjvqnfkvqc"), + }; + DataReplicationNameAvailabilityResult result = await subscriptionResource.PostCheckNameAvailabilityAsync(location, content: content); + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Azure.ResourceManager.RecoveryServicesDataReplication.csproj b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Azure.ResourceManager.RecoveryServicesDataReplication.csproj new file mode 100644 index 000000000000..ded5f53eb128 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Azure.ResourceManager.RecoveryServicesDataReplication.csproj @@ -0,0 +1,8 @@ + + + Azure Resource Manager client SDK for Azure resource provider RecoveryServicesDataReplication. + 1.0.0-beta.1 + azure;management;arm;resource manager;recoveryservicesdatareplication + Azure.ResourceManager.RecoveryServicesDataReplication + + diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ArmRecoveryServicesDataReplicationModelFactory.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ArmRecoveryServicesDataReplicationModelFactory.cs new file mode 100644 index 000000000000..e07788d3eb10 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ArmRecoveryServicesDataReplicationModelFactory.cs @@ -0,0 +1,1413 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Model factory for models. + public static partial class ArmRecoveryServicesDataReplicationModelFactory + { + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static DataReplicationEmailConfigurationData DataReplicationEmailConfigurationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DataReplicationEmailConfigurationProperties properties = null) + { + return new DataReplicationEmailConfigurationData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Gets or sets a value indicating whether to send email to subscription administrator. + /// Gets or sets the custom email address for sending emails. + /// Gets or sets the locale for the email notification. + /// Gets or sets the provisioning state of the email configuration. + /// A new instance for mocking. + public static DataReplicationEmailConfigurationProperties DataReplicationEmailConfigurationProperties(bool sendToOwners = default, IEnumerable customEmailAddresses = null, string locale = null, DataReplicationProvisioningState? provisioningState = null) + { + customEmailAddresses ??= new List(); + + return new DataReplicationEmailConfigurationProperties(sendToOwners, customEmailAddresses?.ToList(), locale, provisioningState, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The resource-specific properties for this resource. + /// The managed service identities assigned to this resource. + /// A new instance for mocking. + public static DataReplicationVaultData DataReplicationVaultData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, DataReplicationVaultProperties properties = null, ManagedServiceIdentity identity = null) + { + tags ??= new Dictionary(); + + return new DataReplicationVaultData( + id, + name, + resourceType, + systemData, + tags, + location, + properties, + identity, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Gets or sets the provisioning state of the vault. + /// Gets or sets the service resource Id. + /// Gets or sets the type of vault. + /// A new instance for mocking. + public static DataReplicationVaultProperties DataReplicationVaultProperties(DataReplicationProvisioningState? provisioningState = null, ResourceIdentifier serviceResourceId = null, DataReplicationVaultType? vaultType = null) + { + return new DataReplicationVaultProperties(provisioningState, serviceResourceId, vaultType, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Gets or sets the resource tags. + /// Vault properties. + /// Vault identity. Current supported identity types: None, SystemAssigned, UserAssigned. + /// A new instance for mocking. + public static DataReplicationVaultPatch DataReplicationVaultPatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, DataReplicationVaultProperties properties = null, ManagedServiceIdentity identity = null) + { + tags ??= new Dictionary(); + + return new DataReplicationVaultPatch( + id, + name, + resourceType, + systemData, + tags, + properties, + identity, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static DataReplicationEventData DataReplicationEventData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DataReplicationEventProperties properties = null) + { + return new DataReplicationEventData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Gets or sets the resource type. + /// Gets or sets the resource name. + /// Gets or sets the event type. + /// Gets or sets the event name. + /// Gets or sets the time at which the event occurred at source. + /// Gets or sets the event severity. + /// Gets or sets the event description. + /// Gets or sets the event correlation Id. + /// Gets or sets the errors associated with this event. + /// + /// Event model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// Gets or sets the provisioning state of the event. + /// A new instance for mocking. + public static DataReplicationEventProperties DataReplicationEventProperties(ResourceType? resourceType = null, string resourceName = null, string eventType = null, string eventName = null, DateTimeOffset? occurredOn = null, string severity = null, string description = null, string correlationId = null, IEnumerable healthErrors = null, DataReplicationEventCustomProperties customProperties = null, DataReplicationProvisioningState? provisioningState = null) + { + healthErrors ??= new List(); + + return new DataReplicationEventProperties( + resourceType, + resourceName, + eventType, + eventName, + occurredOn, + severity, + description, + correlationId, + healthErrors?.ToList(), + customProperties, + provisioningState, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Gets or sets the type of affected resource type. + /// Gets or sets the list of affected resource correlation Ids. This can be used to uniquely identify the count of items affected by a specific category and severity as well as count of item affected by an specific issue. + /// Gets or sets a list of child health errors associated with this error. + /// Gets or sets the error code. + /// Gets or sets the health category. + /// Gets or sets the error category. + /// Gets or sets the error severity. + /// Gets or sets the error source. + /// Gets or sets the error creation time. + /// Gets or sets a value indicating whether the error is customer resolvable. + /// Gets or sets the error summary. + /// Gets or sets the error message. + /// Gets or sets possible causes of the error. + /// Gets or sets recommended action to resolve the error. + /// A new instance for mocking. + public static DataReplicationHealthErrorInfo DataReplicationHealthErrorInfo(ResourceType? affectedResourceType = null, IEnumerable affectedResourceCorrelationIds = null, IEnumerable childErrors = null, string code = null, string healthCategory = null, string category = null, string severity = null, string source = null, DateTimeOffset? createdOn = null, bool? isCustomerResolvable = null, string summary = null, string message = null, string causes = null, string recommendation = null) + { + affectedResourceCorrelationIds ??= new List(); + childErrors ??= new List(); + + return new DataReplicationHealthErrorInfo( + affectedResourceType, + affectedResourceCorrelationIds?.ToList(), + childErrors?.ToList(), + code, + healthCategory, + category, + severity, + source, + createdOn, + isCustomerResolvable, + summary, + message, + causes, + recommendation, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Gets or sets the error code. + /// Gets or sets the health category. + /// Gets or sets the error category. + /// Gets or sets the error severity. + /// Gets or sets the error source. + /// Gets or sets the error creation time. + /// Gets or sets a value indicating whether the error is customer resolvable. + /// Gets or sets the error summary. + /// Gets or sets the error message. + /// Gets or sets possible causes of the error. + /// Gets or sets recommended action to resolve the error. + /// A new instance for mocking. + public static DataReplicationInnerHealthErrorInfo DataReplicationInnerHealthErrorInfo(string code = null, string healthCategory = null, string category = null, string severity = null, string source = null, DateTimeOffset? createdOn = null, bool? isCustomerResolvable = null, string summary = null, string message = null, string causes = null, string recommendation = null) + { + return new DataReplicationInnerHealthErrorInfo( + code, + healthCategory, + category, + severity, + source, + createdOn, + isCustomerResolvable, + summary, + message, + causes, + recommendation, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Gets or sets the friendly name of the source which has raised this health event. + /// Gets or sets the protected item friendly name. + /// Gets or sets the source appliance name. + /// Gets or sets the source target name. + /// Gets or sets the server type. + /// A new instance for mocking. + public static HyperVToAzStackHciEventCustomProperties HyperVToAzStackHciEventCustomProperties(string eventSourceFriendlyName = null, string protectedItemFriendlyName = null, string sourceApplianceName = null, string targetApplianceName = null, string serverType = null) + { + return new HyperVToAzStackHciEventCustomProperties( + "HyperVToAzStackHCI", + serializedAdditionalRawData: null, + eventSourceFriendlyName, + protectedItemFriendlyName, + sourceApplianceName, + targetApplianceName, + serverType); + } + + /// Initializes a new instance of . + /// Gets or sets the friendly name of the source which has raised this health event. + /// Gets or sets the protected item friendly name. + /// Gets or sets the source appliance name. + /// Gets or sets the source target name. + /// Gets or sets the server type. + /// A new instance for mocking. + public static VMwareToAzStackHciEventCustomProperties VMwareToAzStackHciEventCustomProperties(string eventSourceFriendlyName = null, string protectedItemFriendlyName = null, string sourceApplianceName = null, string targetApplianceName = null, string serverType = null) + { + return new VMwareToAzStackHciEventCustomProperties( + "VMwareToAzStackHCI", + serializedAdditionalRawData: null, + eventSourceFriendlyName, + protectedItemFriendlyName, + sourceApplianceName, + targetApplianceName, + serverType); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static DataReplicationFabricData DataReplicationFabricData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, DataReplicationFabricProperties properties = null) + { + tags ??= new Dictionary(); + + return new DataReplicationFabricData( + id, + name, + resourceType, + systemData, + tags, + location, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Gets or sets the provisioning state of the fabric. + /// Gets or sets the service endpoint. + /// Gets or sets the service resource Id. + /// Gets or sets the fabric health. + /// Gets or sets the list of health errors. + /// + /// Fabric model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// A new instance for mocking. + public static DataReplicationFabricProperties DataReplicationFabricProperties(DataReplicationProvisioningState? provisioningState = null, string serviceEndpoint = null, ResourceIdentifier serviceResourceId = null, DataReplicationHealthStatus? health = null, IEnumerable healthErrors = null, DataReplicationFabricCustomProperties customProperties = null) + { + healthErrors ??= new List(); + + return new DataReplicationFabricProperties( + provisioningState, + serviceEndpoint, + serviceResourceId, + health, + healthErrors?.ToList(), + customProperties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Gets or sets the ARM Id of the AzStackHCI site. + /// Gets or sets the Appliance name. + /// AzStackHCI cluster properties. + /// Gets or sets the fabric resource Id. + /// Gets or sets the fabric container Id. + /// Gets or sets the Migration solution ARM Id. + /// Gets or sets the migration hub Uri. + /// A new instance for mocking. + public static AzStackHciFabricCustomProperties AzStackHciFabricCustomProperties(ResourceIdentifier azStackHciSiteId = null, IEnumerable applianceName = null, AzStackHciClusterProperties cluster = null, ResourceIdentifier fabricResourceId = null, ResourceIdentifier fabricContainerId = null, ResourceIdentifier migrationSolutionId = null, Uri migrationHubUri = null) + { + applianceName ??= new List(); + + return new AzStackHciFabricCustomProperties( + "AzStackHCI", + serializedAdditionalRawData: null, + azStackHciSiteId, + applianceName?.ToList(), + cluster, + fabricResourceId, + fabricContainerId, + migrationSolutionId, + migrationHubUri); + } + + /// Initializes a new instance of . + /// Gets or sets the ARM Id of the HyperV site. + /// Gets or sets the fabric resource Id. + /// Gets or sets the fabric container Id. + /// Gets or sets the migration solution ARM Id. + /// Gets or sets the migration hub Uri. + /// A new instance for mocking. + public static HyperVMigrateFabricCustomProperties HyperVMigrateFabricCustomProperties(ResourceIdentifier hyperVSiteId = null, ResourceIdentifier fabricResourceId = null, ResourceIdentifier fabricContainerId = null, ResourceIdentifier migrationSolutionId = null, Uri migrationHubUri = null) + { + return new HyperVMigrateFabricCustomProperties( + "HyperVMigrate", + serializedAdditionalRawData: null, + hyperVSiteId, + fabricResourceId, + fabricContainerId, + migrationSolutionId, + migrationHubUri); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Gets or sets the resource tags. + /// Fabric model properties. + /// A new instance for mocking. + public static DataReplicationFabricPatch DataReplicationFabricPatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, DataReplicationFabricProperties properties = null) + { + tags ??= new Dictionary(); + + return new DataReplicationFabricPatch( + id, + name, + resourceType, + systemData, + tags, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static DataReplicationFabricAgentData DataReplicationFabricAgentData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DataReplicationFabricAgentProperties properties = null) + { + return new DataReplicationFabricAgentData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Gets or sets the fabric agent correlation Id. + /// Gets or sets the machine Id where fabric agent is running. + /// Gets or sets the machine name where fabric agent is running. + /// Identity model. + /// Identity model. + /// Gets or sets a value indicating whether the fabric agent is responsive. + /// Gets or sets the time when last heartbeat was sent by the fabric agent. + /// Gets or sets the fabric agent version. + /// Gets or sets the provisioning state of the fabric agent. + /// Gets or sets the list of health errors. + /// + /// Fabric agent model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + /// A new instance for mocking. + public static DataReplicationFabricAgentProperties DataReplicationFabricAgentProperties(string correlationId = null, string machineId = null, string machineName = null, DataReplicationIdentity authenticationIdentity = null, DataReplicationIdentity resourceAccessIdentity = null, bool? isResponsive = null, DateTimeOffset? lastHeartbeatOn = null, string versionNumber = null, DataReplicationProvisioningState? provisioningState = null, IEnumerable healthErrors = null, DataReplicationFabricAgentCustomProperties customProperties = null) + { + healthErrors ??= new List(); + + return new DataReplicationFabricAgentProperties( + correlationId, + machineId, + machineName, + authenticationIdentity, + resourceAccessIdentity, + isResponsive, + lastHeartbeatOn, + versionNumber, + provisioningState, + healthErrors?.ToList(), + customProperties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static DataReplicationJobData DataReplicationJobData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DataReplicationJobProperties properties = null) + { + return new DataReplicationJobData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Gets or sets the friendly display name. + /// Gets or sets the job state. + /// Gets or sets the start time. + /// Gets or sets the end time. + /// Gets or sets the affected object Id. + /// Gets or sets the affected object name. + /// Gets or sets the affected object internal Id. + /// Gets or sets the affected object internal name. + /// Gets or sets the object type. + /// Gets or sets the replication provider. + /// Gets or sets the source fabric provider. + /// Gets or sets the target fabric provider. + /// Gets or sets the list of allowed actions on the job. + /// Gets or sets the job activity id. + /// Gets or sets the list of tasks. + /// Gets or sets the list of errors. + /// + /// Job model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// Gets or sets the provisioning state of the job. + /// A new instance for mocking. + public static DataReplicationJobProperties DataReplicationJobProperties(string displayName = null, DataReplicationJobState? state = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, string objectId = null, string objectName = null, string objectInternalId = null, string objectInternalName = null, DataReplicationJobObjectType? objectType = null, string replicationProviderId = null, string sourceFabricProviderId = null, string targetFabricProviderId = null, IEnumerable allowedActions = null, string activityId = null, IEnumerable tasks = null, IEnumerable errors = null, DataReplicationJobCustomProperties customProperties = null, DataReplicationProvisioningState? provisioningState = null) + { + allowedActions ??= new List(); + tasks ??= new List(); + errors ??= new List(); + + return new DataReplicationJobProperties( + displayName, + state, + startOn, + endOn, + objectId, + objectName, + objectInternalId, + objectInternalName, + objectType, + replicationProviderId, + sourceFabricProviderId, + targetFabricProviderId, + allowedActions?.ToList(), + activityId, + tasks?.ToList(), + errors?.ToList(), + customProperties, + provisioningState, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Gets or sets the task name. + /// Gets or sets the task state. + /// Gets or sets the start time. + /// Gets or sets the end time. + /// Task model custom properties. + /// Gets or sets the list of children job models. + /// A new instance for mocking. + public static DataReplicationTask DataReplicationTask(string taskName = null, DataReplicationTaskState? state = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, string customInstanceType = null, IEnumerable childrenJobs = null) + { + childrenJobs ??= new List(); + + return new DataReplicationTask( + taskName, + state, + startOn, + endOn, + customInstanceType != null ? new DataReplicationTaskCustomProperties(customInstanceType, serializedAdditionalRawData: null) : null, + childrenJobs?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Gets or sets the error code. + /// Gets or sets the error type. + /// Gets or sets the error severity. + /// Gets or sets the creation time of error. + /// Gets or sets the error message. + /// Gets or sets the possible causes of error. + /// Gets or sets the recommended action to resolve error. + /// A new instance for mocking. + public static DataReplicationErrorInfo DataReplicationErrorInfo(string code = null, string type = null, string severity = null, DateTimeOffset? createdOn = null, string message = null, string causes = null, string recommendation = null) + { + return new DataReplicationErrorInfo( + code, + type, + severity, + createdOn, + message, + causes, + recommendation, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Discriminator property for DataReplicationJobCustomProperties. + /// Gets or sets any custom properties of the affected object. + /// A new instance for mocking. + public static DataReplicationJobCustomProperties DataReplicationJobCustomProperties(string instanceType = null, JobModelCustomPropertiesAffectedObjectDetails affectedObjectDetails = null) + { + return new UnknownDataReplicationJobCustomProperties(instanceType, affectedObjectDetails, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// + /// + /// A new instance for mocking. + public static JobModelCustomPropertiesAffectedObjectDetails JobModelCustomPropertiesAffectedObjectDetails(string description = null, JobModelCustomPropertiesAffectedObjectDetailsType? type = null) + { + return new JobModelCustomPropertiesAffectedObjectDetails(description, type, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Gets or sets any custom properties of the affected object. + /// Gets or sets the failed over protected item details. + /// A new instance for mocking. + public static FailoverJobCustomProperties FailoverJobCustomProperties(JobModelCustomPropertiesAffectedObjectDetails affectedObjectDetails = null, IEnumerable protectedItemDetails = null) + { + protectedItemDetails ??= new List(); + + return new FailoverJobCustomProperties("FailoverJobDetails", affectedObjectDetails, serializedAdditionalRawData: null, protectedItemDetails?.ToList()); + } + + /// Initializes a new instance of . + /// Gets or sets the protected item name. + /// Gets or sets the VM name. + /// Gets or sets the test VM name. + /// Gets or sets the recovery point Id. + /// Gets or sets the recovery point time. + /// Gets or sets the network name. + /// Gets or sets the network subnet. + /// A new instance for mocking. + public static FailoverProtectedItemProperties FailoverProtectedItemProperties(string protectedItemName = null, string vmName = null, string testVmName = null, string recoveryPointId = null, DateTimeOffset? recoveryPointOn = null, string networkName = null, string subnet = null) + { + return new FailoverProtectedItemProperties( + protectedItemName, + vmName, + testVmName, + recoveryPointId, + recoveryPointOn, + networkName, + subnet, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Gets or sets any custom properties of the affected object. + /// Gets or sets the test failover cleanup comments. + /// A new instance for mocking. + public static TestFailoverCleanupJobCustomProperties TestFailoverCleanupJobCustomProperties(JobModelCustomPropertiesAffectedObjectDetails affectedObjectDetails = null, string comments = null) + { + return new TestFailoverCleanupJobCustomProperties("TestFailoverCleanupJobDetails", affectedObjectDetails, serializedAdditionalRawData: null, comments); + } + + /// Initializes a new instance of . + /// Gets or sets any custom properties of the affected object. + /// Gets or sets the test VM details. + /// A new instance for mocking. + public static TestFailoverJobCustomProperties TestFailoverJobCustomProperties(JobModelCustomPropertiesAffectedObjectDetails affectedObjectDetails = null, IEnumerable protectedItemDetails = null) + { + protectedItemDetails ??= new List(); + + return new TestFailoverJobCustomProperties("TestFailoverJobDetails", affectedObjectDetails, serializedAdditionalRawData: null, protectedItemDetails?.ToList()); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static DataReplicationPolicyData DataReplicationPolicyData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DataReplicationPolicyProperties properties = null) + { + return new DataReplicationPolicyData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Gets or sets the provisioning state of the policy. + /// + /// Policy model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// A new instance for mocking. + public static DataReplicationPolicyProperties DataReplicationPolicyProperties(DataReplicationProvisioningState? provisioningState = null, DataReplicationPolicyCustomProperties customProperties = null) + { + return new DataReplicationPolicyProperties(provisioningState, customProperties, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static DataReplicationPrivateEndpointConnectionData DataReplicationPrivateEndpointConnectionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DataReplicationPrivateEndpointConnectionProperties properties = null) + { + return new DataReplicationPrivateEndpointConnectionData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Gets or sets provisioning state of the private endpoint connection. + /// Represent private Endpoint network resource that is linked to the Private Endpoint connection. + /// Represents Private link service connection state. + /// A new instance for mocking. + public static DataReplicationPrivateEndpointConnectionProperties DataReplicationPrivateEndpointConnectionProperties(DataReplicationProvisioningState? provisioningState = null, ResourceIdentifier privateEndpointId = null, DataReplicationPrivateLinkServiceConnectionState privateLinkServiceConnectionState = null) + { + return new DataReplicationPrivateEndpointConnectionProperties(provisioningState, privateEndpointId != null ? ResourceManagerModelFactory.WritableSubResource(privateEndpointId) : null, privateLinkServiceConnectionState, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// Gets or sets ETag. + /// A new instance for mocking. + public static DataReplicationPrivateEndpointConnectionProxyData DataReplicationPrivateEndpointConnectionProxyData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DataReplicationPrivateEndpointConnectionProxyProperties properties = null, ETag? etag = null) + { + return new DataReplicationPrivateEndpointConnectionProxyData( + id, + name, + resourceType, + systemData, + properties, + etag, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Gets or sets the provisioning state of the private endpoint connection proxy. + /// Represent remote private endpoint information for the private endpoint connection proxy. + /// A new instance for mocking. + public static DataReplicationPrivateEndpointConnectionProxyProperties DataReplicationPrivateEndpointConnectionProxyProperties(DataReplicationProvisioningState? provisioningState = null, RemotePrivateEndpoint remotePrivateEndpoint = null) + { + return new DataReplicationPrivateEndpointConnectionProxyProperties(provisioningState, remotePrivateEndpoint, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static DataReplicationPrivateLinkResourceData DataReplicationPrivateLinkResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DataReplicationPrivateLinkResourceProperties properties = null) + { + return new DataReplicationPrivateLinkResourceData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Gets or sets the group id. + /// Gets or sets the required member. This translates to how many Private IPs should be created for each privately linkable resource. + /// Gets or sets the private DNS zone names. + /// Gets or sets the provisioning state of the private link resource. + /// A new instance for mocking. + public static DataReplicationPrivateLinkResourceProperties DataReplicationPrivateLinkResourceProperties(string groupId = null, IEnumerable requiredMembers = null, IEnumerable requiredZoneNames = null, DataReplicationProvisioningState? provisioningState = null) + { + requiredMembers ??= new List(); + requiredZoneNames ??= new List(); + + return new DataReplicationPrivateLinkResourceProperties(groupId, requiredMembers?.ToList(), requiredZoneNames?.ToList(), provisioningState, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static DataReplicationProtectedItemData DataReplicationProtectedItemData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DataReplicationProtectedItemProperties properties = null) + { + return new DataReplicationProtectedItemData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Gets or sets the policy name. + /// Gets or sets the replication extension name. + /// Gets or sets the protected item correlation Id. + /// Gets or sets the provisioning state of the fabric agent. + /// Gets or sets the protection state. + /// Gets or sets the protection state description. + /// Gets or sets the test failover state. + /// Gets or sets the Test failover state description. + /// Gets or sets the resynchronization state. + /// Gets or sets the fabric object Id. + /// Gets or sets the fabric object name. + /// Gets or sets the source fabric provider Id. + /// Gets or sets the target fabric provider Id. + /// Gets or sets the fabric Id. + /// Gets or sets the target fabric Id. + /// Gets or sets the fabric agent Id. + /// Gets or sets the target fabric agent Id. + /// Gets or sets a value indicating whether resynchronization is required or not. + /// Gets or sets the Last successful planned failover time. + /// Gets or sets the Last successful unplanned failover time. + /// Gets or sets the Last successful test failover time. + /// Gets or sets the current scenario. + /// Gets or sets the allowed scenarios on the protected item. + /// Gets or sets the last failed enabled protection job. + /// Gets or sets the last failed planned failover job. + /// Gets or sets the last test failover job. + /// Gets or sets protected item replication health. + /// Gets or sets the list of health errors. + /// + /// Protected item model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// A new instance for mocking. + public static DataReplicationProtectedItemProperties DataReplicationProtectedItemProperties(string policyName = null, string replicationExtensionName = null, string correlationId = null, DataReplicationProvisioningState? provisioningState = null, DataReplicationProtectionState? protectionState = null, string protectionStateDescription = null, DataReplicationTestFailoverState? testFailoverState = null, string testFailoverStateDescription = null, DataReplicationResynchronizationState? resynchronizationState = null, string fabricObjectId = null, string fabricObjectName = null, string sourceFabricProviderId = null, string targetFabricProviderId = null, string fabricId = null, string targetFabricId = null, string fabricAgentId = null, string targetFabricAgentId = null, bool? isResyncRequired = null, DateTimeOffset? lastSuccessfulPlannedFailoverOn = null, DateTimeOffset? lastSuccessfulUnplannedFailoverOn = null, DateTimeOffset? lastSuccessfulTestFailoverOn = null, ProtectedItemJobProperties currentJob = null, IEnumerable allowedJobs = null, ProtectedItemJobProperties lastFailedEnableProtectionJob = null, ProtectedItemJobProperties lastFailedPlannedFailoverJob = null, ProtectedItemJobProperties lastTestFailoverJob = null, DataReplicationHealthStatus? replicationHealth = null, IEnumerable healthErrors = null, DataReplicationProtectedItemCustomProperties customProperties = null) + { + allowedJobs ??= new List(); + healthErrors ??= new List(); + + return new DataReplicationProtectedItemProperties( + policyName, + replicationExtensionName, + correlationId, + provisioningState, + protectionState, + protectionStateDescription, + testFailoverState, + testFailoverStateDescription, + resynchronizationState, + fabricObjectId, + fabricObjectName, + sourceFabricProviderId, + targetFabricProviderId, + fabricId, + targetFabricId, + fabricAgentId, + targetFabricAgentId, + isResyncRequired, + lastSuccessfulPlannedFailoverOn, + lastSuccessfulUnplannedFailoverOn, + lastSuccessfulTestFailoverOn, + currentJob, + allowedJobs?.ToList(), + lastFailedEnableProtectionJob, + lastFailedPlannedFailoverJob, + lastTestFailoverJob, + replicationHealth, + healthErrors?.ToList(), + customProperties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Gets or sets protection scenario name. + /// Gets or sets job Id. + /// Gets or sets job name. + /// Gets or sets the job friendly display name. + /// Gets or sets job state. + /// Gets or sets start time of the job. + /// Gets or sets end time of the job. + /// A new instance for mocking. + public static ProtectedItemJobProperties ProtectedItemJobProperties(string scenarioName = null, string id = null, string name = null, string displayName = null, string state = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null) + { + return new ProtectedItemJobProperties( + scenarioName, + id, + name, + displayName, + state, + startOn, + endOn, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Gets or sets the location of the protected item. + /// Gets or sets the Target HCI Cluster ARM Id. + /// Gets or sets the Target Arc Cluster Custom Location ARM Id. + /// Gets or sets the Target AzStackHCI cluster name. + /// Gets or sets the ARM Id of the discovered machine. + /// Gets or sets the list of disks to replicate. + /// Gets or sets the list of VM NIC to replicate. + /// Gets or sets the source VM display name. + /// Gets or sets the source VM CPU cores. + /// Gets or sets the source VM ram memory size in megabytes. + /// Gets or sets the target VM display name. + /// Gets or sets the target resource group ARM Id. + /// Gets or sets the target storage container ARM Id. + /// Gets or sets the hypervisor generation of the virtual machine. + /// Gets or sets the target network Id within AzStackHCI Cluster. + /// Gets or sets the target test network Id within AzStackHCI Cluster. + /// Gets or sets the target CPU cores. + /// Gets or sets a value indicating whether memory is dynamical. + /// Protected item dynamic memory config. + /// Gets or sets the target memory in mega-bytes. + /// Gets or sets the Run As account Id. + /// Gets or sets the source fabric agent name. + /// Gets or sets the target fabric agent name. + /// Gets or sets the source appliance name. + /// Gets or sets the target appliance name. + /// Gets or sets the type of the OS. + /// Gets or sets the name of the OS. + /// Gets or sets the firmware type. + /// Gets or sets the target location. + /// Gets or sets the location of Azure Arc HCI custom location resource. + /// Gets or sets the recovery point Id to which the VM was failed over. + /// Gets or sets the last recovery point received time. + /// Gets or sets the last recovery point Id. + /// Gets or sets the initial replication progress percentage. This is calculated based on total bytes processed for all disks in the source VM. + /// Gets or sets the resync progress percentage. This is calculated based on total bytes processed for all disks in the source VM. + /// Gets or sets the list of protected disks. + /// Gets or sets the VM NIC details. + /// Gets or sets the BIOS Id of the target AzStackHCI VM. + /// Gets or sets the latest timestamp that replication status is updated. + /// A new instance for mocking. + public static HyperVToAzStackHciProtectedItemCustomProperties HyperVToAzStackHciProtectedItemCustomProperties(ProtectedItemActiveLocation? activeLocation = null, ResourceIdentifier targetHciClusterId = null, ResourceIdentifier targetArcClusterCustomLocationId = null, string targetAzStackHciClusterName = null, ResourceIdentifier fabricDiscoveryMachineId = null, IEnumerable disksToInclude = null, IEnumerable nicsToInclude = null, string sourceVmName = null, int? sourceCpuCores = null, double? sourceMemoryInMegaBytes = null, string targetVmName = null, ResourceIdentifier targetResourceGroupId = null, ResourceIdentifier storageContainerId = null, string hyperVGeneration = null, string targetNetworkId = null, string testNetworkId = null, int? targetCpuCores = null, bool? isDynamicRam = null, ProtectedItemDynamicMemoryConfig dynamicMemoryConfig = null, int? targetMemoryInMegaBytes = null, string runAsAccountId = null, string sourceFabricAgentName = null, string targetFabricAgentName = null, string sourceApplianceName = null, string targetApplianceName = null, string osType = null, string osName = null, string firmwareType = null, string targetLocation = null, string customLocationRegion = null, string failoverRecoveryPointId = null, DateTimeOffset? lastRecoveryPointReceivedOn = null, string lastRecoveryPointId = null, int? initialReplicationProgressPercentage = null, int? resyncProgressPercentage = null, IEnumerable protectedDisks = null, IEnumerable protectedNics = null, string targetVmBiosId = null, DateTimeOffset? lastReplicationUpdateOn = null) + { + disksToInclude ??= new List(); + nicsToInclude ??= new List(); + protectedDisks ??= new List(); + protectedNics ??= new List(); + + return new HyperVToAzStackHciProtectedItemCustomProperties( + "HyperVToAzStackHCI", + serializedAdditionalRawData: null, + activeLocation, + targetHciClusterId, + targetArcClusterCustomLocationId, + targetAzStackHciClusterName, + fabricDiscoveryMachineId, + disksToInclude?.ToList(), + nicsToInclude?.ToList(), + sourceVmName, + sourceCpuCores, + sourceMemoryInMegaBytes, + targetVmName, + targetResourceGroupId, + storageContainerId, + hyperVGeneration, + targetNetworkId, + testNetworkId, + targetCpuCores, + isDynamicRam, + dynamicMemoryConfig, + targetMemoryInMegaBytes, + runAsAccountId, + sourceFabricAgentName, + targetFabricAgentName, + sourceApplianceName, + targetApplianceName, + osType, + osName, + firmwareType, + targetLocation, + customLocationRegion, + failoverRecoveryPointId, + lastRecoveryPointReceivedOn, + lastRecoveryPointId, + initialReplicationProgressPercentage, + resyncProgressPercentage, + protectedDisks?.ToList(), + protectedNics?.ToList(), + targetVmBiosId, + lastReplicationUpdateOn); + } + + /// Initializes a new instance of . + /// Gets or sets the NIC Id. + /// Gets or sets the network name. + /// Gets or sets the target network Id within AzStackHCI Cluster. + /// Gets or sets the target test network Id within AzStackHCI Cluster. + /// Gets or sets the selection type of the NIC. + /// Gets or sets a value indicating whether static ip migration is enabled. + /// Gets or sets a value indicating whether mac address migration is enabled. + /// A new instance for mocking. + public static HyperVToAzStackHciNicInput HyperVToAzStackHciNicInput(string nicId = null, string networkName = null, string targetNetworkId = null, string testNetworkId = null, VmNicSelection selectionTypeForFailover = default, bool? isStaticIPMigrationEnabled = null, bool? isMacMigrationEnabled = null) + { + return new HyperVToAzStackHciNicInput( + nicId, + networkName, + targetNetworkId, + testNetworkId, + selectionTypeForFailover, + isStaticIPMigrationEnabled, + isMacMigrationEnabled, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Gets or sets the ARM Id of the storage container. + /// Gets or sets the local path of the storage container. + /// Gets or sets the source disk Id. + /// Gets or sets the source disk Name. + /// Gets or sets the seed disk name. + /// Gets or sets the test failover clone disk. + /// Gets or sets the failover clone disk. + /// Gets or sets a value indicating whether the disk is the OS disk. + /// Gets or sets the disk capacity in bytes. + /// Gets or sets a value indicating whether dynamic sizing is enabled on the virtual hard disk. + /// Gets or sets the disk type. + /// Gets or sets a value of disk block size. + /// Gets or sets a value of disk logical sector size. + /// Gets or sets a value of disk physical sector size. + /// A new instance for mocking. + public static HyperVToAzStackHciProtectedDiskProperties HyperVToAzStackHciProtectedDiskProperties(ResourceIdentifier storageContainerId = null, string storageContainerLocalPath = null, string sourceDiskId = null, string sourceDiskName = null, string seedDiskName = null, string testMigrateDiskName = null, string migrateDiskName = null, bool? isOSDisk = null, long? capacityInBytes = null, bool? isDynamic = null, string diskType = null, long? diskBlockSize = null, long? diskLogicalSectorSize = null, long? diskPhysicalSectorSize = null) + { + return new HyperVToAzStackHciProtectedDiskProperties( + storageContainerId, + storageContainerLocalPath, + sourceDiskId, + sourceDiskName, + seedDiskName, + testMigrateDiskName, + migrateDiskName, + isOSDisk, + capacityInBytes, + isDynamic, + diskType, + diskBlockSize, + diskLogicalSectorSize, + diskPhysicalSectorSize, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Gets or sets the NIC Id. + /// Gets or sets the NIC mac address. + /// Gets or sets the network name. + /// Gets or sets the target network Id within AzStackHCI Cluster. + /// Gets or sets the target test network Id within AzStackHCI Cluster. + /// Gets or sets the selection type of the NIC. + /// A new instance for mocking. + public static HyperVToAzStackHciProtectedNicProperties HyperVToAzStackHciProtectedNicProperties(string nicId = null, string macAddress = null, string networkName = null, string targetNetworkId = null, string testNetworkId = null, VmNicSelection? selectionTypeForFailover = null) + { + return new HyperVToAzStackHciProtectedNicProperties( + nicId, + macAddress, + networkName, + targetNetworkId, + testNetworkId, + selectionTypeForFailover, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Gets or sets the location of the protected item. + /// Gets or sets the Target HCI Cluster ARM Id. + /// Gets or sets the Target Arc Cluster Custom Location ARM Id. + /// Gets or sets the Target AzStackHCI cluster name. + /// Gets or sets the target storage container ARM Id. + /// Gets or sets the target resource group ARM Id. + /// Gets or sets the target location. + /// Gets or sets the location of Azure Arc HCI custom location resource. + /// Gets or sets the list of disks to replicate. + /// Gets or sets the list of VM NIC to replicate. + /// Gets or sets the list of protected disks. + /// Gets or sets the VM NIC details. + /// Gets or sets the BIOS Id of the target AzStackHCI VM. + /// Gets or sets the target VM display name. + /// Gets or sets the hypervisor generation of the virtual machine possible values are 1,2. + /// Gets or sets the target network Id within AzStackHCI Cluster. + /// Gets or sets the target test network Id within AzStackHCI Cluster. + /// Gets or sets the target CPU cores. + /// Gets or sets a value indicating whether memory is dynamical. + /// Protected item dynamic memory config. + /// Gets or sets the target memory in mega-bytes. + /// Gets or sets the type of the OS. + /// Gets or sets the name of the OS. + /// Gets or sets the firmware type. + /// Gets or sets the ARM Id of the discovered machine. + /// Gets or sets the source VM display name. + /// Gets or sets the source VM CPU cores. + /// Gets or sets the source VM ram memory size in megabytes. + /// Gets or sets the run as account Id. + /// Gets or sets the source fabric agent name. + /// Gets or sets the target fabric agent name. + /// Gets or sets the source appliance name. + /// Gets or sets the target appliance name. + /// Gets or sets the recovery point Id to which the VM was failed over. + /// Gets or sets the last recovery point received time. + /// Gets or sets the last recovery point Id. + /// Gets or sets the initial replication progress percentage. This is calculated based on total bytes processed for all disks in the source VM. + /// Gets or sets the migration progress percentage. + /// Gets or sets the resume progress percentage. + /// Gets or sets the resync progress percentage. This is calculated based on total bytes processed for all disks in the source VM. + /// Gets or sets the resync retry count. + /// Gets or sets a value indicating whether resync is required. + /// Gets or sets the resync state. + /// Gets or sets a value indicating whether auto resync is to be done. + /// Gets or sets the resume retry count. + /// Gets or sets the latest timestamp that replication status is updated. + /// A new instance for mocking. + public static VMwareToAzStackHciProtectedItemCustomProperties VMwareToAzStackHciProtectedItemCustomProperties(ProtectedItemActiveLocation? activeLocation = null, ResourceIdentifier targetHciClusterId = null, ResourceIdentifier targetArcClusterCustomLocationId = null, string targetAzStackHciClusterName = null, ResourceIdentifier storageContainerId = null, ResourceIdentifier targetResourceGroupId = null, string targetLocation = null, string customLocationRegion = null, IEnumerable disksToInclude = null, IEnumerable nicsToInclude = null, IEnumerable protectedDisks = null, IEnumerable protectedNics = null, string targetVmBiosId = null, string targetVmName = null, string hyperVGeneration = null, string targetNetworkId = null, string testNetworkId = null, int? targetCpuCores = null, bool? isDynamicRam = null, ProtectedItemDynamicMemoryConfig dynamicMemoryConfig = null, int? targetMemoryInMegaBytes = null, string osType = null, string osName = null, string firmwareType = null, ResourceIdentifier fabricDiscoveryMachineId = null, string sourceVmName = null, int? sourceCpuCores = null, double? sourceMemoryInMegaBytes = null, string runAsAccountId = null, string sourceFabricAgentName = null, string targetFabricAgentName = null, string sourceApplianceName = null, string targetApplianceName = null, string failoverRecoveryPointId = null, DateTimeOffset? lastRecoveryPointReceivedOn = null, string lastRecoveryPointId = null, int? initialReplicationProgressPercentage = null, int? migrationProgressPercentage = null, int? resumeProgressPercentage = null, int? resyncProgressPercentage = null, long? resyncRetryCount = null, bool? resyncRequired = null, VMwareToAzureMigrateResyncState? resyncState = null, bool? performAutoResync = null, long? resumeRetryCount = null, DateTimeOffset? lastReplicationUpdateOn = null) + { + disksToInclude ??= new List(); + nicsToInclude ??= new List(); + protectedDisks ??= new List(); + protectedNics ??= new List(); + + return new VMwareToAzStackHciProtectedItemCustomProperties( + "VMwareToAzStackHCI", + serializedAdditionalRawData: null, + activeLocation, + targetHciClusterId, + targetArcClusterCustomLocationId, + targetAzStackHciClusterName, + storageContainerId, + targetResourceGroupId, + targetLocation, + customLocationRegion, + disksToInclude?.ToList(), + nicsToInclude?.ToList(), + protectedDisks?.ToList(), + protectedNics?.ToList(), + targetVmBiosId, + targetVmName, + hyperVGeneration, + targetNetworkId, + testNetworkId, + targetCpuCores, + isDynamicRam, + dynamicMemoryConfig, + targetMemoryInMegaBytes, + osType, + osName, + firmwareType, + fabricDiscoveryMachineId, + sourceVmName, + sourceCpuCores, + sourceMemoryInMegaBytes, + runAsAccountId, + sourceFabricAgentName, + targetFabricAgentName, + sourceApplianceName, + targetApplianceName, + failoverRecoveryPointId, + lastRecoveryPointReceivedOn, + lastRecoveryPointId, + initialReplicationProgressPercentage, + migrationProgressPercentage, + resumeProgressPercentage, + resyncProgressPercentage, + resyncRetryCount, + resyncRequired, + resyncState, + performAutoResync, + resumeRetryCount, + lastReplicationUpdateOn); + } + + /// Initializes a new instance of . + /// Gets or sets the NIC Id. + /// Gets or sets the NIC label. + /// Gets or sets the network name. + /// Gets or sets the target network Id within AzStackHCI Cluster. + /// Gets or sets the target test network Id within AzStackHCI Cluster. + /// Gets or sets the selection type of the NIC. + /// Gets or sets a value indicating whether static ip migration is enabled. + /// Gets or sets a value indicating whether mac address migration is enabled. + /// A new instance for mocking. + public static VMwareToAzStackHciNicInput VMwareToAzStackHciNicInput(string nicId = null, string label = null, string networkName = null, string targetNetworkId = null, string testNetworkId = null, VmNicSelection selectionTypeForFailover = default, bool? isStaticIPMigrationEnabled = null, bool? isMacMigrationEnabled = null) + { + return new VMwareToAzStackHciNicInput( + nicId, + label, + networkName, + targetNetworkId, + testNetworkId, + selectionTypeForFailover, + isStaticIPMigrationEnabled, + isMacMigrationEnabled, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Gets or sets the ARM Id of the storage container. + /// Gets or sets the local path of the storage container. + /// Gets or sets the source disk Id. + /// Gets or sets the source disk Name. + /// Gets or sets the seed disk name. + /// Gets or sets the test failover clone disk. + /// Gets or sets the failover clone disk. + /// Gets or sets a value indicating whether the disk is the OS disk. + /// Gets or sets the disk capacity in bytes. + /// Gets or sets a value indicating whether dynamic sizing is enabled on the virtual hard disk. + /// Gets or sets the disk type. + /// Gets or sets a value of disk block size. + /// Gets or sets a value of disk logical sector size. + /// Gets or sets a value of disk physical sector size. + /// A new instance for mocking. + public static VMwareToAzStackHciProtectedDiskProperties VMwareToAzStackHciProtectedDiskProperties(ResourceIdentifier storageContainerId = null, string storageContainerLocalPath = null, string sourceDiskId = null, string sourceDiskName = null, string seedDiskName = null, string testMigrateDiskName = null, string migrateDiskName = null, bool? isOSDisk = null, long? capacityInBytes = null, bool? isDynamic = null, string diskType = null, long? diskBlockSize = null, long? diskLogicalSectorSize = null, long? diskPhysicalSectorSize = null) + { + return new VMwareToAzStackHciProtectedDiskProperties( + storageContainerId, + storageContainerLocalPath, + sourceDiskId, + sourceDiskName, + seedDiskName, + testMigrateDiskName, + migrateDiskName, + isOSDisk, + capacityInBytes, + isDynamic, + diskType, + diskBlockSize, + diskLogicalSectorSize, + diskPhysicalSectorSize, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Gets or sets the NIC Id. + /// Gets or sets the NIC mac address. + /// Gets or sets the NIC label. + /// Gets or sets a value indicating whether this is the primary NIC. + /// Gets or sets the network name. + /// Gets or sets the target network Id within AzStackHCI Cluster. + /// Gets or sets the target test network Id within AzStackHCI Cluster. + /// Gets or sets the selection type of the NIC. + /// A new instance for mocking. + public static VMwareToAzStackHciProtectedNicProperties VMwareToAzStackHciProtectedNicProperties(string nicId = null, string macAddress = null, string label = null, bool? isPrimaryNic = null, string networkName = null, string targetNetworkId = null, string testNetworkId = null, VmNicSelection? selectionTypeForFailover = null) + { + return new VMwareToAzStackHciProtectedNicProperties( + nicId, + macAddress, + label, + isPrimaryNic, + networkName, + targetNetworkId, + testNetworkId, + selectionTypeForFailover, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Protected item model properties. + /// A new instance for mocking. + public static DataReplicationProtectedItemPatch DataReplicationProtectedItemPatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DataReplicationProtectedItemCustomPropertiesUpdate customProperties = null) + { + return new DataReplicationProtectedItemPatch( + id, + name, + resourceType, + systemData, + customProperties != null ? new DataReplicationProtectedItemPropertiesUpdate(customProperties, serializedAdditionalRawData: null) : null, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static DataReplicationRecoveryPointData DataReplicationRecoveryPointData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DataReplicationRecoveryPointProperties properties = null) + { + return new DataReplicationRecoveryPointData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Gets or sets the recovery point time. + /// Gets or sets the recovery point type. + /// + /// Recovery point model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// Gets or sets the provisioning state of the recovery point item. + /// A new instance for mocking. + public static DataReplicationRecoveryPointProperties DataReplicationRecoveryPointProperties(DateTimeOffset recoveryPointOn = default, DataReplicationRecoveryPointType recoveryPointType = default, DataReplicationRecoveryPointCustomProperties customProperties = null, DataReplicationProvisioningState? provisioningState = null) + { + return new DataReplicationRecoveryPointProperties(recoveryPointOn, recoveryPointType, customProperties, provisioningState, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Gets or sets the list of the disk Ids. + /// A new instance for mocking. + public static HyperVToAzStackHciRecoveryPointCustomProperties HyperVToAzStackHciRecoveryPointCustomProperties(IEnumerable diskIds = null) + { + diskIds ??= new List(); + + return new HyperVToAzStackHciRecoveryPointCustomProperties("HyperVToAzStackHCI", serializedAdditionalRawData: null, diskIds?.ToList()); + } + + /// Initializes a new instance of . + /// Gets or sets the list of the disk Ids. + /// A new instance for mocking. + public static VMwareToAzStackHciRecoveryPointCustomProperties VMwareToAzStackHciRecoveryPointCustomProperties(IEnumerable diskIds = null) + { + diskIds ??= new List(); + + return new VMwareToAzStackHciRecoveryPointCustomProperties("VMwareToAzStackHCIRecoveryPointModelCustomProperties", serializedAdditionalRawData: null, diskIds?.ToList()); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static DataReplicationExtensionData DataReplicationExtensionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DataReplicationExtensionProperties properties = null) + { + return new DataReplicationExtensionData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Gets or sets the provisioning state of the replication extension. + /// + /// Replication extension model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// A new instance for mocking. + public static DataReplicationExtensionProperties DataReplicationExtensionProperties(DataReplicationProvisioningState? provisioningState = null, DataReplicationExtensionCustomProperties customProperties = null) + { + return new DataReplicationExtensionProperties(provisioningState, customProperties, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Gets or sets the ARM Id of the source HyperV fabric. + /// Gets or sets the ARM Id of the HyperV site. + /// Gets or sets the ARM Id of the target AzStackHCI fabric. + /// Gets or sets the ARM Id of the AzStackHCI site. + /// Gets or sets the storage account Id. + /// Gets or sets the Sas Secret of storage account. + /// Gets or sets the Uri of ASR. + /// Gets or sets the Uri of Rcm. + /// Gets or sets the Uri of Gateway. + /// Gets or sets the gateway service Id of source. + /// Gets or sets the gateway service Id of target. + /// Gets or sets the source storage container name. + /// Gets or sets the target storage container name. + /// Gets or sets the resource location. + /// Gets or sets the subscription. + /// Gets or sets the resource group. + /// A new instance for mocking. + public static HyperVToAzStackHciReplicationExtensionCustomProperties HyperVToAzStackHciReplicationExtensionCustomProperties(ResourceIdentifier hyperVFabricArmId = null, ResourceIdentifier hyperVSiteId = null, ResourceIdentifier azStackHciFabricArmId = null, ResourceIdentifier azStackHciSiteId = null, string storageAccountId = null, string storageAccountSasSecretName = null, Uri asrServiceUri = null, Uri rcmServiceUri = null, Uri gatewayServiceUri = null, string sourceGatewayServiceId = null, string targetGatewayServiceId = null, string sourceStorageContainerName = null, string targetStorageContainerName = null, string resourceLocation = null, string subscriptionId = null, string resourceGroup = null) + { + return new HyperVToAzStackHciReplicationExtensionCustomProperties( + "HyperVToAzStackHCI", + serializedAdditionalRawData: null, + hyperVFabricArmId, + hyperVSiteId, + azStackHciFabricArmId, + azStackHciSiteId, + storageAccountId, + storageAccountSasSecretName, + asrServiceUri, + rcmServiceUri, + gatewayServiceUri, + sourceGatewayServiceId, + targetGatewayServiceId, + sourceStorageContainerName, + targetStorageContainerName, + resourceLocation, + subscriptionId, + resourceGroup); + } + + /// Initializes a new instance of . + /// Gets or sets the ARM Id of the source VMware fabric. + /// Gets or sets the ARM Id of the VMware site. + /// Gets or sets the ARM Id of the target AzStackHCI fabric. + /// Gets or sets the ARM Id of the AzStackHCI site. + /// Gets or sets the storage account Id. + /// Gets or sets the Sas Secret of storage account. + /// Gets or sets the Uri of ASR. + /// Gets or sets the Uri of Rcm. + /// Gets or sets the Uri of Gateway. + /// Gets or sets the gateway service Id of source. + /// Gets or sets the gateway service Id of target. + /// Gets or sets the source storage container name. + /// Gets or sets the target storage container name. + /// Gets or sets the resource location. + /// Gets or sets the subscription. + /// Gets or sets the resource group. + /// A new instance for mocking. + public static VMwareToAzStackHciReplicationExtensionCustomProperties VMwareToAzStackHciReplicationExtensionCustomProperties(ResourceIdentifier vmwareFabricArmId = null, ResourceIdentifier vmwareSiteId = null, ResourceIdentifier azStackHciFabricArmId = null, ResourceIdentifier azStackHciSiteId = null, string storageAccountId = null, string storageAccountSasSecretName = null, Uri asrServiceUri = null, Uri rcmServiceUri = null, Uri gatewayServiceUri = null, string sourceGatewayServiceId = null, string targetGatewayServiceId = null, string sourceStorageContainerName = null, string targetStorageContainerName = null, string resourceLocation = null, string subscriptionId = null, string resourceGroup = null) + { + return new VMwareToAzStackHciReplicationExtensionCustomProperties( + "VMwareToAzStackHCI", + serializedAdditionalRawData: null, + vmwareFabricArmId, + vmwareSiteId, + azStackHciFabricArmId, + azStackHciSiteId, + storageAccountId, + storageAccountSasSecretName, + asrServiceUri, + rcmServiceUri, + gatewayServiceUri, + sourceGatewayServiceId, + targetGatewayServiceId, + sourceStorageContainerName, + targetStorageContainerName, + resourceLocation, + subscriptionId, + resourceGroup); + } + + /// Initializes a new instance of . + /// Gets or sets a value indicating whether resource name is available or not. + /// Gets or sets the reason for resource name unavailability. + /// Gets or sets the message for resource name unavailability. + /// A new instance for mocking. + public static DataReplicationNameAvailabilityResult DataReplicationNameAvailabilityResult(bool? isNameAvailable = null, string reason = null, string message = null) + { + return new DataReplicationNameAvailabilityResult(isNameAvailable, reason, message, serializedAdditionalRawData: null); + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationEmailConfigurationCollection.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationEmailConfigurationCollection.cs new file mode 100644 index 000000000000..0ddf694241ee --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationEmailConfigurationCollection.cs @@ -0,0 +1,497 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetDataReplicationEmailConfigurations method from an instance of . + /// + public partial class DataReplicationEmailConfigurationCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _dataReplicationEmailConfigurationEmailConfigurationClientDiagnostics; + private readonly EmailConfigurationRestOperations _dataReplicationEmailConfigurationEmailConfigurationRestClient; + + /// Initializes a new instance of the class for mocking. + protected DataReplicationEmailConfigurationCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal DataReplicationEmailConfigurationCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _dataReplicationEmailConfigurationEmailConfigurationClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", DataReplicationEmailConfigurationResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DataReplicationEmailConfigurationResource.ResourceType, out string dataReplicationEmailConfigurationEmailConfigurationApiVersion); + _dataReplicationEmailConfigurationEmailConfigurationRestClient = new EmailConfigurationRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataReplicationEmailConfigurationEmailConfigurationApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != DataReplicationVaultResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, DataReplicationVaultResource.ResourceType), nameof(id)); + } + + /// + /// Creates an alert configuration setting for the given vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/alertSettings/{emailConfigurationName} + /// + /// + /// Operation Id + /// EmailConfigurationModel_Create + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The email configuration name. + /// EmailConfiguration model. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string emailConfigurationName, DataReplicationEmailConfigurationData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(emailConfigurationName, nameof(emailConfigurationName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _dataReplicationEmailConfigurationEmailConfigurationClientDiagnostics.CreateScope("DataReplicationEmailConfigurationCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _dataReplicationEmailConfigurationEmailConfigurationRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, emailConfigurationName, data, cancellationToken).ConfigureAwait(false); + var uri = _dataReplicationEmailConfigurationEmailConfigurationRestClient.CreateCreateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, emailConfigurationName, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new RecoveryServicesDataReplicationArmOperation(Response.FromValue(new DataReplicationEmailConfigurationResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates an alert configuration setting for the given vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/alertSettings/{emailConfigurationName} + /// + /// + /// Operation Id + /// EmailConfigurationModel_Create + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The email configuration name. + /// EmailConfiguration model. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string emailConfigurationName, DataReplicationEmailConfigurationData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(emailConfigurationName, nameof(emailConfigurationName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _dataReplicationEmailConfigurationEmailConfigurationClientDiagnostics.CreateScope("DataReplicationEmailConfigurationCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _dataReplicationEmailConfigurationEmailConfigurationRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, emailConfigurationName, data, cancellationToken); + var uri = _dataReplicationEmailConfigurationEmailConfigurationRestClient.CreateCreateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, emailConfigurationName, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new RecoveryServicesDataReplicationArmOperation(Response.FromValue(new DataReplicationEmailConfigurationResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the alert configuration setting. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/alertSettings/{emailConfigurationName} + /// + /// + /// Operation Id + /// EmailConfigurationModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The email configuration name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string emailConfigurationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(emailConfigurationName, nameof(emailConfigurationName)); + + using var scope = _dataReplicationEmailConfigurationEmailConfigurationClientDiagnostics.CreateScope("DataReplicationEmailConfigurationCollection.Get"); + scope.Start(); + try + { + var response = await _dataReplicationEmailConfigurationEmailConfigurationRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, emailConfigurationName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DataReplicationEmailConfigurationResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the alert configuration setting. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/alertSettings/{emailConfigurationName} + /// + /// + /// Operation Id + /// EmailConfigurationModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The email configuration name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string emailConfigurationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(emailConfigurationName, nameof(emailConfigurationName)); + + using var scope = _dataReplicationEmailConfigurationEmailConfigurationClientDiagnostics.CreateScope("DataReplicationEmailConfigurationCollection.Get"); + scope.Start(); + try + { + var response = _dataReplicationEmailConfigurationEmailConfigurationRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, emailConfigurationName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DataReplicationEmailConfigurationResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the list of alert configuration settings for the given vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/alertSettings + /// + /// + /// Operation Id + /// EmailConfigurationModel_List + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _dataReplicationEmailConfigurationEmailConfigurationRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataReplicationEmailConfigurationEmailConfigurationRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DataReplicationEmailConfigurationResource(Client, DataReplicationEmailConfigurationData.DeserializeDataReplicationEmailConfigurationData(e)), _dataReplicationEmailConfigurationEmailConfigurationClientDiagnostics, Pipeline, "DataReplicationEmailConfigurationCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Gets the list of alert configuration settings for the given vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/alertSettings + /// + /// + /// Operation Id + /// EmailConfigurationModel_List + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _dataReplicationEmailConfigurationEmailConfigurationRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataReplicationEmailConfigurationEmailConfigurationRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DataReplicationEmailConfigurationResource(Client, DataReplicationEmailConfigurationData.DeserializeDataReplicationEmailConfigurationData(e)), _dataReplicationEmailConfigurationEmailConfigurationClientDiagnostics, Pipeline, "DataReplicationEmailConfigurationCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/alertSettings/{emailConfigurationName} + /// + /// + /// Operation Id + /// EmailConfigurationModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The email configuration name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string emailConfigurationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(emailConfigurationName, nameof(emailConfigurationName)); + + using var scope = _dataReplicationEmailConfigurationEmailConfigurationClientDiagnostics.CreateScope("DataReplicationEmailConfigurationCollection.Exists"); + scope.Start(); + try + { + var response = await _dataReplicationEmailConfigurationEmailConfigurationRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, emailConfigurationName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/alertSettings/{emailConfigurationName} + /// + /// + /// Operation Id + /// EmailConfigurationModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The email configuration name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string emailConfigurationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(emailConfigurationName, nameof(emailConfigurationName)); + + using var scope = _dataReplicationEmailConfigurationEmailConfigurationClientDiagnostics.CreateScope("DataReplicationEmailConfigurationCollection.Exists"); + scope.Start(); + try + { + var response = _dataReplicationEmailConfigurationEmailConfigurationRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, emailConfigurationName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/alertSettings/{emailConfigurationName} + /// + /// + /// Operation Id + /// EmailConfigurationModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The email configuration name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string emailConfigurationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(emailConfigurationName, nameof(emailConfigurationName)); + + using var scope = _dataReplicationEmailConfigurationEmailConfigurationClientDiagnostics.CreateScope("DataReplicationEmailConfigurationCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _dataReplicationEmailConfigurationEmailConfigurationRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, emailConfigurationName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DataReplicationEmailConfigurationResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/alertSettings/{emailConfigurationName} + /// + /// + /// Operation Id + /// EmailConfigurationModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The email configuration name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string emailConfigurationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(emailConfigurationName, nameof(emailConfigurationName)); + + using var scope = _dataReplicationEmailConfigurationEmailConfigurationClientDiagnostics.CreateScope("DataReplicationEmailConfigurationCollection.GetIfExists"); + scope.Start(); + try + { + var response = _dataReplicationEmailConfigurationEmailConfigurationRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, emailConfigurationName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DataReplicationEmailConfigurationResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationEmailConfigurationData.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationEmailConfigurationData.Serialization.cs new file mode 100644 index 000000000000..1fea10fc7ff4 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationEmailConfigurationData.Serialization.cs @@ -0,0 +1,155 @@ +// 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.Models; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + public partial class DataReplicationEmailConfigurationData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationEmailConfigurationData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + DataReplicationEmailConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationEmailConfigurationData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataReplicationEmailConfigurationData(document.RootElement, options); + } + + internal static DataReplicationEmailConfigurationData DeserializeDataReplicationEmailConfigurationData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DataReplicationEmailConfigurationProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = DataReplicationEmailConfigurationProperties.DeserializeDataReplicationEmailConfigurationProperties(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DataReplicationEmailConfigurationData( + id, + name, + type, + systemData, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DataReplicationEmailConfigurationData)} does not support writing '{options.Format}' format."); + } + } + + DataReplicationEmailConfigurationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataReplicationEmailConfigurationData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataReplicationEmailConfigurationData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationEmailConfigurationData.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationEmailConfigurationData.cs new file mode 100644 index 000000000000..c1304e975d21 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationEmailConfigurationData.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + /// + /// A class representing the DataReplicationEmailConfiguration data model. + /// Email configuration model. + /// + public partial class DataReplicationEmailConfigurationData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DataReplicationEmailConfigurationData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal DataReplicationEmailConfigurationData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DataReplicationEmailConfigurationProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public DataReplicationEmailConfigurationProperties Properties { get; set; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationEmailConfigurationResource.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationEmailConfigurationResource.Serialization.cs new file mode 100644 index 000000000000..d8e187153d99 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationEmailConfigurationResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + public partial class DataReplicationEmailConfigurationResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + DataReplicationEmailConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + DataReplicationEmailConfigurationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationEmailConfigurationResource.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationEmailConfigurationResource.cs new file mode 100644 index 000000000000..f41692182ae8 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationEmailConfigurationResource.cs @@ -0,0 +1,267 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + /// + /// A Class representing a DataReplicationEmailConfiguration along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetDataReplicationEmailConfigurationResource method. + /// Otherwise you can get one from its parent resource using the GetDataReplicationEmailConfiguration method. + /// + public partial class DataReplicationEmailConfigurationResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The vaultName. + /// The emailConfigurationName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string vaultName, string emailConfigurationName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/alertSettings/{emailConfigurationName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _dataReplicationEmailConfigurationEmailConfigurationClientDiagnostics; + private readonly EmailConfigurationRestOperations _dataReplicationEmailConfigurationEmailConfigurationRestClient; + private readonly DataReplicationEmailConfigurationData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.DataReplication/replicationVaults/alertSettings"; + + /// Initializes a new instance of the class for mocking. + protected DataReplicationEmailConfigurationResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal DataReplicationEmailConfigurationResource(ArmClient client, DataReplicationEmailConfigurationData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal DataReplicationEmailConfigurationResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _dataReplicationEmailConfigurationEmailConfigurationClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string dataReplicationEmailConfigurationEmailConfigurationApiVersion); + _dataReplicationEmailConfigurationEmailConfigurationRestClient = new EmailConfigurationRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataReplicationEmailConfigurationEmailConfigurationApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual DataReplicationEmailConfigurationData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Gets the details of the alert configuration setting. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/alertSettings/{emailConfigurationName} + /// + /// + /// Operation Id + /// EmailConfigurationModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _dataReplicationEmailConfigurationEmailConfigurationClientDiagnostics.CreateScope("DataReplicationEmailConfigurationResource.Get"); + scope.Start(); + try + { + var response = await _dataReplicationEmailConfigurationEmailConfigurationRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DataReplicationEmailConfigurationResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the alert configuration setting. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/alertSettings/{emailConfigurationName} + /// + /// + /// Operation Id + /// EmailConfigurationModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _dataReplicationEmailConfigurationEmailConfigurationClientDiagnostics.CreateScope("DataReplicationEmailConfigurationResource.Get"); + scope.Start(); + try + { + var response = _dataReplicationEmailConfigurationEmailConfigurationRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DataReplicationEmailConfigurationResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates an alert configuration setting for the given vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/alertSettings/{emailConfigurationName} + /// + /// + /// Operation Id + /// EmailConfigurationModel_Create + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// 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. + /// EmailConfiguration model. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, DataReplicationEmailConfigurationData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _dataReplicationEmailConfigurationEmailConfigurationClientDiagnostics.CreateScope("DataReplicationEmailConfigurationResource.Update"); + scope.Start(); + try + { + var response = await _dataReplicationEmailConfigurationEmailConfigurationRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var uri = _dataReplicationEmailConfigurationEmailConfigurationRestClient.CreateCreateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new RecoveryServicesDataReplicationArmOperation(Response.FromValue(new DataReplicationEmailConfigurationResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates an alert configuration setting for the given vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/alertSettings/{emailConfigurationName} + /// + /// + /// Operation Id + /// EmailConfigurationModel_Create + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// 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. + /// EmailConfiguration model. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, DataReplicationEmailConfigurationData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _dataReplicationEmailConfigurationEmailConfigurationClientDiagnostics.CreateScope("DataReplicationEmailConfigurationResource.Update"); + scope.Start(); + try + { + var response = _dataReplicationEmailConfigurationEmailConfigurationRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var uri = _dataReplicationEmailConfigurationEmailConfigurationRestClient.CreateCreateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new RecoveryServicesDataReplicationArmOperation(Response.FromValue(new DataReplicationEmailConfigurationResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationEventCollection.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationEventCollection.cs new file mode 100644 index 000000000000..8251eebbed31 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationEventCollection.cs @@ -0,0 +1,401 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetDataReplicationEvents method from an instance of . + /// + public partial class DataReplicationEventCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _dataReplicationEventEventClientDiagnostics; + private readonly EventRestOperations _dataReplicationEventEventRestClient; + + /// Initializes a new instance of the class for mocking. + protected DataReplicationEventCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal DataReplicationEventCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _dataReplicationEventEventClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", DataReplicationEventResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DataReplicationEventResource.ResourceType, out string dataReplicationEventEventApiVersion); + _dataReplicationEventEventRestClient = new EventRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataReplicationEventEventApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != DataReplicationVaultResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, DataReplicationVaultResource.ResourceType), nameof(id)); + } + + /// + /// Gets the details of the event. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/events/{eventName} + /// + /// + /// Operation Id + /// EventModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The event name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string eventName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(eventName, nameof(eventName)); + + using var scope = _dataReplicationEventEventClientDiagnostics.CreateScope("DataReplicationEventCollection.Get"); + scope.Start(); + try + { + var response = await _dataReplicationEventEventRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, eventName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DataReplicationEventResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the event. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/events/{eventName} + /// + /// + /// Operation Id + /// EventModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The event name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string eventName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(eventName, nameof(eventName)); + + using var scope = _dataReplicationEventEventClientDiagnostics.CreateScope("DataReplicationEventCollection.Get"); + scope.Start(); + try + { + var response = _dataReplicationEventEventRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, eventName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DataReplicationEventResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the list of events in the given vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/events + /// + /// + /// Operation Id + /// EventModel_List + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// OData options. + /// Continuation token. + /// Page size. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(string odataOptions = null, string continuationToken = null, int? pageSize = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _dataReplicationEventEventRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, odataOptions, continuationToken, pageSizeHint); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataReplicationEventEventRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, odataOptions, continuationToken, pageSizeHint); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DataReplicationEventResource(Client, DataReplicationEventData.DeserializeDataReplicationEventData(e)), _dataReplicationEventEventClientDiagnostics, Pipeline, "DataReplicationEventCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Gets the list of events in the given vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/events + /// + /// + /// Operation Id + /// EventModel_List + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// OData options. + /// Continuation token. + /// Page size. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(string odataOptions = null, string continuationToken = null, int? pageSize = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _dataReplicationEventEventRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, odataOptions, continuationToken, pageSizeHint); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataReplicationEventEventRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, odataOptions, continuationToken, pageSizeHint); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DataReplicationEventResource(Client, DataReplicationEventData.DeserializeDataReplicationEventData(e)), _dataReplicationEventEventClientDiagnostics, Pipeline, "DataReplicationEventCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/events/{eventName} + /// + /// + /// Operation Id + /// EventModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The event name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string eventName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(eventName, nameof(eventName)); + + using var scope = _dataReplicationEventEventClientDiagnostics.CreateScope("DataReplicationEventCollection.Exists"); + scope.Start(); + try + { + var response = await _dataReplicationEventEventRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, eventName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/events/{eventName} + /// + /// + /// Operation Id + /// EventModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The event name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string eventName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(eventName, nameof(eventName)); + + using var scope = _dataReplicationEventEventClientDiagnostics.CreateScope("DataReplicationEventCollection.Exists"); + scope.Start(); + try + { + var response = _dataReplicationEventEventRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, eventName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/events/{eventName} + /// + /// + /// Operation Id + /// EventModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The event name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string eventName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(eventName, nameof(eventName)); + + using var scope = _dataReplicationEventEventClientDiagnostics.CreateScope("DataReplicationEventCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _dataReplicationEventEventRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, eventName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DataReplicationEventResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/events/{eventName} + /// + /// + /// Operation Id + /// EventModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The event name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string eventName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(eventName, nameof(eventName)); + + using var scope = _dataReplicationEventEventClientDiagnostics.CreateScope("DataReplicationEventCollection.GetIfExists"); + scope.Start(); + try + { + var response = _dataReplicationEventEventRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, eventName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DataReplicationEventResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationEventData.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationEventData.Serialization.cs new file mode 100644 index 000000000000..ed72d1b35393 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationEventData.Serialization.cs @@ -0,0 +1,155 @@ +// 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.Models; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + public partial class DataReplicationEventData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationEventData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + DataReplicationEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationEventData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataReplicationEventData(document.RootElement, options); + } + + internal static DataReplicationEventData DeserializeDataReplicationEventData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DataReplicationEventProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = DataReplicationEventProperties.DeserializeDataReplicationEventProperties(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DataReplicationEventData( + id, + name, + type, + systemData, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DataReplicationEventData)} does not support writing '{options.Format}' format."); + } + } + + DataReplicationEventData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataReplicationEventData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataReplicationEventData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationEventData.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationEventData.cs new file mode 100644 index 000000000000..0c6f9016a4d8 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationEventData.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + /// + /// A class representing the DataReplicationEvent data model. + /// Event model. + /// + public partial class DataReplicationEventData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal DataReplicationEventData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal DataReplicationEventData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DataReplicationEventProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public DataReplicationEventProperties Properties { get; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationEventResource.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationEventResource.Serialization.cs new file mode 100644 index 000000000000..9bf0385d2adf --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationEventResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + public partial class DataReplicationEventResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + DataReplicationEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + DataReplicationEventData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationEventResource.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationEventResource.cs new file mode 100644 index 000000000000..b6e992c7f5da --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationEventResource.cs @@ -0,0 +1,171 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + /// + /// A Class representing a DataReplicationEvent along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetDataReplicationEventResource method. + /// Otherwise you can get one from its parent resource using the GetDataReplicationEvent method. + /// + public partial class DataReplicationEventResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The vaultName. + /// The eventName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string vaultName, string eventName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/events/{eventName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _dataReplicationEventEventClientDiagnostics; + private readonly EventRestOperations _dataReplicationEventEventRestClient; + private readonly DataReplicationEventData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.DataReplication/replicationVaults/events"; + + /// Initializes a new instance of the class for mocking. + protected DataReplicationEventResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal DataReplicationEventResource(ArmClient client, DataReplicationEventData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal DataReplicationEventResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _dataReplicationEventEventClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string dataReplicationEventEventApiVersion); + _dataReplicationEventEventRestClient = new EventRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataReplicationEventEventApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual DataReplicationEventData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Gets the details of the event. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/events/{eventName} + /// + /// + /// Operation Id + /// EventModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _dataReplicationEventEventClientDiagnostics.CreateScope("DataReplicationEventResource.Get"); + scope.Start(); + try + { + var response = await _dataReplicationEventEventRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DataReplicationEventResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the event. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/events/{eventName} + /// + /// + /// Operation Id + /// EventModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _dataReplicationEventEventClientDiagnostics.CreateScope("DataReplicationEventResource.Get"); + scope.Start(); + try + { + var response = _dataReplicationEventEventRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DataReplicationEventResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationExtensionCollection.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationExtensionCollection.cs new file mode 100644 index 000000000000..de79586a9ba3 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationExtensionCollection.cs @@ -0,0 +1,493 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetDataReplicationExtensions method from an instance of . + /// + public partial class DataReplicationExtensionCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _dataReplicationExtensionReplicationExtensionClientDiagnostics; + private readonly ReplicationExtensionRestOperations _dataReplicationExtensionReplicationExtensionRestClient; + + /// Initializes a new instance of the class for mocking. + protected DataReplicationExtensionCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal DataReplicationExtensionCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _dataReplicationExtensionReplicationExtensionClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", DataReplicationExtensionResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DataReplicationExtensionResource.ResourceType, out string dataReplicationExtensionReplicationExtensionApiVersion); + _dataReplicationExtensionReplicationExtensionRestClient = new ReplicationExtensionRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataReplicationExtensionReplicationExtensionApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != DataReplicationVaultResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, DataReplicationVaultResource.ResourceType), nameof(id)); + } + + /// + /// Creates the replication extension in the given vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationExtensions/{replicationExtensionName} + /// + /// + /// Operation Id + /// ReplicationExtensionModel_Create + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The replication extension name. + /// Replication extension model. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string replicationExtensionName, DataReplicationExtensionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(replicationExtensionName, nameof(replicationExtensionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _dataReplicationExtensionReplicationExtensionClientDiagnostics.CreateScope("DataReplicationExtensionCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _dataReplicationExtensionReplicationExtensionRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, replicationExtensionName, data, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(new DataReplicationExtensionOperationSource(Client), _dataReplicationExtensionReplicationExtensionClientDiagnostics, Pipeline, _dataReplicationExtensionReplicationExtensionRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, replicationExtensionName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates the replication extension in the given vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationExtensions/{replicationExtensionName} + /// + /// + /// Operation Id + /// ReplicationExtensionModel_Create + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The replication extension name. + /// Replication extension model. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string replicationExtensionName, DataReplicationExtensionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(replicationExtensionName, nameof(replicationExtensionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _dataReplicationExtensionReplicationExtensionClientDiagnostics.CreateScope("DataReplicationExtensionCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _dataReplicationExtensionReplicationExtensionRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, replicationExtensionName, data, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(new DataReplicationExtensionOperationSource(Client), _dataReplicationExtensionReplicationExtensionClientDiagnostics, Pipeline, _dataReplicationExtensionReplicationExtensionRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, replicationExtensionName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the replication extension. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationExtensions/{replicationExtensionName} + /// + /// + /// Operation Id + /// ReplicationExtensionModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The replication extension name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string replicationExtensionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(replicationExtensionName, nameof(replicationExtensionName)); + + using var scope = _dataReplicationExtensionReplicationExtensionClientDiagnostics.CreateScope("DataReplicationExtensionCollection.Get"); + scope.Start(); + try + { + var response = await _dataReplicationExtensionReplicationExtensionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, replicationExtensionName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DataReplicationExtensionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the replication extension. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationExtensions/{replicationExtensionName} + /// + /// + /// Operation Id + /// ReplicationExtensionModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The replication extension name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string replicationExtensionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(replicationExtensionName, nameof(replicationExtensionName)); + + using var scope = _dataReplicationExtensionReplicationExtensionClientDiagnostics.CreateScope("DataReplicationExtensionCollection.Get"); + scope.Start(); + try + { + var response = _dataReplicationExtensionReplicationExtensionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, replicationExtensionName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DataReplicationExtensionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the list of replication extensions in the given vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationExtensions + /// + /// + /// Operation Id + /// ReplicationExtensionModel_List + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _dataReplicationExtensionReplicationExtensionRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataReplicationExtensionReplicationExtensionRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DataReplicationExtensionResource(Client, DataReplicationExtensionData.DeserializeDataReplicationExtensionData(e)), _dataReplicationExtensionReplicationExtensionClientDiagnostics, Pipeline, "DataReplicationExtensionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Gets the list of replication extensions in the given vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationExtensions + /// + /// + /// Operation Id + /// ReplicationExtensionModel_List + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _dataReplicationExtensionReplicationExtensionRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataReplicationExtensionReplicationExtensionRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DataReplicationExtensionResource(Client, DataReplicationExtensionData.DeserializeDataReplicationExtensionData(e)), _dataReplicationExtensionReplicationExtensionClientDiagnostics, Pipeline, "DataReplicationExtensionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationExtensions/{replicationExtensionName} + /// + /// + /// Operation Id + /// ReplicationExtensionModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The replication extension name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string replicationExtensionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(replicationExtensionName, nameof(replicationExtensionName)); + + using var scope = _dataReplicationExtensionReplicationExtensionClientDiagnostics.CreateScope("DataReplicationExtensionCollection.Exists"); + scope.Start(); + try + { + var response = await _dataReplicationExtensionReplicationExtensionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, replicationExtensionName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationExtensions/{replicationExtensionName} + /// + /// + /// Operation Id + /// ReplicationExtensionModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The replication extension name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string replicationExtensionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(replicationExtensionName, nameof(replicationExtensionName)); + + using var scope = _dataReplicationExtensionReplicationExtensionClientDiagnostics.CreateScope("DataReplicationExtensionCollection.Exists"); + scope.Start(); + try + { + var response = _dataReplicationExtensionReplicationExtensionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, replicationExtensionName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationExtensions/{replicationExtensionName} + /// + /// + /// Operation Id + /// ReplicationExtensionModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The replication extension name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string replicationExtensionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(replicationExtensionName, nameof(replicationExtensionName)); + + using var scope = _dataReplicationExtensionReplicationExtensionClientDiagnostics.CreateScope("DataReplicationExtensionCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _dataReplicationExtensionReplicationExtensionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, replicationExtensionName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DataReplicationExtensionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationExtensions/{replicationExtensionName} + /// + /// + /// Operation Id + /// ReplicationExtensionModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The replication extension name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string replicationExtensionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(replicationExtensionName, nameof(replicationExtensionName)); + + using var scope = _dataReplicationExtensionReplicationExtensionClientDiagnostics.CreateScope("DataReplicationExtensionCollection.GetIfExists"); + scope.Start(); + try + { + var response = _dataReplicationExtensionReplicationExtensionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, replicationExtensionName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DataReplicationExtensionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationExtensionData.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationExtensionData.Serialization.cs new file mode 100644 index 000000000000..8a2800af8fd1 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationExtensionData.Serialization.cs @@ -0,0 +1,155 @@ +// 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.Models; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + public partial class DataReplicationExtensionData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationExtensionData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + DataReplicationExtensionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationExtensionData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataReplicationExtensionData(document.RootElement, options); + } + + internal static DataReplicationExtensionData DeserializeDataReplicationExtensionData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DataReplicationExtensionProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = DataReplicationExtensionProperties.DeserializeDataReplicationExtensionProperties(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DataReplicationExtensionData( + id, + name, + type, + systemData, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DataReplicationExtensionData)} does not support writing '{options.Format}' format."); + } + } + + DataReplicationExtensionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataReplicationExtensionData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataReplicationExtensionData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationExtensionData.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationExtensionData.cs new file mode 100644 index 000000000000..9545a0ca87b9 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationExtensionData.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + /// + /// A class representing the DataReplicationExtension data model. + /// Replication extension model. + /// + public partial class DataReplicationExtensionData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DataReplicationExtensionData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal DataReplicationExtensionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DataReplicationExtensionProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public DataReplicationExtensionProperties Properties { get; set; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationExtensionResource.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationExtensionResource.Serialization.cs new file mode 100644 index 000000000000..24f19c3a833a --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationExtensionResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + public partial class DataReplicationExtensionResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + DataReplicationExtensionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + DataReplicationExtensionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationExtensionResource.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationExtensionResource.cs new file mode 100644 index 000000000000..3f20dcf023be --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationExtensionResource.cs @@ -0,0 +1,347 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + /// + /// A Class representing a DataReplicationExtension along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetDataReplicationExtensionResource method. + /// Otherwise you can get one from its parent resource using the GetDataReplicationExtension method. + /// + public partial class DataReplicationExtensionResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The vaultName. + /// The replicationExtensionName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string vaultName, string replicationExtensionName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationExtensions/{replicationExtensionName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _dataReplicationExtensionReplicationExtensionClientDiagnostics; + private readonly ReplicationExtensionRestOperations _dataReplicationExtensionReplicationExtensionRestClient; + private readonly DataReplicationExtensionData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.DataReplication/replicationVaults/replicationExtensions"; + + /// Initializes a new instance of the class for mocking. + protected DataReplicationExtensionResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal DataReplicationExtensionResource(ArmClient client, DataReplicationExtensionData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal DataReplicationExtensionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _dataReplicationExtensionReplicationExtensionClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string dataReplicationExtensionReplicationExtensionApiVersion); + _dataReplicationExtensionReplicationExtensionRestClient = new ReplicationExtensionRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataReplicationExtensionReplicationExtensionApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual DataReplicationExtensionData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Gets the details of the replication extension. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationExtensions/{replicationExtensionName} + /// + /// + /// Operation Id + /// ReplicationExtensionModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _dataReplicationExtensionReplicationExtensionClientDiagnostics.CreateScope("DataReplicationExtensionResource.Get"); + scope.Start(); + try + { + var response = await _dataReplicationExtensionReplicationExtensionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DataReplicationExtensionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the replication extension. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationExtensions/{replicationExtensionName} + /// + /// + /// Operation Id + /// ReplicationExtensionModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _dataReplicationExtensionReplicationExtensionClientDiagnostics.CreateScope("DataReplicationExtensionResource.Get"); + scope.Start(); + try + { + var response = _dataReplicationExtensionReplicationExtensionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DataReplicationExtensionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes the replication extension in the given vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationExtensions/{replicationExtensionName} + /// + /// + /// Operation Id + /// ReplicationExtensionModel_Delete + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _dataReplicationExtensionReplicationExtensionClientDiagnostics.CreateScope("DataReplicationExtensionResource.Delete"); + scope.Start(); + try + { + var response = await _dataReplicationExtensionReplicationExtensionRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(_dataReplicationExtensionReplicationExtensionClientDiagnostics, Pipeline, _dataReplicationExtensionReplicationExtensionRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes the replication extension in the given vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationExtensions/{replicationExtensionName} + /// + /// + /// Operation Id + /// ReplicationExtensionModel_Delete + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _dataReplicationExtensionReplicationExtensionClientDiagnostics.CreateScope("DataReplicationExtensionResource.Delete"); + scope.Start(); + try + { + var response = _dataReplicationExtensionReplicationExtensionRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(_dataReplicationExtensionReplicationExtensionClientDiagnostics, Pipeline, _dataReplicationExtensionReplicationExtensionRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates the replication extension in the given vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationExtensions/{replicationExtensionName} + /// + /// + /// Operation Id + /// ReplicationExtensionModel_Create + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// 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. + /// Replication extension model. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, DataReplicationExtensionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _dataReplicationExtensionReplicationExtensionClientDiagnostics.CreateScope("DataReplicationExtensionResource.Update"); + scope.Start(); + try + { + var response = await _dataReplicationExtensionReplicationExtensionRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(new DataReplicationExtensionOperationSource(Client), _dataReplicationExtensionReplicationExtensionClientDiagnostics, Pipeline, _dataReplicationExtensionReplicationExtensionRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates the replication extension in the given vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationExtensions/{replicationExtensionName} + /// + /// + /// Operation Id + /// ReplicationExtensionModel_Create + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// 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. + /// Replication extension model. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, DataReplicationExtensionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _dataReplicationExtensionReplicationExtensionClientDiagnostics.CreateScope("DataReplicationExtensionResource.Update"); + scope.Start(); + try + { + var response = _dataReplicationExtensionReplicationExtensionRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(new DataReplicationExtensionOperationSource(Client), _dataReplicationExtensionReplicationExtensionClientDiagnostics, Pipeline, _dataReplicationExtensionReplicationExtensionRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationFabricAgentCollection.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationFabricAgentCollection.cs new file mode 100644 index 000000000000..03d6314fd129 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationFabricAgentCollection.cs @@ -0,0 +1,493 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetDataReplicationFabricAgents method from an instance of . + /// + public partial class DataReplicationFabricAgentCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _dataReplicationFabricAgentFabricAgentClientDiagnostics; + private readonly FabricAgentRestOperations _dataReplicationFabricAgentFabricAgentRestClient; + + /// Initializes a new instance of the class for mocking. + protected DataReplicationFabricAgentCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal DataReplicationFabricAgentCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _dataReplicationFabricAgentFabricAgentClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", DataReplicationFabricAgentResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DataReplicationFabricAgentResource.ResourceType, out string dataReplicationFabricAgentFabricAgentApiVersion); + _dataReplicationFabricAgentFabricAgentRestClient = new FabricAgentRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataReplicationFabricAgentFabricAgentApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != DataReplicationFabricResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, DataReplicationFabricResource.ResourceType), nameof(id)); + } + + /// + /// Creates the fabric agent. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{fabricAgentName} + /// + /// + /// Operation Id + /// FabricAgentModel_Create + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The fabric agent name. + /// Fabric agent model. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string fabricAgentName, DataReplicationFabricAgentData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(fabricAgentName, nameof(fabricAgentName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _dataReplicationFabricAgentFabricAgentClientDiagnostics.CreateScope("DataReplicationFabricAgentCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _dataReplicationFabricAgentFabricAgentRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fabricAgentName, data, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(new DataReplicationFabricAgentOperationSource(Client), _dataReplicationFabricAgentFabricAgentClientDiagnostics, Pipeline, _dataReplicationFabricAgentFabricAgentRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fabricAgentName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates the fabric agent. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{fabricAgentName} + /// + /// + /// Operation Id + /// FabricAgentModel_Create + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The fabric agent name. + /// Fabric agent model. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string fabricAgentName, DataReplicationFabricAgentData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(fabricAgentName, nameof(fabricAgentName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _dataReplicationFabricAgentFabricAgentClientDiagnostics.CreateScope("DataReplicationFabricAgentCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _dataReplicationFabricAgentFabricAgentRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fabricAgentName, data, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(new DataReplicationFabricAgentOperationSource(Client), _dataReplicationFabricAgentFabricAgentClientDiagnostics, Pipeline, _dataReplicationFabricAgentFabricAgentRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fabricAgentName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the fabric agent. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{fabricAgentName} + /// + /// + /// Operation Id + /// FabricAgentModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The fabric agent name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string fabricAgentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(fabricAgentName, nameof(fabricAgentName)); + + using var scope = _dataReplicationFabricAgentFabricAgentClientDiagnostics.CreateScope("DataReplicationFabricAgentCollection.Get"); + scope.Start(); + try + { + var response = await _dataReplicationFabricAgentFabricAgentRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fabricAgentName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DataReplicationFabricAgentResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the fabric agent. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{fabricAgentName} + /// + /// + /// Operation Id + /// FabricAgentModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The fabric agent name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string fabricAgentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(fabricAgentName, nameof(fabricAgentName)); + + using var scope = _dataReplicationFabricAgentFabricAgentClientDiagnostics.CreateScope("DataReplicationFabricAgentCollection.Get"); + scope.Start(); + try + { + var response = _dataReplicationFabricAgentFabricAgentRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fabricAgentName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DataReplicationFabricAgentResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the list of fabric agents in the given fabric. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents + /// + /// + /// Operation Id + /// FabricAgentModel_List + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _dataReplicationFabricAgentFabricAgentRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataReplicationFabricAgentFabricAgentRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DataReplicationFabricAgentResource(Client, DataReplicationFabricAgentData.DeserializeDataReplicationFabricAgentData(e)), _dataReplicationFabricAgentFabricAgentClientDiagnostics, Pipeline, "DataReplicationFabricAgentCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Gets the list of fabric agents in the given fabric. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents + /// + /// + /// Operation Id + /// FabricAgentModel_List + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _dataReplicationFabricAgentFabricAgentRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataReplicationFabricAgentFabricAgentRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DataReplicationFabricAgentResource(Client, DataReplicationFabricAgentData.DeserializeDataReplicationFabricAgentData(e)), _dataReplicationFabricAgentFabricAgentClientDiagnostics, Pipeline, "DataReplicationFabricAgentCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{fabricAgentName} + /// + /// + /// Operation Id + /// FabricAgentModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The fabric agent name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string fabricAgentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(fabricAgentName, nameof(fabricAgentName)); + + using var scope = _dataReplicationFabricAgentFabricAgentClientDiagnostics.CreateScope("DataReplicationFabricAgentCollection.Exists"); + scope.Start(); + try + { + var response = await _dataReplicationFabricAgentFabricAgentRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fabricAgentName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{fabricAgentName} + /// + /// + /// Operation Id + /// FabricAgentModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The fabric agent name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string fabricAgentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(fabricAgentName, nameof(fabricAgentName)); + + using var scope = _dataReplicationFabricAgentFabricAgentClientDiagnostics.CreateScope("DataReplicationFabricAgentCollection.Exists"); + scope.Start(); + try + { + var response = _dataReplicationFabricAgentFabricAgentRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fabricAgentName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{fabricAgentName} + /// + /// + /// Operation Id + /// FabricAgentModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The fabric agent name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string fabricAgentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(fabricAgentName, nameof(fabricAgentName)); + + using var scope = _dataReplicationFabricAgentFabricAgentClientDiagnostics.CreateScope("DataReplicationFabricAgentCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _dataReplicationFabricAgentFabricAgentRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fabricAgentName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DataReplicationFabricAgentResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{fabricAgentName} + /// + /// + /// Operation Id + /// FabricAgentModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The fabric agent name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string fabricAgentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(fabricAgentName, nameof(fabricAgentName)); + + using var scope = _dataReplicationFabricAgentFabricAgentClientDiagnostics.CreateScope("DataReplicationFabricAgentCollection.GetIfExists"); + scope.Start(); + try + { + var response = _dataReplicationFabricAgentFabricAgentRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, fabricAgentName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DataReplicationFabricAgentResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationFabricAgentData.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationFabricAgentData.Serialization.cs new file mode 100644 index 000000000000..e6ca06e88a9b --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationFabricAgentData.Serialization.cs @@ -0,0 +1,155 @@ +// 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.Models; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + public partial class DataReplicationFabricAgentData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationFabricAgentData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + DataReplicationFabricAgentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationFabricAgentData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataReplicationFabricAgentData(document.RootElement, options); + } + + internal static DataReplicationFabricAgentData DeserializeDataReplicationFabricAgentData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DataReplicationFabricAgentProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = DataReplicationFabricAgentProperties.DeserializeDataReplicationFabricAgentProperties(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DataReplicationFabricAgentData( + id, + name, + type, + systemData, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DataReplicationFabricAgentData)} does not support writing '{options.Format}' format."); + } + } + + DataReplicationFabricAgentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataReplicationFabricAgentData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataReplicationFabricAgentData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationFabricAgentData.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationFabricAgentData.cs new file mode 100644 index 000000000000..f8d327a26466 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationFabricAgentData.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + /// + /// A class representing the DataReplicationFabricAgent data model. + /// Fabric agent model. + /// + public partial class DataReplicationFabricAgentData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DataReplicationFabricAgentData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal DataReplicationFabricAgentData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DataReplicationFabricAgentProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public DataReplicationFabricAgentProperties Properties { get; set; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationFabricAgentResource.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationFabricAgentResource.Serialization.cs new file mode 100644 index 000000000000..3b2f408ad25e --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationFabricAgentResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + public partial class DataReplicationFabricAgentResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + DataReplicationFabricAgentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + DataReplicationFabricAgentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationFabricAgentResource.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationFabricAgentResource.cs new file mode 100644 index 000000000000..4f3e4be113ea --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationFabricAgentResource.cs @@ -0,0 +1,347 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + /// + /// A Class representing a DataReplicationFabricAgent along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetDataReplicationFabricAgentResource method. + /// Otherwise you can get one from its parent resource using the GetDataReplicationFabricAgent method. + /// + public partial class DataReplicationFabricAgentResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The fabricName. + /// The fabricAgentName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string fabricName, string fabricAgentName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{fabricAgentName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _dataReplicationFabricAgentFabricAgentClientDiagnostics; + private readonly FabricAgentRestOperations _dataReplicationFabricAgentFabricAgentRestClient; + private readonly DataReplicationFabricAgentData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.DataReplication/replicationFabrics/fabricAgents"; + + /// Initializes a new instance of the class for mocking. + protected DataReplicationFabricAgentResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal DataReplicationFabricAgentResource(ArmClient client, DataReplicationFabricAgentData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal DataReplicationFabricAgentResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _dataReplicationFabricAgentFabricAgentClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string dataReplicationFabricAgentFabricAgentApiVersion); + _dataReplicationFabricAgentFabricAgentRestClient = new FabricAgentRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataReplicationFabricAgentFabricAgentApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual DataReplicationFabricAgentData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Gets the details of the fabric agent. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{fabricAgentName} + /// + /// + /// Operation Id + /// FabricAgentModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _dataReplicationFabricAgentFabricAgentClientDiagnostics.CreateScope("DataReplicationFabricAgentResource.Get"); + scope.Start(); + try + { + var response = await _dataReplicationFabricAgentFabricAgentRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DataReplicationFabricAgentResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the fabric agent. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{fabricAgentName} + /// + /// + /// Operation Id + /// FabricAgentModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _dataReplicationFabricAgentFabricAgentClientDiagnostics.CreateScope("DataReplicationFabricAgentResource.Get"); + scope.Start(); + try + { + var response = _dataReplicationFabricAgentFabricAgentRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DataReplicationFabricAgentResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes fabric agent. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{fabricAgentName} + /// + /// + /// Operation Id + /// FabricAgentModel_Delete + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _dataReplicationFabricAgentFabricAgentClientDiagnostics.CreateScope("DataReplicationFabricAgentResource.Delete"); + scope.Start(); + try + { + var response = await _dataReplicationFabricAgentFabricAgentRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(_dataReplicationFabricAgentFabricAgentClientDiagnostics, Pipeline, _dataReplicationFabricAgentFabricAgentRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes fabric agent. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{fabricAgentName} + /// + /// + /// Operation Id + /// FabricAgentModel_Delete + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _dataReplicationFabricAgentFabricAgentClientDiagnostics.CreateScope("DataReplicationFabricAgentResource.Delete"); + scope.Start(); + try + { + var response = _dataReplicationFabricAgentFabricAgentRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(_dataReplicationFabricAgentFabricAgentClientDiagnostics, Pipeline, _dataReplicationFabricAgentFabricAgentRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates the fabric agent. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{fabricAgentName} + /// + /// + /// Operation Id + /// FabricAgentModel_Create + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// 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. + /// Fabric agent model. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, DataReplicationFabricAgentData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _dataReplicationFabricAgentFabricAgentClientDiagnostics.CreateScope("DataReplicationFabricAgentResource.Update"); + scope.Start(); + try + { + var response = await _dataReplicationFabricAgentFabricAgentRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(new DataReplicationFabricAgentOperationSource(Client), _dataReplicationFabricAgentFabricAgentClientDiagnostics, Pipeline, _dataReplicationFabricAgentFabricAgentRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates the fabric agent. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{fabricAgentName} + /// + /// + /// Operation Id + /// FabricAgentModel_Create + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// 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. + /// Fabric agent model. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, DataReplicationFabricAgentData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _dataReplicationFabricAgentFabricAgentClientDiagnostics.CreateScope("DataReplicationFabricAgentResource.Update"); + scope.Start(); + try + { + var response = _dataReplicationFabricAgentFabricAgentRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(new DataReplicationFabricAgentOperationSource(Client), _dataReplicationFabricAgentFabricAgentClientDiagnostics, Pipeline, _dataReplicationFabricAgentFabricAgentRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationFabricCollection.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationFabricCollection.cs new file mode 100644 index 000000000000..1a7c875c1bf4 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationFabricCollection.cs @@ -0,0 +1,496 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetDataReplicationFabrics method from an instance of . + /// + public partial class DataReplicationFabricCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _dataReplicationFabricFabricClientDiagnostics; + private readonly FabricRestOperations _dataReplicationFabricFabricRestClient; + + /// Initializes a new instance of the class for mocking. + protected DataReplicationFabricCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal DataReplicationFabricCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _dataReplicationFabricFabricClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", DataReplicationFabricResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DataReplicationFabricResource.ResourceType, out string dataReplicationFabricFabricApiVersion); + _dataReplicationFabricFabricRestClient = new FabricRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataReplicationFabricFabricApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceGroupResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceGroupResource.ResourceType), nameof(id)); + } + + /// + /// Creates the fabric. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName} + /// + /// + /// Operation Id + /// FabricModel_Create + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The fabric name. + /// Fabric properties. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string fabricName, DataReplicationFabricData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(fabricName, nameof(fabricName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _dataReplicationFabricFabricClientDiagnostics.CreateScope("DataReplicationFabricCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _dataReplicationFabricFabricRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, fabricName, data, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(new DataReplicationFabricOperationSource(Client), _dataReplicationFabricFabricClientDiagnostics, Pipeline, _dataReplicationFabricFabricRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, fabricName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates the fabric. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName} + /// + /// + /// Operation Id + /// FabricModel_Create + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The fabric name. + /// Fabric properties. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string fabricName, DataReplicationFabricData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(fabricName, nameof(fabricName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _dataReplicationFabricFabricClientDiagnostics.CreateScope("DataReplicationFabricCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _dataReplicationFabricFabricRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, fabricName, data, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(new DataReplicationFabricOperationSource(Client), _dataReplicationFabricFabricClientDiagnostics, Pipeline, _dataReplicationFabricFabricRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, fabricName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the fabric. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName} + /// + /// + /// Operation Id + /// FabricModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The fabric name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string fabricName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(fabricName, nameof(fabricName)); + + using var scope = _dataReplicationFabricFabricClientDiagnostics.CreateScope("DataReplicationFabricCollection.Get"); + scope.Start(); + try + { + var response = await _dataReplicationFabricFabricRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, fabricName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DataReplicationFabricResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the fabric. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName} + /// + /// + /// Operation Id + /// FabricModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The fabric name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string fabricName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(fabricName, nameof(fabricName)); + + using var scope = _dataReplicationFabricFabricClientDiagnostics.CreateScope("DataReplicationFabricCollection.Get"); + scope.Start(); + try + { + var response = _dataReplicationFabricFabricRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, fabricName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DataReplicationFabricResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the list of fabrics in the given subscription and resource group. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics + /// + /// + /// Operation Id + /// FabricModel_List + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Continuation token from the previous call. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(string continuationToken = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _dataReplicationFabricFabricRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, continuationToken); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataReplicationFabricFabricRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, continuationToken); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DataReplicationFabricResource(Client, DataReplicationFabricData.DeserializeDataReplicationFabricData(e)), _dataReplicationFabricFabricClientDiagnostics, Pipeline, "DataReplicationFabricCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Gets the list of fabrics in the given subscription and resource group. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics + /// + /// + /// Operation Id + /// FabricModel_List + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Continuation token from the previous call. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(string continuationToken = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _dataReplicationFabricFabricRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, continuationToken); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataReplicationFabricFabricRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, continuationToken); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DataReplicationFabricResource(Client, DataReplicationFabricData.DeserializeDataReplicationFabricData(e)), _dataReplicationFabricFabricClientDiagnostics, Pipeline, "DataReplicationFabricCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName} + /// + /// + /// Operation Id + /// FabricModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The fabric name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string fabricName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(fabricName, nameof(fabricName)); + + using var scope = _dataReplicationFabricFabricClientDiagnostics.CreateScope("DataReplicationFabricCollection.Exists"); + scope.Start(); + try + { + var response = await _dataReplicationFabricFabricRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, fabricName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName} + /// + /// + /// Operation Id + /// FabricModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The fabric name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string fabricName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(fabricName, nameof(fabricName)); + + using var scope = _dataReplicationFabricFabricClientDiagnostics.CreateScope("DataReplicationFabricCollection.Exists"); + scope.Start(); + try + { + var response = _dataReplicationFabricFabricRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, fabricName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName} + /// + /// + /// Operation Id + /// FabricModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The fabric name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string fabricName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(fabricName, nameof(fabricName)); + + using var scope = _dataReplicationFabricFabricClientDiagnostics.CreateScope("DataReplicationFabricCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _dataReplicationFabricFabricRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, fabricName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DataReplicationFabricResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName} + /// + /// + /// Operation Id + /// FabricModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The fabric name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string fabricName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(fabricName, nameof(fabricName)); + + using var scope = _dataReplicationFabricFabricClientDiagnostics.CreateScope("DataReplicationFabricCollection.GetIfExists"); + scope.Start(); + try + { + var response = _dataReplicationFabricFabricRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, fabricName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DataReplicationFabricResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationFabricData.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationFabricData.Serialization.cs new file mode 100644 index 000000000000..4d8cc742286c --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationFabricData.Serialization.cs @@ -0,0 +1,178 @@ +// 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.Models; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + public partial class DataReplicationFabricData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationFabricData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + DataReplicationFabricData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationFabricData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataReplicationFabricData(document.RootElement, options); + } + + internal static DataReplicationFabricData DeserializeDataReplicationFabricData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DataReplicationFabricProperties properties = default; + IDictionary tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = DataReplicationFabricProperties.DeserializeDataReplicationFabricProperties(property.Value, options); + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("location"u8)) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DataReplicationFabricData( + id, + name, + type, + systemData, + tags ?? new ChangeTrackingDictionary(), + location, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DataReplicationFabricData)} does not support writing '{options.Format}' format."); + } + } + + DataReplicationFabricData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataReplicationFabricData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataReplicationFabricData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationFabricData.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationFabricData.cs new file mode 100644 index 000000000000..7dd748dd5e0e --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationFabricData.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + /// + /// A class representing the DataReplicationFabric data model. + /// Fabric model. + /// + public partial class DataReplicationFabricData : TrackedResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The location. + public DataReplicationFabricData(AzureLocation location) : base(location) + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal DataReplicationFabricData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, DataReplicationFabricProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DataReplicationFabricData() + { + } + + /// The resource-specific properties for this resource. + public DataReplicationFabricProperties Properties { get; set; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationFabricResource.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationFabricResource.Serialization.cs new file mode 100644 index 000000000000..ac1bd6f4517e --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationFabricResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + public partial class DataReplicationFabricResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + DataReplicationFabricData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + DataReplicationFabricData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationFabricResource.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationFabricResource.cs new file mode 100644 index 000000000000..9f7c3ca2318e --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationFabricResource.cs @@ -0,0 +1,776 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + /// + /// A Class representing a DataReplicationFabric along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetDataReplicationFabricResource method. + /// Otherwise you can get one from its parent resource using the GetDataReplicationFabric method. + /// + public partial class DataReplicationFabricResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The fabricName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string fabricName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _dataReplicationFabricFabricClientDiagnostics; + private readonly FabricRestOperations _dataReplicationFabricFabricRestClient; + private readonly DataReplicationFabricData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.DataReplication/replicationFabrics"; + + /// Initializes a new instance of the class for mocking. + protected DataReplicationFabricResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal DataReplicationFabricResource(ArmClient client, DataReplicationFabricData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal DataReplicationFabricResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _dataReplicationFabricFabricClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string dataReplicationFabricFabricApiVersion); + _dataReplicationFabricFabricRestClient = new FabricRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataReplicationFabricFabricApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual DataReplicationFabricData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// Gets a collection of DataReplicationFabricAgentResources in the DataReplicationFabric. + /// An object representing collection of DataReplicationFabricAgentResources and their operations over a DataReplicationFabricAgentResource. + public virtual DataReplicationFabricAgentCollection GetDataReplicationFabricAgents() + { + return GetCachedClient(client => new DataReplicationFabricAgentCollection(client, Id)); + } + + /// + /// Gets the details of the fabric agent. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{fabricAgentName} + /// + /// + /// Operation Id + /// FabricAgentModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The fabric agent name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetDataReplicationFabricAgentAsync(string fabricAgentName, CancellationToken cancellationToken = default) + { + return await GetDataReplicationFabricAgents().GetAsync(fabricAgentName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the details of the fabric agent. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName}/fabricAgents/{fabricAgentName} + /// + /// + /// Operation Id + /// FabricAgentModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The fabric agent name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetDataReplicationFabricAgent(string fabricAgentName, CancellationToken cancellationToken = default) + { + return GetDataReplicationFabricAgents().Get(fabricAgentName, cancellationToken); + } + + /// + /// Gets the details of the fabric. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName} + /// + /// + /// Operation Id + /// FabricModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _dataReplicationFabricFabricClientDiagnostics.CreateScope("DataReplicationFabricResource.Get"); + scope.Start(); + try + { + var response = await _dataReplicationFabricFabricRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DataReplicationFabricResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the fabric. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName} + /// + /// + /// Operation Id + /// FabricModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _dataReplicationFabricFabricClientDiagnostics.CreateScope("DataReplicationFabricResource.Get"); + scope.Start(); + try + { + var response = _dataReplicationFabricFabricRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DataReplicationFabricResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes the fabric. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName} + /// + /// + /// Operation Id + /// FabricModel_Delete + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _dataReplicationFabricFabricClientDiagnostics.CreateScope("DataReplicationFabricResource.Delete"); + scope.Start(); + try + { + var response = await _dataReplicationFabricFabricRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(_dataReplicationFabricFabricClientDiagnostics, Pipeline, _dataReplicationFabricFabricRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes the fabric. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName} + /// + /// + /// Operation Id + /// FabricModel_Delete + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _dataReplicationFabricFabricClientDiagnostics.CreateScope("DataReplicationFabricResource.Delete"); + scope.Start(); + try + { + var response = _dataReplicationFabricFabricRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(_dataReplicationFabricFabricClientDiagnostics, Pipeline, _dataReplicationFabricFabricRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Performs update on the fabric. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName} + /// + /// + /// Operation Id + /// FabricModel_Update + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// 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. + /// Fabric properties. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, DataReplicationFabricPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _dataReplicationFabricFabricClientDiagnostics.CreateScope("DataReplicationFabricResource.Update"); + scope.Start(); + try + { + var response = await _dataReplicationFabricFabricRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(new DataReplicationFabricOperationSource(Client), _dataReplicationFabricFabricClientDiagnostics, Pipeline, _dataReplicationFabricFabricRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Performs update on the fabric. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName} + /// + /// + /// Operation Id + /// FabricModel_Update + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// 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. + /// Fabric properties. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, DataReplicationFabricPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _dataReplicationFabricFabricClientDiagnostics.CreateScope("DataReplicationFabricResource.Update"); + scope.Start(); + try + { + var response = _dataReplicationFabricFabricRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(new DataReplicationFabricOperationSource(Client), _dataReplicationFabricFabricClientDiagnostics, Pipeline, _dataReplicationFabricFabricRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName} + /// + /// + /// Operation Id + /// FabricModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _dataReplicationFabricFabricClientDiagnostics.CreateScope("DataReplicationFabricResource.AddTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues[key] = value; + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _dataReplicationFabricFabricRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new DataReplicationFabricResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new DataReplicationFabricPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName} + /// + /// + /// Operation Id + /// FabricModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _dataReplicationFabricFabricClientDiagnostics.CreateScope("DataReplicationFabricResource.AddTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues[key] = value; + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _dataReplicationFabricFabricRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new DataReplicationFabricResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new DataReplicationFabricPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName} + /// + /// + /// Operation Id + /// FabricModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _dataReplicationFabricFabricClientDiagnostics.CreateScope("DataReplicationFabricResource.SetTags"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _dataReplicationFabricFabricRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new DataReplicationFabricResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new DataReplicationFabricPatch(); + patch.Tags.ReplaceWith(tags); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName} + /// + /// + /// Operation Id + /// FabricModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _dataReplicationFabricFabricClientDiagnostics.CreateScope("DataReplicationFabricResource.SetTags"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _dataReplicationFabricFabricRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new DataReplicationFabricResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new DataReplicationFabricPatch(); + patch.Tags.ReplaceWith(tags); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName} + /// + /// + /// Operation Id + /// FabricModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _dataReplicationFabricFabricClientDiagnostics.CreateScope("DataReplicationFabricResource.RemoveTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.Remove(key); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _dataReplicationFabricFabricRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new DataReplicationFabricResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new DataReplicationFabricPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName} + /// + /// + /// Operation Id + /// FabricModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _dataReplicationFabricFabricClientDiagnostics.CreateScope("DataReplicationFabricResource.RemoveTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.Remove(key); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _dataReplicationFabricFabricRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new DataReplicationFabricResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new DataReplicationFabricPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationJobCollection.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationJobCollection.cs new file mode 100644 index 000000000000..9882bcf22856 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationJobCollection.cs @@ -0,0 +1,401 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetDataReplicationJobs method from an instance of . + /// + public partial class DataReplicationJobCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _dataReplicationJobJobClientDiagnostics; + private readonly JobRestOperations _dataReplicationJobJobRestClient; + + /// Initializes a new instance of the class for mocking. + protected DataReplicationJobCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal DataReplicationJobCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _dataReplicationJobJobClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", DataReplicationJobResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DataReplicationJobResource.ResourceType, out string dataReplicationJobJobApiVersion); + _dataReplicationJobJobRestClient = new JobRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataReplicationJobJobApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != DataReplicationVaultResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, DataReplicationVaultResource.ResourceType), nameof(id)); + } + + /// + /// Gets the details of the job. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/jobs/{jobName} + /// + /// + /// Operation Id + /// JobModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The job name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string jobName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); + + using var scope = _dataReplicationJobJobClientDiagnostics.CreateScope("DataReplicationJobCollection.Get"); + scope.Start(); + try + { + var response = await _dataReplicationJobJobRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, jobName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DataReplicationJobResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the job. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/jobs/{jobName} + /// + /// + /// Operation Id + /// JobModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The job name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string jobName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); + + using var scope = _dataReplicationJobJobClientDiagnostics.CreateScope("DataReplicationJobCollection.Get"); + scope.Start(); + try + { + var response = _dataReplicationJobJobRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, jobName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DataReplicationJobResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the list of jobs in the given vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/jobs + /// + /// + /// Operation Id + /// JobModel_List + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// OData options. + /// Continuation token. + /// Page size. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(string odataOptions = null, string continuationToken = null, int? pageSize = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _dataReplicationJobJobRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, odataOptions, continuationToken, pageSizeHint); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataReplicationJobJobRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, odataOptions, continuationToken, pageSizeHint); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DataReplicationJobResource(Client, DataReplicationJobData.DeserializeDataReplicationJobData(e)), _dataReplicationJobJobClientDiagnostics, Pipeline, "DataReplicationJobCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Gets the list of jobs in the given vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/jobs + /// + /// + /// Operation Id + /// JobModel_List + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// OData options. + /// Continuation token. + /// Page size. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(string odataOptions = null, string continuationToken = null, int? pageSize = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _dataReplicationJobJobRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, odataOptions, continuationToken, pageSizeHint); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataReplicationJobJobRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, odataOptions, continuationToken, pageSizeHint); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DataReplicationJobResource(Client, DataReplicationJobData.DeserializeDataReplicationJobData(e)), _dataReplicationJobJobClientDiagnostics, Pipeline, "DataReplicationJobCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/jobs/{jobName} + /// + /// + /// Operation Id + /// JobModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The job name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string jobName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); + + using var scope = _dataReplicationJobJobClientDiagnostics.CreateScope("DataReplicationJobCollection.Exists"); + scope.Start(); + try + { + var response = await _dataReplicationJobJobRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, jobName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/jobs/{jobName} + /// + /// + /// Operation Id + /// JobModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The job name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string jobName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); + + using var scope = _dataReplicationJobJobClientDiagnostics.CreateScope("DataReplicationJobCollection.Exists"); + scope.Start(); + try + { + var response = _dataReplicationJobJobRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, jobName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/jobs/{jobName} + /// + /// + /// Operation Id + /// JobModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The job name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string jobName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); + + using var scope = _dataReplicationJobJobClientDiagnostics.CreateScope("DataReplicationJobCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _dataReplicationJobJobRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, jobName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DataReplicationJobResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/jobs/{jobName} + /// + /// + /// Operation Id + /// JobModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The job name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string jobName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); + + using var scope = _dataReplicationJobJobClientDiagnostics.CreateScope("DataReplicationJobCollection.GetIfExists"); + scope.Start(); + try + { + var response = _dataReplicationJobJobRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, jobName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DataReplicationJobResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationJobData.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationJobData.Serialization.cs new file mode 100644 index 000000000000..1f5f0e05956e --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationJobData.Serialization.cs @@ -0,0 +1,155 @@ +// 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.Models; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + public partial class DataReplicationJobData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationJobData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + DataReplicationJobData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationJobData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataReplicationJobData(document.RootElement, options); + } + + internal static DataReplicationJobData DeserializeDataReplicationJobData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DataReplicationJobProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = DataReplicationJobProperties.DeserializeDataReplicationJobProperties(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DataReplicationJobData( + id, + name, + type, + systemData, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DataReplicationJobData)} does not support writing '{options.Format}' format."); + } + } + + DataReplicationJobData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataReplicationJobData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataReplicationJobData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationJobData.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationJobData.cs new file mode 100644 index 000000000000..64ac143311e3 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationJobData.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + /// + /// A class representing the DataReplicationJob data model. + /// Job model. + /// + public partial class DataReplicationJobData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal DataReplicationJobData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal DataReplicationJobData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DataReplicationJobProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public DataReplicationJobProperties Properties { get; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationJobResource.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationJobResource.Serialization.cs new file mode 100644 index 000000000000..f8451d930cd1 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationJobResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + public partial class DataReplicationJobResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + DataReplicationJobData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + DataReplicationJobData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationJobResource.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationJobResource.cs new file mode 100644 index 000000000000..e8ff5fbc24d2 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationJobResource.cs @@ -0,0 +1,171 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + /// + /// A Class representing a DataReplicationJob along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetDataReplicationJobResource method. + /// Otherwise you can get one from its parent resource using the GetDataReplicationJob method. + /// + public partial class DataReplicationJobResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The vaultName. + /// The jobName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string vaultName, string jobName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/jobs/{jobName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _dataReplicationJobJobClientDiagnostics; + private readonly JobRestOperations _dataReplicationJobJobRestClient; + private readonly DataReplicationJobData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.DataReplication/replicationVaults/jobs"; + + /// Initializes a new instance of the class for mocking. + protected DataReplicationJobResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal DataReplicationJobResource(ArmClient client, DataReplicationJobData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal DataReplicationJobResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _dataReplicationJobJobClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string dataReplicationJobJobApiVersion); + _dataReplicationJobJobRestClient = new JobRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataReplicationJobJobApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual DataReplicationJobData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Gets the details of the job. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/jobs/{jobName} + /// + /// + /// Operation Id + /// JobModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _dataReplicationJobJobClientDiagnostics.CreateScope("DataReplicationJobResource.Get"); + scope.Start(); + try + { + var response = await _dataReplicationJobJobRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DataReplicationJobResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the job. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/jobs/{jobName} + /// + /// + /// Operation Id + /// JobModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _dataReplicationJobJobClientDiagnostics.CreateScope("DataReplicationJobResource.Get"); + scope.Start(); + try + { + var response = _dataReplicationJobJobRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DataReplicationJobResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPolicyCollection.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPolicyCollection.cs new file mode 100644 index 000000000000..9bf439154997 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPolicyCollection.cs @@ -0,0 +1,493 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetDataReplicationPolicies method from an instance of . + /// + public partial class DataReplicationPolicyCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _dataReplicationPolicyPolicyClientDiagnostics; + private readonly PolicyRestOperations _dataReplicationPolicyPolicyRestClient; + + /// Initializes a new instance of the class for mocking. + protected DataReplicationPolicyCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal DataReplicationPolicyCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _dataReplicationPolicyPolicyClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", DataReplicationPolicyResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DataReplicationPolicyResource.ResourceType, out string dataReplicationPolicyPolicyApiVersion); + _dataReplicationPolicyPolicyRestClient = new PolicyRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataReplicationPolicyPolicyApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != DataReplicationVaultResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, DataReplicationVaultResource.ResourceType), nameof(id)); + } + + /// + /// Creates the policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationPolicies/{policyName} + /// + /// + /// Operation Id + /// PolicyModel_Create + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The policy name. + /// Policy model. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string policyName, DataReplicationPolicyData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(policyName, nameof(policyName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _dataReplicationPolicyPolicyClientDiagnostics.CreateScope("DataReplicationPolicyCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _dataReplicationPolicyPolicyRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, policyName, data, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(new DataReplicationPolicyOperationSource(Client), _dataReplicationPolicyPolicyClientDiagnostics, Pipeline, _dataReplicationPolicyPolicyRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, policyName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates the policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationPolicies/{policyName} + /// + /// + /// Operation Id + /// PolicyModel_Create + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The policy name. + /// Policy model. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string policyName, DataReplicationPolicyData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(policyName, nameof(policyName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _dataReplicationPolicyPolicyClientDiagnostics.CreateScope("DataReplicationPolicyCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _dataReplicationPolicyPolicyRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, policyName, data, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(new DataReplicationPolicyOperationSource(Client), _dataReplicationPolicyPolicyClientDiagnostics, Pipeline, _dataReplicationPolicyPolicyRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, policyName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationPolicies/{policyName} + /// + /// + /// Operation Id + /// PolicyModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The policy name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string policyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(policyName, nameof(policyName)); + + using var scope = _dataReplicationPolicyPolicyClientDiagnostics.CreateScope("DataReplicationPolicyCollection.Get"); + scope.Start(); + try + { + var response = await _dataReplicationPolicyPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, policyName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DataReplicationPolicyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationPolicies/{policyName} + /// + /// + /// Operation Id + /// PolicyModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The policy name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string policyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(policyName, nameof(policyName)); + + using var scope = _dataReplicationPolicyPolicyClientDiagnostics.CreateScope("DataReplicationPolicyCollection.Get"); + scope.Start(); + try + { + var response = _dataReplicationPolicyPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, policyName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DataReplicationPolicyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the list of policies in the given vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationPolicies + /// + /// + /// Operation Id + /// PolicyModel_List + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _dataReplicationPolicyPolicyRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataReplicationPolicyPolicyRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DataReplicationPolicyResource(Client, DataReplicationPolicyData.DeserializeDataReplicationPolicyData(e)), _dataReplicationPolicyPolicyClientDiagnostics, Pipeline, "DataReplicationPolicyCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Gets the list of policies in the given vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationPolicies + /// + /// + /// Operation Id + /// PolicyModel_List + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _dataReplicationPolicyPolicyRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataReplicationPolicyPolicyRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DataReplicationPolicyResource(Client, DataReplicationPolicyData.DeserializeDataReplicationPolicyData(e)), _dataReplicationPolicyPolicyClientDiagnostics, Pipeline, "DataReplicationPolicyCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationPolicies/{policyName} + /// + /// + /// Operation Id + /// PolicyModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The policy name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string policyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(policyName, nameof(policyName)); + + using var scope = _dataReplicationPolicyPolicyClientDiagnostics.CreateScope("DataReplicationPolicyCollection.Exists"); + scope.Start(); + try + { + var response = await _dataReplicationPolicyPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, policyName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationPolicies/{policyName} + /// + /// + /// Operation Id + /// PolicyModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The policy name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string policyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(policyName, nameof(policyName)); + + using var scope = _dataReplicationPolicyPolicyClientDiagnostics.CreateScope("DataReplicationPolicyCollection.Exists"); + scope.Start(); + try + { + var response = _dataReplicationPolicyPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, policyName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationPolicies/{policyName} + /// + /// + /// Operation Id + /// PolicyModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The policy name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string policyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(policyName, nameof(policyName)); + + using var scope = _dataReplicationPolicyPolicyClientDiagnostics.CreateScope("DataReplicationPolicyCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _dataReplicationPolicyPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, policyName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DataReplicationPolicyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationPolicies/{policyName} + /// + /// + /// Operation Id + /// PolicyModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The policy name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string policyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(policyName, nameof(policyName)); + + using var scope = _dataReplicationPolicyPolicyClientDiagnostics.CreateScope("DataReplicationPolicyCollection.GetIfExists"); + scope.Start(); + try + { + var response = _dataReplicationPolicyPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, policyName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DataReplicationPolicyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPolicyData.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPolicyData.Serialization.cs new file mode 100644 index 000000000000..fbad606ae91b --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPolicyData.Serialization.cs @@ -0,0 +1,155 @@ +// 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.Models; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + public partial class DataReplicationPolicyData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationPolicyData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + DataReplicationPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationPolicyData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataReplicationPolicyData(document.RootElement, options); + } + + internal static DataReplicationPolicyData DeserializeDataReplicationPolicyData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DataReplicationPolicyProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = DataReplicationPolicyProperties.DeserializeDataReplicationPolicyProperties(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DataReplicationPolicyData( + id, + name, + type, + systemData, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DataReplicationPolicyData)} does not support writing '{options.Format}' format."); + } + } + + DataReplicationPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataReplicationPolicyData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataReplicationPolicyData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPolicyData.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPolicyData.cs new file mode 100644 index 000000000000..acce053623d2 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPolicyData.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + /// + /// A class representing the DataReplicationPolicy data model. + /// Policy model. + /// + public partial class DataReplicationPolicyData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DataReplicationPolicyData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal DataReplicationPolicyData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DataReplicationPolicyProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public DataReplicationPolicyProperties Properties { get; set; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPolicyResource.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPolicyResource.Serialization.cs new file mode 100644 index 000000000000..303d1f05d783 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPolicyResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + public partial class DataReplicationPolicyResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + DataReplicationPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + DataReplicationPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPolicyResource.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPolicyResource.cs new file mode 100644 index 000000000000..1e5f0980a46c --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPolicyResource.cs @@ -0,0 +1,347 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + /// + /// A Class representing a DataReplicationPolicy along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetDataReplicationPolicyResource method. + /// Otherwise you can get one from its parent resource using the GetDataReplicationPolicy method. + /// + public partial class DataReplicationPolicyResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The vaultName. + /// The policyName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string vaultName, string policyName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationPolicies/{policyName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _dataReplicationPolicyPolicyClientDiagnostics; + private readonly PolicyRestOperations _dataReplicationPolicyPolicyRestClient; + private readonly DataReplicationPolicyData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.DataReplication/replicationVaults/replicationPolicies"; + + /// Initializes a new instance of the class for mocking. + protected DataReplicationPolicyResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal DataReplicationPolicyResource(ArmClient client, DataReplicationPolicyData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal DataReplicationPolicyResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _dataReplicationPolicyPolicyClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string dataReplicationPolicyPolicyApiVersion); + _dataReplicationPolicyPolicyRestClient = new PolicyRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataReplicationPolicyPolicyApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual DataReplicationPolicyData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Gets the details of the policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationPolicies/{policyName} + /// + /// + /// Operation Id + /// PolicyModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _dataReplicationPolicyPolicyClientDiagnostics.CreateScope("DataReplicationPolicyResource.Get"); + scope.Start(); + try + { + var response = await _dataReplicationPolicyPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DataReplicationPolicyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationPolicies/{policyName} + /// + /// + /// Operation Id + /// PolicyModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _dataReplicationPolicyPolicyClientDiagnostics.CreateScope("DataReplicationPolicyResource.Get"); + scope.Start(); + try + { + var response = _dataReplicationPolicyPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DataReplicationPolicyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes the policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationPolicies/{policyName} + /// + /// + /// Operation Id + /// PolicyModel_Delete + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _dataReplicationPolicyPolicyClientDiagnostics.CreateScope("DataReplicationPolicyResource.Delete"); + scope.Start(); + try + { + var response = await _dataReplicationPolicyPolicyRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(_dataReplicationPolicyPolicyClientDiagnostics, Pipeline, _dataReplicationPolicyPolicyRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes the policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationPolicies/{policyName} + /// + /// + /// Operation Id + /// PolicyModel_Delete + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _dataReplicationPolicyPolicyClientDiagnostics.CreateScope("DataReplicationPolicyResource.Delete"); + scope.Start(); + try + { + var response = _dataReplicationPolicyPolicyRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(_dataReplicationPolicyPolicyClientDiagnostics, Pipeline, _dataReplicationPolicyPolicyRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates the policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationPolicies/{policyName} + /// + /// + /// Operation Id + /// PolicyModel_Create + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// 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. + /// Policy model. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, DataReplicationPolicyData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _dataReplicationPolicyPolicyClientDiagnostics.CreateScope("DataReplicationPolicyResource.Update"); + scope.Start(); + try + { + var response = await _dataReplicationPolicyPolicyRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(new DataReplicationPolicyOperationSource(Client), _dataReplicationPolicyPolicyClientDiagnostics, Pipeline, _dataReplicationPolicyPolicyRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates the policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationPolicies/{policyName} + /// + /// + /// Operation Id + /// PolicyModel_Create + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// 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. + /// Policy model. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, DataReplicationPolicyData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _dataReplicationPolicyPolicyClientDiagnostics.CreateScope("DataReplicationPolicyResource.Update"); + scope.Start(); + try + { + var response = _dataReplicationPolicyPolicyRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(new DataReplicationPolicyOperationSource(Client), _dataReplicationPolicyPolicyClientDiagnostics, Pipeline, _dataReplicationPolicyPolicyRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPrivateEndpointConnectionCollection.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPrivateEndpointConnectionCollection.cs new file mode 100644 index 000000000000..300722d92cd0 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPrivateEndpointConnectionCollection.cs @@ -0,0 +1,497 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetDataReplicationPrivateEndpointConnections method from an instance of . + /// + public partial class DataReplicationPrivateEndpointConnectionCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _dataReplicationPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics; + private readonly PrivateEndpointConnectionsRestOperations _dataReplicationPrivateEndpointConnectionPrivateEndpointConnectionsRestClient; + + /// Initializes a new instance of the class for mocking. + protected DataReplicationPrivateEndpointConnectionCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal DataReplicationPrivateEndpointConnectionCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _dataReplicationPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", DataReplicationPrivateEndpointConnectionResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DataReplicationPrivateEndpointConnectionResource.ResourceType, out string dataReplicationPrivateEndpointConnectionPrivateEndpointConnectionsApiVersion); + _dataReplicationPrivateEndpointConnectionPrivateEndpointConnectionsRestClient = new PrivateEndpointConnectionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataReplicationPrivateEndpointConnectionPrivateEndpointConnectionsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != DataReplicationVaultResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, DataReplicationVaultResource.ResourceType), nameof(id)); + } + + /// + /// Updated the private endpoint connection status (Approval/Rejected). This gets invoked by resource admin. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName} + /// + /// + /// Operation Id + /// PrivateEndpointConnection_Update + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The private endpoint connection name. + /// Private endpoint connection update input. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string privateEndpointConnectionName, DataReplicationPrivateEndpointConnectionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _dataReplicationPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics.CreateScope("DataReplicationPrivateEndpointConnectionCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _dataReplicationPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, data, cancellationToken).ConfigureAwait(false); + var uri = _dataReplicationPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new RecoveryServicesDataReplicationArmOperation(Response.FromValue(new DataReplicationPrivateEndpointConnectionResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updated the private endpoint connection status (Approval/Rejected). This gets invoked by resource admin. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName} + /// + /// + /// Operation Id + /// PrivateEndpointConnection_Update + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The private endpoint connection name. + /// Private endpoint connection update input. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string privateEndpointConnectionName, DataReplicationPrivateEndpointConnectionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _dataReplicationPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics.CreateScope("DataReplicationPrivateEndpointConnectionCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _dataReplicationPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, data, cancellationToken); + var uri = _dataReplicationPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new RecoveryServicesDataReplicationArmOperation(Response.FromValue(new DataReplicationPrivateEndpointConnectionResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the private endpoint connection details. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName} + /// + /// + /// Operation Id + /// PrivateEndpointConnection_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The private endpoint connection name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string privateEndpointConnectionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); + + using var scope = _dataReplicationPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics.CreateScope("DataReplicationPrivateEndpointConnectionCollection.Get"); + scope.Start(); + try + { + var response = await _dataReplicationPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DataReplicationPrivateEndpointConnectionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the private endpoint connection details. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName} + /// + /// + /// Operation Id + /// PrivateEndpointConnection_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The private endpoint connection name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string privateEndpointConnectionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); + + using var scope = _dataReplicationPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics.CreateScope("DataReplicationPrivateEndpointConnectionCollection.Get"); + scope.Start(); + try + { + var response = _dataReplicationPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DataReplicationPrivateEndpointConnectionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the all private endpoint connections configured on the vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/privateEndpointConnections + /// + /// + /// Operation Id + /// PrivateEndpointConnection_List + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _dataReplicationPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataReplicationPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DataReplicationPrivateEndpointConnectionResource(Client, DataReplicationPrivateEndpointConnectionData.DeserializeDataReplicationPrivateEndpointConnectionData(e)), _dataReplicationPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics, Pipeline, "DataReplicationPrivateEndpointConnectionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Gets the all private endpoint connections configured on the vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/privateEndpointConnections + /// + /// + /// Operation Id + /// PrivateEndpointConnection_List + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _dataReplicationPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataReplicationPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DataReplicationPrivateEndpointConnectionResource(Client, DataReplicationPrivateEndpointConnectionData.DeserializeDataReplicationPrivateEndpointConnectionData(e)), _dataReplicationPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics, Pipeline, "DataReplicationPrivateEndpointConnectionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName} + /// + /// + /// Operation Id + /// PrivateEndpointConnection_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The private endpoint connection name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string privateEndpointConnectionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); + + using var scope = _dataReplicationPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics.CreateScope("DataReplicationPrivateEndpointConnectionCollection.Exists"); + scope.Start(); + try + { + var response = await _dataReplicationPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName} + /// + /// + /// Operation Id + /// PrivateEndpointConnection_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The private endpoint connection name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string privateEndpointConnectionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); + + using var scope = _dataReplicationPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics.CreateScope("DataReplicationPrivateEndpointConnectionCollection.Exists"); + scope.Start(); + try + { + var response = _dataReplicationPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName} + /// + /// + /// Operation Id + /// PrivateEndpointConnection_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The private endpoint connection name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string privateEndpointConnectionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); + + using var scope = _dataReplicationPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics.CreateScope("DataReplicationPrivateEndpointConnectionCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _dataReplicationPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DataReplicationPrivateEndpointConnectionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName} + /// + /// + /// Operation Id + /// PrivateEndpointConnection_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The private endpoint connection name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string privateEndpointConnectionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); + + using var scope = _dataReplicationPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics.CreateScope("DataReplicationPrivateEndpointConnectionCollection.GetIfExists"); + scope.Start(); + try + { + var response = _dataReplicationPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DataReplicationPrivateEndpointConnectionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPrivateEndpointConnectionData.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPrivateEndpointConnectionData.Serialization.cs new file mode 100644 index 000000000000..bac50524e70a --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPrivateEndpointConnectionData.Serialization.cs @@ -0,0 +1,155 @@ +// 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.Models; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + public partial class DataReplicationPrivateEndpointConnectionData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationPrivateEndpointConnectionData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + DataReplicationPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationPrivateEndpointConnectionData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataReplicationPrivateEndpointConnectionData(document.RootElement, options); + } + + internal static DataReplicationPrivateEndpointConnectionData DeserializeDataReplicationPrivateEndpointConnectionData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DataReplicationPrivateEndpointConnectionProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = DataReplicationPrivateEndpointConnectionProperties.DeserializeDataReplicationPrivateEndpointConnectionProperties(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DataReplicationPrivateEndpointConnectionData( + id, + name, + type, + systemData, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DataReplicationPrivateEndpointConnectionData)} does not support writing '{options.Format}' format."); + } + } + + DataReplicationPrivateEndpointConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataReplicationPrivateEndpointConnectionData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataReplicationPrivateEndpointConnectionData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPrivateEndpointConnectionData.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPrivateEndpointConnectionData.cs new file mode 100644 index 000000000000..11a877d0e212 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPrivateEndpointConnectionData.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + /// + /// A class representing the DataReplicationPrivateEndpointConnection data model. + /// Represents private endpoint connection. + /// + public partial class DataReplicationPrivateEndpointConnectionData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DataReplicationPrivateEndpointConnectionData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal DataReplicationPrivateEndpointConnectionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DataReplicationPrivateEndpointConnectionProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public DataReplicationPrivateEndpointConnectionProperties Properties { get; set; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPrivateEndpointConnectionProxyCollection.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPrivateEndpointConnectionProxyCollection.cs new file mode 100644 index 000000000000..e50b05a62f8c --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPrivateEndpointConnectionProxyCollection.cs @@ -0,0 +1,497 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetDataReplicationPrivateEndpointConnectionProxies method from an instance of . + /// + public partial class DataReplicationPrivateEndpointConnectionProxyCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _dataReplicationPrivateEndpointConnectionProxyPrivateEndpointConnectionProxiesClientDiagnostics; + private readonly PrivateEndpointConnectionProxiesRestOperations _dataReplicationPrivateEndpointConnectionProxyPrivateEndpointConnectionProxiesRestClient; + + /// Initializes a new instance of the class for mocking. + protected DataReplicationPrivateEndpointConnectionProxyCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal DataReplicationPrivateEndpointConnectionProxyCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _dataReplicationPrivateEndpointConnectionProxyPrivateEndpointConnectionProxiesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", DataReplicationPrivateEndpointConnectionProxyResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DataReplicationPrivateEndpointConnectionProxyResource.ResourceType, out string dataReplicationPrivateEndpointConnectionProxyPrivateEndpointConnectionProxiesApiVersion); + _dataReplicationPrivateEndpointConnectionProxyPrivateEndpointConnectionProxiesRestClient = new PrivateEndpointConnectionProxiesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataReplicationPrivateEndpointConnectionProxyPrivateEndpointConnectionProxiesApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != DataReplicationVaultResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, DataReplicationVaultResource.ResourceType), nameof(id)); + } + + /// + /// Create a new private endpoint connection proxy which includes both auto and manual approval types. Creating the proxy resource will also create a private endpoint connection resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/privateEndpointConnectionProxies/{privateEndpointConnectionProxyName} + /// + /// + /// Operation Id + /// PrivateEndpointConnectionProxy_Create + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The private endpoint connection proxy name. + /// Private endpoint connection creation input. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string privateEndpointConnectionProxyName, DataReplicationPrivateEndpointConnectionProxyData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(privateEndpointConnectionProxyName, nameof(privateEndpointConnectionProxyName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _dataReplicationPrivateEndpointConnectionProxyPrivateEndpointConnectionProxiesClientDiagnostics.CreateScope("DataReplicationPrivateEndpointConnectionProxyCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _dataReplicationPrivateEndpointConnectionProxyPrivateEndpointConnectionProxiesRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionProxyName, data, cancellationToken).ConfigureAwait(false); + var uri = _dataReplicationPrivateEndpointConnectionProxyPrivateEndpointConnectionProxiesRestClient.CreateCreateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionProxyName, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new RecoveryServicesDataReplicationArmOperation(Response.FromValue(new DataReplicationPrivateEndpointConnectionProxyResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a new private endpoint connection proxy which includes both auto and manual approval types. Creating the proxy resource will also create a private endpoint connection resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/privateEndpointConnectionProxies/{privateEndpointConnectionProxyName} + /// + /// + /// Operation Id + /// PrivateEndpointConnectionProxy_Create + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The private endpoint connection proxy name. + /// Private endpoint connection creation input. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string privateEndpointConnectionProxyName, DataReplicationPrivateEndpointConnectionProxyData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(privateEndpointConnectionProxyName, nameof(privateEndpointConnectionProxyName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _dataReplicationPrivateEndpointConnectionProxyPrivateEndpointConnectionProxiesClientDiagnostics.CreateScope("DataReplicationPrivateEndpointConnectionProxyCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _dataReplicationPrivateEndpointConnectionProxyPrivateEndpointConnectionProxiesRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionProxyName, data, cancellationToken); + var uri = _dataReplicationPrivateEndpointConnectionProxyPrivateEndpointConnectionProxiesRestClient.CreateCreateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionProxyName, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new RecoveryServicesDataReplicationArmOperation(Response.FromValue(new DataReplicationPrivateEndpointConnectionProxyResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the private endpoint connection proxy details. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/privateEndpointConnectionProxies/{privateEndpointConnectionProxyName} + /// + /// + /// Operation Id + /// PrivateEndpointConnectionProxy_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The private endpoint connection proxy name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string privateEndpointConnectionProxyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(privateEndpointConnectionProxyName, nameof(privateEndpointConnectionProxyName)); + + using var scope = _dataReplicationPrivateEndpointConnectionProxyPrivateEndpointConnectionProxiesClientDiagnostics.CreateScope("DataReplicationPrivateEndpointConnectionProxyCollection.Get"); + scope.Start(); + try + { + var response = await _dataReplicationPrivateEndpointConnectionProxyPrivateEndpointConnectionProxiesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionProxyName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DataReplicationPrivateEndpointConnectionProxyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the private endpoint connection proxy details. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/privateEndpointConnectionProxies/{privateEndpointConnectionProxyName} + /// + /// + /// Operation Id + /// PrivateEndpointConnectionProxy_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The private endpoint connection proxy name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string privateEndpointConnectionProxyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(privateEndpointConnectionProxyName, nameof(privateEndpointConnectionProxyName)); + + using var scope = _dataReplicationPrivateEndpointConnectionProxyPrivateEndpointConnectionProxiesClientDiagnostics.CreateScope("DataReplicationPrivateEndpointConnectionProxyCollection.Get"); + scope.Start(); + try + { + var response = _dataReplicationPrivateEndpointConnectionProxyPrivateEndpointConnectionProxiesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionProxyName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DataReplicationPrivateEndpointConnectionProxyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the all private endpoint connections proxies. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/privateEndpointConnectionProxies + /// + /// + /// Operation Id + /// PrivateEndpointConnectionProxy_List + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _dataReplicationPrivateEndpointConnectionProxyPrivateEndpointConnectionProxiesRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataReplicationPrivateEndpointConnectionProxyPrivateEndpointConnectionProxiesRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DataReplicationPrivateEndpointConnectionProxyResource(Client, DataReplicationPrivateEndpointConnectionProxyData.DeserializeDataReplicationPrivateEndpointConnectionProxyData(e)), _dataReplicationPrivateEndpointConnectionProxyPrivateEndpointConnectionProxiesClientDiagnostics, Pipeline, "DataReplicationPrivateEndpointConnectionProxyCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Gets the all private endpoint connections proxies. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/privateEndpointConnectionProxies + /// + /// + /// Operation Id + /// PrivateEndpointConnectionProxy_List + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _dataReplicationPrivateEndpointConnectionProxyPrivateEndpointConnectionProxiesRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataReplicationPrivateEndpointConnectionProxyPrivateEndpointConnectionProxiesRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DataReplicationPrivateEndpointConnectionProxyResource(Client, DataReplicationPrivateEndpointConnectionProxyData.DeserializeDataReplicationPrivateEndpointConnectionProxyData(e)), _dataReplicationPrivateEndpointConnectionProxyPrivateEndpointConnectionProxiesClientDiagnostics, Pipeline, "DataReplicationPrivateEndpointConnectionProxyCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/privateEndpointConnectionProxies/{privateEndpointConnectionProxyName} + /// + /// + /// Operation Id + /// PrivateEndpointConnectionProxy_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The private endpoint connection proxy name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string privateEndpointConnectionProxyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(privateEndpointConnectionProxyName, nameof(privateEndpointConnectionProxyName)); + + using var scope = _dataReplicationPrivateEndpointConnectionProxyPrivateEndpointConnectionProxiesClientDiagnostics.CreateScope("DataReplicationPrivateEndpointConnectionProxyCollection.Exists"); + scope.Start(); + try + { + var response = await _dataReplicationPrivateEndpointConnectionProxyPrivateEndpointConnectionProxiesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionProxyName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/privateEndpointConnectionProxies/{privateEndpointConnectionProxyName} + /// + /// + /// Operation Id + /// PrivateEndpointConnectionProxy_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The private endpoint connection proxy name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string privateEndpointConnectionProxyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(privateEndpointConnectionProxyName, nameof(privateEndpointConnectionProxyName)); + + using var scope = _dataReplicationPrivateEndpointConnectionProxyPrivateEndpointConnectionProxiesClientDiagnostics.CreateScope("DataReplicationPrivateEndpointConnectionProxyCollection.Exists"); + scope.Start(); + try + { + var response = _dataReplicationPrivateEndpointConnectionProxyPrivateEndpointConnectionProxiesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionProxyName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/privateEndpointConnectionProxies/{privateEndpointConnectionProxyName} + /// + /// + /// Operation Id + /// PrivateEndpointConnectionProxy_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The private endpoint connection proxy name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string privateEndpointConnectionProxyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(privateEndpointConnectionProxyName, nameof(privateEndpointConnectionProxyName)); + + using var scope = _dataReplicationPrivateEndpointConnectionProxyPrivateEndpointConnectionProxiesClientDiagnostics.CreateScope("DataReplicationPrivateEndpointConnectionProxyCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _dataReplicationPrivateEndpointConnectionProxyPrivateEndpointConnectionProxiesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionProxyName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DataReplicationPrivateEndpointConnectionProxyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/privateEndpointConnectionProxies/{privateEndpointConnectionProxyName} + /// + /// + /// Operation Id + /// PrivateEndpointConnectionProxy_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The private endpoint connection proxy name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string privateEndpointConnectionProxyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(privateEndpointConnectionProxyName, nameof(privateEndpointConnectionProxyName)); + + using var scope = _dataReplicationPrivateEndpointConnectionProxyPrivateEndpointConnectionProxiesClientDiagnostics.CreateScope("DataReplicationPrivateEndpointConnectionProxyCollection.GetIfExists"); + scope.Start(); + try + { + var response = _dataReplicationPrivateEndpointConnectionProxyPrivateEndpointConnectionProxiesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionProxyName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DataReplicationPrivateEndpointConnectionProxyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPrivateEndpointConnectionProxyData.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPrivateEndpointConnectionProxyData.Serialization.cs new file mode 100644 index 000000000000..ee92fa905311 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPrivateEndpointConnectionProxyData.Serialization.cs @@ -0,0 +1,171 @@ +// 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.Models; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + public partial class DataReplicationPrivateEndpointConnectionProxyData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationPrivateEndpointConnectionProxyData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (Optional.IsDefined(ETag)) + { + writer.WritePropertyName("etag"u8); + writer.WriteStringValue(ETag.Value.ToString()); + } + } + + DataReplicationPrivateEndpointConnectionProxyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationPrivateEndpointConnectionProxyData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataReplicationPrivateEndpointConnectionProxyData(document.RootElement, options); + } + + internal static DataReplicationPrivateEndpointConnectionProxyData DeserializeDataReplicationPrivateEndpointConnectionProxyData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DataReplicationPrivateEndpointConnectionProxyProperties properties = default; + ETag? etag = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = DataReplicationPrivateEndpointConnectionProxyProperties.DeserializeDataReplicationPrivateEndpointConnectionProxyProperties(property.Value, options); + continue; + } + if (property.NameEquals("etag"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + etag = new ETag(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DataReplicationPrivateEndpointConnectionProxyData( + id, + name, + type, + systemData, + properties, + etag, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DataReplicationPrivateEndpointConnectionProxyData)} does not support writing '{options.Format}' format."); + } + } + + DataReplicationPrivateEndpointConnectionProxyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataReplicationPrivateEndpointConnectionProxyData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataReplicationPrivateEndpointConnectionProxyData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPrivateEndpointConnectionProxyData.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPrivateEndpointConnectionProxyData.cs new file mode 100644 index 000000000000..082924082ed2 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPrivateEndpointConnectionProxyData.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + /// + /// A class representing the DataReplicationPrivateEndpointConnectionProxy data model. + /// Represents private endpoint connection proxy request. + /// + public partial class DataReplicationPrivateEndpointConnectionProxyData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DataReplicationPrivateEndpointConnectionProxyData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// Gets or sets ETag. + /// Keeps track of any properties unknown to the library. + internal DataReplicationPrivateEndpointConnectionProxyData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DataReplicationPrivateEndpointConnectionProxyProperties properties, ETag? etag, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + ETag = etag; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public DataReplicationPrivateEndpointConnectionProxyProperties Properties { get; set; } + /// Gets or sets ETag. + public ETag? ETag { get; set; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPrivateEndpointConnectionProxyResource.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPrivateEndpointConnectionProxyResource.Serialization.cs new file mode 100644 index 000000000000..8e4cf3e5abb2 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPrivateEndpointConnectionProxyResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + public partial class DataReplicationPrivateEndpointConnectionProxyResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + DataReplicationPrivateEndpointConnectionProxyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + DataReplicationPrivateEndpointConnectionProxyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPrivateEndpointConnectionProxyResource.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPrivateEndpointConnectionProxyResource.cs new file mode 100644 index 000000000000..4bcac0c15bab --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPrivateEndpointConnectionProxyResource.cs @@ -0,0 +1,435 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + /// + /// A Class representing a DataReplicationPrivateEndpointConnectionProxy along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetDataReplicationPrivateEndpointConnectionProxyResource method. + /// Otherwise you can get one from its parent resource using the GetDataReplicationPrivateEndpointConnectionProxy method. + /// + public partial class DataReplicationPrivateEndpointConnectionProxyResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The vaultName. + /// The privateEndpointConnectionProxyName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string vaultName, string privateEndpointConnectionProxyName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/privateEndpointConnectionProxies/{privateEndpointConnectionProxyName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _dataReplicationPrivateEndpointConnectionProxyPrivateEndpointConnectionProxiesClientDiagnostics; + private readonly PrivateEndpointConnectionProxiesRestOperations _dataReplicationPrivateEndpointConnectionProxyPrivateEndpointConnectionProxiesRestClient; + private readonly DataReplicationPrivateEndpointConnectionProxyData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.DataReplication/replicationVaults/privateEndpointConnectionProxies"; + + /// Initializes a new instance of the class for mocking. + protected DataReplicationPrivateEndpointConnectionProxyResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal DataReplicationPrivateEndpointConnectionProxyResource(ArmClient client, DataReplicationPrivateEndpointConnectionProxyData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal DataReplicationPrivateEndpointConnectionProxyResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _dataReplicationPrivateEndpointConnectionProxyPrivateEndpointConnectionProxiesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string dataReplicationPrivateEndpointConnectionProxyPrivateEndpointConnectionProxiesApiVersion); + _dataReplicationPrivateEndpointConnectionProxyPrivateEndpointConnectionProxiesRestClient = new PrivateEndpointConnectionProxiesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataReplicationPrivateEndpointConnectionProxyPrivateEndpointConnectionProxiesApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual DataReplicationPrivateEndpointConnectionProxyData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Gets the private endpoint connection proxy details. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/privateEndpointConnectionProxies/{privateEndpointConnectionProxyName} + /// + /// + /// Operation Id + /// PrivateEndpointConnectionProxy_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _dataReplicationPrivateEndpointConnectionProxyPrivateEndpointConnectionProxiesClientDiagnostics.CreateScope("DataReplicationPrivateEndpointConnectionProxyResource.Get"); + scope.Start(); + try + { + var response = await _dataReplicationPrivateEndpointConnectionProxyPrivateEndpointConnectionProxiesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DataReplicationPrivateEndpointConnectionProxyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the private endpoint connection proxy details. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/privateEndpointConnectionProxies/{privateEndpointConnectionProxyName} + /// + /// + /// Operation Id + /// PrivateEndpointConnectionProxy_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _dataReplicationPrivateEndpointConnectionProxyPrivateEndpointConnectionProxiesClientDiagnostics.CreateScope("DataReplicationPrivateEndpointConnectionProxyResource.Get"); + scope.Start(); + try + { + var response = _dataReplicationPrivateEndpointConnectionProxyPrivateEndpointConnectionProxiesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DataReplicationPrivateEndpointConnectionProxyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Returns the operation to track the deletion of private endpoint connection proxy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/privateEndpointConnectionProxies/{privateEndpointConnectionProxyName} + /// + /// + /// Operation Id + /// PrivateEndpointConnectionProxy_Delete + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _dataReplicationPrivateEndpointConnectionProxyPrivateEndpointConnectionProxiesClientDiagnostics.CreateScope("DataReplicationPrivateEndpointConnectionProxyResource.Delete"); + scope.Start(); + try + { + var response = await _dataReplicationPrivateEndpointConnectionProxyPrivateEndpointConnectionProxiesRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(_dataReplicationPrivateEndpointConnectionProxyPrivateEndpointConnectionProxiesClientDiagnostics, Pipeline, _dataReplicationPrivateEndpointConnectionProxyPrivateEndpointConnectionProxiesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Returns the operation to track the deletion of private endpoint connection proxy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/privateEndpointConnectionProxies/{privateEndpointConnectionProxyName} + /// + /// + /// Operation Id + /// PrivateEndpointConnectionProxy_Delete + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _dataReplicationPrivateEndpointConnectionProxyPrivateEndpointConnectionProxiesClientDiagnostics.CreateScope("DataReplicationPrivateEndpointConnectionProxyResource.Delete"); + scope.Start(); + try + { + var response = _dataReplicationPrivateEndpointConnectionProxyPrivateEndpointConnectionProxiesRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(_dataReplicationPrivateEndpointConnectionProxyPrivateEndpointConnectionProxiesClientDiagnostics, Pipeline, _dataReplicationPrivateEndpointConnectionProxyPrivateEndpointConnectionProxiesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a new private endpoint connection proxy which includes both auto and manual approval types. Creating the proxy resource will also create a private endpoint connection resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/privateEndpointConnectionProxies/{privateEndpointConnectionProxyName} + /// + /// + /// Operation Id + /// PrivateEndpointConnectionProxy_Create + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// 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. + /// Private endpoint connection creation input. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, DataReplicationPrivateEndpointConnectionProxyData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _dataReplicationPrivateEndpointConnectionProxyPrivateEndpointConnectionProxiesClientDiagnostics.CreateScope("DataReplicationPrivateEndpointConnectionProxyResource.Update"); + scope.Start(); + try + { + var response = await _dataReplicationPrivateEndpointConnectionProxyPrivateEndpointConnectionProxiesRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var uri = _dataReplicationPrivateEndpointConnectionProxyPrivateEndpointConnectionProxiesRestClient.CreateCreateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new RecoveryServicesDataReplicationArmOperation(Response.FromValue(new DataReplicationPrivateEndpointConnectionProxyResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a new private endpoint connection proxy which includes both auto and manual approval types. Creating the proxy resource will also create a private endpoint connection resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/privateEndpointConnectionProxies/{privateEndpointConnectionProxyName} + /// + /// + /// Operation Id + /// PrivateEndpointConnectionProxy_Create + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// 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. + /// Private endpoint connection creation input. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, DataReplicationPrivateEndpointConnectionProxyData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _dataReplicationPrivateEndpointConnectionProxyPrivateEndpointConnectionProxiesClientDiagnostics.CreateScope("DataReplicationPrivateEndpointConnectionProxyResource.Update"); + scope.Start(); + try + { + var response = _dataReplicationPrivateEndpointConnectionProxyPrivateEndpointConnectionProxiesRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var uri = _dataReplicationPrivateEndpointConnectionProxyPrivateEndpointConnectionProxiesRestClient.CreateCreateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new RecoveryServicesDataReplicationArmOperation(Response.FromValue(new DataReplicationPrivateEndpointConnectionProxyResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Returns remote private endpoint connection information after validation. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/privateEndpointConnectionProxies/{privateEndpointConnectionProxyName}/validate + /// + /// + /// Operation Id + /// PrivateEndpointConnectionProxies_Validate + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The private endpoint connection proxy input. + /// The cancellation token to use. + /// is null. + public virtual async Task> ValidateAsync(DataReplicationPrivateEndpointConnectionProxyData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _dataReplicationPrivateEndpointConnectionProxyPrivateEndpointConnectionProxiesClientDiagnostics.CreateScope("DataReplicationPrivateEndpointConnectionProxyResource.Validate"); + scope.Start(); + try + { + var response = await _dataReplicationPrivateEndpointConnectionProxyPrivateEndpointConnectionProxiesRestClient.ValidateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new DataReplicationPrivateEndpointConnectionProxyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Returns remote private endpoint connection information after validation. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/privateEndpointConnectionProxies/{privateEndpointConnectionProxyName}/validate + /// + /// + /// Operation Id + /// PrivateEndpointConnectionProxies_Validate + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The private endpoint connection proxy input. + /// The cancellation token to use. + /// is null. + public virtual Response Validate(DataReplicationPrivateEndpointConnectionProxyData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _dataReplicationPrivateEndpointConnectionProxyPrivateEndpointConnectionProxiesClientDiagnostics.CreateScope("DataReplicationPrivateEndpointConnectionProxyResource.Validate"); + scope.Start(); + try + { + var response = _dataReplicationPrivateEndpointConnectionProxyPrivateEndpointConnectionProxiesRestClient.Validate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + return Response.FromValue(new DataReplicationPrivateEndpointConnectionProxyResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPrivateEndpointConnectionResource.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPrivateEndpointConnectionResource.Serialization.cs new file mode 100644 index 000000000000..434b482455cc --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPrivateEndpointConnectionResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + public partial class DataReplicationPrivateEndpointConnectionResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + DataReplicationPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + DataReplicationPrivateEndpointConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPrivateEndpointConnectionResource.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPrivateEndpointConnectionResource.cs new file mode 100644 index 000000000000..cb86be109a33 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPrivateEndpointConnectionResource.cs @@ -0,0 +1,351 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + /// + /// A Class representing a DataReplicationPrivateEndpointConnection along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetDataReplicationPrivateEndpointConnectionResource method. + /// Otherwise you can get one from its parent resource using the GetDataReplicationPrivateEndpointConnection method. + /// + public partial class DataReplicationPrivateEndpointConnectionResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The vaultName. + /// The privateEndpointConnectionName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string vaultName, string privateEndpointConnectionName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _dataReplicationPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics; + private readonly PrivateEndpointConnectionsRestOperations _dataReplicationPrivateEndpointConnectionPrivateEndpointConnectionsRestClient; + private readonly DataReplicationPrivateEndpointConnectionData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.DataReplication/replicationVaults/privateEndpointConnections"; + + /// Initializes a new instance of the class for mocking. + protected DataReplicationPrivateEndpointConnectionResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal DataReplicationPrivateEndpointConnectionResource(ArmClient client, DataReplicationPrivateEndpointConnectionData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal DataReplicationPrivateEndpointConnectionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _dataReplicationPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string dataReplicationPrivateEndpointConnectionPrivateEndpointConnectionsApiVersion); + _dataReplicationPrivateEndpointConnectionPrivateEndpointConnectionsRestClient = new PrivateEndpointConnectionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataReplicationPrivateEndpointConnectionPrivateEndpointConnectionsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual DataReplicationPrivateEndpointConnectionData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Gets the private endpoint connection details. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName} + /// + /// + /// Operation Id + /// PrivateEndpointConnection_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _dataReplicationPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics.CreateScope("DataReplicationPrivateEndpointConnectionResource.Get"); + scope.Start(); + try + { + var response = await _dataReplicationPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DataReplicationPrivateEndpointConnectionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the private endpoint connection details. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName} + /// + /// + /// Operation Id + /// PrivateEndpointConnection_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _dataReplicationPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics.CreateScope("DataReplicationPrivateEndpointConnectionResource.Get"); + scope.Start(); + try + { + var response = _dataReplicationPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DataReplicationPrivateEndpointConnectionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes the private endpoint connection. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName} + /// + /// + /// Operation Id + /// PrivateEndpointConnection_Delete + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _dataReplicationPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics.CreateScope("DataReplicationPrivateEndpointConnectionResource.Delete"); + scope.Start(); + try + { + var response = await _dataReplicationPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(_dataReplicationPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics, Pipeline, _dataReplicationPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes the private endpoint connection. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName} + /// + /// + /// Operation Id + /// PrivateEndpointConnection_Delete + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _dataReplicationPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics.CreateScope("DataReplicationPrivateEndpointConnectionResource.Delete"); + scope.Start(); + try + { + var response = _dataReplicationPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(_dataReplicationPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics, Pipeline, _dataReplicationPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updated the private endpoint connection status (Approval/Rejected). This gets invoked by resource admin. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName} + /// + /// + /// Operation Id + /// PrivateEndpointConnection_Update + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// 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. + /// Private endpoint connection update input. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, DataReplicationPrivateEndpointConnectionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _dataReplicationPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics.CreateScope("DataReplicationPrivateEndpointConnectionResource.Update"); + scope.Start(); + try + { + var response = await _dataReplicationPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var uri = _dataReplicationPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new RecoveryServicesDataReplicationArmOperation(Response.FromValue(new DataReplicationPrivateEndpointConnectionResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updated the private endpoint connection status (Approval/Rejected). This gets invoked by resource admin. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName} + /// + /// + /// Operation Id + /// PrivateEndpointConnection_Update + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// 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. + /// Private endpoint connection update input. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, DataReplicationPrivateEndpointConnectionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _dataReplicationPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics.CreateScope("DataReplicationPrivateEndpointConnectionResource.Update"); + scope.Start(); + try + { + var response = _dataReplicationPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var uri = _dataReplicationPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new RecoveryServicesDataReplicationArmOperation(Response.FromValue(new DataReplicationPrivateEndpointConnectionResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPrivateLinkResource.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPrivateLinkResource.Serialization.cs new file mode 100644 index 000000000000..c632b70466d2 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPrivateLinkResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + public partial class DataReplicationPrivateLinkResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + DataReplicationPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + DataReplicationPrivateLinkResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPrivateLinkResource.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPrivateLinkResource.cs new file mode 100644 index 000000000000..82229fe52243 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPrivateLinkResource.cs @@ -0,0 +1,171 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + /// + /// A Class representing a DataReplicationPrivateLinkResource along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetDataReplicationPrivateLinkResource method. + /// Otherwise you can get one from its parent resource using the GetDataReplicationPrivateLinkResource method. + /// + public partial class DataReplicationPrivateLinkResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The vaultName. + /// The privateLinkResourceName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string vaultName, string privateLinkResourceName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/privateLinkResources/{privateLinkResourceName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _dataReplicationPrivateLinkResourcePrivateLinkResourcesClientDiagnostics; + private readonly PrivateLinkResourcesRestOperations _dataReplicationPrivateLinkResourcePrivateLinkResourcesRestClient; + private readonly DataReplicationPrivateLinkResourceData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.DataReplication/replicationVaults/privateLinkResources"; + + /// Initializes a new instance of the class for mocking. + protected DataReplicationPrivateLinkResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal DataReplicationPrivateLinkResource(ArmClient client, DataReplicationPrivateLinkResourceData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal DataReplicationPrivateLinkResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _dataReplicationPrivateLinkResourcePrivateLinkResourcesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string dataReplicationPrivateLinkResourcePrivateLinkResourcesApiVersion); + _dataReplicationPrivateLinkResourcePrivateLinkResourcesRestClient = new PrivateLinkResourcesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataReplicationPrivateLinkResourcePrivateLinkResourcesApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual DataReplicationPrivateLinkResourceData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Gets the details of site recovery private link resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/privateLinkResources/{privateLinkResourceName} + /// + /// + /// Operation Id + /// PrivateLinkResource_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _dataReplicationPrivateLinkResourcePrivateLinkResourcesClientDiagnostics.CreateScope("DataReplicationPrivateLinkResource.Get"); + scope.Start(); + try + { + var response = await _dataReplicationPrivateLinkResourcePrivateLinkResourcesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DataReplicationPrivateLinkResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of site recovery private link resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/privateLinkResources/{privateLinkResourceName} + /// + /// + /// Operation Id + /// PrivateLinkResource_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _dataReplicationPrivateLinkResourcePrivateLinkResourcesClientDiagnostics.CreateScope("DataReplicationPrivateLinkResource.Get"); + scope.Start(); + try + { + var response = _dataReplicationPrivateLinkResourcePrivateLinkResourcesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DataReplicationPrivateLinkResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPrivateLinkResourceCollection.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPrivateLinkResourceCollection.cs new file mode 100644 index 000000000000..ec9128bba49f --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPrivateLinkResourceCollection.cs @@ -0,0 +1,395 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetDataReplicationPrivateLinkResources method from an instance of . + /// + public partial class DataReplicationPrivateLinkResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _dataReplicationPrivateLinkResourcePrivateLinkResourcesClientDiagnostics; + private readonly PrivateLinkResourcesRestOperations _dataReplicationPrivateLinkResourcePrivateLinkResourcesRestClient; + + /// Initializes a new instance of the class for mocking. + protected DataReplicationPrivateLinkResourceCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal DataReplicationPrivateLinkResourceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _dataReplicationPrivateLinkResourcePrivateLinkResourcesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", DataReplicationPrivateLinkResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DataReplicationPrivateLinkResource.ResourceType, out string dataReplicationPrivateLinkResourcePrivateLinkResourcesApiVersion); + _dataReplicationPrivateLinkResourcePrivateLinkResourcesRestClient = new PrivateLinkResourcesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataReplicationPrivateLinkResourcePrivateLinkResourcesApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != DataReplicationVaultResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, DataReplicationVaultResource.ResourceType), nameof(id)); + } + + /// + /// Gets the details of site recovery private link resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/privateLinkResources/{privateLinkResourceName} + /// + /// + /// Operation Id + /// PrivateLinkResource_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The private link name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string privateLinkResourceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(privateLinkResourceName, nameof(privateLinkResourceName)); + + using var scope = _dataReplicationPrivateLinkResourcePrivateLinkResourcesClientDiagnostics.CreateScope("DataReplicationPrivateLinkResourceCollection.Get"); + scope.Start(); + try + { + var response = await _dataReplicationPrivateLinkResourcePrivateLinkResourcesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateLinkResourceName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DataReplicationPrivateLinkResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of site recovery private link resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/privateLinkResources/{privateLinkResourceName} + /// + /// + /// Operation Id + /// PrivateLinkResource_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The private link name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string privateLinkResourceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(privateLinkResourceName, nameof(privateLinkResourceName)); + + using var scope = _dataReplicationPrivateLinkResourcePrivateLinkResourcesClientDiagnostics.CreateScope("DataReplicationPrivateLinkResourceCollection.Get"); + scope.Start(); + try + { + var response = _dataReplicationPrivateLinkResourcePrivateLinkResourcesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateLinkResourceName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DataReplicationPrivateLinkResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the list of private link resources. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/privateLinkResources + /// + /// + /// Operation Id + /// PrivateLinkResource_List + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _dataReplicationPrivateLinkResourcePrivateLinkResourcesRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataReplicationPrivateLinkResourcePrivateLinkResourcesRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DataReplicationPrivateLinkResource(Client, DataReplicationPrivateLinkResourceData.DeserializeDataReplicationPrivateLinkResourceData(e)), _dataReplicationPrivateLinkResourcePrivateLinkResourcesClientDiagnostics, Pipeline, "DataReplicationPrivateLinkResourceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Gets the list of private link resources. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/privateLinkResources + /// + /// + /// Operation Id + /// PrivateLinkResource_List + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _dataReplicationPrivateLinkResourcePrivateLinkResourcesRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataReplicationPrivateLinkResourcePrivateLinkResourcesRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DataReplicationPrivateLinkResource(Client, DataReplicationPrivateLinkResourceData.DeserializeDataReplicationPrivateLinkResourceData(e)), _dataReplicationPrivateLinkResourcePrivateLinkResourcesClientDiagnostics, Pipeline, "DataReplicationPrivateLinkResourceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/privateLinkResources/{privateLinkResourceName} + /// + /// + /// Operation Id + /// PrivateLinkResource_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The private link name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string privateLinkResourceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(privateLinkResourceName, nameof(privateLinkResourceName)); + + using var scope = _dataReplicationPrivateLinkResourcePrivateLinkResourcesClientDiagnostics.CreateScope("DataReplicationPrivateLinkResourceCollection.Exists"); + scope.Start(); + try + { + var response = await _dataReplicationPrivateLinkResourcePrivateLinkResourcesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateLinkResourceName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/privateLinkResources/{privateLinkResourceName} + /// + /// + /// Operation Id + /// PrivateLinkResource_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The private link name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string privateLinkResourceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(privateLinkResourceName, nameof(privateLinkResourceName)); + + using var scope = _dataReplicationPrivateLinkResourcePrivateLinkResourcesClientDiagnostics.CreateScope("DataReplicationPrivateLinkResourceCollection.Exists"); + scope.Start(); + try + { + var response = _dataReplicationPrivateLinkResourcePrivateLinkResourcesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateLinkResourceName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/privateLinkResources/{privateLinkResourceName} + /// + /// + /// Operation Id + /// PrivateLinkResource_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The private link name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string privateLinkResourceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(privateLinkResourceName, nameof(privateLinkResourceName)); + + using var scope = _dataReplicationPrivateLinkResourcePrivateLinkResourcesClientDiagnostics.CreateScope("DataReplicationPrivateLinkResourceCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _dataReplicationPrivateLinkResourcePrivateLinkResourcesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateLinkResourceName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DataReplicationPrivateLinkResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/privateLinkResources/{privateLinkResourceName} + /// + /// + /// Operation Id + /// PrivateLinkResource_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The private link name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string privateLinkResourceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(privateLinkResourceName, nameof(privateLinkResourceName)); + + using var scope = _dataReplicationPrivateLinkResourcePrivateLinkResourcesClientDiagnostics.CreateScope("DataReplicationPrivateLinkResourceCollection.GetIfExists"); + scope.Start(); + try + { + var response = _dataReplicationPrivateLinkResourcePrivateLinkResourcesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateLinkResourceName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DataReplicationPrivateLinkResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPrivateLinkResourceData.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPrivateLinkResourceData.Serialization.cs new file mode 100644 index 000000000000..24f8a1e404f7 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPrivateLinkResourceData.Serialization.cs @@ -0,0 +1,155 @@ +// 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.Models; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + public partial class DataReplicationPrivateLinkResourceData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationPrivateLinkResourceData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + DataReplicationPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationPrivateLinkResourceData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataReplicationPrivateLinkResourceData(document.RootElement, options); + } + + internal static DataReplicationPrivateLinkResourceData DeserializeDataReplicationPrivateLinkResourceData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DataReplicationPrivateLinkResourceProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = DataReplicationPrivateLinkResourceProperties.DeserializeDataReplicationPrivateLinkResourceProperties(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DataReplicationPrivateLinkResourceData( + id, + name, + type, + systemData, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DataReplicationPrivateLinkResourceData)} does not support writing '{options.Format}' format."); + } + } + + DataReplicationPrivateLinkResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataReplicationPrivateLinkResourceData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataReplicationPrivateLinkResourceData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPrivateLinkResourceData.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPrivateLinkResourceData.cs new file mode 100644 index 000000000000..242cd05cb8ec --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPrivateLinkResourceData.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + /// + /// A class representing the DataReplicationPrivateLinkResource data model. + /// Represents private link resource. + /// + public partial class DataReplicationPrivateLinkResourceData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal DataReplicationPrivateLinkResourceData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal DataReplicationPrivateLinkResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DataReplicationPrivateLinkResourceProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public DataReplicationPrivateLinkResourceProperties Properties { get; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationProtectedItemCollection.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationProtectedItemCollection.cs new file mode 100644 index 000000000000..e26b49bca18d --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationProtectedItemCollection.cs @@ -0,0 +1,499 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetDataReplicationProtectedItems method from an instance of . + /// + public partial class DataReplicationProtectedItemCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _dataReplicationProtectedItemProtectedItemClientDiagnostics; + private readonly ProtectedItemRestOperations _dataReplicationProtectedItemProtectedItemRestClient; + + /// Initializes a new instance of the class for mocking. + protected DataReplicationProtectedItemCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal DataReplicationProtectedItemCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _dataReplicationProtectedItemProtectedItemClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", DataReplicationProtectedItemResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DataReplicationProtectedItemResource.ResourceType, out string dataReplicationProtectedItemProtectedItemApiVersion); + _dataReplicationProtectedItemProtectedItemRestClient = new ProtectedItemRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataReplicationProtectedItemProtectedItemApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != DataReplicationVaultResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, DataReplicationVaultResource.ResourceType), nameof(id)); + } + + /// + /// Creates the protected item. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName} + /// + /// + /// Operation Id + /// ProtectedItemModel_Create + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The protected item name. + /// Protected item model. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string protectedItemName, DataReplicationProtectedItemData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(protectedItemName, nameof(protectedItemName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _dataReplicationProtectedItemProtectedItemClientDiagnostics.CreateScope("DataReplicationProtectedItemCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _dataReplicationProtectedItemProtectedItemRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, protectedItemName, data, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(new DataReplicationProtectedItemOperationSource(Client), _dataReplicationProtectedItemProtectedItemClientDiagnostics, Pipeline, _dataReplicationProtectedItemProtectedItemRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, protectedItemName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates the protected item. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName} + /// + /// + /// Operation Id + /// ProtectedItemModel_Create + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The protected item name. + /// Protected item model. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string protectedItemName, DataReplicationProtectedItemData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(protectedItemName, nameof(protectedItemName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _dataReplicationProtectedItemProtectedItemClientDiagnostics.CreateScope("DataReplicationProtectedItemCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _dataReplicationProtectedItemProtectedItemRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, protectedItemName, data, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(new DataReplicationProtectedItemOperationSource(Client), _dataReplicationProtectedItemProtectedItemClientDiagnostics, Pipeline, _dataReplicationProtectedItemProtectedItemRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, protectedItemName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the protected item. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName} + /// + /// + /// Operation Id + /// ProtectedItemModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The protected item name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string protectedItemName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(protectedItemName, nameof(protectedItemName)); + + using var scope = _dataReplicationProtectedItemProtectedItemClientDiagnostics.CreateScope("DataReplicationProtectedItemCollection.Get"); + scope.Start(); + try + { + var response = await _dataReplicationProtectedItemProtectedItemRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, protectedItemName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DataReplicationProtectedItemResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the protected item. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName} + /// + /// + /// Operation Id + /// ProtectedItemModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The protected item name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string protectedItemName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(protectedItemName, nameof(protectedItemName)); + + using var scope = _dataReplicationProtectedItemProtectedItemClientDiagnostics.CreateScope("DataReplicationProtectedItemCollection.Get"); + scope.Start(); + try + { + var response = _dataReplicationProtectedItemProtectedItemRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, protectedItemName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DataReplicationProtectedItemResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the list of protected items in the given vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems + /// + /// + /// Operation Id + /// ProtectedItemModel_List + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// OData options. + /// Continuation token. + /// Page size. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(string odataOptions = null, string continuationToken = null, int? pageSize = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _dataReplicationProtectedItemProtectedItemRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, odataOptions, continuationToken, pageSizeHint); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataReplicationProtectedItemProtectedItemRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, odataOptions, continuationToken, pageSizeHint); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DataReplicationProtectedItemResource(Client, DataReplicationProtectedItemData.DeserializeDataReplicationProtectedItemData(e)), _dataReplicationProtectedItemProtectedItemClientDiagnostics, Pipeline, "DataReplicationProtectedItemCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Gets the list of protected items in the given vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems + /// + /// + /// Operation Id + /// ProtectedItemModel_List + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// OData options. + /// Continuation token. + /// Page size. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(string odataOptions = null, string continuationToken = null, int? pageSize = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _dataReplicationProtectedItemProtectedItemRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, odataOptions, continuationToken, pageSizeHint); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataReplicationProtectedItemProtectedItemRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, odataOptions, continuationToken, pageSizeHint); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DataReplicationProtectedItemResource(Client, DataReplicationProtectedItemData.DeserializeDataReplicationProtectedItemData(e)), _dataReplicationProtectedItemProtectedItemClientDiagnostics, Pipeline, "DataReplicationProtectedItemCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName} + /// + /// + /// Operation Id + /// ProtectedItemModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The protected item name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string protectedItemName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(protectedItemName, nameof(protectedItemName)); + + using var scope = _dataReplicationProtectedItemProtectedItemClientDiagnostics.CreateScope("DataReplicationProtectedItemCollection.Exists"); + scope.Start(); + try + { + var response = await _dataReplicationProtectedItemProtectedItemRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, protectedItemName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName} + /// + /// + /// Operation Id + /// ProtectedItemModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The protected item name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string protectedItemName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(protectedItemName, nameof(protectedItemName)); + + using var scope = _dataReplicationProtectedItemProtectedItemClientDiagnostics.CreateScope("DataReplicationProtectedItemCollection.Exists"); + scope.Start(); + try + { + var response = _dataReplicationProtectedItemProtectedItemRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, protectedItemName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName} + /// + /// + /// Operation Id + /// ProtectedItemModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The protected item name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string protectedItemName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(protectedItemName, nameof(protectedItemName)); + + using var scope = _dataReplicationProtectedItemProtectedItemClientDiagnostics.CreateScope("DataReplicationProtectedItemCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _dataReplicationProtectedItemProtectedItemRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, protectedItemName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DataReplicationProtectedItemResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName} + /// + /// + /// Operation Id + /// ProtectedItemModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The protected item name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string protectedItemName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(protectedItemName, nameof(protectedItemName)); + + using var scope = _dataReplicationProtectedItemProtectedItemClientDiagnostics.CreateScope("DataReplicationProtectedItemCollection.GetIfExists"); + scope.Start(); + try + { + var response = _dataReplicationProtectedItemProtectedItemRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, protectedItemName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DataReplicationProtectedItemResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationProtectedItemData.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationProtectedItemData.Serialization.cs new file mode 100644 index 000000000000..3e5ebe75e4a2 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationProtectedItemData.Serialization.cs @@ -0,0 +1,155 @@ +// 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.Models; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + public partial class DataReplicationProtectedItemData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationProtectedItemData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + DataReplicationProtectedItemData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationProtectedItemData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataReplicationProtectedItemData(document.RootElement, options); + } + + internal static DataReplicationProtectedItemData DeserializeDataReplicationProtectedItemData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DataReplicationProtectedItemProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = DataReplicationProtectedItemProperties.DeserializeDataReplicationProtectedItemProperties(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DataReplicationProtectedItemData( + id, + name, + type, + systemData, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DataReplicationProtectedItemData)} does not support writing '{options.Format}' format."); + } + } + + DataReplicationProtectedItemData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataReplicationProtectedItemData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataReplicationProtectedItemData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationProtectedItemData.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationProtectedItemData.cs new file mode 100644 index 000000000000..98d07e1183ab --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationProtectedItemData.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + /// + /// A class representing the DataReplicationProtectedItem data model. + /// Protected item model. + /// + public partial class DataReplicationProtectedItemData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DataReplicationProtectedItemData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal DataReplicationProtectedItemData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DataReplicationProtectedItemProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public DataReplicationProtectedItemProperties Properties { get; set; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationProtectedItemResource.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationProtectedItemResource.Serialization.cs new file mode 100644 index 000000000000..7d35a8aeef20 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationProtectedItemResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + public partial class DataReplicationProtectedItemResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + DataReplicationProtectedItemData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + DataReplicationProtectedItemData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationProtectedItemResource.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationProtectedItemResource.cs new file mode 100644 index 000000000000..d610ccf560fc --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationProtectedItemResource.cs @@ -0,0 +1,511 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + /// + /// A Class representing a DataReplicationProtectedItem along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetDataReplicationProtectedItemResource method. + /// Otherwise you can get one from its parent resource using the GetDataReplicationProtectedItem method. + /// + public partial class DataReplicationProtectedItemResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The vaultName. + /// The protectedItemName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _dataReplicationProtectedItemProtectedItemClientDiagnostics; + private readonly ProtectedItemRestOperations _dataReplicationProtectedItemProtectedItemRestClient; + private readonly DataReplicationProtectedItemData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.DataReplication/replicationVaults/protectedItems"; + + /// Initializes a new instance of the class for mocking. + protected DataReplicationProtectedItemResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal DataReplicationProtectedItemResource(ArmClient client, DataReplicationProtectedItemData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal DataReplicationProtectedItemResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _dataReplicationProtectedItemProtectedItemClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string dataReplicationProtectedItemProtectedItemApiVersion); + _dataReplicationProtectedItemProtectedItemRestClient = new ProtectedItemRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataReplicationProtectedItemProtectedItemApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual DataReplicationProtectedItemData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// Gets a collection of DataReplicationRecoveryPointResources in the DataReplicationProtectedItem. + /// An object representing collection of DataReplicationRecoveryPointResources and their operations over a DataReplicationRecoveryPointResource. + public virtual DataReplicationRecoveryPointCollection GetDataReplicationRecoveryPoints() + { + return GetCachedClient(client => new DataReplicationRecoveryPointCollection(client, Id)); + } + + /// + /// Gets the details of the recovery point of a protected item. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointName} + /// + /// + /// Operation Id + /// RecoveryPointModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The recovery point name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetDataReplicationRecoveryPointAsync(string recoveryPointName, CancellationToken cancellationToken = default) + { + return await GetDataReplicationRecoveryPoints().GetAsync(recoveryPointName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the details of the recovery point of a protected item. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointName} + /// + /// + /// Operation Id + /// RecoveryPointModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The recovery point name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetDataReplicationRecoveryPoint(string recoveryPointName, CancellationToken cancellationToken = default) + { + return GetDataReplicationRecoveryPoints().Get(recoveryPointName, cancellationToken); + } + + /// + /// Gets the details of the protected item. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName} + /// + /// + /// Operation Id + /// ProtectedItemModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _dataReplicationProtectedItemProtectedItemClientDiagnostics.CreateScope("DataReplicationProtectedItemResource.Get"); + scope.Start(); + try + { + var response = await _dataReplicationProtectedItemProtectedItemRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DataReplicationProtectedItemResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the protected item. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName} + /// + /// + /// Operation Id + /// ProtectedItemModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _dataReplicationProtectedItemProtectedItemClientDiagnostics.CreateScope("DataReplicationProtectedItemResource.Get"); + scope.Start(); + try + { + var response = _dataReplicationProtectedItemProtectedItemRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DataReplicationProtectedItemResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes the protected item. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName} + /// + /// + /// Operation Id + /// ProtectedItemModel_Delete + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// 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. + /// A flag indicating whether to do force delete or not. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, bool? forceDelete = null, CancellationToken cancellationToken = default) + { + using var scope = _dataReplicationProtectedItemProtectedItemClientDiagnostics.CreateScope("DataReplicationProtectedItemResource.Delete"); + scope.Start(); + try + { + var response = await _dataReplicationProtectedItemProtectedItemRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, forceDelete, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(_dataReplicationProtectedItemProtectedItemClientDiagnostics, Pipeline, _dataReplicationProtectedItemProtectedItemRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, forceDelete).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes the protected item. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName} + /// + /// + /// Operation Id + /// ProtectedItemModel_Delete + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// 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. + /// A flag indicating whether to do force delete or not. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, bool? forceDelete = null, CancellationToken cancellationToken = default) + { + using var scope = _dataReplicationProtectedItemProtectedItemClientDiagnostics.CreateScope("DataReplicationProtectedItemResource.Delete"); + scope.Start(); + try + { + var response = _dataReplicationProtectedItemProtectedItemRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, forceDelete, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(_dataReplicationProtectedItemProtectedItemClientDiagnostics, Pipeline, _dataReplicationProtectedItemProtectedItemRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, forceDelete).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Performs update on the protected item. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName} + /// + /// + /// Operation Id + /// ProtectedItemModel_Update + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// 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. + /// Protected item model. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, DataReplicationProtectedItemPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _dataReplicationProtectedItemProtectedItemClientDiagnostics.CreateScope("DataReplicationProtectedItemResource.Update"); + scope.Start(); + try + { + var response = await _dataReplicationProtectedItemProtectedItemRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(new DataReplicationProtectedItemOperationSource(Client), _dataReplicationProtectedItemProtectedItemClientDiagnostics, Pipeline, _dataReplicationProtectedItemProtectedItemRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Performs update on the protected item. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName} + /// + /// + /// Operation Id + /// ProtectedItemModel_Update + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// 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. + /// Protected item model. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, DataReplicationProtectedItemPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _dataReplicationProtectedItemProtectedItemClientDiagnostics.CreateScope("DataReplicationProtectedItemResource.Update"); + scope.Start(); + try + { + var response = _dataReplicationProtectedItemProtectedItemRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(new DataReplicationProtectedItemOperationSource(Client), _dataReplicationProtectedItemProtectedItemClientDiagnostics, Pipeline, _dataReplicationProtectedItemProtectedItemRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Performs the planned failover on the protected item. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName}/plannedFailover + /// + /// + /// Operation Id + /// ProtectedItem_PlannedFailover + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// 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. + /// Planned failover model. + /// The cancellation token to use. + /// is null. + public virtual async Task> PlannedFailoverAsync(WaitUntil waitUntil, PlannedFailover body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using var scope = _dataReplicationProtectedItemProtectedItemClientDiagnostics.CreateScope("DataReplicationProtectedItemResource.PlannedFailover"); + scope.Start(); + try + { + var response = await _dataReplicationProtectedItemProtectedItemRestClient.PlannedFailoverAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(new PlannedFailoverOperationSource(), _dataReplicationProtectedItemProtectedItemClientDiagnostics, Pipeline, _dataReplicationProtectedItemProtectedItemRestClient.CreatePlannedFailoverRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Performs the planned failover on the protected item. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName}/plannedFailover + /// + /// + /// Operation Id + /// ProtectedItem_PlannedFailover + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// 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. + /// Planned failover model. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation PlannedFailover(WaitUntil waitUntil, PlannedFailover body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using var scope = _dataReplicationProtectedItemProtectedItemClientDiagnostics.CreateScope("DataReplicationProtectedItemResource.PlannedFailover"); + scope.Start(); + try + { + var response = _dataReplicationProtectedItemProtectedItemRestClient.PlannedFailover(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(new PlannedFailoverOperationSource(), _dataReplicationProtectedItemProtectedItemClientDiagnostics, Pipeline, _dataReplicationProtectedItemProtectedItemRestClient.CreatePlannedFailoverRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationRecoveryPointCollection.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationRecoveryPointCollection.cs new file mode 100644 index 000000000000..5eebe045bdf2 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationRecoveryPointCollection.cs @@ -0,0 +1,395 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetDataReplicationRecoveryPoints method from an instance of . + /// + public partial class DataReplicationRecoveryPointCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _dataReplicationRecoveryPointRecoveryPointClientDiagnostics; + private readonly RecoveryPointRestOperations _dataReplicationRecoveryPointRecoveryPointRestClient; + + /// Initializes a new instance of the class for mocking. + protected DataReplicationRecoveryPointCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal DataReplicationRecoveryPointCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _dataReplicationRecoveryPointRecoveryPointClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", DataReplicationRecoveryPointResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DataReplicationRecoveryPointResource.ResourceType, out string dataReplicationRecoveryPointRecoveryPointApiVersion); + _dataReplicationRecoveryPointRecoveryPointRestClient = new RecoveryPointRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataReplicationRecoveryPointRecoveryPointApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != DataReplicationProtectedItemResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, DataReplicationProtectedItemResource.ResourceType), nameof(id)); + } + + /// + /// Gets the details of the recovery point of a protected item. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointName} + /// + /// + /// Operation Id + /// RecoveryPointModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The recovery point name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string recoveryPointName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(recoveryPointName, nameof(recoveryPointName)); + + using var scope = _dataReplicationRecoveryPointRecoveryPointClientDiagnostics.CreateScope("DataReplicationRecoveryPointCollection.Get"); + scope.Start(); + try + { + var response = await _dataReplicationRecoveryPointRecoveryPointRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, recoveryPointName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DataReplicationRecoveryPointResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the recovery point of a protected item. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointName} + /// + /// + /// Operation Id + /// RecoveryPointModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The recovery point name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string recoveryPointName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(recoveryPointName, nameof(recoveryPointName)); + + using var scope = _dataReplicationRecoveryPointRecoveryPointClientDiagnostics.CreateScope("DataReplicationRecoveryPointCollection.Get"); + scope.Start(); + try + { + var response = _dataReplicationRecoveryPointRecoveryPointRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, recoveryPointName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DataReplicationRecoveryPointResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the list of recovery points of the given protected item. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName}/recoveryPoints + /// + /// + /// Operation Id + /// RecoveryPointModel_List + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _dataReplicationRecoveryPointRecoveryPointRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataReplicationRecoveryPointRecoveryPointRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DataReplicationRecoveryPointResource(Client, DataReplicationRecoveryPointData.DeserializeDataReplicationRecoveryPointData(e)), _dataReplicationRecoveryPointRecoveryPointClientDiagnostics, Pipeline, "DataReplicationRecoveryPointCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Gets the list of recovery points of the given protected item. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName}/recoveryPoints + /// + /// + /// Operation Id + /// RecoveryPointModel_List + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _dataReplicationRecoveryPointRecoveryPointRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataReplicationRecoveryPointRecoveryPointRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DataReplicationRecoveryPointResource(Client, DataReplicationRecoveryPointData.DeserializeDataReplicationRecoveryPointData(e)), _dataReplicationRecoveryPointRecoveryPointClientDiagnostics, Pipeline, "DataReplicationRecoveryPointCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointName} + /// + /// + /// Operation Id + /// RecoveryPointModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The recovery point name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string recoveryPointName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(recoveryPointName, nameof(recoveryPointName)); + + using var scope = _dataReplicationRecoveryPointRecoveryPointClientDiagnostics.CreateScope("DataReplicationRecoveryPointCollection.Exists"); + scope.Start(); + try + { + var response = await _dataReplicationRecoveryPointRecoveryPointRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, recoveryPointName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointName} + /// + /// + /// Operation Id + /// RecoveryPointModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The recovery point name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string recoveryPointName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(recoveryPointName, nameof(recoveryPointName)); + + using var scope = _dataReplicationRecoveryPointRecoveryPointClientDiagnostics.CreateScope("DataReplicationRecoveryPointCollection.Exists"); + scope.Start(); + try + { + var response = _dataReplicationRecoveryPointRecoveryPointRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, recoveryPointName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointName} + /// + /// + /// Operation Id + /// RecoveryPointModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The recovery point name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string recoveryPointName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(recoveryPointName, nameof(recoveryPointName)); + + using var scope = _dataReplicationRecoveryPointRecoveryPointClientDiagnostics.CreateScope("DataReplicationRecoveryPointCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _dataReplicationRecoveryPointRecoveryPointRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, recoveryPointName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DataReplicationRecoveryPointResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointName} + /// + /// + /// Operation Id + /// RecoveryPointModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The recovery point name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string recoveryPointName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(recoveryPointName, nameof(recoveryPointName)); + + using var scope = _dataReplicationRecoveryPointRecoveryPointClientDiagnostics.CreateScope("DataReplicationRecoveryPointCollection.GetIfExists"); + scope.Start(); + try + { + var response = _dataReplicationRecoveryPointRecoveryPointRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, recoveryPointName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DataReplicationRecoveryPointResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationRecoveryPointData.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationRecoveryPointData.Serialization.cs new file mode 100644 index 000000000000..d6aadbc98f08 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationRecoveryPointData.Serialization.cs @@ -0,0 +1,155 @@ +// 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.Models; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + public partial class DataReplicationRecoveryPointData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationRecoveryPointData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + DataReplicationRecoveryPointData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationRecoveryPointData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataReplicationRecoveryPointData(document.RootElement, options); + } + + internal static DataReplicationRecoveryPointData DeserializeDataReplicationRecoveryPointData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DataReplicationRecoveryPointProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = DataReplicationRecoveryPointProperties.DeserializeDataReplicationRecoveryPointProperties(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DataReplicationRecoveryPointData( + id, + name, + type, + systemData, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DataReplicationRecoveryPointData)} does not support writing '{options.Format}' format."); + } + } + + DataReplicationRecoveryPointData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataReplicationRecoveryPointData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataReplicationRecoveryPointData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationRecoveryPointData.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationRecoveryPointData.cs new file mode 100644 index 000000000000..b9c9609366a2 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationRecoveryPointData.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + /// + /// A class representing the DataReplicationRecoveryPoint data model. + /// Recovery point model. + /// + public partial class DataReplicationRecoveryPointData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal DataReplicationRecoveryPointData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal DataReplicationRecoveryPointData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DataReplicationRecoveryPointProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public DataReplicationRecoveryPointProperties Properties { get; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationRecoveryPointResource.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationRecoveryPointResource.Serialization.cs new file mode 100644 index 000000000000..0ef4b3ded586 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationRecoveryPointResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + public partial class DataReplicationRecoveryPointResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + DataReplicationRecoveryPointData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + DataReplicationRecoveryPointData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationRecoveryPointResource.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationRecoveryPointResource.cs new file mode 100644 index 000000000000..370e6ddb742b --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationRecoveryPointResource.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + /// + /// A Class representing a DataReplicationRecoveryPoint along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetDataReplicationRecoveryPointResource method. + /// Otherwise you can get one from its parent resource using the GetDataReplicationRecoveryPoint method. + /// + public partial class DataReplicationRecoveryPointResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The vaultName. + /// The protectedItemName. + /// The recoveryPointName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, string recoveryPointName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _dataReplicationRecoveryPointRecoveryPointClientDiagnostics; + private readonly RecoveryPointRestOperations _dataReplicationRecoveryPointRecoveryPointRestClient; + private readonly DataReplicationRecoveryPointData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.DataReplication/replicationVaults/protectedItems/recoveryPoints"; + + /// Initializes a new instance of the class for mocking. + protected DataReplicationRecoveryPointResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal DataReplicationRecoveryPointResource(ArmClient client, DataReplicationRecoveryPointData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal DataReplicationRecoveryPointResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _dataReplicationRecoveryPointRecoveryPointClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string dataReplicationRecoveryPointRecoveryPointApiVersion); + _dataReplicationRecoveryPointRecoveryPointRestClient = new RecoveryPointRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataReplicationRecoveryPointRecoveryPointApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual DataReplicationRecoveryPointData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Gets the details of the recovery point of a protected item. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointName} + /// + /// + /// Operation Id + /// RecoveryPointModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _dataReplicationRecoveryPointRecoveryPointClientDiagnostics.CreateScope("DataReplicationRecoveryPointResource.Get"); + scope.Start(); + try + { + var response = await _dataReplicationRecoveryPointRecoveryPointRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DataReplicationRecoveryPointResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the recovery point of a protected item. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName}/recoveryPoints/{recoveryPointName} + /// + /// + /// Operation Id + /// RecoveryPointModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _dataReplicationRecoveryPointRecoveryPointClientDiagnostics.CreateScope("DataReplicationRecoveryPointResource.Get"); + scope.Start(); + try + { + var response = _dataReplicationRecoveryPointRecoveryPointRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DataReplicationRecoveryPointResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationVaultCollection.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationVaultCollection.cs new file mode 100644 index 000000000000..2e720e1628e3 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationVaultCollection.cs @@ -0,0 +1,496 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetDataReplicationVaults method from an instance of . + /// + public partial class DataReplicationVaultCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _dataReplicationVaultVaultClientDiagnostics; + private readonly VaultRestOperations _dataReplicationVaultVaultRestClient; + + /// Initializes a new instance of the class for mocking. + protected DataReplicationVaultCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal DataReplicationVaultCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _dataReplicationVaultVaultClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", DataReplicationVaultResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DataReplicationVaultResource.ResourceType, out string dataReplicationVaultVaultApiVersion); + _dataReplicationVaultVaultRestClient = new VaultRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataReplicationVaultVaultApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceGroupResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceGroupResource.ResourceType), nameof(id)); + } + + /// + /// Creates the vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName} + /// + /// + /// Operation Id + /// VaultModel_Create + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The vault name. + /// Vault properties. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string vaultName, DataReplicationVaultData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _dataReplicationVaultVaultClientDiagnostics.CreateScope("DataReplicationVaultCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _dataReplicationVaultVaultRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, vaultName, data, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(new DataReplicationVaultOperationSource(Client), _dataReplicationVaultVaultClientDiagnostics, Pipeline, _dataReplicationVaultVaultRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, vaultName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates the vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName} + /// + /// + /// Operation Id + /// VaultModel_Create + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The vault name. + /// Vault properties. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string vaultName, DataReplicationVaultData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _dataReplicationVaultVaultClientDiagnostics.CreateScope("DataReplicationVaultCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _dataReplicationVaultVaultRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, vaultName, data, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(new DataReplicationVaultOperationSource(Client), _dataReplicationVaultVaultClientDiagnostics, Pipeline, _dataReplicationVaultVaultRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, vaultName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName} + /// + /// + /// Operation Id + /// VaultModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The vault name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string vaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + + using var scope = _dataReplicationVaultVaultClientDiagnostics.CreateScope("DataReplicationVaultCollection.Get"); + scope.Start(); + try + { + var response = await _dataReplicationVaultVaultRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, vaultName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DataReplicationVaultResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName} + /// + /// + /// Operation Id + /// VaultModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The vault name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string vaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + + using var scope = _dataReplicationVaultVaultClientDiagnostics.CreateScope("DataReplicationVaultCollection.Get"); + scope.Start(); + try + { + var response = _dataReplicationVaultVaultRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, vaultName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DataReplicationVaultResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the list of vaults in the given subscription and resource group. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults + /// + /// + /// Operation Id + /// VaultModel_List + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Continuation token from the previous call. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(string continuationToken = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _dataReplicationVaultVaultRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, continuationToken); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataReplicationVaultVaultRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, continuationToken); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DataReplicationVaultResource(Client, DataReplicationVaultData.DeserializeDataReplicationVaultData(e)), _dataReplicationVaultVaultClientDiagnostics, Pipeline, "DataReplicationVaultCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Gets the list of vaults in the given subscription and resource group. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults + /// + /// + /// Operation Id + /// VaultModel_List + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Continuation token from the previous call. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(string continuationToken = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _dataReplicationVaultVaultRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, continuationToken); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataReplicationVaultVaultRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, continuationToken); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DataReplicationVaultResource(Client, DataReplicationVaultData.DeserializeDataReplicationVaultData(e)), _dataReplicationVaultVaultClientDiagnostics, Pipeline, "DataReplicationVaultCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName} + /// + /// + /// Operation Id + /// VaultModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The vault name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string vaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + + using var scope = _dataReplicationVaultVaultClientDiagnostics.CreateScope("DataReplicationVaultCollection.Exists"); + scope.Start(); + try + { + var response = await _dataReplicationVaultVaultRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, vaultName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName} + /// + /// + /// Operation Id + /// VaultModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The vault name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string vaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + + using var scope = _dataReplicationVaultVaultClientDiagnostics.CreateScope("DataReplicationVaultCollection.Exists"); + scope.Start(); + try + { + var response = _dataReplicationVaultVaultRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, vaultName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName} + /// + /// + /// Operation Id + /// VaultModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The vault name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string vaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + + using var scope = _dataReplicationVaultVaultClientDiagnostics.CreateScope("DataReplicationVaultCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _dataReplicationVaultVaultRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, vaultName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DataReplicationVaultResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName} + /// + /// + /// Operation Id + /// VaultModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The vault name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string vaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + + using var scope = _dataReplicationVaultVaultClientDiagnostics.CreateScope("DataReplicationVaultCollection.GetIfExists"); + scope.Start(); + try + { + var response = _dataReplicationVaultVaultRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, vaultName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DataReplicationVaultResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationVaultData.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationVaultData.Serialization.cs new file mode 100644 index 000000000000..fc5a0723c613 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationVaultData.Serialization.cs @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + public partial class DataReplicationVaultData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationVaultData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"u8); + var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; + JsonSerializer.Serialize(writer, Identity, serializeOptions); + } + } + + DataReplicationVaultData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationVaultData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataReplicationVaultData(document.RootElement, options); + } + + internal static DataReplicationVaultData DeserializeDataReplicationVaultData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DataReplicationVaultProperties properties = default; + ManagedServiceIdentity identity = default; + IDictionary tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = DataReplicationVaultProperties.DeserializeDataReplicationVaultProperties(property.Value, options); + continue; + } + if (property.NameEquals("identity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; + identity = JsonSerializer.Deserialize(property.Value.GetRawText(), serializeOptions); + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("location"u8)) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DataReplicationVaultData( + id, + name, + type, + systemData, + tags ?? new ChangeTrackingDictionary(), + location, + properties, + identity, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DataReplicationVaultData)} does not support writing '{options.Format}' format."); + } + } + + DataReplicationVaultData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataReplicationVaultData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataReplicationVaultData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationVaultData.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationVaultData.cs new file mode 100644 index 000000000000..8cee6912a302 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationVaultData.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 Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + /// + /// A class representing the DataReplicationVault data model. + /// Vault model. + /// + public partial class DataReplicationVaultData : TrackedResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The location. + public DataReplicationVaultData(AzureLocation location) : base(location) + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The resource-specific properties for this resource. + /// The managed service identities assigned to this resource. + /// Keeps track of any properties unknown to the library. + internal DataReplicationVaultData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, DataReplicationVaultProperties properties, ManagedServiceIdentity identity, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + Properties = properties; + Identity = identity; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DataReplicationVaultData() + { + } + + /// The resource-specific properties for this resource. + public DataReplicationVaultProperties Properties { get; set; } + /// The managed service identities assigned to this resource. + public ManagedServiceIdentity Identity { get; set; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationVaultResource.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationVaultResource.Serialization.cs new file mode 100644 index 000000000000..e49fea5e754f --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationVaultResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + public partial class DataReplicationVaultResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + DataReplicationVaultData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + DataReplicationVaultData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationVaultResource.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationVaultResource.cs new file mode 100644 index 000000000000..2a5e07342d49 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationVaultResource.cs @@ -0,0 +1,1328 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + /// + /// A Class representing a DataReplicationVault along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetDataReplicationVaultResource method. + /// Otherwise you can get one from its parent resource using the GetDataReplicationVault method. + /// + public partial class DataReplicationVaultResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The vaultName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string vaultName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _dataReplicationVaultVaultClientDiagnostics; + private readonly VaultRestOperations _dataReplicationVaultVaultRestClient; + private readonly DataReplicationVaultData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.DataReplication/replicationVaults"; + + /// Initializes a new instance of the class for mocking. + protected DataReplicationVaultResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal DataReplicationVaultResource(ArmClient client, DataReplicationVaultData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal DataReplicationVaultResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _dataReplicationVaultVaultClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string dataReplicationVaultVaultApiVersion); + _dataReplicationVaultVaultRestClient = new VaultRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataReplicationVaultVaultApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual DataReplicationVaultData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// Gets a collection of DataReplicationEmailConfigurationResources in the DataReplicationVault. + /// An object representing collection of DataReplicationEmailConfigurationResources and their operations over a DataReplicationEmailConfigurationResource. + public virtual DataReplicationEmailConfigurationCollection GetDataReplicationEmailConfigurations() + { + return GetCachedClient(client => new DataReplicationEmailConfigurationCollection(client, Id)); + } + + /// + /// Gets the details of the alert configuration setting. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/alertSettings/{emailConfigurationName} + /// + /// + /// Operation Id + /// EmailConfigurationModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The email configuration name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetDataReplicationEmailConfigurationAsync(string emailConfigurationName, CancellationToken cancellationToken = default) + { + return await GetDataReplicationEmailConfigurations().GetAsync(emailConfigurationName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the details of the alert configuration setting. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/alertSettings/{emailConfigurationName} + /// + /// + /// Operation Id + /// EmailConfigurationModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The email configuration name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetDataReplicationEmailConfiguration(string emailConfigurationName, CancellationToken cancellationToken = default) + { + return GetDataReplicationEmailConfigurations().Get(emailConfigurationName, cancellationToken); + } + + /// Gets a collection of DataReplicationEventResources in the DataReplicationVault. + /// An object representing collection of DataReplicationEventResources and their operations over a DataReplicationEventResource. + public virtual DataReplicationEventCollection GetDataReplicationEvents() + { + return GetCachedClient(client => new DataReplicationEventCollection(client, Id)); + } + + /// + /// Gets the details of the event. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/events/{eventName} + /// + /// + /// Operation Id + /// EventModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The event name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetDataReplicationEventAsync(string eventName, CancellationToken cancellationToken = default) + { + return await GetDataReplicationEvents().GetAsync(eventName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the details of the event. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/events/{eventName} + /// + /// + /// Operation Id + /// EventModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The event name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetDataReplicationEvent(string eventName, CancellationToken cancellationToken = default) + { + return GetDataReplicationEvents().Get(eventName, cancellationToken); + } + + /// Gets a collection of DataReplicationJobResources in the DataReplicationVault. + /// An object representing collection of DataReplicationJobResources and their operations over a DataReplicationJobResource. + public virtual DataReplicationJobCollection GetDataReplicationJobs() + { + return GetCachedClient(client => new DataReplicationJobCollection(client, Id)); + } + + /// + /// Gets the details of the job. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/jobs/{jobName} + /// + /// + /// Operation Id + /// JobModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The job name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetDataReplicationJobAsync(string jobName, CancellationToken cancellationToken = default) + { + return await GetDataReplicationJobs().GetAsync(jobName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the details of the job. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/jobs/{jobName} + /// + /// + /// Operation Id + /// JobModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The job name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetDataReplicationJob(string jobName, CancellationToken cancellationToken = default) + { + return GetDataReplicationJobs().Get(jobName, cancellationToken); + } + + /// Gets a collection of DataReplicationPolicyResources in the DataReplicationVault. + /// An object representing collection of DataReplicationPolicyResources and their operations over a DataReplicationPolicyResource. + public virtual DataReplicationPolicyCollection GetDataReplicationPolicies() + { + return GetCachedClient(client => new DataReplicationPolicyCollection(client, Id)); + } + + /// + /// Gets the details of the policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationPolicies/{policyName} + /// + /// + /// Operation Id + /// PolicyModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The policy name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetDataReplicationPolicyAsync(string policyName, CancellationToken cancellationToken = default) + { + return await GetDataReplicationPolicies().GetAsync(policyName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the details of the policy. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationPolicies/{policyName} + /// + /// + /// Operation Id + /// PolicyModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The policy name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetDataReplicationPolicy(string policyName, CancellationToken cancellationToken = default) + { + return GetDataReplicationPolicies().Get(policyName, cancellationToken); + } + + /// Gets a collection of DataReplicationPrivateEndpointConnectionResources in the DataReplicationVault. + /// An object representing collection of DataReplicationPrivateEndpointConnectionResources and their operations over a DataReplicationPrivateEndpointConnectionResource. + public virtual DataReplicationPrivateEndpointConnectionCollection GetDataReplicationPrivateEndpointConnections() + { + return GetCachedClient(client => new DataReplicationPrivateEndpointConnectionCollection(client, Id)); + } + + /// + /// Gets the private endpoint connection details. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName} + /// + /// + /// Operation Id + /// PrivateEndpointConnection_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The private endpoint connection name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetDataReplicationPrivateEndpointConnectionAsync(string privateEndpointConnectionName, CancellationToken cancellationToken = default) + { + return await GetDataReplicationPrivateEndpointConnections().GetAsync(privateEndpointConnectionName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the private endpoint connection details. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName} + /// + /// + /// Operation Id + /// PrivateEndpointConnection_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The private endpoint connection name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetDataReplicationPrivateEndpointConnection(string privateEndpointConnectionName, CancellationToken cancellationToken = default) + { + return GetDataReplicationPrivateEndpointConnections().Get(privateEndpointConnectionName, cancellationToken); + } + + /// Gets a collection of DataReplicationPrivateEndpointConnectionProxyResources in the DataReplicationVault. + /// An object representing collection of DataReplicationPrivateEndpointConnectionProxyResources and their operations over a DataReplicationPrivateEndpointConnectionProxyResource. + public virtual DataReplicationPrivateEndpointConnectionProxyCollection GetDataReplicationPrivateEndpointConnectionProxies() + { + return GetCachedClient(client => new DataReplicationPrivateEndpointConnectionProxyCollection(client, Id)); + } + + /// + /// Gets the private endpoint connection proxy details. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/privateEndpointConnectionProxies/{privateEndpointConnectionProxyName} + /// + /// + /// Operation Id + /// PrivateEndpointConnectionProxy_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The private endpoint connection proxy name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetDataReplicationPrivateEndpointConnectionProxyAsync(string privateEndpointConnectionProxyName, CancellationToken cancellationToken = default) + { + return await GetDataReplicationPrivateEndpointConnectionProxies().GetAsync(privateEndpointConnectionProxyName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the private endpoint connection proxy details. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/privateEndpointConnectionProxies/{privateEndpointConnectionProxyName} + /// + /// + /// Operation Id + /// PrivateEndpointConnectionProxy_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The private endpoint connection proxy name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetDataReplicationPrivateEndpointConnectionProxy(string privateEndpointConnectionProxyName, CancellationToken cancellationToken = default) + { + return GetDataReplicationPrivateEndpointConnectionProxies().Get(privateEndpointConnectionProxyName, cancellationToken); + } + + /// Gets a collection of DataReplicationPrivateLinkResources in the DataReplicationVault. + /// An object representing collection of DataReplicationPrivateLinkResources and their operations over a DataReplicationPrivateLinkResource. + public virtual DataReplicationPrivateLinkResourceCollection GetDataReplicationPrivateLinkResources() + { + return GetCachedClient(client => new DataReplicationPrivateLinkResourceCollection(client, Id)); + } + + /// + /// Gets the details of site recovery private link resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/privateLinkResources/{privateLinkResourceName} + /// + /// + /// Operation Id + /// PrivateLinkResource_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The private link name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetDataReplicationPrivateLinkResourceAsync(string privateLinkResourceName, CancellationToken cancellationToken = default) + { + return await GetDataReplicationPrivateLinkResources().GetAsync(privateLinkResourceName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the details of site recovery private link resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/privateLinkResources/{privateLinkResourceName} + /// + /// + /// Operation Id + /// PrivateLinkResource_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The private link name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetDataReplicationPrivateLinkResource(string privateLinkResourceName, CancellationToken cancellationToken = default) + { + return GetDataReplicationPrivateLinkResources().Get(privateLinkResourceName, cancellationToken); + } + + /// Gets a collection of DataReplicationProtectedItemResources in the DataReplicationVault. + /// An object representing collection of DataReplicationProtectedItemResources and their operations over a DataReplicationProtectedItemResource. + public virtual DataReplicationProtectedItemCollection GetDataReplicationProtectedItems() + { + return GetCachedClient(client => new DataReplicationProtectedItemCollection(client, Id)); + } + + /// + /// Gets the details of the protected item. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName} + /// + /// + /// Operation Id + /// ProtectedItemModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The protected item name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetDataReplicationProtectedItemAsync(string protectedItemName, CancellationToken cancellationToken = default) + { + return await GetDataReplicationProtectedItems().GetAsync(protectedItemName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the details of the protected item. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/protectedItems/{protectedItemName} + /// + /// + /// Operation Id + /// ProtectedItemModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The protected item name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetDataReplicationProtectedItem(string protectedItemName, CancellationToken cancellationToken = default) + { + return GetDataReplicationProtectedItems().Get(protectedItemName, cancellationToken); + } + + /// Gets a collection of DataReplicationExtensionResources in the DataReplicationVault. + /// An object representing collection of DataReplicationExtensionResources and their operations over a DataReplicationExtensionResource. + public virtual DataReplicationExtensionCollection GetDataReplicationExtensions() + { + return GetCachedClient(client => new DataReplicationExtensionCollection(client, Id)); + } + + /// + /// Gets the details of the replication extension. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationExtensions/{replicationExtensionName} + /// + /// + /// Operation Id + /// ReplicationExtensionModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The replication extension name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetDataReplicationExtensionAsync(string replicationExtensionName, CancellationToken cancellationToken = default) + { + return await GetDataReplicationExtensions().GetAsync(replicationExtensionName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the details of the replication extension. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName}/replicationExtensions/{replicationExtensionName} + /// + /// + /// Operation Id + /// ReplicationExtensionModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The replication extension name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetDataReplicationExtension(string replicationExtensionName, CancellationToken cancellationToken = default) + { + return GetDataReplicationExtensions().Get(replicationExtensionName, cancellationToken); + } + + /// + /// Gets the details of the vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName} + /// + /// + /// Operation Id + /// VaultModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _dataReplicationVaultVaultClientDiagnostics.CreateScope("DataReplicationVaultResource.Get"); + scope.Start(); + try + { + var response = await _dataReplicationVaultVaultRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DataReplicationVaultResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName} + /// + /// + /// Operation Id + /// VaultModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _dataReplicationVaultVaultClientDiagnostics.CreateScope("DataReplicationVaultResource.Get"); + scope.Start(); + try + { + var response = _dataReplicationVaultVaultRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DataReplicationVaultResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes the vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName} + /// + /// + /// Operation Id + /// VaultModel_Delete + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _dataReplicationVaultVaultClientDiagnostics.CreateScope("DataReplicationVaultResource.Delete"); + scope.Start(); + try + { + var response = await _dataReplicationVaultVaultRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(_dataReplicationVaultVaultClientDiagnostics, Pipeline, _dataReplicationVaultVaultRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes the vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName} + /// + /// + /// Operation Id + /// VaultModel_Delete + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _dataReplicationVaultVaultClientDiagnostics.CreateScope("DataReplicationVaultResource.Delete"); + scope.Start(); + try + { + var response = _dataReplicationVaultVaultRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(_dataReplicationVaultVaultClientDiagnostics, Pipeline, _dataReplicationVaultVaultRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Performs update on the vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName} + /// + /// + /// Operation Id + /// VaultModel_Update + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// 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. + /// Vault properties. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, DataReplicationVaultPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _dataReplicationVaultVaultClientDiagnostics.CreateScope("DataReplicationVaultResource.Update"); + scope.Start(); + try + { + var response = await _dataReplicationVaultVaultRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new RecoveryServicesDataReplicationArmOperation(new DataReplicationVaultOperationSource(Client), _dataReplicationVaultVaultClientDiagnostics, Pipeline, _dataReplicationVaultVaultRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Performs update on the vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName} + /// + /// + /// Operation Id + /// VaultModel_Update + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// 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. + /// Vault properties. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, DataReplicationVaultPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _dataReplicationVaultVaultClientDiagnostics.CreateScope("DataReplicationVaultResource.Update"); + scope.Start(); + try + { + var response = _dataReplicationVaultVaultRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); + var operation = new RecoveryServicesDataReplicationArmOperation(new DataReplicationVaultOperationSource(Client), _dataReplicationVaultVaultClientDiagnostics, Pipeline, _dataReplicationVaultVaultRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName} + /// + /// + /// Operation Id + /// VaultModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _dataReplicationVaultVaultClientDiagnostics.CreateScope("DataReplicationVaultResource.AddTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues[key] = value; + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _dataReplicationVaultVaultRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new DataReplicationVaultResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new DataReplicationVaultPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName} + /// + /// + /// Operation Id + /// VaultModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _dataReplicationVaultVaultClientDiagnostics.CreateScope("DataReplicationVaultResource.AddTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues[key] = value; + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _dataReplicationVaultVaultRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new DataReplicationVaultResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new DataReplicationVaultPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName} + /// + /// + /// Operation Id + /// VaultModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _dataReplicationVaultVaultClientDiagnostics.CreateScope("DataReplicationVaultResource.SetTags"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _dataReplicationVaultVaultRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new DataReplicationVaultResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new DataReplicationVaultPatch(); + patch.Tags.ReplaceWith(tags); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName} + /// + /// + /// Operation Id + /// VaultModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _dataReplicationVaultVaultClientDiagnostics.CreateScope("DataReplicationVaultResource.SetTags"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _dataReplicationVaultVaultRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new DataReplicationVaultResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new DataReplicationVaultPatch(); + patch.Tags.ReplaceWith(tags); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName} + /// + /// + /// Operation Id + /// VaultModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _dataReplicationVaultVaultClientDiagnostics.CreateScope("DataReplicationVaultResource.RemoveTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.Remove(key); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _dataReplicationVaultVaultRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new DataReplicationVaultResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new DataReplicationVaultPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName} + /// + /// + /// Operation Id + /// VaultModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _dataReplicationVaultVaultClientDiagnostics.CreateScope("DataReplicationVaultResource.RemoveTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.Remove(key); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _dataReplicationVaultVaultRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new DataReplicationVaultResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new DataReplicationVaultPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Extensions/MockableRecoveryServicesDataReplicationArmClient.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Extensions/MockableRecoveryServicesDataReplicationArmClient.cs new file mode 100644 index 000000000000..c32531744ad8 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Extensions/MockableRecoveryServicesDataReplicationArmClient.cs @@ -0,0 +1,193 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Mocking +{ + /// A class to add extension methods to ArmClient. + public partial class MockableRecoveryServicesDataReplicationArmClient : ArmResource + { + /// Initializes a new instance of the class for mocking. + protected MockableRecoveryServicesDataReplicationArmClient() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal MockableRecoveryServicesDataReplicationArmClient(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + internal MockableRecoveryServicesDataReplicationArmClient(ArmClient client) : this(client, ResourceIdentifier.Root) + { + } + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual DataReplicationEmailConfigurationResource GetDataReplicationEmailConfigurationResource(ResourceIdentifier id) + { + DataReplicationEmailConfigurationResource.ValidateResourceId(id); + return new DataReplicationEmailConfigurationResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual DataReplicationVaultResource GetDataReplicationVaultResource(ResourceIdentifier id) + { + DataReplicationVaultResource.ValidateResourceId(id); + return new DataReplicationVaultResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual DataReplicationEventResource GetDataReplicationEventResource(ResourceIdentifier id) + { + DataReplicationEventResource.ValidateResourceId(id); + return new DataReplicationEventResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual DataReplicationFabricResource GetDataReplicationFabricResource(ResourceIdentifier id) + { + DataReplicationFabricResource.ValidateResourceId(id); + return new DataReplicationFabricResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual DataReplicationFabricAgentResource GetDataReplicationFabricAgentResource(ResourceIdentifier id) + { + DataReplicationFabricAgentResource.ValidateResourceId(id); + return new DataReplicationFabricAgentResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual DataReplicationJobResource GetDataReplicationJobResource(ResourceIdentifier id) + { + DataReplicationJobResource.ValidateResourceId(id); + return new DataReplicationJobResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual DataReplicationPolicyResource GetDataReplicationPolicyResource(ResourceIdentifier id) + { + DataReplicationPolicyResource.ValidateResourceId(id); + return new DataReplicationPolicyResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual DataReplicationPrivateEndpointConnectionResource GetDataReplicationPrivateEndpointConnectionResource(ResourceIdentifier id) + { + DataReplicationPrivateEndpointConnectionResource.ValidateResourceId(id); + return new DataReplicationPrivateEndpointConnectionResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual DataReplicationPrivateEndpointConnectionProxyResource GetDataReplicationPrivateEndpointConnectionProxyResource(ResourceIdentifier id) + { + DataReplicationPrivateEndpointConnectionProxyResource.ValidateResourceId(id); + return new DataReplicationPrivateEndpointConnectionProxyResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual DataReplicationPrivateLinkResource GetDataReplicationPrivateLinkResource(ResourceIdentifier id) + { + DataReplicationPrivateLinkResource.ValidateResourceId(id); + return new DataReplicationPrivateLinkResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual DataReplicationProtectedItemResource GetDataReplicationProtectedItemResource(ResourceIdentifier id) + { + DataReplicationProtectedItemResource.ValidateResourceId(id); + return new DataReplicationProtectedItemResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual DataReplicationRecoveryPointResource GetDataReplicationRecoveryPointResource(ResourceIdentifier id) + { + DataReplicationRecoveryPointResource.ValidateResourceId(id); + return new DataReplicationRecoveryPointResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual DataReplicationExtensionResource GetDataReplicationExtensionResource(ResourceIdentifier id) + { + DataReplicationExtensionResource.ValidateResourceId(id); + return new DataReplicationExtensionResource(Client, id); + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Extensions/MockableRecoveryServicesDataReplicationResourceGroupResource.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Extensions/MockableRecoveryServicesDataReplicationResourceGroupResource.cs new file mode 100644 index 000000000000..b312d29bee88 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Extensions/MockableRecoveryServicesDataReplicationResourceGroupResource.cs @@ -0,0 +1,262 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Mocking +{ + /// A class to add extension methods to ResourceGroupResource. + public partial class MockableRecoveryServicesDataReplicationResourceGroupResource : ArmResource + { + private ClientDiagnostics _deploymentPreflightClientDiagnostics; + private DeploymentPreflightRestOperations _deploymentPreflightRestClient; + + /// Initializes a new instance of the class for mocking. + protected MockableRecoveryServicesDataReplicationResourceGroupResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal MockableRecoveryServicesDataReplicationResourceGroupResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + private ClientDiagnostics DeploymentPreflightClientDiagnostics => _deploymentPreflightClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", ProviderConstants.DefaultProviderNamespace, Diagnostics); + private DeploymentPreflightRestOperations DeploymentPreflightRestClient => _deploymentPreflightRestClient ??= new DeploymentPreflightRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// Gets a collection of DataReplicationVaultResources in the ResourceGroupResource. + /// An object representing collection of DataReplicationVaultResources and their operations over a DataReplicationVaultResource. + public virtual DataReplicationVaultCollection GetDataReplicationVaults() + { + return GetCachedClient(client => new DataReplicationVaultCollection(client, Id)); + } + + /// + /// Gets the details of the vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName} + /// + /// + /// Operation Id + /// VaultModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The vault name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetDataReplicationVaultAsync(string vaultName, CancellationToken cancellationToken = default) + { + return await GetDataReplicationVaults().GetAsync(vaultName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the details of the vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName} + /// + /// + /// Operation Id + /// VaultModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The vault name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetDataReplicationVault(string vaultName, CancellationToken cancellationToken = default) + { + return GetDataReplicationVaults().Get(vaultName, cancellationToken); + } + + /// Gets a collection of DataReplicationFabricResources in the ResourceGroupResource. + /// An object representing collection of DataReplicationFabricResources and their operations over a DataReplicationFabricResource. + public virtual DataReplicationFabricCollection GetDataReplicationFabrics() + { + return GetCachedClient(client => new DataReplicationFabricCollection(client, Id)); + } + + /// + /// Gets the details of the fabric. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName} + /// + /// + /// Operation Id + /// FabricModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The fabric name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetDataReplicationFabricAsync(string fabricName, CancellationToken cancellationToken = default) + { + return await GetDataReplicationFabrics().GetAsync(fabricName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the details of the fabric. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName} + /// + /// + /// Operation Id + /// FabricModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The fabric name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetDataReplicationFabric(string fabricName, CancellationToken cancellationToken = default) + { + return GetDataReplicationFabrics().Get(fabricName, cancellationToken); + } + + /// + /// Performs resource deployment preflight validation. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/deployments/{deploymentId}/preflight + /// + /// + /// Operation Id + /// DeploymentPreflight_Post + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// + /// Deployment Id. + /// Deployment preflight model. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> PostDeploymentPreflightAsync(string deploymentId, DeploymentPreflight body = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(deploymentId, nameof(deploymentId)); + + using var scope = DeploymentPreflightClientDiagnostics.CreateScope("MockableRecoveryServicesDataReplicationResourceGroupResource.PostDeploymentPreflight"); + scope.Start(); + try + { + var response = await DeploymentPreflightRestClient.PostAsync(Id.SubscriptionId, Id.ResourceGroupName, deploymentId, body, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Performs resource deployment preflight validation. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/deployments/{deploymentId}/preflight + /// + /// + /// Operation Id + /// DeploymentPreflight_Post + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// + /// Deployment Id. + /// Deployment preflight model. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response PostDeploymentPreflight(string deploymentId, DeploymentPreflight body = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(deploymentId, nameof(deploymentId)); + + using var scope = DeploymentPreflightClientDiagnostics.CreateScope("MockableRecoveryServicesDataReplicationResourceGroupResource.PostDeploymentPreflight"); + scope.Start(); + try + { + var response = DeploymentPreflightRestClient.Post(Id.SubscriptionId, Id.ResourceGroupName, deploymentId, body, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Extensions/MockableRecoveryServicesDataReplicationSubscriptionResource.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Extensions/MockableRecoveryServicesDataReplicationSubscriptionResource.cs new file mode 100644 index 000000000000..9d361158821e --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Extensions/MockableRecoveryServicesDataReplicationSubscriptionResource.cs @@ -0,0 +1,245 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Mocking +{ + /// A class to add extension methods to SubscriptionResource. + public partial class MockableRecoveryServicesDataReplicationSubscriptionResource : ArmResource + { + private ClientDiagnostics _dataReplicationVaultVaultClientDiagnostics; + private VaultRestOperations _dataReplicationVaultVaultRestClient; + private ClientDiagnostics _dataReplicationFabricFabricClientDiagnostics; + private FabricRestOperations _dataReplicationFabricFabricRestClient; + private ClientDiagnostics _checkNameAvailabilityClientDiagnostics; + private CheckNameAvailabilityRestOperations _checkNameAvailabilityRestClient; + + /// Initializes a new instance of the class for mocking. + protected MockableRecoveryServicesDataReplicationSubscriptionResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal MockableRecoveryServicesDataReplicationSubscriptionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + private ClientDiagnostics DataReplicationVaultVaultClientDiagnostics => _dataReplicationVaultVaultClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", DataReplicationVaultResource.ResourceType.Namespace, Diagnostics); + private VaultRestOperations DataReplicationVaultVaultRestClient => _dataReplicationVaultVaultRestClient ??= new VaultRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(DataReplicationVaultResource.ResourceType)); + private ClientDiagnostics DataReplicationFabricFabricClientDiagnostics => _dataReplicationFabricFabricClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", DataReplicationFabricResource.ResourceType.Namespace, Diagnostics); + private FabricRestOperations DataReplicationFabricFabricRestClient => _dataReplicationFabricFabricRestClient ??= new FabricRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(DataReplicationFabricResource.ResourceType)); + private ClientDiagnostics CheckNameAvailabilityClientDiagnostics => _checkNameAvailabilityClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.RecoveryServicesDataReplication", ProviderConstants.DefaultProviderNamespace, Diagnostics); + private CheckNameAvailabilityRestOperations CheckNameAvailabilityRestClient => _checkNameAvailabilityRestClient ??= new CheckNameAvailabilityRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// + /// Gets the list of vaults in the given subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.DataReplication/replicationVaults + /// + /// + /// Operation Id + /// VaultModel_ListBySubscription + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetDataReplicationVaultsAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => DataReplicationVaultVaultRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DataReplicationVaultVaultRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DataReplicationVaultResource(Client, DataReplicationVaultData.DeserializeDataReplicationVaultData(e)), DataReplicationVaultVaultClientDiagnostics, Pipeline, "MockableRecoveryServicesDataReplicationSubscriptionResource.GetDataReplicationVaults", "value", "nextLink", cancellationToken); + } + + /// + /// Gets the list of vaults in the given subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.DataReplication/replicationVaults + /// + /// + /// Operation Id + /// VaultModel_ListBySubscription + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetDataReplicationVaults(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => DataReplicationVaultVaultRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DataReplicationVaultVaultRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DataReplicationVaultResource(Client, DataReplicationVaultData.DeserializeDataReplicationVaultData(e)), DataReplicationVaultVaultClientDiagnostics, Pipeline, "MockableRecoveryServicesDataReplicationSubscriptionResource.GetDataReplicationVaults", "value", "nextLink", cancellationToken); + } + + /// + /// Gets the list of fabrics in the given subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.DataReplication/replicationFabrics + /// + /// + /// Operation Id + /// FabricModel_ListBySubscription + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetDataReplicationFabricsAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => DataReplicationFabricFabricRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DataReplicationFabricFabricRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DataReplicationFabricResource(Client, DataReplicationFabricData.DeserializeDataReplicationFabricData(e)), DataReplicationFabricFabricClientDiagnostics, Pipeline, "MockableRecoveryServicesDataReplicationSubscriptionResource.GetDataReplicationFabrics", "value", "nextLink", cancellationToken); + } + + /// + /// Gets the list of fabrics in the given subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.DataReplication/replicationFabrics + /// + /// + /// Operation Id + /// FabricModel_ListBySubscription + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetDataReplicationFabrics(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => DataReplicationFabricFabricRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DataReplicationFabricFabricRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DataReplicationFabricResource(Client, DataReplicationFabricData.DeserializeDataReplicationFabricData(e)), DataReplicationFabricFabricClientDiagnostics, Pipeline, "MockableRecoveryServicesDataReplicationSubscriptionResource.GetDataReplicationFabrics", "value", "nextLink", cancellationToken); + } + + /// + /// Checks the resource name availability. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.DataReplication/locations/{location}/checkNameAvailability + /// + /// + /// Operation Id + /// CheckNameAvailability_Post + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// + /// The name of the Azure region. + /// Resource details. + /// The cancellation token to use. + public virtual async Task> PostCheckNameAvailabilityAsync(AzureLocation location, DataReplicationNameAvailabilityContent content = null, CancellationToken cancellationToken = default) + { + using var scope = CheckNameAvailabilityClientDiagnostics.CreateScope("MockableRecoveryServicesDataReplicationSubscriptionResource.PostCheckNameAvailability"); + scope.Start(); + try + { + var response = await CheckNameAvailabilityRestClient.PostAsync(Id.SubscriptionId, location, content, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks the resource name availability. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.DataReplication/locations/{location}/checkNameAvailability + /// + /// + /// Operation Id + /// CheckNameAvailability_Post + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// + /// The name of the Azure region. + /// Resource details. + /// The cancellation token to use. + public virtual Response PostCheckNameAvailability(AzureLocation location, DataReplicationNameAvailabilityContent content = null, CancellationToken cancellationToken = default) + { + using var scope = CheckNameAvailabilityClientDiagnostics.CreateScope("MockableRecoveryServicesDataReplicationSubscriptionResource.PostCheckNameAvailability"); + scope.Start(); + try + { + var response = CheckNameAvailabilityRestClient.Post(Id.SubscriptionId, location, content, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Extensions/RecoveryServicesDataReplicationExtensions.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Extensions/RecoveryServicesDataReplicationExtensions.cs new file mode 100644 index 000000000000..fbe3ad443a0f --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Extensions/RecoveryServicesDataReplicationExtensions.cs @@ -0,0 +1,747 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.ResourceManager.RecoveryServicesDataReplication.Mocking; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + /// A class to add extension methods to Azure.ResourceManager.RecoveryServicesDataReplication. + public static partial class RecoveryServicesDataReplicationExtensions + { + private static MockableRecoveryServicesDataReplicationArmClient GetMockableRecoveryServicesDataReplicationArmClient(ArmClient client) + { + return client.GetCachedClient(client0 => new MockableRecoveryServicesDataReplicationArmClient(client0)); + } + + private static MockableRecoveryServicesDataReplicationResourceGroupResource GetMockableRecoveryServicesDataReplicationResourceGroupResource(ArmResource resource) + { + return resource.GetCachedClient(client => new MockableRecoveryServicesDataReplicationResourceGroupResource(client, resource.Id)); + } + + private static MockableRecoveryServicesDataReplicationSubscriptionResource GetMockableRecoveryServicesDataReplicationSubscriptionResource(ArmResource resource) + { + return resource.GetCachedClient(client => new MockableRecoveryServicesDataReplicationSubscriptionResource(client, resource.Id)); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static DataReplicationEmailConfigurationResource GetDataReplicationEmailConfigurationResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableRecoveryServicesDataReplicationArmClient(client).GetDataReplicationEmailConfigurationResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static DataReplicationVaultResource GetDataReplicationVaultResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableRecoveryServicesDataReplicationArmClient(client).GetDataReplicationVaultResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static DataReplicationEventResource GetDataReplicationEventResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableRecoveryServicesDataReplicationArmClient(client).GetDataReplicationEventResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static DataReplicationFabricResource GetDataReplicationFabricResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableRecoveryServicesDataReplicationArmClient(client).GetDataReplicationFabricResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static DataReplicationFabricAgentResource GetDataReplicationFabricAgentResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableRecoveryServicesDataReplicationArmClient(client).GetDataReplicationFabricAgentResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static DataReplicationJobResource GetDataReplicationJobResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableRecoveryServicesDataReplicationArmClient(client).GetDataReplicationJobResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static DataReplicationPolicyResource GetDataReplicationPolicyResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableRecoveryServicesDataReplicationArmClient(client).GetDataReplicationPolicyResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static DataReplicationPrivateEndpointConnectionResource GetDataReplicationPrivateEndpointConnectionResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableRecoveryServicesDataReplicationArmClient(client).GetDataReplicationPrivateEndpointConnectionResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static DataReplicationPrivateEndpointConnectionProxyResource GetDataReplicationPrivateEndpointConnectionProxyResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableRecoveryServicesDataReplicationArmClient(client).GetDataReplicationPrivateEndpointConnectionProxyResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static DataReplicationPrivateLinkResource GetDataReplicationPrivateLinkResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableRecoveryServicesDataReplicationArmClient(client).GetDataReplicationPrivateLinkResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static DataReplicationProtectedItemResource GetDataReplicationProtectedItemResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableRecoveryServicesDataReplicationArmClient(client).GetDataReplicationProtectedItemResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static DataReplicationRecoveryPointResource GetDataReplicationRecoveryPointResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableRecoveryServicesDataReplicationArmClient(client).GetDataReplicationRecoveryPointResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static DataReplicationExtensionResource GetDataReplicationExtensionResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableRecoveryServicesDataReplicationArmClient(client).GetDataReplicationExtensionResource(id); + } + + /// + /// Gets a collection of DataReplicationVaultResources in the ResourceGroupResource. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// is null. + /// An object representing collection of DataReplicationVaultResources and their operations over a DataReplicationVaultResource. + public static DataReplicationVaultCollection GetDataReplicationVaults(this ResourceGroupResource resourceGroupResource) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableRecoveryServicesDataReplicationResourceGroupResource(resourceGroupResource).GetDataReplicationVaults(); + } + + /// + /// Gets the details of the vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName} + /// + /// + /// Operation Id + /// VaultModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The vault name. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static async Task> GetDataReplicationVaultAsync(this ResourceGroupResource resourceGroupResource, string vaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return await GetMockableRecoveryServicesDataReplicationResourceGroupResource(resourceGroupResource).GetDataReplicationVaultAsync(vaultName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the details of the vault. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationVaults/{vaultName} + /// + /// + /// Operation Id + /// VaultModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The vault name. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static Response GetDataReplicationVault(this ResourceGroupResource resourceGroupResource, string vaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableRecoveryServicesDataReplicationResourceGroupResource(resourceGroupResource).GetDataReplicationVault(vaultName, cancellationToken); + } + + /// + /// Gets a collection of DataReplicationFabricResources in the ResourceGroupResource. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// is null. + /// An object representing collection of DataReplicationFabricResources and their operations over a DataReplicationFabricResource. + public static DataReplicationFabricCollection GetDataReplicationFabrics(this ResourceGroupResource resourceGroupResource) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableRecoveryServicesDataReplicationResourceGroupResource(resourceGroupResource).GetDataReplicationFabrics(); + } + + /// + /// Gets the details of the fabric. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName} + /// + /// + /// Operation Id + /// FabricModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The fabric name. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static async Task> GetDataReplicationFabricAsync(this ResourceGroupResource resourceGroupResource, string fabricName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return await GetMockableRecoveryServicesDataReplicationResourceGroupResource(resourceGroupResource).GetDataReplicationFabricAsync(fabricName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the details of the fabric. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/replicationFabrics/{fabricName} + /// + /// + /// Operation Id + /// FabricModel_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The fabric name. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static Response GetDataReplicationFabric(this ResourceGroupResource resourceGroupResource, string fabricName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableRecoveryServicesDataReplicationResourceGroupResource(resourceGroupResource).GetDataReplicationFabric(fabricName, cancellationToken); + } + + /// + /// Performs resource deployment preflight validation. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/deployments/{deploymentId}/preflight + /// + /// + /// Operation Id + /// DeploymentPreflight_Post + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// Deployment Id. + /// Deployment preflight model. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public static async Task> PostDeploymentPreflightAsync(this ResourceGroupResource resourceGroupResource, string deploymentId, DeploymentPreflight body = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return await GetMockableRecoveryServicesDataReplicationResourceGroupResource(resourceGroupResource).PostDeploymentPreflightAsync(deploymentId, body, cancellationToken).ConfigureAwait(false); + } + + /// + /// Performs resource deployment preflight validation. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataReplication/deployments/{deploymentId}/preflight + /// + /// + /// Operation Id + /// DeploymentPreflight_Post + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// Deployment Id. + /// Deployment preflight model. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public static Response PostDeploymentPreflight(this ResourceGroupResource resourceGroupResource, string deploymentId, DeploymentPreflight body = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableRecoveryServicesDataReplicationResourceGroupResource(resourceGroupResource).PostDeploymentPreflight(deploymentId, body, cancellationToken); + } + + /// + /// Gets the list of vaults in the given subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.DataReplication/replicationVaults + /// + /// + /// Operation Id + /// VaultModel_ListBySubscription + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// is null. + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetDataReplicationVaultsAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableRecoveryServicesDataReplicationSubscriptionResource(subscriptionResource).GetDataReplicationVaultsAsync(cancellationToken); + } + + /// + /// Gets the list of vaults in the given subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.DataReplication/replicationVaults + /// + /// + /// Operation Id + /// VaultModel_ListBySubscription + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// is null. + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetDataReplicationVaults(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableRecoveryServicesDataReplicationSubscriptionResource(subscriptionResource).GetDataReplicationVaults(cancellationToken); + } + + /// + /// Gets the list of fabrics in the given subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.DataReplication/replicationFabrics + /// + /// + /// Operation Id + /// FabricModel_ListBySubscription + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// is null. + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetDataReplicationFabricsAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableRecoveryServicesDataReplicationSubscriptionResource(subscriptionResource).GetDataReplicationFabricsAsync(cancellationToken); + } + + /// + /// Gets the list of fabrics in the given subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.DataReplication/replicationFabrics + /// + /// + /// Operation Id + /// FabricModel_ListBySubscription + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// is null. + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetDataReplicationFabrics(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableRecoveryServicesDataReplicationSubscriptionResource(subscriptionResource).GetDataReplicationFabrics(cancellationToken); + } + + /// + /// Checks the resource name availability. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.DataReplication/locations/{location}/checkNameAvailability + /// + /// + /// Operation Id + /// CheckNameAvailability_Post + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Azure region. + /// Resource details. + /// The cancellation token to use. + /// is null. + public static async Task> PostCheckNameAvailabilityAsync(this SubscriptionResource subscriptionResource, AzureLocation location, DataReplicationNameAvailabilityContent content = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return await GetMockableRecoveryServicesDataReplicationSubscriptionResource(subscriptionResource).PostCheckNameAvailabilityAsync(location, content, cancellationToken).ConfigureAwait(false); + } + + /// + /// Checks the resource name availability. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.DataReplication/locations/{location}/checkNameAvailability + /// + /// + /// Operation Id + /// CheckNameAvailability_Post + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Azure region. + /// Resource details. + /// The cancellation token to use. + /// is null. + public static Response PostCheckNameAvailability(this SubscriptionResource subscriptionResource, AzureLocation location, DataReplicationNameAvailabilityContent content = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableRecoveryServicesDataReplicationSubscriptionResource(subscriptionResource).PostCheckNameAvailability(location, content, cancellationToken); + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Internal/Argument.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Internal/Argument.cs new file mode 100644 index 000000000000..9c62a091425c --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Internal/Argument.cs @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + internal static class Argument + { + public static void AssertNotNull(T value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + } + + public static void AssertNotNull(T? value, string name) + where T : struct + { + if (!value.HasValue) + { + throw new ArgumentNullException(name); + } + } + + public static void AssertNotNullOrEmpty(IEnumerable value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + if (value is ICollection collectionOfT && collectionOfT.Count == 0) + { + throw new ArgumentException("Value cannot be an empty collection.", name); + } + if (value is ICollection collection && collection.Count == 0) + { + throw new ArgumentException("Value cannot be an empty collection.", name); + } + using IEnumerator e = value.GetEnumerator(); + if (!e.MoveNext()) + { + throw new ArgumentException("Value cannot be an empty collection.", name); + } + } + + public static void AssertNotNullOrEmpty(string value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + if (value.Length == 0) + { + throw new ArgumentException("Value cannot be an empty string.", name); + } + } + + public static void AssertNotNullOrWhiteSpace(string value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + if (string.IsNullOrWhiteSpace(value)) + { + throw new ArgumentException("Value cannot be empty or contain only white-space characters.", name); + } + } + + public static void AssertNotDefault(ref T value, string name) + where T : struct, IEquatable + { + if (value.Equals(default)) + { + throw new ArgumentException("Value cannot be empty.", name); + } + } + + public static void AssertInRange(T value, T minimum, T maximum, string name) + where T : notnull, IComparable + { + if (minimum.CompareTo(value) > 0) + { + throw new ArgumentOutOfRangeException(name, "Value is less than the minimum allowed."); + } + if (maximum.CompareTo(value) < 0) + { + throw new ArgumentOutOfRangeException(name, "Value is greater than the maximum allowed."); + } + } + + public static void AssertEnumDefined(Type enumType, object value, string name) + { + if (!Enum.IsDefined(enumType, value)) + { + throw new ArgumentException($"Value not defined for {enumType.FullName}.", name); + } + } + + public static T CheckNotNull(T value, string name) + where T : class + { + AssertNotNull(value, name); + return value; + } + + public static string CheckNotNullOrEmpty(string value, string name) + { + AssertNotNullOrEmpty(value, name); + return value; + } + + public static void AssertNull(T value, string name, string message = null) + { + if (value != null) + { + throw new ArgumentException(message ?? "Value must be null.", name); + } + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Internal/ChangeTrackingDictionary.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Internal/ChangeTrackingDictionary.cs new file mode 100644 index 000000000000..c13f7c82b016 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Internal/ChangeTrackingDictionary.cs @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + internal class ChangeTrackingDictionary : IDictionary, IReadOnlyDictionary where TKey : notnull + { + private IDictionary _innerDictionary; + + public ChangeTrackingDictionary() + { + } + + public ChangeTrackingDictionary(IDictionary dictionary) + { + if (dictionary == null) + { + return; + } + _innerDictionary = new Dictionary(dictionary); + } + + public ChangeTrackingDictionary(IReadOnlyDictionary dictionary) + { + if (dictionary == null) + { + return; + } + _innerDictionary = new Dictionary(); + foreach (var pair in dictionary) + { + _innerDictionary.Add(pair); + } + } + + public bool IsUndefined => _innerDictionary == null; + + public int Count => IsUndefined ? 0 : EnsureDictionary().Count; + + public bool IsReadOnly => IsUndefined ? false : EnsureDictionary().IsReadOnly; + + public ICollection Keys => IsUndefined ? Array.Empty() : EnsureDictionary().Keys; + + public ICollection Values => IsUndefined ? Array.Empty() : EnsureDictionary().Values; + + public TValue this[TKey key] + { + get + { + if (IsUndefined) + { + throw new KeyNotFoundException(nameof(key)); + } + return EnsureDictionary()[key]; + } + set + { + EnsureDictionary()[key] = value; + } + } + + IEnumerable IReadOnlyDictionary.Keys => Keys; + + IEnumerable IReadOnlyDictionary.Values => Values; + + public IEnumerator> GetEnumerator() + { + if (IsUndefined) + { + IEnumerator> enumerateEmpty() + { + yield break; + } + return enumerateEmpty(); + } + return EnsureDictionary().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + public void Add(KeyValuePair item) + { + EnsureDictionary().Add(item); + } + + public void Clear() + { + EnsureDictionary().Clear(); + } + + public bool Contains(KeyValuePair item) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().Contains(item); + } + + public void CopyTo(KeyValuePair[] array, int index) + { + if (IsUndefined) + { + return; + } + EnsureDictionary().CopyTo(array, index); + } + + public bool Remove(KeyValuePair item) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().Remove(item); + } + + public void Add(TKey key, TValue value) + { + EnsureDictionary().Add(key, value); + } + + public bool ContainsKey(TKey key) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().ContainsKey(key); + } + + public bool Remove(TKey key) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().Remove(key); + } + + public bool TryGetValue(TKey key, out TValue value) + { + if (IsUndefined) + { + value = default; + return false; + } + return EnsureDictionary().TryGetValue(key, out value); + } + + public IDictionary EnsureDictionary() + { + return _innerDictionary ??= new Dictionary(); + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Internal/ChangeTrackingList.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Internal/ChangeTrackingList.cs new file mode 100644 index 000000000000..e0c7e0652299 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Internal/ChangeTrackingList.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + internal class ChangeTrackingList : IList, IReadOnlyList + { + private IList _innerList; + + public ChangeTrackingList() + { + } + + public ChangeTrackingList(IList innerList) + { + if (innerList != null) + { + _innerList = innerList; + } + } + + public ChangeTrackingList(IReadOnlyList innerList) + { + if (innerList != null) + { + _innerList = innerList.ToList(); + } + } + + public bool IsUndefined => _innerList == null; + + public int Count => IsUndefined ? 0 : EnsureList().Count; + + public bool IsReadOnly => IsUndefined ? false : EnsureList().IsReadOnly; + + public T this[int index] + { + get + { + if (IsUndefined) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + return EnsureList()[index]; + } + set + { + if (IsUndefined) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + EnsureList()[index] = value; + } + } + + public void Reset() + { + _innerList = null; + } + + public IEnumerator GetEnumerator() + { + if (IsUndefined) + { + IEnumerator enumerateEmpty() + { + yield break; + } + return enumerateEmpty(); + } + return EnsureList().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + public void Add(T item) + { + EnsureList().Add(item); + } + + public void Clear() + { + EnsureList().Clear(); + } + + public bool Contains(T item) + { + if (IsUndefined) + { + return false; + } + return EnsureList().Contains(item); + } + + public void CopyTo(T[] array, int arrayIndex) + { + if (IsUndefined) + { + return; + } + EnsureList().CopyTo(array, arrayIndex); + } + + public bool Remove(T item) + { + if (IsUndefined) + { + return false; + } + return EnsureList().Remove(item); + } + + public int IndexOf(T item) + { + if (IsUndefined) + { + return -1; + } + return EnsureList().IndexOf(item); + } + + public void Insert(int index, T item) + { + EnsureList().Insert(index, item); + } + + public void RemoveAt(int index) + { + if (IsUndefined) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + EnsureList().RemoveAt(index); + } + + public IList EnsureList() + { + return _innerList ??= new List(); + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Internal/ModelSerializationExtensions.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Internal/ModelSerializationExtensions.cs new file mode 100644 index 000000000000..1593c362e28f --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Internal/ModelSerializationExtensions.cs @@ -0,0 +1,399 @@ +// 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.Diagnostics; +using System.Globalization; +using System.Text.Json; +using System.Xml; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + internal static class ModelSerializationExtensions + { + internal static readonly JsonDocumentOptions JsonDocumentOptions = new JsonDocumentOptions { MaxDepth = 256 }; + internal static readonly ModelReaderWriterOptions WireOptions = new ModelReaderWriterOptions("W"); + + public static object GetObject(this JsonElement element) + { + switch (element.ValueKind) + { + case JsonValueKind.String: + return element.GetString(); + case JsonValueKind.Number: + if (element.TryGetInt32(out int intValue)) + { + return intValue; + } + if (element.TryGetInt64(out long longValue)) + { + return longValue; + } + return element.GetDouble(); + case JsonValueKind.True: + return true; + case JsonValueKind.False: + return false; + case JsonValueKind.Undefined: + case JsonValueKind.Null: + return null; + case JsonValueKind.Object: + var dictionary = new Dictionary(); + foreach (var jsonProperty in element.EnumerateObject()) + { + dictionary.Add(jsonProperty.Name, jsonProperty.Value.GetObject()); + } + return dictionary; + case JsonValueKind.Array: + var list = new List(); + foreach (var item in element.EnumerateArray()) + { + list.Add(item.GetObject()); + } + return list.ToArray(); + default: + throw new NotSupportedException($"Not supported value kind {element.ValueKind}"); + } + } + + public static byte[] GetBytesFromBase64(this JsonElement element, string format) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + + return format switch + { + "U" => TypeFormatters.FromBase64UrlString(element.GetRequiredString()), + "D" => element.GetBytesFromBase64(), + _ => throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)) + }; + } + + public static DateTimeOffset GetDateTimeOffset(this JsonElement element, string format) => format switch + { + "U" when element.ValueKind == JsonValueKind.Number => DateTimeOffset.FromUnixTimeSeconds(element.GetInt64()), + _ => TypeFormatters.ParseDateTimeOffset(element.GetString(), format) + }; + + public static TimeSpan GetTimeSpan(this JsonElement element, string format) => TypeFormatters.ParseTimeSpan(element.GetString(), format); + + public static char GetChar(this JsonElement element) + { + if (element.ValueKind == JsonValueKind.String) + { + var text = element.GetString(); + if (text == null || text.Length != 1) + { + throw new NotSupportedException($"Cannot convert \"{text}\" to a char"); + } + return text[0]; + } + else + { + throw new NotSupportedException($"Cannot convert {element.ValueKind} to a char"); + } + } + + [Conditional("DEBUG")] + public static void ThrowNonNullablePropertyIsNull(this JsonProperty property) + { + throw new JsonException($"A property '{property.Name}' defined as non-nullable but received as null from the service. This exception only happens in DEBUG builds of the library and would be ignored in the release build"); + } + + public static string GetRequiredString(this JsonElement element) + { + var value = element.GetString(); + if (value == null) + { + throw new InvalidOperationException($"The requested operation requires an element of type 'String', but the target element has type '{element.ValueKind}'."); + } + return value; + } + + public static void WriteStringValue(this Utf8JsonWriter writer, DateTimeOffset value, string format) + { + writer.WriteStringValue(TypeFormatters.ToString(value, format)); + } + + public static void WriteStringValue(this Utf8JsonWriter writer, DateTime value, string format) + { + writer.WriteStringValue(TypeFormatters.ToString(value, format)); + } + + public static void WriteStringValue(this Utf8JsonWriter writer, TimeSpan value, string format) + { + writer.WriteStringValue(TypeFormatters.ToString(value, format)); + } + + public static void WriteStringValue(this Utf8JsonWriter writer, char value) + { + writer.WriteStringValue(value.ToString(CultureInfo.InvariantCulture)); + } + + public static void WriteBase64StringValue(this Utf8JsonWriter writer, byte[] value, string format) + { + if (value == null) + { + writer.WriteNullValue(); + return; + } + switch (format) + { + case "U": + writer.WriteStringValue(TypeFormatters.ToBase64UrlString(value)); + break; + case "D": + writer.WriteBase64StringValue(value); + break; + default: + throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)); + } + } + + public static void WriteNumberValue(this Utf8JsonWriter writer, DateTimeOffset value, string format) + { + if (format != "U") + { + throw new ArgumentOutOfRangeException(nameof(format), "Only 'U' format is supported when writing a DateTimeOffset as a Number."); + } + writer.WriteNumberValue(value.ToUnixTimeSeconds()); + } + + public static void WriteObjectValue(this Utf8JsonWriter writer, T value, ModelReaderWriterOptions options = null) + { + switch (value) + { + case null: + writer.WriteNullValue(); + break; + case IJsonModel jsonModel: + jsonModel.Write(writer, options ?? WireOptions); + break; + case IUtf8JsonSerializable serializable: + serializable.Write(writer); + break; + case byte[] bytes: + writer.WriteBase64StringValue(bytes); + break; + case BinaryData bytes0: + writer.WriteBase64StringValue(bytes0); + break; + case JsonElement json: + json.WriteTo(writer); + break; + case int i: + writer.WriteNumberValue(i); + break; + case decimal d: + writer.WriteNumberValue(d); + break; + case double d0: + if (double.IsNaN(d0)) + { + writer.WriteStringValue("NaN"); + } + else + { + writer.WriteNumberValue(d0); + } + break; + case float f: + writer.WriteNumberValue(f); + break; + case long l: + writer.WriteNumberValue(l); + break; + case string s: + writer.WriteStringValue(s); + break; + case bool b: + writer.WriteBooleanValue(b); + break; + case Guid g: + writer.WriteStringValue(g); + break; + case DateTimeOffset dateTimeOffset: + writer.WriteStringValue(dateTimeOffset, "O"); + break; + case DateTime dateTime: + writer.WriteStringValue(dateTime, "O"); + break; + case IEnumerable> enumerable: + writer.WriteStartObject(); + foreach (var pair in enumerable) + { + writer.WritePropertyName(pair.Key); + writer.WriteObjectValue(pair.Value, options); + } + writer.WriteEndObject(); + break; + case IEnumerable objectEnumerable: + writer.WriteStartArray(); + foreach (var item in objectEnumerable) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + break; + case TimeSpan timeSpan: + writer.WriteStringValue(timeSpan, "P"); + break; + default: + throw new NotSupportedException($"Not supported type {value.GetType()}"); + } + } + + public static void WriteObjectValue(this Utf8JsonWriter writer, object value, ModelReaderWriterOptions options = null) + { + writer.WriteObjectValue(value, options); + } + + internal static class TypeFormatters + { + private const string RoundtripZFormat = "yyyy-MM-ddTHH:mm:ss.fffffffZ"; + public const string DefaultNumberFormat = "G"; + + public static string ToString(bool value) => value ? "true" : "false"; + + public static string ToString(DateTime value, string format) => value.Kind switch + { + DateTimeKind.Utc => ToString((DateTimeOffset)value, format), + _ => throw new NotSupportedException($"DateTime {value} has a Kind of {value.Kind}. Azure SDK requires it to be UTC. You can call DateTime.SpecifyKind to change Kind property value to DateTimeKind.Utc.") + }; + + public static string ToString(DateTimeOffset value, string format) => format switch + { + "D" => value.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture), + "U" => value.ToUnixTimeSeconds().ToString(CultureInfo.InvariantCulture), + "O" => value.ToUniversalTime().ToString(RoundtripZFormat, CultureInfo.InvariantCulture), + "o" => value.ToUniversalTime().ToString(RoundtripZFormat, CultureInfo.InvariantCulture), + "R" => value.ToString("r", CultureInfo.InvariantCulture), + _ => value.ToString(format, CultureInfo.InvariantCulture) + }; + + public static string ToString(TimeSpan value, string format) => format switch + { + "P" => XmlConvert.ToString(value), + _ => value.ToString(format, CultureInfo.InvariantCulture) + }; + + public static string ToString(byte[] value, string format) => format switch + { + "U" => ToBase64UrlString(value), + "D" => Convert.ToBase64String(value), + _ => throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)) + }; + + public static string ToBase64UrlString(byte[] value) + { + int numWholeOrPartialInputBlocks = checked(value.Length + 2) / 3; + int size = checked(numWholeOrPartialInputBlocks * 4); + char[] output = new char[size]; + + int numBase64Chars = Convert.ToBase64CharArray(value, 0, value.Length, output, 0); + + int i = 0; + for (; i < numBase64Chars; i++) + { + char ch = output[i]; + if (ch == '+') + { + output[i] = '-'; + } + else + { + if (ch == '/') + { + output[i] = '_'; + } + else + { + if (ch == '=') + { + break; + } + } + } + } + + return new string(output, 0, i); + } + + public static byte[] FromBase64UrlString(string value) + { + int paddingCharsToAdd = (value.Length % 4) switch + { + 0 => 0, + 2 => 2, + 3 => 1, + _ => throw new InvalidOperationException("Malformed input") + }; + char[] output = new char[(value.Length + paddingCharsToAdd)]; + int i = 0; + for (; i < value.Length; i++) + { + char ch = value[i]; + if (ch == '-') + { + output[i] = '+'; + } + else + { + if (ch == '_') + { + output[i] = '/'; + } + else + { + output[i] = ch; + } + } + } + + for (; i < output.Length; i++) + { + output[i] = '='; + } + + return Convert.FromBase64CharArray(output, 0, output.Length); + } + + public static DateTimeOffset ParseDateTimeOffset(string value, string format) => format switch + { + "U" => DateTimeOffset.FromUnixTimeSeconds(long.Parse(value, CultureInfo.InvariantCulture)), + _ => DateTimeOffset.Parse(value, CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal) + }; + + public static TimeSpan ParseTimeSpan(string value, string format) => format switch + { + "P" => XmlConvert.ToTimeSpan(value), + _ => TimeSpan.ParseExact(value, format, CultureInfo.InvariantCulture) + }; + + public static string ConvertToString(object value, string format = null) => value switch + { + null => "null", + string s => s, + bool b => ToString(b), + int or float or double or long or decimal => ((IFormattable)value).ToString(DefaultNumberFormat, CultureInfo.InvariantCulture), + byte[] b0 when format != null => ToString(b0, format), + IEnumerable s0 => string.Join(",", s0), + DateTimeOffset dateTime when format != null => ToString(dateTime, format), + TimeSpan timeSpan when format != null => ToString(timeSpan, format), + TimeSpan timeSpan0 => XmlConvert.ToString(timeSpan0), + Guid guid => guid.ToString(), + BinaryData binaryData => ConvertToString(binaryData.ToArray(), format), + _ => value.ToString() + }; + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Internal/Optional.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Internal/Optional.cs new file mode 100644 index 000000000000..9843364940f5 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Internal/Optional.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + internal static class Optional + { + public static bool IsCollectionDefined(IEnumerable collection) + { + return !(collection is ChangeTrackingList changeTrackingList && changeTrackingList.IsUndefined); + } + + public static bool IsCollectionDefined(IDictionary collection) + { + return !(collection is ChangeTrackingDictionary changeTrackingDictionary && changeTrackingDictionary.IsUndefined); + } + + public static bool IsCollectionDefined(IReadOnlyDictionary collection) + { + return !(collection is ChangeTrackingDictionary changeTrackingDictionary && changeTrackingDictionary.IsUndefined); + } + + public static bool IsDefined(T? value) + where T : struct + { + return value.HasValue; + } + + public static bool IsDefined(object value) + { + return value != null; + } + + public static bool IsDefined(JsonElement value) + { + return value.ValueKind != JsonValueKind.Undefined; + } + + public static bool IsDefined(string value) + { + return value != null; + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Internal/Utf8JsonRequestContent.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Internal/Utf8JsonRequestContent.cs new file mode 100644 index 000000000000..97644ff6907d --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Internal/Utf8JsonRequestContent.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.IO; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + internal class Utf8JsonRequestContent : RequestContent + { + private readonly MemoryStream _stream; + private readonly RequestContent _content; + + public Utf8JsonRequestContent() + { + _stream = new MemoryStream(); + _content = Create(_stream); + JsonWriter = new Utf8JsonWriter(_stream); + } + + public Utf8JsonWriter JsonWriter { get; } + + public override async Task WriteToAsync(Stream stream, CancellationToken cancellationToken = default) + { + await JsonWriter.FlushAsync().ConfigureAwait(false); + await _content.WriteToAsync(stream, cancellationToken).ConfigureAwait(false); + } + + public override void WriteTo(Stream stream, CancellationToken cancellationToken = default) + { + JsonWriter.Flush(); + _content.WriteTo(stream, cancellationToken); + } + + public override bool TryComputeLength(out long length) + { + length = JsonWriter.BytesCommitted + JsonWriter.BytesPending; + return true; + } + + public override void Dispose() + { + JsonWriter.Dispose(); + _content.Dispose(); + _stream.Dispose(); + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/DataReplicationExtensionOperationSource.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/DataReplicationExtensionOperationSource.cs new file mode 100644 index 000000000000..92c91d0d1130 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/DataReplicationExtensionOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + internal class DataReplicationExtensionOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal DataReplicationExtensionOperationSource(ArmClient client) + { + _client = client; + } + + DataReplicationExtensionResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return new DataReplicationExtensionResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return await Task.FromResult(new DataReplicationExtensionResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/DataReplicationFabricAgentOperationSource.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/DataReplicationFabricAgentOperationSource.cs new file mode 100644 index 000000000000..d505949eb0b8 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/DataReplicationFabricAgentOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + internal class DataReplicationFabricAgentOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal DataReplicationFabricAgentOperationSource(ArmClient client) + { + _client = client; + } + + DataReplicationFabricAgentResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return new DataReplicationFabricAgentResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return await Task.FromResult(new DataReplicationFabricAgentResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/DataReplicationFabricOperationSource.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/DataReplicationFabricOperationSource.cs new file mode 100644 index 000000000000..4b6a206314d5 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/DataReplicationFabricOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + internal class DataReplicationFabricOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal DataReplicationFabricOperationSource(ArmClient client) + { + _client = client; + } + + DataReplicationFabricResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return new DataReplicationFabricResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return await Task.FromResult(new DataReplicationFabricResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/DataReplicationPolicyOperationSource.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/DataReplicationPolicyOperationSource.cs new file mode 100644 index 000000000000..d8fe678f5d16 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/DataReplicationPolicyOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + internal class DataReplicationPolicyOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal DataReplicationPolicyOperationSource(ArmClient client) + { + _client = client; + } + + DataReplicationPolicyResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return new DataReplicationPolicyResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return await Task.FromResult(new DataReplicationPolicyResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/DataReplicationProtectedItemOperationSource.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/DataReplicationProtectedItemOperationSource.cs new file mode 100644 index 000000000000..1e51cea1512e --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/DataReplicationProtectedItemOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + internal class DataReplicationProtectedItemOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal DataReplicationProtectedItemOperationSource(ArmClient client) + { + _client = client; + } + + DataReplicationProtectedItemResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return new DataReplicationProtectedItemResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return await Task.FromResult(new DataReplicationProtectedItemResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/DataReplicationVaultOperationSource.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/DataReplicationVaultOperationSource.cs new file mode 100644 index 000000000000..a7a8a19d1c5c --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/DataReplicationVaultOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + internal class DataReplicationVaultOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal DataReplicationVaultOperationSource(ArmClient client) + { + _client = client; + } + + DataReplicationVaultResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return new DataReplicationVaultResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return await Task.FromResult(new DataReplicationVaultResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/PlannedFailoverOperationSource.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/PlannedFailoverOperationSource.cs new file mode 100644 index 000000000000..54337341ad59 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/PlannedFailoverOperationSource.cs @@ -0,0 +1,30 @@ +// 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.Core; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + internal class PlannedFailoverOperationSource : IOperationSource + { + PlannedFailover IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + return PlannedFailover.DeserializePlannedFailover(document.RootElement); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + return PlannedFailover.DeserializePlannedFailover(document.RootElement); + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/RecoveryServicesDataReplicationArmOperation.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/RecoveryServicesDataReplicationArmOperation.cs new file mode 100644 index 000000000000..eb2854f60f25 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/RecoveryServicesDataReplicationArmOperation.cs @@ -0,0 +1,94 @@ +// 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.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ +#pragma warning disable SA1649 // File name should match first type name + internal class RecoveryServicesDataReplicationArmOperation : ArmOperation +#pragma warning restore SA1649 // File name should match first type name + { + private readonly OperationInternal _operation; + private readonly RehydrationToken? _completeRehydrationToken; + private readonly NextLinkOperationImplementation _nextLinkOperation; + private readonly string _operationId; + + /// Initializes a new instance of RecoveryServicesDataReplicationArmOperation for mocking. + protected RecoveryServicesDataReplicationArmOperation() + { + } + + internal RecoveryServicesDataReplicationArmOperation(Response response, RehydrationToken? rehydrationToken = null) + { + _operation = OperationInternal.Succeeded(response); + _completeRehydrationToken = rehydrationToken; + _operationId = GetOperationId(rehydrationToken); + } + + internal RecoveryServicesDataReplicationArmOperation(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response, OperationFinalStateVia finalStateVia, bool skipApiVersionOverride = false, string apiVersionOverrideValue = null) + { + var nextLinkOperation = NextLinkOperationImplementation.Create(pipeline, request.Method, request.Uri.ToUri(), response, finalStateVia, skipApiVersionOverride, apiVersionOverrideValue); + if (nextLinkOperation is NextLinkOperationImplementation nextLinkOperationValue) + { + _nextLinkOperation = nextLinkOperationValue; + _operationId = _nextLinkOperation.OperationId; + } + else + { + _completeRehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(request.Method, request.Uri.ToUri(), response, finalStateVia); + _operationId = GetOperationId(_completeRehydrationToken); + } + _operation = new OperationInternal(nextLinkOperation, clientDiagnostics, response, "RecoveryServicesDataReplicationArmOperation", fallbackStrategy: new SequentialDelayStrategy()); + } + + private string GetOperationId(RehydrationToken? rehydrationToken) + { + if (rehydrationToken is null) + { + return null; + } + var lroDetails = ModelReaderWriter.Write(rehydrationToken, ModelReaderWriterOptions.Json).ToObjectFromJson>(); + return lroDetails["id"]; + } + /// + public override string Id => _operationId ?? NextLinkOperationImplementation.NotSet; + + /// + public override RehydrationToken? GetRehydrationToken() => _nextLinkOperation?.GetRehydrationToken() ?? _completeRehydrationToken; + + /// + public override bool HasCompleted => _operation.HasCompleted; + + /// + public override Response GetRawResponse() => _operation.RawResponse; + + /// + public override Response UpdateStatus(CancellationToken cancellationToken = default) => _operation.UpdateStatus(cancellationToken); + + /// + public override ValueTask UpdateStatusAsync(CancellationToken cancellationToken = default) => _operation.UpdateStatusAsync(cancellationToken); + + /// + public override Response WaitForCompletionResponse(CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponse(cancellationToken); + + /// + public override Response WaitForCompletionResponse(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponse(pollingInterval, cancellationToken); + + /// + public override ValueTask WaitForCompletionResponseAsync(CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponseAsync(cancellationToken); + + /// + public override ValueTask WaitForCompletionResponseAsync(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponseAsync(pollingInterval, cancellationToken); + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/RecoveryServicesDataReplicationArmOperationOfT.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/RecoveryServicesDataReplicationArmOperationOfT.cs new file mode 100644 index 000000000000..55ab427e9eb1 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/LongRunningOperation/RecoveryServicesDataReplicationArmOperationOfT.cs @@ -0,0 +1,100 @@ +// 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.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ +#pragma warning disable SA1649 // File name should match first type name + internal class RecoveryServicesDataReplicationArmOperation : ArmOperation +#pragma warning restore SA1649 // File name should match first type name + { + private readonly OperationInternal _operation; + private readonly RehydrationToken? _completeRehydrationToken; + private readonly NextLinkOperationImplementation _nextLinkOperation; + private readonly string _operationId; + + /// Initializes a new instance of RecoveryServicesDataReplicationArmOperation for mocking. + protected RecoveryServicesDataReplicationArmOperation() + { + } + + internal RecoveryServicesDataReplicationArmOperation(Response response, RehydrationToken? rehydrationToken = null) + { + _operation = OperationInternal.Succeeded(response.GetRawResponse(), response.Value); + _completeRehydrationToken = rehydrationToken; + _operationId = GetOperationId(rehydrationToken); + } + + internal RecoveryServicesDataReplicationArmOperation(IOperationSource source, ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response, OperationFinalStateVia finalStateVia, bool skipApiVersionOverride = false, string apiVersionOverrideValue = null) + { + var nextLinkOperation = NextLinkOperationImplementation.Create(pipeline, request.Method, request.Uri.ToUri(), response, finalStateVia, skipApiVersionOverride, apiVersionOverrideValue); + if (nextLinkOperation is NextLinkOperationImplementation nextLinkOperationValue) + { + _nextLinkOperation = nextLinkOperationValue; + _operationId = _nextLinkOperation.OperationId; + } + else + { + _completeRehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(request.Method, request.Uri.ToUri(), response, finalStateVia); + _operationId = GetOperationId(_completeRehydrationToken); + } + _operation = new OperationInternal(NextLinkOperationImplementation.Create(source, nextLinkOperation), clientDiagnostics, response, "RecoveryServicesDataReplicationArmOperation", fallbackStrategy: new SequentialDelayStrategy()); + } + + private string GetOperationId(RehydrationToken? rehydrationToken) + { + if (rehydrationToken is null) + { + return null; + } + var lroDetails = ModelReaderWriter.Write(rehydrationToken, ModelReaderWriterOptions.Json).ToObjectFromJson>(); + return lroDetails["id"]; + } + /// + public override string Id => _operationId ?? NextLinkOperationImplementation.NotSet; + + /// + public override RehydrationToken? GetRehydrationToken() => _nextLinkOperation?.GetRehydrationToken() ?? _completeRehydrationToken; + + /// + public override T Value => _operation.Value; + + /// + public override bool HasValue => _operation.HasValue; + + /// + public override bool HasCompleted => _operation.HasCompleted; + + /// + public override Response GetRawResponse() => _operation.RawResponse; + + /// + public override Response UpdateStatus(CancellationToken cancellationToken = default) => _operation.UpdateStatus(cancellationToken); + + /// + public override ValueTask UpdateStatusAsync(CancellationToken cancellationToken = default) => _operation.UpdateStatusAsync(cancellationToken); + + /// + public override Response WaitForCompletion(CancellationToken cancellationToken = default) => _operation.WaitForCompletion(cancellationToken); + + /// + public override Response WaitForCompletion(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletion(pollingInterval, cancellationToken); + + /// + public override ValueTask> WaitForCompletionAsync(CancellationToken cancellationToken = default) => _operation.WaitForCompletionAsync(cancellationToken); + + /// + public override ValueTask> WaitForCompletionAsync(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionAsync(pollingInterval, cancellationToken); + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AzStackHciClusterProperties.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AzStackHciClusterProperties.Serialization.cs new file mode 100644 index 000000000000..9ca52752a567 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AzStackHciClusterProperties.Serialization.cs @@ -0,0 +1,160 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class AzStackHciClusterProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AzStackHciClusterProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("clusterName"u8); + writer.WriteStringValue(ClusterName); + writer.WritePropertyName("resourceName"u8); + writer.WriteStringValue(ResourceName); + writer.WritePropertyName("storageAccountName"u8); + writer.WriteStringValue(StorageAccountName); + writer.WritePropertyName("storageContainers"u8); + writer.WriteStartArray(); + foreach (var item in StorageContainers) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AzStackHciClusterProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AzStackHciClusterProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAzStackHciClusterProperties(document.RootElement, options); + } + + internal static AzStackHciClusterProperties DeserializeAzStackHciClusterProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string clusterName = default; + string resourceName = default; + string storageAccountName = default; + IList storageContainers = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("clusterName"u8)) + { + clusterName = property.Value.GetString(); + continue; + } + if (property.NameEquals("resourceName"u8)) + { + resourceName = property.Value.GetString(); + continue; + } + if (property.NameEquals("storageAccountName"u8)) + { + storageAccountName = property.Value.GetString(); + continue; + } + if (property.NameEquals("storageContainers"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(StorageContainerProperties.DeserializeStorageContainerProperties(item, options)); + } + storageContainers = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AzStackHciClusterProperties(clusterName, resourceName, storageAccountName, storageContainers, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AzStackHciClusterProperties)} does not support writing '{options.Format}' format."); + } + } + + AzStackHciClusterProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAzStackHciClusterProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AzStackHciClusterProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AzStackHciClusterProperties.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AzStackHciClusterProperties.cs new file mode 100644 index 000000000000..5f62eabc122e --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AzStackHciClusterProperties.cs @@ -0,0 +1,97 @@ +// 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.RecoveryServicesDataReplication.Models +{ + /// AzStackHCI cluster properties. + public partial class AzStackHciClusterProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Gets or sets the AzStackHCICluster FQDN name. + /// Gets or sets the AzStackHCICluster resource name. + /// Gets or sets the Storage account name. + /// Gets or sets the list of AzStackHCICluster Storage Container. + /// , , or is null. + public AzStackHciClusterProperties(string clusterName, string resourceName, string storageAccountName, IEnumerable storageContainers) + { + Argument.AssertNotNull(clusterName, nameof(clusterName)); + Argument.AssertNotNull(resourceName, nameof(resourceName)); + Argument.AssertNotNull(storageAccountName, nameof(storageAccountName)); + Argument.AssertNotNull(storageContainers, nameof(storageContainers)); + + ClusterName = clusterName; + ResourceName = resourceName; + StorageAccountName = storageAccountName; + StorageContainers = storageContainers.ToList(); + } + + /// Initializes a new instance of . + /// Gets or sets the AzStackHCICluster FQDN name. + /// Gets or sets the AzStackHCICluster resource name. + /// Gets or sets the Storage account name. + /// Gets or sets the list of AzStackHCICluster Storage Container. + /// Keeps track of any properties unknown to the library. + internal AzStackHciClusterProperties(string clusterName, string resourceName, string storageAccountName, IList storageContainers, IDictionary serializedAdditionalRawData) + { + ClusterName = clusterName; + ResourceName = resourceName; + StorageAccountName = storageAccountName; + StorageContainers = storageContainers; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AzStackHciClusterProperties() + { + } + + /// Gets or sets the AzStackHCICluster FQDN name. + public string ClusterName { get; set; } + /// Gets or sets the AzStackHCICluster resource name. + public string ResourceName { get; set; } + /// Gets or sets the Storage account name. + public string StorageAccountName { get; set; } + /// Gets or sets the list of AzStackHCICluster Storage Container. + public IList StorageContainers { get; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AzStackHciFabricCustomProperties.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AzStackHciFabricCustomProperties.Serialization.cs new file mode 100644 index 000000000000..61bfc7e9e974 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AzStackHciFabricCustomProperties.Serialization.cs @@ -0,0 +1,213 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class AzStackHciFabricCustomProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AzStackHciFabricCustomProperties)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("azStackHciSiteId"u8); + writer.WriteStringValue(AzStackHciSiteId); + if (options.Format != "W" && Optional.IsCollectionDefined(ApplianceName)) + { + writer.WritePropertyName("applianceName"u8); + writer.WriteStartArray(); + foreach (var item in ApplianceName) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("cluster"u8); + writer.WriteObjectValue(Cluster, options); + if (options.Format != "W" && Optional.IsDefined(FabricResourceId)) + { + writer.WritePropertyName("fabricResourceId"u8); + writer.WriteStringValue(FabricResourceId); + } + if (options.Format != "W" && Optional.IsDefined(FabricContainerId)) + { + writer.WritePropertyName("fabricContainerId"u8); + writer.WriteStringValue(FabricContainerId); + } + writer.WritePropertyName("migrationSolutionId"u8); + writer.WriteStringValue(MigrationSolutionId); + if (options.Format != "W" && Optional.IsDefined(MigrationHubUri)) + { + writer.WritePropertyName("migrationHubUri"u8); + writer.WriteStringValue(MigrationHubUri.AbsoluteUri); + } + } + + AzStackHciFabricCustomProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AzStackHciFabricCustomProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAzStackHciFabricCustomProperties(document.RootElement, options); + } + + internal static AzStackHciFabricCustomProperties DeserializeAzStackHciFabricCustomProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier azStackHciSiteId = default; + IReadOnlyList applianceName = default; + AzStackHciClusterProperties cluster = default; + ResourceIdentifier fabricResourceId = default; + ResourceIdentifier fabricContainerId = default; + ResourceIdentifier migrationSolutionId = default; + Uri migrationHubUri = default; + string instanceType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("azStackHciSiteId"u8)) + { + azStackHciSiteId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("applianceName"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + applianceName = array; + continue; + } + if (property.NameEquals("cluster"u8)) + { + cluster = AzStackHciClusterProperties.DeserializeAzStackHciClusterProperties(property.Value, options); + continue; + } + if (property.NameEquals("fabricResourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + fabricResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("fabricContainerId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + fabricContainerId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("migrationSolutionId"u8)) + { + migrationSolutionId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("migrationHubUri"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + migrationHubUri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("instanceType"u8)) + { + instanceType = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AzStackHciFabricCustomProperties( + instanceType, + serializedAdditionalRawData, + azStackHciSiteId, + applianceName ?? new ChangeTrackingList(), + cluster, + fabricResourceId, + fabricContainerId, + migrationSolutionId, + migrationHubUri); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(AzStackHciFabricCustomProperties)} does not support writing '{options.Format}' format."); + } + } + + AzStackHciFabricCustomProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAzStackHciFabricCustomProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AzStackHciFabricCustomProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AzStackHciFabricCustomProperties.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AzStackHciFabricCustomProperties.cs new file mode 100644 index 000000000000..f095e0960f8b --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AzStackHciFabricCustomProperties.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// AzStackHCI fabric model custom properties. + public partial class AzStackHciFabricCustomProperties : DataReplicationFabricCustomProperties + { + /// Initializes a new instance of . + /// Gets or sets the ARM Id of the AzStackHCI site. + /// AzStackHCI cluster properties. + /// Gets or sets the Migration solution ARM Id. + /// , or is null. + public AzStackHciFabricCustomProperties(ResourceIdentifier azStackHciSiteId, AzStackHciClusterProperties cluster, ResourceIdentifier migrationSolutionId) + { + Argument.AssertNotNull(azStackHciSiteId, nameof(azStackHciSiteId)); + Argument.AssertNotNull(cluster, nameof(cluster)); + Argument.AssertNotNull(migrationSolutionId, nameof(migrationSolutionId)); + + AzStackHciSiteId = azStackHciSiteId; + ApplianceName = new ChangeTrackingList(); + Cluster = cluster; + MigrationSolutionId = migrationSolutionId; + InstanceType = "AzStackHCI"; + } + + /// Initializes a new instance of . + /// Discriminator property for DataReplicationFabricCustomProperties. + /// Keeps track of any properties unknown to the library. + /// Gets or sets the ARM Id of the AzStackHCI site. + /// Gets or sets the Appliance name. + /// AzStackHCI cluster properties. + /// Gets or sets the fabric resource Id. + /// Gets or sets the fabric container Id. + /// Gets or sets the Migration solution ARM Id. + /// Gets or sets the migration hub Uri. + internal AzStackHciFabricCustomProperties(string instanceType, IDictionary serializedAdditionalRawData, ResourceIdentifier azStackHciSiteId, IReadOnlyList applianceName, AzStackHciClusterProperties cluster, ResourceIdentifier fabricResourceId, ResourceIdentifier fabricContainerId, ResourceIdentifier migrationSolutionId, Uri migrationHubUri) : base(instanceType, serializedAdditionalRawData) + { + AzStackHciSiteId = azStackHciSiteId; + ApplianceName = applianceName; + Cluster = cluster; + FabricResourceId = fabricResourceId; + FabricContainerId = fabricContainerId; + MigrationSolutionId = migrationSolutionId; + MigrationHubUri = migrationHubUri; + InstanceType = instanceType ?? "AzStackHCI"; + } + + /// Initializes a new instance of for deserialization. + internal AzStackHciFabricCustomProperties() + { + } + + /// Gets or sets the ARM Id of the AzStackHCI site. + public ResourceIdentifier AzStackHciSiteId { get; set; } + /// Gets or sets the Appliance name. + public IReadOnlyList ApplianceName { get; } + /// AzStackHCI cluster properties. + public AzStackHciClusterProperties Cluster { get; set; } + /// Gets or sets the fabric resource Id. + public ResourceIdentifier FabricResourceId { get; } + /// Gets or sets the fabric container Id. + public ResourceIdentifier FabricContainerId { get; } + /// Gets or sets the Migration solution ARM Id. + public ResourceIdentifier MigrationSolutionId { get; set; } + /// Gets or sets the migration hub Uri. + public Uri MigrationHubUri { get; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationDiskControllerInputs.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationDiskControllerInputs.Serialization.cs new file mode 100644 index 000000000000..9b68238af649 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationDiskControllerInputs.Serialization.cs @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class DataReplicationDiskControllerInputs : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationDiskControllerInputs)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("controllerName"u8); + writer.WriteStringValue(ControllerName); + writer.WritePropertyName("controllerId"u8); + writer.WriteNumberValue(ControllerId); + writer.WritePropertyName("controllerLocation"u8); + writer.WriteNumberValue(ControllerLocation); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DataReplicationDiskControllerInputs IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationDiskControllerInputs)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataReplicationDiskControllerInputs(document.RootElement, options); + } + + internal static DataReplicationDiskControllerInputs DeserializeDataReplicationDiskControllerInputs(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string controllerName = default; + int controllerId = default; + int controllerLocation = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("controllerName"u8)) + { + controllerName = property.Value.GetString(); + continue; + } + if (property.NameEquals("controllerId"u8)) + { + controllerId = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("controllerLocation"u8)) + { + controllerLocation = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DataReplicationDiskControllerInputs(controllerName, controllerId, controllerLocation, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DataReplicationDiskControllerInputs)} does not support writing '{options.Format}' format."); + } + } + + DataReplicationDiskControllerInputs IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataReplicationDiskControllerInputs(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataReplicationDiskControllerInputs)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationDiskControllerInputs.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationDiskControllerInputs.cs new file mode 100644 index 000000000000..ea674a43355a --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationDiskControllerInputs.cs @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Disk controller. + public partial class DataReplicationDiskControllerInputs + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Gets or sets the controller name (IDE,SCSI). + /// Gets or sets the controller ID. + /// Gets or sets the controller Location. + /// is null. + public DataReplicationDiskControllerInputs(string controllerName, int controllerId, int controllerLocation) + { + Argument.AssertNotNull(controllerName, nameof(controllerName)); + + ControllerName = controllerName; + ControllerId = controllerId; + ControllerLocation = controllerLocation; + } + + /// Initializes a new instance of . + /// Gets or sets the controller name (IDE,SCSI). + /// Gets or sets the controller ID. + /// Gets or sets the controller Location. + /// Keeps track of any properties unknown to the library. + internal DataReplicationDiskControllerInputs(string controllerName, int controllerId, int controllerLocation, IDictionary serializedAdditionalRawData) + { + ControllerName = controllerName; + ControllerId = controllerId; + ControllerLocation = controllerLocation; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DataReplicationDiskControllerInputs() + { + } + + /// Gets or sets the controller name (IDE,SCSI). + public string ControllerName { get; set; } + /// Gets or sets the controller ID. + public int ControllerId { get; set; } + /// Gets or sets the controller Location. + public int ControllerLocation { get; set; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationEmailConfigurationProperties.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationEmailConfigurationProperties.Serialization.cs new file mode 100644 index 000000000000..117008070855 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationEmailConfigurationProperties.Serialization.cs @@ -0,0 +1,177 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class DataReplicationEmailConfigurationProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationEmailConfigurationProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("sendToOwners"u8); + writer.WriteBooleanValue(SendToOwners); + if (Optional.IsCollectionDefined(CustomEmailAddresses)) + { + writer.WritePropertyName("customEmailAddresses"u8); + writer.WriteStartArray(); + foreach (var item in CustomEmailAddresses) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Locale)) + { + writer.WritePropertyName("locale"u8); + writer.WriteStringValue(Locale); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DataReplicationEmailConfigurationProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationEmailConfigurationProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataReplicationEmailConfigurationProperties(document.RootElement, options); + } + + internal static DataReplicationEmailConfigurationProperties DeserializeDataReplicationEmailConfigurationProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool sendToOwners = default; + IList customEmailAddresses = default; + string locale = default; + DataReplicationProvisioningState? provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("sendToOwners"u8)) + { + sendToOwners = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("customEmailAddresses"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + customEmailAddresses = array; + continue; + } + if (property.NameEquals("locale"u8)) + { + locale = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new DataReplicationProvisioningState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DataReplicationEmailConfigurationProperties(sendToOwners, customEmailAddresses ?? new ChangeTrackingList(), locale, provisioningState, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DataReplicationEmailConfigurationProperties)} does not support writing '{options.Format}' format."); + } + } + + DataReplicationEmailConfigurationProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataReplicationEmailConfigurationProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataReplicationEmailConfigurationProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationEmailConfigurationProperties.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationEmailConfigurationProperties.cs new file mode 100644 index 000000000000..9a926bc395d1 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationEmailConfigurationProperties.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Email configuration model properties. + public partial class DataReplicationEmailConfigurationProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Gets or sets a value indicating whether to send email to subscription administrator. + public DataReplicationEmailConfigurationProperties(bool sendToOwners) + { + SendToOwners = sendToOwners; + CustomEmailAddresses = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Gets or sets a value indicating whether to send email to subscription administrator. + /// Gets or sets the custom email address for sending emails. + /// Gets or sets the locale for the email notification. + /// Gets or sets the provisioning state of the email configuration. + /// Keeps track of any properties unknown to the library. + internal DataReplicationEmailConfigurationProperties(bool sendToOwners, IList customEmailAddresses, string locale, DataReplicationProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) + { + SendToOwners = sendToOwners; + CustomEmailAddresses = customEmailAddresses; + Locale = locale; + ProvisioningState = provisioningState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DataReplicationEmailConfigurationProperties() + { + } + + /// Gets or sets a value indicating whether to send email to subscription administrator. + public bool SendToOwners { get; set; } + /// Gets or sets the custom email address for sending emails. + public IList CustomEmailAddresses { get; } + /// Gets or sets the locale for the email notification. + public string Locale { get; set; } + /// Gets or sets the provisioning state of the email configuration. + public DataReplicationProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationErrorInfo.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationErrorInfo.Serialization.cs new file mode 100644 index 000000000000..dafdda384838 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationErrorInfo.Serialization.cs @@ -0,0 +1,207 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class DataReplicationErrorInfo : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationErrorInfo)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(Code)) + { + writer.WritePropertyName("code"u8); + writer.WriteStringValue(Code); + } + if (options.Format != "W" && Optional.IsDefined(Type)) + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); + } + if (options.Format != "W" && Optional.IsDefined(Severity)) + { + writer.WritePropertyName("severity"u8); + writer.WriteStringValue(Severity); + } + if (options.Format != "W" && Optional.IsDefined(CreatedOn)) + { + writer.WritePropertyName("creationTime"u8); + writer.WriteStringValue(CreatedOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(Message)) + { + writer.WritePropertyName("message"u8); + writer.WriteStringValue(Message); + } + if (options.Format != "W" && Optional.IsDefined(Causes)) + { + writer.WritePropertyName("causes"u8); + writer.WriteStringValue(Causes); + } + if (options.Format != "W" && Optional.IsDefined(Recommendation)) + { + writer.WritePropertyName("recommendation"u8); + writer.WriteStringValue(Recommendation); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DataReplicationErrorInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationErrorInfo)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataReplicationErrorInfo(document.RootElement, options); + } + + internal static DataReplicationErrorInfo DeserializeDataReplicationErrorInfo(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string code = default; + string type = default; + string severity = default; + DateTimeOffset? creationTime = default; + string message = default; + string causes = default; + string recommendation = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("code"u8)) + { + code = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("severity"u8)) + { + severity = property.Value.GetString(); + continue; + } + if (property.NameEquals("creationTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + creationTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("message"u8)) + { + message = property.Value.GetString(); + continue; + } + if (property.NameEquals("causes"u8)) + { + causes = property.Value.GetString(); + continue; + } + if (property.NameEquals("recommendation"u8)) + { + recommendation = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DataReplicationErrorInfo( + code, + type, + severity, + creationTime, + message, + causes, + recommendation, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DataReplicationErrorInfo)} does not support writing '{options.Format}' format."); + } + } + + DataReplicationErrorInfo IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataReplicationErrorInfo(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataReplicationErrorInfo)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationErrorInfo.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationErrorInfo.cs new file mode 100644 index 000000000000..613811120831 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationErrorInfo.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; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Error model. + public partial class DataReplicationErrorInfo + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal DataReplicationErrorInfo() + { + } + + /// Initializes a new instance of . + /// Gets or sets the error code. + /// Gets or sets the error type. + /// Gets or sets the error severity. + /// Gets or sets the creation time of error. + /// Gets or sets the error message. + /// Gets or sets the possible causes of error. + /// Gets or sets the recommended action to resolve error. + /// Keeps track of any properties unknown to the library. + internal DataReplicationErrorInfo(string code, string type, string severity, DateTimeOffset? createdOn, string message, string causes, string recommendation, IDictionary serializedAdditionalRawData) + { + Code = code; + Type = type; + Severity = severity; + CreatedOn = createdOn; + Message = message; + Causes = causes; + Recommendation = recommendation; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets or sets the error code. + public string Code { get; } + /// Gets or sets the error type. + public string Type { get; } + /// Gets or sets the error severity. + public string Severity { get; } + /// Gets or sets the creation time of error. + public DateTimeOffset? CreatedOn { get; } + /// Gets or sets the error message. + public string Message { get; } + /// Gets or sets the possible causes of error. + public string Causes { get; } + /// Gets or sets the recommended action to resolve error. + public string Recommendation { get; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationEventCustomProperties.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationEventCustomProperties.Serialization.cs new file mode 100644 index 000000000000..1bf715f1793b --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationEventCustomProperties.Serialization.cs @@ -0,0 +1,118 @@ +// 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.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + [PersistableModelProxy(typeof(UnknownDataReplicationEventCustomProperties))] + public partial class DataReplicationEventCustomProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationEventCustomProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("instanceType"u8); + writer.WriteStringValue(InstanceType); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DataReplicationEventCustomProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationEventCustomProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataReplicationEventCustomProperties(document.RootElement, options); + } + + internal static DataReplicationEventCustomProperties DeserializeDataReplicationEventCustomProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("instanceType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "HyperVToAzStackHCI": return HyperVToAzStackHciEventCustomProperties.DeserializeHyperVToAzStackHciEventCustomProperties(element, options); + case "VMwareToAzStackHCI": return VMwareToAzStackHciEventCustomProperties.DeserializeVMwareToAzStackHciEventCustomProperties(element, options); + } + } + return UnknownDataReplicationEventCustomProperties.DeserializeUnknownDataReplicationEventCustomProperties(element, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DataReplicationEventCustomProperties)} does not support writing '{options.Format}' format."); + } + } + + DataReplicationEventCustomProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataReplicationEventCustomProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataReplicationEventCustomProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationEventCustomProperties.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationEventCustomProperties.cs new file mode 100644 index 000000000000..126a7bb82a8d --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationEventCustomProperties.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// + /// Event model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public abstract partial class DataReplicationEventCustomProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + protected DataReplicationEventCustomProperties() + { + } + + /// Initializes a new instance of . + /// Discriminator property for DataReplicationEventCustomProperties. + /// Keeps track of any properties unknown to the library. + internal DataReplicationEventCustomProperties(string instanceType, IDictionary serializedAdditionalRawData) + { + InstanceType = instanceType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Discriminator property for DataReplicationEventCustomProperties. + internal string InstanceType { get; set; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationEventProperties.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationEventProperties.Serialization.cs new file mode 100644 index 000000000000..6cad94847586 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationEventProperties.Serialization.cs @@ -0,0 +1,274 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class DataReplicationEventProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationEventProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(ResourceType)) + { + writer.WritePropertyName("resourceType"u8); + writer.WriteStringValue(ResourceType.Value); + } + if (options.Format != "W" && Optional.IsDefined(ResourceName)) + { + writer.WritePropertyName("resourceName"u8); + writer.WriteStringValue(ResourceName); + } + if (options.Format != "W" && Optional.IsDefined(EventType)) + { + writer.WritePropertyName("eventType"u8); + writer.WriteStringValue(EventType); + } + if (options.Format != "W" && Optional.IsDefined(EventName)) + { + writer.WritePropertyName("eventName"u8); + writer.WriteStringValue(EventName); + } + if (options.Format != "W" && Optional.IsDefined(OccurredOn)) + { + writer.WritePropertyName("timeOfOccurrence"u8); + writer.WriteStringValue(OccurredOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(Severity)) + { + writer.WritePropertyName("severity"u8); + writer.WriteStringValue(Severity); + } + if (options.Format != "W" && Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + if (options.Format != "W" && Optional.IsDefined(CorrelationId)) + { + writer.WritePropertyName("correlationId"u8); + writer.WriteStringValue(CorrelationId); + } + if (options.Format != "W" && Optional.IsCollectionDefined(HealthErrors)) + { + writer.WritePropertyName("healthErrors"u8); + writer.WriteStartArray(); + foreach (var item in HealthErrors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("customProperties"u8); + writer.WriteObjectValue(CustomProperties, options); + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DataReplicationEventProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationEventProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataReplicationEventProperties(document.RootElement, options); + } + + internal static DataReplicationEventProperties DeserializeDataReplicationEventProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceType? resourceType = default; + string resourceName = default; + string eventType = default; + string eventName = default; + DateTimeOffset? timeOfOccurrence = default; + string severity = default; + string description = default; + string correlationId = default; + IReadOnlyList healthErrors = default; + DataReplicationEventCustomProperties customProperties = default; + DataReplicationProvisioningState? provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("resourceType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resourceType = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("resourceName"u8)) + { + resourceName = property.Value.GetString(); + continue; + } + if (property.NameEquals("eventType"u8)) + { + eventType = property.Value.GetString(); + continue; + } + if (property.NameEquals("eventName"u8)) + { + eventName = property.Value.GetString(); + continue; + } + if (property.NameEquals("timeOfOccurrence"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeOfOccurrence = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("severity"u8)) + { + severity = property.Value.GetString(); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("correlationId"u8)) + { + correlationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("healthErrors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DataReplicationHealthErrorInfo.DeserializeDataReplicationHealthErrorInfo(item, options)); + } + healthErrors = array; + continue; + } + if (property.NameEquals("customProperties"u8)) + { + customProperties = DataReplicationEventCustomProperties.DeserializeDataReplicationEventCustomProperties(property.Value, options); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new DataReplicationProvisioningState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DataReplicationEventProperties( + resourceType, + resourceName, + eventType, + eventName, + timeOfOccurrence, + severity, + description, + correlationId, + healthErrors ?? new ChangeTrackingList(), + customProperties, + provisioningState, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DataReplicationEventProperties)} does not support writing '{options.Format}' format."); + } + } + + DataReplicationEventProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataReplicationEventProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataReplicationEventProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationEventProperties.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationEventProperties.cs new file mode 100644 index 000000000000..3a3d603768bd --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationEventProperties.cs @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Event model properties. + public partial class DataReplicationEventProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// + /// Event model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// is null. + internal DataReplicationEventProperties(DataReplicationEventCustomProperties customProperties) + { + Argument.AssertNotNull(customProperties, nameof(customProperties)); + + HealthErrors = new ChangeTrackingList(); + CustomProperties = customProperties; + } + + /// Initializes a new instance of . + /// Gets or sets the resource type. + /// Gets or sets the resource name. + /// Gets or sets the event type. + /// Gets or sets the event name. + /// Gets or sets the time at which the event occurred at source. + /// Gets or sets the event severity. + /// Gets or sets the event description. + /// Gets or sets the event correlation Id. + /// Gets or sets the errors associated with this event. + /// + /// Event model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// Gets or sets the provisioning state of the event. + /// Keeps track of any properties unknown to the library. + internal DataReplicationEventProperties(ResourceType? resourceType, string resourceName, string eventType, string eventName, DateTimeOffset? occurredOn, string severity, string description, string correlationId, IReadOnlyList healthErrors, DataReplicationEventCustomProperties customProperties, DataReplicationProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) + { + ResourceType = resourceType; + ResourceName = resourceName; + EventType = eventType; + EventName = eventName; + OccurredOn = occurredOn; + Severity = severity; + Description = description; + CorrelationId = correlationId; + HealthErrors = healthErrors; + CustomProperties = customProperties; + ProvisioningState = provisioningState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DataReplicationEventProperties() + { + } + + /// Gets or sets the resource type. + public ResourceType? ResourceType { get; } + /// Gets or sets the resource name. + public string ResourceName { get; } + /// Gets or sets the event type. + public string EventType { get; } + /// Gets or sets the event name. + public string EventName { get; } + /// Gets or sets the time at which the event occurred at source. + public DateTimeOffset? OccurredOn { get; } + /// Gets or sets the event severity. + public string Severity { get; } + /// Gets or sets the event description. + public string Description { get; } + /// Gets or sets the event correlation Id. + public string CorrelationId { get; } + /// Gets or sets the errors associated with this event. + public IReadOnlyList HealthErrors { get; } + /// + /// Event model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public DataReplicationEventCustomProperties CustomProperties { get; } + /// Gets or sets the provisioning state of the event. + public DataReplicationProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationExtensionCustomProperties.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationExtensionCustomProperties.Serialization.cs new file mode 100644 index 000000000000..0eef400700f5 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationExtensionCustomProperties.Serialization.cs @@ -0,0 +1,118 @@ +// 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.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + [PersistableModelProxy(typeof(UnknownDataReplicationExtensionCustomProperties))] + public partial class DataReplicationExtensionCustomProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationExtensionCustomProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("instanceType"u8); + writer.WriteStringValue(InstanceType); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DataReplicationExtensionCustomProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationExtensionCustomProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataReplicationExtensionCustomProperties(document.RootElement, options); + } + + internal static DataReplicationExtensionCustomProperties DeserializeDataReplicationExtensionCustomProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("instanceType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "HyperVToAzStackHCI": return HyperVToAzStackHciReplicationExtensionCustomProperties.DeserializeHyperVToAzStackHciReplicationExtensionCustomProperties(element, options); + case "VMwareToAzStackHCI": return VMwareToAzStackHciReplicationExtensionCustomProperties.DeserializeVMwareToAzStackHciReplicationExtensionCustomProperties(element, options); + } + } + return UnknownDataReplicationExtensionCustomProperties.DeserializeUnknownDataReplicationExtensionCustomProperties(element, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DataReplicationExtensionCustomProperties)} does not support writing '{options.Format}' format."); + } + } + + DataReplicationExtensionCustomProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataReplicationExtensionCustomProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataReplicationExtensionCustomProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationExtensionCustomProperties.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationExtensionCustomProperties.cs new file mode 100644 index 000000000000..bced10ed844b --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationExtensionCustomProperties.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// + /// Replication extension model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public abstract partial class DataReplicationExtensionCustomProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + protected DataReplicationExtensionCustomProperties() + { + } + + /// Initializes a new instance of . + /// Discriminator property for DataReplicationExtensionCustomProperties. + /// Keeps track of any properties unknown to the library. + internal DataReplicationExtensionCustomProperties(string instanceType, IDictionary serializedAdditionalRawData) + { + InstanceType = instanceType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Discriminator property for DataReplicationExtensionCustomProperties. + internal string InstanceType { get; set; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationExtensionProperties.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationExtensionProperties.Serialization.cs new file mode 100644 index 000000000000..285124b1c2a7 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationExtensionProperties.Serialization.cs @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class DataReplicationExtensionProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationExtensionProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + writer.WritePropertyName("customProperties"u8); + writer.WriteObjectValue(CustomProperties, options); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DataReplicationExtensionProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationExtensionProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataReplicationExtensionProperties(document.RootElement, options); + } + + internal static DataReplicationExtensionProperties DeserializeDataReplicationExtensionProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DataReplicationProvisioningState? provisioningState = default; + DataReplicationExtensionCustomProperties customProperties = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new DataReplicationProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("customProperties"u8)) + { + customProperties = DataReplicationExtensionCustomProperties.DeserializeDataReplicationExtensionCustomProperties(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DataReplicationExtensionProperties(provisioningState, customProperties, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DataReplicationExtensionProperties)} does not support writing '{options.Format}' format."); + } + } + + DataReplicationExtensionProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataReplicationExtensionProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataReplicationExtensionProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationExtensionProperties.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationExtensionProperties.cs new file mode 100644 index 000000000000..3d6dc50fae7c --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationExtensionProperties.cs @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Replication extension model properties. + public partial class DataReplicationExtensionProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// + /// Replication extension model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// is null. + public DataReplicationExtensionProperties(DataReplicationExtensionCustomProperties customProperties) + { + Argument.AssertNotNull(customProperties, nameof(customProperties)); + + CustomProperties = customProperties; + } + + /// Initializes a new instance of . + /// Gets or sets the provisioning state of the replication extension. + /// + /// Replication extension model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// Keeps track of any properties unknown to the library. + internal DataReplicationExtensionProperties(DataReplicationProvisioningState? provisioningState, DataReplicationExtensionCustomProperties customProperties, IDictionary serializedAdditionalRawData) + { + ProvisioningState = provisioningState; + CustomProperties = customProperties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DataReplicationExtensionProperties() + { + } + + /// Gets or sets the provisioning state of the replication extension. + public DataReplicationProvisioningState? ProvisioningState { get; } + /// + /// Replication extension model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public DataReplicationExtensionCustomProperties CustomProperties { get; set; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationFabricAgentCustomProperties.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationFabricAgentCustomProperties.Serialization.cs new file mode 100644 index 000000000000..ae6557701915 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationFabricAgentCustomProperties.Serialization.cs @@ -0,0 +1,117 @@ +// 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.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + [PersistableModelProxy(typeof(UnknownDataReplicationFabricAgentCustomProperties))] + public partial class DataReplicationFabricAgentCustomProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationFabricAgentCustomProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("instanceType"u8); + writer.WriteStringValue(InstanceType); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DataReplicationFabricAgentCustomProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationFabricAgentCustomProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataReplicationFabricAgentCustomProperties(document.RootElement, options); + } + + internal static DataReplicationFabricAgentCustomProperties DeserializeDataReplicationFabricAgentCustomProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("instanceType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "VMware": return VMwareFabricAgentCustomProperties.DeserializeVMwareFabricAgentCustomProperties(element, options); + } + } + return UnknownDataReplicationFabricAgentCustomProperties.DeserializeUnknownDataReplicationFabricAgentCustomProperties(element, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DataReplicationFabricAgentCustomProperties)} does not support writing '{options.Format}' format."); + } + } + + DataReplicationFabricAgentCustomProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataReplicationFabricAgentCustomProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataReplicationFabricAgentCustomProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationFabricAgentCustomProperties.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationFabricAgentCustomProperties.cs new file mode 100644 index 000000000000..d95e02cfee41 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationFabricAgentCustomProperties.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// + /// Fabric agent model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + public abstract partial class DataReplicationFabricAgentCustomProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + protected DataReplicationFabricAgentCustomProperties() + { + } + + /// Initializes a new instance of . + /// Discriminator property for DataReplicationFabricAgentCustomProperties. + /// Keeps track of any properties unknown to the library. + internal DataReplicationFabricAgentCustomProperties(string instanceType, IDictionary serializedAdditionalRawData) + { + InstanceType = instanceType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Discriminator property for DataReplicationFabricAgentCustomProperties. + internal string InstanceType { get; set; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationFabricAgentProperties.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationFabricAgentProperties.Serialization.cs new file mode 100644 index 000000000000..68c332224b99 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationFabricAgentProperties.Serialization.cs @@ -0,0 +1,262 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class DataReplicationFabricAgentProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationFabricAgentProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(CorrelationId)) + { + writer.WritePropertyName("correlationId"u8); + writer.WriteStringValue(CorrelationId); + } + writer.WritePropertyName("machineId"u8); + writer.WriteStringValue(MachineId); + writer.WritePropertyName("machineName"u8); + writer.WriteStringValue(MachineName); + writer.WritePropertyName("authenticationIdentity"u8); + writer.WriteObjectValue(AuthenticationIdentity, options); + writer.WritePropertyName("resourceAccessIdentity"u8); + writer.WriteObjectValue(ResourceAccessIdentity, options); + if (options.Format != "W" && Optional.IsDefined(IsResponsive)) + { + writer.WritePropertyName("isResponsive"u8); + writer.WriteBooleanValue(IsResponsive.Value); + } + if (options.Format != "W" && Optional.IsDefined(LastHeartbeatOn)) + { + writer.WritePropertyName("lastHeartbeat"u8); + writer.WriteStringValue(LastHeartbeatOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(VersionNumber)) + { + writer.WritePropertyName("versionNumber"u8); + writer.WriteStringValue(VersionNumber); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsCollectionDefined(HealthErrors)) + { + writer.WritePropertyName("healthErrors"u8); + writer.WriteStartArray(); + foreach (var item in HealthErrors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("customProperties"u8); + writer.WriteObjectValue(CustomProperties, options); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DataReplicationFabricAgentProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationFabricAgentProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataReplicationFabricAgentProperties(document.RootElement, options); + } + + internal static DataReplicationFabricAgentProperties DeserializeDataReplicationFabricAgentProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string correlationId = default; + string machineId = default; + string machineName = default; + DataReplicationIdentity authenticationIdentity = default; + DataReplicationIdentity resourceAccessIdentity = default; + bool? isResponsive = default; + DateTimeOffset? lastHeartbeat = default; + string versionNumber = default; + DataReplicationProvisioningState? provisioningState = default; + IReadOnlyList healthErrors = default; + DataReplicationFabricAgentCustomProperties customProperties = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("correlationId"u8)) + { + correlationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("machineId"u8)) + { + machineId = property.Value.GetString(); + continue; + } + if (property.NameEquals("machineName"u8)) + { + machineName = property.Value.GetString(); + continue; + } + if (property.NameEquals("authenticationIdentity"u8)) + { + authenticationIdentity = DataReplicationIdentity.DeserializeDataReplicationIdentity(property.Value, options); + continue; + } + if (property.NameEquals("resourceAccessIdentity"u8)) + { + resourceAccessIdentity = DataReplicationIdentity.DeserializeDataReplicationIdentity(property.Value, options); + continue; + } + if (property.NameEquals("isResponsive"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isResponsive = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("lastHeartbeat"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lastHeartbeat = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("versionNumber"u8)) + { + versionNumber = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new DataReplicationProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("healthErrors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DataReplicationHealthErrorInfo.DeserializeDataReplicationHealthErrorInfo(item, options)); + } + healthErrors = array; + continue; + } + if (property.NameEquals("customProperties"u8)) + { + customProperties = DataReplicationFabricAgentCustomProperties.DeserializeDataReplicationFabricAgentCustomProperties(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DataReplicationFabricAgentProperties( + correlationId, + machineId, + machineName, + authenticationIdentity, + resourceAccessIdentity, + isResponsive, + lastHeartbeat, + versionNumber, + provisioningState, + healthErrors ?? new ChangeTrackingList(), + customProperties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DataReplicationFabricAgentProperties)} does not support writing '{options.Format}' format."); + } + } + + DataReplicationFabricAgentProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataReplicationFabricAgentProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataReplicationFabricAgentProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationFabricAgentProperties.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationFabricAgentProperties.cs new file mode 100644 index 000000000000..ca2228a4d0da --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationFabricAgentProperties.cs @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Fabric agent model properties. + public partial class DataReplicationFabricAgentProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Gets or sets the machine Id where fabric agent is running. + /// Gets or sets the machine name where fabric agent is running. + /// Identity model. + /// Identity model. + /// + /// Fabric agent model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + /// , , , or is null. + public DataReplicationFabricAgentProperties(string machineId, string machineName, DataReplicationIdentity authenticationIdentity, DataReplicationIdentity resourceAccessIdentity, DataReplicationFabricAgentCustomProperties customProperties) + { + Argument.AssertNotNull(machineId, nameof(machineId)); + Argument.AssertNotNull(machineName, nameof(machineName)); + Argument.AssertNotNull(authenticationIdentity, nameof(authenticationIdentity)); + Argument.AssertNotNull(resourceAccessIdentity, nameof(resourceAccessIdentity)); + Argument.AssertNotNull(customProperties, nameof(customProperties)); + + MachineId = machineId; + MachineName = machineName; + AuthenticationIdentity = authenticationIdentity; + ResourceAccessIdentity = resourceAccessIdentity; + HealthErrors = new ChangeTrackingList(); + CustomProperties = customProperties; + } + + /// Initializes a new instance of . + /// Gets or sets the fabric agent correlation Id. + /// Gets or sets the machine Id where fabric agent is running. + /// Gets or sets the machine name where fabric agent is running. + /// Identity model. + /// Identity model. + /// Gets or sets a value indicating whether the fabric agent is responsive. + /// Gets or sets the time when last heartbeat was sent by the fabric agent. + /// Gets or sets the fabric agent version. + /// Gets or sets the provisioning state of the fabric agent. + /// Gets or sets the list of health errors. + /// + /// Fabric agent model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + /// Keeps track of any properties unknown to the library. + internal DataReplicationFabricAgentProperties(string correlationId, string machineId, string machineName, DataReplicationIdentity authenticationIdentity, DataReplicationIdentity resourceAccessIdentity, bool? isResponsive, DateTimeOffset? lastHeartbeatOn, string versionNumber, DataReplicationProvisioningState? provisioningState, IReadOnlyList healthErrors, DataReplicationFabricAgentCustomProperties customProperties, IDictionary serializedAdditionalRawData) + { + CorrelationId = correlationId; + MachineId = machineId; + MachineName = machineName; + AuthenticationIdentity = authenticationIdentity; + ResourceAccessIdentity = resourceAccessIdentity; + IsResponsive = isResponsive; + LastHeartbeatOn = lastHeartbeatOn; + VersionNumber = versionNumber; + ProvisioningState = provisioningState; + HealthErrors = healthErrors; + CustomProperties = customProperties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DataReplicationFabricAgentProperties() + { + } + + /// Gets or sets the fabric agent correlation Id. + public string CorrelationId { get; } + /// Gets or sets the machine Id where fabric agent is running. + public string MachineId { get; set; } + /// Gets or sets the machine name where fabric agent is running. + public string MachineName { get; set; } + /// Identity model. + public DataReplicationIdentity AuthenticationIdentity { get; set; } + /// Identity model. + public DataReplicationIdentity ResourceAccessIdentity { get; set; } + /// Gets or sets a value indicating whether the fabric agent is responsive. + public bool? IsResponsive { get; } + /// Gets or sets the time when last heartbeat was sent by the fabric agent. + public DateTimeOffset? LastHeartbeatOn { get; } + /// Gets or sets the fabric agent version. + public string VersionNumber { get; } + /// Gets or sets the provisioning state of the fabric agent. + public DataReplicationProvisioningState? ProvisioningState { get; } + /// Gets or sets the list of health errors. + public IReadOnlyList HealthErrors { get; } + /// + /// Fabric agent model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + public DataReplicationFabricAgentCustomProperties CustomProperties { get; set; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationFabricCustomProperties.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationFabricCustomProperties.Serialization.cs new file mode 100644 index 000000000000..30c1305539e7 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationFabricCustomProperties.Serialization.cs @@ -0,0 +1,119 @@ +// 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.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + [PersistableModelProxy(typeof(UnknownDataReplicationFabricCustomProperties))] + public partial class DataReplicationFabricCustomProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationFabricCustomProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("instanceType"u8); + writer.WriteStringValue(InstanceType); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DataReplicationFabricCustomProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationFabricCustomProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataReplicationFabricCustomProperties(document.RootElement, options); + } + + internal static DataReplicationFabricCustomProperties DeserializeDataReplicationFabricCustomProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("instanceType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "AzStackHCI": return AzStackHciFabricCustomProperties.DeserializeAzStackHciFabricCustomProperties(element, options); + case "HyperVMigrate": return HyperVMigrateFabricCustomProperties.DeserializeHyperVMigrateFabricCustomProperties(element, options); + case "VMwareMigrate": return VMwareMigrateFabricCustomProperties.DeserializeVMwareMigrateFabricCustomProperties(element, options); + } + } + return UnknownDataReplicationFabricCustomProperties.DeserializeUnknownDataReplicationFabricCustomProperties(element, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DataReplicationFabricCustomProperties)} does not support writing '{options.Format}' format."); + } + } + + DataReplicationFabricCustomProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataReplicationFabricCustomProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataReplicationFabricCustomProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationFabricCustomProperties.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationFabricCustomProperties.cs new file mode 100644 index 000000000000..f948ab6a88c9 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationFabricCustomProperties.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// + /// Fabric model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public abstract partial class DataReplicationFabricCustomProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + protected DataReplicationFabricCustomProperties() + { + } + + /// Initializes a new instance of . + /// Discriminator property for DataReplicationFabricCustomProperties. + /// Keeps track of any properties unknown to the library. + internal DataReplicationFabricCustomProperties(string instanceType, IDictionary serializedAdditionalRawData) + { + InstanceType = instanceType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Discriminator property for DataReplicationFabricCustomProperties. + internal string InstanceType { get; set; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationFabricPatch.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationFabricPatch.Serialization.cs new file mode 100644 index 000000000000..49c9b5d2e441 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationFabricPatch.Serialization.cs @@ -0,0 +1,181 @@ +// 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.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class DataReplicationFabricPatch : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationFabricPatch)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + DataReplicationFabricPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationFabricPatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataReplicationFabricPatch(document.RootElement, options); + } + + internal static DataReplicationFabricPatch DeserializeDataReplicationFabricPatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary tags = default; + DataReplicationFabricProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = DataReplicationFabricProperties.DeserializeDataReplicationFabricProperties(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DataReplicationFabricPatch( + id, + name, + type, + systemData, + tags ?? new ChangeTrackingDictionary(), + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DataReplicationFabricPatch)} does not support writing '{options.Format}' format."); + } + } + + DataReplicationFabricPatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataReplicationFabricPatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataReplicationFabricPatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationFabricPatch.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationFabricPatch.cs new file mode 100644 index 000000000000..c5a4dd1bb692 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationFabricPatch.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Fabric model update. + public partial class DataReplicationFabricPatch : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DataReplicationFabricPatch() + { + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Gets or sets the resource tags. + /// Fabric model properties. + /// Keeps track of any properties unknown to the library. + internal DataReplicationFabricPatch(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, DataReplicationFabricProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Tags = tags; + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets or sets the resource tags. + public IDictionary Tags { get; } + /// Fabric model properties. + public DataReplicationFabricProperties Properties { get; set; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationFabricProperties.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationFabricProperties.Serialization.cs new file mode 100644 index 000000000000..860d670040dc --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationFabricProperties.Serialization.cs @@ -0,0 +1,214 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class DataReplicationFabricProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationFabricProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(ServiceEndpoint)) + { + writer.WritePropertyName("serviceEndpoint"u8); + writer.WriteStringValue(ServiceEndpoint); + } + if (options.Format != "W" && Optional.IsDefined(ServiceResourceId)) + { + writer.WritePropertyName("serviceResourceId"u8); + writer.WriteStringValue(ServiceResourceId); + } + if (options.Format != "W" && Optional.IsDefined(Health)) + { + writer.WritePropertyName("health"u8); + writer.WriteStringValue(Health.Value.ToString()); + } + if (options.Format != "W" && Optional.IsCollectionDefined(HealthErrors)) + { + writer.WritePropertyName("healthErrors"u8); + writer.WriteStartArray(); + foreach (var item in HealthErrors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("customProperties"u8); + writer.WriteObjectValue(CustomProperties, options); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DataReplicationFabricProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationFabricProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataReplicationFabricProperties(document.RootElement, options); + } + + internal static DataReplicationFabricProperties DeserializeDataReplicationFabricProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DataReplicationProvisioningState? provisioningState = default; + string serviceEndpoint = default; + ResourceIdentifier serviceResourceId = default; + DataReplicationHealthStatus? health = default; + IReadOnlyList healthErrors = default; + DataReplicationFabricCustomProperties customProperties = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new DataReplicationProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("serviceEndpoint"u8)) + { + serviceEndpoint = property.Value.GetString(); + continue; + } + if (property.NameEquals("serviceResourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + serviceResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("health"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + health = new DataReplicationHealthStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("healthErrors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DataReplicationHealthErrorInfo.DeserializeDataReplicationHealthErrorInfo(item, options)); + } + healthErrors = array; + continue; + } + if (property.NameEquals("customProperties"u8)) + { + customProperties = DataReplicationFabricCustomProperties.DeserializeDataReplicationFabricCustomProperties(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DataReplicationFabricProperties( + provisioningState, + serviceEndpoint, + serviceResourceId, + health, + healthErrors ?? new ChangeTrackingList(), + customProperties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DataReplicationFabricProperties)} does not support writing '{options.Format}' format."); + } + } + + DataReplicationFabricProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataReplicationFabricProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataReplicationFabricProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationFabricProperties.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationFabricProperties.cs new file mode 100644 index 000000000000..316e0a251f95 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationFabricProperties.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Fabric model properties. + public partial class DataReplicationFabricProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// + /// Fabric model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// is null. + public DataReplicationFabricProperties(DataReplicationFabricCustomProperties customProperties) + { + Argument.AssertNotNull(customProperties, nameof(customProperties)); + + HealthErrors = new ChangeTrackingList(); + CustomProperties = customProperties; + } + + /// Initializes a new instance of . + /// Gets or sets the provisioning state of the fabric. + /// Gets or sets the service endpoint. + /// Gets or sets the service resource Id. + /// Gets or sets the fabric health. + /// Gets or sets the list of health errors. + /// + /// Fabric model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// Keeps track of any properties unknown to the library. + internal DataReplicationFabricProperties(DataReplicationProvisioningState? provisioningState, string serviceEndpoint, ResourceIdentifier serviceResourceId, DataReplicationHealthStatus? health, IReadOnlyList healthErrors, DataReplicationFabricCustomProperties customProperties, IDictionary serializedAdditionalRawData) + { + ProvisioningState = provisioningState; + ServiceEndpoint = serviceEndpoint; + ServiceResourceId = serviceResourceId; + Health = health; + HealthErrors = healthErrors; + CustomProperties = customProperties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DataReplicationFabricProperties() + { + } + + /// Gets or sets the provisioning state of the fabric. + public DataReplicationProvisioningState? ProvisioningState { get; } + /// Gets or sets the service endpoint. + public string ServiceEndpoint { get; } + /// Gets or sets the service resource Id. + public ResourceIdentifier ServiceResourceId { get; } + /// Gets or sets the fabric health. + public DataReplicationHealthStatus? Health { get; } + /// Gets or sets the list of health errors. + public IReadOnlyList HealthErrors { get; } + /// + /// Fabric model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public DataReplicationFabricCustomProperties CustomProperties { get; set; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationHealthErrorInfo.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationHealthErrorInfo.Serialization.cs new file mode 100644 index 000000000000..5f27929dde0e --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationHealthErrorInfo.Serialization.cs @@ -0,0 +1,327 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class DataReplicationHealthErrorInfo : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationHealthErrorInfo)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(AffectedResourceType)) + { + writer.WritePropertyName("affectedResourceType"u8); + writer.WriteStringValue(AffectedResourceType.Value); + } + if (Optional.IsCollectionDefined(AffectedResourceCorrelationIds)) + { + writer.WritePropertyName("affectedResourceCorrelationIds"u8); + writer.WriteStartArray(); + foreach (var item in AffectedResourceCorrelationIds) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(ChildErrors)) + { + writer.WritePropertyName("childErrors"u8); + writer.WriteStartArray(); + foreach (var item in ChildErrors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(Code)) + { + writer.WritePropertyName("code"u8); + writer.WriteStringValue(Code); + } + if (options.Format != "W" && Optional.IsDefined(HealthCategory)) + { + writer.WritePropertyName("healthCategory"u8); + writer.WriteStringValue(HealthCategory); + } + if (options.Format != "W" && Optional.IsDefined(Category)) + { + writer.WritePropertyName("category"u8); + writer.WriteStringValue(Category); + } + if (options.Format != "W" && Optional.IsDefined(Severity)) + { + writer.WritePropertyName("severity"u8); + writer.WriteStringValue(Severity); + } + if (options.Format != "W" && Optional.IsDefined(Source)) + { + writer.WritePropertyName("source"u8); + writer.WriteStringValue(Source); + } + if (options.Format != "W" && Optional.IsDefined(CreatedOn)) + { + writer.WritePropertyName("creationTime"u8); + writer.WriteStringValue(CreatedOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(IsCustomerResolvable)) + { + writer.WritePropertyName("isCustomerResolvable"u8); + writer.WriteBooleanValue(IsCustomerResolvable.Value); + } + if (options.Format != "W" && Optional.IsDefined(Summary)) + { + writer.WritePropertyName("summary"u8); + writer.WriteStringValue(Summary); + } + if (options.Format != "W" && Optional.IsDefined(Message)) + { + writer.WritePropertyName("message"u8); + writer.WriteStringValue(Message); + } + if (options.Format != "W" && Optional.IsDefined(Causes)) + { + writer.WritePropertyName("causes"u8); + writer.WriteStringValue(Causes); + } + if (options.Format != "W" && Optional.IsDefined(Recommendation)) + { + writer.WritePropertyName("recommendation"u8); + writer.WriteStringValue(Recommendation); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DataReplicationHealthErrorInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationHealthErrorInfo)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataReplicationHealthErrorInfo(document.RootElement, options); + } + + internal static DataReplicationHealthErrorInfo DeserializeDataReplicationHealthErrorInfo(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceType? affectedResourceType = default; + IReadOnlyList affectedResourceCorrelationIds = default; + IReadOnlyList childErrors = default; + string code = default; + string healthCategory = default; + string category = default; + string severity = default; + string source = default; + DateTimeOffset? creationTime = default; + bool? isCustomerResolvable = default; + string summary = default; + string message = default; + string causes = default; + string recommendation = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("affectedResourceType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + affectedResourceType = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("affectedResourceCorrelationIds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + affectedResourceCorrelationIds = array; + continue; + } + if (property.NameEquals("childErrors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DataReplicationInnerHealthErrorInfo.DeserializeDataReplicationInnerHealthErrorInfo(item, options)); + } + childErrors = array; + continue; + } + if (property.NameEquals("code"u8)) + { + code = property.Value.GetString(); + continue; + } + if (property.NameEquals("healthCategory"u8)) + { + healthCategory = property.Value.GetString(); + continue; + } + if (property.NameEquals("category"u8)) + { + category = property.Value.GetString(); + continue; + } + if (property.NameEquals("severity"u8)) + { + severity = property.Value.GetString(); + continue; + } + if (property.NameEquals("source"u8)) + { + source = property.Value.GetString(); + continue; + } + if (property.NameEquals("creationTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + creationTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("isCustomerResolvable"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isCustomerResolvable = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("summary"u8)) + { + summary = property.Value.GetString(); + continue; + } + if (property.NameEquals("message"u8)) + { + message = property.Value.GetString(); + continue; + } + if (property.NameEquals("causes"u8)) + { + causes = property.Value.GetString(); + continue; + } + if (property.NameEquals("recommendation"u8)) + { + recommendation = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DataReplicationHealthErrorInfo( + affectedResourceType, + affectedResourceCorrelationIds ?? new ChangeTrackingList(), + childErrors ?? new ChangeTrackingList(), + code, + healthCategory, + category, + severity, + source, + creationTime, + isCustomerResolvable, + summary, + message, + causes, + recommendation, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DataReplicationHealthErrorInfo)} does not support writing '{options.Format}' format."); + } + } + + DataReplicationHealthErrorInfo IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataReplicationHealthErrorInfo(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataReplicationHealthErrorInfo)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationHealthErrorInfo.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationHealthErrorInfo.cs new file mode 100644 index 000000000000..6105c45194d0 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationHealthErrorInfo.cs @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Health error model. + public partial class DataReplicationHealthErrorInfo + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal DataReplicationHealthErrorInfo() + { + AffectedResourceCorrelationIds = new ChangeTrackingList(); + ChildErrors = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Gets or sets the type of affected resource type. + /// Gets or sets the list of affected resource correlation Ids. This can be used to uniquely identify the count of items affected by a specific category and severity as well as count of item affected by an specific issue. + /// Gets or sets a list of child health errors associated with this error. + /// Gets or sets the error code. + /// Gets or sets the health category. + /// Gets or sets the error category. + /// Gets or sets the error severity. + /// Gets or sets the error source. + /// Gets or sets the error creation time. + /// Gets or sets a value indicating whether the error is customer resolvable. + /// Gets or sets the error summary. + /// Gets or sets the error message. + /// Gets or sets possible causes of the error. + /// Gets or sets recommended action to resolve the error. + /// Keeps track of any properties unknown to the library. + internal DataReplicationHealthErrorInfo(ResourceType? affectedResourceType, IReadOnlyList affectedResourceCorrelationIds, IReadOnlyList childErrors, string code, string healthCategory, string category, string severity, string source, DateTimeOffset? createdOn, bool? isCustomerResolvable, string summary, string message, string causes, string recommendation, IDictionary serializedAdditionalRawData) + { + AffectedResourceType = affectedResourceType; + AffectedResourceCorrelationIds = affectedResourceCorrelationIds; + ChildErrors = childErrors; + Code = code; + HealthCategory = healthCategory; + Category = category; + Severity = severity; + Source = source; + CreatedOn = createdOn; + IsCustomerResolvable = isCustomerResolvable; + Summary = summary; + Message = message; + Causes = causes; + Recommendation = recommendation; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets or sets the type of affected resource type. + public ResourceType? AffectedResourceType { get; } + /// Gets or sets the list of affected resource correlation Ids. This can be used to uniquely identify the count of items affected by a specific category and severity as well as count of item affected by an specific issue. + public IReadOnlyList AffectedResourceCorrelationIds { get; } + /// Gets or sets a list of child health errors associated with this error. + public IReadOnlyList ChildErrors { get; } + /// Gets or sets the error code. + public string Code { get; } + /// Gets or sets the health category. + public string HealthCategory { get; } + /// Gets or sets the error category. + public string Category { get; } + /// Gets or sets the error severity. + public string Severity { get; } + /// Gets or sets the error source. + public string Source { get; } + /// Gets or sets the error creation time. + public DateTimeOffset? CreatedOn { get; } + /// Gets or sets a value indicating whether the error is customer resolvable. + public bool? IsCustomerResolvable { get; } + /// Gets or sets the error summary. + public string Summary { get; } + /// Gets or sets the error message. + public string Message { get; } + /// Gets or sets possible causes of the error. + public string Causes { get; } + /// Gets or sets recommended action to resolve the error. + public string Recommendation { get; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationHealthStatus.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationHealthStatus.cs new file mode 100644 index 000000000000..716a87911b30 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationHealthStatus.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Gets or sets the fabric health. + public readonly partial struct DataReplicationHealthStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DataReplicationHealthStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NormalValue = "Normal"; + private const string WarningValue = "Warning"; + private const string CriticalValue = "Critical"; + + /// Healthy Status. + public static DataReplicationHealthStatus Normal { get; } = new DataReplicationHealthStatus(NormalValue); + /// Warning Status. + public static DataReplicationHealthStatus Warning { get; } = new DataReplicationHealthStatus(WarningValue); + /// Critical Status. + public static DataReplicationHealthStatus Critical { get; } = new DataReplicationHealthStatus(CriticalValue); + /// Determines if two values are the same. + public static bool operator ==(DataReplicationHealthStatus left, DataReplicationHealthStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DataReplicationHealthStatus left, DataReplicationHealthStatus right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DataReplicationHealthStatus(string value) => new DataReplicationHealthStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DataReplicationHealthStatus other && Equals(other); + /// + public bool Equals(DataReplicationHealthStatus 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/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationIdentity.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationIdentity.Serialization.cs new file mode 100644 index 000000000000..52efea81eef7 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationIdentity.Serialization.cs @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class DataReplicationIdentity : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationIdentity)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("tenantId"u8); + writer.WriteStringValue(TenantId); + writer.WritePropertyName("applicationId"u8); + writer.WriteStringValue(ApplicationId); + writer.WritePropertyName("objectId"u8); + writer.WriteStringValue(ObjectId); + writer.WritePropertyName("audience"u8); + writer.WriteStringValue(Audience); + writer.WritePropertyName("aadAuthority"u8); + writer.WriteStringValue(AadAuthority); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DataReplicationIdentity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationIdentity)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataReplicationIdentity(document.RootElement, options); + } + + internal static DataReplicationIdentity DeserializeDataReplicationIdentity(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Guid tenantId = default; + string applicationId = default; + string objectId = default; + string audience = default; + string aadAuthority = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("tenantId"u8)) + { + tenantId = property.Value.GetGuid(); + continue; + } + if (property.NameEquals("applicationId"u8)) + { + applicationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("objectId"u8)) + { + objectId = property.Value.GetString(); + continue; + } + if (property.NameEquals("audience"u8)) + { + audience = property.Value.GetString(); + continue; + } + if (property.NameEquals("aadAuthority"u8)) + { + aadAuthority = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DataReplicationIdentity( + tenantId, + applicationId, + objectId, + audience, + aadAuthority, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DataReplicationIdentity)} does not support writing '{options.Format}' format."); + } + } + + DataReplicationIdentity IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataReplicationIdentity(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataReplicationIdentity)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationIdentity.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationIdentity.cs new file mode 100644 index 000000000000..0b1a73510c21 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationIdentity.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Identity model. + public partial class DataReplicationIdentity + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Gets or sets the tenant Id of the SPN with which fabric agent communicates to service. + /// Gets or sets the client/application Id of the SPN with which fabric agent communicates to service. + /// Gets or sets the object Id of the SPN with which fabric agent communicates to service. + /// Gets or sets the audience of the SPN with which fabric agent communicates to service. + /// Gets or sets the authority of the SPN with which fabric agent communicates to service. + /// , , or is null. + public DataReplicationIdentity(Guid tenantId, string applicationId, string objectId, string audience, string aadAuthority) + { + Argument.AssertNotNull(applicationId, nameof(applicationId)); + Argument.AssertNotNull(objectId, nameof(objectId)); + Argument.AssertNotNull(audience, nameof(audience)); + Argument.AssertNotNull(aadAuthority, nameof(aadAuthority)); + + TenantId = tenantId; + ApplicationId = applicationId; + ObjectId = objectId; + Audience = audience; + AadAuthority = aadAuthority; + } + + /// Initializes a new instance of . + /// Gets or sets the tenant Id of the SPN with which fabric agent communicates to service. + /// Gets or sets the client/application Id of the SPN with which fabric agent communicates to service. + /// Gets or sets the object Id of the SPN with which fabric agent communicates to service. + /// Gets or sets the audience of the SPN with which fabric agent communicates to service. + /// Gets or sets the authority of the SPN with which fabric agent communicates to service. + /// Keeps track of any properties unknown to the library. + internal DataReplicationIdentity(Guid tenantId, string applicationId, string objectId, string audience, string aadAuthority, IDictionary serializedAdditionalRawData) + { + TenantId = tenantId; + ApplicationId = applicationId; + ObjectId = objectId; + Audience = audience; + AadAuthority = aadAuthority; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DataReplicationIdentity() + { + } + + /// Gets or sets the tenant Id of the SPN with which fabric agent communicates to service. + public Guid TenantId { get; set; } + /// Gets or sets the client/application Id of the SPN with which fabric agent communicates to service. + public string ApplicationId { get; set; } + /// Gets or sets the object Id of the SPN with which fabric agent communicates to service. + public string ObjectId { get; set; } + /// Gets or sets the audience of the SPN with which fabric agent communicates to service. + public string Audience { get; set; } + /// Gets or sets the authority of the SPN with which fabric agent communicates to service. + public string AadAuthority { get; set; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationInnerHealthErrorInfo.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationInnerHealthErrorInfo.Serialization.cs new file mode 100644 index 000000000000..af4a164da9d6 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationInnerHealthErrorInfo.Serialization.cs @@ -0,0 +1,259 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class DataReplicationInnerHealthErrorInfo : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationInnerHealthErrorInfo)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(Code)) + { + writer.WritePropertyName("code"u8); + writer.WriteStringValue(Code); + } + if (options.Format != "W" && Optional.IsDefined(HealthCategory)) + { + writer.WritePropertyName("healthCategory"u8); + writer.WriteStringValue(HealthCategory); + } + if (options.Format != "W" && Optional.IsDefined(Category)) + { + writer.WritePropertyName("category"u8); + writer.WriteStringValue(Category); + } + if (options.Format != "W" && Optional.IsDefined(Severity)) + { + writer.WritePropertyName("severity"u8); + writer.WriteStringValue(Severity); + } + if (options.Format != "W" && Optional.IsDefined(Source)) + { + writer.WritePropertyName("source"u8); + writer.WriteStringValue(Source); + } + if (options.Format != "W" && Optional.IsDefined(CreatedOn)) + { + writer.WritePropertyName("creationTime"u8); + writer.WriteStringValue(CreatedOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(IsCustomerResolvable)) + { + writer.WritePropertyName("isCustomerResolvable"u8); + writer.WriteBooleanValue(IsCustomerResolvable.Value); + } + if (options.Format != "W" && Optional.IsDefined(Summary)) + { + writer.WritePropertyName("summary"u8); + writer.WriteStringValue(Summary); + } + if (options.Format != "W" && Optional.IsDefined(Message)) + { + writer.WritePropertyName("message"u8); + writer.WriteStringValue(Message); + } + if (options.Format != "W" && Optional.IsDefined(Causes)) + { + writer.WritePropertyName("causes"u8); + writer.WriteStringValue(Causes); + } + if (options.Format != "W" && Optional.IsDefined(Recommendation)) + { + writer.WritePropertyName("recommendation"u8); + writer.WriteStringValue(Recommendation); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DataReplicationInnerHealthErrorInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationInnerHealthErrorInfo)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataReplicationInnerHealthErrorInfo(document.RootElement, options); + } + + internal static DataReplicationInnerHealthErrorInfo DeserializeDataReplicationInnerHealthErrorInfo(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string code = default; + string healthCategory = default; + string category = default; + string severity = default; + string source = default; + DateTimeOffset? creationTime = default; + bool? isCustomerResolvable = default; + string summary = default; + string message = default; + string causes = default; + string recommendation = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("code"u8)) + { + code = property.Value.GetString(); + continue; + } + if (property.NameEquals("healthCategory"u8)) + { + healthCategory = property.Value.GetString(); + continue; + } + if (property.NameEquals("category"u8)) + { + category = property.Value.GetString(); + continue; + } + if (property.NameEquals("severity"u8)) + { + severity = property.Value.GetString(); + continue; + } + if (property.NameEquals("source"u8)) + { + source = property.Value.GetString(); + continue; + } + if (property.NameEquals("creationTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + creationTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("isCustomerResolvable"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isCustomerResolvable = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("summary"u8)) + { + summary = property.Value.GetString(); + continue; + } + if (property.NameEquals("message"u8)) + { + message = property.Value.GetString(); + continue; + } + if (property.NameEquals("causes"u8)) + { + causes = property.Value.GetString(); + continue; + } + if (property.NameEquals("recommendation"u8)) + { + recommendation = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DataReplicationInnerHealthErrorInfo( + code, + healthCategory, + category, + severity, + source, + creationTime, + isCustomerResolvable, + summary, + message, + causes, + recommendation, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DataReplicationInnerHealthErrorInfo)} does not support writing '{options.Format}' format."); + } + } + + DataReplicationInnerHealthErrorInfo IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataReplicationInnerHealthErrorInfo(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataReplicationInnerHealthErrorInfo)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationInnerHealthErrorInfo.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationInnerHealthErrorInfo.cs new file mode 100644 index 000000000000..2d9fcba3dcf6 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationInnerHealthErrorInfo.cs @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Inner health error model. + public partial class DataReplicationInnerHealthErrorInfo + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal DataReplicationInnerHealthErrorInfo() + { + } + + /// Initializes a new instance of . + /// Gets or sets the error code. + /// Gets or sets the health category. + /// Gets or sets the error category. + /// Gets or sets the error severity. + /// Gets or sets the error source. + /// Gets or sets the error creation time. + /// Gets or sets a value indicating whether the error is customer resolvable. + /// Gets or sets the error summary. + /// Gets or sets the error message. + /// Gets or sets possible causes of the error. + /// Gets or sets recommended action to resolve the error. + /// Keeps track of any properties unknown to the library. + internal DataReplicationInnerHealthErrorInfo(string code, string healthCategory, string category, string severity, string source, DateTimeOffset? createdOn, bool? isCustomerResolvable, string summary, string message, string causes, string recommendation, IDictionary serializedAdditionalRawData) + { + Code = code; + HealthCategory = healthCategory; + Category = category; + Severity = severity; + Source = source; + CreatedOn = createdOn; + IsCustomerResolvable = isCustomerResolvable; + Summary = summary; + Message = message; + Causes = causes; + Recommendation = recommendation; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets or sets the error code. + public string Code { get; } + /// Gets or sets the health category. + public string HealthCategory { get; } + /// Gets or sets the error category. + public string Category { get; } + /// Gets or sets the error severity. + public string Severity { get; } + /// Gets or sets the error source. + public string Source { get; } + /// Gets or sets the error creation time. + public DateTimeOffset? CreatedOn { get; } + /// Gets or sets a value indicating whether the error is customer resolvable. + public bool? IsCustomerResolvable { get; } + /// Gets or sets the error summary. + public string Summary { get; } + /// Gets or sets the error message. + public string Message { get; } + /// Gets or sets possible causes of the error. + public string Causes { get; } + /// Gets or sets recommended action to resolve the error. + public string Recommendation { get; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationJobCustomProperties.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationJobCustomProperties.Serialization.cs new file mode 100644 index 000000000000..93f9ee1d7226 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationJobCustomProperties.Serialization.cs @@ -0,0 +1,124 @@ +// 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.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + [PersistableModelProxy(typeof(UnknownDataReplicationJobCustomProperties))] + public partial class DataReplicationJobCustomProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationJobCustomProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("instanceType"u8); + writer.WriteStringValue(InstanceType); + if (options.Format != "W" && Optional.IsDefined(AffectedObjectDetails)) + { + writer.WritePropertyName("affectedObjectDetails"u8); + writer.WriteObjectValue(AffectedObjectDetails, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DataReplicationJobCustomProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationJobCustomProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataReplicationJobCustomProperties(document.RootElement, options); + } + + internal static DataReplicationJobCustomProperties DeserializeDataReplicationJobCustomProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("instanceType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "FailoverJobDetails": return FailoverJobCustomProperties.DeserializeFailoverJobCustomProperties(element, options); + case "TestFailoverCleanupJobDetails": return TestFailoverCleanupJobCustomProperties.DeserializeTestFailoverCleanupJobCustomProperties(element, options); + case "TestFailoverJobDetails": return TestFailoverJobCustomProperties.DeserializeTestFailoverJobCustomProperties(element, options); + } + } + return UnknownDataReplicationJobCustomProperties.DeserializeUnknownDataReplicationJobCustomProperties(element, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DataReplicationJobCustomProperties)} does not support writing '{options.Format}' format."); + } + } + + DataReplicationJobCustomProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataReplicationJobCustomProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataReplicationJobCustomProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationJobCustomProperties.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationJobCustomProperties.cs new file mode 100644 index 000000000000..1547285af3ef --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationJobCustomProperties.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// + /// Job model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public abstract partial class DataReplicationJobCustomProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + protected DataReplicationJobCustomProperties() + { + } + + /// Initializes a new instance of . + /// Discriminator property for DataReplicationJobCustomProperties. + /// Gets or sets any custom properties of the affected object. + /// Keeps track of any properties unknown to the library. + internal DataReplicationJobCustomProperties(string instanceType, JobModelCustomPropertiesAffectedObjectDetails affectedObjectDetails, IDictionary serializedAdditionalRawData) + { + InstanceType = instanceType; + AffectedObjectDetails = affectedObjectDetails; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Discriminator property for DataReplicationJobCustomProperties. + internal string InstanceType { get; set; } + /// Gets or sets any custom properties of the affected object. + public JobModelCustomPropertiesAffectedObjectDetails AffectedObjectDetails { get; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationJobObjectType.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationJobObjectType.cs new file mode 100644 index 000000000000..9d728afd64f0 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationJobObjectType.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Gets or sets the object type. + public readonly partial struct DataReplicationJobObjectType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DataReplicationJobObjectType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AvsDiskPoolValue = "AvsDiskPool"; + private const string FabricAgentValue = "FabricAgent"; + private const string FabricValue = "Fabric"; + private const string PolicyValue = "Policy"; + private const string ProtectedItemValue = "ProtectedItem"; + private const string RecoveryPlanValue = "RecoveryPlan"; + private const string ReplicationExtensionValue = "ReplicationExtension"; + private const string VaultValue = "Vault"; + + /// AVS disk pool. + public static DataReplicationJobObjectType AvsDiskPool { get; } = new DataReplicationJobObjectType(AvsDiskPoolValue); + /// Fabric agent level workflow. + public static DataReplicationJobObjectType FabricAgent { get; } = new DataReplicationJobObjectType(FabricAgentValue); + /// Fabric level job. + public static DataReplicationJobObjectType Fabric { get; } = new DataReplicationJobObjectType(FabricValue); + /// Policy level job. + public static DataReplicationJobObjectType Policy { get; } = new DataReplicationJobObjectType(PolicyValue); + /// Protected item level job. + public static DataReplicationJobObjectType ProtectedItem { get; } = new DataReplicationJobObjectType(ProtectedItemValue); + /// Recovery plan level job. + public static DataReplicationJobObjectType RecoveryPlan { get; } = new DataReplicationJobObjectType(RecoveryPlanValue); + /// Replication extension level job. + public static DataReplicationJobObjectType ReplicationExtension { get; } = new DataReplicationJobObjectType(ReplicationExtensionValue); + /// Vault level job. + public static DataReplicationJobObjectType Vault { get; } = new DataReplicationJobObjectType(VaultValue); + /// Determines if two values are the same. + public static bool operator ==(DataReplicationJobObjectType left, DataReplicationJobObjectType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DataReplicationJobObjectType left, DataReplicationJobObjectType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DataReplicationJobObjectType(string value) => new DataReplicationJobObjectType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DataReplicationJobObjectType other && Equals(other); + /// + public bool Equals(DataReplicationJobObjectType 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/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationJobProperties.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationJobProperties.Serialization.cs new file mode 100644 index 000000000000..f2d76c55c6c1 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationJobProperties.Serialization.cs @@ -0,0 +1,394 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class DataReplicationJobProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationJobProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(DisplayName)) + { + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + } + if (options.Format != "W" && Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(StartOn)) + { + writer.WritePropertyName("startTime"u8); + writer.WriteStringValue(StartOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(EndOn)) + { + writer.WritePropertyName("endTime"u8); + writer.WriteStringValue(EndOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(ObjectId)) + { + writer.WritePropertyName("objectId"u8); + writer.WriteStringValue(ObjectId); + } + if (options.Format != "W" && Optional.IsDefined(ObjectName)) + { + writer.WritePropertyName("objectName"u8); + writer.WriteStringValue(ObjectName); + } + if (options.Format != "W" && Optional.IsDefined(ObjectInternalId)) + { + writer.WritePropertyName("objectInternalId"u8); + writer.WriteStringValue(ObjectInternalId); + } + if (options.Format != "W" && Optional.IsDefined(ObjectInternalName)) + { + writer.WritePropertyName("objectInternalName"u8); + writer.WriteStringValue(ObjectInternalName); + } + if (options.Format != "W" && Optional.IsDefined(ObjectType)) + { + writer.WritePropertyName("objectType"u8); + writer.WriteStringValue(ObjectType.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(ReplicationProviderId)) + { + writer.WritePropertyName("replicationProviderId"u8); + writer.WriteStringValue(ReplicationProviderId); + } + if (options.Format != "W" && Optional.IsDefined(SourceFabricProviderId)) + { + writer.WritePropertyName("sourceFabricProviderId"u8); + writer.WriteStringValue(SourceFabricProviderId); + } + if (options.Format != "W" && Optional.IsDefined(TargetFabricProviderId)) + { + writer.WritePropertyName("targetFabricProviderId"u8); + writer.WriteStringValue(TargetFabricProviderId); + } + if (options.Format != "W" && Optional.IsCollectionDefined(AllowedActions)) + { + writer.WritePropertyName("allowedActions"u8); + writer.WriteStartArray(); + foreach (var item in AllowedActions) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(ActivityId)) + { + writer.WritePropertyName("activityId"u8); + writer.WriteStringValue(ActivityId); + } + if (options.Format != "W" && Optional.IsCollectionDefined(Tasks)) + { + writer.WritePropertyName("tasks"u8); + writer.WriteStartArray(); + foreach (var item in Tasks) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsCollectionDefined(Errors)) + { + writer.WritePropertyName("errors"u8); + writer.WriteStartArray(); + foreach (var item in Errors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("customProperties"u8); + writer.WriteObjectValue(CustomProperties, options); + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DataReplicationJobProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationJobProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataReplicationJobProperties(document.RootElement, options); + } + + internal static DataReplicationJobProperties DeserializeDataReplicationJobProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string displayName = default; + DataReplicationJobState? state = default; + DateTimeOffset? startTime = default; + DateTimeOffset? endTime = default; + string objectId = default; + string objectName = default; + string objectInternalId = default; + string objectInternalName = default; + DataReplicationJobObjectType? objectType = default; + string replicationProviderId = default; + string sourceFabricProviderId = default; + string targetFabricProviderId = default; + IReadOnlyList allowedActions = default; + string activityId = default; + IReadOnlyList tasks = default; + IReadOnlyList errors = default; + DataReplicationJobCustomProperties customProperties = default; + DataReplicationProvisioningState? provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("state"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = new DataReplicationJobState(property.Value.GetString()); + continue; + } + if (property.NameEquals("startTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + startTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("endTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("objectId"u8)) + { + objectId = property.Value.GetString(); + continue; + } + if (property.NameEquals("objectName"u8)) + { + objectName = property.Value.GetString(); + continue; + } + if (property.NameEquals("objectInternalId"u8)) + { + objectInternalId = property.Value.GetString(); + continue; + } + if (property.NameEquals("objectInternalName"u8)) + { + objectInternalName = property.Value.GetString(); + continue; + } + if (property.NameEquals("objectType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + objectType = new DataReplicationJobObjectType(property.Value.GetString()); + continue; + } + if (property.NameEquals("replicationProviderId"u8)) + { + replicationProviderId = property.Value.GetString(); + continue; + } + if (property.NameEquals("sourceFabricProviderId"u8)) + { + sourceFabricProviderId = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetFabricProviderId"u8)) + { + targetFabricProviderId = property.Value.GetString(); + continue; + } + if (property.NameEquals("allowedActions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + allowedActions = array; + continue; + } + if (property.NameEquals("activityId"u8)) + { + activityId = property.Value.GetString(); + continue; + } + if (property.NameEquals("tasks"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DataReplicationTask.DeserializeDataReplicationTask(item, options)); + } + tasks = array; + continue; + } + if (property.NameEquals("errors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DataReplicationErrorInfo.DeserializeDataReplicationErrorInfo(item, options)); + } + errors = array; + continue; + } + if (property.NameEquals("customProperties"u8)) + { + customProperties = DataReplicationJobCustomProperties.DeserializeDataReplicationJobCustomProperties(property.Value, options); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new DataReplicationProvisioningState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DataReplicationJobProperties( + displayName, + state, + startTime, + endTime, + objectId, + objectName, + objectInternalId, + objectInternalName, + objectType, + replicationProviderId, + sourceFabricProviderId, + targetFabricProviderId, + allowedActions ?? new ChangeTrackingList(), + activityId, + tasks ?? new ChangeTrackingList(), + errors ?? new ChangeTrackingList(), + customProperties, + provisioningState, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DataReplicationJobProperties)} does not support writing '{options.Format}' format."); + } + } + + DataReplicationJobProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataReplicationJobProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataReplicationJobProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationJobProperties.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationJobProperties.cs new file mode 100644 index 000000000000..7f89805eccbb --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationJobProperties.cs @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Job model properties. + public partial class DataReplicationJobProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// + /// Job model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// is null. + internal DataReplicationJobProperties(DataReplicationJobCustomProperties customProperties) + { + Argument.AssertNotNull(customProperties, nameof(customProperties)); + + AllowedActions = new ChangeTrackingList(); + Tasks = new ChangeTrackingList(); + Errors = new ChangeTrackingList(); + CustomProperties = customProperties; + } + + /// Initializes a new instance of . + /// Gets or sets the friendly display name. + /// Gets or sets the job state. + /// Gets or sets the start time. + /// Gets or sets the end time. + /// Gets or sets the affected object Id. + /// Gets or sets the affected object name. + /// Gets or sets the affected object internal Id. + /// Gets or sets the affected object internal name. + /// Gets or sets the object type. + /// Gets or sets the replication provider. + /// Gets or sets the source fabric provider. + /// Gets or sets the target fabric provider. + /// Gets or sets the list of allowed actions on the job. + /// Gets or sets the job activity id. + /// Gets or sets the list of tasks. + /// Gets or sets the list of errors. + /// + /// Job model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// Gets or sets the provisioning state of the job. + /// Keeps track of any properties unknown to the library. + internal DataReplicationJobProperties(string displayName, DataReplicationJobState? state, DateTimeOffset? startOn, DateTimeOffset? endOn, string objectId, string objectName, string objectInternalId, string objectInternalName, DataReplicationJobObjectType? objectType, string replicationProviderId, string sourceFabricProviderId, string targetFabricProviderId, IReadOnlyList allowedActions, string activityId, IReadOnlyList tasks, IReadOnlyList errors, DataReplicationJobCustomProperties customProperties, DataReplicationProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) + { + DisplayName = displayName; + State = state; + StartOn = startOn; + EndOn = endOn; + ObjectId = objectId; + ObjectName = objectName; + ObjectInternalId = objectInternalId; + ObjectInternalName = objectInternalName; + ObjectType = objectType; + ReplicationProviderId = replicationProviderId; + SourceFabricProviderId = sourceFabricProviderId; + TargetFabricProviderId = targetFabricProviderId; + AllowedActions = allowedActions; + ActivityId = activityId; + Tasks = tasks; + Errors = errors; + CustomProperties = customProperties; + ProvisioningState = provisioningState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DataReplicationJobProperties() + { + } + + /// Gets or sets the friendly display name. + public string DisplayName { get; } + /// Gets or sets the job state. + public DataReplicationJobState? State { get; } + /// Gets or sets the start time. + public DateTimeOffset? StartOn { get; } + /// Gets or sets the end time. + public DateTimeOffset? EndOn { get; } + /// Gets or sets the affected object Id. + public string ObjectId { get; } + /// Gets or sets the affected object name. + public string ObjectName { get; } + /// Gets or sets the affected object internal Id. + public string ObjectInternalId { get; } + /// Gets or sets the affected object internal name. + public string ObjectInternalName { get; } + /// Gets or sets the object type. + public DataReplicationJobObjectType? ObjectType { get; } + /// Gets or sets the replication provider. + public string ReplicationProviderId { get; } + /// Gets or sets the source fabric provider. + public string SourceFabricProviderId { get; } + /// Gets or sets the target fabric provider. + public string TargetFabricProviderId { get; } + /// Gets or sets the list of allowed actions on the job. + public IReadOnlyList AllowedActions { get; } + /// Gets or sets the job activity id. + public string ActivityId { get; } + /// Gets or sets the list of tasks. + public IReadOnlyList Tasks { get; } + /// Gets or sets the list of errors. + public IReadOnlyList Errors { get; } + /// + /// Job model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public DataReplicationJobCustomProperties CustomProperties { get; } + /// Gets or sets the provisioning state of the job. + public DataReplicationProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationJobState.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationJobState.cs new file mode 100644 index 000000000000..12b9e9111f4a --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationJobState.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Gets or sets the job state. + public readonly partial struct DataReplicationJobState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DataReplicationJobState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PendingValue = "Pending"; + private const string StartedValue = "Started"; + private const string CancellingValue = "Cancelling"; + private const string SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + private const string CancelledValue = "Cancelled"; + private const string CompletedWithInformationValue = "CompletedWithInformation"; + private const string CompletedWithWarningsValue = "CompletedWithWarnings"; + private const string CompletedWithErrorsValue = "CompletedWithErrors"; + + /// Job has not been started. + public static DataReplicationJobState Pending { get; } = new DataReplicationJobState(PendingValue); + /// Job is in progress. + public static DataReplicationJobState Started { get; } = new DataReplicationJobState(StartedValue); + /// Job cancellation is in progress. + public static DataReplicationJobState Cancelling { get; } = new DataReplicationJobState(CancellingValue); + /// Job has completed successfully. + public static DataReplicationJobState Succeeded { get; } = new DataReplicationJobState(SucceededValue); + /// Job failed. + public static DataReplicationJobState Failed { get; } = new DataReplicationJobState(FailedValue); + /// Job has been cancelled. + public static DataReplicationJobState Cancelled { get; } = new DataReplicationJobState(CancelledValue); + /// Job has completed with information. + public static DataReplicationJobState CompletedWithInformation { get; } = new DataReplicationJobState(CompletedWithInformationValue); + /// Job has completed with warnings. + public static DataReplicationJobState CompletedWithWarnings { get; } = new DataReplicationJobState(CompletedWithWarningsValue); + /// Job has completed with errors. + public static DataReplicationJobState CompletedWithErrors { get; } = new DataReplicationJobState(CompletedWithErrorsValue); + /// Determines if two values are the same. + public static bool operator ==(DataReplicationJobState left, DataReplicationJobState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DataReplicationJobState left, DataReplicationJobState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DataReplicationJobState(string value) => new DataReplicationJobState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DataReplicationJobState other && Equals(other); + /// + public bool Equals(DataReplicationJobState 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/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationNameAvailabilityContent.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationNameAvailabilityContent.Serialization.cs new file mode 100644 index 000000000000..81afc8ca04b0 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationNameAvailabilityContent.Serialization.cs @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class DataReplicationNameAvailabilityContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationNameAvailabilityContent)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(Type)) + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DataReplicationNameAvailabilityContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationNameAvailabilityContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataReplicationNameAvailabilityContent(document.RootElement, options); + } + + internal static DataReplicationNameAvailabilityContent DeserializeDataReplicationNameAvailabilityContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + ResourceType? type = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + type = new ResourceType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DataReplicationNameAvailabilityContent(name, type, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DataReplicationNameAvailabilityContent)} does not support writing '{options.Format}' format."); + } + } + + DataReplicationNameAvailabilityContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataReplicationNameAvailabilityContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataReplicationNameAvailabilityContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationNameAvailabilityContent.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationNameAvailabilityContent.cs new file mode 100644 index 000000000000..987f7b7ff78e --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationNameAvailabilityContent.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Check name availability model. + public partial class DataReplicationNameAvailabilityContent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DataReplicationNameAvailabilityContent() + { + } + + /// Initializes a new instance of . + /// Gets or sets the resource name. + /// Gets or sets the resource type. + /// Keeps track of any properties unknown to the library. + internal DataReplicationNameAvailabilityContent(string name, ResourceType? type, IDictionary serializedAdditionalRawData) + { + Name = name; + Type = type; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets or sets the resource name. + public string Name { get; set; } + /// Gets or sets the resource type. + public ResourceType? Type { get; set; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationNameAvailabilityResult.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationNameAvailabilityResult.Serialization.cs new file mode 100644 index 000000000000..9c472c02a283 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationNameAvailabilityResult.Serialization.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class DataReplicationNameAvailabilityResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationNameAvailabilityResult)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(IsNameAvailable)) + { + writer.WritePropertyName("nameAvailable"u8); + writer.WriteBooleanValue(IsNameAvailable.Value); + } + if (Optional.IsDefined(Reason)) + { + writer.WritePropertyName("reason"u8); + writer.WriteStringValue(Reason); + } + if (Optional.IsDefined(Message)) + { + writer.WritePropertyName("message"u8); + writer.WriteStringValue(Message); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DataReplicationNameAvailabilityResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationNameAvailabilityResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataReplicationNameAvailabilityResult(document.RootElement, options); + } + + internal static DataReplicationNameAvailabilityResult DeserializeDataReplicationNameAvailabilityResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool? nameAvailable = default; + string reason = default; + string message = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("nameAvailable"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nameAvailable = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("reason"u8)) + { + reason = property.Value.GetString(); + continue; + } + if (property.NameEquals("message"u8)) + { + message = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DataReplicationNameAvailabilityResult(nameAvailable, reason, message, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DataReplicationNameAvailabilityResult)} does not support writing '{options.Format}' format."); + } + } + + DataReplicationNameAvailabilityResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataReplicationNameAvailabilityResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataReplicationNameAvailabilityResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationNameAvailabilityResult.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationNameAvailabilityResult.cs new file mode 100644 index 000000000000..450333f70f82 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationNameAvailabilityResult.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Check name availability response model. + public partial class DataReplicationNameAvailabilityResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal DataReplicationNameAvailabilityResult() + { + } + + /// Initializes a new instance of . + /// Gets or sets a value indicating whether resource name is available or not. + /// Gets or sets the reason for resource name unavailability. + /// Gets or sets the message for resource name unavailability. + /// Keeps track of any properties unknown to the library. + internal DataReplicationNameAvailabilityResult(bool? isNameAvailable, string reason, string message, IDictionary serializedAdditionalRawData) + { + IsNameAvailable = isNameAvailable; + Reason = reason; + Message = message; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets or sets a value indicating whether resource name is available or not. + public bool? IsNameAvailable { get; } + /// Gets or sets the reason for resource name unavailability. + public string Reason { get; } + /// Gets or sets the message for resource name unavailability. + public string Message { get; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationPolicyCustomProperties.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationPolicyCustomProperties.Serialization.cs new file mode 100644 index 000000000000..2f64b399d319 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationPolicyCustomProperties.Serialization.cs @@ -0,0 +1,118 @@ +// 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.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + [PersistableModelProxy(typeof(UnknownDataReplicationPolicyCustomProperties))] + public partial class DataReplicationPolicyCustomProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationPolicyCustomProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("instanceType"u8); + writer.WriteStringValue(InstanceType); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DataReplicationPolicyCustomProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationPolicyCustomProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataReplicationPolicyCustomProperties(document.RootElement, options); + } + + internal static DataReplicationPolicyCustomProperties DeserializeDataReplicationPolicyCustomProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("instanceType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "HyperVToAzStackHCI": return HyperVToAzStackHciPolicyCustomProperties.DeserializeHyperVToAzStackHciPolicyCustomProperties(element, options); + case "VMwareToAzStackHCI": return VMwareToAzStackHciPolicyCustomProperties.DeserializeVMwareToAzStackHciPolicyCustomProperties(element, options); + } + } + return UnknownDataReplicationPolicyCustomProperties.DeserializeUnknownDataReplicationPolicyCustomProperties(element, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DataReplicationPolicyCustomProperties)} does not support writing '{options.Format}' format."); + } + } + + DataReplicationPolicyCustomProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataReplicationPolicyCustomProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataReplicationPolicyCustomProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationPolicyCustomProperties.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationPolicyCustomProperties.cs new file mode 100644 index 000000000000..92a683cd1240 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationPolicyCustomProperties.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// + /// Policy model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public abstract partial class DataReplicationPolicyCustomProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + protected DataReplicationPolicyCustomProperties() + { + } + + /// Initializes a new instance of . + /// Discriminator property for DataReplicationPolicyCustomProperties. + /// Keeps track of any properties unknown to the library. + internal DataReplicationPolicyCustomProperties(string instanceType, IDictionary serializedAdditionalRawData) + { + InstanceType = instanceType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Discriminator property for DataReplicationPolicyCustomProperties. + internal string InstanceType { get; set; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationPolicyProperties.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationPolicyProperties.Serialization.cs new file mode 100644 index 000000000000..84602e01dd86 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationPolicyProperties.Serialization.cs @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class DataReplicationPolicyProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationPolicyProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + writer.WritePropertyName("customProperties"u8); + writer.WriteObjectValue(CustomProperties, options); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DataReplicationPolicyProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationPolicyProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataReplicationPolicyProperties(document.RootElement, options); + } + + internal static DataReplicationPolicyProperties DeserializeDataReplicationPolicyProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DataReplicationProvisioningState? provisioningState = default; + DataReplicationPolicyCustomProperties customProperties = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new DataReplicationProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("customProperties"u8)) + { + customProperties = DataReplicationPolicyCustomProperties.DeserializeDataReplicationPolicyCustomProperties(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DataReplicationPolicyProperties(provisioningState, customProperties, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DataReplicationPolicyProperties)} does not support writing '{options.Format}' format."); + } + } + + DataReplicationPolicyProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataReplicationPolicyProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataReplicationPolicyProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationPolicyProperties.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationPolicyProperties.cs new file mode 100644 index 000000000000..8ae3477e3627 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationPolicyProperties.cs @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Policy model properties. + public partial class DataReplicationPolicyProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// + /// Policy model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// is null. + public DataReplicationPolicyProperties(DataReplicationPolicyCustomProperties customProperties) + { + Argument.AssertNotNull(customProperties, nameof(customProperties)); + + CustomProperties = customProperties; + } + + /// Initializes a new instance of . + /// Gets or sets the provisioning state of the policy. + /// + /// Policy model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// Keeps track of any properties unknown to the library. + internal DataReplicationPolicyProperties(DataReplicationProvisioningState? provisioningState, DataReplicationPolicyCustomProperties customProperties, IDictionary serializedAdditionalRawData) + { + ProvisioningState = provisioningState; + CustomProperties = customProperties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DataReplicationPolicyProperties() + { + } + + /// Gets or sets the provisioning state of the policy. + public DataReplicationProvisioningState? ProvisioningState { get; } + /// + /// Policy model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public DataReplicationPolicyCustomProperties CustomProperties { get; set; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationPrivateEndpointConnectionProperties.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationPrivateEndpointConnectionProperties.Serialization.cs new file mode 100644 index 000000000000..2ca65084f3f0 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationPrivateEndpointConnectionProperties.Serialization.cs @@ -0,0 +1,164 @@ +// 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.Resources.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class DataReplicationPrivateEndpointConnectionProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationPrivateEndpointConnectionProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (Optional.IsDefined(PrivateEndpoint)) + { + writer.WritePropertyName("privateEndpoint"u8); + JsonSerializer.Serialize(writer, PrivateEndpoint); + } + if (Optional.IsDefined(PrivateLinkServiceConnectionState)) + { + writer.WritePropertyName("privateLinkServiceConnectionState"u8); + writer.WriteObjectValue(PrivateLinkServiceConnectionState, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DataReplicationPrivateEndpointConnectionProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationPrivateEndpointConnectionProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataReplicationPrivateEndpointConnectionProperties(document.RootElement, options); + } + + internal static DataReplicationPrivateEndpointConnectionProperties DeserializeDataReplicationPrivateEndpointConnectionProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DataReplicationProvisioningState? provisioningState = default; + WritableSubResource privateEndpoint = default; + DataReplicationPrivateLinkServiceConnectionState privateLinkServiceConnectionState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new DataReplicationProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("privateEndpoint"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + privateEndpoint = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("privateLinkServiceConnectionState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + privateLinkServiceConnectionState = DataReplicationPrivateLinkServiceConnectionState.DeserializeDataReplicationPrivateLinkServiceConnectionState(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DataReplicationPrivateEndpointConnectionProperties(provisioningState, privateEndpoint, privateLinkServiceConnectionState, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DataReplicationPrivateEndpointConnectionProperties)} does not support writing '{options.Format}' format."); + } + } + + DataReplicationPrivateEndpointConnectionProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataReplicationPrivateEndpointConnectionProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataReplicationPrivateEndpointConnectionProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationPrivateEndpointConnectionProperties.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationPrivateEndpointConnectionProperties.cs new file mode 100644 index 000000000000..23a3d03b5407 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationPrivateEndpointConnectionProperties.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 Azure.Core; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Represents Private endpoint connection response properties. + public partial class DataReplicationPrivateEndpointConnectionProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DataReplicationPrivateEndpointConnectionProperties() + { + } + + /// Initializes a new instance of . + /// Gets or sets provisioning state of the private endpoint connection. + /// Represent private Endpoint network resource that is linked to the Private Endpoint connection. + /// Represents Private link service connection state. + /// Keeps track of any properties unknown to the library. + internal DataReplicationPrivateEndpointConnectionProperties(DataReplicationProvisioningState? provisioningState, WritableSubResource privateEndpoint, DataReplicationPrivateLinkServiceConnectionState privateLinkServiceConnectionState, IDictionary serializedAdditionalRawData) + { + ProvisioningState = provisioningState; + PrivateEndpoint = privateEndpoint; + PrivateLinkServiceConnectionState = privateLinkServiceConnectionState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets or sets provisioning state of the private endpoint connection. + public DataReplicationProvisioningState? ProvisioningState { get; } + /// Represent private Endpoint network resource that is linked to the Private Endpoint connection. + internal WritableSubResource PrivateEndpoint { get; set; } + /// Gets or sets Id. + public ResourceIdentifier PrivateEndpointId + { + get => PrivateEndpoint is null ? default : PrivateEndpoint.Id; + set + { + if (PrivateEndpoint is null) + PrivateEndpoint = new WritableSubResource(); + PrivateEndpoint.Id = value; + } + } + + /// Represents Private link service connection state. + public DataReplicationPrivateLinkServiceConnectionState PrivateLinkServiceConnectionState { get; set; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationPrivateEndpointConnectionProxyProperties.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationPrivateEndpointConnectionProxyProperties.Serialization.cs new file mode 100644 index 000000000000..5e82a340b6ee --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationPrivateEndpointConnectionProxyProperties.Serialization.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class DataReplicationPrivateEndpointConnectionProxyProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationPrivateEndpointConnectionProxyProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (Optional.IsDefined(RemotePrivateEndpoint)) + { + writer.WritePropertyName("remotePrivateEndpoint"u8); + writer.WriteObjectValue(RemotePrivateEndpoint, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DataReplicationPrivateEndpointConnectionProxyProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationPrivateEndpointConnectionProxyProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataReplicationPrivateEndpointConnectionProxyProperties(document.RootElement, options); + } + + internal static DataReplicationPrivateEndpointConnectionProxyProperties DeserializeDataReplicationPrivateEndpointConnectionProxyProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DataReplicationProvisioningState? provisioningState = default; + RemotePrivateEndpoint remotePrivateEndpoint = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new DataReplicationProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("remotePrivateEndpoint"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + remotePrivateEndpoint = RemotePrivateEndpoint.DeserializeRemotePrivateEndpoint(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DataReplicationPrivateEndpointConnectionProxyProperties(provisioningState, remotePrivateEndpoint, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DataReplicationPrivateEndpointConnectionProxyProperties)} does not support writing '{options.Format}' format."); + } + } + + DataReplicationPrivateEndpointConnectionProxyProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataReplicationPrivateEndpointConnectionProxyProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataReplicationPrivateEndpointConnectionProxyProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationPrivateEndpointConnectionProxyProperties.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationPrivateEndpointConnectionProxyProperties.cs new file mode 100644 index 000000000000..4eb79b1144da --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationPrivateEndpointConnectionProxyProperties.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Represents private endpoint connection proxy request. + public partial class DataReplicationPrivateEndpointConnectionProxyProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DataReplicationPrivateEndpointConnectionProxyProperties() + { + } + + /// Initializes a new instance of . + /// Gets or sets the provisioning state of the private endpoint connection proxy. + /// Represent remote private endpoint information for the private endpoint connection proxy. + /// Keeps track of any properties unknown to the library. + internal DataReplicationPrivateEndpointConnectionProxyProperties(DataReplicationProvisioningState? provisioningState, RemotePrivateEndpoint remotePrivateEndpoint, IDictionary serializedAdditionalRawData) + { + ProvisioningState = provisioningState; + RemotePrivateEndpoint = remotePrivateEndpoint; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets or sets the provisioning state of the private endpoint connection proxy. + public DataReplicationProvisioningState? ProvisioningState { get; } + /// Represent remote private endpoint information for the private endpoint connection proxy. + public RemotePrivateEndpoint RemotePrivateEndpoint { get; set; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationPrivateEndpointConnectionStatus.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationPrivateEndpointConnectionStatus.cs new file mode 100644 index 000000000000..358797b4baae --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationPrivateEndpointConnectionStatus.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Gets or sets the status. + public readonly partial struct DataReplicationPrivateEndpointConnectionStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DataReplicationPrivateEndpointConnectionStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ApprovedValue = "Approved"; + private const string DisconnectedValue = "Disconnected"; + private const string PendingValue = "Pending"; + private const string RejectedValue = "Rejected"; + + /// Approved Status. + public static DataReplicationPrivateEndpointConnectionStatus Approved { get; } = new DataReplicationPrivateEndpointConnectionStatus(ApprovedValue); + /// Disconnected Status. + public static DataReplicationPrivateEndpointConnectionStatus Disconnected { get; } = new DataReplicationPrivateEndpointConnectionStatus(DisconnectedValue); + /// Pending Status. + public static DataReplicationPrivateEndpointConnectionStatus Pending { get; } = new DataReplicationPrivateEndpointConnectionStatus(PendingValue); + /// Rejected Status. + public static DataReplicationPrivateEndpointConnectionStatus Rejected { get; } = new DataReplicationPrivateEndpointConnectionStatus(RejectedValue); + /// Determines if two values are the same. + public static bool operator ==(DataReplicationPrivateEndpointConnectionStatus left, DataReplicationPrivateEndpointConnectionStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DataReplicationPrivateEndpointConnectionStatus left, DataReplicationPrivateEndpointConnectionStatus right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DataReplicationPrivateEndpointConnectionStatus(string value) => new DataReplicationPrivateEndpointConnectionStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DataReplicationPrivateEndpointConnectionStatus other && Equals(other); + /// + public bool Equals(DataReplicationPrivateEndpointConnectionStatus 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/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationPrivateLinkResourceProperties.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationPrivateLinkResourceProperties.Serialization.cs new file mode 100644 index 000000000000..3209da971e17 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationPrivateLinkResourceProperties.Serialization.cs @@ -0,0 +1,194 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class DataReplicationPrivateLinkResourceProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationPrivateLinkResourceProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(GroupId)) + { + writer.WritePropertyName("groupId"u8); + writer.WriteStringValue(GroupId); + } + if (Optional.IsCollectionDefined(RequiredMembers)) + { + writer.WritePropertyName("requiredMembers"u8); + writer.WriteStartArray(); + foreach (var item in RequiredMembers) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(RequiredZoneNames)) + { + writer.WritePropertyName("requiredZoneNames"u8); + writer.WriteStartArray(); + foreach (var item in RequiredZoneNames) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DataReplicationPrivateLinkResourceProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationPrivateLinkResourceProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataReplicationPrivateLinkResourceProperties(document.RootElement, options); + } + + internal static DataReplicationPrivateLinkResourceProperties DeserializeDataReplicationPrivateLinkResourceProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string groupId = default; + IReadOnlyList requiredMembers = default; + IReadOnlyList requiredZoneNames = default; + DataReplicationProvisioningState? provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("groupId"u8)) + { + groupId = property.Value.GetString(); + continue; + } + if (property.NameEquals("requiredMembers"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + requiredMembers = array; + continue; + } + if (property.NameEquals("requiredZoneNames"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + requiredZoneNames = array; + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new DataReplicationProvisioningState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DataReplicationPrivateLinkResourceProperties(groupId, requiredMembers ?? new ChangeTrackingList(), requiredZoneNames ?? new ChangeTrackingList(), provisioningState, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DataReplicationPrivateLinkResourceProperties)} does not support writing '{options.Format}' format."); + } + } + + DataReplicationPrivateLinkResourceProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataReplicationPrivateLinkResourceProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataReplicationPrivateLinkResourceProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationPrivateLinkResourceProperties.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationPrivateLinkResourceProperties.cs new file mode 100644 index 000000000000..6c9efbbf97ec --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationPrivateLinkResourceProperties.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Represents private link resource properties. + public partial class DataReplicationPrivateLinkResourceProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal DataReplicationPrivateLinkResourceProperties() + { + RequiredMembers = new ChangeTrackingList(); + RequiredZoneNames = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Gets or sets the group id. + /// Gets or sets the required member. This translates to how many Private IPs should be created for each privately linkable resource. + /// Gets or sets the private DNS zone names. + /// Gets or sets the provisioning state of the private link resource. + /// Keeps track of any properties unknown to the library. + internal DataReplicationPrivateLinkResourceProperties(string groupId, IReadOnlyList requiredMembers, IReadOnlyList requiredZoneNames, DataReplicationProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) + { + GroupId = groupId; + RequiredMembers = requiredMembers; + RequiredZoneNames = requiredZoneNames; + ProvisioningState = provisioningState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets or sets the group id. + public string GroupId { get; } + /// Gets or sets the required member. This translates to how many Private IPs should be created for each privately linkable resource. + public IReadOnlyList RequiredMembers { get; } + /// Gets or sets the private DNS zone names. + public IReadOnlyList RequiredZoneNames { get; } + /// Gets or sets the provisioning state of the private link resource. + public DataReplicationProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationPrivateLinkServiceConnection.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationPrivateLinkServiceConnection.Serialization.cs new file mode 100644 index 000000000000..e972e4ddd4d3 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationPrivateLinkServiceConnection.Serialization.cs @@ -0,0 +1,165 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class DataReplicationPrivateLinkServiceConnection : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationPrivateLinkServiceConnection)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsCollectionDefined(GroupIds)) + { + writer.WritePropertyName("groupIds"u8); + writer.WriteStartArray(); + foreach (var item in GroupIds) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(RequestMessage)) + { + writer.WritePropertyName("requestMessage"u8); + writer.WriteStringValue(RequestMessage); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DataReplicationPrivateLinkServiceConnection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationPrivateLinkServiceConnection)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataReplicationPrivateLinkServiceConnection(document.RootElement, options); + } + + internal static DataReplicationPrivateLinkServiceConnection DeserializeDataReplicationPrivateLinkServiceConnection(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + IList groupIds = default; + string requestMessage = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("groupIds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + groupIds = array; + continue; + } + if (property.NameEquals("requestMessage"u8)) + { + requestMessage = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DataReplicationPrivateLinkServiceConnection(name, groupIds ?? new ChangeTrackingList(), requestMessage, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DataReplicationPrivateLinkServiceConnection)} does not support writing '{options.Format}' format."); + } + } + + DataReplicationPrivateLinkServiceConnection IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataReplicationPrivateLinkServiceConnection(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataReplicationPrivateLinkServiceConnection)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationPrivateLinkServiceConnection.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationPrivateLinkServiceConnection.cs new file mode 100644 index 000000000000..060643fc168e --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationPrivateLinkServiceConnection.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Represents of an NRP private link service connection. + public partial class DataReplicationPrivateLinkServiceConnection + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DataReplicationPrivateLinkServiceConnection() + { + GroupIds = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Gets or sets private link service connection name. + /// Gets or sets group ids. + /// Gets or sets the request message for the private link service connection. + /// Keeps track of any properties unknown to the library. + internal DataReplicationPrivateLinkServiceConnection(string name, IList groupIds, string requestMessage, IDictionary serializedAdditionalRawData) + { + Name = name; + GroupIds = groupIds; + RequestMessage = requestMessage; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets or sets private link service connection name. + public string Name { get; set; } + /// Gets or sets group ids. + public IList GroupIds { get; } + /// Gets or sets the request message for the private link service connection. + public string RequestMessage { get; set; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationPrivateLinkServiceConnectionState.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationPrivateLinkServiceConnectionState.Serialization.cs new file mode 100644 index 000000000000..913da6e04f30 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationPrivateLinkServiceConnectionState.Serialization.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class DataReplicationPrivateLinkServiceConnectionState : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationPrivateLinkServiceConnectionState)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + if (Optional.IsDefined(ActionsRequired)) + { + writer.WritePropertyName("actionsRequired"u8); + writer.WriteStringValue(ActionsRequired); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DataReplicationPrivateLinkServiceConnectionState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationPrivateLinkServiceConnectionState)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataReplicationPrivateLinkServiceConnectionState(document.RootElement, options); + } + + internal static DataReplicationPrivateLinkServiceConnectionState DeserializeDataReplicationPrivateLinkServiceConnectionState(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DataReplicationPrivateEndpointConnectionStatus? status = default; + string description = default; + string actionsRequired = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("status"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new DataReplicationPrivateEndpointConnectionStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("actionsRequired"u8)) + { + actionsRequired = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DataReplicationPrivateLinkServiceConnectionState(status, description, actionsRequired, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DataReplicationPrivateLinkServiceConnectionState)} does not support writing '{options.Format}' format."); + } + } + + DataReplicationPrivateLinkServiceConnectionState IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataReplicationPrivateLinkServiceConnectionState(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataReplicationPrivateLinkServiceConnectionState)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationPrivateLinkServiceConnectionState.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationPrivateLinkServiceConnectionState.cs new file mode 100644 index 000000000000..f8512e72711d --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationPrivateLinkServiceConnectionState.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Represents Private link service connection state. + public partial class DataReplicationPrivateLinkServiceConnectionState + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DataReplicationPrivateLinkServiceConnectionState() + { + } + + /// Initializes a new instance of . + /// Gets or sets the status. + /// Gets or sets description. + /// Gets or sets actions required. + /// Keeps track of any properties unknown to the library. + internal DataReplicationPrivateLinkServiceConnectionState(DataReplicationPrivateEndpointConnectionStatus? status, string description, string actionsRequired, IDictionary serializedAdditionalRawData) + { + Status = status; + Description = description; + ActionsRequired = actionsRequired; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets or sets the status. + public DataReplicationPrivateEndpointConnectionStatus? Status { get; set; } + /// Gets or sets description. + public string Description { get; set; } + /// Gets or sets actions required. + public string ActionsRequired { get; set; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationPrivateLinkServiceProxy.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationPrivateLinkServiceProxy.Serialization.cs new file mode 100644 index 000000000000..a8fcd82332c5 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationPrivateLinkServiceProxy.Serialization.cs @@ -0,0 +1,185 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class DataReplicationPrivateLinkServiceProxy : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationPrivateLinkServiceProxy)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (Optional.IsDefined(RemotePrivateLinkServiceConnectionState)) + { + writer.WritePropertyName("remotePrivateLinkServiceConnectionState"u8); + writer.WriteObjectValue(RemotePrivateLinkServiceConnectionState, options); + } + if (Optional.IsDefined(RemotePrivateEndpointConnection)) + { + writer.WritePropertyName("remotePrivateEndpointConnection"u8); + JsonSerializer.Serialize(writer, RemotePrivateEndpointConnection); + } + if (Optional.IsCollectionDefined(GroupConnectivityInformation)) + { + writer.WritePropertyName("groupConnectivityInformation"u8); + writer.WriteStartArray(); + foreach (var item in GroupConnectivityInformation) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DataReplicationPrivateLinkServiceProxy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationPrivateLinkServiceProxy)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataReplicationPrivateLinkServiceProxy(document.RootElement, options); + } + + internal static DataReplicationPrivateLinkServiceProxy DeserializeDataReplicationPrivateLinkServiceProxy(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string id = default; + DataReplicationPrivateLinkServiceConnectionState remotePrivateLinkServiceConnectionState = default; + WritableSubResource remotePrivateEndpointConnection = default; + IList groupConnectivityInformation = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("remotePrivateLinkServiceConnectionState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + remotePrivateLinkServiceConnectionState = DataReplicationPrivateLinkServiceConnectionState.DeserializeDataReplicationPrivateLinkServiceConnectionState(property.Value, options); + continue; + } + if (property.NameEquals("remotePrivateEndpointConnection"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + remotePrivateEndpointConnection = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("groupConnectivityInformation"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(Models.GroupConnectivityInformation.DeserializeGroupConnectivityInformation(item, options)); + } + groupConnectivityInformation = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DataReplicationPrivateLinkServiceProxy(id, remotePrivateLinkServiceConnectionState, remotePrivateEndpointConnection, groupConnectivityInformation ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DataReplicationPrivateLinkServiceProxy)} does not support writing '{options.Format}' format."); + } + } + + DataReplicationPrivateLinkServiceProxy IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataReplicationPrivateLinkServiceProxy(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataReplicationPrivateLinkServiceProxy)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationPrivateLinkServiceProxy.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationPrivateLinkServiceProxy.cs new file mode 100644 index 000000000000..4acfbd31398d --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationPrivateLinkServiceProxy.cs @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Represents NRP private link service proxy. + public partial class DataReplicationPrivateLinkServiceProxy + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DataReplicationPrivateLinkServiceProxy() + { + GroupConnectivityInformation = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Gets or sets private link service proxy id. + /// Represents Private link service connection state. + /// Represent remote private endpoint connection. + /// Gets or sets group connectivity information. + /// Keeps track of any properties unknown to the library. + internal DataReplicationPrivateLinkServiceProxy(string id, DataReplicationPrivateLinkServiceConnectionState remotePrivateLinkServiceConnectionState, WritableSubResource remotePrivateEndpointConnection, IList groupConnectivityInformation, IDictionary serializedAdditionalRawData) + { + Id = id; + RemotePrivateLinkServiceConnectionState = remotePrivateLinkServiceConnectionState; + RemotePrivateEndpointConnection = remotePrivateEndpointConnection; + GroupConnectivityInformation = groupConnectivityInformation; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets or sets private link service proxy id. + public string Id { get; set; } + /// Represents Private link service connection state. + public DataReplicationPrivateLinkServiceConnectionState RemotePrivateLinkServiceConnectionState { get; set; } + /// Represent remote private endpoint connection. + internal WritableSubResource RemotePrivateEndpointConnection { get; set; } + /// Gets or sets Id. + public ResourceIdentifier RemotePrivateEndpointConnectionId + { + get => RemotePrivateEndpointConnection is null ? default : RemotePrivateEndpointConnection.Id; + set + { + if (RemotePrivateEndpointConnection is null) + RemotePrivateEndpointConnection = new WritableSubResource(); + RemotePrivateEndpointConnection.Id = value; + } + } + + /// Gets or sets group connectivity information. + public IList GroupConnectivityInformation { get; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationProtectedItemCustomProperties.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationProtectedItemCustomProperties.Serialization.cs new file mode 100644 index 000000000000..38e91fa1b206 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationProtectedItemCustomProperties.Serialization.cs @@ -0,0 +1,118 @@ +// 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.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + [PersistableModelProxy(typeof(UnknownDataReplicationProtectedItemCustomProperties))] + public partial class DataReplicationProtectedItemCustomProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationProtectedItemCustomProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("instanceType"u8); + writer.WriteStringValue(InstanceType); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DataReplicationProtectedItemCustomProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationProtectedItemCustomProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataReplicationProtectedItemCustomProperties(document.RootElement, options); + } + + internal static DataReplicationProtectedItemCustomProperties DeserializeDataReplicationProtectedItemCustomProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("instanceType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "HyperVToAzStackHCI": return HyperVToAzStackHciProtectedItemCustomProperties.DeserializeHyperVToAzStackHciProtectedItemCustomProperties(element, options); + case "VMwareToAzStackHCI": return VMwareToAzStackHciProtectedItemCustomProperties.DeserializeVMwareToAzStackHciProtectedItemCustomProperties(element, options); + } + } + return UnknownDataReplicationProtectedItemCustomProperties.DeserializeUnknownDataReplicationProtectedItemCustomProperties(element, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DataReplicationProtectedItemCustomProperties)} does not support writing '{options.Format}' format."); + } + } + + DataReplicationProtectedItemCustomProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataReplicationProtectedItemCustomProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataReplicationProtectedItemCustomProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationProtectedItemCustomProperties.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationProtectedItemCustomProperties.cs new file mode 100644 index 000000000000..6e873ed41dc0 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationProtectedItemCustomProperties.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// + /// Protected item model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public abstract partial class DataReplicationProtectedItemCustomProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + protected DataReplicationProtectedItemCustomProperties() + { + } + + /// Initializes a new instance of . + /// Discriminator property for DataReplicationProtectedItemCustomProperties. + /// Keeps track of any properties unknown to the library. + internal DataReplicationProtectedItemCustomProperties(string instanceType, IDictionary serializedAdditionalRawData) + { + InstanceType = instanceType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Discriminator property for DataReplicationProtectedItemCustomProperties. + internal string InstanceType { get; set; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationProtectedItemCustomPropertiesUpdate.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationProtectedItemCustomPropertiesUpdate.Serialization.cs new file mode 100644 index 000000000000..1ef1b3684955 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationProtectedItemCustomPropertiesUpdate.Serialization.cs @@ -0,0 +1,118 @@ +// 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.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + [PersistableModelProxy(typeof(UnknownDataReplicationProtectedItemCustomPropertiesUpdate))] + public partial class DataReplicationProtectedItemCustomPropertiesUpdate : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationProtectedItemCustomPropertiesUpdate)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("instanceType"u8); + writer.WriteStringValue(InstanceType); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DataReplicationProtectedItemCustomPropertiesUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationProtectedItemCustomPropertiesUpdate)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataReplicationProtectedItemCustomPropertiesUpdate(document.RootElement, options); + } + + internal static DataReplicationProtectedItemCustomPropertiesUpdate DeserializeDataReplicationProtectedItemCustomPropertiesUpdate(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("instanceType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "HyperVToAzStackHCI": return HyperVToAzStackHciProtectedItemCustomPropertiesUpdate.DeserializeHyperVToAzStackHciProtectedItemCustomPropertiesUpdate(element, options); + case "VMwareToAzStackHCI": return VMwareToAzStackHciProtectedItemCustomPropertiesUpdate.DeserializeVMwareToAzStackHciProtectedItemCustomPropertiesUpdate(element, options); + } + } + return UnknownDataReplicationProtectedItemCustomPropertiesUpdate.DeserializeUnknownDataReplicationProtectedItemCustomPropertiesUpdate(element, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DataReplicationProtectedItemCustomPropertiesUpdate)} does not support writing '{options.Format}' format."); + } + } + + DataReplicationProtectedItemCustomPropertiesUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataReplicationProtectedItemCustomPropertiesUpdate(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataReplicationProtectedItemCustomPropertiesUpdate)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationProtectedItemCustomPropertiesUpdate.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationProtectedItemCustomPropertiesUpdate.cs new file mode 100644 index 000000000000..fad7b9e3c898 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationProtectedItemCustomPropertiesUpdate.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// + /// Protected item model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public abstract partial class DataReplicationProtectedItemCustomPropertiesUpdate + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + protected DataReplicationProtectedItemCustomPropertiesUpdate() + { + } + + /// Initializes a new instance of . + /// Discriminator property for DataReplicationProtectedItemCustomPropertiesUpdate. + /// Keeps track of any properties unknown to the library. + internal DataReplicationProtectedItemCustomPropertiesUpdate(string instanceType, IDictionary serializedAdditionalRawData) + { + InstanceType = instanceType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Discriminator property for DataReplicationProtectedItemCustomPropertiesUpdate. + internal string InstanceType { get; set; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationProtectedItemPatch.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationProtectedItemPatch.Serialization.cs new file mode 100644 index 000000000000..11bfefcd9b7b --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationProtectedItemPatch.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.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class DataReplicationProtectedItemPatch : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationProtectedItemPatch)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + DataReplicationProtectedItemPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationProtectedItemPatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataReplicationProtectedItemPatch(document.RootElement, options); + } + + internal static DataReplicationProtectedItemPatch DeserializeDataReplicationProtectedItemPatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DataReplicationProtectedItemPropertiesUpdate properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = DataReplicationProtectedItemPropertiesUpdate.DeserializeDataReplicationProtectedItemPropertiesUpdate(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DataReplicationProtectedItemPatch( + id, + name, + type, + systemData, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DataReplicationProtectedItemPatch)} does not support writing '{options.Format}' format."); + } + } + + DataReplicationProtectedItemPatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataReplicationProtectedItemPatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataReplicationProtectedItemPatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationProtectedItemPatch.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationProtectedItemPatch.cs new file mode 100644 index 000000000000..c7362444ef90 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationProtectedItemPatch.cs @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Protected item model update. + public partial class DataReplicationProtectedItemPatch : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DataReplicationProtectedItemPatch() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Protected item model properties. + /// Keeps track of any properties unknown to the library. + internal DataReplicationProtectedItemPatch(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DataReplicationProtectedItemPropertiesUpdate properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Protected item model properties. + internal DataReplicationProtectedItemPropertiesUpdate Properties { get; set; } + /// + /// Protected item model custom properties update. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public DataReplicationProtectedItemCustomPropertiesUpdate CustomProperties + { + get => Properties is null ? default : Properties.CustomProperties; + set + { + if (Properties is null) + Properties = new DataReplicationProtectedItemPropertiesUpdate(); + Properties.CustomProperties = value; + } + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationProtectedItemProperties.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationProtectedItemProperties.Serialization.cs new file mode 100644 index 000000000000..1b946fd5de5c --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationProtectedItemProperties.Serialization.cs @@ -0,0 +1,538 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class DataReplicationProtectedItemProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationProtectedItemProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("policyName"u8); + writer.WriteStringValue(PolicyName); + writer.WritePropertyName("replicationExtensionName"u8); + writer.WriteStringValue(ReplicationExtensionName); + if (options.Format != "W" && Optional.IsDefined(CorrelationId)) + { + writer.WritePropertyName("correlationId"u8); + writer.WriteStringValue(CorrelationId); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(ProtectionState)) + { + writer.WritePropertyName("protectionState"u8); + writer.WriteStringValue(ProtectionState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(ProtectionStateDescription)) + { + writer.WritePropertyName("protectionStateDescription"u8); + writer.WriteStringValue(ProtectionStateDescription); + } + if (options.Format != "W" && Optional.IsDefined(TestFailoverState)) + { + writer.WritePropertyName("testFailoverState"u8); + writer.WriteStringValue(TestFailoverState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(TestFailoverStateDescription)) + { + writer.WritePropertyName("testFailoverStateDescription"u8); + writer.WriteStringValue(TestFailoverStateDescription); + } + if (options.Format != "W" && Optional.IsDefined(ResynchronizationState)) + { + writer.WritePropertyName("resynchronizationState"u8); + writer.WriteStringValue(ResynchronizationState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(FabricObjectId)) + { + writer.WritePropertyName("fabricObjectId"u8); + writer.WriteStringValue(FabricObjectId); + } + if (options.Format != "W" && Optional.IsDefined(FabricObjectName)) + { + writer.WritePropertyName("fabricObjectName"u8); + writer.WriteStringValue(FabricObjectName); + } + if (options.Format != "W" && Optional.IsDefined(SourceFabricProviderId)) + { + writer.WritePropertyName("sourceFabricProviderId"u8); + writer.WriteStringValue(SourceFabricProviderId); + } + if (options.Format != "W" && Optional.IsDefined(TargetFabricProviderId)) + { + writer.WritePropertyName("targetFabricProviderId"u8); + writer.WriteStringValue(TargetFabricProviderId); + } + if (options.Format != "W" && Optional.IsDefined(FabricId)) + { + writer.WritePropertyName("fabricId"u8); + writer.WriteStringValue(FabricId); + } + if (options.Format != "W" && Optional.IsDefined(TargetFabricId)) + { + writer.WritePropertyName("targetFabricId"u8); + writer.WriteStringValue(TargetFabricId); + } + if (options.Format != "W" && Optional.IsDefined(FabricAgentId)) + { + writer.WritePropertyName("fabricAgentId"u8); + writer.WriteStringValue(FabricAgentId); + } + if (options.Format != "W" && Optional.IsDefined(TargetFabricAgentId)) + { + writer.WritePropertyName("targetFabricAgentId"u8); + writer.WriteStringValue(TargetFabricAgentId); + } + if (options.Format != "W" && Optional.IsDefined(IsResyncRequired)) + { + writer.WritePropertyName("resyncRequired"u8); + writer.WriteBooleanValue(IsResyncRequired.Value); + } + if (options.Format != "W" && Optional.IsDefined(LastSuccessfulPlannedFailoverOn)) + { + writer.WritePropertyName("lastSuccessfulPlannedFailoverTime"u8); + writer.WriteStringValue(LastSuccessfulPlannedFailoverOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(LastSuccessfulUnplannedFailoverOn)) + { + writer.WritePropertyName("lastSuccessfulUnplannedFailoverTime"u8); + writer.WriteStringValue(LastSuccessfulUnplannedFailoverOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(LastSuccessfulTestFailoverOn)) + { + writer.WritePropertyName("lastSuccessfulTestFailoverTime"u8); + writer.WriteStringValue(LastSuccessfulTestFailoverOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(CurrentJob)) + { + writer.WritePropertyName("currentJob"u8); + writer.WriteObjectValue(CurrentJob, options); + } + if (options.Format != "W" && Optional.IsCollectionDefined(AllowedJobs)) + { + writer.WritePropertyName("allowedJobs"u8); + writer.WriteStartArray(); + foreach (var item in AllowedJobs) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(LastFailedEnableProtectionJob)) + { + writer.WritePropertyName("lastFailedEnableProtectionJob"u8); + writer.WriteObjectValue(LastFailedEnableProtectionJob, options); + } + if (options.Format != "W" && Optional.IsDefined(LastFailedPlannedFailoverJob)) + { + writer.WritePropertyName("lastFailedPlannedFailoverJob"u8); + writer.WriteObjectValue(LastFailedPlannedFailoverJob, options); + } + if (options.Format != "W" && Optional.IsDefined(LastTestFailoverJob)) + { + writer.WritePropertyName("lastTestFailoverJob"u8); + writer.WriteObjectValue(LastTestFailoverJob, options); + } + if (options.Format != "W" && Optional.IsDefined(ReplicationHealth)) + { + writer.WritePropertyName("replicationHealth"u8); + writer.WriteStringValue(ReplicationHealth.Value.ToString()); + } + if (options.Format != "W" && Optional.IsCollectionDefined(HealthErrors)) + { + writer.WritePropertyName("healthErrors"u8); + writer.WriteStartArray(); + foreach (var item in HealthErrors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("customProperties"u8); + writer.WriteObjectValue(CustomProperties, options); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DataReplicationProtectedItemProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationProtectedItemProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataReplicationProtectedItemProperties(document.RootElement, options); + } + + internal static DataReplicationProtectedItemProperties DeserializeDataReplicationProtectedItemProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string policyName = default; + string replicationExtensionName = default; + string correlationId = default; + DataReplicationProvisioningState? provisioningState = default; + DataReplicationProtectionState? protectionState = default; + string protectionStateDescription = default; + DataReplicationTestFailoverState? testFailoverState = default; + string testFailoverStateDescription = default; + DataReplicationResynchronizationState? resynchronizationState = default; + string fabricObjectId = default; + string fabricObjectName = default; + string sourceFabricProviderId = default; + string targetFabricProviderId = default; + string fabricId = default; + string targetFabricId = default; + string fabricAgentId = default; + string targetFabricAgentId = default; + bool? resyncRequired = default; + DateTimeOffset? lastSuccessfulPlannedFailoverTime = default; + DateTimeOffset? lastSuccessfulUnplannedFailoverTime = default; + DateTimeOffset? lastSuccessfulTestFailoverTime = default; + ProtectedItemJobProperties currentJob = default; + IReadOnlyList allowedJobs = default; + ProtectedItemJobProperties lastFailedEnableProtectionJob = default; + ProtectedItemJobProperties lastFailedPlannedFailoverJob = default; + ProtectedItemJobProperties lastTestFailoverJob = default; + DataReplicationHealthStatus? replicationHealth = default; + IReadOnlyList healthErrors = default; + DataReplicationProtectedItemCustomProperties customProperties = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("policyName"u8)) + { + policyName = property.Value.GetString(); + continue; + } + if (property.NameEquals("replicationExtensionName"u8)) + { + replicationExtensionName = property.Value.GetString(); + continue; + } + if (property.NameEquals("correlationId"u8)) + { + correlationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new DataReplicationProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("protectionState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + protectionState = new DataReplicationProtectionState(property.Value.GetString()); + continue; + } + if (property.NameEquals("protectionStateDescription"u8)) + { + protectionStateDescription = property.Value.GetString(); + continue; + } + if (property.NameEquals("testFailoverState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + testFailoverState = new DataReplicationTestFailoverState(property.Value.GetString()); + continue; + } + if (property.NameEquals("testFailoverStateDescription"u8)) + { + testFailoverStateDescription = property.Value.GetString(); + continue; + } + if (property.NameEquals("resynchronizationState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resynchronizationState = new DataReplicationResynchronizationState(property.Value.GetString()); + continue; + } + if (property.NameEquals("fabricObjectId"u8)) + { + fabricObjectId = property.Value.GetString(); + continue; + } + if (property.NameEquals("fabricObjectName"u8)) + { + fabricObjectName = property.Value.GetString(); + continue; + } + if (property.NameEquals("sourceFabricProviderId"u8)) + { + sourceFabricProviderId = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetFabricProviderId"u8)) + { + targetFabricProviderId = property.Value.GetString(); + continue; + } + if (property.NameEquals("fabricId"u8)) + { + fabricId = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetFabricId"u8)) + { + targetFabricId = property.Value.GetString(); + continue; + } + if (property.NameEquals("fabricAgentId"u8)) + { + fabricAgentId = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetFabricAgentId"u8)) + { + targetFabricAgentId = property.Value.GetString(); + continue; + } + if (property.NameEquals("resyncRequired"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resyncRequired = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("lastSuccessfulPlannedFailoverTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lastSuccessfulPlannedFailoverTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastSuccessfulUnplannedFailoverTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lastSuccessfulUnplannedFailoverTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastSuccessfulTestFailoverTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lastSuccessfulTestFailoverTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("currentJob"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + currentJob = ProtectedItemJobProperties.DeserializeProtectedItemJobProperties(property.Value, options); + continue; + } + if (property.NameEquals("allowedJobs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + allowedJobs = array; + continue; + } + if (property.NameEquals("lastFailedEnableProtectionJob"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lastFailedEnableProtectionJob = ProtectedItemJobProperties.DeserializeProtectedItemJobProperties(property.Value, options); + continue; + } + if (property.NameEquals("lastFailedPlannedFailoverJob"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lastFailedPlannedFailoverJob = ProtectedItemJobProperties.DeserializeProtectedItemJobProperties(property.Value, options); + continue; + } + if (property.NameEquals("lastTestFailoverJob"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lastTestFailoverJob = ProtectedItemJobProperties.DeserializeProtectedItemJobProperties(property.Value, options); + continue; + } + if (property.NameEquals("replicationHealth"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + replicationHealth = new DataReplicationHealthStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("healthErrors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DataReplicationHealthErrorInfo.DeserializeDataReplicationHealthErrorInfo(item, options)); + } + healthErrors = array; + continue; + } + if (property.NameEquals("customProperties"u8)) + { + customProperties = DataReplicationProtectedItemCustomProperties.DeserializeDataReplicationProtectedItemCustomProperties(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DataReplicationProtectedItemProperties( + policyName, + replicationExtensionName, + correlationId, + provisioningState, + protectionState, + protectionStateDescription, + testFailoverState, + testFailoverStateDescription, + resynchronizationState, + fabricObjectId, + fabricObjectName, + sourceFabricProviderId, + targetFabricProviderId, + fabricId, + targetFabricId, + fabricAgentId, + targetFabricAgentId, + resyncRequired, + lastSuccessfulPlannedFailoverTime, + lastSuccessfulUnplannedFailoverTime, + lastSuccessfulTestFailoverTime, + currentJob, + allowedJobs ?? new ChangeTrackingList(), + lastFailedEnableProtectionJob, + lastFailedPlannedFailoverJob, + lastTestFailoverJob, + replicationHealth, + healthErrors ?? new ChangeTrackingList(), + customProperties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DataReplicationProtectedItemProperties)} does not support writing '{options.Format}' format."); + } + } + + DataReplicationProtectedItemProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataReplicationProtectedItemProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataReplicationProtectedItemProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationProtectedItemProperties.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationProtectedItemProperties.cs new file mode 100644 index 000000000000..552a140003f6 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationProtectedItemProperties.cs @@ -0,0 +1,207 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Protected item model properties. + public partial class DataReplicationProtectedItemProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Gets or sets the policy name. + /// Gets or sets the replication extension name. + /// + /// Protected item model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// , or is null. + public DataReplicationProtectedItemProperties(string policyName, string replicationExtensionName, DataReplicationProtectedItemCustomProperties customProperties) + { + Argument.AssertNotNull(policyName, nameof(policyName)); + Argument.AssertNotNull(replicationExtensionName, nameof(replicationExtensionName)); + Argument.AssertNotNull(customProperties, nameof(customProperties)); + + PolicyName = policyName; + ReplicationExtensionName = replicationExtensionName; + AllowedJobs = new ChangeTrackingList(); + HealthErrors = new ChangeTrackingList(); + CustomProperties = customProperties; + } + + /// Initializes a new instance of . + /// Gets or sets the policy name. + /// Gets or sets the replication extension name. + /// Gets or sets the protected item correlation Id. + /// Gets or sets the provisioning state of the fabric agent. + /// Gets or sets the protection state. + /// Gets or sets the protection state description. + /// Gets or sets the test failover state. + /// Gets or sets the Test failover state description. + /// Gets or sets the resynchronization state. + /// Gets or sets the fabric object Id. + /// Gets or sets the fabric object name. + /// Gets or sets the source fabric provider Id. + /// Gets or sets the target fabric provider Id. + /// Gets or sets the fabric Id. + /// Gets or sets the target fabric Id. + /// Gets or sets the fabric agent Id. + /// Gets or sets the target fabric agent Id. + /// Gets or sets a value indicating whether resynchronization is required or not. + /// Gets or sets the Last successful planned failover time. + /// Gets or sets the Last successful unplanned failover time. + /// Gets or sets the Last successful test failover time. + /// Gets or sets the current scenario. + /// Gets or sets the allowed scenarios on the protected item. + /// Gets or sets the last failed enabled protection job. + /// Gets or sets the last failed planned failover job. + /// Gets or sets the last test failover job. + /// Gets or sets protected item replication health. + /// Gets or sets the list of health errors. + /// + /// Protected item model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// Keeps track of any properties unknown to the library. + internal DataReplicationProtectedItemProperties(string policyName, string replicationExtensionName, string correlationId, DataReplicationProvisioningState? provisioningState, DataReplicationProtectionState? protectionState, string protectionStateDescription, DataReplicationTestFailoverState? testFailoverState, string testFailoverStateDescription, DataReplicationResynchronizationState? resynchronizationState, string fabricObjectId, string fabricObjectName, string sourceFabricProviderId, string targetFabricProviderId, string fabricId, string targetFabricId, string fabricAgentId, string targetFabricAgentId, bool? isResyncRequired, DateTimeOffset? lastSuccessfulPlannedFailoverOn, DateTimeOffset? lastSuccessfulUnplannedFailoverOn, DateTimeOffset? lastSuccessfulTestFailoverOn, ProtectedItemJobProperties currentJob, IReadOnlyList allowedJobs, ProtectedItemJobProperties lastFailedEnableProtectionJob, ProtectedItemJobProperties lastFailedPlannedFailoverJob, ProtectedItemJobProperties lastTestFailoverJob, DataReplicationHealthStatus? replicationHealth, IReadOnlyList healthErrors, DataReplicationProtectedItemCustomProperties customProperties, IDictionary serializedAdditionalRawData) + { + PolicyName = policyName; + ReplicationExtensionName = replicationExtensionName; + CorrelationId = correlationId; + ProvisioningState = provisioningState; + ProtectionState = protectionState; + ProtectionStateDescription = protectionStateDescription; + TestFailoverState = testFailoverState; + TestFailoverStateDescription = testFailoverStateDescription; + ResynchronizationState = resynchronizationState; + FabricObjectId = fabricObjectId; + FabricObjectName = fabricObjectName; + SourceFabricProviderId = sourceFabricProviderId; + TargetFabricProviderId = targetFabricProviderId; + FabricId = fabricId; + TargetFabricId = targetFabricId; + FabricAgentId = fabricAgentId; + TargetFabricAgentId = targetFabricAgentId; + IsResyncRequired = isResyncRequired; + LastSuccessfulPlannedFailoverOn = lastSuccessfulPlannedFailoverOn; + LastSuccessfulUnplannedFailoverOn = lastSuccessfulUnplannedFailoverOn; + LastSuccessfulTestFailoverOn = lastSuccessfulTestFailoverOn; + CurrentJob = currentJob; + AllowedJobs = allowedJobs; + LastFailedEnableProtectionJob = lastFailedEnableProtectionJob; + LastFailedPlannedFailoverJob = lastFailedPlannedFailoverJob; + LastTestFailoverJob = lastTestFailoverJob; + ReplicationHealth = replicationHealth; + HealthErrors = healthErrors; + CustomProperties = customProperties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DataReplicationProtectedItemProperties() + { + } + + /// Gets or sets the policy name. + public string PolicyName { get; set; } + /// Gets or sets the replication extension name. + public string ReplicationExtensionName { get; set; } + /// Gets or sets the protected item correlation Id. + public string CorrelationId { get; } + /// Gets or sets the provisioning state of the fabric agent. + public DataReplicationProvisioningState? ProvisioningState { get; } + /// Gets or sets the protection state. + public DataReplicationProtectionState? ProtectionState { get; } + /// Gets or sets the protection state description. + public string ProtectionStateDescription { get; } + /// Gets or sets the test failover state. + public DataReplicationTestFailoverState? TestFailoverState { get; } + /// Gets or sets the Test failover state description. + public string TestFailoverStateDescription { get; } + /// Gets or sets the resynchronization state. + public DataReplicationResynchronizationState? ResynchronizationState { get; } + /// Gets or sets the fabric object Id. + public string FabricObjectId { get; } + /// Gets or sets the fabric object name. + public string FabricObjectName { get; } + /// Gets or sets the source fabric provider Id. + public string SourceFabricProviderId { get; } + /// Gets or sets the target fabric provider Id. + public string TargetFabricProviderId { get; } + /// Gets or sets the fabric Id. + public string FabricId { get; } + /// Gets or sets the target fabric Id. + public string TargetFabricId { get; } + /// Gets or sets the fabric agent Id. + public string FabricAgentId { get; } + /// Gets or sets the target fabric agent Id. + public string TargetFabricAgentId { get; } + /// Gets or sets a value indicating whether resynchronization is required or not. + public bool? IsResyncRequired { get; } + /// Gets or sets the Last successful planned failover time. + public DateTimeOffset? LastSuccessfulPlannedFailoverOn { get; } + /// Gets or sets the Last successful unplanned failover time. + public DateTimeOffset? LastSuccessfulUnplannedFailoverOn { get; } + /// Gets or sets the Last successful test failover time. + public DateTimeOffset? LastSuccessfulTestFailoverOn { get; } + /// Gets or sets the current scenario. + public ProtectedItemJobProperties CurrentJob { get; } + /// Gets or sets the allowed scenarios on the protected item. + public IReadOnlyList AllowedJobs { get; } + /// Gets or sets the last failed enabled protection job. + public ProtectedItemJobProperties LastFailedEnableProtectionJob { get; } + /// Gets or sets the last failed planned failover job. + public ProtectedItemJobProperties LastFailedPlannedFailoverJob { get; } + /// Gets or sets the last test failover job. + public ProtectedItemJobProperties LastTestFailoverJob { get; } + /// Gets or sets protected item replication health. + public DataReplicationHealthStatus? ReplicationHealth { get; } + /// Gets or sets the list of health errors. + public IReadOnlyList HealthErrors { get; } + /// + /// Protected item model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public DataReplicationProtectedItemCustomProperties CustomProperties { get; set; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationProtectedItemPropertiesUpdate.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationProtectedItemPropertiesUpdate.Serialization.cs new file mode 100644 index 000000000000..2b3f416b0ae5 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationProtectedItemPropertiesUpdate.Serialization.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + internal partial class DataReplicationProtectedItemPropertiesUpdate : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationProtectedItemPropertiesUpdate)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(CustomProperties)) + { + writer.WritePropertyName("customProperties"u8); + writer.WriteObjectValue(CustomProperties, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DataReplicationProtectedItemPropertiesUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationProtectedItemPropertiesUpdate)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataReplicationProtectedItemPropertiesUpdate(document.RootElement, options); + } + + internal static DataReplicationProtectedItemPropertiesUpdate DeserializeDataReplicationProtectedItemPropertiesUpdate(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DataReplicationProtectedItemCustomPropertiesUpdate customProperties = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("customProperties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + customProperties = DataReplicationProtectedItemCustomPropertiesUpdate.DeserializeDataReplicationProtectedItemCustomPropertiesUpdate(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DataReplicationProtectedItemPropertiesUpdate(customProperties, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DataReplicationProtectedItemPropertiesUpdate)} does not support writing '{options.Format}' format."); + } + } + + DataReplicationProtectedItemPropertiesUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataReplicationProtectedItemPropertiesUpdate(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataReplicationProtectedItemPropertiesUpdate)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationProtectedItemPropertiesUpdate.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationProtectedItemPropertiesUpdate.cs new file mode 100644 index 000000000000..f46e3bb1980e --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationProtectedItemPropertiesUpdate.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Protected item model properties update. + internal partial class DataReplicationProtectedItemPropertiesUpdate + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DataReplicationProtectedItemPropertiesUpdate() + { + } + + /// Initializes a new instance of . + /// + /// Protected item model custom properties update. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// Keeps track of any properties unknown to the library. + internal DataReplicationProtectedItemPropertiesUpdate(DataReplicationProtectedItemCustomPropertiesUpdate customProperties, IDictionary serializedAdditionalRawData) + { + CustomProperties = customProperties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// + /// Protected item model custom properties update. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public DataReplicationProtectedItemCustomPropertiesUpdate CustomProperties { get; set; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationProtectionState.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationProtectionState.cs new file mode 100644 index 000000000000..2d32abae86c6 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationProtectionState.cs @@ -0,0 +1,201 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Gets or sets the protection state. + public readonly partial struct DataReplicationProtectionState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DataReplicationProtectionState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string UnprotectedStatesBeginValue = "UnprotectedStatesBegin"; + private const string EnablingProtectionValue = "EnablingProtection"; + private const string EnablingFailedValue = "EnablingFailed"; + private const string DisablingProtectionValue = "DisablingProtection"; + private const string MarkedForDeletionValue = "MarkedForDeletion"; + private const string DisablingFailedValue = "DisablingFailed"; + private const string UnprotectedStatesEndValue = "UnprotectedStatesEnd"; + private const string InitialReplicationStatesBeginValue = "InitialReplicationStatesBegin"; + private const string InitialReplicationInProgressValue = "InitialReplicationInProgress"; + private const string InitialReplicationCompletedOnPrimaryValue = "InitialReplicationCompletedOnPrimary"; + private const string InitialReplicationCompletedOnRecoveryValue = "InitialReplicationCompletedOnRecovery"; + private const string InitialReplicationFailedValue = "InitialReplicationFailed"; + private const string InitialReplicationStatesEndValue = "InitialReplicationStatesEnd"; + private const string ProtectedStatesBeginValue = "ProtectedStatesBegin"; + private const string ProtectedValue = "Protected"; + private const string ProtectedStatesEndValue = "ProtectedStatesEnd"; + private const string PlannedFailoverTransitionStatesBeginValue = "PlannedFailoverTransitionStatesBegin"; + private const string PlannedFailoverInitiatedValue = "PlannedFailoverInitiated"; + private const string PlannedFailoverCompletingValue = "PlannedFailoverCompleting"; + private const string PlannedFailoverCompletedValue = "PlannedFailoverCompleted"; + private const string PlannedFailoverFailedValue = "PlannedFailoverFailed"; + private const string PlannedFailoverCompletionFailedValue = "PlannedFailoverCompletionFailed"; + private const string PlannedFailoverTransitionStatesEndValue = "PlannedFailoverTransitionStatesEnd"; + private const string UnplannedFailoverTransitionStatesBeginValue = "UnplannedFailoverTransitionStatesBegin"; + private const string UnplannedFailoverInitiatedValue = "UnplannedFailoverInitiated"; + private const string UnplannedFailoverCompletingValue = "UnplannedFailoverCompleting"; + private const string UnplannedFailoverCompletedValue = "UnplannedFailoverCompleted"; + private const string UnplannedFailoverFailedValue = "UnplannedFailoverFailed"; + private const string UnplannedFailoverCompletionFailedValue = "UnplannedFailoverCompletionFailed"; + private const string UnplannedFailoverTransitionStatesEndValue = "UnplannedFailoverTransitionStatesEnd"; + private const string CommitFailoverStatesBeginValue = "CommitFailoverStatesBegin"; + private const string CommitFailoverInProgressOnPrimaryValue = "CommitFailoverInProgressOnPrimary"; + private const string CommitFailoverInProgressOnRecoveryValue = "CommitFailoverInProgressOnRecovery"; + private const string CommitFailoverCompletedValue = "CommitFailoverCompleted"; + private const string CommitFailoverFailedOnPrimaryValue = "CommitFailoverFailedOnPrimary"; + private const string CommitFailoverFailedOnRecoveryValue = "CommitFailoverFailedOnRecovery"; + private const string CommitFailoverStatesEndValue = "CommitFailoverStatesEnd"; + private const string CancelFailoverStatesBeginValue = "CancelFailoverStatesBegin"; + private const string CancelFailoverInProgressOnPrimaryValue = "CancelFailoverInProgressOnPrimary"; + private const string CancelFailoverInProgressOnRecoveryValue = "CancelFailoverInProgressOnRecovery"; + private const string CancelFailoverFailedOnPrimaryValue = "CancelFailoverFailedOnPrimary"; + private const string CancelFailoverFailedOnRecoveryValue = "CancelFailoverFailedOnRecovery"; + private const string CancelFailoverStatesEndValue = "CancelFailoverStatesEnd"; + private const string ChangeRecoveryPointStatesBeginValue = "ChangeRecoveryPointStatesBegin"; + private const string ChangeRecoveryPointInitiatedValue = "ChangeRecoveryPointInitiated"; + private const string ChangeRecoveryPointCompletedValue = "ChangeRecoveryPointCompleted"; + private const string ChangeRecoveryPointFailedValue = "ChangeRecoveryPointFailed"; + private const string ChangeRecoveryPointStatesEndValue = "ChangeRecoveryPointStatesEnd"; + private const string ReprotectStatesBeginValue = "ReprotectStatesBegin"; + private const string ReprotectInitiatedValue = "ReprotectInitiated"; + private const string ReprotectFailedValue = "ReprotectFailed"; + private const string ReprotectStatesEndValue = "ReprotectStatesEnd"; + + /// Begin marker for unprotected states. + public static DataReplicationProtectionState UnprotectedStatesBegin { get; } = new DataReplicationProtectionState(UnprotectedStatesBeginValue); + /// Enable protection is in progress. + public static DataReplicationProtectionState EnablingProtection { get; } = new DataReplicationProtectionState(EnablingProtectionValue); + /// Enable protection failed. + public static DataReplicationProtectionState EnablingFailed { get; } = new DataReplicationProtectionState(EnablingFailedValue); + /// Disabling protection is in progress. + public static DataReplicationProtectionState DisablingProtection { get; } = new DataReplicationProtectionState(DisablingProtectionValue); + /// Disabling protection succeeded. This is a transient state before the protected item is deleted. + public static DataReplicationProtectionState MarkedForDeletion { get; } = new DataReplicationProtectionState(MarkedForDeletionValue); + /// Disable protection failed. + public static DataReplicationProtectionState DisablingFailed { get; } = new DataReplicationProtectionState(DisablingFailedValue); + /// End marker for unprotected states. + public static DataReplicationProtectionState UnprotectedStatesEnd { get; } = new DataReplicationProtectionState(UnprotectedStatesEndValue); + /// Begin marker for initial replication states. + public static DataReplicationProtectionState InitialReplicationStatesBegin { get; } = new DataReplicationProtectionState(InitialReplicationStatesBeginValue); + /// Initial replication is in progress. + public static DataReplicationProtectionState InitialReplicationInProgress { get; } = new DataReplicationProtectionState(InitialReplicationInProgressValue); + /// Initial replication has completed on the primary side. + public static DataReplicationProtectionState InitialReplicationCompletedOnPrimary { get; } = new DataReplicationProtectionState(InitialReplicationCompletedOnPrimaryValue); + /// Initial replication has completed on the recovery side. + public static DataReplicationProtectionState InitialReplicationCompletedOnRecovery { get; } = new DataReplicationProtectionState(InitialReplicationCompletedOnRecoveryValue); + /// Initial replication failed and would need to be started again. + public static DataReplicationProtectionState InitialReplicationFailed { get; } = new DataReplicationProtectionState(InitialReplicationFailedValue); + /// End marker for initial replication states. + public static DataReplicationProtectionState InitialReplicationStatesEnd { get; } = new DataReplicationProtectionState(InitialReplicationStatesEndValue); + /// Begin marker for protected steady-state states. + public static DataReplicationProtectionState ProtectedStatesBegin { get; } = new DataReplicationProtectionState(ProtectedStatesBeginValue); + /// Protected item is protected and replication is on-going. Any issues with replication will be surfaced separately via the health property and will not affect the state. + public static DataReplicationProtectionState Protected { get; } = new DataReplicationProtectionState(ProtectedValue); + /// End marker for protected steady-state states. + public static DataReplicationProtectionState ProtectedStatesEnd { get; } = new DataReplicationProtectionState(ProtectedStatesEndValue); + /// Begin marker for planned failover transition states. + public static DataReplicationProtectionState PlannedFailoverTransitionStatesBegin { get; } = new DataReplicationProtectionState(PlannedFailoverTransitionStatesBeginValue); + /// Planned failover has been initiated. + public static DataReplicationProtectionState PlannedFailoverInitiated { get; } = new DataReplicationProtectionState(PlannedFailoverInitiatedValue); + /// Planned failover preparing protected entities is in progress. + public static DataReplicationProtectionState PlannedFailoverCompleting { get; } = new DataReplicationProtectionState(PlannedFailoverCompletingValue); + /// Planned failover has been completed successfully. + public static DataReplicationProtectionState PlannedFailoverCompleted { get; } = new DataReplicationProtectionState(PlannedFailoverCompletedValue); + /// Planned failover initiation failed. + public static DataReplicationProtectionState PlannedFailoverFailed { get; } = new DataReplicationProtectionState(PlannedFailoverFailedValue); + /// Planned failover preparing protected entities failed. + public static DataReplicationProtectionState PlannedFailoverCompletionFailed { get; } = new DataReplicationProtectionState(PlannedFailoverCompletionFailedValue); + /// End marker for planned failover transition states. + public static DataReplicationProtectionState PlannedFailoverTransitionStatesEnd { get; } = new DataReplicationProtectionState(PlannedFailoverTransitionStatesEndValue); + /// Begin marker for unplanned failover transition states. + public static DataReplicationProtectionState UnplannedFailoverTransitionStatesBegin { get; } = new DataReplicationProtectionState(UnplannedFailoverTransitionStatesBeginValue); + /// Unplanned failover has been initiated. + public static DataReplicationProtectionState UnplannedFailoverInitiated { get; } = new DataReplicationProtectionState(UnplannedFailoverInitiatedValue); + /// Unplanned failover preparing protected entities is in progress. + public static DataReplicationProtectionState UnplannedFailoverCompleting { get; } = new DataReplicationProtectionState(UnplannedFailoverCompletingValue); + /// Unplanned failover preparing protected entities is in progress. + public static DataReplicationProtectionState UnplannedFailoverCompleted { get; } = new DataReplicationProtectionState(UnplannedFailoverCompletedValue); + /// Unplanned failover initiation failed. + public static DataReplicationProtectionState UnplannedFailoverFailed { get; } = new DataReplicationProtectionState(UnplannedFailoverFailedValue); + /// Unplanned failover preparing protected entities failed. + public static DataReplicationProtectionState UnplannedFailoverCompletionFailed { get; } = new DataReplicationProtectionState(UnplannedFailoverCompletionFailedValue); + /// End marker for unplanned failover transition states. + public static DataReplicationProtectionState UnplannedFailoverTransitionStatesEnd { get; } = new DataReplicationProtectionState(UnplannedFailoverTransitionStatesEndValue); + /// Begin marker for commit failover states. + public static DataReplicationProtectionState CommitFailoverStatesBegin { get; } = new DataReplicationProtectionState(CommitFailoverStatesBeginValue); + /// Commit failover is in progress on the primary side. + public static DataReplicationProtectionState CommitFailoverInProgressOnPrimary { get; } = new DataReplicationProtectionState(CommitFailoverInProgressOnPrimaryValue); + /// Commit failover is in progress on the recovery side. + public static DataReplicationProtectionState CommitFailoverInProgressOnRecovery { get; } = new DataReplicationProtectionState(CommitFailoverInProgressOnRecoveryValue); + /// Commit failover has been completed successfully. + public static DataReplicationProtectionState CommitFailoverCompleted { get; } = new DataReplicationProtectionState(CommitFailoverCompletedValue); + /// Commit failover failed on the primary side. + public static DataReplicationProtectionState CommitFailoverFailedOnPrimary { get; } = new DataReplicationProtectionState(CommitFailoverFailedOnPrimaryValue); + /// Commit failover failed on the recovery side. + public static DataReplicationProtectionState CommitFailoverFailedOnRecovery { get; } = new DataReplicationProtectionState(CommitFailoverFailedOnRecoveryValue); + /// End marker for commit failover states. + public static DataReplicationProtectionState CommitFailoverStatesEnd { get; } = new DataReplicationProtectionState(CommitFailoverStatesEndValue); + /// Begin marker for cancel failover states. + public static DataReplicationProtectionState CancelFailoverStatesBegin { get; } = new DataReplicationProtectionState(CancelFailoverStatesBeginValue); + /// Cancel failover is in progress on the primary side. + public static DataReplicationProtectionState CancelFailoverInProgressOnPrimary { get; } = new DataReplicationProtectionState(CancelFailoverInProgressOnPrimaryValue); + /// Cancel failover is in progress on the recovery side. + public static DataReplicationProtectionState CancelFailoverInProgressOnRecovery { get; } = new DataReplicationProtectionState(CancelFailoverInProgressOnRecoveryValue); + /// Cancel failover failed on the primary side. + public static DataReplicationProtectionState CancelFailoverFailedOnPrimary { get; } = new DataReplicationProtectionState(CancelFailoverFailedOnPrimaryValue); + /// Cancel failover failed on the recovery side. + public static DataReplicationProtectionState CancelFailoverFailedOnRecovery { get; } = new DataReplicationProtectionState(CancelFailoverFailedOnRecoveryValue); + /// End marker for cancel failover states. + public static DataReplicationProtectionState CancelFailoverStatesEnd { get; } = new DataReplicationProtectionState(CancelFailoverStatesEndValue); + /// Begin marker for change recovery point states. + public static DataReplicationProtectionState ChangeRecoveryPointStatesBegin { get; } = new DataReplicationProtectionState(ChangeRecoveryPointStatesBeginValue); + /// Change recovery point has been initiated.. + public static DataReplicationProtectionState ChangeRecoveryPointInitiated { get; } = new DataReplicationProtectionState(ChangeRecoveryPointInitiatedValue); + /// Change recovery point has been completed successfully. + public static DataReplicationProtectionState ChangeRecoveryPointCompleted { get; } = new DataReplicationProtectionState(ChangeRecoveryPointCompletedValue); + /// Change recovery point has failed. + public static DataReplicationProtectionState ChangeRecoveryPointFailed { get; } = new DataReplicationProtectionState(ChangeRecoveryPointFailedValue); + /// End marker for change recovery point states. + public static DataReplicationProtectionState ChangeRecoveryPointStatesEnd { get; } = new DataReplicationProtectionState(ChangeRecoveryPointStatesEndValue); + /// Begin marker for reprotect states. + public static DataReplicationProtectionState ReprotectStatesBegin { get; } = new DataReplicationProtectionState(ReprotectStatesBeginValue); + /// Reprotect has been initiated. + public static DataReplicationProtectionState ReprotectInitiated { get; } = new DataReplicationProtectionState(ReprotectInitiatedValue); + /// Reprotect has failed. + public static DataReplicationProtectionState ReprotectFailed { get; } = new DataReplicationProtectionState(ReprotectFailedValue); + /// End marker for reprotect states. + public static DataReplicationProtectionState ReprotectStatesEnd { get; } = new DataReplicationProtectionState(ReprotectStatesEndValue); + /// Determines if two values are the same. + public static bool operator ==(DataReplicationProtectionState left, DataReplicationProtectionState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DataReplicationProtectionState left, DataReplicationProtectionState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DataReplicationProtectionState(string value) => new DataReplicationProtectionState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DataReplicationProtectionState other && Equals(other); + /// + public bool Equals(DataReplicationProtectionState 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/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationProvisioningState.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationProvisioningState.cs new file mode 100644 index 000000000000..4dd9ab51a4b7 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationProvisioningState.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Gets or sets the provisioning state of the email configuration. + public readonly partial struct DataReplicationProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DataReplicationProvisioningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string CanceledValue = "Canceled"; + private const string CreatingValue = "Creating"; + private const string DeletingValue = "Deleting"; + private const string DeletedValue = "Deleted"; + private const string FailedValue = "Failed"; + private const string SucceededValue = "Succeeded"; + private const string UpdatingValue = "Updating"; + + /// Resource creation has been canceled. + public static DataReplicationProvisioningState Canceled { get; } = new DataReplicationProvisioningState(CanceledValue); + /// Resource is being created. + public static DataReplicationProvisioningState Creating { get; } = new DataReplicationProvisioningState(CreatingValue); + /// Resource is being deleted. + public static DataReplicationProvisioningState Deleting { get; } = new DataReplicationProvisioningState(DeletingValue); + /// Resource has been deleted. + public static DataReplicationProvisioningState Deleted { get; } = new DataReplicationProvisioningState(DeletedValue); + /// Resource creation failed. + public static DataReplicationProvisioningState Failed { get; } = new DataReplicationProvisioningState(FailedValue); + /// Resource creation/update succeeded. + public static DataReplicationProvisioningState Succeeded { get; } = new DataReplicationProvisioningState(SucceededValue); + /// Resource is being updated. + public static DataReplicationProvisioningState Updating { get; } = new DataReplicationProvisioningState(UpdatingValue); + /// Determines if two values are the same. + public static bool operator ==(DataReplicationProvisioningState left, DataReplicationProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DataReplicationProvisioningState left, DataReplicationProvisioningState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DataReplicationProvisioningState(string value) => new DataReplicationProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DataReplicationProvisioningState other && Equals(other); + /// + public bool Equals(DataReplicationProvisioningState 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/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationRecoveryPointCustomProperties.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationRecoveryPointCustomProperties.Serialization.cs new file mode 100644 index 000000000000..aa6ef37140a7 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationRecoveryPointCustomProperties.Serialization.cs @@ -0,0 +1,118 @@ +// 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.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + [PersistableModelProxy(typeof(UnknownDataReplicationRecoveryPointCustomProperties))] + public partial class DataReplicationRecoveryPointCustomProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationRecoveryPointCustomProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("instanceType"u8); + writer.WriteStringValue(InstanceType); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DataReplicationRecoveryPointCustomProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationRecoveryPointCustomProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataReplicationRecoveryPointCustomProperties(document.RootElement, options); + } + + internal static DataReplicationRecoveryPointCustomProperties DeserializeDataReplicationRecoveryPointCustomProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("instanceType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "HyperVToAzStackHCI": return HyperVToAzStackHciRecoveryPointCustomProperties.DeserializeHyperVToAzStackHciRecoveryPointCustomProperties(element, options); + case "VMwareToAzStackHCIRecoveryPointModelCustomProperties": return VMwareToAzStackHciRecoveryPointCustomProperties.DeserializeVMwareToAzStackHciRecoveryPointCustomProperties(element, options); + } + } + return UnknownDataReplicationRecoveryPointCustomProperties.DeserializeUnknownDataReplicationRecoveryPointCustomProperties(element, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DataReplicationRecoveryPointCustomProperties)} does not support writing '{options.Format}' format."); + } + } + + DataReplicationRecoveryPointCustomProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataReplicationRecoveryPointCustomProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataReplicationRecoveryPointCustomProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationRecoveryPointCustomProperties.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationRecoveryPointCustomProperties.cs new file mode 100644 index 000000000000..d04425d9e08f --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationRecoveryPointCustomProperties.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// + /// Recovery point model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public abstract partial class DataReplicationRecoveryPointCustomProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + protected DataReplicationRecoveryPointCustomProperties() + { + } + + /// Initializes a new instance of . + /// Discriminator property for DataReplicationRecoveryPointCustomProperties. + /// Keeps track of any properties unknown to the library. + internal DataReplicationRecoveryPointCustomProperties(string instanceType, IDictionary serializedAdditionalRawData) + { + InstanceType = instanceType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Discriminator property for DataReplicationRecoveryPointCustomProperties. + internal string InstanceType { get; set; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationRecoveryPointProperties.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationRecoveryPointProperties.Serialization.cs new file mode 100644 index 000000000000..4cc5aabade1f --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationRecoveryPointProperties.Serialization.cs @@ -0,0 +1,157 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class DataReplicationRecoveryPointProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationRecoveryPointProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("recoveryPointTime"u8); + writer.WriteStringValue(RecoveryPointOn, "O"); + writer.WritePropertyName("recoveryPointType"u8); + writer.WriteStringValue(RecoveryPointType.ToString()); + writer.WritePropertyName("customProperties"u8); + writer.WriteObjectValue(CustomProperties, options); + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DataReplicationRecoveryPointProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationRecoveryPointProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataReplicationRecoveryPointProperties(document.RootElement, options); + } + + internal static DataReplicationRecoveryPointProperties DeserializeDataReplicationRecoveryPointProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DateTimeOffset recoveryPointTime = default; + DataReplicationRecoveryPointType recoveryPointType = default; + DataReplicationRecoveryPointCustomProperties customProperties = default; + DataReplicationProvisioningState? provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("recoveryPointTime"u8)) + { + recoveryPointTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("recoveryPointType"u8)) + { + recoveryPointType = new DataReplicationRecoveryPointType(property.Value.GetString()); + continue; + } + if (property.NameEquals("customProperties"u8)) + { + customProperties = DataReplicationRecoveryPointCustomProperties.DeserializeDataReplicationRecoveryPointCustomProperties(property.Value, options); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new DataReplicationProvisioningState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DataReplicationRecoveryPointProperties(recoveryPointTime, recoveryPointType, customProperties, provisioningState, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DataReplicationRecoveryPointProperties)} does not support writing '{options.Format}' format."); + } + } + + DataReplicationRecoveryPointProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataReplicationRecoveryPointProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataReplicationRecoveryPointProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationRecoveryPointProperties.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationRecoveryPointProperties.cs new file mode 100644 index 000000000000..2e6b0d219eba --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationRecoveryPointProperties.cs @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Recovery point model properties. + public partial class DataReplicationRecoveryPointProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Gets or sets the recovery point time. + /// Gets or sets the recovery point type. + /// + /// Recovery point model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// is null. + internal DataReplicationRecoveryPointProperties(DateTimeOffset recoveryPointOn, DataReplicationRecoveryPointType recoveryPointType, DataReplicationRecoveryPointCustomProperties customProperties) + { + Argument.AssertNotNull(customProperties, nameof(customProperties)); + + RecoveryPointOn = recoveryPointOn; + RecoveryPointType = recoveryPointType; + CustomProperties = customProperties; + } + + /// Initializes a new instance of . + /// Gets or sets the recovery point time. + /// Gets or sets the recovery point type. + /// + /// Recovery point model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// Gets or sets the provisioning state of the recovery point item. + /// Keeps track of any properties unknown to the library. + internal DataReplicationRecoveryPointProperties(DateTimeOffset recoveryPointOn, DataReplicationRecoveryPointType recoveryPointType, DataReplicationRecoveryPointCustomProperties customProperties, DataReplicationProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) + { + RecoveryPointOn = recoveryPointOn; + RecoveryPointType = recoveryPointType; + CustomProperties = customProperties; + ProvisioningState = provisioningState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DataReplicationRecoveryPointProperties() + { + } + + /// Gets or sets the recovery point time. + public DateTimeOffset RecoveryPointOn { get; } + /// Gets or sets the recovery point type. + public DataReplicationRecoveryPointType RecoveryPointType { get; } + /// + /// Recovery point model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public DataReplicationRecoveryPointCustomProperties CustomProperties { get; } + /// Gets or sets the provisioning state of the recovery point item. + public DataReplicationProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationRecoveryPointType.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationRecoveryPointType.cs new file mode 100644 index 000000000000..1b121feecf9d --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationRecoveryPointType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Gets or sets the recovery point type. + public readonly partial struct DataReplicationRecoveryPointType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DataReplicationRecoveryPointType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ApplicationConsistentValue = "ApplicationConsistent"; + private const string CrashConsistentValue = "CrashConsistent"; + + /// Application consistent recovery point. + public static DataReplicationRecoveryPointType ApplicationConsistent { get; } = new DataReplicationRecoveryPointType(ApplicationConsistentValue); + /// Crash consistent recovery point. + public static DataReplicationRecoveryPointType CrashConsistent { get; } = new DataReplicationRecoveryPointType(CrashConsistentValue); + /// Determines if two values are the same. + public static bool operator ==(DataReplicationRecoveryPointType left, DataReplicationRecoveryPointType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DataReplicationRecoveryPointType left, DataReplicationRecoveryPointType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DataReplicationRecoveryPointType(string value) => new DataReplicationRecoveryPointType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DataReplicationRecoveryPointType other && Equals(other); + /// + public bool Equals(DataReplicationRecoveryPointType 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/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationResynchronizationState.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationResynchronizationState.cs new file mode 100644 index 000000000000..ed5b55c1b4e1 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationResynchronizationState.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Gets or sets the resynchronization state. + public readonly partial struct DataReplicationResynchronizationState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DataReplicationResynchronizationState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoneValue = "None"; + private const string ResynchronizationInitiatedValue = "ResynchronizationInitiated"; + private const string ResynchronizationCompletedValue = "ResynchronizationCompleted"; + private const string ResynchronizationFailedValue = "ResynchronizationFailed"; + + /// Resynchronization is not active. + public static DataReplicationResynchronizationState None { get; } = new DataReplicationResynchronizationState(NoneValue); + /// Resynchronization has been initiated. + public static DataReplicationResynchronizationState ResynchronizationInitiated { get; } = new DataReplicationResynchronizationState(ResynchronizationInitiatedValue); + /// Resynchronization has been completed successfully. + public static DataReplicationResynchronizationState ResynchronizationCompleted { get; } = new DataReplicationResynchronizationState(ResynchronizationCompletedValue); + /// Resynchronization has failed and would need to be started again. + public static DataReplicationResynchronizationState ResynchronizationFailed { get; } = new DataReplicationResynchronizationState(ResynchronizationFailedValue); + /// Determines if two values are the same. + public static bool operator ==(DataReplicationResynchronizationState left, DataReplicationResynchronizationState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DataReplicationResynchronizationState left, DataReplicationResynchronizationState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DataReplicationResynchronizationState(string value) => new DataReplicationResynchronizationState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DataReplicationResynchronizationState other && Equals(other); + /// + public bool Equals(DataReplicationResynchronizationState 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/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationTask.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationTask.Serialization.cs new file mode 100644 index 000000000000..a6114f24f4c5 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationTask.Serialization.cs @@ -0,0 +1,221 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class DataReplicationTask : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationTask)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(TaskName)) + { + writer.WritePropertyName("taskName"u8); + writer.WriteStringValue(TaskName); + } + if (options.Format != "W" && Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(StartOn)) + { + writer.WritePropertyName("startTime"u8); + writer.WriteStringValue(StartOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(EndOn)) + { + writer.WritePropertyName("endTime"u8); + writer.WriteStringValue(EndOn.Value, "O"); + } + if (Optional.IsDefined(CustomProperties)) + { + writer.WritePropertyName("customProperties"u8); + writer.WriteObjectValue(CustomProperties, options); + } + if (Optional.IsCollectionDefined(ChildrenJobs)) + { + writer.WritePropertyName("childrenJobs"u8); + writer.WriteStartArray(); + foreach (var item in ChildrenJobs) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DataReplicationTask IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationTask)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataReplicationTask(document.RootElement, options); + } + + internal static DataReplicationTask DeserializeDataReplicationTask(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string taskName = default; + DataReplicationTaskState? state = default; + DateTimeOffset? startTime = default; + DateTimeOffset? endTime = default; + DataReplicationTaskCustomProperties customProperties = default; + IReadOnlyList childrenJobs = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("taskName"u8)) + { + taskName = property.Value.GetString(); + continue; + } + if (property.NameEquals("state"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = new DataReplicationTaskState(property.Value.GetString()); + continue; + } + if (property.NameEquals("startTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + startTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("endTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("customProperties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + customProperties = DataReplicationTaskCustomProperties.DeserializeDataReplicationTaskCustomProperties(property.Value, options); + continue; + } + if (property.NameEquals("childrenJobs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DataReplicationJobData.DeserializeDataReplicationJobData(item, options)); + } + childrenJobs = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DataReplicationTask( + taskName, + state, + startTime, + endTime, + customProperties, + childrenJobs ?? new ChangeTrackingList(), + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DataReplicationTask)} does not support writing '{options.Format}' format."); + } + } + + DataReplicationTask IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataReplicationTask(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataReplicationTask)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationTask.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationTask.cs new file mode 100644 index 000000000000..200254809b07 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationTask.cs @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Task model. + public partial class DataReplicationTask + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal DataReplicationTask() + { + ChildrenJobs = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Gets or sets the task name. + /// Gets or sets the task state. + /// Gets or sets the start time. + /// Gets or sets the end time. + /// Task model custom properties. + /// Gets or sets the list of children job models. + /// Keeps track of any properties unknown to the library. + internal DataReplicationTask(string taskName, DataReplicationTaskState? state, DateTimeOffset? startOn, DateTimeOffset? endOn, DataReplicationTaskCustomProperties customProperties, IReadOnlyList childrenJobs, IDictionary serializedAdditionalRawData) + { + TaskName = taskName; + State = state; + StartOn = startOn; + EndOn = endOn; + CustomProperties = customProperties; + ChildrenJobs = childrenJobs; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets or sets the task name. + public string TaskName { get; } + /// Gets or sets the task state. + public DataReplicationTaskState? State { get; } + /// Gets or sets the start time. + public DateTimeOffset? StartOn { get; } + /// Gets or sets the end time. + public DateTimeOffset? EndOn { get; } + /// Task model custom properties. + internal DataReplicationTaskCustomProperties CustomProperties { get; } + /// Gets or sets the instance type. + public string CustomInstanceType + { + get => CustomProperties?.InstanceType; + } + + /// Gets or sets the list of children job models. + public IReadOnlyList ChildrenJobs { get; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationTaskCustomProperties.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationTaskCustomProperties.Serialization.cs new file mode 100644 index 000000000000..08b16587b7e8 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationTaskCustomProperties.Serialization.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + internal partial class DataReplicationTaskCustomProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationTaskCustomProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("instanceType"u8); + writer.WriteStringValue(InstanceType); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DataReplicationTaskCustomProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationTaskCustomProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataReplicationTaskCustomProperties(document.RootElement, options); + } + + internal static DataReplicationTaskCustomProperties DeserializeDataReplicationTaskCustomProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string instanceType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("instanceType"u8)) + { + instanceType = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DataReplicationTaskCustomProperties(instanceType, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DataReplicationTaskCustomProperties)} does not support writing '{options.Format}' format."); + } + } + + DataReplicationTaskCustomProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataReplicationTaskCustomProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataReplicationTaskCustomProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationTaskCustomProperties.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationTaskCustomProperties.cs new file mode 100644 index 000000000000..ca8da00a4de1 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationTaskCustomProperties.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Task model custom properties. + internal partial class DataReplicationTaskCustomProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Gets or sets the instance type. + /// is null. + internal DataReplicationTaskCustomProperties(string instanceType) + { + Argument.AssertNotNull(instanceType, nameof(instanceType)); + + InstanceType = instanceType; + } + + /// Initializes a new instance of . + /// Gets or sets the instance type. + /// Keeps track of any properties unknown to the library. + internal DataReplicationTaskCustomProperties(string instanceType, IDictionary serializedAdditionalRawData) + { + InstanceType = instanceType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DataReplicationTaskCustomProperties() + { + } + + /// Gets or sets the instance type. + public string InstanceType { get; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationTaskState.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationTaskState.cs new file mode 100644 index 000000000000..b8f653efd661 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationTaskState.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Gets or sets the task state. + public readonly partial struct DataReplicationTaskState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DataReplicationTaskState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PendingValue = "Pending"; + private const string StartedValue = "Started"; + private const string SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + private const string CancelledValue = "Cancelled"; + private const string SkippedValue = "Skipped"; + + /// Task has not been started. + public static DataReplicationTaskState Pending { get; } = new DataReplicationTaskState(PendingValue); + /// Task is in progress. + public static DataReplicationTaskState Started { get; } = new DataReplicationTaskState(StartedValue); + /// Task has completed successfully. + public static DataReplicationTaskState Succeeded { get; } = new DataReplicationTaskState(SucceededValue); + /// Task failed. + public static DataReplicationTaskState Failed { get; } = new DataReplicationTaskState(FailedValue); + /// Task has been cancelled. + public static DataReplicationTaskState Cancelled { get; } = new DataReplicationTaskState(CancelledValue); + /// Task has been skipped. + public static DataReplicationTaskState Skipped { get; } = new DataReplicationTaskState(SkippedValue); + /// Determines if two values are the same. + public static bool operator ==(DataReplicationTaskState left, DataReplicationTaskState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DataReplicationTaskState left, DataReplicationTaskState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DataReplicationTaskState(string value) => new DataReplicationTaskState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DataReplicationTaskState other && Equals(other); + /// + public bool Equals(DataReplicationTaskState 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/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationTestFailoverState.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationTestFailoverState.cs new file mode 100644 index 000000000000..35bd3e4557c6 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationTestFailoverState.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Gets or sets the test failover state. + public readonly partial struct DataReplicationTestFailoverState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DataReplicationTestFailoverState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoneValue = "None"; + private const string TestFailoverInitiatedValue = "TestFailoverInitiated"; + private const string TestFailoverCompletingValue = "TestFailoverCompleting"; + private const string TestFailoverCompletedValue = "TestFailoverCompleted"; + private const string TestFailoverFailedValue = "TestFailoverFailed"; + private const string TestFailoverCompletionFailedValue = "TestFailoverCompletionFailed"; + private const string TestFailoverCleanupInitiatedValue = "TestFailoverCleanupInitiated"; + private const string TestFailoverCleanupCompletingValue = "TestFailoverCleanupCompleting"; + private const string MarkedForDeletionValue = "MarkedForDeletion"; + + /// Test failover is not active. + public static DataReplicationTestFailoverState None { get; } = new DataReplicationTestFailoverState(NoneValue); + /// Test failover has been initiated. + public static DataReplicationTestFailoverState TestFailoverInitiated { get; } = new DataReplicationTestFailoverState(TestFailoverInitiatedValue); + /// Preparing test protected entities is in progress. + public static DataReplicationTestFailoverState TestFailoverCompleting { get; } = new DataReplicationTestFailoverState(TestFailoverCompletingValue); + /// Test failover has been completed successfully. + public static DataReplicationTestFailoverState TestFailoverCompleted { get; } = new DataReplicationTestFailoverState(TestFailoverCompletedValue); + /// Test failover initiation failed.. + public static DataReplicationTestFailoverState TestFailoverFailed { get; } = new DataReplicationTestFailoverState(TestFailoverFailedValue); + /// Preparing test protected entities failed. + public static DataReplicationTestFailoverState TestFailoverCompletionFailed { get; } = new DataReplicationTestFailoverState(TestFailoverCompletionFailedValue); + /// Test failover cleanup has been initiated. + public static DataReplicationTestFailoverState TestFailoverCleanupInitiated { get; } = new DataReplicationTestFailoverState(TestFailoverCleanupInitiatedValue); + /// Cleaning up test protected entities is in progress. + public static DataReplicationTestFailoverState TestFailoverCleanupCompleting { get; } = new DataReplicationTestFailoverState(TestFailoverCleanupCompletingValue); + /// Test failover cleanup has completed/failed. This is a transient state before the state is moved back to None. + public static DataReplicationTestFailoverState MarkedForDeletion { get; } = new DataReplicationTestFailoverState(MarkedForDeletionValue); + /// Determines if two values are the same. + public static bool operator ==(DataReplicationTestFailoverState left, DataReplicationTestFailoverState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DataReplicationTestFailoverState left, DataReplicationTestFailoverState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DataReplicationTestFailoverState(string value) => new DataReplicationTestFailoverState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DataReplicationTestFailoverState other && Equals(other); + /// + public bool Equals(DataReplicationTestFailoverState 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/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationVaultPatch.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationVaultPatch.Serialization.cs new file mode 100644 index 000000000000..60da0d8a33cb --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationVaultPatch.Serialization.cs @@ -0,0 +1,197 @@ +// 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.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class DataReplicationVaultPatch : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationVaultPatch)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"u8); + JsonSerializer.Serialize(writer, Identity); + } + } + + DataReplicationVaultPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationVaultPatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataReplicationVaultPatch(document.RootElement, options); + } + + internal static DataReplicationVaultPatch DeserializeDataReplicationVaultPatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary tags = default; + DataReplicationVaultProperties properties = default; + ManagedServiceIdentity identity = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = DataReplicationVaultProperties.DeserializeDataReplicationVaultProperties(property.Value, options); + continue; + } + if (property.NameEquals("identity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + identity = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DataReplicationVaultPatch( + id, + name, + type, + systemData, + tags ?? new ChangeTrackingDictionary(), + properties, + identity, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DataReplicationVaultPatch)} does not support writing '{options.Format}' format."); + } + } + + DataReplicationVaultPatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataReplicationVaultPatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataReplicationVaultPatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationVaultPatch.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationVaultPatch.cs new file mode 100644 index 000000000000..aff777c9c300 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationVaultPatch.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Vault model update. + public partial class DataReplicationVaultPatch : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DataReplicationVaultPatch() + { + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Gets or sets the resource tags. + /// Vault properties. + /// Vault identity. Current supported identity types: None, SystemAssigned, UserAssigned. + /// Keeps track of any properties unknown to the library. + internal DataReplicationVaultPatch(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, DataReplicationVaultProperties properties, ManagedServiceIdentity identity, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Tags = tags; + Properties = properties; + Identity = identity; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets or sets the resource tags. + public IDictionary Tags { get; } + /// Vault properties. + public DataReplicationVaultProperties Properties { get; set; } + /// Vault identity. Current supported identity types: None, SystemAssigned, UserAssigned. + public ManagedServiceIdentity Identity { get; set; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationVaultProperties.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationVaultProperties.Serialization.cs new file mode 100644 index 000000000000..919991a2785b --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationVaultProperties.Serialization.cs @@ -0,0 +1,163 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class DataReplicationVaultProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationVaultProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(ServiceResourceId)) + { + writer.WritePropertyName("serviceResourceId"u8); + writer.WriteStringValue(ServiceResourceId); + } + if (Optional.IsDefined(VaultType)) + { + writer.WritePropertyName("vaultType"u8); + writer.WriteStringValue(VaultType.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DataReplicationVaultProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationVaultProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataReplicationVaultProperties(document.RootElement, options); + } + + internal static DataReplicationVaultProperties DeserializeDataReplicationVaultProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DataReplicationProvisioningState? provisioningState = default; + ResourceIdentifier serviceResourceId = default; + DataReplicationVaultType? vaultType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new DataReplicationProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("serviceResourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + serviceResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("vaultType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + vaultType = new DataReplicationVaultType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DataReplicationVaultProperties(provisioningState, serviceResourceId, vaultType, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DataReplicationVaultProperties)} does not support writing '{options.Format}' format."); + } + } + + DataReplicationVaultProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataReplicationVaultProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataReplicationVaultProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationVaultProperties.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationVaultProperties.cs new file mode 100644 index 000000000000..7464d2a973bc --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationVaultProperties.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Vault properties. + public partial class DataReplicationVaultProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DataReplicationVaultProperties() + { + } + + /// Initializes a new instance of . + /// Gets or sets the provisioning state of the vault. + /// Gets or sets the service resource Id. + /// Gets or sets the type of vault. + /// Keeps track of any properties unknown to the library. + internal DataReplicationVaultProperties(DataReplicationProvisioningState? provisioningState, ResourceIdentifier serviceResourceId, DataReplicationVaultType? vaultType, IDictionary serializedAdditionalRawData) + { + ProvisioningState = provisioningState; + ServiceResourceId = serviceResourceId; + VaultType = vaultType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets or sets the provisioning state of the vault. + public DataReplicationProvisioningState? ProvisioningState { get; } + /// Gets or sets the service resource Id. + public ResourceIdentifier ServiceResourceId { get; } + /// Gets or sets the type of vault. + public DataReplicationVaultType? VaultType { get; set; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationVaultType.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationVaultType.cs new file mode 100644 index 000000000000..57ab10259484 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DataReplicationVaultType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Gets or sets the type of vault. + public readonly partial struct DataReplicationVaultType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DataReplicationVaultType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DisasterRecoveryValue = "DisasterRecovery"; + private const string MigrateValue = "Migrate"; + + /// Disaster recovery vault. + public static DataReplicationVaultType DisasterRecovery { get; } = new DataReplicationVaultType(DisasterRecoveryValue); + /// Migrate vault. + public static DataReplicationVaultType Migrate { get; } = new DataReplicationVaultType(MigrateValue); + /// Determines if two values are the same. + public static bool operator ==(DataReplicationVaultType left, DataReplicationVaultType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DataReplicationVaultType left, DataReplicationVaultType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DataReplicationVaultType(string value) => new DataReplicationVaultType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DataReplicationVaultType other && Equals(other); + /// + public bool Equals(DataReplicationVaultType 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/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DeploymentPreflight.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DeploymentPreflight.Serialization.cs new file mode 100644 index 000000000000..c9faaac378e5 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DeploymentPreflight.Serialization.cs @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class DeploymentPreflight : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeploymentPreflight)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(Resources)) + { + writer.WritePropertyName("resources"u8); + writer.WriteStartArray(); + foreach (var item in Resources) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DeploymentPreflight IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeploymentPreflight)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDeploymentPreflight(document.RootElement, options); + } + + internal static DeploymentPreflight DeserializeDeploymentPreflight(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList resources = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("resources"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DeploymentPreflightResourceInfo.DeserializeDeploymentPreflightResourceInfo(item, options)); + } + resources = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DeploymentPreflight(resources ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DeploymentPreflight)} does not support writing '{options.Format}' format."); + } + } + + DeploymentPreflight IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDeploymentPreflight(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DeploymentPreflight)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DeploymentPreflight.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DeploymentPreflight.cs new file mode 100644 index 000000000000..dc4c10606cd4 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DeploymentPreflight.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Deployment preflight model. + public partial class DeploymentPreflight + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DeploymentPreflight() + { + Resources = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Gets or sets the list of resources. + /// Keeps track of any properties unknown to the library. + internal DeploymentPreflight(IList resources, IDictionary serializedAdditionalRawData) + { + Resources = resources; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets or sets the list of resources. + public IList Resources { get; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DeploymentPreflightResourceInfo.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DeploymentPreflightResourceInfo.Serialization.cs new file mode 100644 index 000000000000..8b7d39007f7d --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DeploymentPreflightResourceInfo.Serialization.cs @@ -0,0 +1,198 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class DeploymentPreflightResourceInfo : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeploymentPreflightResourceInfo)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(Type)) + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.Value); + } + if (Optional.IsDefined(Location)) + { + writer.WritePropertyName("location"u8); + writer.WriteStringValue(Location.Value); + } + if (Optional.IsDefined(ApiVersion)) + { + writer.WritePropertyName("apiVersion"u8); + writer.WriteStringValue(ApiVersion); + } + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Properties); +#else + using (JsonDocument document = JsonDocument.Parse(Properties, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DeploymentPreflightResourceInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeploymentPreflightResourceInfo)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDeploymentPreflightResourceInfo(document.RootElement, options); + } + + internal static DeploymentPreflightResourceInfo DeserializeDeploymentPreflightResourceInfo(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + ResourceType? type = default; + AzureLocation? location = default; + string apiVersion = default; + BinaryData properties = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("location"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("apiVersion"u8)) + { + apiVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = BinaryData.FromString(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DeploymentPreflightResourceInfo( + name, + type, + location, + apiVersion, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DeploymentPreflightResourceInfo)} does not support writing '{options.Format}' format."); + } + } + + DeploymentPreflightResourceInfo IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDeploymentPreflightResourceInfo(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DeploymentPreflightResourceInfo)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DeploymentPreflightResourceInfo.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DeploymentPreflightResourceInfo.cs new file mode 100644 index 000000000000..ff63b5899143 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/DeploymentPreflightResourceInfo.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Deployment preflight resource. + public partial class DeploymentPreflightResourceInfo + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DeploymentPreflightResourceInfo() + { + } + + /// Initializes a new instance of . + /// Gets or sets the resource name. + /// Gets or sets the resource type. + /// Gets or sets the location of the resource. + /// Gets or sets the Api version. + /// Gets or sets the properties of the resource. + /// Keeps track of any properties unknown to the library. + internal DeploymentPreflightResourceInfo(string name, ResourceType? type, AzureLocation? location, string apiVersion, BinaryData properties, IDictionary serializedAdditionalRawData) + { + Name = name; + Type = type; + Location = location; + ApiVersion = apiVersion; + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets or sets the resource name. + public string Name { get; set; } + /// Gets or sets the resource type. + public ResourceType? Type { get; set; } + /// Gets or sets the location of the resource. + public AzureLocation? Location { get; set; } + /// Gets or sets the Api version. + public string ApiVersion { get; set; } + /// + /// Gets or sets the properties of the resource. + /// + /// To assign an object to this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + public BinaryData Properties { get; set; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EmailConfigurationModelListResult.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EmailConfigurationModelListResult.Serialization.cs new file mode 100644 index 000000000000..3777aabaae75 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EmailConfigurationModelListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + internal partial class EmailConfigurationModelListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EmailConfigurationModelListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + EmailConfigurationModelListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EmailConfigurationModelListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEmailConfigurationModelListResult(document.RootElement, options); + } + + internal static EmailConfigurationModelListResult DeserializeEmailConfigurationModelListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DataReplicationEmailConfigurationData.DeserializeDataReplicationEmailConfigurationData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EmailConfigurationModelListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(EmailConfigurationModelListResult)} does not support writing '{options.Format}' format."); + } + } + + EmailConfigurationModelListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeEmailConfigurationModelListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EmailConfigurationModelListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EmailConfigurationModelListResult.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EmailConfigurationModelListResult.cs new file mode 100644 index 000000000000..9bbfe88efaa3 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EmailConfigurationModelListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// The response of a EmailConfigurationModel list operation. + internal partial class EmailConfigurationModelListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The EmailConfigurationModel items on this page. + /// is null. + internal EmailConfigurationModelListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The EmailConfigurationModel items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal EmailConfigurationModelListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal EmailConfigurationModelListResult() + { + } + + /// The EmailConfigurationModel items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EventModelListResult.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EventModelListResult.Serialization.cs new file mode 100644 index 000000000000..021070c56552 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EventModelListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + internal partial class EventModelListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EventModelListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + EventModelListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EventModelListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEventModelListResult(document.RootElement, options); + } + + internal static EventModelListResult DeserializeEventModelListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DataReplicationEventData.DeserializeDataReplicationEventData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EventModelListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(EventModelListResult)} does not support writing '{options.Format}' format."); + } + } + + EventModelListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeEventModelListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EventModelListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EventModelListResult.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EventModelListResult.cs new file mode 100644 index 000000000000..5b38c81917c9 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/EventModelListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// The response of a EventModel list operation. + internal partial class EventModelListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The EventModel items on this page. + /// is null. + internal EventModelListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The EventModel items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal EventModelListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal EventModelListResult() + { + } + + /// The EventModel items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricAgentModelListResult.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricAgentModelListResult.Serialization.cs new file mode 100644 index 000000000000..f68d20825226 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricAgentModelListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + internal partial class FabricAgentModelListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FabricAgentModelListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + FabricAgentModelListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FabricAgentModelListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFabricAgentModelListResult(document.RootElement, options); + } + + internal static FabricAgentModelListResult DeserializeFabricAgentModelListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DataReplicationFabricAgentData.DeserializeDataReplicationFabricAgentData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FabricAgentModelListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(FabricAgentModelListResult)} does not support writing '{options.Format}' format."); + } + } + + FabricAgentModelListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeFabricAgentModelListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FabricAgentModelListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricAgentModelListResult.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricAgentModelListResult.cs new file mode 100644 index 000000000000..d93ed1a75ee9 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricAgentModelListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// The response of a FabricAgentModel list operation. + internal partial class FabricAgentModelListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The FabricAgentModel items on this page. + /// is null. + internal FabricAgentModelListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The FabricAgentModel items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal FabricAgentModelListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal FabricAgentModelListResult() + { + } + + /// The FabricAgentModel items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelListResult.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelListResult.Serialization.cs new file mode 100644 index 000000000000..c98e6580290f --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + internal partial class FabricModelListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FabricModelListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + FabricModelListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FabricModelListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFabricModelListResult(document.RootElement, options); + } + + internal static FabricModelListResult DeserializeFabricModelListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DataReplicationFabricData.DeserializeDataReplicationFabricData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FabricModelListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(FabricModelListResult)} does not support writing '{options.Format}' format."); + } + } + + FabricModelListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeFabricModelListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FabricModelListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelListResult.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelListResult.cs new file mode 100644 index 000000000000..ab056421422d --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FabricModelListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// The response of a FabricModel list operation. + internal partial class FabricModelListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The FabricModel items on this page. + /// is null. + internal FabricModelListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The FabricModel items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal FabricModelListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal FabricModelListResult() + { + } + + /// The FabricModel items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FailoverJobCustomProperties.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FailoverJobCustomProperties.Serialization.cs new file mode 100644 index 000000000000..a81c0c953922 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FailoverJobCustomProperties.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.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class FailoverJobCustomProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FailoverJobCustomProperties)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (options.Format != "W" && Optional.IsCollectionDefined(ProtectedItemDetails)) + { + writer.WritePropertyName("protectedItemDetails"u8); + writer.WriteStartArray(); + foreach (var item in ProtectedItemDetails) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + } + + FailoverJobCustomProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FailoverJobCustomProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFailoverJobCustomProperties(document.RootElement, options); + } + + internal static FailoverJobCustomProperties DeserializeFailoverJobCustomProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList protectedItemDetails = default; + string instanceType = default; + JobModelCustomPropertiesAffectedObjectDetails affectedObjectDetails = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("protectedItemDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(FailoverProtectedItemProperties.DeserializeFailoverProtectedItemProperties(item, options)); + } + protectedItemDetails = array; + continue; + } + if (property.NameEquals("instanceType"u8)) + { + instanceType = property.Value.GetString(); + continue; + } + if (property.NameEquals("affectedObjectDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + affectedObjectDetails = JobModelCustomPropertiesAffectedObjectDetails.DeserializeJobModelCustomPropertiesAffectedObjectDetails(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FailoverJobCustomProperties(instanceType, affectedObjectDetails, serializedAdditionalRawData, protectedItemDetails ?? new ChangeTrackingList()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(FailoverJobCustomProperties)} does not support writing '{options.Format}' format."); + } + } + + FailoverJobCustomProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeFailoverJobCustomProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FailoverJobCustomProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FailoverJobCustomProperties.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FailoverJobCustomProperties.cs new file mode 100644 index 000000000000..4a880d47abb7 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FailoverJobCustomProperties.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; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Failover job model custom properties. + public partial class FailoverJobCustomProperties : DataReplicationJobCustomProperties + { + /// Initializes a new instance of . + internal FailoverJobCustomProperties() + { + ProtectedItemDetails = new ChangeTrackingList(); + InstanceType = "FailoverJobDetails"; + } + + /// Initializes a new instance of . + /// Discriminator property for DataReplicationJobCustomProperties. + /// Gets or sets any custom properties of the affected object. + /// Keeps track of any properties unknown to the library. + /// Gets or sets the failed over protected item details. + internal FailoverJobCustomProperties(string instanceType, JobModelCustomPropertiesAffectedObjectDetails affectedObjectDetails, IDictionary serializedAdditionalRawData, IReadOnlyList protectedItemDetails) : base(instanceType, affectedObjectDetails, serializedAdditionalRawData) + { + ProtectedItemDetails = protectedItemDetails; + InstanceType = instanceType ?? "FailoverJobDetails"; + } + + /// Gets or sets the failed over protected item details. + public IReadOnlyList ProtectedItemDetails { get; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FailoverProtectedItemProperties.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FailoverProtectedItemProperties.Serialization.cs new file mode 100644 index 000000000000..5d9a1910ba1b --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FailoverProtectedItemProperties.Serialization.cs @@ -0,0 +1,207 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class FailoverProtectedItemProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FailoverProtectedItemProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(ProtectedItemName)) + { + writer.WritePropertyName("protectedItemName"u8); + writer.WriteStringValue(ProtectedItemName); + } + if (options.Format != "W" && Optional.IsDefined(VmName)) + { + writer.WritePropertyName("vmName"u8); + writer.WriteStringValue(VmName); + } + if (options.Format != "W" && Optional.IsDefined(TestVmName)) + { + writer.WritePropertyName("testVmName"u8); + writer.WriteStringValue(TestVmName); + } + if (options.Format != "W" && Optional.IsDefined(RecoveryPointId)) + { + writer.WritePropertyName("recoveryPointId"u8); + writer.WriteStringValue(RecoveryPointId); + } + if (options.Format != "W" && Optional.IsDefined(RecoveryPointOn)) + { + writer.WritePropertyName("recoveryPointTime"u8); + writer.WriteStringValue(RecoveryPointOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(NetworkName)) + { + writer.WritePropertyName("networkName"u8); + writer.WriteStringValue(NetworkName); + } + if (options.Format != "W" && Optional.IsDefined(Subnet)) + { + writer.WritePropertyName("subnet"u8); + writer.WriteStringValue(Subnet); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + FailoverProtectedItemProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FailoverProtectedItemProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFailoverProtectedItemProperties(document.RootElement, options); + } + + internal static FailoverProtectedItemProperties DeserializeFailoverProtectedItemProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string protectedItemName = default; + string vmName = default; + string testVmName = default; + string recoveryPointId = default; + DateTimeOffset? recoveryPointTime = default; + string networkName = default; + string subnet = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("protectedItemName"u8)) + { + protectedItemName = property.Value.GetString(); + continue; + } + if (property.NameEquals("vmName"u8)) + { + vmName = property.Value.GetString(); + continue; + } + if (property.NameEquals("testVmName"u8)) + { + testVmName = property.Value.GetString(); + continue; + } + if (property.NameEquals("recoveryPointId"u8)) + { + recoveryPointId = property.Value.GetString(); + continue; + } + if (property.NameEquals("recoveryPointTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + recoveryPointTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("networkName"u8)) + { + networkName = property.Value.GetString(); + continue; + } + if (property.NameEquals("subnet"u8)) + { + subnet = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FailoverProtectedItemProperties( + protectedItemName, + vmName, + testVmName, + recoveryPointId, + recoveryPointTime, + networkName, + subnet, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(FailoverProtectedItemProperties)} does not support writing '{options.Format}' format."); + } + } + + FailoverProtectedItemProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeFailoverProtectedItemProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FailoverProtectedItemProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FailoverProtectedItemProperties.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FailoverProtectedItemProperties.cs new file mode 100644 index 000000000000..ba5635ae92a1 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/FailoverProtectedItemProperties.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; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Failover properties of the protected item. + public partial class FailoverProtectedItemProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal FailoverProtectedItemProperties() + { + } + + /// Initializes a new instance of . + /// Gets or sets the protected item name. + /// Gets or sets the VM name. + /// Gets or sets the test VM name. + /// Gets or sets the recovery point Id. + /// Gets or sets the recovery point time. + /// Gets or sets the network name. + /// Gets or sets the network subnet. + /// Keeps track of any properties unknown to the library. + internal FailoverProtectedItemProperties(string protectedItemName, string vmName, string testVmName, string recoveryPointId, DateTimeOffset? recoveryPointOn, string networkName, string subnet, IDictionary serializedAdditionalRawData) + { + ProtectedItemName = protectedItemName; + VmName = vmName; + TestVmName = testVmName; + RecoveryPointId = recoveryPointId; + RecoveryPointOn = recoveryPointOn; + NetworkName = networkName; + Subnet = subnet; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets or sets the protected item name. + public string ProtectedItemName { get; } + /// Gets or sets the VM name. + public string VmName { get; } + /// Gets or sets the test VM name. + public string TestVmName { get; } + /// Gets or sets the recovery point Id. + public string RecoveryPointId { get; } + /// Gets or sets the recovery point time. + public DateTimeOffset? RecoveryPointOn { get; } + /// Gets or sets the network name. + public string NetworkName { get; } + /// Gets or sets the network subnet. + public string Subnet { get; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/GroupConnectivityInformation.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/GroupConnectivityInformation.Serialization.cs new file mode 100644 index 000000000000..427c35ded0fe --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/GroupConnectivityInformation.Serialization.cs @@ -0,0 +1,205 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class GroupConnectivityInformation : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(GroupConnectivityInformation)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(GroupId)) + { + writer.WritePropertyName("groupId"u8); + writer.WriteStringValue(GroupId); + } + if (Optional.IsDefined(MemberName)) + { + writer.WritePropertyName("memberName"u8); + writer.WriteStringValue(MemberName); + } + if (Optional.IsCollectionDefined(CustomerVisibleFqdns)) + { + writer.WritePropertyName("customerVisibleFqdns"u8); + writer.WriteStartArray(); + foreach (var item in CustomerVisibleFqdns) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(InternalFqdn)) + { + writer.WritePropertyName("internalFqdn"u8); + writer.WriteStringValue(InternalFqdn); + } + if (Optional.IsDefined(RedirectMapId)) + { + writer.WritePropertyName("redirectMapId"u8); + writer.WriteStringValue(RedirectMapId); + } + if (Optional.IsDefined(PrivateLinkServiceArmRegion)) + { + writer.WritePropertyName("privateLinkServiceArmRegion"u8); + writer.WriteStringValue(PrivateLinkServiceArmRegion); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + GroupConnectivityInformation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(GroupConnectivityInformation)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeGroupConnectivityInformation(document.RootElement, options); + } + + internal static GroupConnectivityInformation DeserializeGroupConnectivityInformation(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string groupId = default; + string memberName = default; + IList customerVisibleFqdns = default; + string internalFqdn = default; + string redirectMapId = default; + string privateLinkServiceArmRegion = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("groupId"u8)) + { + groupId = property.Value.GetString(); + continue; + } + if (property.NameEquals("memberName"u8)) + { + memberName = property.Value.GetString(); + continue; + } + if (property.NameEquals("customerVisibleFqdns"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + customerVisibleFqdns = array; + continue; + } + if (property.NameEquals("internalFqdn"u8)) + { + internalFqdn = property.Value.GetString(); + continue; + } + if (property.NameEquals("redirectMapId"u8)) + { + redirectMapId = property.Value.GetString(); + continue; + } + if (property.NameEquals("privateLinkServiceArmRegion"u8)) + { + privateLinkServiceArmRegion = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new GroupConnectivityInformation( + groupId, + memberName, + customerVisibleFqdns ?? new ChangeTrackingList(), + internalFqdn, + redirectMapId, + privateLinkServiceArmRegion, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(GroupConnectivityInformation)} does not support writing '{options.Format}' format."); + } + } + + GroupConnectivityInformation IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeGroupConnectivityInformation(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(GroupConnectivityInformation)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/GroupConnectivityInformation.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/GroupConnectivityInformation.cs new file mode 100644 index 000000000000..bc4ad49ffc23 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/GroupConnectivityInformation.cs @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Represents of a connection's group information. + public partial class GroupConnectivityInformation + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public GroupConnectivityInformation() + { + CustomerVisibleFqdns = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Gets or sets group id. + /// Gets or sets member name. + /// Gets or sets customer visible FQDNs. + /// Gets or sets Internal Fqdn. + /// Gets or sets the redirect map id. + /// Gets or sets the private link service arm region. + /// Keeps track of any properties unknown to the library. + internal GroupConnectivityInformation(string groupId, string memberName, IList customerVisibleFqdns, string internalFqdn, string redirectMapId, string privateLinkServiceArmRegion, IDictionary serializedAdditionalRawData) + { + GroupId = groupId; + MemberName = memberName; + CustomerVisibleFqdns = customerVisibleFqdns; + InternalFqdn = internalFqdn; + RedirectMapId = redirectMapId; + PrivateLinkServiceArmRegion = privateLinkServiceArmRegion; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets or sets group id. + public string GroupId { get; set; } + /// Gets or sets member name. + public string MemberName { get; set; } + /// Gets or sets customer visible FQDNs. + public IList CustomerVisibleFqdns { get; } + /// Gets or sets Internal Fqdn. + public string InternalFqdn { get; set; } + /// Gets or sets the redirect map id. + public string RedirectMapId { get; set; } + /// Gets or sets the private link service arm region. + public string PrivateLinkServiceArmRegion { get; set; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVMigrateFabricCustomProperties.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVMigrateFabricCustomProperties.Serialization.cs new file mode 100644 index 000000000000..ef495c3855a5 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVMigrateFabricCustomProperties.Serialization.cs @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class HyperVMigrateFabricCustomProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(HyperVMigrateFabricCustomProperties)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("hyperVSiteId"u8); + writer.WriteStringValue(HyperVSiteId); + if (options.Format != "W" && Optional.IsDefined(FabricResourceId)) + { + writer.WritePropertyName("fabricResourceId"u8); + writer.WriteStringValue(FabricResourceId); + } + if (options.Format != "W" && Optional.IsDefined(FabricContainerId)) + { + writer.WritePropertyName("fabricContainerId"u8); + writer.WriteStringValue(FabricContainerId); + } + writer.WritePropertyName("migrationSolutionId"u8); + writer.WriteStringValue(MigrationSolutionId); + if (options.Format != "W" && Optional.IsDefined(MigrationHubUri)) + { + writer.WritePropertyName("migrationHubUri"u8); + writer.WriteStringValue(MigrationHubUri.AbsoluteUri); + } + } + + HyperVMigrateFabricCustomProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(HyperVMigrateFabricCustomProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeHyperVMigrateFabricCustomProperties(document.RootElement, options); + } + + internal static HyperVMigrateFabricCustomProperties DeserializeHyperVMigrateFabricCustomProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier hyperVSiteId = default; + ResourceIdentifier fabricResourceId = default; + ResourceIdentifier fabricContainerId = default; + ResourceIdentifier migrationSolutionId = default; + Uri migrationHubUri = default; + string instanceType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("hyperVSiteId"u8)) + { + hyperVSiteId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("fabricResourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + fabricResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("fabricContainerId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + fabricContainerId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("migrationSolutionId"u8)) + { + migrationSolutionId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("migrationHubUri"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + migrationHubUri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("instanceType"u8)) + { + instanceType = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new HyperVMigrateFabricCustomProperties( + instanceType, + serializedAdditionalRawData, + hyperVSiteId, + fabricResourceId, + fabricContainerId, + migrationSolutionId, + migrationHubUri); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(HyperVMigrateFabricCustomProperties)} does not support writing '{options.Format}' format."); + } + } + + HyperVMigrateFabricCustomProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeHyperVMigrateFabricCustomProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(HyperVMigrateFabricCustomProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVMigrateFabricCustomProperties.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVMigrateFabricCustomProperties.cs new file mode 100644 index 000000000000..2a30f572c1ea --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVMigrateFabricCustomProperties.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// HyperV migrate fabric model custom properties. + public partial class HyperVMigrateFabricCustomProperties : DataReplicationFabricCustomProperties + { + /// Initializes a new instance of . + /// Gets or sets the ARM Id of the HyperV site. + /// Gets or sets the migration solution ARM Id. + /// or is null. + public HyperVMigrateFabricCustomProperties(ResourceIdentifier hyperVSiteId, ResourceIdentifier migrationSolutionId) + { + Argument.AssertNotNull(hyperVSiteId, nameof(hyperVSiteId)); + Argument.AssertNotNull(migrationSolutionId, nameof(migrationSolutionId)); + + HyperVSiteId = hyperVSiteId; + MigrationSolutionId = migrationSolutionId; + InstanceType = "HyperVMigrate"; + } + + /// Initializes a new instance of . + /// Discriminator property for DataReplicationFabricCustomProperties. + /// Keeps track of any properties unknown to the library. + /// Gets or sets the ARM Id of the HyperV site. + /// Gets or sets the fabric resource Id. + /// Gets or sets the fabric container Id. + /// Gets or sets the migration solution ARM Id. + /// Gets or sets the migration hub Uri. + internal HyperVMigrateFabricCustomProperties(string instanceType, IDictionary serializedAdditionalRawData, ResourceIdentifier hyperVSiteId, ResourceIdentifier fabricResourceId, ResourceIdentifier fabricContainerId, ResourceIdentifier migrationSolutionId, Uri migrationHubUri) : base(instanceType, serializedAdditionalRawData) + { + HyperVSiteId = hyperVSiteId; + FabricResourceId = fabricResourceId; + FabricContainerId = fabricContainerId; + MigrationSolutionId = migrationSolutionId; + MigrationHubUri = migrationHubUri; + InstanceType = instanceType ?? "HyperVMigrate"; + } + + /// Initializes a new instance of for deserialization. + internal HyperVMigrateFabricCustomProperties() + { + } + + /// Gets or sets the ARM Id of the HyperV site. + public ResourceIdentifier HyperVSiteId { get; set; } + /// Gets or sets the fabric resource Id. + public ResourceIdentifier FabricResourceId { get; } + /// Gets or sets the fabric container Id. + public ResourceIdentifier FabricContainerId { get; } + /// Gets or sets the migration solution ARM Id. + public ResourceIdentifier MigrationSolutionId { get; set; } + /// Gets or sets the migration hub Uri. + public Uri MigrationHubUri { get; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciDiskInput.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciDiskInput.Serialization.cs new file mode 100644 index 000000000000..42f3364403da --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciDiskInput.Serialization.cs @@ -0,0 +1,263 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class HyperVToAzStackHciDiskInput : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(HyperVToAzStackHciDiskInput)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("diskId"u8); + writer.WriteStringValue(DiskId); + if (Optional.IsDefined(StorageContainerId)) + { + writer.WritePropertyName("storageContainerId"u8); + writer.WriteStringValue(StorageContainerId); + } + if (Optional.IsDefined(IsDynamic)) + { + writer.WritePropertyName("isDynamic"u8); + writer.WriteBooleanValue(IsDynamic.Value); + } + writer.WritePropertyName("diskSizeGB"u8); + writer.WriteNumberValue(DiskSizeGB); + writer.WritePropertyName("diskFileFormat"u8); + writer.WriteStringValue(DiskFileFormat); + writer.WritePropertyName("isOsDisk"u8); + writer.WriteBooleanValue(IsOSDisk); + if (Optional.IsDefined(DiskBlockSize)) + { + writer.WritePropertyName("diskBlockSize"u8); + writer.WriteNumberValue(DiskBlockSize.Value); + } + if (Optional.IsDefined(DiskLogicalSectorSize)) + { + writer.WritePropertyName("diskLogicalSectorSize"u8); + writer.WriteNumberValue(DiskLogicalSectorSize.Value); + } + if (Optional.IsDefined(DiskPhysicalSectorSize)) + { + writer.WritePropertyName("diskPhysicalSectorSize"u8); + writer.WriteNumberValue(DiskPhysicalSectorSize.Value); + } + if (Optional.IsDefined(DiskIdentifier)) + { + writer.WritePropertyName("diskIdentifier"u8); + writer.WriteStringValue(DiskIdentifier); + } + if (Optional.IsDefined(DiskController)) + { + writer.WritePropertyName("diskController"u8); + writer.WriteObjectValue(DiskController, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + HyperVToAzStackHciDiskInput IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(HyperVToAzStackHciDiskInput)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeHyperVToAzStackHciDiskInput(document.RootElement, options); + } + + internal static HyperVToAzStackHciDiskInput DeserializeHyperVToAzStackHciDiskInput(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string diskId = default; + ResourceIdentifier storageContainerId = default; + bool? isDynamic = default; + long diskSizeGB = default; + string diskFileFormat = default; + bool isOSDisk = default; + long? diskBlockSize = default; + long? diskLogicalSectorSize = default; + long? diskPhysicalSectorSize = default; + string diskIdentifier = default; + DataReplicationDiskControllerInputs diskController = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("diskId"u8)) + { + diskId = property.Value.GetString(); + continue; + } + if (property.NameEquals("storageContainerId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + storageContainerId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("isDynamic"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isDynamic = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("diskSizeGB"u8)) + { + diskSizeGB = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("diskFileFormat"u8)) + { + diskFileFormat = property.Value.GetString(); + continue; + } + if (property.NameEquals("isOsDisk"u8)) + { + isOSDisk = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("diskBlockSize"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + diskBlockSize = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("diskLogicalSectorSize"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + diskLogicalSectorSize = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("diskPhysicalSectorSize"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + diskPhysicalSectorSize = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("diskIdentifier"u8)) + { + diskIdentifier = property.Value.GetString(); + continue; + } + if (property.NameEquals("diskController"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + diskController = DataReplicationDiskControllerInputs.DeserializeDataReplicationDiskControllerInputs(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new HyperVToAzStackHciDiskInput( + diskId, + storageContainerId, + isDynamic, + diskSizeGB, + diskFileFormat, + isOSDisk, + diskBlockSize, + diskLogicalSectorSize, + diskPhysicalSectorSize, + diskIdentifier, + diskController, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(HyperVToAzStackHciDiskInput)} does not support writing '{options.Format}' format."); + } + } + + HyperVToAzStackHciDiskInput IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeHyperVToAzStackHciDiskInput(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(HyperVToAzStackHciDiskInput)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciDiskInput.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciDiskInput.cs new file mode 100644 index 000000000000..f068fa12789e --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciDiskInput.cs @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// HyperVToAzStack disk input. + public partial class HyperVToAzStackHciDiskInput + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Gets or sets the disk Id. + /// Gets or sets the disk size in GB. + /// Gets or sets the type of the virtual hard disk, vhd or vhdx. + /// Gets or sets a value indicating whether disk is os disk. + /// or is null. + public HyperVToAzStackHciDiskInput(string diskId, long diskSizeGB, string diskFileFormat, bool isOSDisk) + { + Argument.AssertNotNull(diskId, nameof(diskId)); + Argument.AssertNotNull(diskFileFormat, nameof(diskFileFormat)); + + DiskId = diskId; + DiskSizeGB = diskSizeGB; + DiskFileFormat = diskFileFormat; + IsOSDisk = isOSDisk; + } + + /// Initializes a new instance of . + /// Gets or sets the disk Id. + /// Gets or sets the target storage account ARM Id. + /// Gets or sets a value indicating whether dynamic sizing is enabled on the virtual hard disk. + /// Gets or sets the disk size in GB. + /// Gets or sets the type of the virtual hard disk, vhd or vhdx. + /// Gets or sets a value indicating whether disk is os disk. + /// Gets or sets a value of disk block size. + /// Gets or sets a value of disk logical sector size. + /// Gets or sets a value of disk physical sector size. + /// Gets or sets a value of disk identifier. + /// Disk controller. + /// Keeps track of any properties unknown to the library. + internal HyperVToAzStackHciDiskInput(string diskId, ResourceIdentifier storageContainerId, bool? isDynamic, long diskSizeGB, string diskFileFormat, bool isOSDisk, long? diskBlockSize, long? diskLogicalSectorSize, long? diskPhysicalSectorSize, string diskIdentifier, DataReplicationDiskControllerInputs diskController, IDictionary serializedAdditionalRawData) + { + DiskId = diskId; + StorageContainerId = storageContainerId; + IsDynamic = isDynamic; + DiskSizeGB = diskSizeGB; + DiskFileFormat = diskFileFormat; + IsOSDisk = isOSDisk; + DiskBlockSize = diskBlockSize; + DiskLogicalSectorSize = diskLogicalSectorSize; + DiskPhysicalSectorSize = diskPhysicalSectorSize; + DiskIdentifier = diskIdentifier; + DiskController = diskController; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal HyperVToAzStackHciDiskInput() + { + } + + /// Gets or sets the disk Id. + public string DiskId { get; set; } + /// Gets or sets the target storage account ARM Id. + public ResourceIdentifier StorageContainerId { get; set; } + /// Gets or sets a value indicating whether dynamic sizing is enabled on the virtual hard disk. + public bool? IsDynamic { get; set; } + /// Gets or sets the disk size in GB. + public long DiskSizeGB { get; set; } + /// Gets or sets the type of the virtual hard disk, vhd or vhdx. + public string DiskFileFormat { get; set; } + /// Gets or sets a value indicating whether disk is os disk. + public bool IsOSDisk { get; set; } + /// Gets or sets a value of disk block size. + public long? DiskBlockSize { get; set; } + /// Gets or sets a value of disk logical sector size. + public long? DiskLogicalSectorSize { get; set; } + /// Gets or sets a value of disk physical sector size. + public long? DiskPhysicalSectorSize { get; set; } + /// Gets or sets a value of disk identifier. + public string DiskIdentifier { get; set; } + /// Disk controller. + public DataReplicationDiskControllerInputs DiskController { get; set; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciEventCustomProperties.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciEventCustomProperties.Serialization.cs new file mode 100644 index 000000000000..fd99da42b724 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciEventCustomProperties.Serialization.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class HyperVToAzStackHciEventCustomProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(HyperVToAzStackHciEventCustomProperties)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (options.Format != "W" && Optional.IsDefined(EventSourceFriendlyName)) + { + writer.WritePropertyName("eventSourceFriendlyName"u8); + writer.WriteStringValue(EventSourceFriendlyName); + } + if (options.Format != "W" && Optional.IsDefined(ProtectedItemFriendlyName)) + { + writer.WritePropertyName("protectedItemFriendlyName"u8); + writer.WriteStringValue(ProtectedItemFriendlyName); + } + if (options.Format != "W" && Optional.IsDefined(SourceApplianceName)) + { + writer.WritePropertyName("sourceApplianceName"u8); + writer.WriteStringValue(SourceApplianceName); + } + if (options.Format != "W" && Optional.IsDefined(TargetApplianceName)) + { + writer.WritePropertyName("targetApplianceName"u8); + writer.WriteStringValue(TargetApplianceName); + } + if (options.Format != "W" && Optional.IsDefined(ServerType)) + { + writer.WritePropertyName("serverType"u8); + writer.WriteStringValue(ServerType); + } + } + + HyperVToAzStackHciEventCustomProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(HyperVToAzStackHciEventCustomProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeHyperVToAzStackHciEventCustomProperties(document.RootElement, options); + } + + internal static HyperVToAzStackHciEventCustomProperties DeserializeHyperVToAzStackHciEventCustomProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string eventSourceFriendlyName = default; + string protectedItemFriendlyName = default; + string sourceApplianceName = default; + string targetApplianceName = default; + string serverType = default; + string instanceType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("eventSourceFriendlyName"u8)) + { + eventSourceFriendlyName = property.Value.GetString(); + continue; + } + if (property.NameEquals("protectedItemFriendlyName"u8)) + { + protectedItemFriendlyName = property.Value.GetString(); + continue; + } + if (property.NameEquals("sourceApplianceName"u8)) + { + sourceApplianceName = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetApplianceName"u8)) + { + targetApplianceName = property.Value.GetString(); + continue; + } + if (property.NameEquals("serverType"u8)) + { + serverType = property.Value.GetString(); + continue; + } + if (property.NameEquals("instanceType"u8)) + { + instanceType = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new HyperVToAzStackHciEventCustomProperties( + instanceType, + serializedAdditionalRawData, + eventSourceFriendlyName, + protectedItemFriendlyName, + sourceApplianceName, + targetApplianceName, + serverType); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(HyperVToAzStackHciEventCustomProperties)} does not support writing '{options.Format}' format."); + } + } + + HyperVToAzStackHciEventCustomProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeHyperVToAzStackHciEventCustomProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(HyperVToAzStackHciEventCustomProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciEventCustomProperties.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciEventCustomProperties.cs new file mode 100644 index 000000000000..4d1862609196 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciEventCustomProperties.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.RecoveryServicesDataReplication.Models +{ + /// HyperV to AzStackHCI event model custom properties. This class provides provider specific details for events of type DataContract.HealthEvents.HealthEventType.ProtectedItemHealth and DataContract.HealthEvents.HealthEventType.AgentHealth. + public partial class HyperVToAzStackHciEventCustomProperties : DataReplicationEventCustomProperties + { + /// Initializes a new instance of . + internal HyperVToAzStackHciEventCustomProperties() + { + InstanceType = "HyperVToAzStackHCI"; + } + + /// Initializes a new instance of . + /// Discriminator property for DataReplicationEventCustomProperties. + /// Keeps track of any properties unknown to the library. + /// Gets or sets the friendly name of the source which has raised this health event. + /// Gets or sets the protected item friendly name. + /// Gets or sets the source appliance name. + /// Gets or sets the source target name. + /// Gets or sets the server type. + internal HyperVToAzStackHciEventCustomProperties(string instanceType, IDictionary serializedAdditionalRawData, string eventSourceFriendlyName, string protectedItemFriendlyName, string sourceApplianceName, string targetApplianceName, string serverType) : base(instanceType, serializedAdditionalRawData) + { + EventSourceFriendlyName = eventSourceFriendlyName; + ProtectedItemFriendlyName = protectedItemFriendlyName; + SourceApplianceName = sourceApplianceName; + TargetApplianceName = targetApplianceName; + ServerType = serverType; + InstanceType = instanceType ?? "HyperVToAzStackHCI"; + } + + /// Gets or sets the friendly name of the source which has raised this health event. + public string EventSourceFriendlyName { get; } + /// Gets or sets the protected item friendly name. + public string ProtectedItemFriendlyName { get; } + /// Gets or sets the source appliance name. + public string SourceApplianceName { get; } + /// Gets or sets the source target name. + public string TargetApplianceName { get; } + /// Gets or sets the server type. + public string ServerType { get; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciNicInput.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciNicInput.Serialization.cs new file mode 100644 index 000000000000..4af130172358 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciNicInput.Serialization.cs @@ -0,0 +1,205 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class HyperVToAzStackHciNicInput : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(HyperVToAzStackHciNicInput)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("nicId"u8); + writer.WriteStringValue(NicId); + if (options.Format != "W" && Optional.IsDefined(NetworkName)) + { + writer.WritePropertyName("networkName"u8); + writer.WriteStringValue(NetworkName); + } + if (Optional.IsDefined(TargetNetworkId)) + { + writer.WritePropertyName("targetNetworkId"u8); + writer.WriteStringValue(TargetNetworkId); + } + if (Optional.IsDefined(TestNetworkId)) + { + writer.WritePropertyName("testNetworkId"u8); + writer.WriteStringValue(TestNetworkId); + } + writer.WritePropertyName("selectionTypeForFailover"u8); + writer.WriteStringValue(SelectionTypeForFailover.ToString()); + if (Optional.IsDefined(IsStaticIPMigrationEnabled)) + { + writer.WritePropertyName("isStaticIpMigrationEnabled"u8); + writer.WriteBooleanValue(IsStaticIPMigrationEnabled.Value); + } + if (Optional.IsDefined(IsMacMigrationEnabled)) + { + writer.WritePropertyName("isMacMigrationEnabled"u8); + writer.WriteBooleanValue(IsMacMigrationEnabled.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + HyperVToAzStackHciNicInput IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(HyperVToAzStackHciNicInput)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeHyperVToAzStackHciNicInput(document.RootElement, options); + } + + internal static HyperVToAzStackHciNicInput DeserializeHyperVToAzStackHciNicInput(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string nicId = default; + string networkName = default; + string targetNetworkId = default; + string testNetworkId = default; + VmNicSelection selectionTypeForFailover = default; + bool? isStaticIPMigrationEnabled = default; + bool? isMacMigrationEnabled = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("nicId"u8)) + { + nicId = property.Value.GetString(); + continue; + } + if (property.NameEquals("networkName"u8)) + { + networkName = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetNetworkId"u8)) + { + targetNetworkId = property.Value.GetString(); + continue; + } + if (property.NameEquals("testNetworkId"u8)) + { + testNetworkId = property.Value.GetString(); + continue; + } + if (property.NameEquals("selectionTypeForFailover"u8)) + { + selectionTypeForFailover = new VmNicSelection(property.Value.GetString()); + continue; + } + if (property.NameEquals("isStaticIpMigrationEnabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isStaticIPMigrationEnabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("isMacMigrationEnabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isMacMigrationEnabled = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new HyperVToAzStackHciNicInput( + nicId, + networkName, + targetNetworkId, + testNetworkId, + selectionTypeForFailover, + isStaticIPMigrationEnabled, + isMacMigrationEnabled, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(HyperVToAzStackHciNicInput)} does not support writing '{options.Format}' format."); + } + } + + HyperVToAzStackHciNicInput IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeHyperVToAzStackHciNicInput(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(HyperVToAzStackHciNicInput)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciNicInput.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciNicInput.cs new file mode 100644 index 000000000000..d136c4f96124 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciNicInput.cs @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// HyperVToAzStackHCI NIC properties. + public partial class HyperVToAzStackHciNicInput + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Gets or sets the NIC Id. + /// Gets or sets the selection type of the NIC. + /// is null. + public HyperVToAzStackHciNicInput(string nicId, VmNicSelection selectionTypeForFailover) + { + Argument.AssertNotNull(nicId, nameof(nicId)); + + NicId = nicId; + SelectionTypeForFailover = selectionTypeForFailover; + } + + /// Initializes a new instance of . + /// Gets or sets the NIC Id. + /// Gets or sets the network name. + /// Gets or sets the target network Id within AzStackHCI Cluster. + /// Gets or sets the target test network Id within AzStackHCI Cluster. + /// Gets or sets the selection type of the NIC. + /// Gets or sets a value indicating whether static ip migration is enabled. + /// Gets or sets a value indicating whether mac address migration is enabled. + /// Keeps track of any properties unknown to the library. + internal HyperVToAzStackHciNicInput(string nicId, string networkName, string targetNetworkId, string testNetworkId, VmNicSelection selectionTypeForFailover, bool? isStaticIPMigrationEnabled, bool? isMacMigrationEnabled, IDictionary serializedAdditionalRawData) + { + NicId = nicId; + NetworkName = networkName; + TargetNetworkId = targetNetworkId; + TestNetworkId = testNetworkId; + SelectionTypeForFailover = selectionTypeForFailover; + IsStaticIPMigrationEnabled = isStaticIPMigrationEnabled; + IsMacMigrationEnabled = isMacMigrationEnabled; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal HyperVToAzStackHciNicInput() + { + } + + /// Gets or sets the NIC Id. + public string NicId { get; set; } + /// Gets or sets the network name. + public string NetworkName { get; } + /// Gets or sets the target network Id within AzStackHCI Cluster. + public string TargetNetworkId { get; set; } + /// Gets or sets the target test network Id within AzStackHCI Cluster. + public string TestNetworkId { get; set; } + /// Gets or sets the selection type of the NIC. + public VmNicSelection SelectionTypeForFailover { get; set; } + /// Gets or sets a value indicating whether static ip migration is enabled. + public bool? IsStaticIPMigrationEnabled { get; set; } + /// Gets or sets a value indicating whether mac address migration is enabled. + public bool? IsMacMigrationEnabled { get; set; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciPlannedFailoverCustomProperties.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciPlannedFailoverCustomProperties.Serialization.cs new file mode 100644 index 000000000000..f6284ae98cea --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciPlannedFailoverCustomProperties.Serialization.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class HyperVToAzStackHciPlannedFailoverCustomProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(HyperVToAzStackHciPlannedFailoverCustomProperties)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("shutdownSourceVM"u8); + writer.WriteBooleanValue(ShutdownSourceVm); + } + + HyperVToAzStackHciPlannedFailoverCustomProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(HyperVToAzStackHciPlannedFailoverCustomProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeHyperVToAzStackHciPlannedFailoverCustomProperties(document.RootElement, options); + } + + internal static HyperVToAzStackHciPlannedFailoverCustomProperties DeserializeHyperVToAzStackHciPlannedFailoverCustomProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool shutdownSourceVm = default; + string instanceType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("shutdownSourceVM"u8)) + { + shutdownSourceVm = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("instanceType"u8)) + { + instanceType = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new HyperVToAzStackHciPlannedFailoverCustomProperties(instanceType, serializedAdditionalRawData, shutdownSourceVm); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(HyperVToAzStackHciPlannedFailoverCustomProperties)} does not support writing '{options.Format}' format."); + } + } + + HyperVToAzStackHciPlannedFailoverCustomProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeHyperVToAzStackHciPlannedFailoverCustomProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(HyperVToAzStackHciPlannedFailoverCustomProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciPlannedFailoverCustomProperties.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciPlannedFailoverCustomProperties.cs new file mode 100644 index 000000000000..c3ab7b48e6b1 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciPlannedFailoverCustomProperties.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; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// HyperV to AzStackHCI planned failover model custom properties. + public partial class HyperVToAzStackHciPlannedFailoverCustomProperties : PlannedFailoverCustomProperties + { + /// Initializes a new instance of . + /// Gets or sets a value indicating whether VM needs to be shut down. + public HyperVToAzStackHciPlannedFailoverCustomProperties(bool shutdownSourceVm) + { + ShutdownSourceVm = shutdownSourceVm; + InstanceType = "HyperVToAzStackHCI"; + } + + /// Initializes a new instance of . + /// Discriminator property for PlannedFailoverCustomProperties. + /// Keeps track of any properties unknown to the library. + /// Gets or sets a value indicating whether VM needs to be shut down. + internal HyperVToAzStackHciPlannedFailoverCustomProperties(string instanceType, IDictionary serializedAdditionalRawData, bool shutdownSourceVm) : base(instanceType, serializedAdditionalRawData) + { + ShutdownSourceVm = shutdownSourceVm; + InstanceType = instanceType ?? "HyperVToAzStackHCI"; + } + + /// Initializes a new instance of for deserialization. + internal HyperVToAzStackHciPlannedFailoverCustomProperties() + { + } + + /// Gets or sets a value indicating whether VM needs to be shut down. + public bool ShutdownSourceVm { get; set; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciPolicyCustomProperties.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciPolicyCustomProperties.Serialization.cs new file mode 100644 index 000000000000..8e870c6bd5ac --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciPolicyCustomProperties.Serialization.cs @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class HyperVToAzStackHciPolicyCustomProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(HyperVToAzStackHciPolicyCustomProperties)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("recoveryPointHistoryInMinutes"u8); + writer.WriteNumberValue(RecoveryPointHistoryInMinutes); + writer.WritePropertyName("crashConsistentFrequencyInMinutes"u8); + writer.WriteNumberValue(CrashConsistentFrequencyInMinutes); + writer.WritePropertyName("appConsistentFrequencyInMinutes"u8); + writer.WriteNumberValue(AppConsistentFrequencyInMinutes); + } + + HyperVToAzStackHciPolicyCustomProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(HyperVToAzStackHciPolicyCustomProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeHyperVToAzStackHciPolicyCustomProperties(document.RootElement, options); + } + + internal static HyperVToAzStackHciPolicyCustomProperties DeserializeHyperVToAzStackHciPolicyCustomProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int recoveryPointHistoryInMinutes = default; + int crashConsistentFrequencyInMinutes = default; + int appConsistentFrequencyInMinutes = default; + string instanceType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("recoveryPointHistoryInMinutes"u8)) + { + recoveryPointHistoryInMinutes = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("crashConsistentFrequencyInMinutes"u8)) + { + crashConsistentFrequencyInMinutes = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("appConsistentFrequencyInMinutes"u8)) + { + appConsistentFrequencyInMinutes = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("instanceType"u8)) + { + instanceType = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new HyperVToAzStackHciPolicyCustomProperties(instanceType, serializedAdditionalRawData, recoveryPointHistoryInMinutes, crashConsistentFrequencyInMinutes, appConsistentFrequencyInMinutes); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(HyperVToAzStackHciPolicyCustomProperties)} does not support writing '{options.Format}' format."); + } + } + + HyperVToAzStackHciPolicyCustomProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeHyperVToAzStackHciPolicyCustomProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(HyperVToAzStackHciPolicyCustomProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciPolicyCustomProperties.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciPolicyCustomProperties.cs new file mode 100644 index 000000000000..8b37d53437ed --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciPolicyCustomProperties.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// HyperV To AzStackHCI Policy model custom properties. + public partial class HyperVToAzStackHciPolicyCustomProperties : DataReplicationPolicyCustomProperties + { + /// Initializes a new instance of . + /// Gets or sets the duration in minutes until which the recovery points need to be stored. + /// Gets or sets the crash consistent snapshot frequency (in minutes). + /// Gets or sets the app consistent snapshot frequency (in minutes). + public HyperVToAzStackHciPolicyCustomProperties(int recoveryPointHistoryInMinutes, int crashConsistentFrequencyInMinutes, int appConsistentFrequencyInMinutes) + { + RecoveryPointHistoryInMinutes = recoveryPointHistoryInMinutes; + CrashConsistentFrequencyInMinutes = crashConsistentFrequencyInMinutes; + AppConsistentFrequencyInMinutes = appConsistentFrequencyInMinutes; + InstanceType = "HyperVToAzStackHCI"; + } + + /// Initializes a new instance of . + /// Discriminator property for DataReplicationPolicyCustomProperties. + /// Keeps track of any properties unknown to the library. + /// Gets or sets the duration in minutes until which the recovery points need to be stored. + /// Gets or sets the crash consistent snapshot frequency (in minutes). + /// Gets or sets the app consistent snapshot frequency (in minutes). + internal HyperVToAzStackHciPolicyCustomProperties(string instanceType, IDictionary serializedAdditionalRawData, int recoveryPointHistoryInMinutes, int crashConsistentFrequencyInMinutes, int appConsistentFrequencyInMinutes) : base(instanceType, serializedAdditionalRawData) + { + RecoveryPointHistoryInMinutes = recoveryPointHistoryInMinutes; + CrashConsistentFrequencyInMinutes = crashConsistentFrequencyInMinutes; + AppConsistentFrequencyInMinutes = appConsistentFrequencyInMinutes; + InstanceType = instanceType ?? "HyperVToAzStackHCI"; + } + + /// Initializes a new instance of for deserialization. + internal HyperVToAzStackHciPolicyCustomProperties() + { + } + + /// Gets or sets the duration in minutes until which the recovery points need to be stored. + public int RecoveryPointHistoryInMinutes { get; set; } + /// Gets or sets the crash consistent snapshot frequency (in minutes). + public int CrashConsistentFrequencyInMinutes { get; set; } + /// Gets or sets the app consistent snapshot frequency (in minutes). + public int AppConsistentFrequencyInMinutes { get; set; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciProtectedDiskProperties.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciProtectedDiskProperties.Serialization.cs new file mode 100644 index 000000000000..e0f31501d4b4 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciProtectedDiskProperties.Serialization.cs @@ -0,0 +1,315 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class HyperVToAzStackHciProtectedDiskProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(HyperVToAzStackHciProtectedDiskProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(StorageContainerId)) + { + writer.WritePropertyName("storageContainerId"u8); + writer.WriteStringValue(StorageContainerId); + } + if (options.Format != "W" && Optional.IsDefined(StorageContainerLocalPath)) + { + writer.WritePropertyName("storageContainerLocalPath"u8); + writer.WriteStringValue(StorageContainerLocalPath); + } + if (options.Format != "W" && Optional.IsDefined(SourceDiskId)) + { + writer.WritePropertyName("sourceDiskId"u8); + writer.WriteStringValue(SourceDiskId); + } + if (options.Format != "W" && Optional.IsDefined(SourceDiskName)) + { + writer.WritePropertyName("sourceDiskName"u8); + writer.WriteStringValue(SourceDiskName); + } + if (options.Format != "W" && Optional.IsDefined(SeedDiskName)) + { + writer.WritePropertyName("seedDiskName"u8); + writer.WriteStringValue(SeedDiskName); + } + if (options.Format != "W" && Optional.IsDefined(TestMigrateDiskName)) + { + writer.WritePropertyName("testMigrateDiskName"u8); + writer.WriteStringValue(TestMigrateDiskName); + } + if (options.Format != "W" && Optional.IsDefined(MigrateDiskName)) + { + writer.WritePropertyName("migrateDiskName"u8); + writer.WriteStringValue(MigrateDiskName); + } + if (options.Format != "W" && Optional.IsDefined(IsOSDisk)) + { + writer.WritePropertyName("isOsDisk"u8); + writer.WriteBooleanValue(IsOSDisk.Value); + } + if (options.Format != "W" && Optional.IsDefined(CapacityInBytes)) + { + writer.WritePropertyName("capacityInBytes"u8); + writer.WriteNumberValue(CapacityInBytes.Value); + } + if (options.Format != "W" && Optional.IsDefined(IsDynamic)) + { + writer.WritePropertyName("isDynamic"u8); + writer.WriteBooleanValue(IsDynamic.Value); + } + if (options.Format != "W" && Optional.IsDefined(DiskType)) + { + writer.WritePropertyName("diskType"u8); + writer.WriteStringValue(DiskType); + } + if (options.Format != "W" && Optional.IsDefined(DiskBlockSize)) + { + writer.WritePropertyName("diskBlockSize"u8); + writer.WriteNumberValue(DiskBlockSize.Value); + } + if (options.Format != "W" && Optional.IsDefined(DiskLogicalSectorSize)) + { + writer.WritePropertyName("diskLogicalSectorSize"u8); + writer.WriteNumberValue(DiskLogicalSectorSize.Value); + } + if (options.Format != "W" && Optional.IsDefined(DiskPhysicalSectorSize)) + { + writer.WritePropertyName("diskPhysicalSectorSize"u8); + writer.WriteNumberValue(DiskPhysicalSectorSize.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + HyperVToAzStackHciProtectedDiskProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(HyperVToAzStackHciProtectedDiskProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeHyperVToAzStackHciProtectedDiskProperties(document.RootElement, options); + } + + internal static HyperVToAzStackHciProtectedDiskProperties DeserializeHyperVToAzStackHciProtectedDiskProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier storageContainerId = default; + string storageContainerLocalPath = default; + string sourceDiskId = default; + string sourceDiskName = default; + string seedDiskName = default; + string testMigrateDiskName = default; + string migrateDiskName = default; + bool? isOSDisk = default; + long? capacityInBytes = default; + bool? isDynamic = default; + string diskType = default; + long? diskBlockSize = default; + long? diskLogicalSectorSize = default; + long? diskPhysicalSectorSize = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("storageContainerId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + storageContainerId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("storageContainerLocalPath"u8)) + { + storageContainerLocalPath = property.Value.GetString(); + continue; + } + if (property.NameEquals("sourceDiskId"u8)) + { + sourceDiskId = property.Value.GetString(); + continue; + } + if (property.NameEquals("sourceDiskName"u8)) + { + sourceDiskName = property.Value.GetString(); + continue; + } + if (property.NameEquals("seedDiskName"u8)) + { + seedDiskName = property.Value.GetString(); + continue; + } + if (property.NameEquals("testMigrateDiskName"u8)) + { + testMigrateDiskName = property.Value.GetString(); + continue; + } + if (property.NameEquals("migrateDiskName"u8)) + { + migrateDiskName = property.Value.GetString(); + continue; + } + if (property.NameEquals("isOsDisk"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isOSDisk = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("capacityInBytes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + capacityInBytes = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("isDynamic"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isDynamic = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("diskType"u8)) + { + diskType = property.Value.GetString(); + continue; + } + if (property.NameEquals("diskBlockSize"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + diskBlockSize = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("diskLogicalSectorSize"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + diskLogicalSectorSize = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("diskPhysicalSectorSize"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + diskPhysicalSectorSize = property.Value.GetInt64(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new HyperVToAzStackHciProtectedDiskProperties( + storageContainerId, + storageContainerLocalPath, + sourceDiskId, + sourceDiskName, + seedDiskName, + testMigrateDiskName, + migrateDiskName, + isOSDisk, + capacityInBytes, + isDynamic, + diskType, + diskBlockSize, + diskLogicalSectorSize, + diskPhysicalSectorSize, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(HyperVToAzStackHciProtectedDiskProperties)} does not support writing '{options.Format}' format."); + } + } + + HyperVToAzStackHciProtectedDiskProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeHyperVToAzStackHciProtectedDiskProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(HyperVToAzStackHciProtectedDiskProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciProtectedDiskProperties.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciProtectedDiskProperties.cs new file mode 100644 index 000000000000..acc4cc016afa --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciProtectedDiskProperties.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// HyperVToAzStackHCI protected disk properties. + public partial class HyperVToAzStackHciProtectedDiskProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal HyperVToAzStackHciProtectedDiskProperties() + { + } + + /// Initializes a new instance of . + /// Gets or sets the ARM Id of the storage container. + /// Gets or sets the local path of the storage container. + /// Gets or sets the source disk Id. + /// Gets or sets the source disk Name. + /// Gets or sets the seed disk name. + /// Gets or sets the test failover clone disk. + /// Gets or sets the failover clone disk. + /// Gets or sets a value indicating whether the disk is the OS disk. + /// Gets or sets the disk capacity in bytes. + /// Gets or sets a value indicating whether dynamic sizing is enabled on the virtual hard disk. + /// Gets or sets the disk type. + /// Gets or sets a value of disk block size. + /// Gets or sets a value of disk logical sector size. + /// Gets or sets a value of disk physical sector size. + /// Keeps track of any properties unknown to the library. + internal HyperVToAzStackHciProtectedDiskProperties(ResourceIdentifier storageContainerId, string storageContainerLocalPath, string sourceDiskId, string sourceDiskName, string seedDiskName, string testMigrateDiskName, string migrateDiskName, bool? isOSDisk, long? capacityInBytes, bool? isDynamic, string diskType, long? diskBlockSize, long? diskLogicalSectorSize, long? diskPhysicalSectorSize, IDictionary serializedAdditionalRawData) + { + StorageContainerId = storageContainerId; + StorageContainerLocalPath = storageContainerLocalPath; + SourceDiskId = sourceDiskId; + SourceDiskName = sourceDiskName; + SeedDiskName = seedDiskName; + TestMigrateDiskName = testMigrateDiskName; + MigrateDiskName = migrateDiskName; + IsOSDisk = isOSDisk; + CapacityInBytes = capacityInBytes; + IsDynamic = isDynamic; + DiskType = diskType; + DiskBlockSize = diskBlockSize; + DiskLogicalSectorSize = diskLogicalSectorSize; + DiskPhysicalSectorSize = diskPhysicalSectorSize; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets or sets the ARM Id of the storage container. + public ResourceIdentifier StorageContainerId { get; } + /// Gets or sets the local path of the storage container. + public string StorageContainerLocalPath { get; } + /// Gets or sets the source disk Id. + public string SourceDiskId { get; } + /// Gets or sets the source disk Name. + public string SourceDiskName { get; } + /// Gets or sets the seed disk name. + public string SeedDiskName { get; } + /// Gets or sets the test failover clone disk. + public string TestMigrateDiskName { get; } + /// Gets or sets the failover clone disk. + public string MigrateDiskName { get; } + /// Gets or sets a value indicating whether the disk is the OS disk. + public bool? IsOSDisk { get; } + /// Gets or sets the disk capacity in bytes. + public long? CapacityInBytes { get; } + /// Gets or sets a value indicating whether dynamic sizing is enabled on the virtual hard disk. + public bool? IsDynamic { get; } + /// Gets or sets the disk type. + public string DiskType { get; } + /// Gets or sets a value of disk block size. + public long? DiskBlockSize { get; } + /// Gets or sets a value of disk logical sector size. + public long? DiskLogicalSectorSize { get; } + /// Gets or sets a value of disk physical sector size. + public long? DiskPhysicalSectorSize { get; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciProtectedItemCustomProperties.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciProtectedItemCustomProperties.Serialization.cs new file mode 100644 index 000000000000..69d7c420d97a --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciProtectedItemCustomProperties.Serialization.cs @@ -0,0 +1,636 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class HyperVToAzStackHciProtectedItemCustomProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(HyperVToAzStackHciProtectedItemCustomProperties)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (options.Format != "W" && Optional.IsDefined(ActiveLocation)) + { + writer.WritePropertyName("activeLocation"u8); + writer.WriteStringValue(ActiveLocation.Value.ToString()); + } + writer.WritePropertyName("targetHciClusterId"u8); + writer.WriteStringValue(TargetHciClusterId); + writer.WritePropertyName("targetArcClusterCustomLocationId"u8); + writer.WriteStringValue(TargetArcClusterCustomLocationId); + if (options.Format != "W" && Optional.IsDefined(TargetAzStackHciClusterName)) + { + writer.WritePropertyName("targetAzStackHciClusterName"u8); + writer.WriteStringValue(TargetAzStackHciClusterName); + } + writer.WritePropertyName("fabricDiscoveryMachineId"u8); + writer.WriteStringValue(FabricDiscoveryMachineId); + writer.WritePropertyName("disksToInclude"u8); + writer.WriteStartArray(); + foreach (var item in DisksToInclude) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + writer.WritePropertyName("nicsToInclude"u8); + writer.WriteStartArray(); + foreach (var item in NicsToInclude) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (options.Format != "W" && Optional.IsDefined(SourceVmName)) + { + writer.WritePropertyName("sourceVmName"u8); + writer.WriteStringValue(SourceVmName); + } + if (options.Format != "W" && Optional.IsDefined(SourceCpuCores)) + { + writer.WritePropertyName("sourceCpuCores"u8); + writer.WriteNumberValue(SourceCpuCores.Value); + } + if (options.Format != "W" && Optional.IsDefined(SourceMemoryInMegaBytes)) + { + writer.WritePropertyName("sourceMemoryInMegaBytes"u8); + writer.WriteNumberValue(SourceMemoryInMegaBytes.Value); + } + if (Optional.IsDefined(TargetVmName)) + { + writer.WritePropertyName("targetVmName"u8); + writer.WriteStringValue(TargetVmName); + } + writer.WritePropertyName("targetResourceGroupId"u8); + writer.WriteStringValue(TargetResourceGroupId); + writer.WritePropertyName("storageContainerId"u8); + writer.WriteStringValue(StorageContainerId); + writer.WritePropertyName("hyperVGeneration"u8); + writer.WriteStringValue(HyperVGeneration); + if (Optional.IsDefined(TargetNetworkId)) + { + writer.WritePropertyName("targetNetworkId"u8); + writer.WriteStringValue(TargetNetworkId); + } + if (Optional.IsDefined(TestNetworkId)) + { + writer.WritePropertyName("testNetworkId"u8); + writer.WriteStringValue(TestNetworkId); + } + if (Optional.IsDefined(TargetCpuCores)) + { + writer.WritePropertyName("targetCpuCores"u8); + writer.WriteNumberValue(TargetCpuCores.Value); + } + if (Optional.IsDefined(IsDynamicRam)) + { + writer.WritePropertyName("isDynamicRam"u8); + writer.WriteBooleanValue(IsDynamicRam.Value); + } + if (Optional.IsDefined(DynamicMemoryConfig)) + { + writer.WritePropertyName("dynamicMemoryConfig"u8); + writer.WriteObjectValue(DynamicMemoryConfig, options); + } + if (Optional.IsDefined(TargetMemoryInMegaBytes)) + { + writer.WritePropertyName("targetMemoryInMegaBytes"u8); + writer.WriteNumberValue(TargetMemoryInMegaBytes.Value); + } + writer.WritePropertyName("runAsAccountId"u8); + writer.WriteStringValue(RunAsAccountId); + writer.WritePropertyName("sourceFabricAgentName"u8); + writer.WriteStringValue(SourceFabricAgentName); + writer.WritePropertyName("targetFabricAgentName"u8); + writer.WriteStringValue(TargetFabricAgentName); + if (options.Format != "W" && Optional.IsDefined(SourceApplianceName)) + { + writer.WritePropertyName("sourceApplianceName"u8); + writer.WriteStringValue(SourceApplianceName); + } + if (options.Format != "W" && Optional.IsDefined(TargetApplianceName)) + { + writer.WritePropertyName("targetApplianceName"u8); + writer.WriteStringValue(TargetApplianceName); + } + if (options.Format != "W" && Optional.IsDefined(OSType)) + { + writer.WritePropertyName("osType"u8); + writer.WriteStringValue(OSType); + } + if (options.Format != "W" && Optional.IsDefined(OSName)) + { + writer.WritePropertyName("osName"u8); + writer.WriteStringValue(OSName); + } + if (options.Format != "W" && Optional.IsDefined(FirmwareType)) + { + writer.WritePropertyName("firmwareType"u8); + writer.WriteStringValue(FirmwareType); + } + if (options.Format != "W" && Optional.IsDefined(TargetLocation)) + { + writer.WritePropertyName("targetLocation"u8); + writer.WriteStringValue(TargetLocation); + } + writer.WritePropertyName("customLocationRegion"u8); + writer.WriteStringValue(CustomLocationRegion); + if (options.Format != "W" && Optional.IsDefined(FailoverRecoveryPointId)) + { + writer.WritePropertyName("failoverRecoveryPointId"u8); + writer.WriteStringValue(FailoverRecoveryPointId); + } + if (options.Format != "W" && Optional.IsDefined(LastRecoveryPointReceivedOn)) + { + writer.WritePropertyName("lastRecoveryPointReceived"u8); + writer.WriteStringValue(LastRecoveryPointReceivedOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(LastRecoveryPointId)) + { + writer.WritePropertyName("lastRecoveryPointId"u8); + writer.WriteStringValue(LastRecoveryPointId); + } + if (options.Format != "W" && Optional.IsDefined(InitialReplicationProgressPercentage)) + { + writer.WritePropertyName("initialReplicationProgressPercentage"u8); + writer.WriteNumberValue(InitialReplicationProgressPercentage.Value); + } + if (options.Format != "W" && Optional.IsDefined(ResyncProgressPercentage)) + { + writer.WritePropertyName("resyncProgressPercentage"u8); + writer.WriteNumberValue(ResyncProgressPercentage.Value); + } + if (options.Format != "W" && Optional.IsCollectionDefined(ProtectedDisks)) + { + writer.WritePropertyName("protectedDisks"u8); + writer.WriteStartArray(); + foreach (var item in ProtectedDisks) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsCollectionDefined(ProtectedNics)) + { + writer.WritePropertyName("protectedNics"u8); + writer.WriteStartArray(); + foreach (var item in ProtectedNics) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(TargetVmBiosId)) + { + writer.WritePropertyName("targetVmBiosId"u8); + writer.WriteStringValue(TargetVmBiosId); + } + if (options.Format != "W" && Optional.IsDefined(LastReplicationUpdateOn)) + { + writer.WritePropertyName("lastReplicationUpdateTime"u8); + writer.WriteStringValue(LastReplicationUpdateOn.Value, "O"); + } + } + + HyperVToAzStackHciProtectedItemCustomProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(HyperVToAzStackHciProtectedItemCustomProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeHyperVToAzStackHciProtectedItemCustomProperties(document.RootElement, options); + } + + internal static HyperVToAzStackHciProtectedItemCustomProperties DeserializeHyperVToAzStackHciProtectedItemCustomProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ProtectedItemActiveLocation? activeLocation = default; + ResourceIdentifier targetHciClusterId = default; + ResourceIdentifier targetArcClusterCustomLocationId = default; + string targetAzStackHciClusterName = default; + ResourceIdentifier fabricDiscoveryMachineId = default; + IList disksToInclude = default; + IList nicsToInclude = default; + string sourceVmName = default; + int? sourceCpuCores = default; + double? sourceMemoryInMegaBytes = default; + string targetVmName = default; + ResourceIdentifier targetResourceGroupId = default; + ResourceIdentifier storageContainerId = default; + string hyperVGeneration = default; + string targetNetworkId = default; + string testNetworkId = default; + int? targetCpuCores = default; + bool? isDynamicRam = default; + ProtectedItemDynamicMemoryConfig dynamicMemoryConfig = default; + int? targetMemoryInMegaBytes = default; + string runAsAccountId = default; + string sourceFabricAgentName = default; + string targetFabricAgentName = default; + string sourceApplianceName = default; + string targetApplianceName = default; + string osType = default; + string osName = default; + string firmwareType = default; + string targetLocation = default; + string customLocationRegion = default; + string failoverRecoveryPointId = default; + DateTimeOffset? lastRecoveryPointReceived = default; + string lastRecoveryPointId = default; + int? initialReplicationProgressPercentage = default; + int? resyncProgressPercentage = default; + IReadOnlyList protectedDisks = default; + IReadOnlyList protectedNics = default; + string targetVmBiosId = default; + DateTimeOffset? lastReplicationUpdateTime = default; + string instanceType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("activeLocation"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + activeLocation = new ProtectedItemActiveLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("targetHciClusterId"u8)) + { + targetHciClusterId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("targetArcClusterCustomLocationId"u8)) + { + targetArcClusterCustomLocationId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("targetAzStackHciClusterName"u8)) + { + targetAzStackHciClusterName = property.Value.GetString(); + continue; + } + if (property.NameEquals("fabricDiscoveryMachineId"u8)) + { + fabricDiscoveryMachineId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("disksToInclude"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(HyperVToAzStackHciDiskInput.DeserializeHyperVToAzStackHciDiskInput(item, options)); + } + disksToInclude = array; + continue; + } + if (property.NameEquals("nicsToInclude"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(HyperVToAzStackHciNicInput.DeserializeHyperVToAzStackHciNicInput(item, options)); + } + nicsToInclude = array; + continue; + } + if (property.NameEquals("sourceVmName"u8)) + { + sourceVmName = property.Value.GetString(); + continue; + } + if (property.NameEquals("sourceCpuCores"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sourceCpuCores = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("sourceMemoryInMegaBytes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sourceMemoryInMegaBytes = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("targetVmName"u8)) + { + targetVmName = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetResourceGroupId"u8)) + { + targetResourceGroupId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("storageContainerId"u8)) + { + storageContainerId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("hyperVGeneration"u8)) + { + hyperVGeneration = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetNetworkId"u8)) + { + targetNetworkId = property.Value.GetString(); + continue; + } + if (property.NameEquals("testNetworkId"u8)) + { + testNetworkId = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetCpuCores"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + targetCpuCores = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("isDynamicRam"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isDynamicRam = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("dynamicMemoryConfig"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dynamicMemoryConfig = ProtectedItemDynamicMemoryConfig.DeserializeProtectedItemDynamicMemoryConfig(property.Value, options); + continue; + } + if (property.NameEquals("targetMemoryInMegaBytes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + targetMemoryInMegaBytes = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("runAsAccountId"u8)) + { + runAsAccountId = property.Value.GetString(); + continue; + } + if (property.NameEquals("sourceFabricAgentName"u8)) + { + sourceFabricAgentName = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetFabricAgentName"u8)) + { + targetFabricAgentName = property.Value.GetString(); + continue; + } + if (property.NameEquals("sourceApplianceName"u8)) + { + sourceApplianceName = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetApplianceName"u8)) + { + targetApplianceName = property.Value.GetString(); + continue; + } + if (property.NameEquals("osType"u8)) + { + osType = property.Value.GetString(); + continue; + } + if (property.NameEquals("osName"u8)) + { + osName = property.Value.GetString(); + continue; + } + if (property.NameEquals("firmwareType"u8)) + { + firmwareType = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetLocation"u8)) + { + targetLocation = property.Value.GetString(); + continue; + } + if (property.NameEquals("customLocationRegion"u8)) + { + customLocationRegion = property.Value.GetString(); + continue; + } + if (property.NameEquals("failoverRecoveryPointId"u8)) + { + failoverRecoveryPointId = property.Value.GetString(); + continue; + } + if (property.NameEquals("lastRecoveryPointReceived"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lastRecoveryPointReceived = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastRecoveryPointId"u8)) + { + lastRecoveryPointId = property.Value.GetString(); + continue; + } + if (property.NameEquals("initialReplicationProgressPercentage"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + initialReplicationProgressPercentage = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("resyncProgressPercentage"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resyncProgressPercentage = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("protectedDisks"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(HyperVToAzStackHciProtectedDiskProperties.DeserializeHyperVToAzStackHciProtectedDiskProperties(item, options)); + } + protectedDisks = array; + continue; + } + if (property.NameEquals("protectedNics"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(HyperVToAzStackHciProtectedNicProperties.DeserializeHyperVToAzStackHciProtectedNicProperties(item, options)); + } + protectedNics = array; + continue; + } + if (property.NameEquals("targetVmBiosId"u8)) + { + targetVmBiosId = property.Value.GetString(); + continue; + } + if (property.NameEquals("lastReplicationUpdateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lastReplicationUpdateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("instanceType"u8)) + { + instanceType = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new HyperVToAzStackHciProtectedItemCustomProperties( + instanceType, + serializedAdditionalRawData, + activeLocation, + targetHciClusterId, + targetArcClusterCustomLocationId, + targetAzStackHciClusterName, + fabricDiscoveryMachineId, + disksToInclude, + nicsToInclude, + sourceVmName, + sourceCpuCores, + sourceMemoryInMegaBytes, + targetVmName, + targetResourceGroupId, + storageContainerId, + hyperVGeneration, + targetNetworkId, + testNetworkId, + targetCpuCores, + isDynamicRam, + dynamicMemoryConfig, + targetMemoryInMegaBytes, + runAsAccountId, + sourceFabricAgentName, + targetFabricAgentName, + sourceApplianceName, + targetApplianceName, + osType, + osName, + firmwareType, + targetLocation, + customLocationRegion, + failoverRecoveryPointId, + lastRecoveryPointReceived, + lastRecoveryPointId, + initialReplicationProgressPercentage, + resyncProgressPercentage, + protectedDisks ?? new ChangeTrackingList(), + protectedNics ?? new ChangeTrackingList(), + targetVmBiosId, + lastReplicationUpdateTime); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(HyperVToAzStackHciProtectedItemCustomProperties)} does not support writing '{options.Format}' format."); + } + } + + HyperVToAzStackHciProtectedItemCustomProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeHyperVToAzStackHciProtectedItemCustomProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(HyperVToAzStackHciProtectedItemCustomProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciProtectedItemCustomProperties.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciProtectedItemCustomProperties.cs new file mode 100644 index 000000000000..e8e5d023be87 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciProtectedItemCustomProperties.cs @@ -0,0 +1,234 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// HyperV to AzStackHCI Protected item model custom properties. + public partial class HyperVToAzStackHciProtectedItemCustomProperties : DataReplicationProtectedItemCustomProperties + { + /// Initializes a new instance of . + /// Gets or sets the Target HCI Cluster ARM Id. + /// Gets or sets the Target Arc Cluster Custom Location ARM Id. + /// Gets or sets the ARM Id of the discovered machine. + /// Gets or sets the list of disks to replicate. + /// Gets or sets the list of VM NIC to replicate. + /// Gets or sets the target resource group ARM Id. + /// Gets or sets the target storage container ARM Id. + /// Gets or sets the hypervisor generation of the virtual machine. + /// Gets or sets the Run As account Id. + /// Gets or sets the source fabric agent name. + /// Gets or sets the target fabric agent name. + /// Gets or sets the location of Azure Arc HCI custom location resource. + /// , , , , , , , , , , or is null. + public HyperVToAzStackHciProtectedItemCustomProperties(ResourceIdentifier targetHciClusterId, ResourceIdentifier targetArcClusterCustomLocationId, ResourceIdentifier fabricDiscoveryMachineId, IEnumerable disksToInclude, IEnumerable nicsToInclude, ResourceIdentifier targetResourceGroupId, ResourceIdentifier storageContainerId, string hyperVGeneration, string runAsAccountId, string sourceFabricAgentName, string targetFabricAgentName, string customLocationRegion) + { + Argument.AssertNotNull(targetHciClusterId, nameof(targetHciClusterId)); + Argument.AssertNotNull(targetArcClusterCustomLocationId, nameof(targetArcClusterCustomLocationId)); + Argument.AssertNotNull(fabricDiscoveryMachineId, nameof(fabricDiscoveryMachineId)); + Argument.AssertNotNull(disksToInclude, nameof(disksToInclude)); + Argument.AssertNotNull(nicsToInclude, nameof(nicsToInclude)); + Argument.AssertNotNull(targetResourceGroupId, nameof(targetResourceGroupId)); + Argument.AssertNotNull(storageContainerId, nameof(storageContainerId)); + Argument.AssertNotNull(hyperVGeneration, nameof(hyperVGeneration)); + Argument.AssertNotNull(runAsAccountId, nameof(runAsAccountId)); + Argument.AssertNotNull(sourceFabricAgentName, nameof(sourceFabricAgentName)); + Argument.AssertNotNull(targetFabricAgentName, nameof(targetFabricAgentName)); + Argument.AssertNotNull(customLocationRegion, nameof(customLocationRegion)); + + TargetHciClusterId = targetHciClusterId; + TargetArcClusterCustomLocationId = targetArcClusterCustomLocationId; + FabricDiscoveryMachineId = fabricDiscoveryMachineId; + DisksToInclude = disksToInclude.ToList(); + NicsToInclude = nicsToInclude.ToList(); + TargetResourceGroupId = targetResourceGroupId; + StorageContainerId = storageContainerId; + HyperVGeneration = hyperVGeneration; + RunAsAccountId = runAsAccountId; + SourceFabricAgentName = sourceFabricAgentName; + TargetFabricAgentName = targetFabricAgentName; + CustomLocationRegion = customLocationRegion; + ProtectedDisks = new ChangeTrackingList(); + ProtectedNics = new ChangeTrackingList(); + InstanceType = "HyperVToAzStackHCI"; + } + + /// Initializes a new instance of . + /// Discriminator property for DataReplicationProtectedItemCustomProperties. + /// Keeps track of any properties unknown to the library. + /// Gets or sets the location of the protected item. + /// Gets or sets the Target HCI Cluster ARM Id. + /// Gets or sets the Target Arc Cluster Custom Location ARM Id. + /// Gets or sets the Target AzStackHCI cluster name. + /// Gets or sets the ARM Id of the discovered machine. + /// Gets or sets the list of disks to replicate. + /// Gets or sets the list of VM NIC to replicate. + /// Gets or sets the source VM display name. + /// Gets or sets the source VM CPU cores. + /// Gets or sets the source VM ram memory size in megabytes. + /// Gets or sets the target VM display name. + /// Gets or sets the target resource group ARM Id. + /// Gets or sets the target storage container ARM Id. + /// Gets or sets the hypervisor generation of the virtual machine. + /// Gets or sets the target network Id within AzStackHCI Cluster. + /// Gets or sets the target test network Id within AzStackHCI Cluster. + /// Gets or sets the target CPU cores. + /// Gets or sets a value indicating whether memory is dynamical. + /// Protected item dynamic memory config. + /// Gets or sets the target memory in mega-bytes. + /// Gets or sets the Run As account Id. + /// Gets or sets the source fabric agent name. + /// Gets or sets the target fabric agent name. + /// Gets or sets the source appliance name. + /// Gets or sets the target appliance name. + /// Gets or sets the type of the OS. + /// Gets or sets the name of the OS. + /// Gets or sets the firmware type. + /// Gets or sets the target location. + /// Gets or sets the location of Azure Arc HCI custom location resource. + /// Gets or sets the recovery point Id to which the VM was failed over. + /// Gets or sets the last recovery point received time. + /// Gets or sets the last recovery point Id. + /// Gets or sets the initial replication progress percentage. This is calculated based on total bytes processed for all disks in the source VM. + /// Gets or sets the resync progress percentage. This is calculated based on total bytes processed for all disks in the source VM. + /// Gets or sets the list of protected disks. + /// Gets or sets the VM NIC details. + /// Gets or sets the BIOS Id of the target AzStackHCI VM. + /// Gets or sets the latest timestamp that replication status is updated. + internal HyperVToAzStackHciProtectedItemCustomProperties(string instanceType, IDictionary serializedAdditionalRawData, ProtectedItemActiveLocation? activeLocation, ResourceIdentifier targetHciClusterId, ResourceIdentifier targetArcClusterCustomLocationId, string targetAzStackHciClusterName, ResourceIdentifier fabricDiscoveryMachineId, IList disksToInclude, IList nicsToInclude, string sourceVmName, int? sourceCpuCores, double? sourceMemoryInMegaBytes, string targetVmName, ResourceIdentifier targetResourceGroupId, ResourceIdentifier storageContainerId, string hyperVGeneration, string targetNetworkId, string testNetworkId, int? targetCpuCores, bool? isDynamicRam, ProtectedItemDynamicMemoryConfig dynamicMemoryConfig, int? targetMemoryInMegaBytes, string runAsAccountId, string sourceFabricAgentName, string targetFabricAgentName, string sourceApplianceName, string targetApplianceName, string osType, string osName, string firmwareType, string targetLocation, string customLocationRegion, string failoverRecoveryPointId, DateTimeOffset? lastRecoveryPointReceivedOn, string lastRecoveryPointId, int? initialReplicationProgressPercentage, int? resyncProgressPercentage, IReadOnlyList protectedDisks, IReadOnlyList protectedNics, string targetVmBiosId, DateTimeOffset? lastReplicationUpdateOn) : base(instanceType, serializedAdditionalRawData) + { + ActiveLocation = activeLocation; + TargetHciClusterId = targetHciClusterId; + TargetArcClusterCustomLocationId = targetArcClusterCustomLocationId; + TargetAzStackHciClusterName = targetAzStackHciClusterName; + FabricDiscoveryMachineId = fabricDiscoveryMachineId; + DisksToInclude = disksToInclude; + NicsToInclude = nicsToInclude; + SourceVmName = sourceVmName; + SourceCpuCores = sourceCpuCores; + SourceMemoryInMegaBytes = sourceMemoryInMegaBytes; + TargetVmName = targetVmName; + TargetResourceGroupId = targetResourceGroupId; + StorageContainerId = storageContainerId; + HyperVGeneration = hyperVGeneration; + TargetNetworkId = targetNetworkId; + TestNetworkId = testNetworkId; + TargetCpuCores = targetCpuCores; + IsDynamicRam = isDynamicRam; + DynamicMemoryConfig = dynamicMemoryConfig; + TargetMemoryInMegaBytes = targetMemoryInMegaBytes; + RunAsAccountId = runAsAccountId; + SourceFabricAgentName = sourceFabricAgentName; + TargetFabricAgentName = targetFabricAgentName; + SourceApplianceName = sourceApplianceName; + TargetApplianceName = targetApplianceName; + OSType = osType; + OSName = osName; + FirmwareType = firmwareType; + TargetLocation = targetLocation; + CustomLocationRegion = customLocationRegion; + FailoverRecoveryPointId = failoverRecoveryPointId; + LastRecoveryPointReceivedOn = lastRecoveryPointReceivedOn; + LastRecoveryPointId = lastRecoveryPointId; + InitialReplicationProgressPercentage = initialReplicationProgressPercentage; + ResyncProgressPercentage = resyncProgressPercentage; + ProtectedDisks = protectedDisks; + ProtectedNics = protectedNics; + TargetVmBiosId = targetVmBiosId; + LastReplicationUpdateOn = lastReplicationUpdateOn; + InstanceType = instanceType ?? "HyperVToAzStackHCI"; + } + + /// Initializes a new instance of for deserialization. + internal HyperVToAzStackHciProtectedItemCustomProperties() + { + } + + /// Gets or sets the location of the protected item. + public ProtectedItemActiveLocation? ActiveLocation { get; } + /// Gets or sets the Target HCI Cluster ARM Id. + public ResourceIdentifier TargetHciClusterId { get; set; } + /// Gets or sets the Target Arc Cluster Custom Location ARM Id. + public ResourceIdentifier TargetArcClusterCustomLocationId { get; set; } + /// Gets or sets the Target AzStackHCI cluster name. + public string TargetAzStackHciClusterName { get; } + /// Gets or sets the ARM Id of the discovered machine. + public ResourceIdentifier FabricDiscoveryMachineId { get; set; } + /// Gets or sets the list of disks to replicate. + public IList DisksToInclude { get; } + /// Gets or sets the list of VM NIC to replicate. + public IList NicsToInclude { get; } + /// Gets or sets the source VM display name. + public string SourceVmName { get; } + /// Gets or sets the source VM CPU cores. + public int? SourceCpuCores { get; } + /// Gets or sets the source VM ram memory size in megabytes. + public double? SourceMemoryInMegaBytes { get; } + /// Gets or sets the target VM display name. + public string TargetVmName { get; set; } + /// Gets or sets the target resource group ARM Id. + public ResourceIdentifier TargetResourceGroupId { get; set; } + /// Gets or sets the target storage container ARM Id. + public ResourceIdentifier StorageContainerId { get; set; } + /// Gets or sets the hypervisor generation of the virtual machine. + public string HyperVGeneration { get; set; } + /// Gets or sets the target network Id within AzStackHCI Cluster. + public string TargetNetworkId { get; set; } + /// Gets or sets the target test network Id within AzStackHCI Cluster. + public string TestNetworkId { get; set; } + /// Gets or sets the target CPU cores. + public int? TargetCpuCores { get; set; } + /// Gets or sets a value indicating whether memory is dynamical. + public bool? IsDynamicRam { get; set; } + /// Protected item dynamic memory config. + public ProtectedItemDynamicMemoryConfig DynamicMemoryConfig { get; set; } + /// Gets or sets the target memory in mega-bytes. + public int? TargetMemoryInMegaBytes { get; set; } + /// Gets or sets the Run As account Id. + public string RunAsAccountId { get; set; } + /// Gets or sets the source fabric agent name. + public string SourceFabricAgentName { get; set; } + /// Gets or sets the target fabric agent name. + public string TargetFabricAgentName { get; set; } + /// Gets or sets the source appliance name. + public string SourceApplianceName { get; } + /// Gets or sets the target appliance name. + public string TargetApplianceName { get; } + /// Gets or sets the type of the OS. + public string OSType { get; } + /// Gets or sets the name of the OS. + public string OSName { get; } + /// Gets or sets the firmware type. + public string FirmwareType { get; } + /// Gets or sets the target location. + public string TargetLocation { get; } + /// Gets or sets the location of Azure Arc HCI custom location resource. + public string CustomLocationRegion { get; set; } + /// Gets or sets the recovery point Id to which the VM was failed over. + public string FailoverRecoveryPointId { get; } + /// Gets or sets the last recovery point received time. + public DateTimeOffset? LastRecoveryPointReceivedOn { get; } + /// Gets or sets the last recovery point Id. + public string LastRecoveryPointId { get; } + /// Gets or sets the initial replication progress percentage. This is calculated based on total bytes processed for all disks in the source VM. + public int? InitialReplicationProgressPercentage { get; } + /// Gets or sets the resync progress percentage. This is calculated based on total bytes processed for all disks in the source VM. + public int? ResyncProgressPercentage { get; } + /// Gets or sets the list of protected disks. + public IReadOnlyList ProtectedDisks { get; } + /// Gets or sets the VM NIC details. + public IReadOnlyList ProtectedNics { get; } + /// Gets or sets the BIOS Id of the target AzStackHCI VM. + public string TargetVmBiosId { get; } + /// Gets or sets the latest timestamp that replication status is updated. + public DateTimeOffset? LastReplicationUpdateOn { get; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciProtectedItemCustomPropertiesUpdate.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciProtectedItemCustomPropertiesUpdate.Serialization.cs new file mode 100644 index 000000000000..5f3cf7509520 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciProtectedItemCustomPropertiesUpdate.Serialization.cs @@ -0,0 +1,214 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class HyperVToAzStackHciProtectedItemCustomPropertiesUpdate : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(HyperVToAzStackHciProtectedItemCustomPropertiesUpdate)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsCollectionDefined(NicsToInclude)) + { + writer.WritePropertyName("nicsToInclude"u8); + writer.WriteStartArray(); + foreach (var item in NicsToInclude) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(TargetCpuCores)) + { + writer.WritePropertyName("targetCpuCores"u8); + writer.WriteNumberValue(TargetCpuCores.Value); + } + if (Optional.IsDefined(IsDynamicRam)) + { + writer.WritePropertyName("isDynamicRam"u8); + writer.WriteBooleanValue(IsDynamicRam.Value); + } + if (Optional.IsDefined(DynamicMemoryConfig)) + { + writer.WritePropertyName("dynamicMemoryConfig"u8); + writer.WriteObjectValue(DynamicMemoryConfig, options); + } + if (Optional.IsDefined(TargetMemoryInMegaBytes)) + { + writer.WritePropertyName("targetMemoryInMegaBytes"u8); + writer.WriteNumberValue(TargetMemoryInMegaBytes.Value); + } + if (Optional.IsDefined(OSType)) + { + writer.WritePropertyName("osType"u8); + writer.WriteStringValue(OSType); + } + } + + HyperVToAzStackHciProtectedItemCustomPropertiesUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(HyperVToAzStackHciProtectedItemCustomPropertiesUpdate)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeHyperVToAzStackHciProtectedItemCustomPropertiesUpdate(document.RootElement, options); + } + + internal static HyperVToAzStackHciProtectedItemCustomPropertiesUpdate DeserializeHyperVToAzStackHciProtectedItemCustomPropertiesUpdate(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList nicsToInclude = default; + int? targetCpuCores = default; + bool? isDynamicRam = default; + ProtectedItemDynamicMemoryConfig dynamicMemoryConfig = default; + int? targetMemoryInMegaBytes = default; + string osType = default; + string instanceType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("nicsToInclude"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(HyperVToAzStackHciNicInput.DeserializeHyperVToAzStackHciNicInput(item, options)); + } + nicsToInclude = array; + continue; + } + if (property.NameEquals("targetCpuCores"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + targetCpuCores = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("isDynamicRam"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isDynamicRam = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("dynamicMemoryConfig"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dynamicMemoryConfig = ProtectedItemDynamicMemoryConfig.DeserializeProtectedItemDynamicMemoryConfig(property.Value, options); + continue; + } + if (property.NameEquals("targetMemoryInMegaBytes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + targetMemoryInMegaBytes = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("osType"u8)) + { + osType = property.Value.GetString(); + continue; + } + if (property.NameEquals("instanceType"u8)) + { + instanceType = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new HyperVToAzStackHciProtectedItemCustomPropertiesUpdate( + instanceType, + serializedAdditionalRawData, + nicsToInclude ?? new ChangeTrackingList(), + targetCpuCores, + isDynamicRam, + dynamicMemoryConfig, + targetMemoryInMegaBytes, + osType); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(HyperVToAzStackHciProtectedItemCustomPropertiesUpdate)} does not support writing '{options.Format}' format."); + } + } + + HyperVToAzStackHciProtectedItemCustomPropertiesUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeHyperVToAzStackHciProtectedItemCustomPropertiesUpdate(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(HyperVToAzStackHciProtectedItemCustomPropertiesUpdate)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciProtectedItemCustomPropertiesUpdate.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciProtectedItemCustomPropertiesUpdate.cs new file mode 100644 index 000000000000..60ddff5d5d04 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciProtectedItemCustomPropertiesUpdate.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.RecoveryServicesDataReplication.Models +{ + /// HyperV to AzStackHCI Protected item model custom properties. + public partial class HyperVToAzStackHciProtectedItemCustomPropertiesUpdate : DataReplicationProtectedItemCustomPropertiesUpdate + { + /// Initializes a new instance of . + public HyperVToAzStackHciProtectedItemCustomPropertiesUpdate() + { + NicsToInclude = new ChangeTrackingList(); + InstanceType = "HyperVToAzStackHCI"; + } + + /// Initializes a new instance of . + /// Discriminator property for DataReplicationProtectedItemCustomPropertiesUpdate. + /// Keeps track of any properties unknown to the library. + /// Gets or sets the list of VM NIC to replicate. + /// Gets or sets the target CPU cores. + /// Gets or sets a value indicating whether memory is dynamical. + /// Protected item dynamic memory config. + /// Gets or sets the target memory in mega-bytes. + /// Gets or sets the type of the OS. + internal HyperVToAzStackHciProtectedItemCustomPropertiesUpdate(string instanceType, IDictionary serializedAdditionalRawData, IList nicsToInclude, int? targetCpuCores, bool? isDynamicRam, ProtectedItemDynamicMemoryConfig dynamicMemoryConfig, int? targetMemoryInMegaBytes, string osType) : base(instanceType, serializedAdditionalRawData) + { + NicsToInclude = nicsToInclude; + TargetCpuCores = targetCpuCores; + IsDynamicRam = isDynamicRam; + DynamicMemoryConfig = dynamicMemoryConfig; + TargetMemoryInMegaBytes = targetMemoryInMegaBytes; + OSType = osType; + InstanceType = instanceType ?? "HyperVToAzStackHCI"; + } + + /// Gets or sets the list of VM NIC to replicate. + public IList NicsToInclude { get; } + /// Gets or sets the target CPU cores. + public int? TargetCpuCores { get; set; } + /// Gets or sets a value indicating whether memory is dynamical. + public bool? IsDynamicRam { get; set; } + /// Protected item dynamic memory config. + public ProtectedItemDynamicMemoryConfig DynamicMemoryConfig { get; set; } + /// Gets or sets the target memory in mega-bytes. + public int? TargetMemoryInMegaBytes { get; set; } + /// Gets or sets the type of the OS. + public string OSType { get; set; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciProtectedNicProperties.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciProtectedNicProperties.Serialization.cs new file mode 100644 index 000000000000..73c7e718fca8 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciProtectedNicProperties.Serialization.cs @@ -0,0 +1,195 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class HyperVToAzStackHciProtectedNicProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(HyperVToAzStackHciProtectedNicProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(NicId)) + { + writer.WritePropertyName("nicId"u8); + writer.WriteStringValue(NicId); + } + if (options.Format != "W" && Optional.IsDefined(MacAddress)) + { + writer.WritePropertyName("macAddress"u8); + writer.WriteStringValue(MacAddress); + } + if (options.Format != "W" && Optional.IsDefined(NetworkName)) + { + writer.WritePropertyName("networkName"u8); + writer.WriteStringValue(NetworkName); + } + if (options.Format != "W" && Optional.IsDefined(TargetNetworkId)) + { + writer.WritePropertyName("targetNetworkId"u8); + writer.WriteStringValue(TargetNetworkId); + } + if (options.Format != "W" && Optional.IsDefined(TestNetworkId)) + { + writer.WritePropertyName("testNetworkId"u8); + writer.WriteStringValue(TestNetworkId); + } + if (options.Format != "W" && Optional.IsDefined(SelectionTypeForFailover)) + { + writer.WritePropertyName("selectionTypeForFailover"u8); + writer.WriteStringValue(SelectionTypeForFailover.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + HyperVToAzStackHciProtectedNicProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(HyperVToAzStackHciProtectedNicProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeHyperVToAzStackHciProtectedNicProperties(document.RootElement, options); + } + + internal static HyperVToAzStackHciProtectedNicProperties DeserializeHyperVToAzStackHciProtectedNicProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string nicId = default; + string macAddress = default; + string networkName = default; + string targetNetworkId = default; + string testNetworkId = default; + VmNicSelection? selectionTypeForFailover = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("nicId"u8)) + { + nicId = property.Value.GetString(); + continue; + } + if (property.NameEquals("macAddress"u8)) + { + macAddress = property.Value.GetString(); + continue; + } + if (property.NameEquals("networkName"u8)) + { + networkName = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetNetworkId"u8)) + { + targetNetworkId = property.Value.GetString(); + continue; + } + if (property.NameEquals("testNetworkId"u8)) + { + testNetworkId = property.Value.GetString(); + continue; + } + if (property.NameEquals("selectionTypeForFailover"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + selectionTypeForFailover = new VmNicSelection(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new HyperVToAzStackHciProtectedNicProperties( + nicId, + macAddress, + networkName, + targetNetworkId, + testNetworkId, + selectionTypeForFailover, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(HyperVToAzStackHciProtectedNicProperties)} does not support writing '{options.Format}' format."); + } + } + + HyperVToAzStackHciProtectedNicProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeHyperVToAzStackHciProtectedNicProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(HyperVToAzStackHciProtectedNicProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciProtectedNicProperties.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciProtectedNicProperties.cs new file mode 100644 index 000000000000..0d997349cd48 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciProtectedNicProperties.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// HyperVToAzStackHCI NIC properties. + public partial class HyperVToAzStackHciProtectedNicProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal HyperVToAzStackHciProtectedNicProperties() + { + } + + /// Initializes a new instance of . + /// Gets or sets the NIC Id. + /// Gets or sets the NIC mac address. + /// Gets or sets the network name. + /// Gets or sets the target network Id within AzStackHCI Cluster. + /// Gets or sets the target test network Id within AzStackHCI Cluster. + /// Gets or sets the selection type of the NIC. + /// Keeps track of any properties unknown to the library. + internal HyperVToAzStackHciProtectedNicProperties(string nicId, string macAddress, string networkName, string targetNetworkId, string testNetworkId, VmNicSelection? selectionTypeForFailover, IDictionary serializedAdditionalRawData) + { + NicId = nicId; + MacAddress = macAddress; + NetworkName = networkName; + TargetNetworkId = targetNetworkId; + TestNetworkId = testNetworkId; + SelectionTypeForFailover = selectionTypeForFailover; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets or sets the NIC Id. + public string NicId { get; } + /// Gets or sets the NIC mac address. + public string MacAddress { get; } + /// Gets or sets the network name. + public string NetworkName { get; } + /// Gets or sets the target network Id within AzStackHCI Cluster. + public string TargetNetworkId { get; } + /// Gets or sets the target test network Id within AzStackHCI Cluster. + public string TestNetworkId { get; } + /// Gets or sets the selection type of the NIC. + public VmNicSelection? SelectionTypeForFailover { get; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciRecoveryPointCustomProperties.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciRecoveryPointCustomProperties.Serialization.cs new file mode 100644 index 000000000000..c0f9e7e449e8 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciRecoveryPointCustomProperties.Serialization.cs @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class HyperVToAzStackHciRecoveryPointCustomProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(HyperVToAzStackHciRecoveryPointCustomProperties)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (options.Format != "W" && Optional.IsCollectionDefined(DiskIds)) + { + writer.WritePropertyName("diskIds"u8); + writer.WriteStartArray(); + foreach (var item in DiskIds) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + } + + HyperVToAzStackHciRecoveryPointCustomProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(HyperVToAzStackHciRecoveryPointCustomProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeHyperVToAzStackHciRecoveryPointCustomProperties(document.RootElement, options); + } + + internal static HyperVToAzStackHciRecoveryPointCustomProperties DeserializeHyperVToAzStackHciRecoveryPointCustomProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList diskIds = default; + string instanceType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("diskIds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + diskIds = array; + continue; + } + if (property.NameEquals("instanceType"u8)) + { + instanceType = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new HyperVToAzStackHciRecoveryPointCustomProperties(instanceType, serializedAdditionalRawData, diskIds ?? new ChangeTrackingList()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(HyperVToAzStackHciRecoveryPointCustomProperties)} does not support writing '{options.Format}' format."); + } + } + + HyperVToAzStackHciRecoveryPointCustomProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeHyperVToAzStackHciRecoveryPointCustomProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(HyperVToAzStackHciRecoveryPointCustomProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciRecoveryPointCustomProperties.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciRecoveryPointCustomProperties.cs new file mode 100644 index 000000000000..423a260e63f5 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciRecoveryPointCustomProperties.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.RecoveryServicesDataReplication.Models +{ + /// HyperV to AzStackHCI recovery point model custom properties. + public partial class HyperVToAzStackHciRecoveryPointCustomProperties : DataReplicationRecoveryPointCustomProperties + { + /// Initializes a new instance of . + internal HyperVToAzStackHciRecoveryPointCustomProperties() + { + DiskIds = new ChangeTrackingList(); + InstanceType = "HyperVToAzStackHCI"; + } + + /// Initializes a new instance of . + /// Discriminator property for DataReplicationRecoveryPointCustomProperties. + /// Keeps track of any properties unknown to the library. + /// Gets or sets the list of the disk Ids. + internal HyperVToAzStackHciRecoveryPointCustomProperties(string instanceType, IDictionary serializedAdditionalRawData, IReadOnlyList diskIds) : base(instanceType, serializedAdditionalRawData) + { + DiskIds = diskIds; + InstanceType = instanceType ?? "HyperVToAzStackHCI"; + } + + /// Gets or sets the list of the disk Ids. + public IReadOnlyList DiskIds { get; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciReplicationExtensionCustomProperties.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciReplicationExtensionCustomProperties.Serialization.cs new file mode 100644 index 000000000000..f71a81c02712 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciReplicationExtensionCustomProperties.Serialization.cs @@ -0,0 +1,318 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class HyperVToAzStackHciReplicationExtensionCustomProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(HyperVToAzStackHciReplicationExtensionCustomProperties)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("hyperVFabricArmId"u8); + writer.WriteStringValue(HyperVFabricArmId); + if (options.Format != "W" && Optional.IsDefined(HyperVSiteId)) + { + writer.WritePropertyName("hyperVSiteId"u8); + writer.WriteStringValue(HyperVSiteId); + } + writer.WritePropertyName("azStackHciFabricArmId"u8); + writer.WriteStringValue(AzStackHciFabricArmId); + if (options.Format != "W" && Optional.IsDefined(AzStackHciSiteId)) + { + writer.WritePropertyName("azStackHciSiteId"u8); + writer.WriteStringValue(AzStackHciSiteId); + } + if (Optional.IsDefined(StorageAccountId)) + { + writer.WritePropertyName("storageAccountId"u8); + writer.WriteStringValue(StorageAccountId); + } + if (Optional.IsDefined(StorageAccountSasSecretName)) + { + writer.WritePropertyName("storageAccountSasSecretName"u8); + writer.WriteStringValue(StorageAccountSasSecretName); + } + if (options.Format != "W" && Optional.IsDefined(AsrServiceUri)) + { + writer.WritePropertyName("asrServiceUri"u8); + writer.WriteStringValue(AsrServiceUri.AbsoluteUri); + } + if (options.Format != "W" && Optional.IsDefined(RcmServiceUri)) + { + writer.WritePropertyName("rcmServiceUri"u8); + writer.WriteStringValue(RcmServiceUri.AbsoluteUri); + } + if (options.Format != "W" && Optional.IsDefined(GatewayServiceUri)) + { + writer.WritePropertyName("gatewayServiceUri"u8); + writer.WriteStringValue(GatewayServiceUri.AbsoluteUri); + } + if (options.Format != "W" && Optional.IsDefined(SourceGatewayServiceId)) + { + writer.WritePropertyName("sourceGatewayServiceId"u8); + writer.WriteStringValue(SourceGatewayServiceId); + } + if (options.Format != "W" && Optional.IsDefined(TargetGatewayServiceId)) + { + writer.WritePropertyName("targetGatewayServiceId"u8); + writer.WriteStringValue(TargetGatewayServiceId); + } + if (options.Format != "W" && Optional.IsDefined(SourceStorageContainerName)) + { + writer.WritePropertyName("sourceStorageContainerName"u8); + writer.WriteStringValue(SourceStorageContainerName); + } + if (options.Format != "W" && Optional.IsDefined(TargetStorageContainerName)) + { + writer.WritePropertyName("targetStorageContainerName"u8); + writer.WriteStringValue(TargetStorageContainerName); + } + if (options.Format != "W" && Optional.IsDefined(ResourceLocation)) + { + writer.WritePropertyName("resourceLocation"u8); + writer.WriteStringValue(ResourceLocation); + } + if (options.Format != "W" && Optional.IsDefined(SubscriptionId)) + { + writer.WritePropertyName("subscriptionId"u8); + writer.WriteStringValue(SubscriptionId); + } + if (options.Format != "W" && Optional.IsDefined(ResourceGroup)) + { + writer.WritePropertyName("resourceGroup"u8); + writer.WriteStringValue(ResourceGroup); + } + } + + HyperVToAzStackHciReplicationExtensionCustomProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(HyperVToAzStackHciReplicationExtensionCustomProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeHyperVToAzStackHciReplicationExtensionCustomProperties(document.RootElement, options); + } + + internal static HyperVToAzStackHciReplicationExtensionCustomProperties DeserializeHyperVToAzStackHciReplicationExtensionCustomProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier hyperVFabricArmId = default; + ResourceIdentifier hyperVSiteId = default; + ResourceIdentifier azStackHciFabricArmId = default; + ResourceIdentifier azStackHciSiteId = default; + string storageAccountId = default; + string storageAccountSasSecretName = default; + Uri asrServiceUri = default; + Uri rcmServiceUri = default; + Uri gatewayServiceUri = default; + string sourceGatewayServiceId = default; + string targetGatewayServiceId = default; + string sourceStorageContainerName = default; + string targetStorageContainerName = default; + string resourceLocation = default; + string subscriptionId = default; + string resourceGroup = default; + string instanceType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("hyperVFabricArmId"u8)) + { + hyperVFabricArmId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("hyperVSiteId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + hyperVSiteId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("azStackHciFabricArmId"u8)) + { + azStackHciFabricArmId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("azStackHciSiteId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + azStackHciSiteId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("storageAccountId"u8)) + { + storageAccountId = property.Value.GetString(); + continue; + } + if (property.NameEquals("storageAccountSasSecretName"u8)) + { + storageAccountSasSecretName = property.Value.GetString(); + continue; + } + if (property.NameEquals("asrServiceUri"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + asrServiceUri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("rcmServiceUri"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + rcmServiceUri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("gatewayServiceUri"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + gatewayServiceUri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("sourceGatewayServiceId"u8)) + { + sourceGatewayServiceId = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetGatewayServiceId"u8)) + { + targetGatewayServiceId = property.Value.GetString(); + continue; + } + if (property.NameEquals("sourceStorageContainerName"u8)) + { + sourceStorageContainerName = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetStorageContainerName"u8)) + { + targetStorageContainerName = property.Value.GetString(); + continue; + } + if (property.NameEquals("resourceLocation"u8)) + { + resourceLocation = property.Value.GetString(); + continue; + } + if (property.NameEquals("subscriptionId"u8)) + { + subscriptionId = property.Value.GetString(); + continue; + } + if (property.NameEquals("resourceGroup"u8)) + { + resourceGroup = property.Value.GetString(); + continue; + } + if (property.NameEquals("instanceType"u8)) + { + instanceType = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new HyperVToAzStackHciReplicationExtensionCustomProperties( + instanceType, + serializedAdditionalRawData, + hyperVFabricArmId, + hyperVSiteId, + azStackHciFabricArmId, + azStackHciSiteId, + storageAccountId, + storageAccountSasSecretName, + asrServiceUri, + rcmServiceUri, + gatewayServiceUri, + sourceGatewayServiceId, + targetGatewayServiceId, + sourceStorageContainerName, + targetStorageContainerName, + resourceLocation, + subscriptionId, + resourceGroup); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(HyperVToAzStackHciReplicationExtensionCustomProperties)} does not support writing '{options.Format}' format."); + } + } + + HyperVToAzStackHciReplicationExtensionCustomProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeHyperVToAzStackHciReplicationExtensionCustomProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(HyperVToAzStackHciReplicationExtensionCustomProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciReplicationExtensionCustomProperties.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciReplicationExtensionCustomProperties.cs new file mode 100644 index 000000000000..ff1bc33be8dc --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/HyperVToAzStackHciReplicationExtensionCustomProperties.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// HyperV to AzStackHCI Replication extension model custom properties. + public partial class HyperVToAzStackHciReplicationExtensionCustomProperties : DataReplicationExtensionCustomProperties + { + /// Initializes a new instance of . + /// Gets or sets the ARM Id of the source HyperV fabric. + /// Gets or sets the ARM Id of the target AzStackHCI fabric. + /// or is null. + public HyperVToAzStackHciReplicationExtensionCustomProperties(ResourceIdentifier hyperVFabricArmId, ResourceIdentifier azStackHciFabricArmId) + { + Argument.AssertNotNull(hyperVFabricArmId, nameof(hyperVFabricArmId)); + Argument.AssertNotNull(azStackHciFabricArmId, nameof(azStackHciFabricArmId)); + + HyperVFabricArmId = hyperVFabricArmId; + AzStackHciFabricArmId = azStackHciFabricArmId; + InstanceType = "HyperVToAzStackHCI"; + } + + /// Initializes a new instance of . + /// Discriminator property for DataReplicationExtensionCustomProperties. + /// Keeps track of any properties unknown to the library. + /// Gets or sets the ARM Id of the source HyperV fabric. + /// Gets or sets the ARM Id of the HyperV site. + /// Gets or sets the ARM Id of the target AzStackHCI fabric. + /// Gets or sets the ARM Id of the AzStackHCI site. + /// Gets or sets the storage account Id. + /// Gets or sets the Sas Secret of storage account. + /// Gets or sets the Uri of ASR. + /// Gets or sets the Uri of Rcm. + /// Gets or sets the Uri of Gateway. + /// Gets or sets the gateway service Id of source. + /// Gets or sets the gateway service Id of target. + /// Gets or sets the source storage container name. + /// Gets or sets the target storage container name. + /// Gets or sets the resource location. + /// Gets or sets the subscription. + /// Gets or sets the resource group. + internal HyperVToAzStackHciReplicationExtensionCustomProperties(string instanceType, IDictionary serializedAdditionalRawData, ResourceIdentifier hyperVFabricArmId, ResourceIdentifier hyperVSiteId, ResourceIdentifier azStackHciFabricArmId, ResourceIdentifier azStackHciSiteId, string storageAccountId, string storageAccountSasSecretName, Uri asrServiceUri, Uri rcmServiceUri, Uri gatewayServiceUri, string sourceGatewayServiceId, string targetGatewayServiceId, string sourceStorageContainerName, string targetStorageContainerName, string resourceLocation, string subscriptionId, string resourceGroup) : base(instanceType, serializedAdditionalRawData) + { + HyperVFabricArmId = hyperVFabricArmId; + HyperVSiteId = hyperVSiteId; + AzStackHciFabricArmId = azStackHciFabricArmId; + AzStackHciSiteId = azStackHciSiteId; + StorageAccountId = storageAccountId; + StorageAccountSasSecretName = storageAccountSasSecretName; + AsrServiceUri = asrServiceUri; + RcmServiceUri = rcmServiceUri; + GatewayServiceUri = gatewayServiceUri; + SourceGatewayServiceId = sourceGatewayServiceId; + TargetGatewayServiceId = targetGatewayServiceId; + SourceStorageContainerName = sourceStorageContainerName; + TargetStorageContainerName = targetStorageContainerName; + ResourceLocation = resourceLocation; + SubscriptionId = subscriptionId; + ResourceGroup = resourceGroup; + InstanceType = instanceType ?? "HyperVToAzStackHCI"; + } + + /// Initializes a new instance of for deserialization. + internal HyperVToAzStackHciReplicationExtensionCustomProperties() + { + } + + /// Gets or sets the ARM Id of the source HyperV fabric. + public ResourceIdentifier HyperVFabricArmId { get; set; } + /// Gets or sets the ARM Id of the HyperV site. + public ResourceIdentifier HyperVSiteId { get; } + /// Gets or sets the ARM Id of the target AzStackHCI fabric. + public ResourceIdentifier AzStackHciFabricArmId { get; set; } + /// Gets or sets the ARM Id of the AzStackHCI site. + public ResourceIdentifier AzStackHciSiteId { get; } + /// Gets or sets the storage account Id. + public string StorageAccountId { get; set; } + /// Gets or sets the Sas Secret of storage account. + public string StorageAccountSasSecretName { get; set; } + /// Gets or sets the Uri of ASR. + public Uri AsrServiceUri { get; } + /// Gets or sets the Uri of Rcm. + public Uri RcmServiceUri { get; } + /// Gets or sets the Uri of Gateway. + public Uri GatewayServiceUri { get; } + /// Gets or sets the gateway service Id of source. + public string SourceGatewayServiceId { get; } + /// Gets or sets the gateway service Id of target. + public string TargetGatewayServiceId { get; } + /// Gets or sets the source storage container name. + public string SourceStorageContainerName { get; } + /// Gets or sets the target storage container name. + public string TargetStorageContainerName { get; } + /// Gets or sets the resource location. + public string ResourceLocation { get; } + /// Gets or sets the subscription. + public string SubscriptionId { get; } + /// Gets or sets the resource group. + public string ResourceGroup { get; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/JobModelCustomPropertiesAffectedObjectDetails.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/JobModelCustomPropertiesAffectedObjectDetails.Serialization.cs new file mode 100644 index 000000000000..5028f9cead8d --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/JobModelCustomPropertiesAffectedObjectDetails.Serialization.cs @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class JobModelCustomPropertiesAffectedObjectDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(JobModelCustomPropertiesAffectedObjectDetails)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + if (Optional.IsDefined(Type)) + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + JobModelCustomPropertiesAffectedObjectDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(JobModelCustomPropertiesAffectedObjectDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeJobModelCustomPropertiesAffectedObjectDetails(document.RootElement, options); + } + + internal static JobModelCustomPropertiesAffectedObjectDetails DeserializeJobModelCustomPropertiesAffectedObjectDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string description = default; + JobModelCustomPropertiesAffectedObjectDetailsType? type = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + type = new JobModelCustomPropertiesAffectedObjectDetailsType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new JobModelCustomPropertiesAffectedObjectDetails(description, type, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(JobModelCustomPropertiesAffectedObjectDetails)} does not support writing '{options.Format}' format."); + } + } + + JobModelCustomPropertiesAffectedObjectDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeJobModelCustomPropertiesAffectedObjectDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(JobModelCustomPropertiesAffectedObjectDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/JobModelCustomPropertiesAffectedObjectDetails.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/JobModelCustomPropertiesAffectedObjectDetails.cs new file mode 100644 index 000000000000..f164407b0c96 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/JobModelCustomPropertiesAffectedObjectDetails.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// The JobModelCustomPropertiesAffectedObjectDetails. + public partial class JobModelCustomPropertiesAffectedObjectDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal JobModelCustomPropertiesAffectedObjectDetails() + { + } + + /// Initializes a new instance of . + /// + /// + /// Keeps track of any properties unknown to the library. + internal JobModelCustomPropertiesAffectedObjectDetails(string description, JobModelCustomPropertiesAffectedObjectDetailsType? type, IDictionary serializedAdditionalRawData) + { + Description = description; + Type = type; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets the description. + public string Description { get; } + /// Gets the type. + public JobModelCustomPropertiesAffectedObjectDetailsType? Type { get; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/JobModelCustomPropertiesAffectedObjectDetailsType.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/JobModelCustomPropertiesAffectedObjectDetailsType.cs new file mode 100644 index 000000000000..fbc06c6e77d8 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/JobModelCustomPropertiesAffectedObjectDetailsType.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// The JobModelCustomPropertiesAffectedObjectDetails_type. + public readonly partial struct JobModelCustomPropertiesAffectedObjectDetailsType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public JobModelCustomPropertiesAffectedObjectDetailsType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ObjectValue = "object"; + + /// object. + public static JobModelCustomPropertiesAffectedObjectDetailsType Object { get; } = new JobModelCustomPropertiesAffectedObjectDetailsType(ObjectValue); + /// Determines if two values are the same. + public static bool operator ==(JobModelCustomPropertiesAffectedObjectDetailsType left, JobModelCustomPropertiesAffectedObjectDetailsType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(JobModelCustomPropertiesAffectedObjectDetailsType left, JobModelCustomPropertiesAffectedObjectDetailsType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator JobModelCustomPropertiesAffectedObjectDetailsType(string value) => new JobModelCustomPropertiesAffectedObjectDetailsType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is JobModelCustomPropertiesAffectedObjectDetailsType other && Equals(other); + /// + public bool Equals(JobModelCustomPropertiesAffectedObjectDetailsType 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/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/JobModelListResult.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/JobModelListResult.Serialization.cs new file mode 100644 index 000000000000..83104fa0093d --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/JobModelListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + internal partial class JobModelListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(JobModelListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + JobModelListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(JobModelListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeJobModelListResult(document.RootElement, options); + } + + internal static JobModelListResult DeserializeJobModelListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DataReplicationJobData.DeserializeDataReplicationJobData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new JobModelListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(JobModelListResult)} does not support writing '{options.Format}' format."); + } + } + + JobModelListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeJobModelListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(JobModelListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/JobModelListResult.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/JobModelListResult.cs new file mode 100644 index 000000000000..a7ada724de79 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/JobModelListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// The response of a JobModel list operation. + internal partial class JobModelListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The JobModel items on this page. + /// is null. + internal JobModelListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The JobModel items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal JobModelListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal JobModelListResult() + { + } + + /// The JobModel items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PlannedFailover.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PlannedFailover.Serialization.cs new file mode 100644 index 000000000000..f56d77a276e1 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PlannedFailover.Serialization.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class PlannedFailover : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PlannedFailover)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + PlannedFailover IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PlannedFailover)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePlannedFailover(document.RootElement, options); + } + + internal static PlannedFailover DeserializePlannedFailover(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + PlannedFailoverProperties properties = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + properties = PlannedFailoverProperties.DeserializePlannedFailoverProperties(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PlannedFailover(properties, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(PlannedFailover)} does not support writing '{options.Format}' format."); + } + } + + PlannedFailover IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializePlannedFailover(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PlannedFailover)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PlannedFailover.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PlannedFailover.cs new file mode 100644 index 000000000000..b63eeed155b3 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PlannedFailover.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Planned failover model. + public partial class PlannedFailover + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Planned failover model properties. + /// is null. + public PlannedFailover(PlannedFailoverProperties properties) + { + Argument.AssertNotNull(properties, nameof(properties)); + + Properties = properties; + } + + /// Initializes a new instance of . + /// Planned failover model properties. + /// Keeps track of any properties unknown to the library. + internal PlannedFailover(PlannedFailoverProperties properties, IDictionary serializedAdditionalRawData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal PlannedFailover() + { + } + + /// Planned failover model properties. + internal PlannedFailoverProperties Properties { get; set; } + /// + /// Planned failover model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public PlannedFailoverCustomProperties PlannedFailoverCustomProperties + { + get => Properties is null ? default : Properties.CustomProperties; + set => Properties = new PlannedFailoverProperties(value); + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PlannedFailoverCustomProperties.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PlannedFailoverCustomProperties.Serialization.cs new file mode 100644 index 000000000000..b09b8986ccfa --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PlannedFailoverCustomProperties.Serialization.cs @@ -0,0 +1,118 @@ +// 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.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + [PersistableModelProxy(typeof(UnknownPlannedFailoverCustomProperties))] + public partial class PlannedFailoverCustomProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PlannedFailoverCustomProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("instanceType"u8); + writer.WriteStringValue(InstanceType); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + PlannedFailoverCustomProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PlannedFailoverCustomProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePlannedFailoverCustomProperties(document.RootElement, options); + } + + internal static PlannedFailoverCustomProperties DeserializePlannedFailoverCustomProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("instanceType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "HyperVToAzStackHCI": return HyperVToAzStackHciPlannedFailoverCustomProperties.DeserializeHyperVToAzStackHciPlannedFailoverCustomProperties(element, options); + case "VMwareToAzStackHCI": return VMwareToAzStackHciPlannedFailoverCustomProperties.DeserializeVMwareToAzStackHciPlannedFailoverCustomProperties(element, options); + } + } + return UnknownPlannedFailoverCustomProperties.DeserializeUnknownPlannedFailoverCustomProperties(element, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(PlannedFailoverCustomProperties)} does not support writing '{options.Format}' format."); + } + } + + PlannedFailoverCustomProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializePlannedFailoverCustomProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PlannedFailoverCustomProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PlannedFailoverCustomProperties.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PlannedFailoverCustomProperties.cs new file mode 100644 index 000000000000..f1d984795625 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PlannedFailoverCustomProperties.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// + /// Planned failover model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public abstract partial class PlannedFailoverCustomProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + protected PlannedFailoverCustomProperties() + { + } + + /// Initializes a new instance of . + /// Discriminator property for PlannedFailoverCustomProperties. + /// Keeps track of any properties unknown to the library. + internal PlannedFailoverCustomProperties(string instanceType, IDictionary serializedAdditionalRawData) + { + InstanceType = instanceType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Discriminator property for PlannedFailoverCustomProperties. + internal string InstanceType { get; set; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PlannedFailoverProperties.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PlannedFailoverProperties.Serialization.cs new file mode 100644 index 000000000000..367a27412cc7 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PlannedFailoverProperties.Serialization.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class PlannedFailoverProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PlannedFailoverProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("customProperties"u8); + writer.WriteObjectValue(CustomProperties, options); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + PlannedFailoverProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PlannedFailoverProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePlannedFailoverProperties(document.RootElement, options); + } + + internal static PlannedFailoverProperties DeserializePlannedFailoverProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + PlannedFailoverCustomProperties customProperties = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("customProperties"u8)) + { + customProperties = PlannedFailoverCustomProperties.DeserializePlannedFailoverCustomProperties(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PlannedFailoverProperties(customProperties, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(PlannedFailoverProperties)} does not support writing '{options.Format}' format."); + } + } + + PlannedFailoverProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializePlannedFailoverProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PlannedFailoverProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PlannedFailoverProperties.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PlannedFailoverProperties.cs new file mode 100644 index 000000000000..288367ca8ed5 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PlannedFailoverProperties.cs @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Planned failover model properties. + public partial class PlannedFailoverProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// + /// Planned failover model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// is null. + public PlannedFailoverProperties(PlannedFailoverCustomProperties customProperties) + { + Argument.AssertNotNull(customProperties, nameof(customProperties)); + + CustomProperties = customProperties; + } + + /// Initializes a new instance of . + /// + /// Planned failover model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// Keeps track of any properties unknown to the library. + internal PlannedFailoverProperties(PlannedFailoverCustomProperties customProperties, IDictionary serializedAdditionalRawData) + { + CustomProperties = customProperties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal PlannedFailoverProperties() + { + } + + /// + /// Planned failover model custom properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public PlannedFailoverCustomProperties CustomProperties { get; set; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PolicyModelListResult.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PolicyModelListResult.Serialization.cs new file mode 100644 index 000000000000..c0eb5ee33040 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PolicyModelListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + internal partial class PolicyModelListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PolicyModelListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + PolicyModelListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PolicyModelListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePolicyModelListResult(document.RootElement, options); + } + + internal static PolicyModelListResult DeserializePolicyModelListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DataReplicationPolicyData.DeserializeDataReplicationPolicyData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PolicyModelListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(PolicyModelListResult)} does not support writing '{options.Format}' format."); + } + } + + PolicyModelListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializePolicyModelListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PolicyModelListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PolicyModelListResult.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PolicyModelListResult.cs new file mode 100644 index 000000000000..d4fceabe846d --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PolicyModelListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// The response of a PolicyModel list operation. + internal partial class PolicyModelListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The PolicyModel items on this page. + /// is null. + internal PolicyModelListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The PolicyModel items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal PolicyModelListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal PolicyModelListResult() + { + } + + /// The PolicyModel items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PrivateEndpointConnectionProxyListResult.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PrivateEndpointConnectionProxyListResult.Serialization.cs new file mode 100644 index 000000000000..ff41b8c8b205 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PrivateEndpointConnectionProxyListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + internal partial class PrivateEndpointConnectionProxyListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PrivateEndpointConnectionProxyListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + PrivateEndpointConnectionProxyListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PrivateEndpointConnectionProxyListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePrivateEndpointConnectionProxyListResult(document.RootElement, options); + } + + internal static PrivateEndpointConnectionProxyListResult DeserializePrivateEndpointConnectionProxyListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DataReplicationPrivateEndpointConnectionProxyData.DeserializeDataReplicationPrivateEndpointConnectionProxyData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PrivateEndpointConnectionProxyListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(PrivateEndpointConnectionProxyListResult)} does not support writing '{options.Format}' format."); + } + } + + PrivateEndpointConnectionProxyListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializePrivateEndpointConnectionProxyListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PrivateEndpointConnectionProxyListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PrivateEndpointConnectionProxyListResult.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PrivateEndpointConnectionProxyListResult.cs new file mode 100644 index 000000000000..be2432e6561c --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/PrivateEndpointConnectionProxyListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// The response of a PrivateEndpointConnectionProxy list operation. + internal partial class PrivateEndpointConnectionProxyListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The PrivateEndpointConnectionProxy items on this page. + /// is null. + internal PrivateEndpointConnectionProxyListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The PrivateEndpointConnectionProxy items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal PrivateEndpointConnectionProxyListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal PrivateEndpointConnectionProxyListResult() + { + } + + /// The PrivateEndpointConnectionProxy items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemActiveLocation.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemActiveLocation.cs new file mode 100644 index 000000000000..e7fb5c914aed --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemActiveLocation.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Gets or sets the location of the protected item. + public readonly partial struct ProtectedItemActiveLocation : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ProtectedItemActiveLocation(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PrimaryValue = "Primary"; + private const string RecoveryValue = "Recovery"; + + /// Protected item is active on Primary. + public static ProtectedItemActiveLocation Primary { get; } = new ProtectedItemActiveLocation(PrimaryValue); + /// Protected item is active on Recovery. + public static ProtectedItemActiveLocation Recovery { get; } = new ProtectedItemActiveLocation(RecoveryValue); + /// Determines if two values are the same. + public static bool operator ==(ProtectedItemActiveLocation left, ProtectedItemActiveLocation right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ProtectedItemActiveLocation left, ProtectedItemActiveLocation right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ProtectedItemActiveLocation(string value) => new ProtectedItemActiveLocation(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ProtectedItemActiveLocation other && Equals(other); + /// + public bool Equals(ProtectedItemActiveLocation 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/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemDynamicMemoryConfig.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemDynamicMemoryConfig.Serialization.cs new file mode 100644 index 000000000000..5198b18fdf6d --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemDynamicMemoryConfig.Serialization.cs @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class ProtectedItemDynamicMemoryConfig : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProtectedItemDynamicMemoryConfig)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("maximumMemoryInMegaBytes"u8); + writer.WriteNumberValue(MaximumMemoryInMegaBytes); + writer.WritePropertyName("minimumMemoryInMegaBytes"u8); + writer.WriteNumberValue(MinimumMemoryInMegaBytes); + writer.WritePropertyName("targetMemoryBufferPercentage"u8); + writer.WriteNumberValue(TargetMemoryBufferPercentage); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ProtectedItemDynamicMemoryConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProtectedItemDynamicMemoryConfig)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeProtectedItemDynamicMemoryConfig(document.RootElement, options); + } + + internal static ProtectedItemDynamicMemoryConfig DeserializeProtectedItemDynamicMemoryConfig(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + long maximumMemoryInMegaBytes = default; + long minimumMemoryInMegaBytes = default; + int targetMemoryBufferPercentage = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("maximumMemoryInMegaBytes"u8)) + { + maximumMemoryInMegaBytes = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("minimumMemoryInMegaBytes"u8)) + { + minimumMemoryInMegaBytes = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("targetMemoryBufferPercentage"u8)) + { + targetMemoryBufferPercentage = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ProtectedItemDynamicMemoryConfig(maximumMemoryInMegaBytes, minimumMemoryInMegaBytes, targetMemoryBufferPercentage, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ProtectedItemDynamicMemoryConfig)} does not support writing '{options.Format}' format."); + } + } + + ProtectedItemDynamicMemoryConfig IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeProtectedItemDynamicMemoryConfig(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ProtectedItemDynamicMemoryConfig)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemDynamicMemoryConfig.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemDynamicMemoryConfig.cs new file mode 100644 index 000000000000..95f93ff06669 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemDynamicMemoryConfig.cs @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Protected item dynamic memory config. + public partial class ProtectedItemDynamicMemoryConfig + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Gets or sets maximum memory in MB. + /// Gets or sets minimum memory in MB. + /// Gets or sets target memory buffer in %. + public ProtectedItemDynamicMemoryConfig(long maximumMemoryInMegaBytes, long minimumMemoryInMegaBytes, int targetMemoryBufferPercentage) + { + MaximumMemoryInMegaBytes = maximumMemoryInMegaBytes; + MinimumMemoryInMegaBytes = minimumMemoryInMegaBytes; + TargetMemoryBufferPercentage = targetMemoryBufferPercentage; + } + + /// Initializes a new instance of . + /// Gets or sets maximum memory in MB. + /// Gets or sets minimum memory in MB. + /// Gets or sets target memory buffer in %. + /// Keeps track of any properties unknown to the library. + internal ProtectedItemDynamicMemoryConfig(long maximumMemoryInMegaBytes, long minimumMemoryInMegaBytes, int targetMemoryBufferPercentage, IDictionary serializedAdditionalRawData) + { + MaximumMemoryInMegaBytes = maximumMemoryInMegaBytes; + MinimumMemoryInMegaBytes = minimumMemoryInMegaBytes; + TargetMemoryBufferPercentage = targetMemoryBufferPercentage; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ProtectedItemDynamicMemoryConfig() + { + } + + /// Gets or sets maximum memory in MB. + public long MaximumMemoryInMegaBytes { get; set; } + /// Gets or sets minimum memory in MB. + public long MinimumMemoryInMegaBytes { get; set; } + /// Gets or sets target memory buffer in %. + public int TargetMemoryBufferPercentage { get; set; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemJobProperties.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemJobProperties.Serialization.cs new file mode 100644 index 000000000000..4b34b981b2aa --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemJobProperties.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.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class ProtectedItemJobProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProtectedItemJobProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(ScenarioName)) + { + writer.WritePropertyName("scenarioName"u8); + writer.WriteStringValue(ScenarioName); + } + if (options.Format != "W" && Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (options.Format != "W" && Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W" && Optional.IsDefined(DisplayName)) + { + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + } + if (options.Format != "W" && Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State); + } + if (options.Format != "W" && Optional.IsDefined(StartOn)) + { + writer.WritePropertyName("startTime"u8); + writer.WriteStringValue(StartOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(EndOn)) + { + writer.WritePropertyName("endTime"u8); + writer.WriteStringValue(EndOn.Value, "O"); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ProtectedItemJobProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProtectedItemJobProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeProtectedItemJobProperties(document.RootElement, options); + } + + internal static ProtectedItemJobProperties DeserializeProtectedItemJobProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string scenarioName = default; + string id = default; + string name = default; + string displayName = default; + string state = default; + DateTimeOffset? startTime = default; + DateTimeOffset? endTime = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("scenarioName"u8)) + { + scenarioName = property.Value.GetString(); + continue; + } + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("state"u8)) + { + state = property.Value.GetString(); + continue; + } + if (property.NameEquals("startTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + startTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("endTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ProtectedItemJobProperties( + scenarioName, + id, + name, + displayName, + state, + startTime, + endTime, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ProtectedItemJobProperties)} does not support writing '{options.Format}' format."); + } + } + + ProtectedItemJobProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeProtectedItemJobProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ProtectedItemJobProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemJobProperties.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemJobProperties.cs new file mode 100644 index 000000000000..f19142061375 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemJobProperties.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; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Protected item job properties. + public partial class ProtectedItemJobProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal ProtectedItemJobProperties() + { + } + + /// Initializes a new instance of . + /// Gets or sets protection scenario name. + /// Gets or sets job Id. + /// Gets or sets job name. + /// Gets or sets the job friendly display name. + /// Gets or sets job state. + /// Gets or sets start time of the job. + /// Gets or sets end time of the job. + /// Keeps track of any properties unknown to the library. + internal ProtectedItemJobProperties(string scenarioName, string id, string name, string displayName, string state, DateTimeOffset? startOn, DateTimeOffset? endOn, IDictionary serializedAdditionalRawData) + { + ScenarioName = scenarioName; + Id = id; + Name = name; + DisplayName = displayName; + State = state; + StartOn = startOn; + EndOn = endOn; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets or sets protection scenario name. + public string ScenarioName { get; } + /// Gets or sets job Id. + public string Id { get; } + /// Gets or sets job name. + public string Name { get; } + /// Gets or sets the job friendly display name. + public string DisplayName { get; } + /// Gets or sets job state. + public string State { get; } + /// Gets or sets start time of the job. + public DateTimeOffset? StartOn { get; } + /// Gets or sets end time of the job. + public DateTimeOffset? EndOn { get; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelListResult.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelListResult.Serialization.cs new file mode 100644 index 000000000000..f5b8d44b00cf --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + internal partial class ProtectedItemModelListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProtectedItemModelListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ProtectedItemModelListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProtectedItemModelListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeProtectedItemModelListResult(document.RootElement, options); + } + + internal static ProtectedItemModelListResult DeserializeProtectedItemModelListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DataReplicationProtectedItemData.DeserializeDataReplicationProtectedItemData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ProtectedItemModelListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ProtectedItemModelListResult)} does not support writing '{options.Format}' format."); + } + } + + ProtectedItemModelListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeProtectedItemModelListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ProtectedItemModelListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelListResult.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelListResult.cs new file mode 100644 index 000000000000..572c7890028f --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ProtectedItemModelListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// The response of a ProtectedItemModel list operation. + internal partial class ProtectedItemModelListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The ProtectedItemModel items on this page. + /// is null. + internal ProtectedItemModelListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The ProtectedItemModel items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal ProtectedItemModelListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ProtectedItemModelListResult() + { + } + + /// The ProtectedItemModel items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryPointModelListResult.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryPointModelListResult.Serialization.cs new file mode 100644 index 000000000000..2b0692979d79 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryPointModelListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + internal partial class RecoveryPointModelListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RecoveryPointModelListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + RecoveryPointModelListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RecoveryPointModelListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeRecoveryPointModelListResult(document.RootElement, options); + } + + internal static RecoveryPointModelListResult DeserializeRecoveryPointModelListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DataReplicationRecoveryPointData.DeserializeDataReplicationRecoveryPointData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new RecoveryPointModelListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(RecoveryPointModelListResult)} does not support writing '{options.Format}' format."); + } + } + + RecoveryPointModelListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeRecoveryPointModelListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(RecoveryPointModelListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryPointModelListResult.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryPointModelListResult.cs new file mode 100644 index 000000000000..342601dba457 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryPointModelListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// The response of a RecoveryPointModel list operation. + internal partial class RecoveryPointModelListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The RecoveryPointModel items on this page. + /// is null. + internal RecoveryPointModelListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The RecoveryPointModel items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal RecoveryPointModelListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal RecoveryPointModelListResult() + { + } + + /// The RecoveryPointModel items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryServicesDataReplicationPrivateEndpointConnectionListResult.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryServicesDataReplicationPrivateEndpointConnectionListResult.Serialization.cs new file mode 100644 index 000000000000..6f896b90e3a0 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryServicesDataReplicationPrivateEndpointConnectionListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + internal partial class RecoveryServicesDataReplicationPrivateEndpointConnectionListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RecoveryServicesDataReplicationPrivateEndpointConnectionListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + RecoveryServicesDataReplicationPrivateEndpointConnectionListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RecoveryServicesDataReplicationPrivateEndpointConnectionListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeRecoveryServicesDataReplicationPrivateEndpointConnectionListResult(document.RootElement, options); + } + + internal static RecoveryServicesDataReplicationPrivateEndpointConnectionListResult DeserializeRecoveryServicesDataReplicationPrivateEndpointConnectionListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DataReplicationPrivateEndpointConnectionData.DeserializeDataReplicationPrivateEndpointConnectionData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new RecoveryServicesDataReplicationPrivateEndpointConnectionListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(RecoveryServicesDataReplicationPrivateEndpointConnectionListResult)} does not support writing '{options.Format}' format."); + } + } + + RecoveryServicesDataReplicationPrivateEndpointConnectionListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeRecoveryServicesDataReplicationPrivateEndpointConnectionListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(RecoveryServicesDataReplicationPrivateEndpointConnectionListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryServicesDataReplicationPrivateEndpointConnectionListResult.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryServicesDataReplicationPrivateEndpointConnectionListResult.cs new file mode 100644 index 000000000000..f97dae4b52f0 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryServicesDataReplicationPrivateEndpointConnectionListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// The response of a PrivateEndpointConnection list operation. + internal partial class RecoveryServicesDataReplicationPrivateEndpointConnectionListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The PrivateEndpointConnection items on this page. + /// is null. + internal RecoveryServicesDataReplicationPrivateEndpointConnectionListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The PrivateEndpointConnection items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal RecoveryServicesDataReplicationPrivateEndpointConnectionListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal RecoveryServicesDataReplicationPrivateEndpointConnectionListResult() + { + } + + /// The PrivateEndpointConnection items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryServicesDataReplicationPrivateLinkResourceListResult.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryServicesDataReplicationPrivateLinkResourceListResult.Serialization.cs new file mode 100644 index 000000000000..1877f55107e3 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryServicesDataReplicationPrivateLinkResourceListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + internal partial class RecoveryServicesDataReplicationPrivateLinkResourceListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RecoveryServicesDataReplicationPrivateLinkResourceListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + RecoveryServicesDataReplicationPrivateLinkResourceListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RecoveryServicesDataReplicationPrivateLinkResourceListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeRecoveryServicesDataReplicationPrivateLinkResourceListResult(document.RootElement, options); + } + + internal static RecoveryServicesDataReplicationPrivateLinkResourceListResult DeserializeRecoveryServicesDataReplicationPrivateLinkResourceListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DataReplicationPrivateLinkResourceData.DeserializeDataReplicationPrivateLinkResourceData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new RecoveryServicesDataReplicationPrivateLinkResourceListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(RecoveryServicesDataReplicationPrivateLinkResourceListResult)} does not support writing '{options.Format}' format."); + } + } + + RecoveryServicesDataReplicationPrivateLinkResourceListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeRecoveryServicesDataReplicationPrivateLinkResourceListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(RecoveryServicesDataReplicationPrivateLinkResourceListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryServicesDataReplicationPrivateLinkResourceListResult.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryServicesDataReplicationPrivateLinkResourceListResult.cs new file mode 100644 index 000000000000..b5476f002771 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RecoveryServicesDataReplicationPrivateLinkResourceListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// The response of a PrivateLinkResource list operation. + internal partial class RecoveryServicesDataReplicationPrivateLinkResourceListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The PrivateLinkResource items on this page. + /// is null. + internal RecoveryServicesDataReplicationPrivateLinkResourceListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The PrivateLinkResource items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal RecoveryServicesDataReplicationPrivateLinkResourceListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal RecoveryServicesDataReplicationPrivateLinkResourceListResult() + { + } + + /// The PrivateLinkResource items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RemotePrivateEndpoint.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RemotePrivateEndpoint.Serialization.cs new file mode 100644 index 000000000000..d5c2e77c0cc8 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RemotePrivateEndpoint.Serialization.cs @@ -0,0 +1,232 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class RemotePrivateEndpoint : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RemotePrivateEndpoint)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + if (Optional.IsCollectionDefined(PrivateLinkServiceConnections)) + { + writer.WritePropertyName("privateLinkServiceConnections"u8); + writer.WriteStartArray(); + foreach (var item in PrivateLinkServiceConnections) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(ManualPrivateLinkServiceConnections)) + { + writer.WritePropertyName("manualPrivateLinkServiceConnections"u8); + writer.WriteStartArray(); + foreach (var item in ManualPrivateLinkServiceConnections) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(PrivateLinkServiceProxies)) + { + writer.WritePropertyName("privateLinkServiceProxies"u8); + writer.WriteStartArray(); + foreach (var item in PrivateLinkServiceProxies) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(ConnectionDetails)) + { + writer.WritePropertyName("connectionDetails"u8); + writer.WriteStartArray(); + foreach (var item in ConnectionDetails) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + RemotePrivateEndpoint IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RemotePrivateEndpoint)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeRemotePrivateEndpoint(document.RootElement, options); + } + + internal static RemotePrivateEndpoint DeserializeRemotePrivateEndpoint(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string id = default; + IList privateLinkServiceConnections = default; + IList manualPrivateLinkServiceConnections = default; + IList privateLinkServiceProxies = default; + IList connectionDetails = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("privateLinkServiceConnections"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DataReplicationPrivateLinkServiceConnection.DeserializeDataReplicationPrivateLinkServiceConnection(item, options)); + } + privateLinkServiceConnections = array; + continue; + } + if (property.NameEquals("manualPrivateLinkServiceConnections"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DataReplicationPrivateLinkServiceConnection.DeserializeDataReplicationPrivateLinkServiceConnection(item, options)); + } + manualPrivateLinkServiceConnections = array; + continue; + } + if (property.NameEquals("privateLinkServiceProxies"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DataReplicationPrivateLinkServiceProxy.DeserializeDataReplicationPrivateLinkServiceProxy(item, options)); + } + privateLinkServiceProxies = array; + continue; + } + if (property.NameEquals("connectionDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(RemotePrivateEndpointConnectionDetails.DeserializeRemotePrivateEndpointConnectionDetails(item, options)); + } + connectionDetails = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new RemotePrivateEndpoint( + id, + privateLinkServiceConnections ?? new ChangeTrackingList(), + manualPrivateLinkServiceConnections ?? new ChangeTrackingList(), + privateLinkServiceProxies ?? new ChangeTrackingList(), + connectionDetails ?? new ChangeTrackingList(), + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(RemotePrivateEndpoint)} does not support writing '{options.Format}' format."); + } + } + + RemotePrivateEndpoint IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeRemotePrivateEndpoint(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(RemotePrivateEndpoint)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RemotePrivateEndpoint.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RemotePrivateEndpoint.cs new file mode 100644 index 000000000000..9522d06a8c7b --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RemotePrivateEndpoint.cs @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Represent remote private endpoint information for the private endpoint connection proxy. + public partial class RemotePrivateEndpoint + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Gets or sets private link service proxy id. + /// is null. + public RemotePrivateEndpoint(string id) + { + Argument.AssertNotNull(id, nameof(id)); + + Id = id; + PrivateLinkServiceConnections = new ChangeTrackingList(); + ManualPrivateLinkServiceConnections = new ChangeTrackingList(); + PrivateLinkServiceProxies = new ChangeTrackingList(); + ConnectionDetails = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Gets or sets private link service proxy id. + /// Gets or sets the list of Private Link Service Connections and gets populated for Auto approval flow. + /// Gets or sets the list of Manual Private Link Service Connections and gets populated for Manual approval flow. + /// Gets or sets the list of private link service proxies. + /// Gets or sets the list of Connection Details. This is the connection details for private endpoint. + /// Keeps track of any properties unknown to the library. + internal RemotePrivateEndpoint(string id, IList privateLinkServiceConnections, IList manualPrivateLinkServiceConnections, IList privateLinkServiceProxies, IList connectionDetails, IDictionary serializedAdditionalRawData) + { + Id = id; + PrivateLinkServiceConnections = privateLinkServiceConnections; + ManualPrivateLinkServiceConnections = manualPrivateLinkServiceConnections; + PrivateLinkServiceProxies = privateLinkServiceProxies; + ConnectionDetails = connectionDetails; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal RemotePrivateEndpoint() + { + } + + /// Gets or sets private link service proxy id. + public string Id { get; set; } + /// Gets or sets the list of Private Link Service Connections and gets populated for Auto approval flow. + public IList PrivateLinkServiceConnections { get; } + /// Gets or sets the list of Manual Private Link Service Connections and gets populated for Manual approval flow. + public IList ManualPrivateLinkServiceConnections { get; } + /// Gets or sets the list of private link service proxies. + public IList PrivateLinkServiceProxies { get; } + /// Gets or sets the list of Connection Details. This is the connection details for private endpoint. + public IList ConnectionDetails { get; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RemotePrivateEndpointConnectionDetails.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RemotePrivateEndpointConnectionDetails.Serialization.cs new file mode 100644 index 000000000000..ab0eb402548b --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RemotePrivateEndpointConnectionDetails.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.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class RemotePrivateEndpointConnectionDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RemotePrivateEndpointConnectionDetails)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (Optional.IsDefined(PrivateIPAddress)) + { + writer.WritePropertyName("privateIpAddress"u8); + writer.WriteStringValue(PrivateIPAddress); + } + if (Optional.IsDefined(LinkIdentifier)) + { + writer.WritePropertyName("linkIdentifier"u8); + writer.WriteStringValue(LinkIdentifier); + } + if (Optional.IsDefined(GroupId)) + { + writer.WritePropertyName("groupId"u8); + writer.WriteStringValue(GroupId); + } + if (Optional.IsDefined(MemberName)) + { + writer.WritePropertyName("memberName"u8); + writer.WriteStringValue(MemberName); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + RemotePrivateEndpointConnectionDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RemotePrivateEndpointConnectionDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeRemotePrivateEndpointConnectionDetails(document.RootElement, options); + } + + internal static RemotePrivateEndpointConnectionDetails DeserializeRemotePrivateEndpointConnectionDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string id = default; + string privateIPAddress = default; + string linkIdentifier = default; + string groupId = default; + string memberName = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("privateIpAddress"u8)) + { + privateIPAddress = property.Value.GetString(); + continue; + } + if (property.NameEquals("linkIdentifier"u8)) + { + linkIdentifier = property.Value.GetString(); + continue; + } + if (property.NameEquals("groupId"u8)) + { + groupId = property.Value.GetString(); + continue; + } + if (property.NameEquals("memberName"u8)) + { + memberName = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new RemotePrivateEndpointConnectionDetails( + id, + privateIPAddress, + linkIdentifier, + groupId, + memberName, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(RemotePrivateEndpointConnectionDetails)} does not support writing '{options.Format}' format."); + } + } + + RemotePrivateEndpointConnectionDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeRemotePrivateEndpointConnectionDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(RemotePrivateEndpointConnectionDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RemotePrivateEndpointConnectionDetails.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RemotePrivateEndpointConnectionDetails.cs new file mode 100644 index 000000000000..0337de2a5360 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/RemotePrivateEndpointConnectionDetails.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Private endpoint connection details at member level. + public partial class RemotePrivateEndpointConnectionDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public RemotePrivateEndpointConnectionDetails() + { + } + + /// Initializes a new instance of . + /// Gets or sets id. + /// Gets or sets private IP address. + /// Gets or sets link identifier. + /// Gets or sets group id. + /// Gets or sets member name. + /// Keeps track of any properties unknown to the library. + internal RemotePrivateEndpointConnectionDetails(string id, string privateIPAddress, string linkIdentifier, string groupId, string memberName, IDictionary serializedAdditionalRawData) + { + Id = id; + PrivateIPAddress = privateIPAddress; + LinkIdentifier = linkIdentifier; + GroupId = groupId; + MemberName = memberName; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets or sets id. + public string Id { get; set; } + /// Gets or sets private IP address. + public string PrivateIPAddress { get; set; } + /// Gets or sets link identifier. + public string LinkIdentifier { get; set; } + /// Gets or sets group id. + public string GroupId { get; set; } + /// Gets or sets member name. + public string MemberName { get; set; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationExtensionModelListResult.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationExtensionModelListResult.Serialization.cs new file mode 100644 index 000000000000..ed0b3cfef7a9 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationExtensionModelListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + internal partial class ReplicationExtensionModelListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ReplicationExtensionModelListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ReplicationExtensionModelListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ReplicationExtensionModelListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeReplicationExtensionModelListResult(document.RootElement, options); + } + + internal static ReplicationExtensionModelListResult DeserializeReplicationExtensionModelListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DataReplicationExtensionData.DeserializeDataReplicationExtensionData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ReplicationExtensionModelListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ReplicationExtensionModelListResult)} does not support writing '{options.Format}' format."); + } + } + + ReplicationExtensionModelListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeReplicationExtensionModelListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ReplicationExtensionModelListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationExtensionModelListResult.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationExtensionModelListResult.cs new file mode 100644 index 000000000000..c42257d5ea2e --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/ReplicationExtensionModelListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// The response of a ReplicationExtensionModel list operation. + internal partial class ReplicationExtensionModelListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The ReplicationExtensionModel items on this page. + /// is null. + internal ReplicationExtensionModelListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The ReplicationExtensionModel items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal ReplicationExtensionModelListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ReplicationExtensionModelListResult() + { + } + + /// The ReplicationExtensionModel items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/StorageContainerProperties.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/StorageContainerProperties.Serialization.cs new file mode 100644 index 000000000000..123d323ef6d2 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/StorageContainerProperties.Serialization.cs @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class StorageContainerProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(StorageContainerProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + writer.WritePropertyName("clusterSharedVolumePath"u8); + writer.WriteStringValue(ClusterSharedVolumePath); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + StorageContainerProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(StorageContainerProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeStorageContainerProperties(document.RootElement, options); + } + + internal static StorageContainerProperties DeserializeStorageContainerProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + string clusterSharedVolumePath = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("clusterSharedVolumePath"u8)) + { + clusterSharedVolumePath = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new StorageContainerProperties(name, clusterSharedVolumePath, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(StorageContainerProperties)} does not support writing '{options.Format}' format."); + } + } + + StorageContainerProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeStorageContainerProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(StorageContainerProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/StorageContainerProperties.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/StorageContainerProperties.cs new file mode 100644 index 000000000000..b1cd48805258 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/StorageContainerProperties.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Storage container properties. + public partial class StorageContainerProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Gets or sets the Name. + /// Gets or sets the ClusterSharedVolumePath. + /// or is null. + public StorageContainerProperties(string name, string clusterSharedVolumePath) + { + Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(clusterSharedVolumePath, nameof(clusterSharedVolumePath)); + + Name = name; + ClusterSharedVolumePath = clusterSharedVolumePath; + } + + /// Initializes a new instance of . + /// Gets or sets the Name. + /// Gets or sets the ClusterSharedVolumePath. + /// Keeps track of any properties unknown to the library. + internal StorageContainerProperties(string name, string clusterSharedVolumePath, IDictionary serializedAdditionalRawData) + { + Name = name; + ClusterSharedVolumePath = clusterSharedVolumePath; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal StorageContainerProperties() + { + } + + /// Gets or sets the Name. + public string Name { get; set; } + /// Gets or sets the ClusterSharedVolumePath. + public string ClusterSharedVolumePath { get; set; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TestFailoverCleanupJobCustomProperties.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TestFailoverCleanupJobCustomProperties.Serialization.cs new file mode 100644 index 000000000000..e7888418ed31 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TestFailoverCleanupJobCustomProperties.Serialization.cs @@ -0,0 +1,131 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class TestFailoverCleanupJobCustomProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TestFailoverCleanupJobCustomProperties)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (options.Format != "W" && Optional.IsDefined(Comments)) + { + writer.WritePropertyName("comments"u8); + writer.WriteStringValue(Comments); + } + } + + TestFailoverCleanupJobCustomProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TestFailoverCleanupJobCustomProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeTestFailoverCleanupJobCustomProperties(document.RootElement, options); + } + + internal static TestFailoverCleanupJobCustomProperties DeserializeTestFailoverCleanupJobCustomProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string comments = default; + string instanceType = default; + JobModelCustomPropertiesAffectedObjectDetails affectedObjectDetails = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("comments"u8)) + { + comments = property.Value.GetString(); + continue; + } + if (property.NameEquals("instanceType"u8)) + { + instanceType = property.Value.GetString(); + continue; + } + if (property.NameEquals("affectedObjectDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + affectedObjectDetails = JobModelCustomPropertiesAffectedObjectDetails.DeserializeJobModelCustomPropertiesAffectedObjectDetails(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new TestFailoverCleanupJobCustomProperties(instanceType, affectedObjectDetails, serializedAdditionalRawData, comments); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(TestFailoverCleanupJobCustomProperties)} does not support writing '{options.Format}' format."); + } + } + + TestFailoverCleanupJobCustomProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeTestFailoverCleanupJobCustomProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(TestFailoverCleanupJobCustomProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TestFailoverCleanupJobCustomProperties.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TestFailoverCleanupJobCustomProperties.cs new file mode 100644 index 000000000000..8da682f17645 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TestFailoverCleanupJobCustomProperties.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.RecoveryServicesDataReplication.Models +{ + /// Test failover cleanup job model custom properties. + public partial class TestFailoverCleanupJobCustomProperties : DataReplicationJobCustomProperties + { + /// Initializes a new instance of . + internal TestFailoverCleanupJobCustomProperties() + { + InstanceType = "TestFailoverCleanupJobDetails"; + } + + /// Initializes a new instance of . + /// Discriminator property for DataReplicationJobCustomProperties. + /// Gets or sets any custom properties of the affected object. + /// Keeps track of any properties unknown to the library. + /// Gets or sets the test failover cleanup comments. + internal TestFailoverCleanupJobCustomProperties(string instanceType, JobModelCustomPropertiesAffectedObjectDetails affectedObjectDetails, IDictionary serializedAdditionalRawData, string comments) : base(instanceType, affectedObjectDetails, serializedAdditionalRawData) + { + Comments = comments; + InstanceType = instanceType ?? "TestFailoverCleanupJobDetails"; + } + + /// Gets or sets the test failover cleanup comments. + public string Comments { get; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TestFailoverJobCustomProperties.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TestFailoverJobCustomProperties.Serialization.cs new file mode 100644 index 000000000000..4f9f74ebc33b --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TestFailoverJobCustomProperties.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.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class TestFailoverJobCustomProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TestFailoverJobCustomProperties)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (options.Format != "W" && Optional.IsCollectionDefined(ProtectedItemDetails)) + { + writer.WritePropertyName("protectedItemDetails"u8); + writer.WriteStartArray(); + foreach (var item in ProtectedItemDetails) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + } + + TestFailoverJobCustomProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TestFailoverJobCustomProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeTestFailoverJobCustomProperties(document.RootElement, options); + } + + internal static TestFailoverJobCustomProperties DeserializeTestFailoverJobCustomProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList protectedItemDetails = default; + string instanceType = default; + JobModelCustomPropertiesAffectedObjectDetails affectedObjectDetails = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("protectedItemDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(FailoverProtectedItemProperties.DeserializeFailoverProtectedItemProperties(item, options)); + } + protectedItemDetails = array; + continue; + } + if (property.NameEquals("instanceType"u8)) + { + instanceType = property.Value.GetString(); + continue; + } + if (property.NameEquals("affectedObjectDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + affectedObjectDetails = JobModelCustomPropertiesAffectedObjectDetails.DeserializeJobModelCustomPropertiesAffectedObjectDetails(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new TestFailoverJobCustomProperties(instanceType, affectedObjectDetails, serializedAdditionalRawData, protectedItemDetails ?? new ChangeTrackingList()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(TestFailoverJobCustomProperties)} does not support writing '{options.Format}' format."); + } + } + + TestFailoverJobCustomProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeTestFailoverJobCustomProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(TestFailoverJobCustomProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TestFailoverJobCustomProperties.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TestFailoverJobCustomProperties.cs new file mode 100644 index 000000000000..6d28f8b032b8 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/TestFailoverJobCustomProperties.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; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Test failover job model custom properties. + public partial class TestFailoverJobCustomProperties : DataReplicationJobCustomProperties + { + /// Initializes a new instance of . + internal TestFailoverJobCustomProperties() + { + ProtectedItemDetails = new ChangeTrackingList(); + InstanceType = "TestFailoverJobDetails"; + } + + /// Initializes a new instance of . + /// Discriminator property for DataReplicationJobCustomProperties. + /// Gets or sets any custom properties of the affected object. + /// Keeps track of any properties unknown to the library. + /// Gets or sets the test VM details. + internal TestFailoverJobCustomProperties(string instanceType, JobModelCustomPropertiesAffectedObjectDetails affectedObjectDetails, IDictionary serializedAdditionalRawData, IReadOnlyList protectedItemDetails) : base(instanceType, affectedObjectDetails, serializedAdditionalRawData) + { + ProtectedItemDetails = protectedItemDetails; + InstanceType = instanceType ?? "TestFailoverJobDetails"; + } + + /// Gets or sets the test VM details. + public IReadOnlyList ProtectedItemDetails { get; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownDataReplicationEventCustomProperties.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownDataReplicationEventCustomProperties.Serialization.cs new file mode 100644 index 000000000000..8b3f857552a2 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownDataReplicationEventCustomProperties.Serialization.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + internal partial class UnknownDataReplicationEventCustomProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationEventCustomProperties)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + DataReplicationEventCustomProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationEventCustomProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataReplicationEventCustomProperties(document.RootElement, options); + } + + internal static UnknownDataReplicationEventCustomProperties DeserializeUnknownDataReplicationEventCustomProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string instanceType = "Unknown"; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("instanceType"u8)) + { + instanceType = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownDataReplicationEventCustomProperties(instanceType, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DataReplicationEventCustomProperties)} does not support writing '{options.Format}' format."); + } + } + + DataReplicationEventCustomProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataReplicationEventCustomProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataReplicationEventCustomProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownDataReplicationEventCustomProperties.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownDataReplicationEventCustomProperties.cs new file mode 100644 index 000000000000..ab737e790e79 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownDataReplicationEventCustomProperties.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Unknown version of DataReplicationEventCustomProperties. + internal partial class UnknownDataReplicationEventCustomProperties : DataReplicationEventCustomProperties + { + /// Initializes a new instance of . + /// Discriminator property for DataReplicationEventCustomProperties. + /// Keeps track of any properties unknown to the library. + internal UnknownDataReplicationEventCustomProperties(string instanceType, IDictionary serializedAdditionalRawData) : base(instanceType, serializedAdditionalRawData) + { + InstanceType = instanceType ?? "Unknown"; + } + + /// Initializes a new instance of for deserialization. + internal UnknownDataReplicationEventCustomProperties() + { + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownDataReplicationExtensionCustomProperties.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownDataReplicationExtensionCustomProperties.Serialization.cs new file mode 100644 index 000000000000..5c22d1ec72ae --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownDataReplicationExtensionCustomProperties.Serialization.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + internal partial class UnknownDataReplicationExtensionCustomProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationExtensionCustomProperties)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + DataReplicationExtensionCustomProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationExtensionCustomProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataReplicationExtensionCustomProperties(document.RootElement, options); + } + + internal static UnknownDataReplicationExtensionCustomProperties DeserializeUnknownDataReplicationExtensionCustomProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string instanceType = "Unknown"; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("instanceType"u8)) + { + instanceType = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownDataReplicationExtensionCustomProperties(instanceType, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DataReplicationExtensionCustomProperties)} does not support writing '{options.Format}' format."); + } + } + + DataReplicationExtensionCustomProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataReplicationExtensionCustomProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataReplicationExtensionCustomProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownDataReplicationExtensionCustomProperties.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownDataReplicationExtensionCustomProperties.cs new file mode 100644 index 000000000000..4ee2b0074542 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownDataReplicationExtensionCustomProperties.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Unknown version of DataReplicationExtensionCustomProperties. + internal partial class UnknownDataReplicationExtensionCustomProperties : DataReplicationExtensionCustomProperties + { + /// Initializes a new instance of . + /// Discriminator property for DataReplicationExtensionCustomProperties. + /// Keeps track of any properties unknown to the library. + internal UnknownDataReplicationExtensionCustomProperties(string instanceType, IDictionary serializedAdditionalRawData) : base(instanceType, serializedAdditionalRawData) + { + InstanceType = instanceType ?? "Unknown"; + } + + /// Initializes a new instance of for deserialization. + internal UnknownDataReplicationExtensionCustomProperties() + { + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownDataReplicationFabricAgentCustomProperties.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownDataReplicationFabricAgentCustomProperties.Serialization.cs new file mode 100644 index 000000000000..cacd59c30927 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownDataReplicationFabricAgentCustomProperties.Serialization.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + internal partial class UnknownDataReplicationFabricAgentCustomProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationFabricAgentCustomProperties)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + DataReplicationFabricAgentCustomProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationFabricAgentCustomProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataReplicationFabricAgentCustomProperties(document.RootElement, options); + } + + internal static UnknownDataReplicationFabricAgentCustomProperties DeserializeUnknownDataReplicationFabricAgentCustomProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string instanceType = "Unknown"; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("instanceType"u8)) + { + instanceType = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownDataReplicationFabricAgentCustomProperties(instanceType, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DataReplicationFabricAgentCustomProperties)} does not support writing '{options.Format}' format."); + } + } + + DataReplicationFabricAgentCustomProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataReplicationFabricAgentCustomProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataReplicationFabricAgentCustomProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownDataReplicationFabricAgentCustomProperties.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownDataReplicationFabricAgentCustomProperties.cs new file mode 100644 index 000000000000..d3bdbb783a48 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownDataReplicationFabricAgentCustomProperties.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Unknown version of DataReplicationFabricAgentCustomProperties. + internal partial class UnknownDataReplicationFabricAgentCustomProperties : DataReplicationFabricAgentCustomProperties + { + /// Initializes a new instance of . + /// Discriminator property for DataReplicationFabricAgentCustomProperties. + /// Keeps track of any properties unknown to the library. + internal UnknownDataReplicationFabricAgentCustomProperties(string instanceType, IDictionary serializedAdditionalRawData) : base(instanceType, serializedAdditionalRawData) + { + InstanceType = instanceType ?? "Unknown"; + } + + /// Initializes a new instance of for deserialization. + internal UnknownDataReplicationFabricAgentCustomProperties() + { + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownDataReplicationFabricCustomProperties.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownDataReplicationFabricCustomProperties.Serialization.cs new file mode 100644 index 000000000000..aed5d2c2005f --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownDataReplicationFabricCustomProperties.Serialization.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + internal partial class UnknownDataReplicationFabricCustomProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationFabricCustomProperties)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + DataReplicationFabricCustomProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationFabricCustomProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataReplicationFabricCustomProperties(document.RootElement, options); + } + + internal static UnknownDataReplicationFabricCustomProperties DeserializeUnknownDataReplicationFabricCustomProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string instanceType = "Unknown"; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("instanceType"u8)) + { + instanceType = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownDataReplicationFabricCustomProperties(instanceType, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DataReplicationFabricCustomProperties)} does not support writing '{options.Format}' format."); + } + } + + DataReplicationFabricCustomProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataReplicationFabricCustomProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataReplicationFabricCustomProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownDataReplicationFabricCustomProperties.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownDataReplicationFabricCustomProperties.cs new file mode 100644 index 000000000000..ac9d5ca7db1e --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownDataReplicationFabricCustomProperties.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Unknown version of DataReplicationFabricCustomProperties. + internal partial class UnknownDataReplicationFabricCustomProperties : DataReplicationFabricCustomProperties + { + /// Initializes a new instance of . + /// Discriminator property for DataReplicationFabricCustomProperties. + /// Keeps track of any properties unknown to the library. + internal UnknownDataReplicationFabricCustomProperties(string instanceType, IDictionary serializedAdditionalRawData) : base(instanceType, serializedAdditionalRawData) + { + InstanceType = instanceType ?? "Unknown"; + } + + /// Initializes a new instance of for deserialization. + internal UnknownDataReplicationFabricCustomProperties() + { + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownDataReplicationJobCustomProperties.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownDataReplicationJobCustomProperties.Serialization.cs new file mode 100644 index 000000000000..d1769a51e84d --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownDataReplicationJobCustomProperties.Serialization.cs @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + internal partial class UnknownDataReplicationJobCustomProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationJobCustomProperties)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + DataReplicationJobCustomProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationJobCustomProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataReplicationJobCustomProperties(document.RootElement, options); + } + + internal static UnknownDataReplicationJobCustomProperties DeserializeUnknownDataReplicationJobCustomProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string instanceType = "Unknown"; + JobModelCustomPropertiesAffectedObjectDetails affectedObjectDetails = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("instanceType"u8)) + { + instanceType = property.Value.GetString(); + continue; + } + if (property.NameEquals("affectedObjectDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + affectedObjectDetails = JobModelCustomPropertiesAffectedObjectDetails.DeserializeJobModelCustomPropertiesAffectedObjectDetails(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownDataReplicationJobCustomProperties(instanceType, affectedObjectDetails, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DataReplicationJobCustomProperties)} does not support writing '{options.Format}' format."); + } + } + + DataReplicationJobCustomProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataReplicationJobCustomProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataReplicationJobCustomProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownDataReplicationJobCustomProperties.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownDataReplicationJobCustomProperties.cs new file mode 100644 index 000000000000..383e0c8382e5 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownDataReplicationJobCustomProperties.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Unknown version of DataReplicationJobCustomProperties. + internal partial class UnknownDataReplicationJobCustomProperties : DataReplicationJobCustomProperties + { + /// Initializes a new instance of . + /// Discriminator property for DataReplicationJobCustomProperties. + /// Gets or sets any custom properties of the affected object. + /// Keeps track of any properties unknown to the library. + internal UnknownDataReplicationJobCustomProperties(string instanceType, JobModelCustomPropertiesAffectedObjectDetails affectedObjectDetails, IDictionary serializedAdditionalRawData) : base(instanceType, affectedObjectDetails, serializedAdditionalRawData) + { + InstanceType = instanceType ?? "Unknown"; + } + + /// Initializes a new instance of for deserialization. + internal UnknownDataReplicationJobCustomProperties() + { + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownDataReplicationPolicyCustomProperties.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownDataReplicationPolicyCustomProperties.Serialization.cs new file mode 100644 index 000000000000..bf28fa7846ce --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownDataReplicationPolicyCustomProperties.Serialization.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + internal partial class UnknownDataReplicationPolicyCustomProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationPolicyCustomProperties)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + DataReplicationPolicyCustomProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationPolicyCustomProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataReplicationPolicyCustomProperties(document.RootElement, options); + } + + internal static UnknownDataReplicationPolicyCustomProperties DeserializeUnknownDataReplicationPolicyCustomProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string instanceType = "Unknown"; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("instanceType"u8)) + { + instanceType = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownDataReplicationPolicyCustomProperties(instanceType, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DataReplicationPolicyCustomProperties)} does not support writing '{options.Format}' format."); + } + } + + DataReplicationPolicyCustomProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataReplicationPolicyCustomProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataReplicationPolicyCustomProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownDataReplicationPolicyCustomProperties.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownDataReplicationPolicyCustomProperties.cs new file mode 100644 index 000000000000..2bb868c42baa --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownDataReplicationPolicyCustomProperties.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Unknown version of DataReplicationPolicyCustomProperties. + internal partial class UnknownDataReplicationPolicyCustomProperties : DataReplicationPolicyCustomProperties + { + /// Initializes a new instance of . + /// Discriminator property for DataReplicationPolicyCustomProperties. + /// Keeps track of any properties unknown to the library. + internal UnknownDataReplicationPolicyCustomProperties(string instanceType, IDictionary serializedAdditionalRawData) : base(instanceType, serializedAdditionalRawData) + { + InstanceType = instanceType ?? "Unknown"; + } + + /// Initializes a new instance of for deserialization. + internal UnknownDataReplicationPolicyCustomProperties() + { + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownDataReplicationProtectedItemCustomProperties.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownDataReplicationProtectedItemCustomProperties.Serialization.cs new file mode 100644 index 000000000000..f763e047053e --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownDataReplicationProtectedItemCustomProperties.Serialization.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + internal partial class UnknownDataReplicationProtectedItemCustomProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationProtectedItemCustomProperties)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + DataReplicationProtectedItemCustomProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationProtectedItemCustomProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataReplicationProtectedItemCustomProperties(document.RootElement, options); + } + + internal static UnknownDataReplicationProtectedItemCustomProperties DeserializeUnknownDataReplicationProtectedItemCustomProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string instanceType = "Unknown"; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("instanceType"u8)) + { + instanceType = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownDataReplicationProtectedItemCustomProperties(instanceType, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DataReplicationProtectedItemCustomProperties)} does not support writing '{options.Format}' format."); + } + } + + DataReplicationProtectedItemCustomProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataReplicationProtectedItemCustomProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataReplicationProtectedItemCustomProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownDataReplicationProtectedItemCustomProperties.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownDataReplicationProtectedItemCustomProperties.cs new file mode 100644 index 000000000000..818ca7ce7472 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownDataReplicationProtectedItemCustomProperties.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Unknown version of DataReplicationProtectedItemCustomProperties. + internal partial class UnknownDataReplicationProtectedItemCustomProperties : DataReplicationProtectedItemCustomProperties + { + /// Initializes a new instance of . + /// Discriminator property for DataReplicationProtectedItemCustomProperties. + /// Keeps track of any properties unknown to the library. + internal UnknownDataReplicationProtectedItemCustomProperties(string instanceType, IDictionary serializedAdditionalRawData) : base(instanceType, serializedAdditionalRawData) + { + InstanceType = instanceType ?? "Unknown"; + } + + /// Initializes a new instance of for deserialization. + internal UnknownDataReplicationProtectedItemCustomProperties() + { + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownDataReplicationProtectedItemCustomPropertiesUpdate.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownDataReplicationProtectedItemCustomPropertiesUpdate.Serialization.cs new file mode 100644 index 000000000000..c45d443df947 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownDataReplicationProtectedItemCustomPropertiesUpdate.Serialization.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + internal partial class UnknownDataReplicationProtectedItemCustomPropertiesUpdate : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationProtectedItemCustomPropertiesUpdate)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + DataReplicationProtectedItemCustomPropertiesUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationProtectedItemCustomPropertiesUpdate)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataReplicationProtectedItemCustomPropertiesUpdate(document.RootElement, options); + } + + internal static UnknownDataReplicationProtectedItemCustomPropertiesUpdate DeserializeUnknownDataReplicationProtectedItemCustomPropertiesUpdate(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string instanceType = "Unknown"; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("instanceType"u8)) + { + instanceType = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownDataReplicationProtectedItemCustomPropertiesUpdate(instanceType, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DataReplicationProtectedItemCustomPropertiesUpdate)} does not support writing '{options.Format}' format."); + } + } + + DataReplicationProtectedItemCustomPropertiesUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataReplicationProtectedItemCustomPropertiesUpdate(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataReplicationProtectedItemCustomPropertiesUpdate)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownDataReplicationProtectedItemCustomPropertiesUpdate.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownDataReplicationProtectedItemCustomPropertiesUpdate.cs new file mode 100644 index 000000000000..04e22418a734 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownDataReplicationProtectedItemCustomPropertiesUpdate.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Unknown version of DataReplicationProtectedItemCustomPropertiesUpdate. + internal partial class UnknownDataReplicationProtectedItemCustomPropertiesUpdate : DataReplicationProtectedItemCustomPropertiesUpdate + { + /// Initializes a new instance of . + /// Discriminator property for DataReplicationProtectedItemCustomPropertiesUpdate. + /// Keeps track of any properties unknown to the library. + internal UnknownDataReplicationProtectedItemCustomPropertiesUpdate(string instanceType, IDictionary serializedAdditionalRawData) : base(instanceType, serializedAdditionalRawData) + { + InstanceType = instanceType ?? "Unknown"; + } + + /// Initializes a new instance of for deserialization. + internal UnknownDataReplicationProtectedItemCustomPropertiesUpdate() + { + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownDataReplicationRecoveryPointCustomProperties.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownDataReplicationRecoveryPointCustomProperties.Serialization.cs new file mode 100644 index 000000000000..867e6168973b --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownDataReplicationRecoveryPointCustomProperties.Serialization.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + internal partial class UnknownDataReplicationRecoveryPointCustomProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationRecoveryPointCustomProperties)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + DataReplicationRecoveryPointCustomProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataReplicationRecoveryPointCustomProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataReplicationRecoveryPointCustomProperties(document.RootElement, options); + } + + internal static UnknownDataReplicationRecoveryPointCustomProperties DeserializeUnknownDataReplicationRecoveryPointCustomProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string instanceType = "Unknown"; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("instanceType"u8)) + { + instanceType = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownDataReplicationRecoveryPointCustomProperties(instanceType, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DataReplicationRecoveryPointCustomProperties)} does not support writing '{options.Format}' format."); + } + } + + DataReplicationRecoveryPointCustomProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataReplicationRecoveryPointCustomProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataReplicationRecoveryPointCustomProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownDataReplicationRecoveryPointCustomProperties.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownDataReplicationRecoveryPointCustomProperties.cs new file mode 100644 index 000000000000..73f536d6dcac --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownDataReplicationRecoveryPointCustomProperties.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Unknown version of DataReplicationRecoveryPointCustomProperties. + internal partial class UnknownDataReplicationRecoveryPointCustomProperties : DataReplicationRecoveryPointCustomProperties + { + /// Initializes a new instance of . + /// Discriminator property for DataReplicationRecoveryPointCustomProperties. + /// Keeps track of any properties unknown to the library. + internal UnknownDataReplicationRecoveryPointCustomProperties(string instanceType, IDictionary serializedAdditionalRawData) : base(instanceType, serializedAdditionalRawData) + { + InstanceType = instanceType ?? "Unknown"; + } + + /// Initializes a new instance of for deserialization. + internal UnknownDataReplicationRecoveryPointCustomProperties() + { + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownPlannedFailoverCustomProperties.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownPlannedFailoverCustomProperties.Serialization.cs new file mode 100644 index 000000000000..10751449a45f --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownPlannedFailoverCustomProperties.Serialization.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + internal partial class UnknownPlannedFailoverCustomProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PlannedFailoverCustomProperties)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + PlannedFailoverCustomProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PlannedFailoverCustomProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePlannedFailoverCustomProperties(document.RootElement, options); + } + + internal static UnknownPlannedFailoverCustomProperties DeserializeUnknownPlannedFailoverCustomProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string instanceType = "Unknown"; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("instanceType"u8)) + { + instanceType = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownPlannedFailoverCustomProperties(instanceType, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(PlannedFailoverCustomProperties)} does not support writing '{options.Format}' format."); + } + } + + PlannedFailoverCustomProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializePlannedFailoverCustomProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PlannedFailoverCustomProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownPlannedFailoverCustomProperties.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownPlannedFailoverCustomProperties.cs new file mode 100644 index 000000000000..d733e7e7d101 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/UnknownPlannedFailoverCustomProperties.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Unknown version of PlannedFailoverCustomProperties. + internal partial class UnknownPlannedFailoverCustomProperties : PlannedFailoverCustomProperties + { + /// Initializes a new instance of . + /// Discriminator property for PlannedFailoverCustomProperties. + /// Keeps track of any properties unknown to the library. + internal UnknownPlannedFailoverCustomProperties(string instanceType, IDictionary serializedAdditionalRawData) : base(instanceType, serializedAdditionalRawData) + { + InstanceType = instanceType ?? "Unknown"; + } + + /// Initializes a new instance of for deserialization. + internal UnknownPlannedFailoverCustomProperties() + { + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareFabricAgentCustomProperties.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareFabricAgentCustomProperties.Serialization.cs new file mode 100644 index 000000000000..180163d88a64 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareFabricAgentCustomProperties.Serialization.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class VMwareFabricAgentCustomProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(VMwareFabricAgentCustomProperties)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("biosId"u8); + writer.WriteStringValue(BiosId); + writer.WritePropertyName("marsAuthenticationIdentity"u8); + writer.WriteObjectValue(MarsAuthenticationIdentity, options); + } + + VMwareFabricAgentCustomProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(VMwareFabricAgentCustomProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeVMwareFabricAgentCustomProperties(document.RootElement, options); + } + + internal static VMwareFabricAgentCustomProperties DeserializeVMwareFabricAgentCustomProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string biosId = default; + DataReplicationIdentity marsAuthenticationIdentity = default; + string instanceType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("biosId"u8)) + { + biosId = property.Value.GetString(); + continue; + } + if (property.NameEquals("marsAuthenticationIdentity"u8)) + { + marsAuthenticationIdentity = DataReplicationIdentity.DeserializeDataReplicationIdentity(property.Value, options); + continue; + } + if (property.NameEquals("instanceType"u8)) + { + instanceType = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new VMwareFabricAgentCustomProperties(instanceType, serializedAdditionalRawData, biosId, marsAuthenticationIdentity); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(VMwareFabricAgentCustomProperties)} does not support writing '{options.Format}' format."); + } + } + + VMwareFabricAgentCustomProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeVMwareFabricAgentCustomProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(VMwareFabricAgentCustomProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareFabricAgentCustomProperties.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareFabricAgentCustomProperties.cs new file mode 100644 index 000000000000..45d542e0359d --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareFabricAgentCustomProperties.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// VMware fabric agent model custom properties. + public partial class VMwareFabricAgentCustomProperties : DataReplicationFabricAgentCustomProperties + { + /// Initializes a new instance of . + /// Gets or sets the BIOS Id of the fabric agent machine. + /// Identity model. + /// or is null. + public VMwareFabricAgentCustomProperties(string biosId, DataReplicationIdentity marsAuthenticationIdentity) + { + Argument.AssertNotNull(biosId, nameof(biosId)); + Argument.AssertNotNull(marsAuthenticationIdentity, nameof(marsAuthenticationIdentity)); + + BiosId = biosId; + MarsAuthenticationIdentity = marsAuthenticationIdentity; + InstanceType = "VMware"; + } + + /// Initializes a new instance of . + /// Discriminator property for DataReplicationFabricAgentCustomProperties. + /// Keeps track of any properties unknown to the library. + /// Gets or sets the BIOS Id of the fabric agent machine. + /// Identity model. + internal VMwareFabricAgentCustomProperties(string instanceType, IDictionary serializedAdditionalRawData, string biosId, DataReplicationIdentity marsAuthenticationIdentity) : base(instanceType, serializedAdditionalRawData) + { + BiosId = biosId; + MarsAuthenticationIdentity = marsAuthenticationIdentity; + InstanceType = instanceType ?? "VMware"; + } + + /// Initializes a new instance of for deserialization. + internal VMwareFabricAgentCustomProperties() + { + } + + /// Gets or sets the BIOS Id of the fabric agent machine. + public string BiosId { get; set; } + /// Identity model. + public DataReplicationIdentity MarsAuthenticationIdentity { get; set; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareMigrateFabricCustomProperties.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareMigrateFabricCustomProperties.Serialization.cs new file mode 100644 index 000000000000..57340f216d6b --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareMigrateFabricCustomProperties.Serialization.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class VMwareMigrateFabricCustomProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(VMwareMigrateFabricCustomProperties)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("vmwareSiteId"u8); + writer.WriteStringValue(VmwareSiteId); + writer.WritePropertyName("migrationSolutionId"u8); + writer.WriteStringValue(MigrationSolutionId); + } + + VMwareMigrateFabricCustomProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(VMwareMigrateFabricCustomProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeVMwareMigrateFabricCustomProperties(document.RootElement, options); + } + + internal static VMwareMigrateFabricCustomProperties DeserializeVMwareMigrateFabricCustomProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier vmwareSiteId = default; + ResourceIdentifier migrationSolutionId = default; + string instanceType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("vmwareSiteId"u8)) + { + vmwareSiteId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("migrationSolutionId"u8)) + { + migrationSolutionId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("instanceType"u8)) + { + instanceType = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new VMwareMigrateFabricCustomProperties(instanceType, serializedAdditionalRawData, vmwareSiteId, migrationSolutionId); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(VMwareMigrateFabricCustomProperties)} does not support writing '{options.Format}' format."); + } + } + + VMwareMigrateFabricCustomProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeVMwareMigrateFabricCustomProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(VMwareMigrateFabricCustomProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareMigrateFabricCustomProperties.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareMigrateFabricCustomProperties.cs new file mode 100644 index 000000000000..cfb0cf0099d9 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareMigrateFabricCustomProperties.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.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// VMware migrate fabric model custom properties. + public partial class VMwareMigrateFabricCustomProperties : DataReplicationFabricCustomProperties + { + /// Initializes a new instance of . + /// Gets or sets the ARM Id of the VMware site. + /// Gets or sets the ARM Id of the migration solution. + /// or is null. + public VMwareMigrateFabricCustomProperties(ResourceIdentifier vmwareSiteId, ResourceIdentifier migrationSolutionId) + { + Argument.AssertNotNull(vmwareSiteId, nameof(vmwareSiteId)); + Argument.AssertNotNull(migrationSolutionId, nameof(migrationSolutionId)); + + VmwareSiteId = vmwareSiteId; + MigrationSolutionId = migrationSolutionId; + InstanceType = "VMwareMigrate"; + } + + /// Initializes a new instance of . + /// Discriminator property for DataReplicationFabricCustomProperties. + /// Keeps track of any properties unknown to the library. + /// Gets or sets the ARM Id of the VMware site. + /// Gets or sets the ARM Id of the migration solution. + internal VMwareMigrateFabricCustomProperties(string instanceType, IDictionary serializedAdditionalRawData, ResourceIdentifier vmwareSiteId, ResourceIdentifier migrationSolutionId) : base(instanceType, serializedAdditionalRawData) + { + VmwareSiteId = vmwareSiteId; + MigrationSolutionId = migrationSolutionId; + InstanceType = instanceType ?? "VMwareMigrate"; + } + + /// Initializes a new instance of for deserialization. + internal VMwareMigrateFabricCustomProperties() + { + } + + /// Gets or sets the ARM Id of the VMware site. + public ResourceIdentifier VmwareSiteId { get; set; } + /// Gets or sets the ARM Id of the migration solution. + public ResourceIdentifier MigrationSolutionId { get; set; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciDiskInput.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciDiskInput.Serialization.cs new file mode 100644 index 000000000000..44f709633dbc --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciDiskInput.Serialization.cs @@ -0,0 +1,263 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class VMwareToAzStackHciDiskInput : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(VMwareToAzStackHciDiskInput)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("diskId"u8); + writer.WriteStringValue(DiskId); + if (Optional.IsDefined(StorageContainerId)) + { + writer.WritePropertyName("storageContainerId"u8); + writer.WriteStringValue(StorageContainerId); + } + if (Optional.IsDefined(IsDynamic)) + { + writer.WritePropertyName("isDynamic"u8); + writer.WriteBooleanValue(IsDynamic.Value); + } + writer.WritePropertyName("diskSizeGB"u8); + writer.WriteNumberValue(DiskSizeGB); + writer.WritePropertyName("diskFileFormat"u8); + writer.WriteStringValue(DiskFileFormat); + writer.WritePropertyName("isOsDisk"u8); + writer.WriteBooleanValue(IsOSDisk); + if (Optional.IsDefined(DiskBlockSize)) + { + writer.WritePropertyName("diskBlockSize"u8); + writer.WriteNumberValue(DiskBlockSize.Value); + } + if (Optional.IsDefined(DiskLogicalSectorSize)) + { + writer.WritePropertyName("diskLogicalSectorSize"u8); + writer.WriteNumberValue(DiskLogicalSectorSize.Value); + } + if (Optional.IsDefined(DiskPhysicalSectorSize)) + { + writer.WritePropertyName("diskPhysicalSectorSize"u8); + writer.WriteNumberValue(DiskPhysicalSectorSize.Value); + } + if (Optional.IsDefined(DiskIdentifier)) + { + writer.WritePropertyName("diskIdentifier"u8); + writer.WriteStringValue(DiskIdentifier); + } + if (Optional.IsDefined(DiskController)) + { + writer.WritePropertyName("diskController"u8); + writer.WriteObjectValue(DiskController, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + VMwareToAzStackHciDiskInput IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(VMwareToAzStackHciDiskInput)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeVMwareToAzStackHciDiskInput(document.RootElement, options); + } + + internal static VMwareToAzStackHciDiskInput DeserializeVMwareToAzStackHciDiskInput(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string diskId = default; + ResourceIdentifier storageContainerId = default; + bool? isDynamic = default; + long diskSizeGB = default; + string diskFileFormat = default; + bool isOSDisk = default; + long? diskBlockSize = default; + long? diskLogicalSectorSize = default; + long? diskPhysicalSectorSize = default; + string diskIdentifier = default; + DataReplicationDiskControllerInputs diskController = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("diskId"u8)) + { + diskId = property.Value.GetString(); + continue; + } + if (property.NameEquals("storageContainerId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + storageContainerId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("isDynamic"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isDynamic = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("diskSizeGB"u8)) + { + diskSizeGB = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("diskFileFormat"u8)) + { + diskFileFormat = property.Value.GetString(); + continue; + } + if (property.NameEquals("isOsDisk"u8)) + { + isOSDisk = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("diskBlockSize"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + diskBlockSize = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("diskLogicalSectorSize"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + diskLogicalSectorSize = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("diskPhysicalSectorSize"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + diskPhysicalSectorSize = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("diskIdentifier"u8)) + { + diskIdentifier = property.Value.GetString(); + continue; + } + if (property.NameEquals("diskController"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + diskController = DataReplicationDiskControllerInputs.DeserializeDataReplicationDiskControllerInputs(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new VMwareToAzStackHciDiskInput( + diskId, + storageContainerId, + isDynamic, + diskSizeGB, + diskFileFormat, + isOSDisk, + diskBlockSize, + diskLogicalSectorSize, + diskPhysicalSectorSize, + diskIdentifier, + diskController, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(VMwareToAzStackHciDiskInput)} does not support writing '{options.Format}' format."); + } + } + + VMwareToAzStackHciDiskInput IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeVMwareToAzStackHciDiskInput(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(VMwareToAzStackHciDiskInput)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciDiskInput.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciDiskInput.cs new file mode 100644 index 000000000000..01df92aa0379 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciDiskInput.cs @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// VMwareToAzStack disk input. + public partial class VMwareToAzStackHciDiskInput + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Gets or sets the disk Id. + /// Gets or sets the disk size in GB. + /// Gets or sets the type of the virtual hard disk, vhd or vhdx. + /// Gets or sets a value indicating whether disk is os disk. + /// or is null. + public VMwareToAzStackHciDiskInput(string diskId, long diskSizeGB, string diskFileFormat, bool isOSDisk) + { + Argument.AssertNotNull(diskId, nameof(diskId)); + Argument.AssertNotNull(diskFileFormat, nameof(diskFileFormat)); + + DiskId = diskId; + DiskSizeGB = diskSizeGB; + DiskFileFormat = diskFileFormat; + IsOSDisk = isOSDisk; + } + + /// Initializes a new instance of . + /// Gets or sets the disk Id. + /// Gets or sets the target storage account ARM Id. + /// Gets or sets a value indicating whether dynamic sizing is enabled on the virtual hard disk. + /// Gets or sets the disk size in GB. + /// Gets or sets the type of the virtual hard disk, vhd or vhdx. + /// Gets or sets a value indicating whether disk is os disk. + /// Gets or sets a value of disk block size. + /// Gets or sets a value of disk logical sector size. + /// Gets or sets a value of disk physical sector size. + /// Gets or sets a value of disk identifier. + /// Disk controller. + /// Keeps track of any properties unknown to the library. + internal VMwareToAzStackHciDiskInput(string diskId, ResourceIdentifier storageContainerId, bool? isDynamic, long diskSizeGB, string diskFileFormat, bool isOSDisk, long? diskBlockSize, long? diskLogicalSectorSize, long? diskPhysicalSectorSize, string diskIdentifier, DataReplicationDiskControllerInputs diskController, IDictionary serializedAdditionalRawData) + { + DiskId = diskId; + StorageContainerId = storageContainerId; + IsDynamic = isDynamic; + DiskSizeGB = diskSizeGB; + DiskFileFormat = diskFileFormat; + IsOSDisk = isOSDisk; + DiskBlockSize = diskBlockSize; + DiskLogicalSectorSize = diskLogicalSectorSize; + DiskPhysicalSectorSize = diskPhysicalSectorSize; + DiskIdentifier = diskIdentifier; + DiskController = diskController; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal VMwareToAzStackHciDiskInput() + { + } + + /// Gets or sets the disk Id. + public string DiskId { get; set; } + /// Gets or sets the target storage account ARM Id. + public ResourceIdentifier StorageContainerId { get; set; } + /// Gets or sets a value indicating whether dynamic sizing is enabled on the virtual hard disk. + public bool? IsDynamic { get; set; } + /// Gets or sets the disk size in GB. + public long DiskSizeGB { get; set; } + /// Gets or sets the type of the virtual hard disk, vhd or vhdx. + public string DiskFileFormat { get; set; } + /// Gets or sets a value indicating whether disk is os disk. + public bool IsOSDisk { get; set; } + /// Gets or sets a value of disk block size. + public long? DiskBlockSize { get; set; } + /// Gets or sets a value of disk logical sector size. + public long? DiskLogicalSectorSize { get; set; } + /// Gets or sets a value of disk physical sector size. + public long? DiskPhysicalSectorSize { get; set; } + /// Gets or sets a value of disk identifier. + public string DiskIdentifier { get; set; } + /// Disk controller. + public DataReplicationDiskControllerInputs DiskController { get; set; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciEventCustomProperties.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciEventCustomProperties.Serialization.cs new file mode 100644 index 000000000000..4a236ca915c5 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciEventCustomProperties.Serialization.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class VMwareToAzStackHciEventCustomProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(VMwareToAzStackHciEventCustomProperties)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (options.Format != "W" && Optional.IsDefined(EventSourceFriendlyName)) + { + writer.WritePropertyName("eventSourceFriendlyName"u8); + writer.WriteStringValue(EventSourceFriendlyName); + } + if (options.Format != "W" && Optional.IsDefined(ProtectedItemFriendlyName)) + { + writer.WritePropertyName("protectedItemFriendlyName"u8); + writer.WriteStringValue(ProtectedItemFriendlyName); + } + if (options.Format != "W" && Optional.IsDefined(SourceApplianceName)) + { + writer.WritePropertyName("sourceApplianceName"u8); + writer.WriteStringValue(SourceApplianceName); + } + if (options.Format != "W" && Optional.IsDefined(TargetApplianceName)) + { + writer.WritePropertyName("targetApplianceName"u8); + writer.WriteStringValue(TargetApplianceName); + } + if (options.Format != "W" && Optional.IsDefined(ServerType)) + { + writer.WritePropertyName("serverType"u8); + writer.WriteStringValue(ServerType); + } + } + + VMwareToAzStackHciEventCustomProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(VMwareToAzStackHciEventCustomProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeVMwareToAzStackHciEventCustomProperties(document.RootElement, options); + } + + internal static VMwareToAzStackHciEventCustomProperties DeserializeVMwareToAzStackHciEventCustomProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string eventSourceFriendlyName = default; + string protectedItemFriendlyName = default; + string sourceApplianceName = default; + string targetApplianceName = default; + string serverType = default; + string instanceType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("eventSourceFriendlyName"u8)) + { + eventSourceFriendlyName = property.Value.GetString(); + continue; + } + if (property.NameEquals("protectedItemFriendlyName"u8)) + { + protectedItemFriendlyName = property.Value.GetString(); + continue; + } + if (property.NameEquals("sourceApplianceName"u8)) + { + sourceApplianceName = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetApplianceName"u8)) + { + targetApplianceName = property.Value.GetString(); + continue; + } + if (property.NameEquals("serverType"u8)) + { + serverType = property.Value.GetString(); + continue; + } + if (property.NameEquals("instanceType"u8)) + { + instanceType = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new VMwareToAzStackHciEventCustomProperties( + instanceType, + serializedAdditionalRawData, + eventSourceFriendlyName, + protectedItemFriendlyName, + sourceApplianceName, + targetApplianceName, + serverType); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(VMwareToAzStackHciEventCustomProperties)} does not support writing '{options.Format}' format."); + } + } + + VMwareToAzStackHciEventCustomProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeVMwareToAzStackHciEventCustomProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(VMwareToAzStackHciEventCustomProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciEventCustomProperties.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciEventCustomProperties.cs new file mode 100644 index 000000000000..56b31bf94ea9 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciEventCustomProperties.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.RecoveryServicesDataReplication.Models +{ + /// VMware to AzStackHCI event model custom properties. This class provides provider specific details for events of type DataContract.HealthEvents.HealthEventType.ProtectedItemHealth and DataContract.HealthEvents.HealthEventType.AgentHealth. + public partial class VMwareToAzStackHciEventCustomProperties : DataReplicationEventCustomProperties + { + /// Initializes a new instance of . + internal VMwareToAzStackHciEventCustomProperties() + { + InstanceType = "VMwareToAzStackHCI"; + } + + /// Initializes a new instance of . + /// Discriminator property for DataReplicationEventCustomProperties. + /// Keeps track of any properties unknown to the library. + /// Gets or sets the friendly name of the source which has raised this health event. + /// Gets or sets the protected item friendly name. + /// Gets or sets the source appliance name. + /// Gets or sets the source target name. + /// Gets or sets the server type. + internal VMwareToAzStackHciEventCustomProperties(string instanceType, IDictionary serializedAdditionalRawData, string eventSourceFriendlyName, string protectedItemFriendlyName, string sourceApplianceName, string targetApplianceName, string serverType) : base(instanceType, serializedAdditionalRawData) + { + EventSourceFriendlyName = eventSourceFriendlyName; + ProtectedItemFriendlyName = protectedItemFriendlyName; + SourceApplianceName = sourceApplianceName; + TargetApplianceName = targetApplianceName; + ServerType = serverType; + InstanceType = instanceType ?? "VMwareToAzStackHCI"; + } + + /// Gets or sets the friendly name of the source which has raised this health event. + public string EventSourceFriendlyName { get; } + /// Gets or sets the protected item friendly name. + public string ProtectedItemFriendlyName { get; } + /// Gets or sets the source appliance name. + public string SourceApplianceName { get; } + /// Gets or sets the source target name. + public string TargetApplianceName { get; } + /// Gets or sets the server type. + public string ServerType { get; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciNicInput.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciNicInput.Serialization.cs new file mode 100644 index 000000000000..8401fdcfd165 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciNicInput.Serialization.cs @@ -0,0 +1,214 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class VMwareToAzStackHciNicInput : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(VMwareToAzStackHciNicInput)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("nicId"u8); + writer.WriteStringValue(NicId); + writer.WritePropertyName("label"u8); + writer.WriteStringValue(Label); + if (options.Format != "W" && Optional.IsDefined(NetworkName)) + { + writer.WritePropertyName("networkName"u8); + writer.WriteStringValue(NetworkName); + } + if (Optional.IsDefined(TargetNetworkId)) + { + writer.WritePropertyName("targetNetworkId"u8); + writer.WriteStringValue(TargetNetworkId); + } + if (Optional.IsDefined(TestNetworkId)) + { + writer.WritePropertyName("testNetworkId"u8); + writer.WriteStringValue(TestNetworkId); + } + writer.WritePropertyName("selectionTypeForFailover"u8); + writer.WriteStringValue(SelectionTypeForFailover.ToString()); + if (Optional.IsDefined(IsStaticIPMigrationEnabled)) + { + writer.WritePropertyName("isStaticIpMigrationEnabled"u8); + writer.WriteBooleanValue(IsStaticIPMigrationEnabled.Value); + } + if (Optional.IsDefined(IsMacMigrationEnabled)) + { + writer.WritePropertyName("isMacMigrationEnabled"u8); + writer.WriteBooleanValue(IsMacMigrationEnabled.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + VMwareToAzStackHciNicInput IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(VMwareToAzStackHciNicInput)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeVMwareToAzStackHciNicInput(document.RootElement, options); + } + + internal static VMwareToAzStackHciNicInput DeserializeVMwareToAzStackHciNicInput(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string nicId = default; + string label = default; + string networkName = default; + string targetNetworkId = default; + string testNetworkId = default; + VmNicSelection selectionTypeForFailover = default; + bool? isStaticIPMigrationEnabled = default; + bool? isMacMigrationEnabled = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("nicId"u8)) + { + nicId = property.Value.GetString(); + continue; + } + if (property.NameEquals("label"u8)) + { + label = property.Value.GetString(); + continue; + } + if (property.NameEquals("networkName"u8)) + { + networkName = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetNetworkId"u8)) + { + targetNetworkId = property.Value.GetString(); + continue; + } + if (property.NameEquals("testNetworkId"u8)) + { + testNetworkId = property.Value.GetString(); + continue; + } + if (property.NameEquals("selectionTypeForFailover"u8)) + { + selectionTypeForFailover = new VmNicSelection(property.Value.GetString()); + continue; + } + if (property.NameEquals("isStaticIpMigrationEnabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isStaticIPMigrationEnabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("isMacMigrationEnabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isMacMigrationEnabled = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new VMwareToAzStackHciNicInput( + nicId, + label, + networkName, + targetNetworkId, + testNetworkId, + selectionTypeForFailover, + isStaticIPMigrationEnabled, + isMacMigrationEnabled, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(VMwareToAzStackHciNicInput)} does not support writing '{options.Format}' format."); + } + } + + VMwareToAzStackHciNicInput IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeVMwareToAzStackHciNicInput(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(VMwareToAzStackHciNicInput)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciNicInput.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciNicInput.cs new file mode 100644 index 000000000000..b8851668908c --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciNicInput.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// VMwareToAzStackHCI NIC properties. + public partial class VMwareToAzStackHciNicInput + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Gets or sets the NIC Id. + /// Gets or sets the NIC label. + /// Gets or sets the selection type of the NIC. + /// or is null. + public VMwareToAzStackHciNicInput(string nicId, string label, VmNicSelection selectionTypeForFailover) + { + Argument.AssertNotNull(nicId, nameof(nicId)); + Argument.AssertNotNull(label, nameof(label)); + + NicId = nicId; + Label = label; + SelectionTypeForFailover = selectionTypeForFailover; + } + + /// Initializes a new instance of . + /// Gets or sets the NIC Id. + /// Gets or sets the NIC label. + /// Gets or sets the network name. + /// Gets or sets the target network Id within AzStackHCI Cluster. + /// Gets or sets the target test network Id within AzStackHCI Cluster. + /// Gets or sets the selection type of the NIC. + /// Gets or sets a value indicating whether static ip migration is enabled. + /// Gets or sets a value indicating whether mac address migration is enabled. + /// Keeps track of any properties unknown to the library. + internal VMwareToAzStackHciNicInput(string nicId, string label, string networkName, string targetNetworkId, string testNetworkId, VmNicSelection selectionTypeForFailover, bool? isStaticIPMigrationEnabled, bool? isMacMigrationEnabled, IDictionary serializedAdditionalRawData) + { + NicId = nicId; + Label = label; + NetworkName = networkName; + TargetNetworkId = targetNetworkId; + TestNetworkId = testNetworkId; + SelectionTypeForFailover = selectionTypeForFailover; + IsStaticIPMigrationEnabled = isStaticIPMigrationEnabled; + IsMacMigrationEnabled = isMacMigrationEnabled; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal VMwareToAzStackHciNicInput() + { + } + + /// Gets or sets the NIC Id. + public string NicId { get; set; } + /// Gets or sets the NIC label. + public string Label { get; set; } + /// Gets or sets the network name. + public string NetworkName { get; } + /// Gets or sets the target network Id within AzStackHCI Cluster. + public string TargetNetworkId { get; set; } + /// Gets or sets the target test network Id within AzStackHCI Cluster. + public string TestNetworkId { get; set; } + /// Gets or sets the selection type of the NIC. + public VmNicSelection SelectionTypeForFailover { get; set; } + /// Gets or sets a value indicating whether static ip migration is enabled. + public bool? IsStaticIPMigrationEnabled { get; set; } + /// Gets or sets a value indicating whether mac address migration is enabled. + public bool? IsMacMigrationEnabled { get; set; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciPlannedFailoverCustomProperties.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciPlannedFailoverCustomProperties.Serialization.cs new file mode 100644 index 000000000000..f50eab8f2b5b --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciPlannedFailoverCustomProperties.Serialization.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class VMwareToAzStackHciPlannedFailoverCustomProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(VMwareToAzStackHciPlannedFailoverCustomProperties)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("shutdownSourceVM"u8); + writer.WriteBooleanValue(ShutdownSourceVm); + } + + VMwareToAzStackHciPlannedFailoverCustomProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(VMwareToAzStackHciPlannedFailoverCustomProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeVMwareToAzStackHciPlannedFailoverCustomProperties(document.RootElement, options); + } + + internal static VMwareToAzStackHciPlannedFailoverCustomProperties DeserializeVMwareToAzStackHciPlannedFailoverCustomProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool shutdownSourceVm = default; + string instanceType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("shutdownSourceVM"u8)) + { + shutdownSourceVm = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("instanceType"u8)) + { + instanceType = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new VMwareToAzStackHciPlannedFailoverCustomProperties(instanceType, serializedAdditionalRawData, shutdownSourceVm); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(VMwareToAzStackHciPlannedFailoverCustomProperties)} does not support writing '{options.Format}' format."); + } + } + + VMwareToAzStackHciPlannedFailoverCustomProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeVMwareToAzStackHciPlannedFailoverCustomProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(VMwareToAzStackHciPlannedFailoverCustomProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciPlannedFailoverCustomProperties.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciPlannedFailoverCustomProperties.cs new file mode 100644 index 000000000000..1e8806865740 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciPlannedFailoverCustomProperties.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; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// VMware to AzStackHCI planned failover model custom properties. + public partial class VMwareToAzStackHciPlannedFailoverCustomProperties : PlannedFailoverCustomProperties + { + /// Initializes a new instance of . + /// Gets or sets a value indicating whether VM needs to be shut down. + public VMwareToAzStackHciPlannedFailoverCustomProperties(bool shutdownSourceVm) + { + ShutdownSourceVm = shutdownSourceVm; + InstanceType = "VMwareToAzStackHCI"; + } + + /// Initializes a new instance of . + /// Discriminator property for PlannedFailoverCustomProperties. + /// Keeps track of any properties unknown to the library. + /// Gets or sets a value indicating whether VM needs to be shut down. + internal VMwareToAzStackHciPlannedFailoverCustomProperties(string instanceType, IDictionary serializedAdditionalRawData, bool shutdownSourceVm) : base(instanceType, serializedAdditionalRawData) + { + ShutdownSourceVm = shutdownSourceVm; + InstanceType = instanceType ?? "VMwareToAzStackHCI"; + } + + /// Initializes a new instance of for deserialization. + internal VMwareToAzStackHciPlannedFailoverCustomProperties() + { + } + + /// Gets or sets a value indicating whether VM needs to be shut down. + public bool ShutdownSourceVm { get; set; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciPolicyCustomProperties.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciPolicyCustomProperties.Serialization.cs new file mode 100644 index 000000000000..d23c47f80a33 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciPolicyCustomProperties.Serialization.cs @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class VMwareToAzStackHciPolicyCustomProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(VMwareToAzStackHciPolicyCustomProperties)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("recoveryPointHistoryInMinutes"u8); + writer.WriteNumberValue(RecoveryPointHistoryInMinutes); + writer.WritePropertyName("crashConsistentFrequencyInMinutes"u8); + writer.WriteNumberValue(CrashConsistentFrequencyInMinutes); + writer.WritePropertyName("appConsistentFrequencyInMinutes"u8); + writer.WriteNumberValue(AppConsistentFrequencyInMinutes); + } + + VMwareToAzStackHciPolicyCustomProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(VMwareToAzStackHciPolicyCustomProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeVMwareToAzStackHciPolicyCustomProperties(document.RootElement, options); + } + + internal static VMwareToAzStackHciPolicyCustomProperties DeserializeVMwareToAzStackHciPolicyCustomProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int recoveryPointHistoryInMinutes = default; + int crashConsistentFrequencyInMinutes = default; + int appConsistentFrequencyInMinutes = default; + string instanceType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("recoveryPointHistoryInMinutes"u8)) + { + recoveryPointHistoryInMinutes = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("crashConsistentFrequencyInMinutes"u8)) + { + crashConsistentFrequencyInMinutes = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("appConsistentFrequencyInMinutes"u8)) + { + appConsistentFrequencyInMinutes = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("instanceType"u8)) + { + instanceType = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new VMwareToAzStackHciPolicyCustomProperties(instanceType, serializedAdditionalRawData, recoveryPointHistoryInMinutes, crashConsistentFrequencyInMinutes, appConsistentFrequencyInMinutes); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(VMwareToAzStackHciPolicyCustomProperties)} does not support writing '{options.Format}' format."); + } + } + + VMwareToAzStackHciPolicyCustomProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeVMwareToAzStackHciPolicyCustomProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(VMwareToAzStackHciPolicyCustomProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciPolicyCustomProperties.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciPolicyCustomProperties.cs new file mode 100644 index 000000000000..8291589dda12 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciPolicyCustomProperties.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// VMware To AzStackHCI Policy model custom properties. + public partial class VMwareToAzStackHciPolicyCustomProperties : DataReplicationPolicyCustomProperties + { + /// Initializes a new instance of . + /// Gets or sets the duration in minutes until which the recovery points need to be stored. + /// Gets or sets the crash consistent snapshot frequency (in minutes). + /// Gets or sets the app consistent snapshot frequency (in minutes). + public VMwareToAzStackHciPolicyCustomProperties(int recoveryPointHistoryInMinutes, int crashConsistentFrequencyInMinutes, int appConsistentFrequencyInMinutes) + { + RecoveryPointHistoryInMinutes = recoveryPointHistoryInMinutes; + CrashConsistentFrequencyInMinutes = crashConsistentFrequencyInMinutes; + AppConsistentFrequencyInMinutes = appConsistentFrequencyInMinutes; + InstanceType = "VMwareToAzStackHCI"; + } + + /// Initializes a new instance of . + /// Discriminator property for DataReplicationPolicyCustomProperties. + /// Keeps track of any properties unknown to the library. + /// Gets or sets the duration in minutes until which the recovery points need to be stored. + /// Gets or sets the crash consistent snapshot frequency (in minutes). + /// Gets or sets the app consistent snapshot frequency (in minutes). + internal VMwareToAzStackHciPolicyCustomProperties(string instanceType, IDictionary serializedAdditionalRawData, int recoveryPointHistoryInMinutes, int crashConsistentFrequencyInMinutes, int appConsistentFrequencyInMinutes) : base(instanceType, serializedAdditionalRawData) + { + RecoveryPointHistoryInMinutes = recoveryPointHistoryInMinutes; + CrashConsistentFrequencyInMinutes = crashConsistentFrequencyInMinutes; + AppConsistentFrequencyInMinutes = appConsistentFrequencyInMinutes; + InstanceType = instanceType ?? "VMwareToAzStackHCI"; + } + + /// Initializes a new instance of for deserialization. + internal VMwareToAzStackHciPolicyCustomProperties() + { + } + + /// Gets or sets the duration in minutes until which the recovery points need to be stored. + public int RecoveryPointHistoryInMinutes { get; set; } + /// Gets or sets the crash consistent snapshot frequency (in minutes). + public int CrashConsistentFrequencyInMinutes { get; set; } + /// Gets or sets the app consistent snapshot frequency (in minutes). + public int AppConsistentFrequencyInMinutes { get; set; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciProtectedDiskProperties.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciProtectedDiskProperties.Serialization.cs new file mode 100644 index 000000000000..887056f2944b --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciProtectedDiskProperties.Serialization.cs @@ -0,0 +1,315 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class VMwareToAzStackHciProtectedDiskProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(VMwareToAzStackHciProtectedDiskProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(StorageContainerId)) + { + writer.WritePropertyName("storageContainerId"u8); + writer.WriteStringValue(StorageContainerId); + } + if (options.Format != "W" && Optional.IsDefined(StorageContainerLocalPath)) + { + writer.WritePropertyName("storageContainerLocalPath"u8); + writer.WriteStringValue(StorageContainerLocalPath); + } + if (options.Format != "W" && Optional.IsDefined(SourceDiskId)) + { + writer.WritePropertyName("sourceDiskId"u8); + writer.WriteStringValue(SourceDiskId); + } + if (options.Format != "W" && Optional.IsDefined(SourceDiskName)) + { + writer.WritePropertyName("sourceDiskName"u8); + writer.WriteStringValue(SourceDiskName); + } + if (options.Format != "W" && Optional.IsDefined(SeedDiskName)) + { + writer.WritePropertyName("seedDiskName"u8); + writer.WriteStringValue(SeedDiskName); + } + if (options.Format != "W" && Optional.IsDefined(TestMigrateDiskName)) + { + writer.WritePropertyName("testMigrateDiskName"u8); + writer.WriteStringValue(TestMigrateDiskName); + } + if (options.Format != "W" && Optional.IsDefined(MigrateDiskName)) + { + writer.WritePropertyName("migrateDiskName"u8); + writer.WriteStringValue(MigrateDiskName); + } + if (options.Format != "W" && Optional.IsDefined(IsOSDisk)) + { + writer.WritePropertyName("isOsDisk"u8); + writer.WriteBooleanValue(IsOSDisk.Value); + } + if (options.Format != "W" && Optional.IsDefined(CapacityInBytes)) + { + writer.WritePropertyName("capacityInBytes"u8); + writer.WriteNumberValue(CapacityInBytes.Value); + } + if (options.Format != "W" && Optional.IsDefined(IsDynamic)) + { + writer.WritePropertyName("isDynamic"u8); + writer.WriteBooleanValue(IsDynamic.Value); + } + if (options.Format != "W" && Optional.IsDefined(DiskType)) + { + writer.WritePropertyName("diskType"u8); + writer.WriteStringValue(DiskType); + } + if (options.Format != "W" && Optional.IsDefined(DiskBlockSize)) + { + writer.WritePropertyName("diskBlockSize"u8); + writer.WriteNumberValue(DiskBlockSize.Value); + } + if (options.Format != "W" && Optional.IsDefined(DiskLogicalSectorSize)) + { + writer.WritePropertyName("diskLogicalSectorSize"u8); + writer.WriteNumberValue(DiskLogicalSectorSize.Value); + } + if (options.Format != "W" && Optional.IsDefined(DiskPhysicalSectorSize)) + { + writer.WritePropertyName("diskPhysicalSectorSize"u8); + writer.WriteNumberValue(DiskPhysicalSectorSize.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + VMwareToAzStackHciProtectedDiskProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(VMwareToAzStackHciProtectedDiskProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeVMwareToAzStackHciProtectedDiskProperties(document.RootElement, options); + } + + internal static VMwareToAzStackHciProtectedDiskProperties DeserializeVMwareToAzStackHciProtectedDiskProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier storageContainerId = default; + string storageContainerLocalPath = default; + string sourceDiskId = default; + string sourceDiskName = default; + string seedDiskName = default; + string testMigrateDiskName = default; + string migrateDiskName = default; + bool? isOSDisk = default; + long? capacityInBytes = default; + bool? isDynamic = default; + string diskType = default; + long? diskBlockSize = default; + long? diskLogicalSectorSize = default; + long? diskPhysicalSectorSize = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("storageContainerId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + storageContainerId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("storageContainerLocalPath"u8)) + { + storageContainerLocalPath = property.Value.GetString(); + continue; + } + if (property.NameEquals("sourceDiskId"u8)) + { + sourceDiskId = property.Value.GetString(); + continue; + } + if (property.NameEquals("sourceDiskName"u8)) + { + sourceDiskName = property.Value.GetString(); + continue; + } + if (property.NameEquals("seedDiskName"u8)) + { + seedDiskName = property.Value.GetString(); + continue; + } + if (property.NameEquals("testMigrateDiskName"u8)) + { + testMigrateDiskName = property.Value.GetString(); + continue; + } + if (property.NameEquals("migrateDiskName"u8)) + { + migrateDiskName = property.Value.GetString(); + continue; + } + if (property.NameEquals("isOsDisk"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isOSDisk = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("capacityInBytes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + capacityInBytes = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("isDynamic"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isDynamic = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("diskType"u8)) + { + diskType = property.Value.GetString(); + continue; + } + if (property.NameEquals("diskBlockSize"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + diskBlockSize = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("diskLogicalSectorSize"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + diskLogicalSectorSize = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("diskPhysicalSectorSize"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + diskPhysicalSectorSize = property.Value.GetInt64(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new VMwareToAzStackHciProtectedDiskProperties( + storageContainerId, + storageContainerLocalPath, + sourceDiskId, + sourceDiskName, + seedDiskName, + testMigrateDiskName, + migrateDiskName, + isOSDisk, + capacityInBytes, + isDynamic, + diskType, + diskBlockSize, + diskLogicalSectorSize, + diskPhysicalSectorSize, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(VMwareToAzStackHciProtectedDiskProperties)} does not support writing '{options.Format}' format."); + } + } + + VMwareToAzStackHciProtectedDiskProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeVMwareToAzStackHciProtectedDiskProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(VMwareToAzStackHciProtectedDiskProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciProtectedDiskProperties.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciProtectedDiskProperties.cs new file mode 100644 index 000000000000..ed12b6b3e604 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciProtectedDiskProperties.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// VMwareToAzStackHCI protected disk properties. + public partial class VMwareToAzStackHciProtectedDiskProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal VMwareToAzStackHciProtectedDiskProperties() + { + } + + /// Initializes a new instance of . + /// Gets or sets the ARM Id of the storage container. + /// Gets or sets the local path of the storage container. + /// Gets or sets the source disk Id. + /// Gets or sets the source disk Name. + /// Gets or sets the seed disk name. + /// Gets or sets the test failover clone disk. + /// Gets or sets the failover clone disk. + /// Gets or sets a value indicating whether the disk is the OS disk. + /// Gets or sets the disk capacity in bytes. + /// Gets or sets a value indicating whether dynamic sizing is enabled on the virtual hard disk. + /// Gets or sets the disk type. + /// Gets or sets a value of disk block size. + /// Gets or sets a value of disk logical sector size. + /// Gets or sets a value of disk physical sector size. + /// Keeps track of any properties unknown to the library. + internal VMwareToAzStackHciProtectedDiskProperties(ResourceIdentifier storageContainerId, string storageContainerLocalPath, string sourceDiskId, string sourceDiskName, string seedDiskName, string testMigrateDiskName, string migrateDiskName, bool? isOSDisk, long? capacityInBytes, bool? isDynamic, string diskType, long? diskBlockSize, long? diskLogicalSectorSize, long? diskPhysicalSectorSize, IDictionary serializedAdditionalRawData) + { + StorageContainerId = storageContainerId; + StorageContainerLocalPath = storageContainerLocalPath; + SourceDiskId = sourceDiskId; + SourceDiskName = sourceDiskName; + SeedDiskName = seedDiskName; + TestMigrateDiskName = testMigrateDiskName; + MigrateDiskName = migrateDiskName; + IsOSDisk = isOSDisk; + CapacityInBytes = capacityInBytes; + IsDynamic = isDynamic; + DiskType = diskType; + DiskBlockSize = diskBlockSize; + DiskLogicalSectorSize = diskLogicalSectorSize; + DiskPhysicalSectorSize = diskPhysicalSectorSize; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets or sets the ARM Id of the storage container. + public ResourceIdentifier StorageContainerId { get; } + /// Gets or sets the local path of the storage container. + public string StorageContainerLocalPath { get; } + /// Gets or sets the source disk Id. + public string SourceDiskId { get; } + /// Gets or sets the source disk Name. + public string SourceDiskName { get; } + /// Gets or sets the seed disk name. + public string SeedDiskName { get; } + /// Gets or sets the test failover clone disk. + public string TestMigrateDiskName { get; } + /// Gets or sets the failover clone disk. + public string MigrateDiskName { get; } + /// Gets or sets a value indicating whether the disk is the OS disk. + public bool? IsOSDisk { get; } + /// Gets or sets the disk capacity in bytes. + public long? CapacityInBytes { get; } + /// Gets or sets a value indicating whether dynamic sizing is enabled on the virtual hard disk. + public bool? IsDynamic { get; } + /// Gets or sets the disk type. + public string DiskType { get; } + /// Gets or sets a value of disk block size. + public long? DiskBlockSize { get; } + /// Gets or sets a value of disk logical sector size. + public long? DiskLogicalSectorSize { get; } + /// Gets or sets a value of disk physical sector size. + public long? DiskPhysicalSectorSize { get; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciProtectedItemCustomProperties.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciProtectedItemCustomProperties.Serialization.cs new file mode 100644 index 000000000000..e29532c75179 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciProtectedItemCustomProperties.Serialization.cs @@ -0,0 +1,748 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class VMwareToAzStackHciProtectedItemCustomProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(VMwareToAzStackHciProtectedItemCustomProperties)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (options.Format != "W" && Optional.IsDefined(ActiveLocation)) + { + writer.WritePropertyName("activeLocation"u8); + writer.WriteStringValue(ActiveLocation.Value.ToString()); + } + writer.WritePropertyName("targetHciClusterId"u8); + writer.WriteStringValue(TargetHciClusterId); + writer.WritePropertyName("targetArcClusterCustomLocationId"u8); + writer.WriteStringValue(TargetArcClusterCustomLocationId); + if (options.Format != "W" && Optional.IsDefined(TargetAzStackHciClusterName)) + { + writer.WritePropertyName("targetAzStackHciClusterName"u8); + writer.WriteStringValue(TargetAzStackHciClusterName); + } + writer.WritePropertyName("storageContainerId"u8); + writer.WriteStringValue(StorageContainerId); + writer.WritePropertyName("targetResourceGroupId"u8); + writer.WriteStringValue(TargetResourceGroupId); + if (options.Format != "W" && Optional.IsDefined(TargetLocation)) + { + writer.WritePropertyName("targetLocation"u8); + writer.WriteStringValue(TargetLocation); + } + writer.WritePropertyName("customLocationRegion"u8); + writer.WriteStringValue(CustomLocationRegion); + writer.WritePropertyName("disksToInclude"u8); + writer.WriteStartArray(); + foreach (var item in DisksToInclude) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + writer.WritePropertyName("nicsToInclude"u8); + writer.WriteStartArray(); + foreach (var item in NicsToInclude) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (options.Format != "W" && Optional.IsCollectionDefined(ProtectedDisks)) + { + writer.WritePropertyName("protectedDisks"u8); + writer.WriteStartArray(); + foreach (var item in ProtectedDisks) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsCollectionDefined(ProtectedNics)) + { + writer.WritePropertyName("protectedNics"u8); + writer.WriteStartArray(); + foreach (var item in ProtectedNics) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(TargetVmBiosId)) + { + writer.WritePropertyName("targetVmBiosId"u8); + writer.WriteStringValue(TargetVmBiosId); + } + if (Optional.IsDefined(TargetVmName)) + { + writer.WritePropertyName("targetVmName"u8); + writer.WriteStringValue(TargetVmName); + } + writer.WritePropertyName("hyperVGeneration"u8); + writer.WriteStringValue(HyperVGeneration); + if (Optional.IsDefined(TargetNetworkId)) + { + writer.WritePropertyName("targetNetworkId"u8); + writer.WriteStringValue(TargetNetworkId); + } + if (Optional.IsDefined(TestNetworkId)) + { + writer.WritePropertyName("testNetworkId"u8); + writer.WriteStringValue(TestNetworkId); + } + if (Optional.IsDefined(TargetCpuCores)) + { + writer.WritePropertyName("targetCpuCores"u8); + writer.WriteNumberValue(TargetCpuCores.Value); + } + if (Optional.IsDefined(IsDynamicRam)) + { + writer.WritePropertyName("isDynamicRam"u8); + writer.WriteBooleanValue(IsDynamicRam.Value); + } + if (Optional.IsDefined(DynamicMemoryConfig)) + { + writer.WritePropertyName("dynamicMemoryConfig"u8); + writer.WriteObjectValue(DynamicMemoryConfig, options); + } + if (Optional.IsDefined(TargetMemoryInMegaBytes)) + { + writer.WritePropertyName("targetMemoryInMegaBytes"u8); + writer.WriteNumberValue(TargetMemoryInMegaBytes.Value); + } + if (options.Format != "W" && Optional.IsDefined(OSType)) + { + writer.WritePropertyName("osType"u8); + writer.WriteStringValue(OSType); + } + if (options.Format != "W" && Optional.IsDefined(OSName)) + { + writer.WritePropertyName("osName"u8); + writer.WriteStringValue(OSName); + } + if (options.Format != "W" && Optional.IsDefined(FirmwareType)) + { + writer.WritePropertyName("firmwareType"u8); + writer.WriteStringValue(FirmwareType); + } + writer.WritePropertyName("fabricDiscoveryMachineId"u8); + writer.WriteStringValue(FabricDiscoveryMachineId); + if (options.Format != "W" && Optional.IsDefined(SourceVmName)) + { + writer.WritePropertyName("sourceVmName"u8); + writer.WriteStringValue(SourceVmName); + } + if (options.Format != "W" && Optional.IsDefined(SourceCpuCores)) + { + writer.WritePropertyName("sourceCpuCores"u8); + writer.WriteNumberValue(SourceCpuCores.Value); + } + if (options.Format != "W" && Optional.IsDefined(SourceMemoryInMegaBytes)) + { + writer.WritePropertyName("sourceMemoryInMegaBytes"u8); + writer.WriteNumberValue(SourceMemoryInMegaBytes.Value); + } + writer.WritePropertyName("runAsAccountId"u8); + writer.WriteStringValue(RunAsAccountId); + writer.WritePropertyName("sourceFabricAgentName"u8); + writer.WriteStringValue(SourceFabricAgentName); + writer.WritePropertyName("targetFabricAgentName"u8); + writer.WriteStringValue(TargetFabricAgentName); + if (options.Format != "W" && Optional.IsDefined(SourceApplianceName)) + { + writer.WritePropertyName("sourceApplianceName"u8); + writer.WriteStringValue(SourceApplianceName); + } + if (options.Format != "W" && Optional.IsDefined(TargetApplianceName)) + { + writer.WritePropertyName("targetApplianceName"u8); + writer.WriteStringValue(TargetApplianceName); + } + if (options.Format != "W" && Optional.IsDefined(FailoverRecoveryPointId)) + { + writer.WritePropertyName("failoverRecoveryPointId"u8); + writer.WriteStringValue(FailoverRecoveryPointId); + } + if (options.Format != "W" && Optional.IsDefined(LastRecoveryPointReceivedOn)) + { + writer.WritePropertyName("lastRecoveryPointReceived"u8); + writer.WriteStringValue(LastRecoveryPointReceivedOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(LastRecoveryPointId)) + { + writer.WritePropertyName("lastRecoveryPointId"u8); + writer.WriteStringValue(LastRecoveryPointId); + } + if (options.Format != "W" && Optional.IsDefined(InitialReplicationProgressPercentage)) + { + writer.WritePropertyName("initialReplicationProgressPercentage"u8); + writer.WriteNumberValue(InitialReplicationProgressPercentage.Value); + } + if (options.Format != "W" && Optional.IsDefined(MigrationProgressPercentage)) + { + writer.WritePropertyName("migrationProgressPercentage"u8); + writer.WriteNumberValue(MigrationProgressPercentage.Value); + } + if (options.Format != "W" && Optional.IsDefined(ResumeProgressPercentage)) + { + writer.WritePropertyName("resumeProgressPercentage"u8); + writer.WriteNumberValue(ResumeProgressPercentage.Value); + } + if (options.Format != "W" && Optional.IsDefined(ResyncProgressPercentage)) + { + writer.WritePropertyName("resyncProgressPercentage"u8); + writer.WriteNumberValue(ResyncProgressPercentage.Value); + } + if (options.Format != "W" && Optional.IsDefined(ResyncRetryCount)) + { + writer.WritePropertyName("resyncRetryCount"u8); + writer.WriteNumberValue(ResyncRetryCount.Value); + } + if (options.Format != "W" && Optional.IsDefined(ResyncRequired)) + { + writer.WritePropertyName("resyncRequired"u8); + writer.WriteBooleanValue(ResyncRequired.Value); + } + if (options.Format != "W" && Optional.IsDefined(ResyncState)) + { + writer.WritePropertyName("resyncState"u8); + writer.WriteStringValue(ResyncState.Value.ToString()); + } + if (Optional.IsDefined(PerformAutoResync)) + { + writer.WritePropertyName("performAutoResync"u8); + writer.WriteBooleanValue(PerformAutoResync.Value); + } + if (options.Format != "W" && Optional.IsDefined(ResumeRetryCount)) + { + writer.WritePropertyName("resumeRetryCount"u8); + writer.WriteNumberValue(ResumeRetryCount.Value); + } + if (options.Format != "W" && Optional.IsDefined(LastReplicationUpdateOn)) + { + writer.WritePropertyName("lastReplicationUpdateTime"u8); + writer.WriteStringValue(LastReplicationUpdateOn.Value, "O"); + } + } + + VMwareToAzStackHciProtectedItemCustomProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(VMwareToAzStackHciProtectedItemCustomProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeVMwareToAzStackHciProtectedItemCustomProperties(document.RootElement, options); + } + + internal static VMwareToAzStackHciProtectedItemCustomProperties DeserializeVMwareToAzStackHciProtectedItemCustomProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ProtectedItemActiveLocation? activeLocation = default; + ResourceIdentifier targetHciClusterId = default; + ResourceIdentifier targetArcClusterCustomLocationId = default; + string targetAzStackHciClusterName = default; + ResourceIdentifier storageContainerId = default; + ResourceIdentifier targetResourceGroupId = default; + string targetLocation = default; + string customLocationRegion = default; + IList disksToInclude = default; + IList nicsToInclude = default; + IReadOnlyList protectedDisks = default; + IReadOnlyList protectedNics = default; + string targetVmBiosId = default; + string targetVmName = default; + string hyperVGeneration = default; + string targetNetworkId = default; + string testNetworkId = default; + int? targetCpuCores = default; + bool? isDynamicRam = default; + ProtectedItemDynamicMemoryConfig dynamicMemoryConfig = default; + int? targetMemoryInMegaBytes = default; + string osType = default; + string osName = default; + string firmwareType = default; + ResourceIdentifier fabricDiscoveryMachineId = default; + string sourceVmName = default; + int? sourceCpuCores = default; + double? sourceMemoryInMegaBytes = default; + string runAsAccountId = default; + string sourceFabricAgentName = default; + string targetFabricAgentName = default; + string sourceApplianceName = default; + string targetApplianceName = default; + string failoverRecoveryPointId = default; + DateTimeOffset? lastRecoveryPointReceived = default; + string lastRecoveryPointId = default; + int? initialReplicationProgressPercentage = default; + int? migrationProgressPercentage = default; + int? resumeProgressPercentage = default; + int? resyncProgressPercentage = default; + long? resyncRetryCount = default; + bool? resyncRequired = default; + VMwareToAzureMigrateResyncState? resyncState = default; + bool? performAutoResync = default; + long? resumeRetryCount = default; + DateTimeOffset? lastReplicationUpdateTime = default; + string instanceType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("activeLocation"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + activeLocation = new ProtectedItemActiveLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("targetHciClusterId"u8)) + { + targetHciClusterId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("targetArcClusterCustomLocationId"u8)) + { + targetArcClusterCustomLocationId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("targetAzStackHciClusterName"u8)) + { + targetAzStackHciClusterName = property.Value.GetString(); + continue; + } + if (property.NameEquals("storageContainerId"u8)) + { + storageContainerId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("targetResourceGroupId"u8)) + { + targetResourceGroupId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("targetLocation"u8)) + { + targetLocation = property.Value.GetString(); + continue; + } + if (property.NameEquals("customLocationRegion"u8)) + { + customLocationRegion = property.Value.GetString(); + continue; + } + if (property.NameEquals("disksToInclude"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(VMwareToAzStackHciDiskInput.DeserializeVMwareToAzStackHciDiskInput(item, options)); + } + disksToInclude = array; + continue; + } + if (property.NameEquals("nicsToInclude"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(VMwareToAzStackHciNicInput.DeserializeVMwareToAzStackHciNicInput(item, options)); + } + nicsToInclude = array; + continue; + } + if (property.NameEquals("protectedDisks"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(VMwareToAzStackHciProtectedDiskProperties.DeserializeVMwareToAzStackHciProtectedDiskProperties(item, options)); + } + protectedDisks = array; + continue; + } + if (property.NameEquals("protectedNics"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(VMwareToAzStackHciProtectedNicProperties.DeserializeVMwareToAzStackHciProtectedNicProperties(item, options)); + } + protectedNics = array; + continue; + } + if (property.NameEquals("targetVmBiosId"u8)) + { + targetVmBiosId = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetVmName"u8)) + { + targetVmName = property.Value.GetString(); + continue; + } + if (property.NameEquals("hyperVGeneration"u8)) + { + hyperVGeneration = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetNetworkId"u8)) + { + targetNetworkId = property.Value.GetString(); + continue; + } + if (property.NameEquals("testNetworkId"u8)) + { + testNetworkId = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetCpuCores"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + targetCpuCores = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("isDynamicRam"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isDynamicRam = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("dynamicMemoryConfig"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dynamicMemoryConfig = ProtectedItemDynamicMemoryConfig.DeserializeProtectedItemDynamicMemoryConfig(property.Value, options); + continue; + } + if (property.NameEquals("targetMemoryInMegaBytes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + targetMemoryInMegaBytes = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("osType"u8)) + { + osType = property.Value.GetString(); + continue; + } + if (property.NameEquals("osName"u8)) + { + osName = property.Value.GetString(); + continue; + } + if (property.NameEquals("firmwareType"u8)) + { + firmwareType = property.Value.GetString(); + continue; + } + if (property.NameEquals("fabricDiscoveryMachineId"u8)) + { + fabricDiscoveryMachineId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("sourceVmName"u8)) + { + sourceVmName = property.Value.GetString(); + continue; + } + if (property.NameEquals("sourceCpuCores"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sourceCpuCores = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("sourceMemoryInMegaBytes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sourceMemoryInMegaBytes = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("runAsAccountId"u8)) + { + runAsAccountId = property.Value.GetString(); + continue; + } + if (property.NameEquals("sourceFabricAgentName"u8)) + { + sourceFabricAgentName = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetFabricAgentName"u8)) + { + targetFabricAgentName = property.Value.GetString(); + continue; + } + if (property.NameEquals("sourceApplianceName"u8)) + { + sourceApplianceName = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetApplianceName"u8)) + { + targetApplianceName = property.Value.GetString(); + continue; + } + if (property.NameEquals("failoverRecoveryPointId"u8)) + { + failoverRecoveryPointId = property.Value.GetString(); + continue; + } + if (property.NameEquals("lastRecoveryPointReceived"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lastRecoveryPointReceived = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("lastRecoveryPointId"u8)) + { + lastRecoveryPointId = property.Value.GetString(); + continue; + } + if (property.NameEquals("initialReplicationProgressPercentage"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + initialReplicationProgressPercentage = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("migrationProgressPercentage"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + migrationProgressPercentage = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("resumeProgressPercentage"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resumeProgressPercentage = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("resyncProgressPercentage"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resyncProgressPercentage = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("resyncRetryCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resyncRetryCount = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("resyncRequired"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resyncRequired = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("resyncState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resyncState = new VMwareToAzureMigrateResyncState(property.Value.GetString()); + continue; + } + if (property.NameEquals("performAutoResync"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + performAutoResync = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("resumeRetryCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resumeRetryCount = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("lastReplicationUpdateTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lastReplicationUpdateTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("instanceType"u8)) + { + instanceType = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new VMwareToAzStackHciProtectedItemCustomProperties( + instanceType, + serializedAdditionalRawData, + activeLocation, + targetHciClusterId, + targetArcClusterCustomLocationId, + targetAzStackHciClusterName, + storageContainerId, + targetResourceGroupId, + targetLocation, + customLocationRegion, + disksToInclude, + nicsToInclude, + protectedDisks ?? new ChangeTrackingList(), + protectedNics ?? new ChangeTrackingList(), + targetVmBiosId, + targetVmName, + hyperVGeneration, + targetNetworkId, + testNetworkId, + targetCpuCores, + isDynamicRam, + dynamicMemoryConfig, + targetMemoryInMegaBytes, + osType, + osName, + firmwareType, + fabricDiscoveryMachineId, + sourceVmName, + sourceCpuCores, + sourceMemoryInMegaBytes, + runAsAccountId, + sourceFabricAgentName, + targetFabricAgentName, + sourceApplianceName, + targetApplianceName, + failoverRecoveryPointId, + lastRecoveryPointReceived, + lastRecoveryPointId, + initialReplicationProgressPercentage, + migrationProgressPercentage, + resumeProgressPercentage, + resyncProgressPercentage, + resyncRetryCount, + resyncRequired, + resyncState, + performAutoResync, + resumeRetryCount, + lastReplicationUpdateTime); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(VMwareToAzStackHciProtectedItemCustomProperties)} does not support writing '{options.Format}' format."); + } + } + + VMwareToAzStackHciProtectedItemCustomProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeVMwareToAzStackHciProtectedItemCustomProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(VMwareToAzStackHciProtectedItemCustomProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciProtectedItemCustomProperties.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciProtectedItemCustomProperties.cs new file mode 100644 index 000000000000..9dbfacd40210 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciProtectedItemCustomProperties.cs @@ -0,0 +1,262 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// VMware to AzStackHCI Protected item model custom properties. + public partial class VMwareToAzStackHciProtectedItemCustomProperties : DataReplicationProtectedItemCustomProperties + { + /// Initializes a new instance of . + /// Gets or sets the Target HCI Cluster ARM Id. + /// Gets or sets the Target Arc Cluster Custom Location ARM Id. + /// Gets or sets the target storage container ARM Id. + /// Gets or sets the target resource group ARM Id. + /// Gets or sets the location of Azure Arc HCI custom location resource. + /// Gets or sets the list of disks to replicate. + /// Gets or sets the list of VM NIC to replicate. + /// Gets or sets the hypervisor generation of the virtual machine possible values are 1,2. + /// Gets or sets the ARM Id of the discovered machine. + /// Gets or sets the run as account Id. + /// Gets or sets the source fabric agent name. + /// Gets or sets the target fabric agent name. + /// , , , , , , , , , , or is null. + public VMwareToAzStackHciProtectedItemCustomProperties(ResourceIdentifier targetHciClusterId, ResourceIdentifier targetArcClusterCustomLocationId, ResourceIdentifier storageContainerId, ResourceIdentifier targetResourceGroupId, string customLocationRegion, IEnumerable disksToInclude, IEnumerable nicsToInclude, string hyperVGeneration, ResourceIdentifier fabricDiscoveryMachineId, string runAsAccountId, string sourceFabricAgentName, string targetFabricAgentName) + { + Argument.AssertNotNull(targetHciClusterId, nameof(targetHciClusterId)); + Argument.AssertNotNull(targetArcClusterCustomLocationId, nameof(targetArcClusterCustomLocationId)); + Argument.AssertNotNull(storageContainerId, nameof(storageContainerId)); + Argument.AssertNotNull(targetResourceGroupId, nameof(targetResourceGroupId)); + Argument.AssertNotNull(customLocationRegion, nameof(customLocationRegion)); + Argument.AssertNotNull(disksToInclude, nameof(disksToInclude)); + Argument.AssertNotNull(nicsToInclude, nameof(nicsToInclude)); + Argument.AssertNotNull(hyperVGeneration, nameof(hyperVGeneration)); + Argument.AssertNotNull(fabricDiscoveryMachineId, nameof(fabricDiscoveryMachineId)); + Argument.AssertNotNull(runAsAccountId, nameof(runAsAccountId)); + Argument.AssertNotNull(sourceFabricAgentName, nameof(sourceFabricAgentName)); + Argument.AssertNotNull(targetFabricAgentName, nameof(targetFabricAgentName)); + + TargetHciClusterId = targetHciClusterId; + TargetArcClusterCustomLocationId = targetArcClusterCustomLocationId; + StorageContainerId = storageContainerId; + TargetResourceGroupId = targetResourceGroupId; + CustomLocationRegion = customLocationRegion; + DisksToInclude = disksToInclude.ToList(); + NicsToInclude = nicsToInclude.ToList(); + ProtectedDisks = new ChangeTrackingList(); + ProtectedNics = new ChangeTrackingList(); + HyperVGeneration = hyperVGeneration; + FabricDiscoveryMachineId = fabricDiscoveryMachineId; + RunAsAccountId = runAsAccountId; + SourceFabricAgentName = sourceFabricAgentName; + TargetFabricAgentName = targetFabricAgentName; + InstanceType = "VMwareToAzStackHCI"; + } + + /// Initializes a new instance of . + /// Discriminator property for DataReplicationProtectedItemCustomProperties. + /// Keeps track of any properties unknown to the library. + /// Gets or sets the location of the protected item. + /// Gets or sets the Target HCI Cluster ARM Id. + /// Gets or sets the Target Arc Cluster Custom Location ARM Id. + /// Gets or sets the Target AzStackHCI cluster name. + /// Gets or sets the target storage container ARM Id. + /// Gets or sets the target resource group ARM Id. + /// Gets or sets the target location. + /// Gets or sets the location of Azure Arc HCI custom location resource. + /// Gets or sets the list of disks to replicate. + /// Gets or sets the list of VM NIC to replicate. + /// Gets or sets the list of protected disks. + /// Gets or sets the VM NIC details. + /// Gets or sets the BIOS Id of the target AzStackHCI VM. + /// Gets or sets the target VM display name. + /// Gets or sets the hypervisor generation of the virtual machine possible values are 1,2. + /// Gets or sets the target network Id within AzStackHCI Cluster. + /// Gets or sets the target test network Id within AzStackHCI Cluster. + /// Gets or sets the target CPU cores. + /// Gets or sets a value indicating whether memory is dynamical. + /// Protected item dynamic memory config. + /// Gets or sets the target memory in mega-bytes. + /// Gets or sets the type of the OS. + /// Gets or sets the name of the OS. + /// Gets or sets the firmware type. + /// Gets or sets the ARM Id of the discovered machine. + /// Gets or sets the source VM display name. + /// Gets or sets the source VM CPU cores. + /// Gets or sets the source VM ram memory size in megabytes. + /// Gets or sets the run as account Id. + /// Gets or sets the source fabric agent name. + /// Gets or sets the target fabric agent name. + /// Gets or sets the source appliance name. + /// Gets or sets the target appliance name. + /// Gets or sets the recovery point Id to which the VM was failed over. + /// Gets or sets the last recovery point received time. + /// Gets or sets the last recovery point Id. + /// Gets or sets the initial replication progress percentage. This is calculated based on total bytes processed for all disks in the source VM. + /// Gets or sets the migration progress percentage. + /// Gets or sets the resume progress percentage. + /// Gets or sets the resync progress percentage. This is calculated based on total bytes processed for all disks in the source VM. + /// Gets or sets the resync retry count. + /// Gets or sets a value indicating whether resync is required. + /// Gets or sets the resync state. + /// Gets or sets a value indicating whether auto resync is to be done. + /// Gets or sets the resume retry count. + /// Gets or sets the latest timestamp that replication status is updated. + internal VMwareToAzStackHciProtectedItemCustomProperties(string instanceType, IDictionary serializedAdditionalRawData, ProtectedItemActiveLocation? activeLocation, ResourceIdentifier targetHciClusterId, ResourceIdentifier targetArcClusterCustomLocationId, string targetAzStackHciClusterName, ResourceIdentifier storageContainerId, ResourceIdentifier targetResourceGroupId, string targetLocation, string customLocationRegion, IList disksToInclude, IList nicsToInclude, IReadOnlyList protectedDisks, IReadOnlyList protectedNics, string targetVmBiosId, string targetVmName, string hyperVGeneration, string targetNetworkId, string testNetworkId, int? targetCpuCores, bool? isDynamicRam, ProtectedItemDynamicMemoryConfig dynamicMemoryConfig, int? targetMemoryInMegaBytes, string osType, string osName, string firmwareType, ResourceIdentifier fabricDiscoveryMachineId, string sourceVmName, int? sourceCpuCores, double? sourceMemoryInMegaBytes, string runAsAccountId, string sourceFabricAgentName, string targetFabricAgentName, string sourceApplianceName, string targetApplianceName, string failoverRecoveryPointId, DateTimeOffset? lastRecoveryPointReceivedOn, string lastRecoveryPointId, int? initialReplicationProgressPercentage, int? migrationProgressPercentage, int? resumeProgressPercentage, int? resyncProgressPercentage, long? resyncRetryCount, bool? resyncRequired, VMwareToAzureMigrateResyncState? resyncState, bool? performAutoResync, long? resumeRetryCount, DateTimeOffset? lastReplicationUpdateOn) : base(instanceType, serializedAdditionalRawData) + { + ActiveLocation = activeLocation; + TargetHciClusterId = targetHciClusterId; + TargetArcClusterCustomLocationId = targetArcClusterCustomLocationId; + TargetAzStackHciClusterName = targetAzStackHciClusterName; + StorageContainerId = storageContainerId; + TargetResourceGroupId = targetResourceGroupId; + TargetLocation = targetLocation; + CustomLocationRegion = customLocationRegion; + DisksToInclude = disksToInclude; + NicsToInclude = nicsToInclude; + ProtectedDisks = protectedDisks; + ProtectedNics = protectedNics; + TargetVmBiosId = targetVmBiosId; + TargetVmName = targetVmName; + HyperVGeneration = hyperVGeneration; + TargetNetworkId = targetNetworkId; + TestNetworkId = testNetworkId; + TargetCpuCores = targetCpuCores; + IsDynamicRam = isDynamicRam; + DynamicMemoryConfig = dynamicMemoryConfig; + TargetMemoryInMegaBytes = targetMemoryInMegaBytes; + OSType = osType; + OSName = osName; + FirmwareType = firmwareType; + FabricDiscoveryMachineId = fabricDiscoveryMachineId; + SourceVmName = sourceVmName; + SourceCpuCores = sourceCpuCores; + SourceMemoryInMegaBytes = sourceMemoryInMegaBytes; + RunAsAccountId = runAsAccountId; + SourceFabricAgentName = sourceFabricAgentName; + TargetFabricAgentName = targetFabricAgentName; + SourceApplianceName = sourceApplianceName; + TargetApplianceName = targetApplianceName; + FailoverRecoveryPointId = failoverRecoveryPointId; + LastRecoveryPointReceivedOn = lastRecoveryPointReceivedOn; + LastRecoveryPointId = lastRecoveryPointId; + InitialReplicationProgressPercentage = initialReplicationProgressPercentage; + MigrationProgressPercentage = migrationProgressPercentage; + ResumeProgressPercentage = resumeProgressPercentage; + ResyncProgressPercentage = resyncProgressPercentage; + ResyncRetryCount = resyncRetryCount; + ResyncRequired = resyncRequired; + ResyncState = resyncState; + PerformAutoResync = performAutoResync; + ResumeRetryCount = resumeRetryCount; + LastReplicationUpdateOn = lastReplicationUpdateOn; + InstanceType = instanceType ?? "VMwareToAzStackHCI"; + } + + /// Initializes a new instance of for deserialization. + internal VMwareToAzStackHciProtectedItemCustomProperties() + { + } + + /// Gets or sets the location of the protected item. + public ProtectedItemActiveLocation? ActiveLocation { get; } + /// Gets or sets the Target HCI Cluster ARM Id. + public ResourceIdentifier TargetHciClusterId { get; set; } + /// Gets or sets the Target Arc Cluster Custom Location ARM Id. + public ResourceIdentifier TargetArcClusterCustomLocationId { get; set; } + /// Gets or sets the Target AzStackHCI cluster name. + public string TargetAzStackHciClusterName { get; } + /// Gets or sets the target storage container ARM Id. + public ResourceIdentifier StorageContainerId { get; set; } + /// Gets or sets the target resource group ARM Id. + public ResourceIdentifier TargetResourceGroupId { get; set; } + /// Gets or sets the target location. + public string TargetLocation { get; } + /// Gets or sets the location of Azure Arc HCI custom location resource. + public string CustomLocationRegion { get; set; } + /// Gets or sets the list of disks to replicate. + public IList DisksToInclude { get; } + /// Gets or sets the list of VM NIC to replicate. + public IList NicsToInclude { get; } + /// Gets or sets the list of protected disks. + public IReadOnlyList ProtectedDisks { get; } + /// Gets or sets the VM NIC details. + public IReadOnlyList ProtectedNics { get; } + /// Gets or sets the BIOS Id of the target AzStackHCI VM. + public string TargetVmBiosId { get; } + /// Gets or sets the target VM display name. + public string TargetVmName { get; set; } + /// Gets or sets the hypervisor generation of the virtual machine possible values are 1,2. + public string HyperVGeneration { get; set; } + /// Gets or sets the target network Id within AzStackHCI Cluster. + public string TargetNetworkId { get; set; } + /// Gets or sets the target test network Id within AzStackHCI Cluster. + public string TestNetworkId { get; set; } + /// Gets or sets the target CPU cores. + public int? TargetCpuCores { get; set; } + /// Gets or sets a value indicating whether memory is dynamical. + public bool? IsDynamicRam { get; set; } + /// Protected item dynamic memory config. + public ProtectedItemDynamicMemoryConfig DynamicMemoryConfig { get; set; } + /// Gets or sets the target memory in mega-bytes. + public int? TargetMemoryInMegaBytes { get; set; } + /// Gets or sets the type of the OS. + public string OSType { get; } + /// Gets or sets the name of the OS. + public string OSName { get; } + /// Gets or sets the firmware type. + public string FirmwareType { get; } + /// Gets or sets the ARM Id of the discovered machine. + public ResourceIdentifier FabricDiscoveryMachineId { get; set; } + /// Gets or sets the source VM display name. + public string SourceVmName { get; } + /// Gets or sets the source VM CPU cores. + public int? SourceCpuCores { get; } + /// Gets or sets the source VM ram memory size in megabytes. + public double? SourceMemoryInMegaBytes { get; } + /// Gets or sets the run as account Id. + public string RunAsAccountId { get; set; } + /// Gets or sets the source fabric agent name. + public string SourceFabricAgentName { get; set; } + /// Gets or sets the target fabric agent name. + public string TargetFabricAgentName { get; set; } + /// Gets or sets the source appliance name. + public string SourceApplianceName { get; } + /// Gets or sets the target appliance name. + public string TargetApplianceName { get; } + /// Gets or sets the recovery point Id to which the VM was failed over. + public string FailoverRecoveryPointId { get; } + /// Gets or sets the last recovery point received time. + public DateTimeOffset? LastRecoveryPointReceivedOn { get; } + /// Gets or sets the last recovery point Id. + public string LastRecoveryPointId { get; } + /// Gets or sets the initial replication progress percentage. This is calculated based on total bytes processed for all disks in the source VM. + public int? InitialReplicationProgressPercentage { get; } + /// Gets or sets the migration progress percentage. + public int? MigrationProgressPercentage { get; } + /// Gets or sets the resume progress percentage. + public int? ResumeProgressPercentage { get; } + /// Gets or sets the resync progress percentage. This is calculated based on total bytes processed for all disks in the source VM. + public int? ResyncProgressPercentage { get; } + /// Gets or sets the resync retry count. + public long? ResyncRetryCount { get; } + /// Gets or sets a value indicating whether resync is required. + public bool? ResyncRequired { get; } + /// Gets or sets the resync state. + public VMwareToAzureMigrateResyncState? ResyncState { get; } + /// Gets or sets a value indicating whether auto resync is to be done. + public bool? PerformAutoResync { get; set; } + /// Gets or sets the resume retry count. + public long? ResumeRetryCount { get; } + /// Gets or sets the latest timestamp that replication status is updated. + public DateTimeOffset? LastReplicationUpdateOn { get; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciProtectedItemCustomPropertiesUpdate.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciProtectedItemCustomPropertiesUpdate.Serialization.cs new file mode 100644 index 000000000000..a78bfa0b9f37 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciProtectedItemCustomPropertiesUpdate.Serialization.cs @@ -0,0 +1,214 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class VMwareToAzStackHciProtectedItemCustomPropertiesUpdate : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(VMwareToAzStackHciProtectedItemCustomPropertiesUpdate)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsCollectionDefined(NicsToInclude)) + { + writer.WritePropertyName("nicsToInclude"u8); + writer.WriteStartArray(); + foreach (var item in NicsToInclude) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(TargetCpuCores)) + { + writer.WritePropertyName("targetCpuCores"u8); + writer.WriteNumberValue(TargetCpuCores.Value); + } + if (Optional.IsDefined(IsDynamicRam)) + { + writer.WritePropertyName("isDynamicRam"u8); + writer.WriteBooleanValue(IsDynamicRam.Value); + } + if (Optional.IsDefined(DynamicMemoryConfig)) + { + writer.WritePropertyName("dynamicMemoryConfig"u8); + writer.WriteObjectValue(DynamicMemoryConfig, options); + } + if (Optional.IsDefined(TargetMemoryInMegaBytes)) + { + writer.WritePropertyName("targetMemoryInMegaBytes"u8); + writer.WriteNumberValue(TargetMemoryInMegaBytes.Value); + } + if (Optional.IsDefined(OSType)) + { + writer.WritePropertyName("osType"u8); + writer.WriteStringValue(OSType); + } + } + + VMwareToAzStackHciProtectedItemCustomPropertiesUpdate IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(VMwareToAzStackHciProtectedItemCustomPropertiesUpdate)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeVMwareToAzStackHciProtectedItemCustomPropertiesUpdate(document.RootElement, options); + } + + internal static VMwareToAzStackHciProtectedItemCustomPropertiesUpdate DeserializeVMwareToAzStackHciProtectedItemCustomPropertiesUpdate(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList nicsToInclude = default; + int? targetCpuCores = default; + bool? isDynamicRam = default; + ProtectedItemDynamicMemoryConfig dynamicMemoryConfig = default; + int? targetMemoryInMegaBytes = default; + string osType = default; + string instanceType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("nicsToInclude"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(VMwareToAzStackHciNicInput.DeserializeVMwareToAzStackHciNicInput(item, options)); + } + nicsToInclude = array; + continue; + } + if (property.NameEquals("targetCpuCores"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + targetCpuCores = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("isDynamicRam"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isDynamicRam = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("dynamicMemoryConfig"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dynamicMemoryConfig = ProtectedItemDynamicMemoryConfig.DeserializeProtectedItemDynamicMemoryConfig(property.Value, options); + continue; + } + if (property.NameEquals("targetMemoryInMegaBytes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + targetMemoryInMegaBytes = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("osType"u8)) + { + osType = property.Value.GetString(); + continue; + } + if (property.NameEquals("instanceType"u8)) + { + instanceType = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new VMwareToAzStackHciProtectedItemCustomPropertiesUpdate( + instanceType, + serializedAdditionalRawData, + nicsToInclude ?? new ChangeTrackingList(), + targetCpuCores, + isDynamicRam, + dynamicMemoryConfig, + targetMemoryInMegaBytes, + osType); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(VMwareToAzStackHciProtectedItemCustomPropertiesUpdate)} does not support writing '{options.Format}' format."); + } + } + + VMwareToAzStackHciProtectedItemCustomPropertiesUpdate IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeVMwareToAzStackHciProtectedItemCustomPropertiesUpdate(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(VMwareToAzStackHciProtectedItemCustomPropertiesUpdate)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciProtectedItemCustomPropertiesUpdate.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciProtectedItemCustomPropertiesUpdate.cs new file mode 100644 index 000000000000..12a58fef778f --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciProtectedItemCustomPropertiesUpdate.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.RecoveryServicesDataReplication.Models +{ + /// VMware to AzStackHCI Protected item model custom properties. + public partial class VMwareToAzStackHciProtectedItemCustomPropertiesUpdate : DataReplicationProtectedItemCustomPropertiesUpdate + { + /// Initializes a new instance of . + public VMwareToAzStackHciProtectedItemCustomPropertiesUpdate() + { + NicsToInclude = new ChangeTrackingList(); + InstanceType = "VMwareToAzStackHCI"; + } + + /// Initializes a new instance of . + /// Discriminator property for DataReplicationProtectedItemCustomPropertiesUpdate. + /// Keeps track of any properties unknown to the library. + /// Gets or sets the list of VM NIC to replicate. + /// Gets or sets the target CPU cores. + /// Gets or sets a value indicating whether memory is dynamical. + /// Protected item dynamic memory config. + /// Gets or sets the target memory in mega-bytes. + /// Gets or sets the type of the OS. + internal VMwareToAzStackHciProtectedItemCustomPropertiesUpdate(string instanceType, IDictionary serializedAdditionalRawData, IList nicsToInclude, int? targetCpuCores, bool? isDynamicRam, ProtectedItemDynamicMemoryConfig dynamicMemoryConfig, int? targetMemoryInMegaBytes, string osType) : base(instanceType, serializedAdditionalRawData) + { + NicsToInclude = nicsToInclude; + TargetCpuCores = targetCpuCores; + IsDynamicRam = isDynamicRam; + DynamicMemoryConfig = dynamicMemoryConfig; + TargetMemoryInMegaBytes = targetMemoryInMegaBytes; + OSType = osType; + InstanceType = instanceType ?? "VMwareToAzStackHCI"; + } + + /// Gets or sets the list of VM NIC to replicate. + public IList NicsToInclude { get; } + /// Gets or sets the target CPU cores. + public int? TargetCpuCores { get; set; } + /// Gets or sets a value indicating whether memory is dynamical. + public bool? IsDynamicRam { get; set; } + /// Protected item dynamic memory config. + public ProtectedItemDynamicMemoryConfig DynamicMemoryConfig { get; set; } + /// Gets or sets the target memory in mega-bytes. + public int? TargetMemoryInMegaBytes { get; set; } + /// Gets or sets the type of the OS. + public string OSType { get; set; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciProtectedNicProperties.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciProtectedNicProperties.Serialization.cs new file mode 100644 index 000000000000..5134205e1cc8 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciProtectedNicProperties.Serialization.cs @@ -0,0 +1,223 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class VMwareToAzStackHciProtectedNicProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(VMwareToAzStackHciProtectedNicProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(NicId)) + { + writer.WritePropertyName("nicId"u8); + writer.WriteStringValue(NicId); + } + if (options.Format != "W" && Optional.IsDefined(MacAddress)) + { + writer.WritePropertyName("macAddress"u8); + writer.WriteStringValue(MacAddress); + } + if (options.Format != "W" && Optional.IsDefined(Label)) + { + writer.WritePropertyName("label"u8); + writer.WriteStringValue(Label); + } + if (Optional.IsDefined(IsPrimaryNic)) + { + writer.WritePropertyName("isPrimaryNic"u8); + writer.WriteBooleanValue(IsPrimaryNic.Value); + } + if (options.Format != "W" && Optional.IsDefined(NetworkName)) + { + writer.WritePropertyName("networkName"u8); + writer.WriteStringValue(NetworkName); + } + if (options.Format != "W" && Optional.IsDefined(TargetNetworkId)) + { + writer.WritePropertyName("targetNetworkId"u8); + writer.WriteStringValue(TargetNetworkId); + } + if (options.Format != "W" && Optional.IsDefined(TestNetworkId)) + { + writer.WritePropertyName("testNetworkId"u8); + writer.WriteStringValue(TestNetworkId); + } + if (options.Format != "W" && Optional.IsDefined(SelectionTypeForFailover)) + { + writer.WritePropertyName("selectionTypeForFailover"u8); + writer.WriteStringValue(SelectionTypeForFailover.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + VMwareToAzStackHciProtectedNicProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(VMwareToAzStackHciProtectedNicProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeVMwareToAzStackHciProtectedNicProperties(document.RootElement, options); + } + + internal static VMwareToAzStackHciProtectedNicProperties DeserializeVMwareToAzStackHciProtectedNicProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string nicId = default; + string macAddress = default; + string label = default; + bool? isPrimaryNic = default; + string networkName = default; + string targetNetworkId = default; + string testNetworkId = default; + VmNicSelection? selectionTypeForFailover = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("nicId"u8)) + { + nicId = property.Value.GetString(); + continue; + } + if (property.NameEquals("macAddress"u8)) + { + macAddress = property.Value.GetString(); + continue; + } + if (property.NameEquals("label"u8)) + { + label = property.Value.GetString(); + continue; + } + if (property.NameEquals("isPrimaryNic"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isPrimaryNic = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("networkName"u8)) + { + networkName = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetNetworkId"u8)) + { + targetNetworkId = property.Value.GetString(); + continue; + } + if (property.NameEquals("testNetworkId"u8)) + { + testNetworkId = property.Value.GetString(); + continue; + } + if (property.NameEquals("selectionTypeForFailover"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + selectionTypeForFailover = new VmNicSelection(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new VMwareToAzStackHciProtectedNicProperties( + nicId, + macAddress, + label, + isPrimaryNic, + networkName, + targetNetworkId, + testNetworkId, + selectionTypeForFailover, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(VMwareToAzStackHciProtectedNicProperties)} does not support writing '{options.Format}' format."); + } + } + + VMwareToAzStackHciProtectedNicProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeVMwareToAzStackHciProtectedNicProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(VMwareToAzStackHciProtectedNicProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciProtectedNicProperties.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciProtectedNicProperties.cs new file mode 100644 index 000000000000..c7b97818ff05 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciProtectedNicProperties.cs @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// VMwareToAzStackHCI NIC properties. + public partial class VMwareToAzStackHciProtectedNicProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal VMwareToAzStackHciProtectedNicProperties() + { + } + + /// Initializes a new instance of . + /// Gets or sets the NIC Id. + /// Gets or sets the NIC mac address. + /// Gets or sets the NIC label. + /// Gets or sets a value indicating whether this is the primary NIC. + /// Gets or sets the network name. + /// Gets or sets the target network Id within AzStackHCI Cluster. + /// Gets or sets the target test network Id within AzStackHCI Cluster. + /// Gets or sets the selection type of the NIC. + /// Keeps track of any properties unknown to the library. + internal VMwareToAzStackHciProtectedNicProperties(string nicId, string macAddress, string label, bool? isPrimaryNic, string networkName, string targetNetworkId, string testNetworkId, VmNicSelection? selectionTypeForFailover, IDictionary serializedAdditionalRawData) + { + NicId = nicId; + MacAddress = macAddress; + Label = label; + IsPrimaryNic = isPrimaryNic; + NetworkName = networkName; + TargetNetworkId = targetNetworkId; + TestNetworkId = testNetworkId; + SelectionTypeForFailover = selectionTypeForFailover; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets or sets the NIC Id. + public string NicId { get; } + /// Gets or sets the NIC mac address. + public string MacAddress { get; } + /// Gets or sets the NIC label. + public string Label { get; } + /// Gets or sets a value indicating whether this is the primary NIC. + public bool? IsPrimaryNic { get; } + /// Gets or sets the network name. + public string NetworkName { get; } + /// Gets or sets the target network Id within AzStackHCI Cluster. + public string TargetNetworkId { get; } + /// Gets or sets the target test network Id within AzStackHCI Cluster. + public string TestNetworkId { get; } + /// Gets or sets the selection type of the NIC. + public VmNicSelection? SelectionTypeForFailover { get; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciRecoveryPointCustomProperties.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciRecoveryPointCustomProperties.Serialization.cs new file mode 100644 index 000000000000..2b658fbc7747 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciRecoveryPointCustomProperties.Serialization.cs @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class VMwareToAzStackHciRecoveryPointCustomProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(VMwareToAzStackHciRecoveryPointCustomProperties)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (options.Format != "W" && Optional.IsCollectionDefined(DiskIds)) + { + writer.WritePropertyName("diskIds"u8); + writer.WriteStartArray(); + foreach (var item in DiskIds) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + } + + VMwareToAzStackHciRecoveryPointCustomProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(VMwareToAzStackHciRecoveryPointCustomProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeVMwareToAzStackHciRecoveryPointCustomProperties(document.RootElement, options); + } + + internal static VMwareToAzStackHciRecoveryPointCustomProperties DeserializeVMwareToAzStackHciRecoveryPointCustomProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList diskIds = default; + string instanceType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("diskIds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + diskIds = array; + continue; + } + if (property.NameEquals("instanceType"u8)) + { + instanceType = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new VMwareToAzStackHciRecoveryPointCustomProperties(instanceType, serializedAdditionalRawData, diskIds ?? new ChangeTrackingList()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(VMwareToAzStackHciRecoveryPointCustomProperties)} does not support writing '{options.Format}' format."); + } + } + + VMwareToAzStackHciRecoveryPointCustomProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeVMwareToAzStackHciRecoveryPointCustomProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(VMwareToAzStackHciRecoveryPointCustomProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciRecoveryPointCustomProperties.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciRecoveryPointCustomProperties.cs new file mode 100644 index 000000000000..16ac151433bb --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciRecoveryPointCustomProperties.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.RecoveryServicesDataReplication.Models +{ + /// VMware to AzStackHCI recovery point model custom properties. + public partial class VMwareToAzStackHciRecoveryPointCustomProperties : DataReplicationRecoveryPointCustomProperties + { + /// Initializes a new instance of . + internal VMwareToAzStackHciRecoveryPointCustomProperties() + { + DiskIds = new ChangeTrackingList(); + InstanceType = "VMwareToAzStackHCIRecoveryPointModelCustomProperties"; + } + + /// Initializes a new instance of . + /// Discriminator property for DataReplicationRecoveryPointCustomProperties. + /// Keeps track of any properties unknown to the library. + /// Gets or sets the list of the disk Ids. + internal VMwareToAzStackHciRecoveryPointCustomProperties(string instanceType, IDictionary serializedAdditionalRawData, IReadOnlyList diskIds) : base(instanceType, serializedAdditionalRawData) + { + DiskIds = diskIds; + InstanceType = instanceType ?? "VMwareToAzStackHCIRecoveryPointModelCustomProperties"; + } + + /// Gets or sets the list of the disk Ids. + public IReadOnlyList DiskIds { get; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciReplicationExtensionCustomProperties.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciReplicationExtensionCustomProperties.Serialization.cs new file mode 100644 index 000000000000..66a6bda48142 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciReplicationExtensionCustomProperties.Serialization.cs @@ -0,0 +1,318 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + public partial class VMwareToAzStackHciReplicationExtensionCustomProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(VMwareToAzStackHciReplicationExtensionCustomProperties)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("vmwareFabricArmId"u8); + writer.WriteStringValue(VmwareFabricArmId); + if (options.Format != "W" && Optional.IsDefined(VmwareSiteId)) + { + writer.WritePropertyName("vmwareSiteId"u8); + writer.WriteStringValue(VmwareSiteId); + } + writer.WritePropertyName("azStackHciFabricArmId"u8); + writer.WriteStringValue(AzStackHciFabricArmId); + if (options.Format != "W" && Optional.IsDefined(AzStackHciSiteId)) + { + writer.WritePropertyName("azStackHciSiteId"u8); + writer.WriteStringValue(AzStackHciSiteId); + } + if (Optional.IsDefined(StorageAccountId)) + { + writer.WritePropertyName("storageAccountId"u8); + writer.WriteStringValue(StorageAccountId); + } + if (Optional.IsDefined(StorageAccountSasSecretName)) + { + writer.WritePropertyName("storageAccountSasSecretName"u8); + writer.WriteStringValue(StorageAccountSasSecretName); + } + if (options.Format != "W" && Optional.IsDefined(AsrServiceUri)) + { + writer.WritePropertyName("asrServiceUri"u8); + writer.WriteStringValue(AsrServiceUri.AbsoluteUri); + } + if (options.Format != "W" && Optional.IsDefined(RcmServiceUri)) + { + writer.WritePropertyName("rcmServiceUri"u8); + writer.WriteStringValue(RcmServiceUri.AbsoluteUri); + } + if (options.Format != "W" && Optional.IsDefined(GatewayServiceUri)) + { + writer.WritePropertyName("gatewayServiceUri"u8); + writer.WriteStringValue(GatewayServiceUri.AbsoluteUri); + } + if (options.Format != "W" && Optional.IsDefined(SourceGatewayServiceId)) + { + writer.WritePropertyName("sourceGatewayServiceId"u8); + writer.WriteStringValue(SourceGatewayServiceId); + } + if (options.Format != "W" && Optional.IsDefined(TargetGatewayServiceId)) + { + writer.WritePropertyName("targetGatewayServiceId"u8); + writer.WriteStringValue(TargetGatewayServiceId); + } + if (options.Format != "W" && Optional.IsDefined(SourceStorageContainerName)) + { + writer.WritePropertyName("sourceStorageContainerName"u8); + writer.WriteStringValue(SourceStorageContainerName); + } + if (options.Format != "W" && Optional.IsDefined(TargetStorageContainerName)) + { + writer.WritePropertyName("targetStorageContainerName"u8); + writer.WriteStringValue(TargetStorageContainerName); + } + if (options.Format != "W" && Optional.IsDefined(ResourceLocation)) + { + writer.WritePropertyName("resourceLocation"u8); + writer.WriteStringValue(ResourceLocation); + } + if (options.Format != "W" && Optional.IsDefined(SubscriptionId)) + { + writer.WritePropertyName("subscriptionId"u8); + writer.WriteStringValue(SubscriptionId); + } + if (options.Format != "W" && Optional.IsDefined(ResourceGroup)) + { + writer.WritePropertyName("resourceGroup"u8); + writer.WriteStringValue(ResourceGroup); + } + } + + VMwareToAzStackHciReplicationExtensionCustomProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(VMwareToAzStackHciReplicationExtensionCustomProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeVMwareToAzStackHciReplicationExtensionCustomProperties(document.RootElement, options); + } + + internal static VMwareToAzStackHciReplicationExtensionCustomProperties DeserializeVMwareToAzStackHciReplicationExtensionCustomProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier vmwareFabricArmId = default; + ResourceIdentifier vmwareSiteId = default; + ResourceIdentifier azStackHciFabricArmId = default; + ResourceIdentifier azStackHciSiteId = default; + string storageAccountId = default; + string storageAccountSasSecretName = default; + Uri asrServiceUri = default; + Uri rcmServiceUri = default; + Uri gatewayServiceUri = default; + string sourceGatewayServiceId = default; + string targetGatewayServiceId = default; + string sourceStorageContainerName = default; + string targetStorageContainerName = default; + string resourceLocation = default; + string subscriptionId = default; + string resourceGroup = default; + string instanceType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("vmwareFabricArmId"u8)) + { + vmwareFabricArmId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("vmwareSiteId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + vmwareSiteId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("azStackHciFabricArmId"u8)) + { + azStackHciFabricArmId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("azStackHciSiteId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + azStackHciSiteId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("storageAccountId"u8)) + { + storageAccountId = property.Value.GetString(); + continue; + } + if (property.NameEquals("storageAccountSasSecretName"u8)) + { + storageAccountSasSecretName = property.Value.GetString(); + continue; + } + if (property.NameEquals("asrServiceUri"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + asrServiceUri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("rcmServiceUri"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + rcmServiceUri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("gatewayServiceUri"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + gatewayServiceUri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("sourceGatewayServiceId"u8)) + { + sourceGatewayServiceId = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetGatewayServiceId"u8)) + { + targetGatewayServiceId = property.Value.GetString(); + continue; + } + if (property.NameEquals("sourceStorageContainerName"u8)) + { + sourceStorageContainerName = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetStorageContainerName"u8)) + { + targetStorageContainerName = property.Value.GetString(); + continue; + } + if (property.NameEquals("resourceLocation"u8)) + { + resourceLocation = property.Value.GetString(); + continue; + } + if (property.NameEquals("subscriptionId"u8)) + { + subscriptionId = property.Value.GetString(); + continue; + } + if (property.NameEquals("resourceGroup"u8)) + { + resourceGroup = property.Value.GetString(); + continue; + } + if (property.NameEquals("instanceType"u8)) + { + instanceType = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new VMwareToAzStackHciReplicationExtensionCustomProperties( + instanceType, + serializedAdditionalRawData, + vmwareFabricArmId, + vmwareSiteId, + azStackHciFabricArmId, + azStackHciSiteId, + storageAccountId, + storageAccountSasSecretName, + asrServiceUri, + rcmServiceUri, + gatewayServiceUri, + sourceGatewayServiceId, + targetGatewayServiceId, + sourceStorageContainerName, + targetStorageContainerName, + resourceLocation, + subscriptionId, + resourceGroup); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(VMwareToAzStackHciReplicationExtensionCustomProperties)} does not support writing '{options.Format}' format."); + } + } + + VMwareToAzStackHciReplicationExtensionCustomProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeVMwareToAzStackHciReplicationExtensionCustomProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(VMwareToAzStackHciReplicationExtensionCustomProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciReplicationExtensionCustomProperties.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciReplicationExtensionCustomProperties.cs new file mode 100644 index 000000000000..3eb055f7b13a --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzStackHciReplicationExtensionCustomProperties.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// VMware to AzStackHCI Replication extension model custom properties. + public partial class VMwareToAzStackHciReplicationExtensionCustomProperties : DataReplicationExtensionCustomProperties + { + /// Initializes a new instance of . + /// Gets or sets the ARM Id of the source VMware fabric. + /// Gets or sets the ARM Id of the target AzStackHCI fabric. + /// or is null. + public VMwareToAzStackHciReplicationExtensionCustomProperties(ResourceIdentifier vmwareFabricArmId, ResourceIdentifier azStackHciFabricArmId) + { + Argument.AssertNotNull(vmwareFabricArmId, nameof(vmwareFabricArmId)); + Argument.AssertNotNull(azStackHciFabricArmId, nameof(azStackHciFabricArmId)); + + VmwareFabricArmId = vmwareFabricArmId; + AzStackHciFabricArmId = azStackHciFabricArmId; + InstanceType = "VMwareToAzStackHCI"; + } + + /// Initializes a new instance of . + /// Discriminator property for DataReplicationExtensionCustomProperties. + /// Keeps track of any properties unknown to the library. + /// Gets or sets the ARM Id of the source VMware fabric. + /// Gets or sets the ARM Id of the VMware site. + /// Gets or sets the ARM Id of the target AzStackHCI fabric. + /// Gets or sets the ARM Id of the AzStackHCI site. + /// Gets or sets the storage account Id. + /// Gets or sets the Sas Secret of storage account. + /// Gets or sets the Uri of ASR. + /// Gets or sets the Uri of Rcm. + /// Gets or sets the Uri of Gateway. + /// Gets or sets the gateway service Id of source. + /// Gets or sets the gateway service Id of target. + /// Gets or sets the source storage container name. + /// Gets or sets the target storage container name. + /// Gets or sets the resource location. + /// Gets or sets the subscription. + /// Gets or sets the resource group. + internal VMwareToAzStackHciReplicationExtensionCustomProperties(string instanceType, IDictionary serializedAdditionalRawData, ResourceIdentifier vmwareFabricArmId, ResourceIdentifier vmwareSiteId, ResourceIdentifier azStackHciFabricArmId, ResourceIdentifier azStackHciSiteId, string storageAccountId, string storageAccountSasSecretName, Uri asrServiceUri, Uri rcmServiceUri, Uri gatewayServiceUri, string sourceGatewayServiceId, string targetGatewayServiceId, string sourceStorageContainerName, string targetStorageContainerName, string resourceLocation, string subscriptionId, string resourceGroup) : base(instanceType, serializedAdditionalRawData) + { + VmwareFabricArmId = vmwareFabricArmId; + VmwareSiteId = vmwareSiteId; + AzStackHciFabricArmId = azStackHciFabricArmId; + AzStackHciSiteId = azStackHciSiteId; + StorageAccountId = storageAccountId; + StorageAccountSasSecretName = storageAccountSasSecretName; + AsrServiceUri = asrServiceUri; + RcmServiceUri = rcmServiceUri; + GatewayServiceUri = gatewayServiceUri; + SourceGatewayServiceId = sourceGatewayServiceId; + TargetGatewayServiceId = targetGatewayServiceId; + SourceStorageContainerName = sourceStorageContainerName; + TargetStorageContainerName = targetStorageContainerName; + ResourceLocation = resourceLocation; + SubscriptionId = subscriptionId; + ResourceGroup = resourceGroup; + InstanceType = instanceType ?? "VMwareToAzStackHCI"; + } + + /// Initializes a new instance of for deserialization. + internal VMwareToAzStackHciReplicationExtensionCustomProperties() + { + } + + /// Gets or sets the ARM Id of the source VMware fabric. + public ResourceIdentifier VmwareFabricArmId { get; set; } + /// Gets or sets the ARM Id of the VMware site. + public ResourceIdentifier VmwareSiteId { get; } + /// Gets or sets the ARM Id of the target AzStackHCI fabric. + public ResourceIdentifier AzStackHciFabricArmId { get; set; } + /// Gets or sets the ARM Id of the AzStackHCI site. + public ResourceIdentifier AzStackHciSiteId { get; } + /// Gets or sets the storage account Id. + public string StorageAccountId { get; set; } + /// Gets or sets the Sas Secret of storage account. + public string StorageAccountSasSecretName { get; set; } + /// Gets or sets the Uri of ASR. + public Uri AsrServiceUri { get; } + /// Gets or sets the Uri of Rcm. + public Uri RcmServiceUri { get; } + /// Gets or sets the Uri of Gateway. + public Uri GatewayServiceUri { get; } + /// Gets or sets the gateway service Id of source. + public string SourceGatewayServiceId { get; } + /// Gets or sets the gateway service Id of target. + public string TargetGatewayServiceId { get; } + /// Gets or sets the source storage container name. + public string SourceStorageContainerName { get; } + /// Gets or sets the target storage container name. + public string TargetStorageContainerName { get; } + /// Gets or sets the resource location. + public string ResourceLocation { get; } + /// Gets or sets the subscription. + public string SubscriptionId { get; } + /// Gets or sets the resource group. + public string ResourceGroup { get; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzureMigrateResyncState.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzureMigrateResyncState.cs new file mode 100644 index 000000000000..86cd45ebfb00 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VMwareToAzureMigrateResyncState.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Gets or sets the resync state. + public readonly partial struct VMwareToAzureMigrateResyncState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public VMwareToAzureMigrateResyncState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoneValue = "None"; + private const string PreparedForResynchronizationValue = "PreparedForResynchronization"; + private const string StartedResynchronizationValue = "StartedResynchronization"; + + /// None state. + public static VMwareToAzureMigrateResyncState None { get; } = new VMwareToAzureMigrateResyncState(NoneValue); + /// Prepared for resynchronization state. + public static VMwareToAzureMigrateResyncState PreparedForResynchronization { get; } = new VMwareToAzureMigrateResyncState(PreparedForResynchronizationValue); + /// Started resynchronization state. + public static VMwareToAzureMigrateResyncState StartedResynchronization { get; } = new VMwareToAzureMigrateResyncState(StartedResynchronizationValue); + /// Determines if two values are the same. + public static bool operator ==(VMwareToAzureMigrateResyncState left, VMwareToAzureMigrateResyncState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(VMwareToAzureMigrateResyncState left, VMwareToAzureMigrateResyncState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator VMwareToAzureMigrateResyncState(string value) => new VMwareToAzureMigrateResyncState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is VMwareToAzureMigrateResyncState other && Equals(other); + /// + public bool Equals(VMwareToAzureMigrateResyncState 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/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VaultModelListResult.Serialization.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VaultModelListResult.Serialization.cs new file mode 100644 index 000000000000..c0ebad949be1 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VaultModelListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + internal partial class VaultModelListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(VaultModelListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + VaultModelListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(VaultModelListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeVaultModelListResult(document.RootElement, options); + } + + internal static VaultModelListResult DeserializeVaultModelListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DataReplicationVaultData.DeserializeDataReplicationVaultData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new VaultModelListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(VaultModelListResult)} does not support writing '{options.Format}' format."); + } + } + + VaultModelListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeVaultModelListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(VaultModelListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VaultModelListResult.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VaultModelListResult.cs new file mode 100644 index 000000000000..faf0723c4776 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VaultModelListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// The response of a VaultModel list operation. + internal partial class VaultModelListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The VaultModel items on this page. + /// is null. + internal VaultModelListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The VaultModel items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal VaultModelListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal VaultModelListResult() + { + } + + /// The VaultModel items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VmNicSelection.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VmNicSelection.cs new file mode 100644 index 000000000000..1b7b81e237db --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/VmNicSelection.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models +{ + /// Gets or sets the selection type of the NIC. + public readonly partial struct VmNicSelection : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public VmNicSelection(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NotSelectedValue = "NotSelected"; + private const string SelectedByUserValue = "SelectedByUser"; + private const string SelectedByDefaultValue = "SelectedByDefault"; + private const string SelectedByUserOverrideValue = "SelectedByUserOverride"; + + /// Not Selected. + public static VmNicSelection NotSelected { get; } = new VmNicSelection(NotSelectedValue); + /// Selected by user. + public static VmNicSelection SelectedByUser { get; } = new VmNicSelection(SelectedByUserValue); + /// Default selection by ASR. + public static VmNicSelection SelectedByDefault { get; } = new VmNicSelection(SelectedByDefaultValue); + /// NIC configuration overridden by user. Differs from SelectedByUser in the sense that the legacy SelectedByUser is used both for explicit modification by user and implicit approval of user if the settings are used for TFO/FO. SelectedByUserOverride implies user overriding at least one of the configurations. + public static VmNicSelection SelectedByUserOverride { get; } = new VmNicSelection(SelectedByUserOverrideValue); + /// Determines if two values are the same. + public static bool operator ==(VmNicSelection left, VmNicSelection right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(VmNicSelection left, VmNicSelection right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator VmNicSelection(string value) => new VmNicSelection(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is VmNicSelection other && Equals(other); + /// + public bool Equals(VmNicSelection 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/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ProviderConstants.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ProviderConstants.cs new file mode 100644 index 000000000000..c468763062c9 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/ProviderConstants.cs @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + internal static class ProviderConstants + { + public static string DefaultProviderNamespace { get; } = ClientDiagnostics.GetResourceProviderNamespace(typeof(ProviderConstants).Assembly); + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/CheckNameAvailabilityRestOperations.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/CheckNameAvailabilityRestOperations.cs new file mode 100644 index 000000000000..a5d5c901ac68 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/CheckNameAvailabilityRestOperations.cs @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + internal partial class CheckNameAvailabilityRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of CheckNameAvailabilityRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public CheckNameAvailabilityRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2024-09-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreatePostRequestUri(string subscriptionId, AzureLocation location, DataReplicationNameAvailabilityContent content) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.DataReplication/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/checkNameAvailability", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreatePostRequest(string subscriptionId, AzureLocation location, DataReplicationNameAvailabilityContent content) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.DataReplication/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/checkNameAvailability", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + if (content != null) + { + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; + } + _userAgent.Apply(message); + return message; + } + + /// Checks the resource name availability. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// Resource details. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task> PostAsync(string subscriptionId, AzureLocation location, DataReplicationNameAvailabilityContent content = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreatePostRequest(subscriptionId, location, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DataReplicationNameAvailabilityResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DataReplicationNameAvailabilityResult.DeserializeDataReplicationNameAvailabilityResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Checks the resource name availability. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// Resource details. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response Post(string subscriptionId, AzureLocation location, DataReplicationNameAvailabilityContent content = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreatePostRequest(subscriptionId, location, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DataReplicationNameAvailabilityResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DataReplicationNameAvailabilityResult.DeserializeDataReplicationNameAvailabilityResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/DeploymentPreflightRestOperations.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/DeploymentPreflightRestOperations.cs new file mode 100644 index 000000000000..de8ca70d59fe --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/DeploymentPreflightRestOperations.cs @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + internal partial class DeploymentPreflightRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of DeploymentPreflightRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public DeploymentPreflightRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2024-09-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreatePostRequestUri(string subscriptionId, string resourceGroupName, string deploymentId, DeploymentPreflight body) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/deployments/", false); + uri.AppendPath(deploymentId, true); + uri.AppendPath("/preflight", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreatePostRequest(string subscriptionId, string resourceGroupName, string deploymentId, DeploymentPreflight body) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/deployments/", false); + uri.AppendPath(deploymentId, true); + uri.AppendPath("/preflight", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + if (body != null) + { + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(body, ModelSerializationExtensions.WireOptions); + request.Content = content; + } + _userAgent.Apply(message); + return message; + } + + /// Performs resource deployment preflight validation. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Deployment Id. + /// Deployment preflight model. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> PostAsync(string subscriptionId, string resourceGroupName, string deploymentId, DeploymentPreflight body = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(deploymentId, nameof(deploymentId)); + + using var message = CreatePostRequest(subscriptionId, resourceGroupName, deploymentId, body); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DeploymentPreflight value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DeploymentPreflight.DeserializeDeploymentPreflight(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Performs resource deployment preflight validation. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Deployment Id. + /// Deployment preflight model. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Post(string subscriptionId, string resourceGroupName, string deploymentId, DeploymentPreflight body = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(deploymentId, nameof(deploymentId)); + + using var message = CreatePostRequest(subscriptionId, resourceGroupName, deploymentId, body); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DeploymentPreflight value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DeploymentPreflight.DeserializeDeploymentPreflight(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/EmailConfigurationRestOperations.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/EmailConfigurationRestOperations.cs new file mode 100644 index 000000000000..e1f15eaa2bfc --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/EmailConfigurationRestOperations.cs @@ -0,0 +1,431 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + internal partial class EmailConfigurationRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of EmailConfigurationRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public EmailConfigurationRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2024-09-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string vaultName, string emailConfigurationName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/alertSettings/", false); + uri.AppendPath(emailConfigurationName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string vaultName, string emailConfigurationName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/alertSettings/", false); + uri.AppendPath(emailConfigurationName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the details of the alert configuration setting. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The email configuration name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string vaultName, string emailConfigurationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(emailConfigurationName, nameof(emailConfigurationName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, vaultName, emailConfigurationName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DataReplicationEmailConfigurationData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DataReplicationEmailConfigurationData.DeserializeDataReplicationEmailConfigurationData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DataReplicationEmailConfigurationData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the details of the alert configuration setting. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The email configuration name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string vaultName, string emailConfigurationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(emailConfigurationName, nameof(emailConfigurationName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, vaultName, emailConfigurationName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DataReplicationEmailConfigurationData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DataReplicationEmailConfigurationData.DeserializeDataReplicationEmailConfigurationData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DataReplicationEmailConfigurationData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateRequestUri(string subscriptionId, string resourceGroupName, string vaultName, string emailConfigurationName, DataReplicationEmailConfigurationData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/alertSettings/", false); + uri.AppendPath(emailConfigurationName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string vaultName, string emailConfigurationName, DataReplicationEmailConfigurationData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/alertSettings/", false); + uri.AppendPath(emailConfigurationName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates an alert configuration setting for the given vault. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The email configuration name. + /// EmailConfiguration model. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> CreateAsync(string subscriptionId, string resourceGroupName, string vaultName, string emailConfigurationName, DataReplicationEmailConfigurationData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(emailConfigurationName, nameof(emailConfigurationName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, vaultName, emailConfigurationName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + { + DataReplicationEmailConfigurationData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DataReplicationEmailConfigurationData.DeserializeDataReplicationEmailConfigurationData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates an alert configuration setting for the given vault. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The email configuration name. + /// EmailConfiguration model. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Create(string subscriptionId, string resourceGroupName, string vaultName, string emailConfigurationName, DataReplicationEmailConfigurationData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(emailConfigurationName, nameof(emailConfigurationName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, vaultName, emailConfigurationName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + { + DataReplicationEmailConfigurationData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DataReplicationEmailConfigurationData.DeserializeDataReplicationEmailConfigurationData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string vaultName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/alertSettings", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string vaultName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/alertSettings", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the list of alert configuration settings for the given vault. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, vaultName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + EmailConfigurationModelListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = EmailConfigurationModelListResult.DeserializeEmailConfigurationModelListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the list of alert configuration settings for the given vault. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, vaultName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + EmailConfigurationModelListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = EmailConfigurationModelListResult.DeserializeEmailConfigurationModelListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string vaultName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string vaultName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the list of alert configuration settings for the given vault. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, vaultName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + EmailConfigurationModelListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = EmailConfigurationModelListResult.DeserializeEmailConfigurationModelListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the list of alert configuration settings for the given vault. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, vaultName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + EmailConfigurationModelListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = EmailConfigurationModelListResult.DeserializeEmailConfigurationModelListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/EventRestOperations.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/EventRestOperations.cs new file mode 100644 index 000000000000..88441d3676c4 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/EventRestOperations.cs @@ -0,0 +1,357 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + internal partial class EventRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of EventRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public EventRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2024-09-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string vaultName, string eventName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/events/", false); + uri.AppendPath(eventName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string vaultName, string eventName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/events/", false); + uri.AppendPath(eventName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the details of the event. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The event name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string vaultName, string eventName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(eventName, nameof(eventName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, vaultName, eventName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DataReplicationEventData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DataReplicationEventData.DeserializeDataReplicationEventData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DataReplicationEventData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the details of the event. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The event name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string vaultName, string eventName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(eventName, nameof(eventName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, vaultName, eventName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DataReplicationEventData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DataReplicationEventData.DeserializeDataReplicationEventData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DataReplicationEventData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string vaultName, string odataOptions, string continuationToken, int? pageSize) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/events", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (odataOptions != null) + { + uri.AppendQuery("odataOptions", odataOptions, true); + } + if (continuationToken != null) + { + uri.AppendQuery("continuationToken", continuationToken, true); + } + if (pageSize != null) + { + uri.AppendQuery("pageSize", pageSize.Value, true); + } + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string vaultName, string odataOptions, string continuationToken, int? pageSize) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/events", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (odataOptions != null) + { + uri.AppendQuery("odataOptions", odataOptions, true); + } + if (continuationToken != null) + { + uri.AppendQuery("continuationToken", continuationToken, true); + } + if (pageSize != null) + { + uri.AppendQuery("pageSize", pageSize.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the list of events in the given vault. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// OData options. + /// Continuation token. + /// Page size. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string vaultName, string odataOptions = null, string continuationToken = null, int? pageSize = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, vaultName, odataOptions, continuationToken, pageSize); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + EventModelListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = EventModelListResult.DeserializeEventModelListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the list of events in the given vault. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// OData options. + /// Continuation token. + /// Page size. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string vaultName, string odataOptions = null, string continuationToken = null, int? pageSize = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, vaultName, odataOptions, continuationToken, pageSize); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + EventModelListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = EventModelListResult.DeserializeEventModelListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string vaultName, string odataOptions, string continuationToken, int? pageSize) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string vaultName, string odataOptions, string continuationToken, int? pageSize) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the list of events in the given vault. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// OData options. + /// Continuation token. + /// Page size. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string vaultName, string odataOptions = null, string continuationToken = null, int? pageSize = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, vaultName, odataOptions, continuationToken, pageSize); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + EventModelListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = EventModelListResult.DeserializeEventModelListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the list of events in the given vault. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// OData options. + /// Continuation token. + /// Page size. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string vaultName, string odataOptions = null, string continuationToken = null, int? pageSize = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, vaultName, odataOptions, continuationToken, pageSize); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + EventModelListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = EventModelListResult.DeserializeEventModelListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/FabricAgentRestOperations.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/FabricAgentRestOperations.cs new file mode 100644 index 000000000000..5f3a4204ac74 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/FabricAgentRestOperations.cs @@ -0,0 +1,513 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + internal partial class FabricAgentRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of FabricAgentRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public FabricAgentRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2024-09-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string fabricName, string fabricAgentName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationFabrics/", false); + uri.AppendPath(fabricName, true); + uri.AppendPath("/fabricAgents/", false); + uri.AppendPath(fabricAgentName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string fabricName, string fabricAgentName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationFabrics/", false); + uri.AppendPath(fabricName, true); + uri.AppendPath("/fabricAgents/", false); + uri.AppendPath(fabricAgentName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the details of the fabric agent. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The fabric name. + /// The fabric agent name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string fabricName, string fabricAgentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fabricName, nameof(fabricName)); + Argument.AssertNotNullOrEmpty(fabricAgentName, nameof(fabricAgentName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, fabricName, fabricAgentName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DataReplicationFabricAgentData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DataReplicationFabricAgentData.DeserializeDataReplicationFabricAgentData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DataReplicationFabricAgentData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the details of the fabric agent. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The fabric name. + /// The fabric agent name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string fabricName, string fabricAgentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fabricName, nameof(fabricName)); + Argument.AssertNotNullOrEmpty(fabricAgentName, nameof(fabricAgentName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, fabricName, fabricAgentName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DataReplicationFabricAgentData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DataReplicationFabricAgentData.DeserializeDataReplicationFabricAgentData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DataReplicationFabricAgentData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateRequestUri(string subscriptionId, string resourceGroupName, string fabricName, string fabricAgentName, DataReplicationFabricAgentData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationFabrics/", false); + uri.AppendPath(fabricName, true); + uri.AppendPath("/fabricAgents/", false); + uri.AppendPath(fabricAgentName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string fabricName, string fabricAgentName, DataReplicationFabricAgentData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationFabrics/", false); + uri.AppendPath(fabricName, true); + uri.AppendPath("/fabricAgents/", false); + uri.AppendPath(fabricAgentName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates the fabric agent. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The fabric name. + /// The fabric agent name. + /// Fabric agent model. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateAsync(string subscriptionId, string resourceGroupName, string fabricName, string fabricAgentName, DataReplicationFabricAgentData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fabricName, nameof(fabricName)); + Argument.AssertNotNullOrEmpty(fabricAgentName, nameof(fabricAgentName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, fabricName, fabricAgentName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates the fabric agent. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The fabric name. + /// The fabric agent name. + /// Fabric agent model. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Create(string subscriptionId, string resourceGroupName, string fabricName, string fabricAgentName, DataReplicationFabricAgentData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fabricName, nameof(fabricName)); + Argument.AssertNotNullOrEmpty(fabricAgentName, nameof(fabricAgentName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, fabricName, fabricAgentName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string fabricName, string fabricAgentName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationFabrics/", false); + uri.AppendPath(fabricName, true); + uri.AppendPath("/fabricAgents/", false); + uri.AppendPath(fabricAgentName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string fabricName, string fabricAgentName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationFabrics/", false); + uri.AppendPath(fabricName, true); + uri.AppendPath("/fabricAgents/", false); + uri.AppendPath(fabricAgentName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes fabric agent. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The fabric name. + /// The fabric agent name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string fabricName, string fabricAgentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fabricName, nameof(fabricName)); + Argument.AssertNotNullOrEmpty(fabricAgentName, nameof(fabricAgentName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, fabricName, fabricAgentName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Deletes fabric agent. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The fabric name. + /// The fabric agent name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string fabricName, string fabricAgentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fabricName, nameof(fabricName)); + Argument.AssertNotNullOrEmpty(fabricAgentName, nameof(fabricAgentName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, fabricName, fabricAgentName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string fabricName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationFabrics/", false); + uri.AppendPath(fabricName, true); + uri.AppendPath("/fabricAgents", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string fabricName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationFabrics/", false); + uri.AppendPath(fabricName, true); + uri.AppendPath("/fabricAgents", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the list of fabric agents in the given fabric. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The fabric name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string fabricName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fabricName, nameof(fabricName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, fabricName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + FabricAgentModelListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = FabricAgentModelListResult.DeserializeFabricAgentModelListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the list of fabric agents in the given fabric. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The fabric name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string fabricName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fabricName, nameof(fabricName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, fabricName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + FabricAgentModelListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = FabricAgentModelListResult.DeserializeFabricAgentModelListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string fabricName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string fabricName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the list of fabric agents in the given fabric. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The fabric name. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string fabricName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fabricName, nameof(fabricName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, fabricName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + FabricAgentModelListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = FabricAgentModelListResult.DeserializeFabricAgentModelListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the list of fabric agents in the given fabric. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The fabric name. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string fabricName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fabricName, nameof(fabricName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, fabricName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + FabricAgentModelListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = FabricAgentModelListResult.DeserializeFabricAgentModelListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/FabricRestOperations.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/FabricRestOperations.cs new file mode 100644 index 000000000000..abd43c6217dc --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/FabricRestOperations.cs @@ -0,0 +1,735 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + internal partial class FabricRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of FabricRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public FabricRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2024-09-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string fabricName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationFabrics/", false); + uri.AppendPath(fabricName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string fabricName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationFabrics/", false); + uri.AppendPath(fabricName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the details of the fabric. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The fabric name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string fabricName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fabricName, nameof(fabricName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, fabricName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DataReplicationFabricData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DataReplicationFabricData.DeserializeDataReplicationFabricData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DataReplicationFabricData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the details of the fabric. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The fabric name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string fabricName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fabricName, nameof(fabricName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, fabricName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DataReplicationFabricData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DataReplicationFabricData.DeserializeDataReplicationFabricData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DataReplicationFabricData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateRequestUri(string subscriptionId, string resourceGroupName, string fabricName, DataReplicationFabricData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationFabrics/", false); + uri.AppendPath(fabricName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string fabricName, DataReplicationFabricData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationFabrics/", false); + uri.AppendPath(fabricName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates the fabric. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The fabric name. + /// Fabric properties. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task CreateAsync(string subscriptionId, string resourceGroupName, string fabricName, DataReplicationFabricData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fabricName, nameof(fabricName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, fabricName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates the fabric. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The fabric name. + /// Fabric properties. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Create(string subscriptionId, string resourceGroupName, string fabricName, DataReplicationFabricData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fabricName, nameof(fabricName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, fabricName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string fabricName, DataReplicationFabricPatch patch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationFabrics/", false); + uri.AppendPath(fabricName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string fabricName, DataReplicationFabricPatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationFabrics/", false); + uri.AppendPath(fabricName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Performs update on the fabric. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The fabric name. + /// Fabric properties. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string fabricName, DataReplicationFabricPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fabricName, nameof(fabricName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, fabricName, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Performs update on the fabric. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The fabric name. + /// Fabric properties. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string fabricName, DataReplicationFabricPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fabricName, nameof(fabricName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, fabricName, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string fabricName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationFabrics/", false); + uri.AppendPath(fabricName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string fabricName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationFabrics/", false); + uri.AppendPath(fabricName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Removes the fabric. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The fabric name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string fabricName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fabricName, nameof(fabricName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, fabricName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Removes the fabric. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The fabric name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string fabricName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(fabricName, nameof(fabricName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, fabricName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string continuationToken) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationFabrics", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (continuationToken != null) + { + uri.AppendQuery("continuationToken", continuationToken, true); + } + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string continuationToken) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationFabrics", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (continuationToken != null) + { + uri.AppendQuery("continuationToken", continuationToken, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the list of fabrics in the given subscription and resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Continuation token from the previous call. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string continuationToken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, continuationToken); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + FabricModelListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = FabricModelListResult.DeserializeFabricModelListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the list of fabrics in the given subscription and resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Continuation token from the previous call. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string continuationToken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, continuationToken); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + FabricModelListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = FabricModelListResult.DeserializeFabricModelListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListBySubscriptionRequestUri(string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationFabrics", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationFabrics", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the list of fabrics in the given subscription. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionAsync(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + FabricModelListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = FabricModelListResult.DeserializeFabricModelListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the list of fabrics in the given subscription. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscription(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + FabricModelListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = FabricModelListResult.DeserializeFabricModelListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string continuationToken) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string continuationToken) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the list of fabrics in the given subscription and resource group. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Continuation token from the previous call. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string continuationToken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, continuationToken); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + FabricModelListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = FabricModelListResult.DeserializeFabricModelListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the list of fabrics in the given subscription and resource group. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Continuation token from the previous call. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string continuationToken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, continuationToken); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + FabricModelListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = FabricModelListResult.DeserializeFabricModelListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListBySubscriptionNextPageRequestUri(string nextLink, string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, string subscriptionId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the list of fabrics in the given subscription. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionNextPageAsync(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + FabricModelListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = FabricModelListResult.DeserializeFabricModelListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the list of fabrics in the given subscription. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscriptionNextPage(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + FabricModelListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = FabricModelListResult.DeserializeFabricModelListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/JobRestOperations.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/JobRestOperations.cs new file mode 100644 index 000000000000..f053e81f3639 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/JobRestOperations.cs @@ -0,0 +1,357 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + internal partial class JobRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of JobRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public JobRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2024-09-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string vaultName, string jobName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/jobs/", false); + uri.AppendPath(jobName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string vaultName, string jobName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/jobs/", false); + uri.AppendPath(jobName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the details of the job. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The job name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string vaultName, string jobName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, vaultName, jobName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DataReplicationJobData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DataReplicationJobData.DeserializeDataReplicationJobData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DataReplicationJobData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the details of the job. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The job name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string vaultName, string jobName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(jobName, nameof(jobName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, vaultName, jobName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DataReplicationJobData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DataReplicationJobData.DeserializeDataReplicationJobData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DataReplicationJobData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string vaultName, string odataOptions, string continuationToken, int? pageSize) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/jobs", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (odataOptions != null) + { + uri.AppendQuery("odataOptions", odataOptions, true); + } + if (continuationToken != null) + { + uri.AppendQuery("continuationToken", continuationToken, true); + } + if (pageSize != null) + { + uri.AppendQuery("pageSize", pageSize.Value, true); + } + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string vaultName, string odataOptions, string continuationToken, int? pageSize) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/jobs", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (odataOptions != null) + { + uri.AppendQuery("odataOptions", odataOptions, true); + } + if (continuationToken != null) + { + uri.AppendQuery("continuationToken", continuationToken, true); + } + if (pageSize != null) + { + uri.AppendQuery("pageSize", pageSize.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the list of jobs in the given vault. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// OData options. + /// Continuation token. + /// Page size. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string vaultName, string odataOptions = null, string continuationToken = null, int? pageSize = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, vaultName, odataOptions, continuationToken, pageSize); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + JobModelListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = JobModelListResult.DeserializeJobModelListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the list of jobs in the given vault. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// OData options. + /// Continuation token. + /// Page size. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string vaultName, string odataOptions = null, string continuationToken = null, int? pageSize = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, vaultName, odataOptions, continuationToken, pageSize); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + JobModelListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = JobModelListResult.DeserializeJobModelListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string vaultName, string odataOptions, string continuationToken, int? pageSize) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string vaultName, string odataOptions, string continuationToken, int? pageSize) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the list of jobs in the given vault. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// OData options. + /// Continuation token. + /// Page size. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string vaultName, string odataOptions = null, string continuationToken = null, int? pageSize = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, vaultName, odataOptions, continuationToken, pageSize); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + JobModelListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = JobModelListResult.DeserializeJobModelListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the list of jobs in the given vault. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// OData options. + /// Continuation token. + /// Page size. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string vaultName, string odataOptions = null, string continuationToken = null, int? pageSize = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, vaultName, odataOptions, continuationToken, pageSize); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + JobModelListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = JobModelListResult.DeserializeJobModelListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/PolicyRestOperations.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/PolicyRestOperations.cs new file mode 100644 index 000000000000..d0226a05de63 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/PolicyRestOperations.cs @@ -0,0 +1,513 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + internal partial class PolicyRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of PolicyRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public PolicyRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2024-09-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string vaultName, string policyName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/replicationPolicies/", false); + uri.AppendPath(policyName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string vaultName, string policyName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/replicationPolicies/", false); + uri.AppendPath(policyName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the details of the policy. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The policy name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string vaultName, string policyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(policyName, nameof(policyName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, vaultName, policyName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DataReplicationPolicyData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DataReplicationPolicyData.DeserializeDataReplicationPolicyData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DataReplicationPolicyData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the details of the policy. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The policy name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string vaultName, string policyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(policyName, nameof(policyName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, vaultName, policyName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DataReplicationPolicyData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DataReplicationPolicyData.DeserializeDataReplicationPolicyData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DataReplicationPolicyData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateRequestUri(string subscriptionId, string resourceGroupName, string vaultName, string policyName, DataReplicationPolicyData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/replicationPolicies/", false); + uri.AppendPath(policyName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string vaultName, string policyName, DataReplicationPolicyData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/replicationPolicies/", false); + uri.AppendPath(policyName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates the policy. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The policy name. + /// Policy model. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateAsync(string subscriptionId, string resourceGroupName, string vaultName, string policyName, DataReplicationPolicyData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(policyName, nameof(policyName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, vaultName, policyName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates the policy. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The policy name. + /// Policy model. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Create(string subscriptionId, string resourceGroupName, string vaultName, string policyName, DataReplicationPolicyData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(policyName, nameof(policyName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, vaultName, policyName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string vaultName, string policyName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/replicationPolicies/", false); + uri.AppendPath(policyName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string vaultName, string policyName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/replicationPolicies/", false); + uri.AppendPath(policyName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Removes the policy. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The policy name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string vaultName, string policyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(policyName, nameof(policyName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, vaultName, policyName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Removes the policy. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The policy name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string vaultName, string policyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(policyName, nameof(policyName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, vaultName, policyName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string vaultName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/replicationPolicies", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string vaultName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/replicationPolicies", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the list of policies in the given vault. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, vaultName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PolicyModelListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = PolicyModelListResult.DeserializePolicyModelListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the list of policies in the given vault. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, vaultName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PolicyModelListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = PolicyModelListResult.DeserializePolicyModelListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string vaultName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string vaultName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the list of policies in the given vault. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, vaultName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PolicyModelListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = PolicyModelListResult.DeserializePolicyModelListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the list of policies in the given vault. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, vaultName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PolicyModelListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = PolicyModelListResult.DeserializePolicyModelListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/PrivateEndpointConnectionProxiesRestOperations.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/PrivateEndpointConnectionProxiesRestOperations.cs new file mode 100644 index 000000000000..dc659b812480 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/PrivateEndpointConnectionProxiesRestOperations.cs @@ -0,0 +1,633 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + internal partial class PrivateEndpointConnectionProxiesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of PrivateEndpointConnectionProxiesRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public PrivateEndpointConnectionProxiesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2024-09-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string vaultName, string privateEndpointConnectionProxyName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/privateEndpointConnectionProxies/", false); + uri.AppendPath(privateEndpointConnectionProxyName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string vaultName, string privateEndpointConnectionProxyName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/privateEndpointConnectionProxies/", false); + uri.AppendPath(privateEndpointConnectionProxyName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the private endpoint connection proxy details. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The private endpoint connection proxy name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string vaultName, string privateEndpointConnectionProxyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(privateEndpointConnectionProxyName, nameof(privateEndpointConnectionProxyName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, vaultName, privateEndpointConnectionProxyName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DataReplicationPrivateEndpointConnectionProxyData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DataReplicationPrivateEndpointConnectionProxyData.DeserializeDataReplicationPrivateEndpointConnectionProxyData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DataReplicationPrivateEndpointConnectionProxyData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the private endpoint connection proxy details. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The private endpoint connection proxy name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string vaultName, string privateEndpointConnectionProxyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(privateEndpointConnectionProxyName, nameof(privateEndpointConnectionProxyName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, vaultName, privateEndpointConnectionProxyName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DataReplicationPrivateEndpointConnectionProxyData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DataReplicationPrivateEndpointConnectionProxyData.DeserializeDataReplicationPrivateEndpointConnectionProxyData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DataReplicationPrivateEndpointConnectionProxyData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateRequestUri(string subscriptionId, string resourceGroupName, string vaultName, string privateEndpointConnectionProxyName, DataReplicationPrivateEndpointConnectionProxyData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/privateEndpointConnectionProxies/", false); + uri.AppendPath(privateEndpointConnectionProxyName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string vaultName, string privateEndpointConnectionProxyName, DataReplicationPrivateEndpointConnectionProxyData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/privateEndpointConnectionProxies/", false); + uri.AppendPath(privateEndpointConnectionProxyName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create a new private endpoint connection proxy which includes both auto and manual approval types. Creating the proxy resource will also create a private endpoint connection resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The private endpoint connection proxy name. + /// Private endpoint connection creation input. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> CreateAsync(string subscriptionId, string resourceGroupName, string vaultName, string privateEndpointConnectionProxyName, DataReplicationPrivateEndpointConnectionProxyData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(privateEndpointConnectionProxyName, nameof(privateEndpointConnectionProxyName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, vaultName, privateEndpointConnectionProxyName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + { + DataReplicationPrivateEndpointConnectionProxyData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DataReplicationPrivateEndpointConnectionProxyData.DeserializeDataReplicationPrivateEndpointConnectionProxyData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create a new private endpoint connection proxy which includes both auto and manual approval types. Creating the proxy resource will also create a private endpoint connection resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The private endpoint connection proxy name. + /// Private endpoint connection creation input. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Create(string subscriptionId, string resourceGroupName, string vaultName, string privateEndpointConnectionProxyName, DataReplicationPrivateEndpointConnectionProxyData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(privateEndpointConnectionProxyName, nameof(privateEndpointConnectionProxyName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, vaultName, privateEndpointConnectionProxyName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + { + DataReplicationPrivateEndpointConnectionProxyData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DataReplicationPrivateEndpointConnectionProxyData.DeserializeDataReplicationPrivateEndpointConnectionProxyData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string vaultName, string privateEndpointConnectionProxyName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/privateEndpointConnectionProxies/", false); + uri.AppendPath(privateEndpointConnectionProxyName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string vaultName, string privateEndpointConnectionProxyName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/privateEndpointConnectionProxies/", false); + uri.AppendPath(privateEndpointConnectionProxyName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Returns the operation to track the deletion of private endpoint connection proxy. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The private endpoint connection proxy name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string vaultName, string privateEndpointConnectionProxyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(privateEndpointConnectionProxyName, nameof(privateEndpointConnectionProxyName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, vaultName, privateEndpointConnectionProxyName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Returns the operation to track the deletion of private endpoint connection proxy. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The private endpoint connection proxy name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string vaultName, string privateEndpointConnectionProxyName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(privateEndpointConnectionProxyName, nameof(privateEndpointConnectionProxyName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, vaultName, privateEndpointConnectionProxyName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string vaultName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/privateEndpointConnectionProxies", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string vaultName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/privateEndpointConnectionProxies", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the all private endpoint connections proxies. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, vaultName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PrivateEndpointConnectionProxyListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = PrivateEndpointConnectionProxyListResult.DeserializePrivateEndpointConnectionProxyListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the all private endpoint connections proxies. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, vaultName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PrivateEndpointConnectionProxyListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = PrivateEndpointConnectionProxyListResult.DeserializePrivateEndpointConnectionProxyListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateValidateRequestUri(string subscriptionId, string resourceGroupName, string vaultName, string privateEndpointConnectionProxyName, DataReplicationPrivateEndpointConnectionProxyData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/privateEndpointConnectionProxies/", false); + uri.AppendPath(privateEndpointConnectionProxyName, true); + uri.AppendPath("/validate", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateValidateRequest(string subscriptionId, string resourceGroupName, string vaultName, string privateEndpointConnectionProxyName, DataReplicationPrivateEndpointConnectionProxyData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/privateEndpointConnectionProxies/", false); + uri.AppendPath(privateEndpointConnectionProxyName, true); + uri.AppendPath("/validate", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Returns remote private endpoint connection information after validation. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The private endpoint connection proxy name. + /// The private endpoint connection proxy input. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ValidateAsync(string subscriptionId, string resourceGroupName, string vaultName, string privateEndpointConnectionProxyName, DataReplicationPrivateEndpointConnectionProxyData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(privateEndpointConnectionProxyName, nameof(privateEndpointConnectionProxyName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateValidateRequest(subscriptionId, resourceGroupName, vaultName, privateEndpointConnectionProxyName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DataReplicationPrivateEndpointConnectionProxyData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DataReplicationPrivateEndpointConnectionProxyData.DeserializeDataReplicationPrivateEndpointConnectionProxyData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Returns remote private endpoint connection information after validation. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The private endpoint connection proxy name. + /// The private endpoint connection proxy input. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Validate(string subscriptionId, string resourceGroupName, string vaultName, string privateEndpointConnectionProxyName, DataReplicationPrivateEndpointConnectionProxyData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(privateEndpointConnectionProxyName, nameof(privateEndpointConnectionProxyName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateValidateRequest(subscriptionId, resourceGroupName, vaultName, privateEndpointConnectionProxyName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DataReplicationPrivateEndpointConnectionProxyData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DataReplicationPrivateEndpointConnectionProxyData.DeserializeDataReplicationPrivateEndpointConnectionProxyData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string vaultName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string vaultName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the all private endpoint connections proxies. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, vaultName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PrivateEndpointConnectionProxyListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = PrivateEndpointConnectionProxyListResult.DeserializePrivateEndpointConnectionProxyListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the all private endpoint connections proxies. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, vaultName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PrivateEndpointConnectionProxyListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = PrivateEndpointConnectionProxyListResult.DeserializePrivateEndpointConnectionProxyListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs new file mode 100644 index 000000000000..2b77aee4c22f --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs @@ -0,0 +1,523 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + internal partial class PrivateEndpointConnectionsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of PrivateEndpointConnectionsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public PrivateEndpointConnectionsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2024-09-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string vaultName, string privateEndpointConnectionName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/privateEndpointConnections/", false); + uri.AppendPath(privateEndpointConnectionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string vaultName, string privateEndpointConnectionName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/privateEndpointConnections/", false); + uri.AppendPath(privateEndpointConnectionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the private endpoint connection details. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The private endpoint connection name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string vaultName, string privateEndpointConnectionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, vaultName, privateEndpointConnectionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DataReplicationPrivateEndpointConnectionData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DataReplicationPrivateEndpointConnectionData.DeserializeDataReplicationPrivateEndpointConnectionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DataReplicationPrivateEndpointConnectionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the private endpoint connection details. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The private endpoint connection name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string vaultName, string privateEndpointConnectionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, vaultName, privateEndpointConnectionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DataReplicationPrivateEndpointConnectionData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DataReplicationPrivateEndpointConnectionData.DeserializeDataReplicationPrivateEndpointConnectionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DataReplicationPrivateEndpointConnectionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string vaultName, string privateEndpointConnectionName, DataReplicationPrivateEndpointConnectionData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/privateEndpointConnections/", false); + uri.AppendPath(privateEndpointConnectionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string vaultName, string privateEndpointConnectionName, DataReplicationPrivateEndpointConnectionData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/privateEndpointConnections/", false); + uri.AppendPath(privateEndpointConnectionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Updated the private endpoint connection status (Approval/Rejected). This gets invoked by resource admin. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The private endpoint connection name. + /// Private endpoint connection update input. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> UpdateAsync(string subscriptionId, string resourceGroupName, string vaultName, string privateEndpointConnectionName, DataReplicationPrivateEndpointConnectionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, vaultName, privateEndpointConnectionName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + { + DataReplicationPrivateEndpointConnectionData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DataReplicationPrivateEndpointConnectionData.DeserializeDataReplicationPrivateEndpointConnectionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Updated the private endpoint connection status (Approval/Rejected). This gets invoked by resource admin. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The private endpoint connection name. + /// Private endpoint connection update input. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string vaultName, string privateEndpointConnectionName, DataReplicationPrivateEndpointConnectionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, vaultName, privateEndpointConnectionName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + { + DataReplicationPrivateEndpointConnectionData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DataReplicationPrivateEndpointConnectionData.DeserializeDataReplicationPrivateEndpointConnectionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string vaultName, string privateEndpointConnectionName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/privateEndpointConnections/", false); + uri.AppendPath(privateEndpointConnectionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string vaultName, string privateEndpointConnectionName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/privateEndpointConnections/", false); + uri.AppendPath(privateEndpointConnectionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes the private endpoint connection. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The private endpoint connection name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string vaultName, string privateEndpointConnectionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, vaultName, privateEndpointConnectionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Deletes the private endpoint connection. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The private endpoint connection name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string vaultName, string privateEndpointConnectionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, vaultName, privateEndpointConnectionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string vaultName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/privateEndpointConnections", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string vaultName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/privateEndpointConnections", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the all private endpoint connections configured on the vault. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, vaultName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + RecoveryServicesDataReplicationPrivateEndpointConnectionListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = RecoveryServicesDataReplicationPrivateEndpointConnectionListResult.DeserializeRecoveryServicesDataReplicationPrivateEndpointConnectionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the all private endpoint connections configured on the vault. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, vaultName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + RecoveryServicesDataReplicationPrivateEndpointConnectionListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = RecoveryServicesDataReplicationPrivateEndpointConnectionListResult.DeserializeRecoveryServicesDataReplicationPrivateEndpointConnectionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string vaultName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string vaultName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the all private endpoint connections configured on the vault. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, vaultName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + RecoveryServicesDataReplicationPrivateEndpointConnectionListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = RecoveryServicesDataReplicationPrivateEndpointConnectionListResult.DeserializeRecoveryServicesDataReplicationPrivateEndpointConnectionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the all private endpoint connections configured on the vault. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, vaultName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + RecoveryServicesDataReplicationPrivateEndpointConnectionListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = RecoveryServicesDataReplicationPrivateEndpointConnectionListResult.DeserializeRecoveryServicesDataReplicationPrivateEndpointConnectionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs new file mode 100644 index 000000000000..2cdfcae8a289 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs @@ -0,0 +1,321 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + internal partial class PrivateLinkResourcesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of PrivateLinkResourcesRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public PrivateLinkResourcesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2024-09-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string vaultName, string privateLinkResourceName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/privateLinkResources/", false); + uri.AppendPath(privateLinkResourceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string vaultName, string privateLinkResourceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/privateLinkResources/", false); + uri.AppendPath(privateLinkResourceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the details of site recovery private link resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The private link name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string vaultName, string privateLinkResourceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(privateLinkResourceName, nameof(privateLinkResourceName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, vaultName, privateLinkResourceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DataReplicationPrivateLinkResourceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DataReplicationPrivateLinkResourceData.DeserializeDataReplicationPrivateLinkResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DataReplicationPrivateLinkResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the details of site recovery private link resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The private link name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string vaultName, string privateLinkResourceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(privateLinkResourceName, nameof(privateLinkResourceName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, vaultName, privateLinkResourceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DataReplicationPrivateLinkResourceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DataReplicationPrivateLinkResourceData.DeserializeDataReplicationPrivateLinkResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DataReplicationPrivateLinkResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string vaultName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/privateLinkResources", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string vaultName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/privateLinkResources", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the list of private link resources. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, vaultName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + RecoveryServicesDataReplicationPrivateLinkResourceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = RecoveryServicesDataReplicationPrivateLinkResourceListResult.DeserializeRecoveryServicesDataReplicationPrivateLinkResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the list of private link resources. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, vaultName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + RecoveryServicesDataReplicationPrivateLinkResourceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = RecoveryServicesDataReplicationPrivateLinkResourceListResult.DeserializeRecoveryServicesDataReplicationPrivateLinkResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string vaultName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string vaultName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the list of private link resources. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, vaultName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + RecoveryServicesDataReplicationPrivateLinkResourceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = RecoveryServicesDataReplicationPrivateLinkResourceListResult.DeserializeRecoveryServicesDataReplicationPrivateLinkResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the list of private link resources. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, vaultName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + RecoveryServicesDataReplicationPrivateLinkResourceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = RecoveryServicesDataReplicationPrivateLinkResourceListResult.DeserializeRecoveryServicesDataReplicationPrivateLinkResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/ProtectedItemRestOperations.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/ProtectedItemRestOperations.cs new file mode 100644 index 000000000000..fd421d719985 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/ProtectedItemRestOperations.cs @@ -0,0 +1,761 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + internal partial class ProtectedItemRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ProtectedItemRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public ProtectedItemRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2024-09-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/protectedItems/", false); + uri.AppendPath(protectedItemName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/protectedItems/", false); + uri.AppendPath(protectedItemName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the details of the protected item. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The protected item name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(protectedItemName, nameof(protectedItemName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, vaultName, protectedItemName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DataReplicationProtectedItemData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DataReplicationProtectedItemData.DeserializeDataReplicationProtectedItemData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DataReplicationProtectedItemData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the details of the protected item. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The protected item name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(protectedItemName, nameof(protectedItemName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, vaultName, protectedItemName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DataReplicationProtectedItemData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DataReplicationProtectedItemData.DeserializeDataReplicationProtectedItemData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DataReplicationProtectedItemData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateRequestUri(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, DataReplicationProtectedItemData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/protectedItems/", false); + uri.AppendPath(protectedItemName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, DataReplicationProtectedItemData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/protectedItems/", false); + uri.AppendPath(protectedItemName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates the protected item. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The protected item name. + /// Protected item model. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateAsync(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, DataReplicationProtectedItemData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(protectedItemName, nameof(protectedItemName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, vaultName, protectedItemName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates the protected item. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The protected item name. + /// Protected item model. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Create(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, DataReplicationProtectedItemData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(protectedItemName, nameof(protectedItemName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, vaultName, protectedItemName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, DataReplicationProtectedItemPatch patch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/protectedItems/", false); + uri.AppendPath(protectedItemName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, DataReplicationProtectedItemPatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/protectedItems/", false); + uri.AppendPath(protectedItemName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Performs update on the protected item. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The protected item name. + /// Protected item model. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, DataReplicationProtectedItemPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(protectedItemName, nameof(protectedItemName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, vaultName, protectedItemName, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Performs update on the protected item. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The protected item name. + /// Protected item model. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, DataReplicationProtectedItemPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(protectedItemName, nameof(protectedItemName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, vaultName, protectedItemName, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, bool? forceDelete) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/protectedItems/", false); + uri.AppendPath(protectedItemName, true); + uri.AppendQuery("api-version", _apiVersion, true); + if (forceDelete != null) + { + uri.AppendQuery("forceDelete", forceDelete.Value, true); + } + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, bool? forceDelete) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/protectedItems/", false); + uri.AppendPath(protectedItemName, true); + uri.AppendQuery("api-version", _apiVersion, true); + if (forceDelete != null) + { + uri.AppendQuery("forceDelete", forceDelete.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Removes the protected item. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The protected item name. + /// A flag indicating whether to do force delete or not. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, bool? forceDelete = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(protectedItemName, nameof(protectedItemName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, vaultName, protectedItemName, forceDelete); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Removes the protected item. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The protected item name. + /// A flag indicating whether to do force delete or not. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, bool? forceDelete = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(protectedItemName, nameof(protectedItemName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, vaultName, protectedItemName, forceDelete); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string vaultName, string odataOptions, string continuationToken, int? pageSize) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/protectedItems", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (odataOptions != null) + { + uri.AppendQuery("odataOptions", odataOptions, true); + } + if (continuationToken != null) + { + uri.AppendQuery("continuationToken", continuationToken, true); + } + if (pageSize != null) + { + uri.AppendQuery("pageSize", pageSize.Value, true); + } + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string vaultName, string odataOptions, string continuationToken, int? pageSize) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/protectedItems", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (odataOptions != null) + { + uri.AppendQuery("odataOptions", odataOptions, true); + } + if (continuationToken != null) + { + uri.AppendQuery("continuationToken", continuationToken, true); + } + if (pageSize != null) + { + uri.AppendQuery("pageSize", pageSize.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the list of protected items in the given vault. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// OData options. + /// Continuation token. + /// Page size. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string vaultName, string odataOptions = null, string continuationToken = null, int? pageSize = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, vaultName, odataOptions, continuationToken, pageSize); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ProtectedItemModelListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ProtectedItemModelListResult.DeserializeProtectedItemModelListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the list of protected items in the given vault. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// OData options. + /// Continuation token. + /// Page size. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string vaultName, string odataOptions = null, string continuationToken = null, int? pageSize = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, vaultName, odataOptions, continuationToken, pageSize); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ProtectedItemModelListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ProtectedItemModelListResult.DeserializeProtectedItemModelListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreatePlannedFailoverRequestUri(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, PlannedFailover body) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/protectedItems/", false); + uri.AppendPath(protectedItemName, true); + uri.AppendPath("/plannedFailover", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreatePlannedFailoverRequest(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, PlannedFailover body) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/protectedItems/", false); + uri.AppendPath(protectedItemName, true); + uri.AppendPath("/plannedFailover", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(body, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Performs the planned failover on the protected item. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The protected item name. + /// Planned failover model. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task PlannedFailoverAsync(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, PlannedFailover body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(protectedItemName, nameof(protectedItemName)); + Argument.AssertNotNull(body, nameof(body)); + + using var message = CreatePlannedFailoverRequest(subscriptionId, resourceGroupName, vaultName, protectedItemName, body); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Performs the planned failover on the protected item. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The protected item name. + /// Planned failover model. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response PlannedFailover(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, PlannedFailover body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(protectedItemName, nameof(protectedItemName)); + Argument.AssertNotNull(body, nameof(body)); + + using var message = CreatePlannedFailoverRequest(subscriptionId, resourceGroupName, vaultName, protectedItemName, body); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string vaultName, string odataOptions, string continuationToken, int? pageSize) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string vaultName, string odataOptions, string continuationToken, int? pageSize) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the list of protected items in the given vault. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// OData options. + /// Continuation token. + /// Page size. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string vaultName, string odataOptions = null, string continuationToken = null, int? pageSize = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, vaultName, odataOptions, continuationToken, pageSize); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ProtectedItemModelListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ProtectedItemModelListResult.DeserializeProtectedItemModelListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the list of protected items in the given vault. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// OData options. + /// Continuation token. + /// Page size. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string vaultName, string odataOptions = null, string continuationToken = null, int? pageSize = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, vaultName, odataOptions, continuationToken, pageSize); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ProtectedItemModelListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ProtectedItemModelListResult.DeserializeProtectedItemModelListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/RecoveryPointRestOperations.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/RecoveryPointRestOperations.cs new file mode 100644 index 000000000000..f11dd146eb66 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/RecoveryPointRestOperations.cs @@ -0,0 +1,341 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + internal partial class RecoveryPointRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of RecoveryPointRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public RecoveryPointRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2024-09-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, string recoveryPointName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/protectedItems/", false); + uri.AppendPath(protectedItemName, true); + uri.AppendPath("/recoveryPoints/", false); + uri.AppendPath(recoveryPointName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, string recoveryPointName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/protectedItems/", false); + uri.AppendPath(protectedItemName, true); + uri.AppendPath("/recoveryPoints/", false); + uri.AppendPath(recoveryPointName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the details of the recovery point of a protected item. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The protected item name. + /// The recovery point name. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, string recoveryPointName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(protectedItemName, nameof(protectedItemName)); + Argument.AssertNotNullOrEmpty(recoveryPointName, nameof(recoveryPointName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, vaultName, protectedItemName, recoveryPointName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DataReplicationRecoveryPointData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DataReplicationRecoveryPointData.DeserializeDataReplicationRecoveryPointData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DataReplicationRecoveryPointData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the details of the recovery point of a protected item. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The protected item name. + /// The recovery point name. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, string recoveryPointName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(protectedItemName, nameof(protectedItemName)); + Argument.AssertNotNullOrEmpty(recoveryPointName, nameof(recoveryPointName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, vaultName, protectedItemName, recoveryPointName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DataReplicationRecoveryPointData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DataReplicationRecoveryPointData.DeserializeDataReplicationRecoveryPointData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DataReplicationRecoveryPointData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/protectedItems/", false); + uri.AppendPath(protectedItemName, true); + uri.AppendPath("/recoveryPoints", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/protectedItems/", false); + uri.AppendPath(protectedItemName, true); + uri.AppendPath("/recoveryPoints", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the list of recovery points of the given protected item. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The protected item name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(protectedItemName, nameof(protectedItemName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, vaultName, protectedItemName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + RecoveryPointModelListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = RecoveryPointModelListResult.DeserializeRecoveryPointModelListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the list of recovery points of the given protected item. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The protected item name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(protectedItemName, nameof(protectedItemName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, vaultName, protectedItemName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + RecoveryPointModelListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = RecoveryPointModelListResult.DeserializeRecoveryPointModelListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the list of recovery points of the given protected item. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The protected item name. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(protectedItemName, nameof(protectedItemName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, vaultName, protectedItemName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + RecoveryPointModelListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = RecoveryPointModelListResult.DeserializeRecoveryPointModelListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the list of recovery points of the given protected item. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The protected item name. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string vaultName, string protectedItemName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(protectedItemName, nameof(protectedItemName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, vaultName, protectedItemName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + RecoveryPointModelListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = RecoveryPointModelListResult.DeserializeRecoveryPointModelListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/ReplicationExtensionRestOperations.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/ReplicationExtensionRestOperations.cs new file mode 100644 index 000000000000..24cec8e1fd6a --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/ReplicationExtensionRestOperations.cs @@ -0,0 +1,513 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + internal partial class ReplicationExtensionRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ReplicationExtensionRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public ReplicationExtensionRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2024-09-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string vaultName, string replicationExtensionName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/replicationExtensions/", false); + uri.AppendPath(replicationExtensionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string vaultName, string replicationExtensionName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/replicationExtensions/", false); + uri.AppendPath(replicationExtensionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the details of the replication extension. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The replication extension name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string vaultName, string replicationExtensionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(replicationExtensionName, nameof(replicationExtensionName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, vaultName, replicationExtensionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DataReplicationExtensionData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DataReplicationExtensionData.DeserializeDataReplicationExtensionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DataReplicationExtensionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the details of the replication extension. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The replication extension name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string vaultName, string replicationExtensionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(replicationExtensionName, nameof(replicationExtensionName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, vaultName, replicationExtensionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DataReplicationExtensionData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DataReplicationExtensionData.DeserializeDataReplicationExtensionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DataReplicationExtensionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateRequestUri(string subscriptionId, string resourceGroupName, string vaultName, string replicationExtensionName, DataReplicationExtensionData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/replicationExtensions/", false); + uri.AppendPath(replicationExtensionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string vaultName, string replicationExtensionName, DataReplicationExtensionData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/replicationExtensions/", false); + uri.AppendPath(replicationExtensionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates the replication extension in the given vault. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The replication extension name. + /// Replication extension model. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateAsync(string subscriptionId, string resourceGroupName, string vaultName, string replicationExtensionName, DataReplicationExtensionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(replicationExtensionName, nameof(replicationExtensionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, vaultName, replicationExtensionName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates the replication extension in the given vault. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The replication extension name. + /// Replication extension model. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Create(string subscriptionId, string resourceGroupName, string vaultName, string replicationExtensionName, DataReplicationExtensionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(replicationExtensionName, nameof(replicationExtensionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, vaultName, replicationExtensionName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string vaultName, string replicationExtensionName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/replicationExtensions/", false); + uri.AppendPath(replicationExtensionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string vaultName, string replicationExtensionName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/replicationExtensions/", false); + uri.AppendPath(replicationExtensionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes the replication extension in the given vault. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The replication extension name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string vaultName, string replicationExtensionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(replicationExtensionName, nameof(replicationExtensionName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, vaultName, replicationExtensionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Deletes the replication extension in the given vault. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The replication extension name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string vaultName, string replicationExtensionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNullOrEmpty(replicationExtensionName, nameof(replicationExtensionName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, vaultName, replicationExtensionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string vaultName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/replicationExtensions", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string vaultName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendPath("/replicationExtensions", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the list of replication extensions in the given vault. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, vaultName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ReplicationExtensionModelListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ReplicationExtensionModelListResult.DeserializeReplicationExtensionModelListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the list of replication extensions in the given vault. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, vaultName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ReplicationExtensionModelListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ReplicationExtensionModelListResult.DeserializeReplicationExtensionModelListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string vaultName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string vaultName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the list of replication extensions in the given vault. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, vaultName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ReplicationExtensionModelListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ReplicationExtensionModelListResult.DeserializeReplicationExtensionModelListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the list of replication extensions in the given vault. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, vaultName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ReplicationExtensionModelListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ReplicationExtensionModelListResult.DeserializeReplicationExtensionModelListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/VaultRestOperations.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/VaultRestOperations.cs new file mode 100644 index 000000000000..d372fe55b069 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/RestOperations/VaultRestOperations.cs @@ -0,0 +1,735 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.RecoveryServicesDataReplication.Models; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication +{ + internal partial class VaultRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of VaultRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public VaultRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2024-09-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string vaultName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string vaultName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the details of the vault. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, vaultName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DataReplicationVaultData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DataReplicationVaultData.DeserializeDataReplicationVaultData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DataReplicationVaultData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the details of the vault. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, vaultName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DataReplicationVaultData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DataReplicationVaultData.DeserializeDataReplicationVaultData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DataReplicationVaultData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateRequestUri(string subscriptionId, string resourceGroupName, string vaultName, DataReplicationVaultData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string vaultName, DataReplicationVaultData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates the vault. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// Vault properties. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task CreateAsync(string subscriptionId, string resourceGroupName, string vaultName, DataReplicationVaultData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, vaultName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates the vault. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// Vault properties. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Create(string subscriptionId, string resourceGroupName, string vaultName, DataReplicationVaultData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, vaultName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string vaultName, DataReplicationVaultPatch patch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string vaultName, DataReplicationVaultPatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Performs update on the vault. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// Vault properties. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string vaultName, DataReplicationVaultPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, vaultName, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Performs update on the vault. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// Vault properties. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string vaultName, DataReplicationVaultPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, vaultName, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string vaultName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string vaultName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults/", false); + uri.AppendPath(vaultName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Removes the vault. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, vaultName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Removes the vault. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The vault name. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string vaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(vaultName, nameof(vaultName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, vaultName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string continuationToken) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (continuationToken != null) + { + uri.AppendQuery("continuationToken", continuationToken, true); + } + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string continuationToken) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (continuationToken != null) + { + uri.AppendQuery("continuationToken", continuationToken, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the list of vaults in the given subscription and resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Continuation token from the previous call. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string continuationToken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, continuationToken); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + VaultModelListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = VaultModelListResult.DeserializeVaultModelListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the list of vaults in the given subscription and resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Continuation token from the previous call. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string continuationToken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, continuationToken); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + VaultModelListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = VaultModelListResult.DeserializeVaultModelListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListBySubscriptionRequestUri(string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.DataReplication/replicationVaults", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the list of vaults in the given subscription. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionAsync(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + VaultModelListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = VaultModelListResult.DeserializeVaultModelListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the list of vaults in the given subscription. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscription(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + VaultModelListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = VaultModelListResult.DeserializeVaultModelListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string continuationToken) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string continuationToken) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the list of vaults in the given subscription and resource group. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Continuation token from the previous call. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string continuationToken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, continuationToken); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + VaultModelListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = VaultModelListResult.DeserializeVaultModelListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the list of vaults in the given subscription and resource group. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Continuation token from the previous call. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string continuationToken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, continuationToken); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + VaultModelListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = VaultModelListResult.DeserializeVaultModelListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListBySubscriptionNextPageRequestUri(string nextLink, string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, string subscriptionId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the list of vaults in the given subscription. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionNextPageAsync(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + VaultModelListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = VaultModelListResult.DeserializeVaultModelListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the list of vaults in the given subscription. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscriptionNextPage(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + VaultModelListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = VaultModelListResult.DeserializeVaultModelListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Properties/AssemblyInfo.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..f3484b477c5e --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Properties/AssemblyInfo.cs @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo("Azure.ResourceManager.RecoveryServicesDataReplication.Tests, PublicKey = 0024000004800000940000000602000000240000525341310004000001000100d15ddcb29688295338af4b7686603fe614abd555e09efba8fb88ee09e1f7b1ccaeed2e8f823fa9eef3fdd60217fc012ea67d2479751a0b8c087a4185541b851bd8b16f8d91b840e51b1cb0ba6fe647997e57429265e85ef62d565db50a69ae1647d54d7bd855e4db3d8a91510e5bcbd0edfbbecaa20a7bd9ae74593daa7b11b4")] + +// Replace Microsoft.Test with the correct resource provider namepace for your service and uncomment. +// See https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/azure-services-resource-providers +// for the list of possible values. +[assembly: Azure.Core.AzureResourceProviderNamespace("RecoveryServicesDataReplication")] diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tests/Azure.ResourceManager.RecoveryServicesDataReplication.Tests.csproj b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tests/Azure.ResourceManager.RecoveryServicesDataReplication.Tests.csproj new file mode 100644 index 000000000000..28b8be380881 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tests/Azure.ResourceManager.RecoveryServicesDataReplication.Tests.csproj @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tests/RecoveryServicesDataReplicationManagementTestBase.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tests/RecoveryServicesDataReplicationManagementTestBase.cs new file mode 100644 index 000000000000..c22207cd3bbc --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tests/RecoveryServicesDataReplicationManagementTestBase.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure; +using Azure.Core; +using Azure.Core.TestFramework; +using Azure.ResourceManager; +using Azure.ResourceManager.Resources; +using Azure.ResourceManager.TestFramework; +using NUnit.Framework; +using System.Threading.Tasks; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Tests +{ + public class RecoveryServicesDataReplicationManagementTestBase : ManagementRecordedTestBase + { + protected ArmClient Client { get; private set; } + protected SubscriptionResource DefaultSubscription { get; private set; } + + protected RecoveryServicesDataReplicationManagementTestBase(bool isAsync, RecordedTestMode mode) + : base(isAsync, mode) + { + } + + protected RecoveryServicesDataReplicationManagementTestBase(bool isAsync) + : base(isAsync) + { + } + + [SetUp] + public async Task CreateCommonClient() + { + Client = GetArmClient(); + DefaultSubscription = await Client.GetDefaultSubscriptionAsync().ConfigureAwait(false); + } + + protected async Task CreateResourceGroup(SubscriptionResource subscription, string rgNamePrefix, AzureLocation location) + { + string rgName = Recording.GenerateAssetName(rgNamePrefix); + ResourceGroupData input = new ResourceGroupData(location); + var lro = await subscription.GetResourceGroups().CreateOrUpdateAsync(WaitUntil.Completed, rgName, input); + return lro.Value; + } + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tests/RecoveryServicesDataReplicationManagementTestEnvironment.cs b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tests/RecoveryServicesDataReplicationManagementTestEnvironment.cs new file mode 100644 index 000000000000..f82e1be89d2f --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tests/RecoveryServicesDataReplicationManagementTestEnvironment.cs @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core.TestFramework; + +namespace Azure.ResourceManager.RecoveryServicesDataReplication.Tests +{ + public class RecoveryServicesDataReplicationManagementTestEnvironment : TestEnvironment + { + } +} diff --git a/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tsp-location.yaml b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tsp-location.yaml new file mode 100644 index 000000000000..c55deca30e81 --- /dev/null +++ b/sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/recoveryservicesdatareplication/DataReplication.Management +commit: 1a8dcbc31c561409f253e5f7a924ff577b583da7 +repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/recoveryservicesdatareplication/ci.mgmt.yml b/sdk/recoveryservicesdatareplication/ci.mgmt.yml new file mode 100644 index 000000000000..cdff4215bc6b --- /dev/null +++ b/sdk/recoveryservicesdatareplication/ci.mgmt.yml @@ -0,0 +1,26 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. + +trigger: none + +pr: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/recoveryservicesdatareplication /ci.mgmt.yml + - sdk/recoveryservicesdatareplication /Azure.ResourceManager.RecoveryServicesDataReplication / + + +extends: + template: /eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: recoveryservicesdatareplication + ArtifactName: packages + LimitForPullRequest: true + Artifacts: + - name: Azure.ResourceManager.RecoveryServicesDataReplication + safeName: AzureResourceManagerRecoveryServicesDataReplication diff --git a/sdk/resourcemanager/ci.mgmt.yml b/sdk/resourcemanager/ci.mgmt.yml index 4e3c032f60a4..b8b0a3273c9d 100644 --- a/sdk/resourcemanager/ci.mgmt.yml +++ b/sdk/resourcemanager/ci.mgmt.yml @@ -57,6 +57,7 @@ trigger: - sdk/cosmosdbforpostgresql/Azure.ResourceManager.CosmosDBForPostgreSql - sdk/costmanagement/Azure.ResourceManager.CostManagement - sdk/customer-insights/Azure.ResourceManager.CustomerInsights + - sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager - sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher - sdk/databox/Azure.ResourceManager.DataBox - sdk/databoxedge/Azure.ResourceManager.DataBoxEdge @@ -147,6 +148,7 @@ trigger: - sdk/openenergyplatform/Azure.ResourceManager.EnergyServices - sdk/operationalinsights/Azure.ResourceManager.OperationalInsights - sdk/oracle/Azure.ResourceManager.OracleDatabase + - sdk/oracledatabase/Azure.ResourceManager.OracleDatabase - sdk/orbital/Azure.ResourceManager.Orbital - sdk/paloaltonetworks.ngfw/Azure.ResourceManager.PaloAltoNetworks.Ngfw - sdk/peering/Azure.ResourceManager.Peering @@ -164,6 +166,7 @@ trigger: - sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup - sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication - sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery + - sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication - sdk/redis/Azure.ResourceManager.Redis - sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise - sdk/relay/Azure.ResourceManager.Relay @@ -207,6 +210,7 @@ trigger: - sdk/websites/Azure.ResourceManager.AppService - sdk/workloadmonitor/Azure.ResourceManager.WorkloadMonitor - sdk/workloads/Azure.ResourceManager.Workloads + - sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances pr: branches: @@ -266,6 +270,7 @@ pr: - sdk/cosmosdbforpostgresql/Azure.ResourceManager.CosmosDBForPostgreSql - sdk/costmanagement/Azure.ResourceManager.CostManagement - sdk/customer-insights/Azure.ResourceManager.CustomerInsights + - sdk/databasefleetmanager/Azure.ResourceManager.DatabaseFleetManager - sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher - sdk/databox/Azure.ResourceManager.DataBox - sdk/databoxedge/Azure.ResourceManager.DataBoxEdge @@ -356,6 +361,7 @@ pr: - sdk/openenergyplatform/Azure.ResourceManager.EnergyServices - sdk/operationalinsights/Azure.ResourceManager.OperationalInsights - sdk/oracle/Azure.ResourceManager.OracleDatabase + - sdk/oracledatabase/Azure.ResourceManager.OracleDatabase - sdk/orbital/Azure.ResourceManager.Orbital - sdk/paloaltonetworks.ngfw/Azure.ResourceManager.PaloAltoNetworks.Ngfw - sdk/peering/Azure.ResourceManager.Peering @@ -373,6 +379,7 @@ pr: - sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup - sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication - sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery + - sdk/recoveryservicesdatareplication/Azure.ResourceManager.RecoveryServicesDataReplication - sdk/redis/Azure.ResourceManager.Redis - sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise - sdk/relay/Azure.ResourceManager.Relay @@ -416,6 +423,7 @@ pr: - sdk/websites/Azure.ResourceManager.AppService - sdk/workloadmonitor/Azure.ResourceManager.WorkloadMonitor - sdk/workloads/Azure.ResourceManager.Workloads + - sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/Configuration.json b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/Configuration.json new file mode 100644 index 000000000000..a3ae3280efb2 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/Configuration.json @@ -0,0 +1,13 @@ +{ + "output-folder": ".", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "library-name": "Azure.ResourceManager.ServiceFabricManagedClusters", + "flavor": "azure", + "use-model-reader-writer": true, + "shared-source-folders": [ + "../../TempTypeSpecFiles/node_modules/@autorest/csharp/Generator.Shared", + "../../TempTypeSpecFiles/node_modules/@autorest/csharp/Azure.Core.Shared" + ], + "model-namespace": false, + "azure-arm": true +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/autorest.md b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/autorest.md deleted file mode 100644 index 4daae1dff57b..000000000000 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/autorest.md +++ /dev/null @@ -1,232 +0,0 @@ -# Generated code configuration - -Run `dotnet build /t:GenerateCode` to generate code. - -``` yaml - -azure-arm: true -csharp: true -library-name: ServiceFabricManagedClusters -namespace: Azure.ResourceManager.ServiceFabricManagedClusters -require: https://github.com/Azure/azure-rest-api-specs/blob/f17b769690a46d858134ee68ef0d89635083b560/specification/servicefabricmanagedclusters/resource-manager/readme.md -#tag: package-2024-09-preview -output-folder: $(this-folder)/Generated -clear-output-folder: true -sample-gen: - output-folder: $(this-folder)/../samples/Generated - clear-output-folder: true -skip-csproj: true -modelerfour: - flatten-payloads: false -use-model-reader-writer: true - -#mgmt-debug: -# show-serialized-names: true - -request-path-is-non-resource: -- /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/environments/{environment}/managedClusterVersions/{clusterVersion} -- /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterVersions/{clusterVersion} -- /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedUnsupportedVMSizes/{vmSize} - -format-by-name-rules: - 'tenantId': 'uuid' - 'ETag': 'etag' - 'location': 'azure-location' - '*Uri': 'Uri' - '*Uris': 'Uri' - -models-to-treat-empty-string-as-null: - - ManagedClusterSubnet - - NodeTypeFrontendConfiguration - - ServiceFabricManagedClusterData - - ServiceFabricManagedClusterVersion - - ServiceFabricManagedNodeTypeData - - VmManagedIdentity - -acronym-mapping: - CPU: Cpu - CPUs: Cpus - Os: OS - Ip: IP - Ips: IPs|ips - ID: Id - IDs: Ids - VM: Vm - VMs: Vms - Vmos: VmOS - VMScaleSet: VmScaleSet - DNS: Dns - VPN: Vpn - NAT: Nat - WAN: Wan - Ipv4: IPv4|ipv4 - Ipv6: IPv6|ipv6 - Ipsec: IPsec|ipsec - SSO: Sso - URI: Uri - Etag: ETag|etag - LRS: Lrs - SSD: Ssd - -override-operation-name: - managedAzResiliencyStatus_get: GetManagedAzResiliencyStatus - NodeTypeSkus_List: GetAvailableSkus - managedUnsupportedVMSizes_Get: GetManagedUnsupportedVmSize - managedUnsupportedVMSizes_List: GetManagedUnsupportedVmSizes - ManagedClusterVersion_GetByEnvironment: GetManagedClusterVersionByEnvironment - managedAzResiliencyStatus_Get: GetManagedAzResiliencyStatus - -rename-mapping: - ApplicationResource: ServiceFabricManagedApplication - ApplicationTypeResource: ServiceFabricManagedApplicationType - ApplicationTypeVersionResource: ServiceFabricManagedApplicationTypeVersion - ApplicationUserAssignedIdentity: ApplicationUserAssignedIdentityInfo - ManagedClusterCodeVersionResult: ServiceFabricManagedClusterVersion - ManagedClusterCodeVersionResult.properties.supportExpiryUtc: VersionSupportExpireOn - OsType: ServiceFabricManagedClusterOSType - ManagedCluster: ServiceFabricManagedCluster - ManagedCluster.properties.addonFeatures: AddOnFeatures - ManagedCluster.properties.allowRdpAccess: IsRdpAccessAllowed - ManagedCluster.properties.clusterCertificateThumbprints: -|any - ManagedCluster.properties.clusterId: -|uuid - ManagedCluster.properties.enableAutoOSUpgrade: IsAutoOSUpgradeEnabled - ManagedCluster.properties.enableIpv6: IsIPv6Enabled - ManagedCluster.properties.enableServicePublicIP: IsServicePublicIPEnabled - ManagedCluster.properties.ipv4Address: -|ip-address - ManagedCluster.properties.ipv6Address: -|ip-address - ManagedCluster.properties.zonalResiliency: HasZoneResiliency - ManagedCluster.properties.enableHttpGatewayExclusiveAuthMode: IsHttpGatewayExclusiveAuthModeEnabled - - Subnet: ManagedClusterSubnet - Subnet.enableIpv6: IsIPv6Enabled - Subnet.networkSecurityGroupId: -|arm-id - AzureActiveDirectory: ManagedClusterAzureActiveDirectory - ClientCertificate: ManagedClusterClientCertificate - ClientCertificate.thumbprint: -|any - ClientCertificate.issuerThumbprint: -|any - ClusterState: ServiceFabricManagedClusterState - ClusterUpgradeCadence: ManagedClusterUpgradeCadence - ClusterUpgradeMode: ManagedClusterUpgradeMode - SettingsSectionDescription: ClusterFabricSettingsSection - SettingsParameterDescription: ClusterFabricSettingsParameterDescription - IpTag: ManagedClusterIPTag - LoadBalancingRule: ManagedClusterLoadBalancingRule - NetworkSecurityRule: ServiceFabricManagedNetworkSecurityRule - Direction: ServiceFabricManagedNetworkSecurityRuleDirection - Access: ServiceFabricManagedNetworkTrafficAccess - ManagedResourceProvisioningState: ServiceFabricManagedResourceProvisioningState - ServiceEndpoint: ManagedClusterServiceEndpoint - ServiceEndpoint.locations: -|azure-location - NodeType: ServiceFabricManagedNodeType - NodeType.properties.dataDiskSizeGB: DataDiskSizeInGB - NodeType.properties.enableAcceleratedNetworking: IsAcceleratedNetworkingEnabled - NodeType.properties.enableEncryptionAtHost: IsEncryptionAtHostEnabled - NodeType.properties.enableOverProvisioning: IsOverProvisioningEnabled - NodeType.properties.multiplePlacementGroups: HasMultiplePlacementGroups - NodeType.properties.enableNodePublicIPv6: IsNodePublicIPv6Enabled - VmApplication : ServiceFabricManagedVmApplication - VmssDataDisk: NodeTypeVmssDataDisk - VmssDataDisk.diskSizeGB: DiskSizeInGB - VmssExtension: NodeTypeVmssExtension - VmssExtension.properties.enableAutomaticUpgrade: IsAutomaticUpgradeEnabled - VaultSecretGroup: NodeTypeVaultSecretGroup - VaultCertificate: NodeTypeVaultCertificate - DiskType: ServiceFabricManagedDataDiskType - FrontendConfiguration: NodeTypeFrontendConfiguration - FrontendConfiguration.loadBalancerBackendAddressPoolId: -|arm-id - FrontendConfiguration.loadBalancerInboundNatPoolId: -|arm-id - VmManagedIdentity.userAssignedIdentities: -|arm-id - NodeTypeActionParameters: NodeTypeActionContent - NodeTypeActionParameters.force: IsForced - ServiceResource: ServiceFabricManagedService - ServiceResourceProperties: ManagedServiceProperties - ServiceResourcePropertiesBase: ManagedServiceBaseProperties - ServiceCorrelation: ManagedServiceCorrelation - ServiceCorrelationScheme: ManagedServiceCorrelationScheme - ScalingPolicy: ManagedServiceScalingPolicy - ScalingMechanism: ManagedServiceScalingMechanism - ScalingTrigger: ManagedServiceScalingTrigger - MoveCost: ServiceFabricManagedServiceMoveCost - ApplicationUpgradePolicy.instanceCloseDelayDuration: InstanceCloseDelayDurationInSeconds - FailureAction: PolicyViolationCompensationAction - IPAddressType: NodeTypeFrontendConfigurationIPAddressType - ProbeProtocol: ManagedClusterLoadBalanceProbeProtocol - Protocol: ManagedClusterLoadBalancingRuleTransportProtocol - Partition: ManagedServicePartitionScheme - NsgProtocol: ServiceFabricManagedNsgProtocol - NsgProtocol.ah: AH - NodeTypeAvailableSku.resourceType: -|resource-type - PartitionInstanceCountScaleMechanism: PartitionInstanceCountScalingMechanism - PrivateEndpointNetworkPolicies: ManagedClusterSubnetPrivateEndpointNetworkPoliciesState - PrivateLinkServiceNetworkPolicies: ManagedClusterSubnetPrivateLinkServiceNetworkPoliciesState - ServiceLoadMetric: ManagedServiceLoadMetric - ServiceLoadMetricWeight: ManagedServiceLoadMetricWeight - ServicePackageActivationMode: ManagedServicePackageActivationMode - ServicePlacementPolicy: ManagedServicePlacementPolicy - ManagedVMSize: ServiceFabricManagedUnsupportedVmSize - AddRemoveIncrementalNamedPartitionScalingMechanism: NamedPartitionAddOrRemoveScalingMechanism - NodeType.properties.enableNodePublicIP: IsNodePublicIPEnabled - NodeType.properties.secureBootEnabled: IsSecureBootEnabled - EvictionPolicyType: SpotNodeVmEvictionPolicyType - ResourceAzStatus.resourceType: -|resource-type - SecurityType: ServiceFabricManagedClusterSecurityType - UpdateType: ServiceFabricManagedClusterUpdateType - ClusterHealthPolicy: ManagedClusterHealthPolicy - ClusterUpgradePolicy: ManagedClusterUpgradePolicy - ClusterUpgradeDeltaHealthPolicy: ManagedClusterUpgradeDeltaHealthPolicy - ClusterMonitoringPolicy: ManagedClusterMonitoringPolicy - PrivateIPAddressVersion: ServiceFabricManagedClusterPrivateIPAddressVersion - PublicIPAddressVersion: ServiceFabricManagedClusterPublicIPAddressVersion - IpConfiguration: ServiceFabricManagedClusterIPConfiguration - IpConfigurationPublicIPAddressConfiguration: ServiceFabricManagedClusterPublicIPAddressConfiguration - ManagedMaintenanceWindowStatus.lastWindowStatusUpdateAtUTC: LastWindowStatusUpdatedOn - ManagedMaintenanceWindowStatus.lastWindowStartTimeUTC: LastWindowStartOn - ManagedMaintenanceWindowStatus.lastWindowEndTimeUTC: LastWindowEndOn - -suppress-abstract-base-class: -- ManagedServiceProperties - -directive: - - remove-operation: OperationStatus_Get - - remove-operation: OperationResults_Get - - from: managedapplication.json - where: $.definitions - transform: > - $.HealthCheckWaitDuration['x-ms-format'] = 'duration-constant'; - $.HealthCheckStableDuration['x-ms-format'] = 'duration-constant'; - $.HealthCheckRetryTimeout['x-ms-format'] = 'duration-constant'; - $.UpgradeDomainTimeout['x-ms-format'] = 'duration-constant'; - $.UpgradeTimeout['x-ms-format'] = 'duration-constant'; - $.StatefulServiceProperties.properties.replicaRestartWaitDuration['x-ms-format'] = 'duration-constant'; - $.StatefulServiceProperties.properties.quorumLossWaitDuration['x-ms-format'] = 'duration-constant'; - $.StatefulServiceProperties.properties.standByReplicaKeepDuration['x-ms-format'] = 'duration-constant'; - $.StatefulServiceProperties.properties.servicePlacementTimeLimit['x-ms-format'] = 'duration-constant'; - - from: managedcluster.json - where: $.definitions - transform: > - $.ManagedClusterVersionDetails.properties.supportExpiryUtc['format'] = 'date-time'; - - from: nodetype.json - where: $.paths['/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}'].patch - transform: > - $['responses'] = { - "200": { - "description": "The operation completed successfully.", - "schema": { - "$ref": "#/definitions/NodeType" - } - }, - "202": { - "description": "The operation completed successfully.", - "schema": { - "$ref": "#/definitions/NodeType" - } - }, - "default": { - "description": "The detailed error response.", - "schema": { - "$ref": "#/definitions/ErrorModel" - } - } - } - reason: response status 202 missing -``` diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tsp-location.yaml b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tsp-location.yaml new file mode 100644 index 000000000000..3a6ffce0813e --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/servicefabricmanagedclusters/ServiceFabricManagedClusters.Management +commit: 1a8dcbc31c561409f253e5f7a924ff577b583da7 +repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tspCodeModel.json b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tspCodeModel.json new file mode 100644 index 000000000000..fb128b6bc189 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tspCodeModel.json @@ -0,0 +1,63467 @@ +{ + "$id": "1", + "name": "Microsoft.ServiceFabric", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "enums": [ + { + "$id": "2", + "kind": "enum", + "name": "PolicyViolationCompensationAction", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FailureAction", + "valueType": { + "$id": "3", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "4", + "kind": "enumvalue", + "name": "Rollback", + "value": "Rollback", + "valueType": { + "$id": "5", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "doc": "Indicates that a rollback of the upgrade will be performed by Service Fabric if the upgrade fails.", + "decorators": [] + }, + { + "$id": "6", + "kind": "enumvalue", + "name": "Manual", + "value": "Manual", + "valueType": { + "$id": "7", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "doc": "Indicates that a manual repair will need to be performed by the administrator if the upgrade fails. Service Fabric will not proceed to the next upgrade domain automatically.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "The compensating action to perform when a Monitored upgrade encounters monitoring policy or health policy violations. Invalid indicates the failure action is invalid. Rollback specifies that the upgrade will start rolling back automatically. Manual indicates that the upgrade will switch to UnmonitoredManual upgrade mode.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "8", + "kind": "enum", + "name": "RollingUpgradeMode", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.RollingUpgradeMode", + "valueType": { + "$id": "9", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "10", + "kind": "enumvalue", + "name": "Monitored", + "value": "Monitored", + "valueType": { + "$id": "11", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "8" + }, + "doc": "The upgrade will stop after completing each upgrade domain and automatically monitor health before proceeding. The value is 0.", + "decorators": [] + }, + { + "$id": "12", + "kind": "enumvalue", + "name": "UnmonitoredAuto", + "value": "UnmonitoredAuto", + "valueType": { + "$id": "13", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "8" + }, + "doc": "The upgrade will proceed automatically without performing any health monitoring. The value is 1.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "The mode used to monitor health during a rolling upgrade. The values are Monitored, and UnmonitoredAuto.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "14", + "kind": "enum", + "name": "ManagedIdentityType", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedIdentityType", + "valueType": { + "$id": "15", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "16", + "kind": "enumvalue", + "name": "None", + "value": "None", + "valueType": { + "$id": "17", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "14" + }, + "doc": "Indicates that no identity is associated with the resource.", + "decorators": [] + }, + { + "$id": "18", + "kind": "enumvalue", + "name": "SystemAssigned", + "value": "SystemAssigned", + "valueType": { + "$id": "19", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "14" + }, + "doc": "Indicates that system assigned identity is associated with the resource.", + "decorators": [] + }, + { + "$id": "20", + "kind": "enumvalue", + "name": "UserAssigned", + "value": "UserAssigned", + "valueType": { + "$id": "21", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "14" + }, + "doc": "Indicates that user assigned identity is associated with the resource.", + "decorators": [] + }, + { + "$id": "22", + "kind": "enumvalue", + "name": "SystemAssigned, UserAssigned", + "value": "SystemAssigned, UserAssigned", + "valueType": { + "$id": "23", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "14" + }, + "doc": "Indicates that both system assigned and user assigned identity are associated with the resource.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "The type of managed identity for the resource.", + "isFixed": true, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "24", + "kind": "enum", + "name": "createdByType", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.createdByType", + "valueType": { + "$id": "25", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "26", + "kind": "enumvalue", + "name": "User", + "value": "User", + "valueType": { + "$id": "27", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "24" + }, + "doc": "The entity was created by a user.", + "decorators": [] + }, + { + "$id": "28", + "kind": "enumvalue", + "name": "Application", + "value": "Application", + "valueType": { + "$id": "29", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "24" + }, + "doc": "The entity was created by an application.", + "decorators": [] + }, + { + "$id": "30", + "kind": "enumvalue", + "name": "ManagedIdentity", + "value": "ManagedIdentity", + "valueType": { + "$id": "31", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "24" + }, + "doc": "The entity was created by a managed identity.", + "decorators": [] + }, + { + "$id": "32", + "kind": "enumvalue", + "name": "Key", + "value": "Key", + "valueType": { + "$id": "33", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "24" + }, + "doc": "The entity was created by a key.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "The kind of entity that created the resource.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "34", + "kind": "enum", + "name": "ResourceProvisioningState", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceProvisioningState", + "valueType": { + "$id": "35", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "36", + "kind": "enumvalue", + "name": "Succeeded", + "value": "Succeeded", + "valueType": { + "$id": "37", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "34" + }, + "doc": "Resource has been created.", + "decorators": [] + }, + { + "$id": "38", + "kind": "enumvalue", + "name": "Failed", + "value": "Failed", + "valueType": { + "$id": "39", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "34" + }, + "doc": "Resource creation failed.", + "decorators": [] + }, + { + "$id": "40", + "kind": "enumvalue", + "name": "Canceled", + "value": "Canceled", + "valueType": { + "$id": "41", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "34" + }, + "doc": "Resource creation was canceled.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "The provisioning state of a resource type.", + "isFixed": false, + "isFlags": false, + "usage": "LroPolling", + "decorators": [] + }, + { + "$id": "42", + "kind": "enum", + "name": "ServiceKind", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceKind", + "valueType": { + "$id": "43", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "44", + "kind": "enumvalue", + "name": "Stateless", + "value": "Stateless", + "valueType": { + "$id": "45", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "42" + }, + "doc": "Does not use Service Fabric to make its state highly available or reliable. The value is 0.", + "decorators": [] + }, + { + "$id": "46", + "kind": "enumvalue", + "name": "Stateful", + "value": "Stateful", + "valueType": { + "$id": "47", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "42" + }, + "doc": "Uses Service Fabric to make its state or part of its state highly available and reliable. The value is 1.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "The kind of service (Stateless or Stateful).", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "48", + "kind": "enum", + "name": "PartitionScheme", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.PartitionScheme", + "valueType": { + "$id": "49", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "50", + "kind": "enumvalue", + "name": "Singleton", + "value": "Singleton", + "valueType": { + "$id": "51", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "48" + }, + "doc": "Indicates that the partition is based on string names, and is a SingletonPartitionScheme object, The value is 0.", + "decorators": [] + }, + { + "$id": "52", + "kind": "enumvalue", + "name": "UniformInt64Range", + "value": "UniformInt64Range", + "valueType": { + "$id": "53", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "48" + }, + "doc": "Indicates that the partition is based on Int64 key ranges, and is a UniformInt64RangePartitionScheme object. The value is 1.", + "decorators": [] + }, + { + "$id": "54", + "kind": "enumvalue", + "name": "Named", + "value": "Named", + "valueType": { + "$id": "55", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "48" + }, + "doc": "Indicates that the partition is based on string names, and is a NamedPartitionScheme object. The value is 2.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "Enumerates the ways that a service can be partitioned.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "56", + "kind": "enum", + "name": "ManagedServicePackageActivationMode", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServicePackageActivationMode", + "valueType": { + "$id": "57", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "58", + "kind": "enumvalue", + "name": "SharedProcess", + "value": "SharedProcess", + "valueType": { + "$id": "59", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "56" + }, + "doc": "Indicates the application package activation mode will use shared process.", + "decorators": [] + }, + { + "$id": "60", + "kind": "enumvalue", + "name": "ExclusiveProcess", + "value": "ExclusiveProcess", + "valueType": { + "$id": "61", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "56" + }, + "doc": "Indicates the application package activation mode will use exclusive process.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "The activation Mode of the service package", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "62", + "kind": "enum", + "name": "ManagedServiceCorrelationScheme", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceCorrelationScheme", + "valueType": { + "$id": "63", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "64", + "kind": "enumvalue", + "name": "AlignedAffinity", + "value": "AlignedAffinity", + "valueType": { + "$id": "65", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "62" + }, + "doc": "Aligned affinity ensures that the primaries of the partitions of the affinitized services are collocated on the same nodes. This is the default and is the same as selecting the Affinity scheme. The value is 0.", + "decorators": [] + }, + { + "$id": "66", + "kind": "enumvalue", + "name": "NonAlignedAffinity", + "value": "NonAlignedAffinity", + "valueType": { + "$id": "67", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "62" + }, + "doc": "Non-Aligned affinity guarantees that all replicas of each service will be placed on the same nodes. Unlike Aligned Affinity, this does not guarantee that replicas of particular role will be collocated. The value is 1.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "The service correlation scheme.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "68", + "kind": "enum", + "name": "ManagedServiceLoadMetricWeight", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceLoadMetricWeight", + "valueType": { + "$id": "69", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "70", + "kind": "enumvalue", + "name": "Zero", + "value": "Zero", + "valueType": { + "$id": "71", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "68" + }, + "doc": "Disables resource balancing for this metric. This value is zero.", + "decorators": [] + }, + { + "$id": "72", + "kind": "enumvalue", + "name": "Low", + "value": "Low", + "valueType": { + "$id": "73", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "68" + }, + "doc": "Specifies the metric weight of the service load as Low. The value is 1.", + "decorators": [] + }, + { + "$id": "74", + "kind": "enumvalue", + "name": "Medium", + "value": "Medium", + "valueType": { + "$id": "75", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "68" + }, + "doc": "Specifies the metric weight of the service load as Medium. The value is 2.", + "decorators": [] + }, + { + "$id": "76", + "kind": "enumvalue", + "name": "High", + "value": "High", + "valueType": { + "$id": "77", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "68" + }, + "doc": "Specifies the metric weight of the service load as High. The value is 3.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "Determines the metric weight relative to the other metrics that are configured for this service. During runtime, if two metrics end up in conflict, the Cluster Resource Manager prefers the metric with the higher weight.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "78", + "kind": "enum", + "name": "ServicePlacementPolicyType", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServicePlacementPolicyType", + "valueType": { + "$id": "79", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "80", + "kind": "enumvalue", + "name": "InvalidDomain", + "value": "InvalidDomain", + "valueType": { + "$id": "81", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "78" + }, + "doc": "Indicates that the ServicePlacementPolicyDescription is of type ServicePlacementInvalidDomainPolicyDescription, which indicates that a particular fault or upgrade domain cannot be used for placement of this service. The value is 0.", + "decorators": [] + }, + { + "$id": "82", + "kind": "enumvalue", + "name": "RequiredDomain", + "value": "RequiredDomain", + "valueType": { + "$id": "83", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "78" + }, + "doc": "Indicates that the ServicePlacementPolicyDescription is of type ServicePlacementRequireDomainDistributionPolicyDescription indicating that the replicas of the service must be placed in a specific domain. The value is 1.", + "decorators": [] + }, + { + "$id": "84", + "kind": "enumvalue", + "name": "PreferredPrimaryDomain", + "value": "PreferredPrimaryDomain", + "valueType": { + "$id": "85", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "78" + }, + "doc": "Indicates that the ServicePlacementPolicyDescription is of type ServicePlacementPreferPrimaryDomainPolicyDescription, which indicates that if possible the Primary replica for the partitions of the service should be located in a particular domain as an optimization. The value is 2.", + "decorators": [] + }, + { + "$id": "86", + "kind": "enumvalue", + "name": "RequiredDomainDistribution", + "value": "RequiredDomainDistribution", + "valueType": { + "$id": "87", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "78" + }, + "doc": "Indicates that the ServicePlacementPolicyDescription is of type ServicePlacementRequireDomainDistributionPolicyDescription, indicating that the system will disallow placement of any two replicas from the same partition in the same domain at any time. The value is 3.", + "decorators": [] + }, + { + "$id": "88", + "kind": "enumvalue", + "name": "NonPartiallyPlaceService", + "value": "NonPartiallyPlaceService", + "valueType": { + "$id": "89", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "78" + }, + "doc": "Indicates that the ServicePlacementPolicyDescription is of type ServicePlacementNonPartiallyPlaceServicePolicyDescription, which indicates that if possible all replicas of a particular partition of the service should be placed atomically. The value is 4.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "The type of placement policy for a service fabric service. Following are the possible values.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "90", + "kind": "enum", + "name": "ServiceFabricManagedServiceMoveCost", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.MoveCost", + "valueType": { + "$id": "91", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "92", + "kind": "enumvalue", + "name": "Zero", + "value": "Zero", + "valueType": { + "$id": "93", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "90" + }, + "doc": "Zero move cost. This value is zero.", + "decorators": [] + }, + { + "$id": "94", + "kind": "enumvalue", + "name": "Low", + "value": "Low", + "valueType": { + "$id": "95", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "90" + }, + "doc": "Specifies the move cost of the service as Low. The value is 1.", + "decorators": [] + }, + { + "$id": "96", + "kind": "enumvalue", + "name": "Medium", + "value": "Medium", + "valueType": { + "$id": "97", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "90" + }, + "doc": "Specifies the move cost of the service as Medium. The value is 2.", + "decorators": [] + }, + { + "$id": "98", + "kind": "enumvalue", + "name": "High", + "value": "High", + "valueType": { + "$id": "99", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "90" + }, + "doc": "Specifies the move cost of the service as High. The value is 3.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "Specifies the move cost for the service.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "100", + "kind": "enum", + "name": "ServiceScalingMechanismKind", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceScalingMechanismKind", + "valueType": { + "$id": "101", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "102", + "kind": "enumvalue", + "name": "ScalePartitionInstanceCount", + "value": "ScalePartitionInstanceCount", + "valueType": { + "$id": "103", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "100" + }, + "doc": "Represents a scaling mechanism for adding or removing instances of stateless service partition. The value is 0.", + "decorators": [] + }, + { + "$id": "104", + "kind": "enumvalue", + "name": "AddRemoveIncrementalNamedPartition", + "value": "AddRemoveIncrementalNamedPartition", + "valueType": { + "$id": "105", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "100" + }, + "doc": "Represents a scaling mechanism for adding or removing named partitions of a stateless service. The value is 1.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "Enumerates the ways that a service can be partitioned.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "106", + "kind": "enum", + "name": "ServiceScalingTriggerKind", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceScalingTriggerKind", + "valueType": { + "$id": "107", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "108", + "kind": "enumvalue", + "name": "AveragePartitionLoadTrigger", + "value": "AveragePartitionLoadTrigger", + "valueType": { + "$id": "109", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "106" + }, + "doc": "Represents a scaling trigger related to an average load of a metric/resource of a partition. The value is 0.", + "decorators": [] + }, + { + "$id": "110", + "kind": "enumvalue", + "name": "AverageServiceLoadTrigger", + "value": "AverageServiceLoadTrigger", + "valueType": { + "$id": "111", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "106" + }, + "doc": "Represents a scaling policy related to an average load of a metric/resource of a service. The value is 1.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "Enumerates the ways that a service can be partitioned.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "112", + "kind": "enum", + "name": "ServiceFabricManagedClusterOSType", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.OsType", + "valueType": { + "$id": "113", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "114", + "kind": "enumvalue", + "name": "Windows", + "value": "Windows", + "valueType": { + "$id": "115", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "112" + }, + "doc": "Indicates os is Windows.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "Cluster operating system, the default will be Windows", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "116", + "kind": "enum", + "name": "ManagedClusterVersionEnvironment", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterVersionEnvironment", + "valueType": { + "$id": "117", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "118", + "kind": "enumvalue", + "name": "Windows", + "value": "Windows", + "valueType": { + "$id": "119", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "116" + }, + "doc": "Indicates os is Windows.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "The operating system of the cluster. The default means all.", + "isFixed": false, + "isFlags": false, + "usage": "Input", + "decorators": [] + }, + { + "$id": "120", + "kind": "enum", + "name": "ServiceFabricManagedClusterState", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClusterState", + "valueType": { + "$id": "121", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "122", + "kind": "enumvalue", + "name": "WaitingForNodes", + "value": "WaitingForNodes", + "valueType": { + "$id": "123", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "120" + }, + "doc": "Indicates that the cluster resource is created and the resource provider is waiting for Service Fabric VM extension to boot up and report to it.", + "decorators": [] + }, + { + "$id": "124", + "kind": "enumvalue", + "name": "Deploying", + "value": "Deploying", + "valueType": { + "$id": "125", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "120" + }, + "doc": "Indicates that the Service Fabric runtime is being installed on the VMs. Cluster resource will be in this state until the cluster boots up and system services are up.", + "decorators": [] + }, + { + "$id": "126", + "kind": "enumvalue", + "name": "BaselineUpgrade", + "value": "BaselineUpgrade", + "valueType": { + "$id": "127", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "120" + }, + "doc": "Indicates that the cluster is upgrading to establishes the cluster version. This upgrade is automatically initiated when the cluster boots up for the first time.", + "decorators": [] + }, + { + "$id": "128", + "kind": "enumvalue", + "name": "Upgrading", + "value": "Upgrading", + "valueType": { + "$id": "129", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "120" + }, + "doc": "Indicates that the cluster is being upgraded with the user provided configuration.", + "decorators": [] + }, + { + "$id": "130", + "kind": "enumvalue", + "name": "UpgradeFailed", + "value": "UpgradeFailed", + "valueType": { + "$id": "131", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "120" + }, + "doc": "Indicates that the last upgrade for the cluster has failed.", + "decorators": [] + }, + { + "$id": "132", + "kind": "enumvalue", + "name": "Ready", + "value": "Ready", + "valueType": { + "$id": "133", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "120" + }, + "doc": "Indicates that the cluster is in a stable state.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "The current state of the cluster.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "134", + "kind": "enum", + "name": "ManagedClusterLoadBalancingRuleTransportProtocol", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Protocol", + "valueType": { + "$id": "135", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "136", + "kind": "enumvalue", + "name": "tcp", + "value": "tcp", + "valueType": { + "$id": "137", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "134" + }, + "doc": "Transport protocol is TCP.", + "decorators": [] + }, + { + "$id": "138", + "kind": "enumvalue", + "name": "udp", + "value": "udp", + "valueType": { + "$id": "139", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "134" + }, + "doc": "Transport protocol is UDP.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "The reference to the transport protocol used by the load balancing rule.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "140", + "kind": "enum", + "name": "ManagedClusterLoadBalanceProbeProtocol", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ProbeProtocol", + "valueType": { + "$id": "141", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "142", + "kind": "enumvalue", + "name": "tcp", + "value": "tcp", + "valueType": { + "$id": "143", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "140" + }, + "doc": "Probe protocol is TCP.", + "decorators": [] + }, + { + "$id": "144", + "kind": "enumvalue", + "name": "http", + "value": "http", + "valueType": { + "$id": "145", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "140" + }, + "doc": "Probe protocol is HTTP.", + "decorators": [] + }, + { + "$id": "146", + "kind": "enumvalue", + "name": "https", + "value": "https", + "valueType": { + "$id": "147", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "140" + }, + "doc": "Probe protocol is HTTPS.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "The reference to the load balancer probe used by the load balancing rule.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "148", + "kind": "enum", + "name": "ServiceFabricManagedNsgProtocol", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NsgProtocol", + "valueType": { + "$id": "149", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "150", + "kind": "enumvalue", + "name": "http", + "value": "http", + "valueType": { + "$id": "151", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "148" + }, + "doc": "Protocol applies to HTTP.", + "decorators": [] + }, + { + "$id": "152", + "kind": "enumvalue", + "name": "https", + "value": "https", + "valueType": { + "$id": "153", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "148" + }, + "doc": "Protocol applies to HTTPS.", + "decorators": [] + }, + { + "$id": "154", + "kind": "enumvalue", + "name": "tcp", + "value": "tcp", + "valueType": { + "$id": "155", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "148" + }, + "doc": "Protocol applies to TCP.", + "decorators": [] + }, + { + "$id": "156", + "kind": "enumvalue", + "name": "udp", + "value": "udp", + "valueType": { + "$id": "157", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "148" + }, + "doc": "Protocol applies to UDP.", + "decorators": [] + }, + { + "$id": "158", + "kind": "enumvalue", + "name": "icmp", + "value": "icmp", + "valueType": { + "$id": "159", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "148" + }, + "doc": "Protocol applies to ICMP.", + "decorators": [] + }, + { + "$id": "160", + "kind": "enumvalue", + "name": "AH", + "value": "ah", + "valueType": { + "$id": "161", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "148" + }, + "doc": "Protocol applies to AH.", + "decorators": [] + }, + { + "$id": "162", + "kind": "enumvalue", + "name": "esp", + "value": "esp", + "valueType": { + "$id": "163", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "148" + }, + "doc": "Protocol applies to ESP.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "Network protocol this rule applies to.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "164", + "kind": "enum", + "name": "ServiceFabricManagedNetworkTrafficAccess", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Access", + "valueType": { + "$id": "165", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "166", + "kind": "enumvalue", + "name": "allow", + "value": "allow", + "valueType": { + "$id": "167", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "164" + }, + "doc": "The network traffic is allowed.", + "decorators": [] + }, + { + "$id": "168", + "kind": "enumvalue", + "name": "deny", + "value": "deny", + "valueType": { + "$id": "169", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "164" + }, + "doc": "The network traffic is denied.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "The network traffic is allowed or denied.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "170", + "kind": "enum", + "name": "ServiceFabricManagedNetworkSecurityRuleDirection", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Direction", + "valueType": { + "$id": "171", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "172", + "kind": "enumvalue", + "name": "inbound", + "value": "inbound", + "valueType": { + "$id": "173", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "170" + }, + "doc": "Inbound direction.", + "decorators": [] + }, + { + "$id": "174", + "kind": "enumvalue", + "name": "outbound", + "value": "outbound", + "valueType": { + "$id": "175", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "170" + }, + "doc": "Outbound direction.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "Network security rule direction.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "176", + "kind": "enum", + "name": "ServiceFabricManagedResourceProvisioningState", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedResourceProvisioningState", + "valueType": { + "$id": "177", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "178", + "kind": "enumvalue", + "name": "None", + "value": "None", + "valueType": { + "$id": "179", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "176" + }, + "doc": "The resource does not have a provisioning state.", + "decorators": [] + }, + { + "$id": "180", + "kind": "enumvalue", + "name": "Creating", + "value": "Creating", + "valueType": { + "$id": "181", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "176" + }, + "doc": "The resource is being created.", + "decorators": [] + }, + { + "$id": "182", + "kind": "enumvalue", + "name": "Created", + "value": "Created", + "valueType": { + "$id": "183", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "176" + }, + "doc": "The resource is created.", + "decorators": [] + }, + { + "$id": "184", + "kind": "enumvalue", + "name": "Updating", + "value": "Updating", + "valueType": { + "$id": "185", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "176" + }, + "doc": "The resource is being updated.", + "decorators": [] + }, + { + "$id": "186", + "kind": "enumvalue", + "name": "Succeeded", + "value": "Succeeded", + "valueType": { + "$id": "187", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "176" + }, + "doc": "The resource provisioning has succeeded.", + "decorators": [] + }, + { + "$id": "188", + "kind": "enumvalue", + "name": "Failed", + "value": "Failed", + "valueType": { + "$id": "189", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "176" + }, + "doc": "The resource provisioning has failed.", + "decorators": [] + }, + { + "$id": "190", + "kind": "enumvalue", + "name": "Canceled", + "value": "Canceled", + "valueType": { + "$id": "191", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "176" + }, + "doc": "The resource provisioning has been canceled.", + "decorators": [] + }, + { + "$id": "192", + "kind": "enumvalue", + "name": "Deleting", + "value": "Deleting", + "valueType": { + "$id": "193", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "176" + }, + "doc": "The resource is being deleted.", + "decorators": [] + }, + { + "$id": "194", + "kind": "enumvalue", + "name": "Deleted", + "value": "Deleted", + "valueType": { + "$id": "195", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "176" + }, + "doc": "The resource has been deleted.", + "decorators": [] + }, + { + "$id": "196", + "kind": "enumvalue", + "name": "Other", + "value": "Other", + "valueType": { + "$id": "197", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "176" + }, + "doc": "The resource provisioning state is a state other than the previously specified states.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "The provisioning state of the managed resource.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "198", + "kind": "enum", + "name": "ManagedClusterUpgradeMode", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClusterUpgradeMode", + "valueType": { + "$id": "199", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "200", + "kind": "enumvalue", + "name": "Automatic", + "value": "Automatic", + "valueType": { + "$id": "201", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "198" + }, + "doc": "The cluster will be automatically upgraded to the latest Service Fabric runtime version, **clusterUpgradeCadence** will determine when the upgrade starts after the new version becomes available.", + "decorators": [] + }, + { + "$id": "202", + "kind": "enumvalue", + "name": "Manual", + "value": "Manual", + "valueType": { + "$id": "203", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "198" + }, + "doc": "The cluster will not be automatically upgraded to the latest Service Fabric runtime version. The cluster is upgraded by setting the **clusterCodeVersion** property in the cluster resource.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "The upgrade mode of the cluster when new Service Fabric runtime version is available.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "204", + "kind": "enum", + "name": "ManagedClusterUpgradeCadence", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClusterUpgradeCadence", + "valueType": { + "$id": "205", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "206", + "kind": "enumvalue", + "name": "Wave0", + "value": "Wave0", + "valueType": { + "$id": "207", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "204" + }, + "doc": "Cluster upgrade starts immediately after a new version is rolled out. Recommended for Test/Dev clusters.", + "decorators": [] + }, + { + "$id": "208", + "kind": "enumvalue", + "name": "Wave1", + "value": "Wave1", + "valueType": { + "$id": "209", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "204" + }, + "doc": "Cluster upgrade starts 7 days after a new version is rolled out. Recommended for Pre-prod clusters.", + "decorators": [] + }, + { + "$id": "210", + "kind": "enumvalue", + "name": "Wave2", + "value": "Wave2", + "valueType": { + "$id": "211", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "204" + }, + "doc": "Cluster upgrade starts 14 days after a new version is rolled out. Recommended for Production clusters.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "Indicates when new cluster runtime version upgrades will be applied after they are released. By default is Wave0.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "212", + "kind": "enum", + "name": "ManagedClusterAddOnFeature", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterAddOnFeature", + "valueType": { + "$id": "213", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "214", + "kind": "enumvalue", + "name": "DnsService", + "value": "DnsService", + "valueType": { + "$id": "215", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "212" + }, + "doc": "Dns service", + "decorators": [] + }, + { + "$id": "216", + "kind": "enumvalue", + "name": "BackupRestoreService", + "value": "BackupRestoreService", + "valueType": { + "$id": "217", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "212" + }, + "doc": "Backup and restore service", + "decorators": [] + }, + { + "$id": "218", + "kind": "enumvalue", + "name": "ResourceMonitorService", + "value": "ResourceMonitorService", + "valueType": { + "$id": "219", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "212" + }, + "doc": "Resource monitor service", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "Available cluster add-on features", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "220", + "kind": "enum", + "name": "ManagedClusterSubnetPrivateEndpointNetworkPoliciesState", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.PrivateEndpointNetworkPolicies", + "valueType": { + "$id": "221", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "222", + "kind": "enumvalue", + "name": "enabled", + "value": "enabled", + "valueType": { + "$id": "223", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "220" + }, + "doc": "Enable apply network policies on private end point in the subnet.", + "decorators": [] + }, + { + "$id": "224", + "kind": "enumvalue", + "name": "disabled", + "value": "disabled", + "valueType": { + "$id": "225", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "220" + }, + "doc": "Disable apply network policies on private end point in the subnet.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "Enable or Disable apply network policies on private end point in the subnet.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "226", + "kind": "enum", + "name": "ManagedClusterSubnetPrivateLinkServiceNetworkPoliciesState", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.PrivateLinkServiceNetworkPolicies", + "valueType": { + "$id": "227", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "228", + "kind": "enumvalue", + "name": "enabled", + "value": "enabled", + "valueType": { + "$id": "229", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "226" + }, + "doc": "Enable apply network policies on private link service in the subnet.", + "decorators": [] + }, + { + "$id": "230", + "kind": "enumvalue", + "name": "disabled", + "value": "disabled", + "valueType": { + "$id": "231", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "226" + }, + "doc": "Disable apply network policies on private link service in the subnet.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "Enable or Disable apply network policies on private link service in the subnet.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "232", + "kind": "enum", + "name": "ZonalUpdateMode", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ZonalUpdateMode", + "valueType": { + "$id": "233", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "234", + "kind": "enumvalue", + "name": "Standard", + "value": "Standard", + "valueType": { + "$id": "235", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "232" + }, + "doc": "The cluster will use 5 upgrade domains for Cross Az Node types.", + "decorators": [] + }, + { + "$id": "236", + "kind": "enumvalue", + "name": "Fast", + "value": "Fast", + "valueType": { + "$id": "237", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "232" + }, + "doc": "The cluster will use a maximum of 3 upgrade domains per zone instead of 5 for Cross Az Node types for faster deployments.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "Indicates the update mode for Cross Az clusters.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "238", + "kind": "enum", + "name": "AutoGeneratedDomainNameLabelScope", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AutoGeneratedDomainNameLabelScope", + "valueType": { + "$id": "239", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "240", + "kind": "enumvalue", + "name": "TenantReuse", + "value": "TenantReuse", + "valueType": { + "$id": "241", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "238" + }, + "doc": "TenantReuse allows for the same hash to be created if the resource is created in the same Tenant with the same resource name.", + "decorators": [] + }, + { + "$id": "242", + "kind": "enumvalue", + "name": "SubscriptionReuse", + "value": "SubscriptionReuse", + "valueType": { + "$id": "243", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "238" + }, + "doc": "SubscriptionReuse allows for the same hash to be created if the resource is created in the same Subscription with the same resource name.", + "decorators": [] + }, + { + "$id": "244", + "kind": "enumvalue", + "name": "ResourceGroupReuse", + "value": "ResourceGroupReuse", + "valueType": { + "$id": "245", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "238" + }, + "doc": "ResourceGroupReuse allows for the same hash to be created if the resource is created in the same Resource Group with the same resource name.", + "decorators": [] + }, + { + "$id": "246", + "kind": "enumvalue", + "name": "NoReuse", + "value": "NoReuse", + "valueType": { + "$id": "247", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "238" + }, + "doc": "NoReuse will create a new hash regardless of the Subscription, Resource Group, Tenant and Resource name.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "This enum is the entrypoint to using a certificate from a public CA for your cluster. This property was introduced to solve the\ndomain squatting problem with new domains. A domain name will be generated in the following format: {clustername}.{hash}.{regionname}.sfmcdomain.\nThe hash portion comes from Azure DNS' Deterministic Name Library. The library creates a hash using the cluster's Tenant, Subscription, Resource Group\nand Resource Name using the AutoGeneratedDomainNameLabelScope/reuse policy chosen.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "248", + "kind": "enum", + "name": "SkuName", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.SkuName", + "valueType": { + "$id": "249", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "250", + "kind": "enumvalue", + "name": "Basic", + "value": "Basic", + "valueType": { + "$id": "251", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "248" + }, + "doc": "Basic requires a minimum of 3 nodes and allows only 1 node type.", + "decorators": [] + }, + { + "$id": "252", + "kind": "enumvalue", + "name": "Standard", + "value": "Standard", + "valueType": { + "$id": "253", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "248" + }, + "doc": "Requires a minimum of 5 nodes and allows 1 or more node type.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "Sku Name.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "254", + "kind": "enum", + "name": "FaultSimulationStatus", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FaultSimulationStatus", + "valueType": { + "$id": "255", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "256", + "kind": "enumvalue", + "name": "Starting", + "value": "Starting", + "valueType": { + "$id": "257", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "254" + }, + "doc": "Indicates the fault simulation is starting. The simulation will have this status while the start operation is in progress.", + "decorators": [] + }, + { + "$id": "258", + "kind": "enumvalue", + "name": "Active", + "value": "Active", + "valueType": { + "$id": "259", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "254" + }, + "doc": "Indicates the fault simulation is active. The simulation will have this status after the start operation has completed successfully.", + "decorators": [] + }, + { + "$id": "260", + "kind": "enumvalue", + "name": "Stopping", + "value": "Stopping", + "valueType": { + "$id": "261", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "254" + }, + "doc": "Indicates the fault simulation is stopping. The simulation will have this status while the stop operation is in progress.", + "decorators": [] + }, + { + "$id": "262", + "kind": "enumvalue", + "name": "Done", + "value": "Done", + "valueType": { + "$id": "263", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "254" + }, + "doc": "Indicates the fault simulation is done. The simulation will have this status after the stop operation has completed successfully.", + "decorators": [] + }, + { + "$id": "264", + "kind": "enumvalue", + "name": "StartFailed", + "value": "StartFailed", + "valueType": { + "$id": "265", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "254" + }, + "doc": "Indicates the fault simulation has failed on start. The simulation will have this status after the start operation fails.", + "decorators": [] + }, + { + "$id": "266", + "kind": "enumvalue", + "name": "StopFailed", + "value": "StopFailed", + "valueType": { + "$id": "267", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "254" + }, + "doc": "Indicates the fault simulation has failed on stop. The simulation will have this status after the stop operation fails.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "Fault simulation status.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "268", + "kind": "enum", + "name": "SfmcOperationStatus", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.SfmcOperationStatus", + "valueType": { + "$id": "269", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "270", + "kind": "enumvalue", + "name": "Created", + "value": "Created", + "valueType": { + "$id": "271", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "268" + }, + "doc": "Operation created.", + "decorators": [] + }, + { + "$id": "272", + "kind": "enumvalue", + "name": "Started", + "value": "Started", + "valueType": { + "$id": "273", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "268" + }, + "doc": "Operation started.", + "decorators": [] + }, + { + "$id": "274", + "kind": "enumvalue", + "name": "Succeeded", + "value": "Succeeded", + "valueType": { + "$id": "275", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "268" + }, + "doc": "Operation succeeded.", + "decorators": [] + }, + { + "$id": "276", + "kind": "enumvalue", + "name": "Failed", + "value": "Failed", + "valueType": { + "$id": "277", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "268" + }, + "doc": "Operation failed.", + "decorators": [] + }, + { + "$id": "278", + "kind": "enumvalue", + "name": "Aborted", + "value": "Aborted", + "valueType": { + "$id": "279", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "268" + }, + "doc": "Operation aborted.", + "decorators": [] + }, + { + "$id": "280", + "kind": "enumvalue", + "name": "Canceled", + "value": "Canceled", + "valueType": { + "$id": "281", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "268" + }, + "doc": "Operation canceled.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "Sfmc operation status.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "282", + "kind": "enum", + "name": "FaultKind", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FaultKind", + "valueType": { + "$id": "283", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "284", + "kind": "enumvalue", + "name": "Zone", + "value": "Zone", + "valueType": { + "$id": "285", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "282" + }, + "doc": "Simulates an availability zone down.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "The kind of fault simulation.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "286", + "kind": "enum", + "name": "ServiceFabricManagedDataDiskType", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.DiskType", + "valueType": { + "$id": "287", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "288", + "kind": "enumvalue", + "name": "Standard_LRS", + "value": "Standard_LRS", + "valueType": { + "$id": "289", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "286" + }, + "doc": "Standard HDD locally redundant storage. Best for backup, non-critical, and infrequent access.", + "decorators": [] + }, + { + "$id": "290", + "kind": "enumvalue", + "name": "StandardSSD_LRS", + "value": "StandardSSD_LRS", + "valueType": { + "$id": "291", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "286" + }, + "doc": "Standard SSD locally redundant storage. Best for web servers, lightly used enterprise applications and dev/test.", + "decorators": [] + }, + { + "$id": "292", + "kind": "enumvalue", + "name": "Premium_LRS", + "value": "Premium_LRS", + "valueType": { + "$id": "293", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "286" + }, + "doc": "Premium SSD locally redundant storage. Best for production and performance sensitive workloads.", + "decorators": [] + }, + { + "$id": "294", + "kind": "enumvalue", + "name": "PremiumV2_LRS", + "value": "PremiumV2_LRS", + "valueType": { + "$id": "295", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "286" + }, + "doc": "Premium SSD V2 locally redundant storage. Best for production and performance sensitive workloads that consistently require low latency and high IOPS and throughput.", + "decorators": [] + }, + { + "$id": "296", + "kind": "enumvalue", + "name": "StandardSSD_ZRS", + "value": "StandardSSD_ZRS", + "valueType": { + "$id": "297", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "286" + }, + "doc": "Standard SSD zone redundant storage. Best for web servers, lightly used enterprise applications and dev/test that need storage resiliency against zone failures.", + "decorators": [] + }, + { + "$id": "298", + "kind": "enumvalue", + "name": "Premium_ZRS", + "value": "Premium_ZRS", + "valueType": { + "$id": "299", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "286" + }, + "doc": "Premium SSD zone redundant storage. Best for production workloads that need storage resiliency against zone failures.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "Managed data disk type. IOPS and throughput are given by the disk size, to see more information go to https://docs.microsoft.com/en-us/azure/virtual-machines/disks-types.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "300", + "kind": "enum", + "name": "VmssExtensionSetupOrder", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VmssExtensionSetupOrder", + "valueType": { + "$id": "301", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "302", + "kind": "enumvalue", + "name": "BeforeSFRuntime", + "value": "BeforeSFRuntime", + "valueType": { + "$id": "303", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "300" + }, + "doc": "Indicates that the vm extension should run before the service fabric runtime starts.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "Vm extension setup order.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "304", + "kind": "enum", + "name": "NodeTypeFrontendConfigurationIPAddressType", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.IPAddressType", + "valueType": { + "$id": "305", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "306", + "kind": "enumvalue", + "name": "IPv4", + "value": "IPv4", + "valueType": { + "$id": "307", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "304" + }, + "doc": "IPv4 address type.", + "decorators": [] + }, + { + "$id": "308", + "kind": "enumvalue", + "name": "IPv6", + "value": "IPv6", + "valueType": { + "$id": "309", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "304" + }, + "doc": "IPv6 address type.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "The IP address type.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "310", + "kind": "enum", + "name": "SpotNodeVmEvictionPolicyType", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.EvictionPolicyType", + "valueType": { + "$id": "311", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "312", + "kind": "enumvalue", + "name": "Delete", + "value": "Delete", + "valueType": { + "$id": "313", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "310" + }, + "doc": "Eviction policy will be Delete for SPOT vms.", + "decorators": [] + }, + { + "$id": "314", + "kind": "enumvalue", + "name": "Deallocate", + "value": "Deallocate", + "valueType": { + "$id": "315", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "310" + }, + "doc": "Eviction policy will be Deallocate for SPOT vms.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "Specifies the eviction policy for virtual machines in a SPOT node type.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "316", + "kind": "enum", + "name": "VmSetupAction", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VmSetupAction", + "valueType": { + "$id": "317", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "318", + "kind": "enumvalue", + "name": "EnableContainers", + "value": "EnableContainers", + "valueType": { + "$id": "319", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "316" + }, + "doc": "Enable windows containers feature.", + "decorators": [] + }, + { + "$id": "320", + "kind": "enumvalue", + "name": "EnableHyperV", + "value": "EnableHyperV", + "valueType": { + "$id": "321", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "316" + }, + "doc": "Enables windows HyperV feature.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "action to be performed on the vms before bootstrapping the service fabric runtime.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "322", + "kind": "enum", + "name": "ServiceFabricManagedClusterSecurityType", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.SecurityType", + "valueType": { + "$id": "323", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "324", + "kind": "enumvalue", + "name": "TrustedLaunch", + "value": "TrustedLaunch", + "valueType": { + "$id": "325", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "322" + }, + "doc": "Trusted Launch is a security type that secures generation 2 virtual machines.", + "decorators": [] + }, + { + "$id": "326", + "kind": "enumvalue", + "name": "Standard", + "value": "Standard", + "valueType": { + "$id": "327", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "322" + }, + "doc": "Standard is the default security type for all machines.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "Specifies the security type of the nodeType. Only Standard and TrustedLaunch are currently supported", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "328", + "kind": "enum", + "name": "ServiceFabricManagedClusterPrivateIPAddressVersion", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.PrivateIPAddressVersion", + "valueType": { + "$id": "329", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "330", + "kind": "enumvalue", + "name": "IPv4", + "value": "IPv4", + "valueType": { + "$id": "331", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "328" + }, + "doc": "The IP configuration's private IP is IPv4.", + "decorators": [] + }, + { + "$id": "332", + "kind": "enumvalue", + "name": "IPv6", + "value": "IPv6", + "valueType": { + "$id": "333", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "328" + }, + "doc": "The IP configuration's private IP is IPv6.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "Specifies whether the IP configuration's private IP is IPv4 or IPv6. Default is IPv4.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "334", + "kind": "enum", + "name": "ServiceFabricManagedClusterPublicIPAddressVersion", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.PublicIPAddressVersion", + "valueType": { + "$id": "335", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "336", + "kind": "enumvalue", + "name": "IPv4", + "value": "IPv4", + "valueType": { + "$id": "337", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "334" + }, + "doc": "The IP configuration's public IP is IPv4.", + "decorators": [] + }, + { + "$id": "338", + "kind": "enumvalue", + "name": "IPv6", + "value": "IPv6", + "valueType": { + "$id": "339", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "334" + }, + "doc": "The IP configuration's public IP is IPv6.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "Specifies whether the IP configuration's public IP is IPv4 or IPv6. Default is IPv4.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "340", + "kind": "enum", + "name": "ServiceFabricManagedClusterUpdateType", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.UpdateType", + "valueType": { + "$id": "341", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "342", + "kind": "enumvalue", + "name": "Default", + "value": "Default", + "valueType": { + "$id": "343", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "340" + }, + "doc": "The operation will proceed in all specified nodes at the same time.", + "decorators": [] + }, + { + "$id": "344", + "kind": "enumvalue", + "name": "ByUpgradeDomain", + "value": "ByUpgradeDomain", + "valueType": { + "$id": "345", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "340" + }, + "doc": "The operation will proceed one upgrade domain at a time, checking the health in between each to continue.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "Specifies the way the operation will be performed.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Json", + "decorators": [] + }, + { + "$id": "346", + "kind": "enum", + "name": "NodeTypeSkuScaleType", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeSkuScaleType", + "valueType": { + "$id": "347", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "348", + "kind": "enumvalue", + "name": "None", + "value": "None", + "valueType": { + "$id": "349", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "346" + }, + "doc": "Node count is not adjustable in any way (e.g. it is fixed).", + "decorators": [] + }, + { + "$id": "350", + "kind": "enumvalue", + "name": "Manual", + "value": "Manual", + "valueType": { + "$id": "351", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "346" + }, + "doc": "The user must manually scale out/in.", + "decorators": [] + }, + { + "$id": "352", + "kind": "enumvalue", + "name": "Automatic", + "value": "Automatic", + "valueType": { + "$id": "353", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "346" + }, + "doc": "Automatic scale is allowed.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "Node type capacity scale type.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "354", + "kind": "enum", + "name": "Versions", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Versions", + "valueType": { + "$id": "355", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "356", + "kind": "enumvalue", + "name": "v2024_11_01_preview", + "value": "2024-11-01-preview", + "valueType": { + "$id": "357", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "354" + }, + "doc": "The 2024-11-01-preview API version.", + "decorators": [] + }, + { + "$id": "358", + "kind": "enumvalue", + "name": "v2025_03_01_preview", + "value": "2025-03-01-preview", + "valueType": { + "$id": "359", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "354" + }, + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "The available API versions.", + "isFixed": true, + "isFlags": false, + "usage": "ApiVersionEnum", + "decorators": [] + } + ], + "models": [ + { + "$id": "360", + "kind": "model", + "name": "OperationListResult", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.OperationListResult", + "usage": "Output,Json", + "doc": "Describes the result of the request to list Service Fabric resource provider operations.", + "decorators": [], + "properties": [ + { + "$id": "361", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The OperationResult items on this page", + "type": { + "$id": "362", + "kind": "array", + "name": "ArrayOperationResult", + "valueType": { + "$id": "363", + "kind": "model", + "name": "OperationResult", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.OperationResult", + "usage": "Output,Json", + "doc": "Available operation list result", + "decorators": [], + "properties": [ + { + "$id": "364", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the operation.", + "type": { + "$id": "365", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.OperationResult.name", + "serializationOptions": { + "$id": "366", + "json": { + "$id": "367", + "name": "name" + } + } + }, + { + "$id": "368", + "kind": "property", + "name": "isDataAction", + "serializedName": "isDataAction", + "doc": "Indicates whether the operation is a data action", + "type": { + "$id": "369", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.OperationResult.isDataAction", + "serializationOptions": { + "$id": "370", + "json": { + "$id": "371", + "name": "isDataAction" + } + } + }, + { + "$id": "372", + "kind": "property", + "name": "display", + "serializedName": "display", + "doc": "The object that represents the operation.", + "type": { + "$id": "373", + "kind": "model", + "name": "AvailableOperationDisplay", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AvailableOperationDisplay", + "usage": "Output,Json", + "doc": "Operation supported by the Service Fabric resource provider", + "decorators": [], + "properties": [ + { + "$id": "374", + "kind": "property", + "name": "provider", + "serializedName": "provider", + "doc": "The name of the provider.", + "type": { + "$id": "375", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AvailableOperationDisplay.provider", + "serializationOptions": { + "$id": "376", + "json": { + "$id": "377", + "name": "provider" + } + } + }, + { + "$id": "378", + "kind": "property", + "name": "resource", + "serializedName": "resource", + "doc": "The resource on which the operation is performed", + "type": { + "$id": "379", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AvailableOperationDisplay.resource", + "serializationOptions": { + "$id": "380", + "json": { + "$id": "381", + "name": "resource" + } + } + }, + { + "$id": "382", + "kind": "property", + "name": "operation", + "serializedName": "operation", + "doc": "The operation that can be performed.", + "type": { + "$id": "383", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AvailableOperationDisplay.operation", + "serializationOptions": { + "$id": "384", + "json": { + "$id": "385", + "name": "operation" + } + } + }, + { + "$id": "386", + "kind": "property", + "name": "description", + "serializedName": "description", + "doc": "Operation description", + "type": { + "$id": "387", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AvailableOperationDisplay.description", + "serializationOptions": { + "$id": "388", + "json": { + "$id": "389", + "name": "description" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.OperationResult.display", + "serializationOptions": { + "$id": "390", + "json": { + "$id": "391", + "name": "display" + } + } + }, + { + "$id": "392", + "kind": "property", + "name": "origin", + "serializedName": "origin", + "doc": "Origin result", + "type": { + "$id": "393", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.OperationResult.origin", + "serializationOptions": { + "$id": "394", + "json": { + "$id": "395", + "name": "origin" + } + } + }, + { + "$id": "396", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The URL to use for getting the next set of results.", + "type": { + "$id": "397", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.OperationResult.nextLink", + "serializationOptions": { + "$id": "398", + "json": { + "$id": "399", + "name": "nextLink" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.OperationListResult.value", + "serializationOptions": { + "$id": "400", + "json": { + "$id": "401", + "name": "value" + } + } + }, + { + "$id": "402", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "403", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "404", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.OperationListResult.nextLink", + "serializationOptions": { + "$id": "405", + "json": { + "$id": "406", + "name": "nextLink" + } + } + } + ] + }, + { + "$ref": "363" + }, + { + "$ref": "373" + }, + { + "$id": "407", + "kind": "model", + "name": "ErrorResponse", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorResponse", + "usage": "Json,Exception", + "doc": "Common error response for all Azure Resource Manager APIs to return error details for failed operations.", + "decorators": [], + "properties": [ + { + "$id": "408", + "kind": "property", + "name": "error", + "serializedName": "error", + "doc": "The error object.", + "type": { + "$id": "409", + "kind": "model", + "name": "ErrorDetail", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail", + "usage": "Json,Exception,LroPolling", + "doc": "The error detail.", + "decorators": [], + "properties": [ + { + "$id": "410", + "kind": "property", + "name": "code", + "serializedName": "code", + "doc": "The error code.", + "type": { + "$id": "411", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.code", + "serializationOptions": { + "$id": "412", + "json": { + "$id": "413", + "name": "code" + } + } + }, + { + "$id": "414", + "kind": "property", + "name": "message", + "serializedName": "message", + "doc": "The error message.", + "type": { + "$id": "415", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.message", + "serializationOptions": { + "$id": "416", + "json": { + "$id": "417", + "name": "message" + } + } + }, + { + "$id": "418", + "kind": "property", + "name": "target", + "serializedName": "target", + "doc": "The error target.", + "type": { + "$id": "419", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.target", + "serializationOptions": { + "$id": "420", + "json": { + "$id": "421", + "name": "target" + } + } + }, + { + "$id": "422", + "kind": "property", + "name": "details", + "serializedName": "details", + "doc": "The error details.", + "type": { + "$id": "423", + "kind": "array", + "name": "ArrayErrorDetail", + "valueType": { + "$ref": "409" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.details", + "serializationOptions": { + "$id": "424", + "json": { + "$id": "425", + "name": "details" + } + } + }, + { + "$id": "426", + "kind": "property", + "name": "additionalInfo", + "serializedName": "additionalInfo", + "doc": "The error additional info.", + "type": { + "$id": "427", + "kind": "array", + "name": "ArrayErrorAdditionalInfo", + "valueType": { + "$id": "428", + "kind": "model", + "name": "ErrorAdditionalInfo", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo", + "usage": "Json,Exception,LroPolling", + "doc": "The resource management error additional info.", + "decorators": [], + "properties": [ + { + "$id": "429", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The additional info type.", + "type": { + "$id": "430", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo.type", + "serializationOptions": { + "$id": "431", + "json": { + "$id": "432", + "name": "type" + } + } + }, + { + "$id": "433", + "kind": "property", + "name": "info", + "serializedName": "info", + "doc": "The additional info.", + "type": { + "$id": "434", + "kind": "model", + "name": "ErrorAdditionalInfoInfo", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo.info.anonymous", + "usage": "Json,Exception,LroPolling", + "decorators": [], + "properties": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo.info", + "serializationOptions": { + "$id": "435", + "json": { + "$id": "436", + "name": "info" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.additionalInfo", + "serializationOptions": { + "$id": "437", + "json": { + "$id": "438", + "name": "additionalInfo" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorResponse.error", + "serializationOptions": { + "$id": "439", + "json": { + "$id": "440", + "name": "error" + } + } + } + ] + }, + { + "$ref": "409" + }, + { + "$ref": "428" + }, + { + "$ref": "434" + }, + { + "$id": "441", + "kind": "model", + "name": "ServiceFabricManagedApplication", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationResource", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The application resource.", + "decorators": [], + "baseModel": { + "$id": "442", + "kind": "model", + "name": "ProxyResource", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ProxyResource", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location", + "decorators": [], + "baseModel": { + "$id": "443", + "kind": "model", + "name": "Resource", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Common fields that are returned in the response for all Azure Resource Manager resources", + "decorators": [], + "properties": [ + { + "$id": "444", + "kind": "property", + "name": "id", + "serializedName": "id", + "doc": "Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}", + "type": { + "$id": "445", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource.id", + "serializationOptions": { + "$id": "446", + "json": { + "$id": "447", + "name": "id" + } + } + }, + { + "$id": "448", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the resource", + "type": { + "$id": "449", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource.name", + "serializationOptions": { + "$id": "450", + "json": { + "$id": "451", + "name": "name" + } + } + }, + { + "$id": "452", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"", + "type": { + "$id": "453", + "kind": "string", + "name": "armResourceType", + "crossLanguageDefinitionId": "Azure.Core.armResourceType", + "baseType": { + "$id": "454", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource.type", + "serializationOptions": { + "$id": "455", + "json": { + "$id": "456", + "name": "type" + } + } + }, + { + "$id": "457", + "kind": "property", + "name": "systemData", + "serializedName": "systemData", + "doc": "Azure Resource Manager metadata containing createdBy and modifiedBy information.", + "type": { + "$id": "458", + "kind": "model", + "name": "SystemData", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData", + "usage": "Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Metadata pertaining to creation and last modification of the resource.", + "decorators": [], + "properties": [ + { + "$id": "459", + "kind": "property", + "name": "createdBy", + "serializedName": "createdBy", + "doc": "The identity that created the resource.", + "type": { + "$id": "460", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.createdBy", + "serializationOptions": { + "$id": "461", + "json": { + "$id": "462", + "name": "createdBy" + } + } + }, + { + "$id": "463", + "kind": "property", + "name": "createdByType", + "serializedName": "createdByType", + "doc": "The type of identity that created the resource.", + "type": { + "$ref": "24" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.createdByType", + "serializationOptions": { + "$id": "464", + "json": { + "$id": "465", + "name": "createdByType" + } + } + }, + { + "$id": "466", + "kind": "property", + "name": "createdAt", + "serializedName": "createdAt", + "doc": "The timestamp of resource creation (UTC).", + "type": { + "$id": "467", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "468", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.createdAt", + "serializationOptions": { + "$id": "469", + "json": { + "$id": "470", + "name": "createdAt" + } + } + }, + { + "$id": "471", + "kind": "property", + "name": "lastModifiedBy", + "serializedName": "lastModifiedBy", + "doc": "The identity that last modified the resource.", + "type": { + "$id": "472", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.lastModifiedBy", + "serializationOptions": { + "$id": "473", + "json": { + "$id": "474", + "name": "lastModifiedBy" + } + } + }, + { + "$id": "475", + "kind": "property", + "name": "lastModifiedByType", + "serializedName": "lastModifiedByType", + "doc": "The type of identity that last modified the resource.", + "type": { + "$ref": "24" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.lastModifiedByType", + "serializationOptions": { + "$id": "476", + "json": { + "$id": "477", + "name": "lastModifiedByType" + } + } + }, + { + "$id": "478", + "kind": "property", + "name": "lastModifiedAt", + "serializedName": "lastModifiedAt", + "doc": "The timestamp of resource last modification (UTC)", + "type": { + "$id": "479", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "480", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.lastModifiedAt", + "serializationOptions": { + "$id": "481", + "json": { + "$id": "482", + "name": "lastModifiedAt" + } + } + } + ] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource.systemData", + "serializationOptions": { + "$id": "483", + "json": { + "$id": "484", + "name": "systemData" + } + } + } + ] + }, + "properties": [] + }, + "properties": [ + { + "$id": "485", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The application resource properties.", + "type": { + "$id": "486", + "kind": "model", + "name": "ApplicationResourceProperties", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationResourceProperties", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The application resource properties.", + "decorators": [], + "properties": [ + { + "$id": "487", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "The current deployment or provisioning state, which only appears in the response", + "type": { + "$id": "488", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationResourceProperties.provisioningState", + "serializationOptions": { + "$id": "489", + "json": { + "$id": "490", + "name": "provisioningState" + } + } + }, + { + "$id": "491", + "kind": "property", + "name": "version", + "serializedName": "version", + "doc": "The version of the application type as defined in the application manifest.\nThis name must be the full Arm Resource ID for the referenced application type version.", + "type": { + "$id": "492", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationResourceProperties.version", + "serializationOptions": { + "$id": "493", + "json": { + "$id": "494", + "name": "version" + } + } + }, + { + "$id": "495", + "kind": "property", + "name": "parameters", + "serializedName": "parameters", + "doc": "List of application parameters with overridden values from their default values specified in the application manifest.", + "type": { + "$id": "496", + "kind": "dict", + "keyType": { + "$id": "497", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "498", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationResourceProperties.parameters", + "serializationOptions": { + "$id": "499", + "json": { + "$id": "500", + "name": "parameters" + } + } + }, + { + "$id": "501", + "kind": "property", + "name": "upgradePolicy", + "serializedName": "upgradePolicy", + "doc": "Describes the policy for a monitored application upgrade.", + "type": { + "$id": "502", + "kind": "model", + "name": "ApplicationUpgradePolicy", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationUpgradePolicy", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes the policy for a monitored application upgrade.", + "decorators": [], + "properties": [ + { + "$id": "503", + "kind": "property", + "name": "applicationHealthPolicy", + "serializedName": "applicationHealthPolicy", + "doc": "Defines a health policy used to evaluate the health of an application or one of its children entities.", + "type": { + "$id": "504", + "kind": "model", + "name": "ApplicationHealthPolicy", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationHealthPolicy", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Defines a health policy used to evaluate the health of an application or one of its children entities.", + "decorators": [], + "properties": [ + { + "$id": "505", + "kind": "property", + "name": "considerWarningAsError", + "serializedName": "considerWarningAsError", + "doc": "Indicates whether warnings are treated with the same severity as errors.", + "type": { + "$id": "506", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationHealthPolicy.considerWarningAsError", + "serializationOptions": { + "$id": "507", + "json": { + "$id": "508", + "name": "considerWarningAsError" + } + } + }, + { + "$id": "509", + "kind": "property", + "name": "maxPercentUnhealthyDeployedApplications", + "serializedName": "maxPercentUnhealthyDeployedApplications", + "doc": "The maximum allowed percentage of unhealthy deployed applications. Allowed values are Byte values from zero to 100.\nThe percentage represents the maximum tolerated percentage of deployed applications that can be unhealthy before the application is considered in error.\nThis is calculated by dividing the number of unhealthy deployed applications over the number of nodes where the application is currently deployed on in the cluster.\nThe computation rounds up to tolerate one failure on small numbers of nodes. Default percentage is zero.", + "type": { + "$id": "510", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationHealthPolicy.maxPercentUnhealthyDeployedApplications", + "serializationOptions": { + "$id": "511", + "json": { + "$id": "512", + "name": "maxPercentUnhealthyDeployedApplications" + } + } + }, + { + "$id": "513", + "kind": "property", + "name": "defaultServiceTypeHealthPolicy", + "serializedName": "defaultServiceTypeHealthPolicy", + "doc": "The health policy used by default to evaluate the health of a service type.", + "type": { + "$id": "514", + "kind": "model", + "name": "ServiceTypeHealthPolicy", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceTypeHealthPolicy", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Represents the health policy used to evaluate the health of services belonging to a service type.", + "decorators": [], + "properties": [ + { + "$id": "515", + "kind": "property", + "name": "maxPercentUnhealthyServices", + "serializedName": "maxPercentUnhealthyServices", + "doc": "The maximum allowed percentage of unhealthy services.\n\nThe percentage represents the maximum tolerated percentage of services that can be unhealthy before the application is considered in error.\nIf the percentage is respected but there is at least one unhealthy service, the health is evaluated as Warning.\nThis is calculated by dividing the number of unhealthy services of the specific service type over the total number of services of the specific service type.\nThe computation rounds up to tolerate one failure on small numbers of services.", + "type": { + "$id": "516", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceTypeHealthPolicy.maxPercentUnhealthyServices", + "serializationOptions": { + "$id": "517", + "json": { + "$id": "518", + "name": "maxPercentUnhealthyServices" + } + } + }, + { + "$id": "519", + "kind": "property", + "name": "maxPercentUnhealthyPartitionsPerService", + "serializedName": "maxPercentUnhealthyPartitionsPerService", + "doc": "The maximum allowed percentage of unhealthy partitions per service.\n\nThe percentage represents the maximum tolerated percentage of partitions that can be unhealthy before the service is considered in error.\nIf the percentage is respected but there is at least one unhealthy partition, the health is evaluated as Warning.\nThe percentage is calculated by dividing the number of unhealthy partitions over the total number of partitions in the service.\nThe computation rounds up to tolerate one failure on small numbers of partitions.", + "type": { + "$id": "520", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceTypeHealthPolicy.maxPercentUnhealthyPartitionsPerService", + "serializationOptions": { + "$id": "521", + "json": { + "$id": "522", + "name": "maxPercentUnhealthyPartitionsPerService" + } + } + }, + { + "$id": "523", + "kind": "property", + "name": "maxPercentUnhealthyReplicasPerPartition", + "serializedName": "maxPercentUnhealthyReplicasPerPartition", + "doc": "The maximum allowed percentage of unhealthy replicas per partition.\n\nThe percentage represents the maximum tolerated percentage of replicas that can be unhealthy before the partition is considered in error.\nIf the percentage is respected but there is at least one unhealthy replica, the health is evaluated as Warning.\nThe percentage is calculated by dividing the number of unhealthy replicas over the total number of replicas in the partition.\nThe computation rounds up to tolerate one failure on small numbers of replicas.", + "type": { + "$id": "524", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceTypeHealthPolicy.maxPercentUnhealthyReplicasPerPartition", + "serializationOptions": { + "$id": "525", + "json": { + "$id": "526", + "name": "maxPercentUnhealthyReplicasPerPartition" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationHealthPolicy.defaultServiceTypeHealthPolicy", + "serializationOptions": { + "$id": "527", + "json": { + "$id": "528", + "name": "defaultServiceTypeHealthPolicy" + } + } + }, + { + "$id": "529", + "kind": "property", + "name": "serviceTypeHealthPolicyMap", + "serializedName": "serviceTypeHealthPolicyMap", + "doc": "The map with service type health policy per service type name. The map is empty by default.", + "type": { + "$id": "530", + "kind": "dict", + "keyType": { + "$id": "531", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$ref": "514" + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationHealthPolicy.serviceTypeHealthPolicyMap", + "serializationOptions": { + "$id": "532", + "json": { + "$id": "533", + "name": "serviceTypeHealthPolicyMap" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationUpgradePolicy.applicationHealthPolicy", + "serializationOptions": { + "$id": "534", + "json": { + "$id": "535", + "name": "applicationHealthPolicy" + } + } + }, + { + "$id": "536", + "kind": "property", + "name": "forceRestart", + "serializedName": "forceRestart", + "doc": "If true, then processes are forcefully restarted during upgrade even when the code version has not changed (the upgrade only changes configuration or data).", + "type": { + "$id": "537", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationUpgradePolicy.forceRestart", + "serializationOptions": { + "$id": "538", + "json": { + "$id": "539", + "name": "forceRestart" + } + } + }, + { + "$id": "540", + "kind": "property", + "name": "rollingUpgradeMonitoringPolicy", + "serializedName": "rollingUpgradeMonitoringPolicy", + "doc": "The policy used for monitoring the application upgrade", + "type": { + "$id": "541", + "kind": "model", + "name": "RollingUpgradeMonitoringPolicy", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.RollingUpgradeMonitoringPolicy", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The policy used for monitoring the application upgrade", + "decorators": [], + "properties": [ + { + "$id": "542", + "kind": "property", + "name": "failureAction", + "serializedName": "failureAction", + "doc": "The compensating action to perform when a Monitored upgrade encounters monitoring policy or health policy violations. Invalid indicates the failure action is invalid. Rollback specifies that the upgrade will start rolling back automatically. Manual indicates that the upgrade will switch to UnmonitoredManual upgrade mode.", + "type": { + "$ref": "2" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.RollingUpgradeMonitoringPolicy.failureAction", + "serializationOptions": { + "$id": "543", + "json": { + "$id": "544", + "name": "failureAction" + } + } + }, + { + "$id": "545", + "kind": "property", + "name": "healthCheckWaitDuration", + "serializedName": "healthCheckWaitDuration", + "doc": "The amount of time to wait after completing an upgrade domain before applying health policies. It is interpreted as a string representing an ISO 8601 duration with following format \"hh:mm:ss.fff\".", + "type": { + "$id": "546", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.RollingUpgradeMonitoringPolicy.healthCheckWaitDuration", + "serializationOptions": { + "$id": "547", + "json": { + "$id": "548", + "name": "healthCheckWaitDuration" + } + } + }, + { + "$id": "549", + "kind": "property", + "name": "healthCheckStableDuration", + "serializedName": "healthCheckStableDuration", + "doc": "The amount of time that the application or cluster must remain healthy before the upgrade proceeds to the next upgrade domain. It is interpreted as a string representing an ISO 8601 duration with following format \"hh:mm:ss.fff\".", + "type": { + "$id": "550", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.RollingUpgradeMonitoringPolicy.healthCheckStableDuration", + "serializationOptions": { + "$id": "551", + "json": { + "$id": "552", + "name": "healthCheckStableDuration" + } + } + }, + { + "$id": "553", + "kind": "property", + "name": "healthCheckRetryTimeout", + "serializedName": "healthCheckRetryTimeout", + "doc": "The amount of time to retry health evaluation when the application or cluster is unhealthy before FailureAction is executed. It is interpreted as a string representing an ISO 8601 duration with following format \"hh:mm:ss.fff\".", + "type": { + "$id": "554", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.RollingUpgradeMonitoringPolicy.healthCheckRetryTimeout", + "serializationOptions": { + "$id": "555", + "json": { + "$id": "556", + "name": "healthCheckRetryTimeout" + } + } + }, + { + "$id": "557", + "kind": "property", + "name": "upgradeTimeout", + "serializedName": "upgradeTimeout", + "doc": "The amount of time the overall upgrade has to complete before FailureAction is executed. Cannot be larger than 12 hours. It is interpreted as a string representing an ISO 8601 duration with following format \"hh:mm:ss.fff\".", + "type": { + "$id": "558", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.RollingUpgradeMonitoringPolicy.upgradeTimeout", + "serializationOptions": { + "$id": "559", + "json": { + "$id": "560", + "name": "upgradeTimeout" + } + } + }, + { + "$id": "561", + "kind": "property", + "name": "upgradeDomainTimeout", + "serializedName": "upgradeDomainTimeout", + "doc": "The amount of time each upgrade domain has to complete before FailureAction is executed. Cannot be larger than 12 hours. It is interpreted as a string representing an ISO 8601 duration with following format \"hh:mm:ss.fff\".", + "type": { + "$id": "562", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.RollingUpgradeMonitoringPolicy.upgradeDomainTimeout", + "serializationOptions": { + "$id": "563", + "json": { + "$id": "564", + "name": "upgradeDomainTimeout" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationUpgradePolicy.rollingUpgradeMonitoringPolicy", + "serializationOptions": { + "$id": "565", + "json": { + "$id": "566", + "name": "rollingUpgradeMonitoringPolicy" + } + } + }, + { + "$id": "567", + "kind": "property", + "name": "InstanceCloseDelayDurationInSeconds", + "serializedName": "instanceCloseDelayDuration", + "doc": "Duration in seconds, to wait before a stateless instance is closed, to allow the active requests to drain gracefully. This would be effective when the instance is closing during the application/cluster upgrade, only for those instances which have a non-zero delay duration configured in the service description.", + "type": { + "$id": "568", + "kind": "int64", + "name": "int64", + "crossLanguageDefinitionId": "TypeSpec.int64", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationUpgradePolicy.instanceCloseDelayDuration", + "serializationOptions": { + "$id": "569", + "json": { + "$id": "570", + "name": "instanceCloseDelayDuration" + } + } + }, + { + "$id": "571", + "kind": "property", + "name": "upgradeMode", + "serializedName": "upgradeMode", + "doc": "The mode used to monitor health during a rolling upgrade. The values are Monitored, and UnmonitoredAuto.", + "type": { + "$ref": "8" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationUpgradePolicy.upgradeMode", + "serializationOptions": { + "$id": "572", + "json": { + "$id": "573", + "name": "upgradeMode" + } + } + }, + { + "$id": "574", + "kind": "property", + "name": "upgradeReplicaSetCheckTimeout", + "serializedName": "upgradeReplicaSetCheckTimeout", + "doc": "The maximum amount of time to block processing of an upgrade domain and prevent loss of availability when there are unexpected issues. When this timeout expires, processing of the upgrade domain will proceed regardless of availability loss issues. The timeout is reset at the start of each upgrade domain. Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). Unit is in seconds.", + "type": { + "$id": "575", + "kind": "int64", + "name": "int64", + "crossLanguageDefinitionId": "TypeSpec.int64", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationUpgradePolicy.upgradeReplicaSetCheckTimeout", + "serializationOptions": { + "$id": "576", + "json": { + "$id": "577", + "name": "upgradeReplicaSetCheckTimeout" + } + } + }, + { + "$id": "578", + "kind": "property", + "name": "recreateApplication", + "serializedName": "recreateApplication", + "doc": "Determines whether the application should be recreated on update. If value=true, the rest of the upgrade policy parameters are not allowed.", + "type": { + "$id": "579", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationUpgradePolicy.recreateApplication", + "serializationOptions": { + "$id": "580", + "json": { + "$id": "581", + "name": "recreateApplication" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationResourceProperties.upgradePolicy", + "serializationOptions": { + "$id": "582", + "json": { + "$id": "583", + "name": "upgradePolicy" + } + } + }, + { + "$id": "584", + "kind": "property", + "name": "managedIdentities", + "serializedName": "managedIdentities", + "doc": "List of user assigned identities for the application, each mapped to a friendly name.", + "type": { + "$id": "585", + "kind": "array", + "name": "ArrayApplicationUserAssignedIdentity", + "valueType": { + "$id": "586", + "kind": "model", + "name": "ApplicationUserAssignedIdentityInfo", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationUserAssignedIdentity", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "User assigned identity for the application.", + "decorators": [], + "properties": [ + { + "$id": "587", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The friendly name of user assigned identity.", + "type": { + "$id": "588", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationUserAssignedIdentity.name", + "serializationOptions": { + "$id": "589", + "json": { + "$id": "590", + "name": "name" + } + } + }, + { + "$id": "591", + "kind": "property", + "name": "principalId", + "serializedName": "principalId", + "doc": "The principal id of user assigned identity.", + "type": { + "$id": "592", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationUserAssignedIdentity.principalId", + "serializationOptions": { + "$id": "593", + "json": { + "$id": "594", + "name": "principalId" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationResourceProperties.managedIdentities", + "serializationOptions": { + "$id": "595", + "json": { + "$id": "596", + "name": "managedIdentities" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": true, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationResource.properties", + "serializationOptions": { + "$id": "597", + "json": { + "$id": "598", + "name": "properties" + } + } + }, + { + "$id": "599", + "kind": "path", + "name": "name", + "serializedName": "name", + "doc": "The name of the application resource.", + "type": { + "$id": "600", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationResource.name", + "discriminator": false, + "flatten": false + }, + { + "$id": "601", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Resource tags.", + "type": { + "$id": "602", + "kind": "dict", + "keyType": { + "$id": "603", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "604", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationResource.tags", + "serializationOptions": { + "$id": "605", + "json": { + "$id": "606", + "name": "tags" + } + } + }, + { + "$id": "607", + "kind": "property", + "name": "identity", + "serializedName": "identity", + "doc": "Describes the managed identities for an Azure resource.", + "type": { + "$id": "608", + "kind": "model", + "name": "ManagedIdentity", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedIdentity", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes the managed identities for an Azure resource.", + "decorators": [], + "properties": [ + { + "$id": "609", + "kind": "property", + "name": "principalId", + "serializedName": "principalId", + "doc": "The principal id of the managed identity. This property will only be provided for a system assigned identity.", + "type": { + "$id": "610", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedIdentity.principalId", + "serializationOptions": { + "$id": "611", + "json": { + "$id": "612", + "name": "principalId" + } + } + }, + { + "$id": "613", + "kind": "property", + "name": "tenantId", + "serializedName": "tenantId", + "doc": "The tenant id of the managed identity. This property will only be provided for a system assigned identity.", + "type": { + "$id": "614", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedIdentity.tenantId", + "serializationOptions": { + "$id": "615", + "json": { + "$id": "616", + "name": "tenantId" + } + } + }, + { + "$id": "617", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The type of managed identity for the resource.", + "type": { + "$ref": "14" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedIdentity.type", + "serializationOptions": { + "$id": "618", + "json": { + "$id": "619", + "name": "type" + } + } + }, + { + "$id": "620", + "kind": "property", + "name": "userAssignedIdentities", + "serializedName": "userAssignedIdentities", + "doc": "The list of user identities associated with the resource. The user identity dictionary key references will be ARM resource ids in the form:\n'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.", + "type": { + "$id": "621", + "kind": "dict", + "keyType": { + "$id": "622", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "623", + "kind": "model", + "name": "UserAssignedIdentity", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.UserAssignedIdentity", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "User assigned identity.", + "decorators": [], + "properties": [ + { + "$id": "624", + "kind": "property", + "name": "principalId", + "serializedName": "principalId", + "doc": "The principal id of user assigned identity.", + "type": { + "$id": "625", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.UserAssignedIdentity.principalId", + "serializationOptions": { + "$id": "626", + "json": { + "$id": "627", + "name": "principalId" + } + } + }, + { + "$id": "628", + "kind": "property", + "name": "clientId", + "serializedName": "clientId", + "doc": "The client id of user assigned identity.", + "type": { + "$id": "629", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.UserAssignedIdentity.clientId", + "serializationOptions": { + "$id": "630", + "json": { + "$id": "631", + "name": "clientId" + } + } + } + ] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedIdentity.userAssignedIdentities", + "serializationOptions": { + "$id": "632", + "json": { + "$id": "633", + "name": "userAssignedIdentities" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationResource.identity", + "serializationOptions": { + "$id": "634", + "json": { + "$id": "635", + "name": "identity" + } + } + }, + { + "$id": "636", + "kind": "property", + "name": "location", + "serializedName": "location", + "doc": "The geo-location where the resource lives", + "type": { + "$id": "637", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationResource.location", + "serializationOptions": { + "$id": "638", + "json": { + "$id": "639", + "name": "location" + } + } + } + ] + }, + { + "$ref": "486" + }, + { + "$ref": "502" + }, + { + "$ref": "504" + }, + { + "$ref": "514" + }, + { + "$ref": "541" + }, + { + "$ref": "586" + }, + { + "$ref": "608" + }, + { + "$ref": "623" + }, + { + "$ref": "442" + }, + { + "$ref": "443" + }, + { + "$ref": "458" + }, + { + "$id": "640", + "kind": "model", + "name": "ArmOperationStatusResourceProvisioningState", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus", + "usage": "LroPolling", + "doc": "Standard Azure Resource Manager operation status response", + "decorators": [], + "properties": [ + { + "$id": "641", + "kind": "property", + "name": "status", + "serializedName": "status", + "doc": "The operation status", + "type": { + "$ref": "34" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.status", + "serializationOptions": { + "$id": "642", + "json": { + "$id": "643", + "name": "status" + } + } + }, + { + "$id": "644", + "kind": "path", + "name": "id", + "serializedName": "id", + "doc": "The unique identifier for the operationStatus resource", + "type": { + "$id": "645", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.id", + "discriminator": false, + "flatten": false + }, + { + "$id": "646", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the operationStatus resource", + "type": { + "$id": "647", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.name", + "serializationOptions": { + "$id": "648", + "json": { + "$id": "649", + "name": "name" + } + } + }, + { + "$id": "650", + "kind": "property", + "name": "startTime", + "serializedName": "startTime", + "doc": "Operation start time", + "type": { + "$id": "651", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "652", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.startTime", + "serializationOptions": { + "$id": "653", + "json": { + "$id": "654", + "name": "startTime" + } + } + }, + { + "$id": "655", + "kind": "property", + "name": "endTime", + "serializedName": "endTime", + "doc": "Operation complete time", + "type": { + "$id": "656", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "657", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.endTime", + "serializationOptions": { + "$id": "658", + "json": { + "$id": "659", + "name": "endTime" + } + } + }, + { + "$id": "660", + "kind": "property", + "name": "percentComplete", + "serializedName": "percentComplete", + "doc": "The progress made toward completing the operation", + "type": { + "$id": "661", + "kind": "float64", + "name": "float64", + "crossLanguageDefinitionId": "TypeSpec.float64", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.percentComplete", + "serializationOptions": { + "$id": "662", + "json": { + "$id": "663", + "name": "percentComplete" + } + } + }, + { + "$id": "664", + "kind": "property", + "name": "error", + "serializedName": "error", + "doc": "Errors that occurred if the operation ended with Canceled or Failed status", + "type": { + "$ref": "409" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.error", + "serializationOptions": { + "$id": "665", + "json": { + "$id": "666", + "name": "error" + } + } + } + ] + }, + { + "$id": "667", + "kind": "model", + "name": "ApplicationUpdateParameters", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationUpdateParameters", + "usage": "Input,Json", + "doc": "Application update request.", + "decorators": [], + "properties": [ + { + "$id": "668", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Application update parameters", + "type": { + "$id": "669", + "kind": "dict", + "keyType": { + "$id": "670", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "671", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationUpdateParameters.tags", + "serializationOptions": { + "$id": "672", + "json": { + "$id": "673", + "name": "tags" + } + } + } + ] + }, + { + "$id": "674", + "kind": "model", + "name": "ApplicationResourceList", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationResourceList", + "usage": "Output,Json", + "doc": "The list of application resources.", + "decorators": [], + "properties": [ + { + "$id": "675", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The ApplicationResource items on this page", + "type": { + "$id": "676", + "kind": "array", + "name": "ArrayApplicationResource", + "valueType": { + "$ref": "441" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationResourceList.value", + "serializationOptions": { + "$id": "677", + "json": { + "$id": "678", + "name": "value" + } + } + }, + { + "$id": "679", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "680", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "681", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationResourceList.nextLink", + "serializationOptions": { + "$id": "682", + "json": { + "$id": "683", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "684", + "kind": "model", + "name": "RuntimeResumeApplicationUpgradeParameters", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.RuntimeResumeApplicationUpgradeParameters", + "usage": "Input,Json", + "doc": "Parameters for Resume Upgrade action. The upgrade domain name must be specified.", + "decorators": [], + "properties": [ + { + "$id": "685", + "kind": "property", + "name": "upgradeDomainName", + "serializedName": "upgradeDomainName", + "doc": "The upgrade domain name. Expected to be the next upgrade domain if the application is upgrading.", + "type": { + "$id": "686", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.RuntimeResumeApplicationUpgradeParameters.upgradeDomainName", + "serializationOptions": { + "$id": "687", + "json": { + "$id": "688", + "name": "upgradeDomainName" + } + } + } + ] + }, + { + "$id": "689", + "kind": "model", + "name": "ServiceFabricManagedApplicationType", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeResource", + "usage": "Input,Output,Json", + "doc": "The application type name resource", + "decorators": [], + "baseModel": { + "$ref": "442" + }, + "properties": [ + { + "$id": "690", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The application type name properties", + "type": { + "$id": "691", + "kind": "model", + "name": "ApplicationTypeResourceProperties", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeResourceProperties", + "usage": "Input,Output,Json", + "doc": "The application type name properties", + "decorators": [], + "properties": [ + { + "$id": "692", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "The current deployment or provisioning state, which only appears in the response.", + "type": { + "$id": "693", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeResourceProperties.provisioningState", + "serializationOptions": { + "$id": "694", + "json": { + "$id": "695", + "name": "provisioningState" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": true, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeResource.properties", + "serializationOptions": { + "$id": "696", + "json": { + "$id": "697", + "name": "properties" + } + } + }, + { + "$id": "698", + "kind": "path", + "name": "name", + "serializedName": "name", + "doc": "The name of the application type name resource.", + "type": { + "$id": "699", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeResource.name", + "discriminator": false, + "flatten": false + }, + { + "$id": "700", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Resource tags.", + "type": { + "$id": "701", + "kind": "dict", + "keyType": { + "$id": "702", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "703", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeResource.tags", + "serializationOptions": { + "$id": "704", + "json": { + "$id": "705", + "name": "tags" + } + } + }, + { + "$id": "706", + "kind": "property", + "name": "location", + "serializedName": "location", + "doc": "The geo-location where the resource lives", + "type": { + "$id": "707", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeResource.location", + "serializationOptions": { + "$id": "708", + "json": { + "$id": "709", + "name": "location" + } + } + } + ] + }, + { + "$ref": "691" + }, + { + "$id": "710", + "kind": "model", + "name": "ApplicationTypeUpdateParameters", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeUpdateParameters", + "usage": "Input,Json", + "doc": "Application type update request", + "decorators": [], + "properties": [ + { + "$id": "711", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Application type update parameters", + "type": { + "$id": "712", + "kind": "dict", + "keyType": { + "$id": "713", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "714", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeUpdateParameters.tags", + "serializationOptions": { + "$id": "715", + "json": { + "$id": "716", + "name": "tags" + } + } + } + ] + }, + { + "$id": "717", + "kind": "model", + "name": "ApplicationTypeResourceList", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeResourceList", + "usage": "Output,Json", + "doc": "The list of application type names.", + "decorators": [], + "properties": [ + { + "$id": "718", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The ApplicationTypeResource items on this page", + "type": { + "$id": "719", + "kind": "array", + "name": "ArrayApplicationTypeResource", + "valueType": { + "$ref": "689" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeResourceList.value", + "serializationOptions": { + "$id": "720", + "json": { + "$id": "721", + "name": "value" + } + } + }, + { + "$id": "722", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "723", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "724", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeResourceList.nextLink", + "serializationOptions": { + "$id": "725", + "json": { + "$id": "726", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "727", + "kind": "model", + "name": "ServiceFabricManagedApplicationTypeVersion", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeVersionResource", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "An application type version resource for the specified application type name resource.", + "decorators": [], + "baseModel": { + "$ref": "442" + }, + "properties": [ + { + "$id": "728", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The properties of the application type version resource.", + "type": { + "$id": "729", + "kind": "model", + "name": "ApplicationTypeVersionResourceProperties", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeVersionResourceProperties", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The properties of the application type version resource.", + "decorators": [], + "properties": [ + { + "$id": "730", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "The current deployment or provisioning state, which only appears in the response", + "type": { + "$id": "731", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeVersionResourceProperties.provisioningState", + "serializationOptions": { + "$id": "732", + "json": { + "$id": "733", + "name": "provisioningState" + } + } + }, + { + "$id": "734", + "kind": "property", + "name": "appPackageUrl", + "serializedName": "appPackageUrl", + "doc": "The URL to the application package", + "type": { + "$id": "735", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeVersionResourceProperties.appPackageUrl", + "serializationOptions": { + "$id": "736", + "json": { + "$id": "737", + "name": "appPackageUrl" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": true, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeVersionResource.properties", + "serializationOptions": { + "$id": "738", + "json": { + "$id": "739", + "name": "properties" + } + } + }, + { + "$id": "740", + "kind": "path", + "name": "name", + "serializedName": "name", + "doc": "The application type version.", + "type": { + "$id": "741", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeVersionResource.name", + "discriminator": false, + "flatten": false + }, + { + "$id": "742", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Resource tags.", + "type": { + "$id": "743", + "kind": "dict", + "keyType": { + "$id": "744", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "745", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeVersionResource.tags", + "serializationOptions": { + "$id": "746", + "json": { + "$id": "747", + "name": "tags" + } + } + }, + { + "$id": "748", + "kind": "property", + "name": "location", + "serializedName": "location", + "doc": "The geo-location where the resource lives", + "type": { + "$id": "749", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeVersionResource.location", + "serializationOptions": { + "$id": "750", + "json": { + "$id": "751", + "name": "location" + } + } + } + ] + }, + { + "$ref": "729" + }, + { + "$id": "752", + "kind": "model", + "name": "ApplicationTypeVersionUpdateParameters", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeVersionUpdateParameters", + "usage": "Input,Json", + "doc": "Application type version update request", + "decorators": [], + "properties": [ + { + "$id": "753", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Application type version update parameters", + "type": { + "$id": "754", + "kind": "dict", + "keyType": { + "$id": "755", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "756", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeVersionUpdateParameters.tags", + "serializationOptions": { + "$id": "757", + "json": { + "$id": "758", + "name": "tags" + } + } + } + ] + }, + { + "$id": "759", + "kind": "model", + "name": "ApplicationTypeVersionResourceList", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeVersionResourceList", + "usage": "Output,Json", + "doc": "The list of application type version resources for the specified application type name resource.", + "decorators": [], + "properties": [ + { + "$id": "760", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The ApplicationTypeVersionResource items on this page", + "type": { + "$id": "761", + "kind": "array", + "name": "ArrayApplicationTypeVersionResource", + "valueType": { + "$ref": "727" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeVersionResourceList.value", + "serializationOptions": { + "$id": "762", + "json": { + "$id": "763", + "name": "value" + } + } + }, + { + "$id": "764", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "765", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "766", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeVersionResourceList.nextLink", + "serializationOptions": { + "$id": "767", + "json": { + "$id": "768", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "769", + "kind": "model", + "name": "ServiceFabricManagedService", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceResource", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The service resource.", + "decorators": [], + "baseModel": { + "$ref": "442" + }, + "properties": [ + { + "$id": "770", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The service resource properties.", + "type": { + "$id": "771", + "kind": "model", + "name": "ManagedServiceProperties", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceResourceProperties", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The service resource properties.", + "decorators": [], + "discriminatorProperty": { + "$id": "772", + "kind": "property", + "name": "serviceKind", + "serializedName": "serviceKind", + "doc": "The kind of service (Stateless or Stateful).", + "type": { + "$ref": "42" + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceResourceProperties.serviceKind", + "serializationOptions": { + "$id": "773", + "json": { + "$id": "774", + "name": "serviceKind" + } + } + }, + "baseModel": { + "$id": "775", + "kind": "model", + "name": "ManagedServiceBaseProperties", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceResourcePropertiesBase", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The common service resource properties.", + "decorators": [], + "properties": [ + { + "$id": "776", + "kind": "property", + "name": "placementConstraints", + "serializedName": "placementConstraints", + "doc": "The placement constraints as a string. Placement constraints are boolean expressions on node properties and allow for restricting a service to particular nodes based on the service requirements. For example, to place a service on nodes where NodeType is blue specify the following: \"NodeColor == blue)\".", + "type": { + "$id": "777", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceResourcePropertiesBase.placementConstraints", + "serializationOptions": { + "$id": "778", + "json": { + "$id": "779", + "name": "placementConstraints" + } + } + }, + { + "$id": "780", + "kind": "property", + "name": "correlationScheme", + "serializedName": "correlationScheme", + "doc": "A list that describes the correlation of the service with other services.", + "type": { + "$id": "781", + "kind": "array", + "name": "ArrayServiceCorrelation", + "valueType": { + "$id": "782", + "kind": "model", + "name": "ManagedServiceCorrelation", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceCorrelation", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Creates a particular correlation between services.", + "decorators": [], + "properties": [ + { + "$id": "783", + "kind": "property", + "name": "scheme", + "serializedName": "scheme", + "doc": "The ServiceCorrelationScheme which describes the relationship between this service and the service specified via ServiceName.", + "type": { + "$ref": "62" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceCorrelation.scheme", + "serializationOptions": { + "$id": "784", + "json": { + "$id": "785", + "name": "scheme" + } + } + }, + { + "$id": "786", + "kind": "property", + "name": "serviceName", + "serializedName": "serviceName", + "doc": "The Arm Resource ID of the service that the correlation relationship is established with.", + "type": { + "$id": "787", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceCorrelation.serviceName", + "serializationOptions": { + "$id": "788", + "json": { + "$id": "789", + "name": "serviceName" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceResourcePropertiesBase.correlationScheme", + "serializationOptions": { + "$id": "790", + "json": { + "$id": "791", + "name": "correlationScheme" + } + } + }, + { + "$id": "792", + "kind": "property", + "name": "serviceLoadMetrics", + "serializedName": "serviceLoadMetrics", + "doc": "The service load metrics is given as an array of ServiceLoadMetric objects.", + "type": { + "$id": "793", + "kind": "array", + "name": "ArrayServiceLoadMetric", + "valueType": { + "$id": "794", + "kind": "model", + "name": "ManagedServiceLoadMetric", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceLoadMetric", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Specifies a metric to load balance a service during runtime.", + "decorators": [], + "properties": [ + { + "$id": "795", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the metric. If the service chooses to report load during runtime, the load metric name should match the name that is specified in Name exactly. Note that metric names are case sensitive.", + "type": { + "$id": "796", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceLoadMetric.name", + "serializationOptions": { + "$id": "797", + "json": { + "$id": "798", + "name": "name" + } + } + }, + { + "$id": "799", + "kind": "property", + "name": "weight", + "serializedName": "weight", + "doc": "The service load metric relative weight, compared to other metrics configured for this service, as a number.", + "type": { + "$ref": "68" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceLoadMetric.weight", + "serializationOptions": { + "$id": "800", + "json": { + "$id": "801", + "name": "weight" + } + } + }, + { + "$id": "802", + "kind": "property", + "name": "primaryDefaultLoad", + "serializedName": "primaryDefaultLoad", + "doc": "Used only for Stateful services. The default amount of load, as a number, that this service creates for this metric when it is a Primary replica.", + "type": { + "$id": "803", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceLoadMetric.primaryDefaultLoad", + "serializationOptions": { + "$id": "804", + "json": { + "$id": "805", + "name": "primaryDefaultLoad" + } + } + }, + { + "$id": "806", + "kind": "property", + "name": "secondaryDefaultLoad", + "serializedName": "secondaryDefaultLoad", + "doc": "Used only for Stateful services. The default amount of load, as a number, that this service creates for this metric when it is a Secondary replica.", + "type": { + "$id": "807", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceLoadMetric.secondaryDefaultLoad", + "serializationOptions": { + "$id": "808", + "json": { + "$id": "809", + "name": "secondaryDefaultLoad" + } + } + }, + { + "$id": "810", + "kind": "property", + "name": "defaultLoad", + "serializedName": "defaultLoad", + "doc": "Used only for Stateless services. The default amount of load, as a number, that this service creates for this metric.", + "type": { + "$id": "811", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceLoadMetric.defaultLoad", + "serializationOptions": { + "$id": "812", + "json": { + "$id": "813", + "name": "defaultLoad" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceResourcePropertiesBase.serviceLoadMetrics", + "serializationOptions": { + "$id": "814", + "json": { + "$id": "815", + "name": "serviceLoadMetrics" + } + } + }, + { + "$id": "816", + "kind": "property", + "name": "servicePlacementPolicies", + "serializedName": "servicePlacementPolicies", + "doc": "A list that describes the correlation of the service with other services.", + "type": { + "$id": "817", + "kind": "array", + "name": "ArrayServicePlacementPolicy", + "valueType": { + "$id": "818", + "kind": "model", + "name": "ManagedServicePlacementPolicy", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServicePlacementPolicy", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes the policy to be used for placement of a Service Fabric service.", + "decorators": [], + "discriminatorProperty": { + "$id": "819", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$ref": "78" + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServicePlacementPolicy.type", + "serializationOptions": { + "$id": "820", + "json": { + "$id": "821", + "name": "type" + } + } + }, + "properties": [ + { + "$ref": "819" + } + ], + "discriminatedSubtypes": { + "$id": "822", + "InvalidDomain": { + "$id": "823", + "kind": "model", + "name": "ServicePlacementInvalidDomainPolicy", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServicePlacementInvalidDomainPolicy", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes the policy to be used for placement of a Service Fabric service where a particular fault or upgrade domain should not be used for placement of the instances or replicas of that service.", + "discriminatorValue": "InvalidDomain", + "decorators": [], + "baseModel": { + "$ref": "818" + }, + "properties": [ + { + "$id": "824", + "kind": "property", + "name": "domainName", + "serializedName": "domainName", + "doc": "The name of the domain that should not be used for placement.", + "type": { + "$id": "825", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServicePlacementInvalidDomainPolicy.domainName", + "serializationOptions": { + "$id": "826", + "json": { + "$id": "827", + "name": "domainName" + } + } + }, + { + "$id": "828", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The type of placement policy for a service fabric service. Following are the possible values.", + "type": { + "$id": "829", + "kind": "constant", + "valueType": { + "$id": "830", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "InvalidDomain", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServicePlacementInvalidDomainPolicy.type", + "serializationOptions": { + "$id": "831", + "json": { + "$id": "832", + "name": "type" + } + } + } + ] + }, + "RequiredDomain": { + "$id": "833", + "kind": "model", + "name": "ServicePlacementRequiredDomainPolicy", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServicePlacementRequiredDomainPolicy", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes the policy to be used for placement of a Service Fabric service where the instances or replicas of that service must be placed in a particular domain.", + "discriminatorValue": "RequiredDomain", + "decorators": [], + "baseModel": { + "$ref": "818" + }, + "properties": [ + { + "$id": "834", + "kind": "property", + "name": "domainName", + "serializedName": "domainName", + "doc": "The name of the domain that should used for placement as per this policy.", + "type": { + "$id": "835", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServicePlacementRequiredDomainPolicy.domainName", + "serializationOptions": { + "$id": "836", + "json": { + "$id": "837", + "name": "domainName" + } + } + }, + { + "$id": "838", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The type of placement policy for a service fabric service. Following are the possible values.", + "type": { + "$id": "839", + "kind": "constant", + "valueType": { + "$id": "840", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "RequiredDomain", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServicePlacementRequiredDomainPolicy.type", + "serializationOptions": { + "$id": "841", + "json": { + "$id": "842", + "name": "type" + } + } + } + ] + }, + "PreferredPrimaryDomain": { + "$id": "843", + "kind": "model", + "name": "ServicePlacementPreferPrimaryDomainPolicy", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServicePlacementPreferPrimaryDomainPolicy", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes the policy to be used for placement of a Service Fabric service where the service's\nPrimary replicas should optimally be placed in a particular domain.\n\nThis placement policy is usually used with fault domains in scenarios where the Service Fabric\ncluster is geographically distributed in order to indicate that a service's primary replica should\nbe located in a particular fault domain, which in geo-distributed scenarios usually aligns with regional\nor datacenter boundaries. Note that since this is an optimization it is possible that the Primary replica\nmay not end up located in this domain due to failures, capacity limits, or other constraints.", + "discriminatorValue": "PreferredPrimaryDomain", + "decorators": [], + "baseModel": { + "$ref": "818" + }, + "properties": [ + { + "$id": "844", + "kind": "property", + "name": "domainName", + "serializedName": "domainName", + "doc": "The name of the domain that should used for placement as per this policy.", + "type": { + "$id": "845", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServicePlacementPreferPrimaryDomainPolicy.domainName", + "serializationOptions": { + "$id": "846", + "json": { + "$id": "847", + "name": "domainName" + } + } + }, + { + "$id": "848", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The type of placement policy for a service fabric service. Following are the possible values.", + "type": { + "$id": "849", + "kind": "constant", + "valueType": { + "$id": "850", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "PreferredPrimaryDomain", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServicePlacementPreferPrimaryDomainPolicy.type", + "serializationOptions": { + "$id": "851", + "json": { + "$id": "852", + "name": "type" + } + } + } + ] + }, + "RequiredDomainDistribution": { + "$id": "853", + "kind": "model", + "name": "ServicePlacementRequireDomainDistributionPolicy", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServicePlacementRequireDomainDistributionPolicy", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes the policy to be used for placement of a Service Fabric service where two replicas\nfrom the same partition should never be placed in the same fault or upgrade domain.\n\nWhile this is not common it can expose the service to an increased risk of concurrent failures\ndue to unplanned outages or other cases of subsequent/concurrent failures. As an example, consider\na case where replicas are deployed across different data center, with one replica per location.\nIn the event that one of the datacenters goes offline, normally the replica that was placed in that\ndatacenter will be packed into one of the remaining datacenters. If this is not desirable then this\npolicy should be set.", + "discriminatorValue": "RequiredDomainDistribution", + "decorators": [], + "baseModel": { + "$ref": "818" + }, + "properties": [ + { + "$id": "854", + "kind": "property", + "name": "domainName", + "serializedName": "domainName", + "doc": "The name of the domain that should used for placement as per this policy.", + "type": { + "$id": "855", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServicePlacementRequireDomainDistributionPolicy.domainName", + "serializationOptions": { + "$id": "856", + "json": { + "$id": "857", + "name": "domainName" + } + } + }, + { + "$id": "858", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The type of placement policy for a service fabric service. Following are the possible values.", + "type": { + "$id": "859", + "kind": "constant", + "valueType": { + "$id": "860", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "RequiredDomainDistribution", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServicePlacementRequireDomainDistributionPolicy.type", + "serializationOptions": { + "$id": "861", + "json": { + "$id": "862", + "name": "type" + } + } + } + ] + }, + "NonPartiallyPlaceService": { + "$id": "863", + "kind": "model", + "name": "ServicePlacementNonPartiallyPlaceServicePolicy", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServicePlacementNonPartiallyPlaceServicePolicy", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The type of placement policy for a service fabric service. Following are the possible values.", + "discriminatorValue": "NonPartiallyPlaceService", + "decorators": [], + "baseModel": { + "$ref": "818" + }, + "properties": [ + { + "$id": "864", + "kind": "property", + "name": "type", + "serializedName": "type", + "type": { + "$id": "865", + "kind": "constant", + "valueType": { + "$id": "866", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "NonPartiallyPlaceService", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServicePlacementNonPartiallyPlaceServicePolicy.type", + "serializationOptions": { + "$id": "867", + "json": { + "$id": "868", + "name": "type" + } + } + } + ] + } + } + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceResourcePropertiesBase.servicePlacementPolicies", + "serializationOptions": { + "$id": "869", + "json": { + "$id": "870", + "name": "servicePlacementPolicies" + } + } + }, + { + "$id": "871", + "kind": "property", + "name": "defaultMoveCost", + "serializedName": "defaultMoveCost", + "doc": "Specifies the move cost for the service.", + "type": { + "$ref": "90" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceResourcePropertiesBase.defaultMoveCost", + "serializationOptions": { + "$id": "872", + "json": { + "$id": "873", + "name": "defaultMoveCost" + } + } + }, + { + "$id": "874", + "kind": "property", + "name": "scalingPolicies", + "serializedName": "scalingPolicies", + "doc": "Scaling policies for this service.", + "type": { + "$id": "875", + "kind": "array", + "name": "ArrayScalingPolicy", + "valueType": { + "$id": "876", + "kind": "model", + "name": "ManagedServiceScalingPolicy", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ScalingPolicy", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Specifies a metric to load balance a service during runtime.", + "decorators": [], + "properties": [ + { + "$id": "877", + "kind": "property", + "name": "scalingMechanism", + "serializedName": "scalingMechanism", + "doc": "Specifies the mechanism associated with this scaling policy", + "type": { + "$id": "878", + "kind": "model", + "name": "ManagedServiceScalingMechanism", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ScalingMechanism", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes the mechanism for performing a scaling operation.", + "decorators": [], + "discriminatorProperty": { + "$id": "879", + "kind": "property", + "name": "kind", + "serializedName": "kind", + "type": { + "$ref": "100" + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ScalingMechanism.kind", + "serializationOptions": { + "$id": "880", + "json": { + "$id": "881", + "name": "kind" + } + } + }, + "properties": [ + { + "$ref": "879" + } + ], + "discriminatedSubtypes": { + "$id": "882", + "AddRemoveIncrementalNamedPartition": { + "$id": "883", + "kind": "model", + "name": "NamedPartitionAddOrRemoveScalingMechanism", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AddRemoveIncrementalNamedPartitionScalingMechanism", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Represents a scaling mechanism for adding or removing named partitions of a stateless service. Partition names are in the format '0','1'...'N-1'.", + "discriminatorValue": "AddRemoveIncrementalNamedPartition", + "decorators": [], + "baseModel": { + "$ref": "878" + }, + "properties": [ + { + "$id": "884", + "kind": "property", + "name": "minPartitionCount", + "serializedName": "minPartitionCount", + "doc": "Minimum number of named partitions of the service.", + "type": { + "$id": "885", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AddRemoveIncrementalNamedPartitionScalingMechanism.minPartitionCount", + "serializationOptions": { + "$id": "886", + "json": { + "$id": "887", + "name": "minPartitionCount" + } + } + }, + { + "$id": "888", + "kind": "property", + "name": "maxPartitionCount", + "serializedName": "maxPartitionCount", + "doc": "Maximum number of named partitions of the service.", + "type": { + "$id": "889", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AddRemoveIncrementalNamedPartitionScalingMechanism.maxPartitionCount", + "serializationOptions": { + "$id": "890", + "json": { + "$id": "891", + "name": "maxPartitionCount" + } + } + }, + { + "$id": "892", + "kind": "property", + "name": "scaleIncrement", + "serializedName": "scaleIncrement", + "doc": "The number of instances to add or remove during a scaling operation.", + "type": { + "$id": "893", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AddRemoveIncrementalNamedPartitionScalingMechanism.scaleIncrement", + "serializationOptions": { + "$id": "894", + "json": { + "$id": "895", + "name": "scaleIncrement" + } + } + }, + { + "$id": "896", + "kind": "property", + "name": "kind", + "serializedName": "kind", + "doc": "Specifies the mechanism associated with this scaling policy.", + "type": { + "$id": "897", + "kind": "constant", + "valueType": { + "$id": "898", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "AddRemoveIncrementalNamedPartition", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AddRemoveIncrementalNamedPartitionScalingMechanism.kind", + "serializationOptions": { + "$id": "899", + "json": { + "$id": "900", + "name": "kind" + } + } + } + ] + }, + "ScalePartitionInstanceCount": { + "$id": "901", + "kind": "model", + "name": "PartitionInstanceCountScalingMechanism", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.PartitionInstanceCountScaleMechanism", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Represents a scaling mechanism for adding or removing instances of stateless service partition.", + "discriminatorValue": "ScalePartitionInstanceCount", + "decorators": [], + "baseModel": { + "$ref": "878" + }, + "properties": [ + { + "$id": "902", + "kind": "property", + "name": "minInstanceCount", + "serializedName": "minInstanceCount", + "doc": "Minimum number of instances of the partition.", + "type": { + "$id": "903", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.PartitionInstanceCountScaleMechanism.minInstanceCount", + "serializationOptions": { + "$id": "904", + "json": { + "$id": "905", + "name": "minInstanceCount" + } + } + }, + { + "$id": "906", + "kind": "property", + "name": "maxInstanceCount", + "serializedName": "maxInstanceCount", + "doc": "Maximum number of instances of the partition.", + "type": { + "$id": "907", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.PartitionInstanceCountScaleMechanism.maxInstanceCount", + "serializationOptions": { + "$id": "908", + "json": { + "$id": "909", + "name": "maxInstanceCount" + } + } + }, + { + "$id": "910", + "kind": "property", + "name": "scaleIncrement", + "serializedName": "scaleIncrement", + "doc": "The number of instances to add or remove during a scaling operation.", + "type": { + "$id": "911", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.PartitionInstanceCountScaleMechanism.scaleIncrement", + "serializationOptions": { + "$id": "912", + "json": { + "$id": "913", + "name": "scaleIncrement" + } + } + }, + { + "$id": "914", + "kind": "property", + "name": "kind", + "serializedName": "kind", + "doc": "Specifies the mechanism associated with this scaling policy.", + "type": { + "$id": "915", + "kind": "constant", + "valueType": { + "$id": "916", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "ScalePartitionInstanceCount", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.PartitionInstanceCountScaleMechanism.kind", + "serializationOptions": { + "$id": "917", + "json": { + "$id": "918", + "name": "kind" + } + } + } + ] + } + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ScalingPolicy.scalingMechanism", + "serializationOptions": { + "$id": "919", + "json": { + "$id": "920", + "name": "scalingMechanism" + } + } + }, + { + "$id": "921", + "kind": "property", + "name": "scalingTrigger", + "serializedName": "scalingTrigger", + "doc": "Specifies the trigger associated with this scaling policy.", + "type": { + "$id": "922", + "kind": "model", + "name": "ManagedServiceScalingTrigger", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ScalingTrigger", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes the trigger for performing a scaling operation.", + "decorators": [], + "discriminatorProperty": { + "$id": "923", + "kind": "property", + "name": "kind", + "serializedName": "kind", + "type": { + "$ref": "106" + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ScalingTrigger.kind", + "serializationOptions": { + "$id": "924", + "json": { + "$id": "925", + "name": "kind" + } + } + }, + "properties": [ + { + "$ref": "923" + } + ], + "discriminatedSubtypes": { + "$id": "926", + "AveragePartitionLoadTrigger": { + "$id": "927", + "kind": "model", + "name": "AveragePartitionLoadScalingTrigger", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AveragePartitionLoadScalingTrigger", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Represents a scaling trigger related to an average load of a metric/resource of a partition.", + "discriminatorValue": "AveragePartitionLoadTrigger", + "decorators": [], + "baseModel": { + "$ref": "922" + }, + "properties": [ + { + "$id": "928", + "kind": "property", + "name": "metricName", + "serializedName": "metricName", + "doc": "The name of the metric for which usage should be tracked.", + "type": { + "$id": "929", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AveragePartitionLoadScalingTrigger.metricName", + "serializationOptions": { + "$id": "930", + "json": { + "$id": "931", + "name": "metricName" + } + } + }, + { + "$id": "932", + "kind": "property", + "name": "lowerLoadThreshold", + "serializedName": "lowerLoadThreshold", + "doc": "The lower limit of the load below which a scale in operation should be performed.", + "type": { + "$id": "933", + "kind": "float64", + "name": "float64", + "crossLanguageDefinitionId": "TypeSpec.float64", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AveragePartitionLoadScalingTrigger.lowerLoadThreshold", + "serializationOptions": { + "$id": "934", + "json": { + "$id": "935", + "name": "lowerLoadThreshold" + } + } + }, + { + "$id": "936", + "kind": "property", + "name": "upperLoadThreshold", + "serializedName": "upperLoadThreshold", + "doc": "The upper limit of the load beyond which a scale out operation should be performed.", + "type": { + "$id": "937", + "kind": "float64", + "name": "float64", + "crossLanguageDefinitionId": "TypeSpec.float64", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AveragePartitionLoadScalingTrigger.upperLoadThreshold", + "serializationOptions": { + "$id": "938", + "json": { + "$id": "939", + "name": "upperLoadThreshold" + } + } + }, + { + "$id": "940", + "kind": "property", + "name": "scaleInterval", + "serializedName": "scaleInterval", + "doc": "The period in seconds on which a decision is made whether to scale or not. This property should come in ISO 8601 format \"hh:mm:ss\".", + "type": { + "$id": "941", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AveragePartitionLoadScalingTrigger.scaleInterval", + "serializationOptions": { + "$id": "942", + "json": { + "$id": "943", + "name": "scaleInterval" + } + } + }, + { + "$id": "944", + "kind": "property", + "name": "kind", + "serializedName": "kind", + "doc": "Specifies the trigger associated with this scaling policy.", + "type": { + "$id": "945", + "kind": "constant", + "valueType": { + "$id": "946", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "AveragePartitionLoadTrigger", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AveragePartitionLoadScalingTrigger.kind", + "serializationOptions": { + "$id": "947", + "json": { + "$id": "948", + "name": "kind" + } + } + } + ] + }, + "AverageServiceLoadTrigger": { + "$id": "949", + "kind": "model", + "name": "AverageServiceLoadScalingTrigger", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AverageServiceLoadScalingTrigger", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Represents a scaling policy related to an average load of a metric/resource of a service.", + "discriminatorValue": "AverageServiceLoadTrigger", + "decorators": [], + "baseModel": { + "$ref": "922" + }, + "properties": [ + { + "$id": "950", + "kind": "property", + "name": "metricName", + "serializedName": "metricName", + "doc": "The name of the metric for which usage should be tracked.", + "type": { + "$id": "951", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AverageServiceLoadScalingTrigger.metricName", + "serializationOptions": { + "$id": "952", + "json": { + "$id": "953", + "name": "metricName" + } + } + }, + { + "$id": "954", + "kind": "property", + "name": "lowerLoadThreshold", + "serializedName": "lowerLoadThreshold", + "doc": "The lower limit of the load below which a scale in operation should be performed.", + "type": { + "$id": "955", + "kind": "float64", + "name": "float64", + "crossLanguageDefinitionId": "TypeSpec.float64", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AverageServiceLoadScalingTrigger.lowerLoadThreshold", + "serializationOptions": { + "$id": "956", + "json": { + "$id": "957", + "name": "lowerLoadThreshold" + } + } + }, + { + "$id": "958", + "kind": "property", + "name": "upperLoadThreshold", + "serializedName": "upperLoadThreshold", + "doc": "The upper limit of the load beyond which a scale out operation should be performed.", + "type": { + "$id": "959", + "kind": "float64", + "name": "float64", + "crossLanguageDefinitionId": "TypeSpec.float64", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AverageServiceLoadScalingTrigger.upperLoadThreshold", + "serializationOptions": { + "$id": "960", + "json": { + "$id": "961", + "name": "upperLoadThreshold" + } + } + }, + { + "$id": "962", + "kind": "property", + "name": "scaleInterval", + "serializedName": "scaleInterval", + "doc": "The period in seconds on which a decision is made whether to scale or not. This property should come in ISO 8601 format \"hh:mm:ss\".", + "type": { + "$id": "963", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AverageServiceLoadScalingTrigger.scaleInterval", + "serializationOptions": { + "$id": "964", + "json": { + "$id": "965", + "name": "scaleInterval" + } + } + }, + { + "$id": "966", + "kind": "property", + "name": "useOnlyPrimaryLoad", + "serializedName": "useOnlyPrimaryLoad", + "doc": "Flag determines whether only the load of primary replica should be considered for scaling. If set to true, then trigger will only consider the load of primary replicas of stateful service. If set to false, trigger will consider load of all replicas. This parameter cannot be set to true for stateless service.", + "type": { + "$id": "967", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AverageServiceLoadScalingTrigger.useOnlyPrimaryLoad", + "serializationOptions": { + "$id": "968", + "json": { + "$id": "969", + "name": "useOnlyPrimaryLoad" + } + } + }, + { + "$id": "970", + "kind": "property", + "name": "kind", + "serializedName": "kind", + "doc": "Specifies the trigger associated with this scaling policy.", + "type": { + "$id": "971", + "kind": "constant", + "valueType": { + "$id": "972", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "AverageServiceLoadTrigger", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AverageServiceLoadScalingTrigger.kind", + "serializationOptions": { + "$id": "973", + "json": { + "$id": "974", + "name": "kind" + } + } + } + ] + } + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ScalingPolicy.scalingTrigger", + "serializationOptions": { + "$id": "975", + "json": { + "$id": "976", + "name": "scalingTrigger" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceResourcePropertiesBase.scalingPolicies", + "serializationOptions": { + "$id": "977", + "json": { + "$id": "978", + "name": "scalingPolicies" + } + } + } + ] + }, + "properties": [ + { + "$id": "979", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "The current deployment or provisioning state, which only appears in the response", + "type": { + "$id": "980", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceResourceProperties.provisioningState", + "serializationOptions": { + "$id": "981", + "json": { + "$id": "982", + "name": "provisioningState" + } + } + }, + { + "$ref": "772" + }, + { + "$id": "983", + "kind": "property", + "name": "serviceTypeName", + "serializedName": "serviceTypeName", + "doc": "The name of the service type", + "type": { + "$id": "984", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceResourceProperties.serviceTypeName", + "serializationOptions": { + "$id": "985", + "json": { + "$id": "986", + "name": "serviceTypeName" + } + } + }, + { + "$id": "987", + "kind": "property", + "name": "partitionDescription", + "serializedName": "partitionDescription", + "doc": "Describes how the service is partitioned.", + "type": { + "$id": "988", + "kind": "model", + "name": "ManagedServicePartitionScheme", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Partition", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes how the service is partitioned.", + "decorators": [], + "discriminatorProperty": { + "$id": "989", + "kind": "property", + "name": "partitionScheme", + "serializedName": "partitionScheme", + "type": { + "$ref": "48" + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Partition.partitionScheme", + "serializationOptions": { + "$id": "990", + "json": { + "$id": "991", + "name": "partitionScheme" + } + } + }, + "properties": [ + { + "$ref": "989" + } + ], + "discriminatedSubtypes": { + "$id": "992", + "UniformInt64Range": { + "$id": "993", + "kind": "model", + "name": "UniformInt64RangePartitionScheme", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.UniformInt64RangePartitionScheme", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes a partitioning scheme where an integer range is allocated evenly across a number of partitions.", + "discriminatorValue": "UniformInt64Range", + "decorators": [], + "baseModel": { + "$ref": "988" + }, + "properties": [ + { + "$id": "994", + "kind": "property", + "name": "count", + "serializedName": "count", + "doc": "The number of partitions.", + "type": { + "$id": "995", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.UniformInt64RangePartitionScheme.count", + "serializationOptions": { + "$id": "996", + "json": { + "$id": "997", + "name": "count" + } + } + }, + { + "$id": "998", + "kind": "property", + "name": "lowKey", + "serializedName": "lowKey", + "doc": "The lower bound of the partition key range that\nshould be split between the partition ‘Count’", + "type": { + "$id": "999", + "kind": "int64", + "name": "int64", + "crossLanguageDefinitionId": "TypeSpec.int64", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.UniformInt64RangePartitionScheme.lowKey", + "serializationOptions": { + "$id": "1000", + "json": { + "$id": "1001", + "name": "lowKey" + } + } + }, + { + "$id": "1002", + "kind": "property", + "name": "highKey", + "serializedName": "highKey", + "doc": "The upper bound of the partition key range that\nshould be split between the partition ‘Count’", + "type": { + "$id": "1003", + "kind": "int64", + "name": "int64", + "crossLanguageDefinitionId": "TypeSpec.int64", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.UniformInt64RangePartitionScheme.highKey", + "serializationOptions": { + "$id": "1004", + "json": { + "$id": "1005", + "name": "highKey" + } + } + }, + { + "$id": "1006", + "kind": "property", + "name": "partitionScheme", + "serializedName": "partitionScheme", + "doc": "Specifies how the service is partitioned.", + "type": { + "$id": "1007", + "kind": "constant", + "valueType": { + "$id": "1008", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "UniformInt64Range", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.UniformInt64RangePartitionScheme.partitionScheme", + "serializationOptions": { + "$id": "1009", + "json": { + "$id": "1010", + "name": "partitionScheme" + } + } + } + ] + }, + "Singleton": { + "$id": "1011", + "kind": "model", + "name": "SingletonPartitionScheme", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.SingletonPartitionScheme", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes the partition scheme of a singleton-partitioned, or non-partitioned service.", + "discriminatorValue": "Singleton", + "decorators": [], + "baseModel": { + "$ref": "988" + }, + "properties": [ + { + "$id": "1012", + "kind": "property", + "name": "partitionScheme", + "serializedName": "partitionScheme", + "doc": "Specifies how the service is partitioned.", + "type": { + "$id": "1013", + "kind": "constant", + "valueType": { + "$id": "1014", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "Singleton", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.SingletonPartitionScheme.partitionScheme", + "serializationOptions": { + "$id": "1015", + "json": { + "$id": "1016", + "name": "partitionScheme" + } + } + } + ] + }, + "Named": { + "$id": "1017", + "kind": "model", + "name": "NamedPartitionScheme", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NamedPartitionScheme", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes the named partition scheme of the service.", + "discriminatorValue": "Named", + "decorators": [], + "baseModel": { + "$ref": "988" + }, + "properties": [ + { + "$id": "1018", + "kind": "property", + "name": "names", + "serializedName": "names", + "doc": "Array for the names of the partitions.", + "type": { + "$id": "1019", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1020", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NamedPartitionScheme.names", + "serializationOptions": { + "$id": "1021", + "json": { + "$id": "1022", + "name": "names" + } + } + }, + { + "$id": "1023", + "kind": "property", + "name": "partitionScheme", + "serializedName": "partitionScheme", + "doc": "Specifies how the service is partitioned.", + "type": { + "$id": "1024", + "kind": "constant", + "valueType": { + "$id": "1025", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "Named", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NamedPartitionScheme.partitionScheme", + "serializationOptions": { + "$id": "1026", + "json": { + "$id": "1027", + "name": "partitionScheme" + } + } + } + ] + } + } + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceResourceProperties.partitionDescription", + "serializationOptions": { + "$id": "1028", + "json": { + "$id": "1029", + "name": "partitionDescription" + } + } + }, + { + "$id": "1030", + "kind": "property", + "name": "servicePackageActivationMode", + "serializedName": "servicePackageActivationMode", + "doc": "The activation Mode of the service package", + "type": { + "$ref": "56" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceResourceProperties.servicePackageActivationMode", + "serializationOptions": { + "$id": "1031", + "json": { + "$id": "1032", + "name": "servicePackageActivationMode" + } + } + }, + { + "$id": "1033", + "kind": "property", + "name": "serviceDnsName", + "serializedName": "serviceDnsName", + "doc": "Dns name used for the service. If this is specified, then the DNS name can be used to return the IP addresses of service endpoints for application layer protocols (e.g., HTTP).\nWhen updating serviceDnsName, old name may be temporarily resolvable. However, rely on new name.\nWhen removing serviceDnsName, removed name may temporarily be resolvable. Do not rely on the name being unresolvable.", + "type": { + "$id": "1034", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceResourceProperties.serviceDnsName", + "serializationOptions": { + "$id": "1035", + "json": { + "$id": "1036", + "name": "serviceDnsName" + } + } + } + ], + "discriminatedSubtypes": { + "$id": "1037", + "Stateful": { + "$id": "1038", + "kind": "model", + "name": "StatefulServiceProperties", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.StatefulServiceProperties", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The properties of a stateful service resource.", + "discriminatorValue": "Stateful", + "decorators": [], + "baseModel": { + "$ref": "771" + }, + "properties": [ + { + "$id": "1039", + "kind": "property", + "name": "hasPersistedState", + "serializedName": "hasPersistedState", + "doc": "A flag indicating whether this is a persistent service which stores states on the local disk. If it is then the value of this property is true, if not it is false.", + "type": { + "$id": "1040", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.StatefulServiceProperties.hasPersistedState", + "serializationOptions": { + "$id": "1041", + "json": { + "$id": "1042", + "name": "hasPersistedState" + } + } + }, + { + "$id": "1043", + "kind": "property", + "name": "targetReplicaSetSize", + "serializedName": "targetReplicaSetSize", + "doc": "The target replica set size as a number.", + "type": { + "$id": "1044", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.StatefulServiceProperties.targetReplicaSetSize", + "serializationOptions": { + "$id": "1045", + "json": { + "$id": "1046", + "name": "targetReplicaSetSize" + } + } + }, + { + "$id": "1047", + "kind": "property", + "name": "minReplicaSetSize", + "serializedName": "minReplicaSetSize", + "doc": "The minimum replica set size as a number.", + "type": { + "$id": "1048", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.StatefulServiceProperties.minReplicaSetSize", + "serializationOptions": { + "$id": "1049", + "json": { + "$id": "1050", + "name": "minReplicaSetSize" + } + } + }, + { + "$id": "1051", + "kind": "property", + "name": "replicaRestartWaitDuration", + "serializedName": "replicaRestartWaitDuration", + "doc": "The duration between when a replica goes down and when a new replica is created, represented in ISO 8601 format \"hh:mm:ss\".", + "type": { + "$id": "1052", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.StatefulServiceProperties.replicaRestartWaitDuration", + "serializationOptions": { + "$id": "1053", + "json": { + "$id": "1054", + "name": "replicaRestartWaitDuration" + } + } + }, + { + "$id": "1055", + "kind": "property", + "name": "quorumLossWaitDuration", + "serializedName": "quorumLossWaitDuration", + "doc": "The maximum duration for which a partition is allowed to be in a state of quorum loss, represented in ISO 8601 format \"hh:mm:ss\".", + "type": { + "$id": "1056", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.StatefulServiceProperties.quorumLossWaitDuration", + "serializationOptions": { + "$id": "1057", + "json": { + "$id": "1058", + "name": "quorumLossWaitDuration" + } + } + }, + { + "$id": "1059", + "kind": "property", + "name": "standByReplicaKeepDuration", + "serializedName": "standByReplicaKeepDuration", + "doc": "The definition on how long StandBy replicas should be maintained before being removed, represented in ISO 8601 format \"hh:mm:ss\".", + "type": { + "$id": "1060", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.StatefulServiceProperties.standByReplicaKeepDuration", + "serializationOptions": { + "$id": "1061", + "json": { + "$id": "1062", + "name": "standByReplicaKeepDuration" + } + } + }, + { + "$id": "1063", + "kind": "property", + "name": "servicePlacementTimeLimit", + "serializedName": "servicePlacementTimeLimit", + "doc": "The duration for which replicas can stay InBuild before reporting that build is stuck, represented in ISO 8601 format \"hh:mm:ss\".", + "type": { + "$id": "1064", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.StatefulServiceProperties.servicePlacementTimeLimit", + "serializationOptions": { + "$id": "1065", + "json": { + "$id": "1066", + "name": "servicePlacementTimeLimit" + } + } + }, + { + "$id": "1067", + "kind": "property", + "name": "serviceKind", + "serializedName": "serviceKind", + "doc": "The kind of service (Stateless or Stateful).", + "type": { + "$id": "1068", + "kind": "constant", + "valueType": { + "$id": "1069", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "Stateful", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.StatefulServiceProperties.serviceKind", + "serializationOptions": { + "$id": "1070", + "json": { + "$id": "1071", + "name": "serviceKind" + } + } + } + ] + }, + "Stateless": { + "$id": "1072", + "kind": "model", + "name": "StatelessServiceProperties", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.StatelessServiceProperties", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The properties of a stateless service resource.", + "discriminatorValue": "Stateless", + "decorators": [], + "baseModel": { + "$ref": "771" + }, + "properties": [ + { + "$id": "1073", + "kind": "property", + "name": "instanceCount", + "serializedName": "instanceCount", + "doc": "The instance count.", + "type": { + "$id": "1074", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.StatelessServiceProperties.instanceCount", + "serializationOptions": { + "$id": "1075", + "json": { + "$id": "1076", + "name": "instanceCount" + } + } + }, + { + "$id": "1077", + "kind": "property", + "name": "minInstanceCount", + "serializedName": "minInstanceCount", + "doc": "MinInstanceCount is the minimum number of instances that must be up to meet the EnsureAvailability safety check during operations like upgrade or deactivate node. The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * InstanceCount) ). Note, if InstanceCount is set to -1, during MinInstanceCount computation -1 is first converted into the number of nodes on which the instances are allowed to be placed according to the placement constraints on the service.", + "type": { + "$id": "1078", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.StatelessServiceProperties.minInstanceCount", + "serializationOptions": { + "$id": "1079", + "json": { + "$id": "1080", + "name": "minInstanceCount" + } + } + }, + { + "$id": "1081", + "kind": "property", + "name": "minInstancePercentage", + "serializedName": "minInstancePercentage", + "doc": "MinInstancePercentage is the minimum percentage of InstanceCount that must be up to meet the EnsureAvailability safety check during operations like upgrade or deactivate node. The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * InstanceCount) ). Note, if InstanceCount is set to -1, during MinInstancePercentage computation, -1 is first converted into the number of nodes on which the instances are allowed to be placed according to the placement constraints on the service.", + "type": { + "$id": "1082", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.StatelessServiceProperties.minInstancePercentage", + "serializationOptions": { + "$id": "1083", + "json": { + "$id": "1084", + "name": "minInstancePercentage" + } + } + }, + { + "$id": "1085", + "kind": "property", + "name": "serviceKind", + "serializedName": "serviceKind", + "doc": "The kind of service (Stateless or Stateful).", + "type": { + "$id": "1086", + "kind": "constant", + "valueType": { + "$id": "1087", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "Stateless", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.StatelessServiceProperties.serviceKind", + "serializationOptions": { + "$id": "1088", + "json": { + "$id": "1089", + "name": "serviceKind" + } + } + } + ] + } + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceResource.properties", + "serializationOptions": { + "$id": "1090", + "json": { + "$id": "1091", + "name": "properties" + } + } + }, + { + "$id": "1092", + "kind": "path", + "name": "name", + "serializedName": "name", + "doc": "The name of the service resource in the format of {applicationName}~{serviceName}.", + "type": { + "$id": "1093", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceResource.name", + "discriminator": false, + "flatten": false + }, + { + "$id": "1094", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Resource tags.", + "type": { + "$id": "1095", + "kind": "dict", + "keyType": { + "$id": "1096", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1097", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceResource.tags", + "serializationOptions": { + "$id": "1098", + "json": { + "$id": "1099", + "name": "tags" + } + } + }, + { + "$id": "1100", + "kind": "property", + "name": "location", + "serializedName": "location", + "doc": "The geo-location where the resource lives", + "type": { + "$id": "1101", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceResource.location", + "serializationOptions": { + "$id": "1102", + "json": { + "$id": "1103", + "name": "location" + } + } + } + ] + }, + { + "$ref": "771" + }, + { + "$ref": "988" + }, + { + "$ref": "993" + }, + { + "$ref": "1011" + }, + { + "$ref": "1017" + }, + { + "$ref": "775" + }, + { + "$ref": "782" + }, + { + "$ref": "794" + }, + { + "$ref": "818" + }, + { + "$ref": "823" + }, + { + "$ref": "833" + }, + { + "$ref": "843" + }, + { + "$ref": "853" + }, + { + "$ref": "863" + }, + { + "$ref": "876" + }, + { + "$ref": "878" + }, + { + "$ref": "883" + }, + { + "$ref": "901" + }, + { + "$ref": "922" + }, + { + "$ref": "927" + }, + { + "$ref": "949" + }, + { + "$ref": "1038" + }, + { + "$ref": "1072" + }, + { + "$id": "1104", + "kind": "model", + "name": "ServiceUpdateParameters", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceUpdateParameters", + "usage": "Input,Json", + "doc": "Service update request", + "decorators": [], + "properties": [ + { + "$id": "1105", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Service update parameters", + "type": { + "$id": "1106", + "kind": "dict", + "keyType": { + "$id": "1107", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1108", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceUpdateParameters.tags", + "serializationOptions": { + "$id": "1109", + "json": { + "$id": "1110", + "name": "tags" + } + } + } + ] + }, + { + "$id": "1111", + "kind": "model", + "name": "ServiceResourceList", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceResourceList", + "usage": "Output,Json", + "doc": "The list of service resources.", + "decorators": [], + "properties": [ + { + "$id": "1112", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The ServiceResource items on this page", + "type": { + "$id": "1113", + "kind": "array", + "name": "ArrayServiceResource", + "valueType": { + "$ref": "769" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceResourceList.value", + "serializationOptions": { + "$id": "1114", + "json": { + "$id": "1115", + "name": "value" + } + } + }, + { + "$id": "1116", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "1117", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "1118", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceResourceList.nextLink", + "serializationOptions": { + "$id": "1119", + "json": { + "$id": "1120", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "1121", + "kind": "model", + "name": "ServiceFabricManagedClusterVersion", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterCodeVersionResult", + "usage": "Output,Json", + "doc": "The result of the Service Fabric runtime versions", + "decorators": [], + "properties": [ + { + "$id": "1122", + "kind": "property", + "name": "id", + "serializedName": "id", + "doc": "The identification of the result", + "type": { + "$id": "1123", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterCodeVersionResult.id", + "serializationOptions": { + "$id": "1124", + "json": { + "$id": "1125", + "name": "id" + } + } + }, + { + "$id": "1126", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the result", + "type": { + "$id": "1127", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterCodeVersionResult.name", + "serializationOptions": { + "$id": "1128", + "json": { + "$id": "1129", + "name": "name" + } + } + }, + { + "$id": "1130", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The result resource type", + "type": { + "$id": "1131", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterCodeVersionResult.type", + "serializationOptions": { + "$id": "1132", + "json": { + "$id": "1133", + "name": "type" + } + } + }, + { + "$id": "1134", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The detail of the Service Fabric runtime version result", + "type": { + "$id": "1135", + "kind": "model", + "name": "ManagedClusterVersionDetails", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterVersionDetails", + "usage": "Output,Json", + "doc": "The detail of the Service Fabric runtime version result", + "decorators": [], + "properties": [ + { + "$id": "1136", + "kind": "property", + "name": "clusterCodeVersion", + "serializedName": "clusterCodeVersion", + "doc": "The Service Fabric runtime version of the cluster.", + "type": { + "$id": "1137", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterVersionDetails.clusterCodeVersion", + "serializationOptions": { + "$id": "1138", + "json": { + "$id": "1139", + "name": "clusterCodeVersion" + } + } + }, + { + "$id": "1140", + "kind": "property", + "name": "VersionSupportExpireOn", + "serializedName": "supportExpiryUtc", + "doc": "The date of expiry of support of the version.", + "type": { + "$id": "1141", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "1142", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterVersionDetails.supportExpiryUtc", + "serializationOptions": { + "$id": "1143", + "json": { + "$id": "1144", + "name": "supportExpiryUtc" + } + } + }, + { + "$id": "1145", + "kind": "property", + "name": "osType", + "serializedName": "osType", + "doc": "Cluster operating system, the default will be Windows", + "type": { + "$ref": "112" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterVersionDetails.osType", + "serializationOptions": { + "$id": "1146", + "json": { + "$id": "1147", + "name": "osType" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": true, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterCodeVersionResult.properties", + "serializationOptions": { + "$id": "1148", + "json": { + "$id": "1149", + "name": "properties" + } + } + } + ] + }, + { + "$ref": "1135" + }, + { + "$id": "1150", + "kind": "model", + "name": "ServiceFabricManagedUnsupportedVmSize", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedVMSize", + "usage": "Output,Json", + "doc": "Describes a VM Sizes.", + "decorators": [], + "properties": [ + { + "$id": "1151", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "VM Size properties.", + "type": { + "$id": "1152", + "kind": "model", + "name": "VMSize", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VMSize", + "usage": "Output,Json", + "doc": "VM Sizes properties.", + "decorators": [], + "properties": [ + { + "$id": "1153", + "kind": "property", + "name": "size", + "serializedName": "size", + "doc": "VM Size name.", + "type": { + "$id": "1154", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VMSize.size", + "serializationOptions": { + "$id": "1155", + "json": { + "$id": "1156", + "name": "size" + } + } + } + ] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedVMSize.properties", + "serializationOptions": { + "$id": "1157", + "json": { + "$id": "1158", + "name": "properties" + } + } + }, + { + "$id": "1159", + "kind": "property", + "name": "id", + "serializedName": "id", + "doc": "VM Size id.", + "type": { + "$id": "1160", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedVMSize.id", + "serializationOptions": { + "$id": "1161", + "json": { + "$id": "1162", + "name": "id" + } + } + }, + { + "$id": "1163", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "VM Size name.", + "type": { + "$id": "1164", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedVMSize.name", + "serializationOptions": { + "$id": "1165", + "json": { + "$id": "1166", + "name": "name" + } + } + }, + { + "$id": "1167", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "VM Size type.", + "type": { + "$id": "1168", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedVMSize.type", + "serializationOptions": { + "$id": "1169", + "json": { + "$id": "1170", + "name": "type" + } + } + } + ] + }, + { + "$ref": "1152" + }, + { + "$id": "1171", + "kind": "model", + "name": "ManagedVMSizesResult", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedVMSizesResult", + "usage": "Output,Json", + "doc": "Describes the result of the request to list Managed VM Sizes for Service Fabric Managed Clusters.", + "decorators": [], + "properties": [ + { + "$id": "1172", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The ManagedVMSize items on this page", + "type": { + "$id": "1173", + "kind": "array", + "name": "ArrayManagedVmSize", + "valueType": { + "$ref": "1150" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedVMSizesResult.value", + "serializationOptions": { + "$id": "1174", + "json": { + "$id": "1175", + "name": "value" + } + } + }, + { + "$id": "1176", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "1177", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "1178", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedVMSizesResult.nextLink", + "serializationOptions": { + "$id": "1179", + "json": { + "$id": "1180", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "1181", + "kind": "model", + "name": "ServiceFabricManagedCluster", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedCluster", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The managed cluster resource", + "decorators": [], + "baseModel": { + "$id": "1182", + "kind": "model", + "name": "TrackedResource", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.TrackedResource", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'", + "decorators": [], + "baseModel": { + "$ref": "443" + }, + "properties": [ + { + "$id": "1183", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Resource tags.", + "type": { + "$id": "1184", + "kind": "dict", + "keyType": { + "$id": "1185", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1186", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.TrackedResource.tags", + "serializationOptions": { + "$id": "1187", + "json": { + "$id": "1188", + "name": "tags" + } + } + }, + { + "$id": "1189", + "kind": "property", + "name": "location", + "serializedName": "location", + "doc": "The geo-location where the resource lives", + "type": { + "$id": "1190", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.TrackedResource.location", + "serializationOptions": { + "$id": "1191", + "json": { + "$id": "1192", + "name": "location" + } + } + } + ] + }, + "properties": [ + { + "$id": "1193", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The managed cluster resource properties", + "type": { + "$id": "1194", + "kind": "model", + "name": "ManagedClusterProperties", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes the managed cluster resource properties.", + "decorators": [], + "properties": [ + { + "$id": "1195", + "kind": "property", + "name": "dnsName", + "serializedName": "dnsName", + "doc": "The cluster dns name.", + "type": { + "$id": "1196", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.dnsName", + "serializationOptions": { + "$id": "1197", + "json": { + "$id": "1198", + "name": "dnsName" + } + } + }, + { + "$id": "1199", + "kind": "property", + "name": "fqdn", + "serializedName": "fqdn", + "doc": "The fully qualified domain name associated with the public load balancer of the cluster.", + "type": { + "$id": "1200", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.fqdn", + "serializationOptions": { + "$id": "1201", + "json": { + "$id": "1202", + "name": "fqdn" + } + } + }, + { + "$id": "1203", + "kind": "property", + "name": "ipv4Address", + "serializedName": "ipv4Address", + "doc": "The IPv4 address associated with the public load balancer of the cluster.", + "type": { + "$id": "1204", + "kind": "string", + "name": "ipV4Address", + "crossLanguageDefinitionId": "Azure.Core.ipV4Address", + "baseType": { + "$id": "1205", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.ipv4Address", + "serializationOptions": { + "$id": "1206", + "json": { + "$id": "1207", + "name": "ipv4Address" + } + } + }, + { + "$id": "1208", + "kind": "property", + "name": "-|uuid", + "serializedName": "clusterId", + "doc": "A service generated unique identifier for the cluster resource.", + "type": { + "$id": "1209", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1210", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.clusterId", + "serializationOptions": { + "$id": "1211", + "json": { + "$id": "1212", + "name": "clusterId" + } + } + }, + { + "$id": "1213", + "kind": "property", + "name": "clusterState", + "serializedName": "clusterState", + "doc": "The current state of the cluster.", + "type": { + "$ref": "120" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.clusterState", + "serializationOptions": { + "$id": "1214", + "json": { + "$id": "1215", + "name": "clusterState" + } + } + }, + { + "$id": "1216", + "kind": "property", + "name": "-|any", + "serializedName": "clusterCertificateThumbprints", + "doc": "List of thumbprints of the cluster certificates.", + "type": { + "$id": "1217", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1218", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.clusterCertificateThumbprints", + "serializationOptions": { + "$id": "1219", + "json": { + "$id": "1220", + "name": "clusterCertificateThumbprints" + } + } + }, + { + "$id": "1221", + "kind": "property", + "name": "clientConnectionPort", + "serializedName": "clientConnectionPort", + "doc": "The port used for client connections to the cluster.", + "type": { + "$id": "1222", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.clientConnectionPort", + "serializationOptions": { + "$id": "1223", + "json": { + "$id": "1224", + "name": "clientConnectionPort" + } + } + }, + { + "$id": "1225", + "kind": "property", + "name": "httpGatewayConnectionPort", + "serializedName": "httpGatewayConnectionPort", + "doc": "The port used for HTTP connections to the cluster.", + "type": { + "$id": "1226", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.httpGatewayConnectionPort", + "serializationOptions": { + "$id": "1227", + "json": { + "$id": "1228", + "name": "httpGatewayConnectionPort" + } + } + }, + { + "$id": "1229", + "kind": "property", + "name": "adminUserName", + "serializedName": "adminUserName", + "doc": "VM admin user name.", + "type": { + "$id": "1230", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.adminUserName", + "serializationOptions": { + "$id": "1231", + "json": { + "$id": "1232", + "name": "adminUserName" + } + } + }, + { + "$id": "1233", + "kind": "property", + "name": "adminPassword", + "serializedName": "adminPassword", + "doc": "VM admin user password.", + "type": { + "$id": "1234", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.adminPassword", + "serializationOptions": { + "$id": "1235", + "json": { + "$id": "1236", + "name": "adminPassword" + } + } + }, + { + "$id": "1237", + "kind": "property", + "name": "loadBalancingRules", + "serializedName": "loadBalancingRules", + "doc": "Load balancing rules that are applied to the public load balancer of the cluster.", + "type": { + "$id": "1238", + "kind": "array", + "name": "ArrayLoadBalancingRule", + "valueType": { + "$id": "1239", + "kind": "model", + "name": "ManagedClusterLoadBalancingRule", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.LoadBalancingRule", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes a load balancing rule.", + "decorators": [], + "properties": [ + { + "$id": "1240", + "kind": "property", + "name": "frontendPort", + "serializedName": "frontendPort", + "doc": "The port for the external endpoint. Port numbers for each rule must be unique within the Load Balancer. Acceptable values are between 1 and 65534.", + "type": { + "$id": "1241", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.LoadBalancingRule.frontendPort", + "serializationOptions": { + "$id": "1242", + "json": { + "$id": "1243", + "name": "frontendPort" + } + } + }, + { + "$id": "1244", + "kind": "property", + "name": "backendPort", + "serializedName": "backendPort", + "doc": "The port used for internal connections on the endpoint. Acceptable values are between 1 and 65535.", + "type": { + "$id": "1245", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.LoadBalancingRule.backendPort", + "serializationOptions": { + "$id": "1246", + "json": { + "$id": "1247", + "name": "backendPort" + } + } + }, + { + "$id": "1248", + "kind": "property", + "name": "protocol", + "serializedName": "protocol", + "doc": "The reference to the transport protocol used by the load balancing rule.", + "type": { + "$ref": "134" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.LoadBalancingRule.protocol", + "serializationOptions": { + "$id": "1249", + "json": { + "$id": "1250", + "name": "protocol" + } + } + }, + { + "$id": "1251", + "kind": "property", + "name": "probePort", + "serializedName": "probePort", + "doc": "The prob port used by the load balancing rule. Acceptable values are between 1 and 65535.", + "type": { + "$id": "1252", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.LoadBalancingRule.probePort", + "serializationOptions": { + "$id": "1253", + "json": { + "$id": "1254", + "name": "probePort" + } + } + }, + { + "$id": "1255", + "kind": "property", + "name": "probeProtocol", + "serializedName": "probeProtocol", + "doc": "the reference to the load balancer probe used by the load balancing rule.", + "type": { + "$ref": "140" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.LoadBalancingRule.probeProtocol", + "serializationOptions": { + "$id": "1256", + "json": { + "$id": "1257", + "name": "probeProtocol" + } + } + }, + { + "$id": "1258", + "kind": "property", + "name": "probeRequestPath", + "serializedName": "probeRequestPath", + "doc": "The probe request path. Only supported for HTTP/HTTPS probes.", + "type": { + "$id": "1259", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.LoadBalancingRule.probeRequestPath", + "serializationOptions": { + "$id": "1260", + "json": { + "$id": "1261", + "name": "probeRequestPath" + } + } + }, + { + "$id": "1262", + "kind": "property", + "name": "loadDistribution", + "serializedName": "loadDistribution", + "doc": "The load distribution policy for this rule.", + "type": { + "$id": "1263", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.LoadBalancingRule.loadDistribution", + "serializationOptions": { + "$id": "1264", + "json": { + "$id": "1265", + "name": "loadDistribution" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.loadBalancingRules", + "serializationOptions": { + "$id": "1266", + "json": { + "$id": "1267", + "name": "loadBalancingRules" + } + } + }, + { + "$id": "1268", + "kind": "property", + "name": "IsRdpAccessAllowed", + "serializedName": "allowRdpAccess", + "doc": "Setting this to true enables RDP access to the VM. The default NSG rule opens RDP port to Internet which can be overridden with custom Network Security Rules. The default value for this setting is false.", + "type": { + "$id": "1269", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.allowRdpAccess", + "serializationOptions": { + "$id": "1270", + "json": { + "$id": "1271", + "name": "allowRdpAccess" + } + } + }, + { + "$id": "1272", + "kind": "property", + "name": "networkSecurityRules", + "serializedName": "networkSecurityRules", + "doc": "Custom Network Security Rules that are applied to the Virtual Network of the cluster.", + "type": { + "$id": "1273", + "kind": "array", + "name": "ArrayNetworkSecurityRule", + "valueType": { + "$id": "1274", + "kind": "model", + "name": "ServiceFabricManagedNetworkSecurityRule", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NetworkSecurityRule", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes a network security rule.", + "decorators": [], + "properties": [ + { + "$id": "1275", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "Network security rule name.", + "type": { + "$id": "1276", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NetworkSecurityRule.name", + "serializationOptions": { + "$id": "1277", + "json": { + "$id": "1278", + "name": "name" + } + } + }, + { + "$id": "1279", + "kind": "property", + "name": "description", + "serializedName": "description", + "doc": "Network security rule description.", + "type": { + "$id": "1280", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NetworkSecurityRule.description", + "serializationOptions": { + "$id": "1281", + "json": { + "$id": "1282", + "name": "description" + } + } + }, + { + "$id": "1283", + "kind": "property", + "name": "protocol", + "serializedName": "protocol", + "doc": "Network protocol this rule applies to.", + "type": { + "$ref": "148" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NetworkSecurityRule.protocol", + "serializationOptions": { + "$id": "1284", + "json": { + "$id": "1285", + "name": "protocol" + } + } + }, + { + "$id": "1286", + "kind": "property", + "name": "sourceAddressPrefixes", + "serializedName": "sourceAddressPrefixes", + "doc": "The CIDR or source IP ranges.", + "type": { + "$id": "1287", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1288", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NetworkSecurityRule.sourceAddressPrefixes", + "serializationOptions": { + "$id": "1289", + "json": { + "$id": "1290", + "name": "sourceAddressPrefixes" + } + } + }, + { + "$id": "1291", + "kind": "property", + "name": "destinationAddressPrefixes", + "serializedName": "destinationAddressPrefixes", + "doc": "The destination address prefixes. CIDR or destination IP ranges.", + "type": { + "$id": "1292", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1293", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NetworkSecurityRule.destinationAddressPrefixes", + "serializationOptions": { + "$id": "1294", + "json": { + "$id": "1295", + "name": "destinationAddressPrefixes" + } + } + }, + { + "$id": "1296", + "kind": "property", + "name": "sourcePortRanges", + "serializedName": "sourcePortRanges", + "doc": "The source port ranges.", + "type": { + "$id": "1297", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1298", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NetworkSecurityRule.sourcePortRanges", + "serializationOptions": { + "$id": "1299", + "json": { + "$id": "1300", + "name": "sourcePortRanges" + } + } + }, + { + "$id": "1301", + "kind": "property", + "name": "destinationPortRanges", + "serializedName": "destinationPortRanges", + "doc": "The destination port ranges.", + "type": { + "$id": "1302", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1303", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NetworkSecurityRule.destinationPortRanges", + "serializationOptions": { + "$id": "1304", + "json": { + "$id": "1305", + "name": "destinationPortRanges" + } + } + }, + { + "$id": "1306", + "kind": "property", + "name": "sourceAddressPrefix", + "serializedName": "sourceAddressPrefix", + "doc": "The CIDR or source IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. If this is an ingress rule, specifies where network traffic originates from.", + "type": { + "$id": "1307", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NetworkSecurityRule.sourceAddressPrefix", + "serializationOptions": { + "$id": "1308", + "json": { + "$id": "1309", + "name": "sourceAddressPrefix" + } + } + }, + { + "$id": "1310", + "kind": "property", + "name": "destinationAddressPrefix", + "serializedName": "destinationAddressPrefix", + "doc": "The destination address prefix. CIDR or destination IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used.", + "type": { + "$id": "1311", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NetworkSecurityRule.destinationAddressPrefix", + "serializationOptions": { + "$id": "1312", + "json": { + "$id": "1313", + "name": "destinationAddressPrefix" + } + } + }, + { + "$id": "1314", + "kind": "property", + "name": "sourcePortRange", + "serializedName": "sourcePortRange", + "doc": "The source port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.", + "type": { + "$id": "1315", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NetworkSecurityRule.sourcePortRange", + "serializationOptions": { + "$id": "1316", + "json": { + "$id": "1317", + "name": "sourcePortRange" + } + } + }, + { + "$id": "1318", + "kind": "property", + "name": "destinationPortRange", + "serializedName": "destinationPortRange", + "doc": "he destination port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.", + "type": { + "$id": "1319", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NetworkSecurityRule.destinationPortRange", + "serializationOptions": { + "$id": "1320", + "json": { + "$id": "1321", + "name": "destinationPortRange" + } + } + }, + { + "$id": "1322", + "kind": "property", + "name": "access", + "serializedName": "access", + "doc": "The network traffic is allowed or denied.", + "type": { + "$ref": "164" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NetworkSecurityRule.access", + "serializationOptions": { + "$id": "1323", + "json": { + "$id": "1324", + "name": "access" + } + } + }, + { + "$id": "1325", + "kind": "property", + "name": "priority", + "serializedName": "priority", + "doc": "The priority of the rule. The value can be in the range 1000 to 3000. Values outside this range are reserved for Service Fabric ManagerCluster Resource Provider. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule.", + "type": { + "$id": "1326", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NetworkSecurityRule.priority", + "serializationOptions": { + "$id": "1327", + "json": { + "$id": "1328", + "name": "priority" + } + } + }, + { + "$id": "1329", + "kind": "property", + "name": "direction", + "serializedName": "direction", + "doc": "Network security rule direction.", + "type": { + "$ref": "170" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NetworkSecurityRule.direction", + "serializationOptions": { + "$id": "1330", + "json": { + "$id": "1331", + "name": "direction" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.networkSecurityRules", + "serializationOptions": { + "$id": "1332", + "json": { + "$id": "1333", + "name": "networkSecurityRules" + } + } + }, + { + "$id": "1334", + "kind": "property", + "name": "clients", + "serializedName": "clients", + "doc": "Client certificates that are allowed to manage the cluster.", + "type": { + "$id": "1335", + "kind": "array", + "name": "ArrayClientCertificate", + "valueType": { + "$id": "1336", + "kind": "model", + "name": "ManagedClusterClientCertificate", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClientCertificate", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Client certificate definition.", + "decorators": [], + "properties": [ + { + "$id": "1337", + "kind": "property", + "name": "isAdmin", + "serializedName": "isAdmin", + "doc": "Indicates if the client certificate has admin access to the cluster. Non admin clients can perform only read only operations on the cluster.", + "type": { + "$id": "1338", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClientCertificate.isAdmin", + "serializationOptions": { + "$id": "1339", + "json": { + "$id": "1340", + "name": "isAdmin" + } + } + }, + { + "$id": "1341", + "kind": "property", + "name": "thumbprint", + "serializedName": "thumbprint", + "doc": "Certificate thumbprint.", + "type": { + "$id": "1342", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClientCertificate.thumbprint", + "serializationOptions": { + "$id": "1343", + "json": { + "$id": "1344", + "name": "thumbprint" + } + } + }, + { + "$id": "1345", + "kind": "property", + "name": "commonName", + "serializedName": "commonName", + "doc": "Certificate common name.", + "type": { + "$id": "1346", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClientCertificate.commonName", + "serializationOptions": { + "$id": "1347", + "json": { + "$id": "1348", + "name": "commonName" + } + } + }, + { + "$id": "1349", + "kind": "property", + "name": "issuerThumbprint", + "serializedName": "issuerThumbprint", + "doc": "Issuer thumbprint for the certificate. Only used together with CommonName.", + "type": { + "$id": "1350", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClientCertificate.issuerThumbprint", + "serializationOptions": { + "$id": "1351", + "json": { + "$id": "1352", + "name": "issuerThumbprint" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.clients", + "serializationOptions": { + "$id": "1353", + "json": { + "$id": "1354", + "name": "clients" + } + } + }, + { + "$id": "1355", + "kind": "property", + "name": "azureActiveDirectory", + "serializedName": "azureActiveDirectory", + "doc": "The AAD authentication settings of the cluster.", + "type": { + "$id": "1356", + "kind": "model", + "name": "ManagedClusterAzureActiveDirectory", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AzureActiveDirectory", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The settings to enable AAD authentication on the cluster.", + "decorators": [], + "properties": [ + { + "$id": "1357", + "kind": "property", + "name": "tenantId", + "serializedName": "tenantId", + "doc": "Azure active directory tenant id.", + "type": { + "$id": "1358", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1359", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AzureActiveDirectory.tenantId", + "serializationOptions": { + "$id": "1360", + "json": { + "$id": "1361", + "name": "tenantId" + } + } + }, + { + "$id": "1362", + "kind": "property", + "name": "clusterApplication", + "serializedName": "clusterApplication", + "doc": "Azure active directory cluster application id.", + "type": { + "$id": "1363", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AzureActiveDirectory.clusterApplication", + "serializationOptions": { + "$id": "1364", + "json": { + "$id": "1365", + "name": "clusterApplication" + } + } + }, + { + "$id": "1366", + "kind": "property", + "name": "clientApplication", + "serializedName": "clientApplication", + "doc": "Azure active directory client application id.", + "type": { + "$id": "1367", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AzureActiveDirectory.clientApplication", + "serializationOptions": { + "$id": "1368", + "json": { + "$id": "1369", + "name": "clientApplication" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.azureActiveDirectory", + "serializationOptions": { + "$id": "1370", + "json": { + "$id": "1371", + "name": "azureActiveDirectory" + } + } + }, + { + "$id": "1372", + "kind": "property", + "name": "fabricSettings", + "serializedName": "fabricSettings", + "doc": "The list of custom fabric settings to configure the cluster.", + "type": { + "$id": "1373", + "kind": "array", + "name": "ArraySettingsSectionDescription", + "valueType": { + "$id": "1374", + "kind": "model", + "name": "ClusterFabricSettingsSection", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.SettingsSectionDescription", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes a section in the fabric settings of the cluster.", + "decorators": [], + "properties": [ + { + "$id": "1375", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The section name of the fabric settings.", + "type": { + "$id": "1376", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.SettingsSectionDescription.name", + "serializationOptions": { + "$id": "1377", + "json": { + "$id": "1378", + "name": "name" + } + } + }, + { + "$id": "1379", + "kind": "property", + "name": "parameters", + "serializedName": "parameters", + "doc": "The collection of parameters in the section.", + "type": { + "$id": "1380", + "kind": "array", + "name": "ArraySettingsParameterDescription", + "valueType": { + "$id": "1381", + "kind": "model", + "name": "ClusterFabricSettingsParameterDescription", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.SettingsParameterDescription", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes a parameter in fabric settings of the cluster.", + "decorators": [], + "properties": [ + { + "$id": "1382", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The parameter name of fabric setting.", + "type": { + "$id": "1383", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.SettingsParameterDescription.name", + "serializationOptions": { + "$id": "1384", + "json": { + "$id": "1385", + "name": "name" + } + } + }, + { + "$id": "1386", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The parameter value of fabric setting.", + "type": { + "$id": "1387", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.SettingsParameterDescription.value", + "serializationOptions": { + "$id": "1388", + "json": { + "$id": "1389", + "name": "value" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.SettingsSectionDescription.parameters", + "serializationOptions": { + "$id": "1390", + "json": { + "$id": "1391", + "name": "parameters" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.fabricSettings", + "serializationOptions": { + "$id": "1392", + "json": { + "$id": "1393", + "name": "fabricSettings" + } + } + }, + { + "$id": "1394", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "The provisioning state of the managed cluster resource.", + "type": { + "$ref": "176" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.provisioningState", + "serializationOptions": { + "$id": "1395", + "json": { + "$id": "1396", + "name": "provisioningState" + } + } + }, + { + "$id": "1397", + "kind": "property", + "name": "clusterCodeVersion", + "serializedName": "clusterCodeVersion", + "doc": "The Service Fabric runtime version of the cluster. This property is required when **clusterUpgradeMode** is set to 'Manual'. To get list of available Service Fabric versions for new clusters use [ClusterVersion API](./ClusterVersion.md). To get the list of available version for existing clusters use **availableClusterVersions**.", + "type": { + "$id": "1398", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.clusterCodeVersion", + "serializationOptions": { + "$id": "1399", + "json": { + "$id": "1400", + "name": "clusterCodeVersion" + } + } + }, + { + "$id": "1401", + "kind": "property", + "name": "clusterUpgradeMode", + "serializedName": "clusterUpgradeMode", + "doc": "The upgrade mode of the cluster when new Service Fabric runtime version is available.", + "type": { + "$ref": "198" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.clusterUpgradeMode", + "serializationOptions": { + "$id": "1402", + "json": { + "$id": "1403", + "name": "clusterUpgradeMode" + } + } + }, + { + "$id": "1404", + "kind": "property", + "name": "clusterUpgradeCadence", + "serializedName": "clusterUpgradeCadence", + "doc": "Indicates when new cluster runtime version upgrades will be applied after they are released. By default is Wave0. Only applies when **clusterUpgradeMode** is set to 'Automatic'.", + "type": { + "$ref": "204" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.clusterUpgradeCadence", + "serializationOptions": { + "$id": "1405", + "json": { + "$id": "1406", + "name": "clusterUpgradeCadence" + } + } + }, + { + "$id": "1407", + "kind": "property", + "name": "AddOnFeatures", + "serializedName": "addonFeatures", + "doc": "List of add-on features to enable on the cluster.", + "type": { + "$id": "1408", + "kind": "array", + "name": "ArrayManagedClusterAddOnFeature", + "valueType": { + "$ref": "212" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.addonFeatures", + "serializationOptions": { + "$id": "1409", + "json": { + "$id": "1410", + "name": "addonFeatures" + } + } + }, + { + "$id": "1411", + "kind": "property", + "name": "IsAutoOSUpgradeEnabled", + "serializedName": "enableAutoOSUpgrade", + "doc": "Enables automatic OS upgrade for node types created using OS images with version 'latest'. The default value for this setting is false.", + "type": { + "$id": "1412", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.enableAutoOSUpgrade", + "serializationOptions": { + "$id": "1413", + "json": { + "$id": "1414", + "name": "enableAutoOSUpgrade" + } + } + }, + { + "$id": "1415", + "kind": "property", + "name": "HasZoneResiliency", + "serializedName": "zonalResiliency", + "doc": "Indicates if the cluster has zone resiliency.", + "type": { + "$id": "1416", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.zonalResiliency", + "serializationOptions": { + "$id": "1417", + "json": { + "$id": "1418", + "name": "zonalResiliency" + } + } + }, + { + "$id": "1419", + "kind": "property", + "name": "applicationTypeVersionsCleanupPolicy", + "serializedName": "applicationTypeVersionsCleanupPolicy", + "doc": "The policy used to clean up unused versions.", + "type": { + "$id": "1420", + "kind": "model", + "name": "ApplicationTypeVersionsCleanupPolicy", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeVersionsCleanupPolicy", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The policy used to clean up unused versions. When the policy is not specified explicitly, the default unused application versions to keep will be 3.", + "decorators": [], + "properties": [ + { + "$id": "1421", + "kind": "property", + "name": "maxUnusedVersionsToKeep", + "serializedName": "maxUnusedVersionsToKeep", + "doc": "Number of unused versions per application type to keep.", + "type": { + "$id": "1422", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeVersionsCleanupPolicy.maxUnusedVersionsToKeep", + "serializationOptions": { + "$id": "1423", + "json": { + "$id": "1424", + "name": "maxUnusedVersionsToKeep" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.applicationTypeVersionsCleanupPolicy", + "serializationOptions": { + "$id": "1425", + "json": { + "$id": "1426", + "name": "applicationTypeVersionsCleanupPolicy" + } + } + }, + { + "$id": "1427", + "kind": "property", + "name": "IsIPv6Enabled", + "serializedName": "enableIpv6", + "doc": "Setting this to true creates IPv6 address space for the default VNet used by the cluster. This setting cannot be changed once the cluster is created. The default value for this setting is false.", + "type": { + "$id": "1428", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.enableIpv6", + "serializationOptions": { + "$id": "1429", + "json": { + "$id": "1430", + "name": "enableIpv6" + } + } + }, + { + "$id": "1431", + "kind": "property", + "name": "subnetId", + "serializedName": "subnetId", + "doc": "If specified, the node types for the cluster are created in this subnet instead of the default VNet. The **networkSecurityRules** specified for the cluster are also applied to this subnet. This setting cannot be changed once the cluster is created.", + "type": { + "$id": "1432", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.subnetId", + "serializationOptions": { + "$id": "1433", + "json": { + "$id": "1434", + "name": "subnetId" + } + } + }, + { + "$id": "1435", + "kind": "property", + "name": "ipTags", + "serializedName": "ipTags", + "doc": "The list of IP tags associated with the default public IP address of the cluster.", + "type": { + "$id": "1436", + "kind": "array", + "name": "ArrayIpTag", + "valueType": { + "$id": "1437", + "kind": "model", + "name": "ManagedClusterIPTag", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.IpTag", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The IP tag associated with the public IP address.", + "decorators": [], + "properties": [ + { + "$id": "1438", + "kind": "property", + "name": "ipTagType", + "serializedName": "ipTagType", + "doc": "IP tag type. Example: FirstPartyUsage.", + "type": { + "$id": "1439", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.IpTag.ipTagType", + "serializationOptions": { + "$id": "1440", + "json": { + "$id": "1441", + "name": "ipTagType" + } + } + }, + { + "$id": "1442", + "kind": "property", + "name": "tag", + "serializedName": "tag", + "doc": "IP tag associated with the public IP. Example: SQL, Storage etc.", + "type": { + "$id": "1443", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.IpTag.tag", + "serializationOptions": { + "$id": "1444", + "json": { + "$id": "1445", + "name": "tag" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.ipTags", + "serializationOptions": { + "$id": "1446", + "json": { + "$id": "1447", + "name": "ipTags" + } + } + }, + { + "$id": "1448", + "kind": "property", + "name": "ipv6Address", + "serializedName": "ipv6Address", + "doc": "IPv6 address for the cluster if IPv6 is enabled.", + "type": { + "$id": "1449", + "kind": "string", + "name": "ipV6Address", + "crossLanguageDefinitionId": "Azure.Core.ipV6Address", + "baseType": { + "$id": "1450", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.ipv6Address", + "serializationOptions": { + "$id": "1451", + "json": { + "$id": "1452", + "name": "ipv6Address" + } + } + }, + { + "$id": "1453", + "kind": "property", + "name": "IsServicePublicIPEnabled", + "serializedName": "enableServicePublicIP", + "doc": "Setting this to true will link the IPv4 address as the ServicePublicIP of the IPv6 address. It can only be set to True if IPv6 is enabled on the cluster.", + "type": { + "$id": "1454", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.enableServicePublicIP", + "serializationOptions": { + "$id": "1455", + "json": { + "$id": "1456", + "name": "enableServicePublicIP" + } + } + }, + { + "$id": "1457", + "kind": "property", + "name": "auxiliarySubnets", + "serializedName": "auxiliarySubnets", + "doc": "Auxiliary subnets for the cluster.", + "type": { + "$id": "1458", + "kind": "array", + "name": "ArraySubnet", + "valueType": { + "$id": "1459", + "kind": "model", + "name": "ManagedClusterSubnet", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Subnet", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes a Subnet.", + "decorators": [], + "properties": [ + { + "$id": "1460", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "Subnet name.", + "type": { + "$id": "1461", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Subnet.name", + "serializationOptions": { + "$id": "1462", + "json": { + "$id": "1463", + "name": "name" + } + } + }, + { + "$id": "1464", + "kind": "property", + "name": "IsIPv6Enabled", + "serializedName": "enableIpv6", + "doc": "Indicates wether to enable Ipv6 or not. If not provided, it will take the same configuration as the cluster.", + "type": { + "$id": "1465", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Subnet.enableIpv6", + "serializationOptions": { + "$id": "1466", + "json": { + "$id": "1467", + "name": "enableIpv6" + } + } + }, + { + "$id": "1468", + "kind": "property", + "name": "privateEndpointNetworkPolicies", + "serializedName": "privateEndpointNetworkPolicies", + "doc": "Enable or Disable apply network policies on private end point in the subnet.", + "type": { + "$ref": "220" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Subnet.privateEndpointNetworkPolicies", + "serializationOptions": { + "$id": "1469", + "json": { + "$id": "1470", + "name": "privateEndpointNetworkPolicies" + } + } + }, + { + "$id": "1471", + "kind": "property", + "name": "privateLinkServiceNetworkPolicies", + "serializedName": "privateLinkServiceNetworkPolicies", + "doc": "Enable or Disable apply network policies on private link service in the subnet.", + "type": { + "$ref": "226" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Subnet.privateLinkServiceNetworkPolicies", + "serializationOptions": { + "$id": "1472", + "json": { + "$id": "1473", + "name": "privateLinkServiceNetworkPolicies" + } + } + }, + { + "$id": "1474", + "kind": "property", + "name": "networkSecurityGroupId", + "serializedName": "networkSecurityGroupId", + "doc": "Full resource id for the network security group.", + "type": { + "$id": "1475", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "1476", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Subnet.networkSecurityGroupId", + "serializationOptions": { + "$id": "1477", + "json": { + "$id": "1478", + "name": "networkSecurityGroupId" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.auxiliarySubnets", + "serializationOptions": { + "$id": "1479", + "json": { + "$id": "1480", + "name": "auxiliarySubnets" + } + } + }, + { + "$id": "1481", + "kind": "property", + "name": "serviceEndpoints", + "serializedName": "serviceEndpoints", + "doc": "Service endpoints for subnets in the cluster.", + "type": { + "$id": "1482", + "kind": "array", + "name": "ArrayServiceEndpoint", + "valueType": { + "$id": "1483", + "kind": "model", + "name": "ManagedClusterServiceEndpoint", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceEndpoint", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The service endpoint properties.", + "decorators": [], + "properties": [ + { + "$id": "1484", + "kind": "property", + "name": "service", + "serializedName": "service", + "doc": "The type of the endpoint service.", + "type": { + "$id": "1485", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceEndpoint.service", + "serializationOptions": { + "$id": "1486", + "json": { + "$id": "1487", + "name": "service" + } + } + }, + { + "$id": "1488", + "kind": "property", + "name": "-|azure-location", + "serializedName": "locations", + "doc": "A list of locations.", + "type": { + "$id": "1489", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1490", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ServiceEndpoint.locations", + "serializationOptions": { + "$id": "1491", + "json": { + "$id": "1492", + "name": "locations" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.serviceEndpoints", + "serializationOptions": { + "$id": "1493", + "json": { + "$id": "1494", + "name": "serviceEndpoints" + } + } + }, + { + "$id": "1495", + "kind": "property", + "name": "zonalUpdateMode", + "serializedName": "zonalUpdateMode", + "doc": "Indicates the update mode for Cross Az clusters.", + "type": { + "$ref": "232" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.zonalUpdateMode", + "serializationOptions": { + "$id": "1496", + "json": { + "$id": "1497", + "name": "zonalUpdateMode" + } + } + }, + { + "$id": "1498", + "kind": "property", + "name": "useCustomVnet", + "serializedName": "useCustomVnet", + "doc": "For new clusters, this parameter indicates that it uses Bring your own VNet, but the subnet is specified at node type level; and for such clusters, the subnetId property is required for node types.", + "type": { + "$id": "1499", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.useCustomVnet", + "serializationOptions": { + "$id": "1500", + "json": { + "$id": "1501", + "name": "useCustomVnet" + } + } + }, + { + "$id": "1502", + "kind": "property", + "name": "publicIPPrefixId", + "serializedName": "publicIPPrefixId", + "doc": "Specify the resource id of a public IPv4 prefix that the load balancer will allocate a public IPv4 address from. This setting cannot be changed once the cluster is created.", + "type": { + "$id": "1503", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "1504", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.publicIPPrefixId", + "serializationOptions": { + "$id": "1505", + "json": { + "$id": "1506", + "name": "publicIPPrefixId" + } + } + }, + { + "$id": "1507", + "kind": "property", + "name": "publicIPv6PrefixId", + "serializedName": "publicIPv6PrefixId", + "doc": "Specify the resource id of a public IPv6 prefix that the load balancer will allocate a public IPv6 address from. This setting cannot be changed once the cluster is created.", + "type": { + "$id": "1508", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "1509", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.publicIPv6PrefixId", + "serializationOptions": { + "$id": "1510", + "json": { + "$id": "1511", + "name": "publicIPv6PrefixId" + } + } + }, + { + "$id": "1512", + "kind": "property", + "name": "ddosProtectionPlanId", + "serializedName": "ddosProtectionPlanId", + "doc": "Specify the resource id of a DDoS network protection plan that will be associated with the virtual network of the cluster.", + "type": { + "$id": "1513", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "1514", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.ddosProtectionPlanId", + "serializationOptions": { + "$id": "1515", + "json": { + "$id": "1516", + "name": "ddosProtectionPlanId" + } + } + }, + { + "$id": "1517", + "kind": "property", + "name": "upgradeDescription", + "serializedName": "upgradeDescription", + "doc": "The policy to use when upgrading the cluster.", + "type": { + "$id": "1518", + "kind": "model", + "name": "ManagedClusterUpgradePolicy", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClusterUpgradePolicy", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes the policy used when upgrading the cluster.", + "decorators": [], + "properties": [ + { + "$id": "1519", + "kind": "property", + "name": "forceRestart", + "serializedName": "forceRestart", + "doc": "If true, then processes are forcefully restarted during upgrade even when the code version has not changed (the upgrade only changes configuration or data).", + "type": { + "$id": "1520", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClusterUpgradePolicy.forceRestart", + "serializationOptions": { + "$id": "1521", + "json": { + "$id": "1522", + "name": "forceRestart" + } + } + }, + { + "$id": "1523", + "kind": "property", + "name": "healthPolicy", + "serializedName": "healthPolicy", + "doc": "The cluster health policy defines a health policy used to evaluate the health of the cluster during a cluster upgrade.", + "type": { + "$id": "1524", + "kind": "model", + "name": "ManagedClusterHealthPolicy", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClusterHealthPolicy", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Defines a health policy used to evaluate the health of the cluster or of a cluster node.", + "decorators": [], + "properties": [ + { + "$id": "1525", + "kind": "property", + "name": "maxPercentUnhealthyNodes", + "serializedName": "maxPercentUnhealthyNodes", + "doc": "The maximum allowed percentage of unhealthy nodes before reporting an error. For example, to allow 10% of nodes to be unhealthy, this value would be 10.\n\nThe percentage represents the maximum tolerated percentage of nodes that can be unhealthy before the cluster is considered in error.\nIf the percentage is respected but there is at least one unhealthy node, the health is evaluated as Warning.\nThe percentage is calculated by dividing the number of unhealthy nodes over the total number of nodes in the cluster.\nThe computation rounds up to tolerate one failure on small numbers of nodes. Default percentage is zero.\n\nIn large clusters, some nodes will always be down or out for repairs, so this percentage should be configured to tolerate that.", + "type": { + "$id": "1526", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClusterHealthPolicy.maxPercentUnhealthyNodes", + "serializationOptions": { + "$id": "1527", + "json": { + "$id": "1528", + "name": "maxPercentUnhealthyNodes" + } + } + }, + { + "$id": "1529", + "kind": "property", + "name": "maxPercentUnhealthyApplications", + "serializedName": "maxPercentUnhealthyApplications", + "doc": "The maximum allowed percentage of unhealthy applications before reporting an error. For example, to allow 10% of applications to be unhealthy, this value would be 10.\n\nThe percentage represents the maximum tolerated percentage of applications that can be unhealthy before the cluster is considered in error.\nIf the percentage is respected but there is at least one unhealthy application, the health is evaluated as Warning.\nThis is calculated by dividing the number of unhealthy applications over the total number of application instances in the cluster, excluding applications of application types that are included in the ApplicationTypeHealthPolicyMap.\nThe computation rounds up to tolerate one failure on small numbers of applications. Default percentage is zero.", + "type": { + "$id": "1530", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClusterHealthPolicy.maxPercentUnhealthyApplications", + "serializationOptions": { + "$id": "1531", + "json": { + "$id": "1532", + "name": "maxPercentUnhealthyApplications" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClusterUpgradePolicy.healthPolicy", + "serializationOptions": { + "$id": "1533", + "json": { + "$id": "1534", + "name": "healthPolicy" + } + } + }, + { + "$id": "1535", + "kind": "property", + "name": "deltaHealthPolicy", + "serializedName": "deltaHealthPolicy", + "doc": "The cluster delta health policy defines a health policy used to evaluate the health of the cluster during a cluster upgrade.", + "type": { + "$id": "1536", + "kind": "model", + "name": "ManagedClusterUpgradeDeltaHealthPolicy", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClusterUpgradeDeltaHealthPolicy", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes the delta health policies for the cluster upgrade.", + "decorators": [], + "properties": [ + { + "$id": "1537", + "kind": "property", + "name": "maxPercentDeltaUnhealthyNodes", + "serializedName": "maxPercentDeltaUnhealthyNodes", + "doc": "The maximum allowed percentage of nodes health degradation allowed during cluster upgrades.\nThe delta is measured between the state of the nodes at the beginning of upgrade and the state of the nodes at the time of the health evaluation.\nThe check is performed after every upgrade domain upgrade completion to make sure the global state of the cluster is within tolerated limits.", + "type": { + "$id": "1538", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClusterUpgradeDeltaHealthPolicy.maxPercentDeltaUnhealthyNodes", + "serializationOptions": { + "$id": "1539", + "json": { + "$id": "1540", + "name": "maxPercentDeltaUnhealthyNodes" + } + } + }, + { + "$id": "1541", + "kind": "property", + "name": "maxPercentUpgradeDomainDeltaUnhealthyNodes", + "serializedName": "maxPercentUpgradeDomainDeltaUnhealthyNodes", + "doc": "The maximum allowed percentage of upgrade domain nodes health degradation allowed during cluster upgrades.\nThe delta is measured between the state of the upgrade domain nodes at the beginning of upgrade and the state of the upgrade domain nodes at the time of the health evaluation.\nThe check is performed after every upgrade domain upgrade completion for all completed upgrade domains to make sure the state of the upgrade domains is within tolerated limits.", + "type": { + "$id": "1542", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClusterUpgradeDeltaHealthPolicy.maxPercentUpgradeDomainDeltaUnhealthyNodes", + "serializationOptions": { + "$id": "1543", + "json": { + "$id": "1544", + "name": "maxPercentUpgradeDomainDeltaUnhealthyNodes" + } + } + }, + { + "$id": "1545", + "kind": "property", + "name": "maxPercentDeltaUnhealthyApplications", + "serializedName": "maxPercentDeltaUnhealthyApplications", + "doc": "The maximum allowed percentage of applications health degradation allowed during cluster upgrades.\nThe delta is measured between the state of the applications at the beginning of upgrade and the state of the applications at the time of the health evaluation.\nThe check is performed after every upgrade domain upgrade completion to make sure the global state of the cluster is within tolerated limits. System services are not included in this.\nNOTE: This value will overwrite the value specified in properties.UpgradeDescription.HealthPolicy.MaxPercentUnhealthyApplications", + "type": { + "$id": "1546", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClusterUpgradeDeltaHealthPolicy.maxPercentDeltaUnhealthyApplications", + "serializationOptions": { + "$id": "1547", + "json": { + "$id": "1548", + "name": "maxPercentDeltaUnhealthyApplications" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClusterUpgradePolicy.deltaHealthPolicy", + "serializationOptions": { + "$id": "1549", + "json": { + "$id": "1550", + "name": "deltaHealthPolicy" + } + } + }, + { + "$id": "1551", + "kind": "property", + "name": "monitoringPolicy", + "serializedName": "monitoringPolicy", + "doc": "The cluster monitoring policy describes the parameters for monitoring an upgrade in Monitored mode.", + "type": { + "$id": "1552", + "kind": "model", + "name": "ManagedClusterMonitoringPolicy", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClusterMonitoringPolicy", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes the monitoring policies for the cluster upgrade.", + "decorators": [], + "properties": [ + { + "$id": "1553", + "kind": "property", + "name": "healthCheckWaitDuration", + "serializedName": "healthCheckWaitDuration", + "doc": "The length of time to wait after completing an upgrade domain before performing health checks. The duration can be in either hh:mm:ss or in d.hh:mm:ss.ms format.", + "type": { + "$id": "1554", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClusterMonitoringPolicy.healthCheckWaitDuration", + "serializationOptions": { + "$id": "1555", + "json": { + "$id": "1556", + "name": "healthCheckWaitDuration" + } + } + }, + { + "$id": "1557", + "kind": "property", + "name": "healthCheckStableDuration", + "serializedName": "healthCheckStableDuration", + "doc": "The amount of time that the application or cluster must remain healthy before the upgrade proceeds to the next upgrade domain. The duration can be in either hh:mm:ss or in d.hh:mm:ss.ms format.", + "type": { + "$id": "1558", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClusterMonitoringPolicy.healthCheckStableDuration", + "serializationOptions": { + "$id": "1559", + "json": { + "$id": "1560", + "name": "healthCheckStableDuration" + } + } + }, + { + "$id": "1561", + "kind": "property", + "name": "healthCheckRetryTimeout", + "serializedName": "healthCheckRetryTimeout", + "doc": "The amount of time to retry health evaluation when the application or cluster is unhealthy before the upgrade rolls back. The timeout can be in either hh:mm:ss or in d.hh:mm:ss.ms format.", + "type": { + "$id": "1562", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClusterMonitoringPolicy.healthCheckRetryTimeout", + "serializationOptions": { + "$id": "1563", + "json": { + "$id": "1564", + "name": "healthCheckRetryTimeout" + } + } + }, + { + "$id": "1565", + "kind": "property", + "name": "upgradeTimeout", + "serializedName": "upgradeTimeout", + "doc": "The amount of time the overall upgrade has to complete before the upgrade rolls back. The timeout can be in either hh:mm:ss or in d.hh:mm:ss.ms format.", + "type": { + "$id": "1566", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClusterMonitoringPolicy.upgradeTimeout", + "serializationOptions": { + "$id": "1567", + "json": { + "$id": "1568", + "name": "upgradeTimeout" + } + } + }, + { + "$id": "1569", + "kind": "property", + "name": "upgradeDomainTimeout", + "serializedName": "upgradeDomainTimeout", + "doc": "The amount of time each upgrade domain has to complete before the upgrade rolls back. The timeout can be in either hh:mm:ss or in d.hh:mm:ss.ms format.", + "type": { + "$id": "1570", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClusterMonitoringPolicy.upgradeDomainTimeout", + "serializationOptions": { + "$id": "1571", + "json": { + "$id": "1572", + "name": "upgradeDomainTimeout" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClusterUpgradePolicy.monitoringPolicy", + "serializationOptions": { + "$id": "1573", + "json": { + "$id": "1574", + "name": "monitoringPolicy" + } + } + }, + { + "$id": "1575", + "kind": "property", + "name": "upgradeReplicaSetCheckTimeout", + "serializedName": "upgradeReplicaSetCheckTimeout", + "doc": "The maximum amount of time to block processing of an upgrade domain and prevent loss of availability when there are unexpected issues.\nWhen this timeout expires, processing of the upgrade domain will proceed regardless of availability loss issues.\nThe timeout is reset at the start of each upgrade domain. The timeout can be in either hh:mm:ss or in d.hh:mm:ss.ms format.\nThis value must be between 00:00:00 and 49710.06:28:15 (unsigned 32 bit integer for seconds)", + "type": { + "$id": "1576", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ClusterUpgradePolicy.upgradeReplicaSetCheckTimeout", + "serializationOptions": { + "$id": "1577", + "json": { + "$id": "1578", + "name": "upgradeReplicaSetCheckTimeout" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.upgradeDescription", + "serializationOptions": { + "$id": "1579", + "json": { + "$id": "1580", + "name": "upgradeDescription" + } + } + }, + { + "$id": "1581", + "kind": "property", + "name": "httpGatewayTokenAuthConnectionPort", + "serializedName": "httpGatewayTokenAuthConnectionPort", + "doc": "The port used for token-auth based HTTPS connections to the cluster. Cannot be set to the same port as HttpGatewayEndpoint.", + "type": { + "$id": "1582", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.httpGatewayTokenAuthConnectionPort", + "serializationOptions": { + "$id": "1583", + "json": { + "$id": "1584", + "name": "httpGatewayTokenAuthConnectionPort" + } + } + }, + { + "$id": "1585", + "kind": "property", + "name": "IsHttpGatewayExclusiveAuthModeEnabled", + "serializedName": "enableHttpGatewayExclusiveAuthMode", + "doc": "If true, token-based authentication is not allowed on the HttpGatewayEndpoint. This is required to support TLS versions 1.3 and above. If token-based authentication is used, HttpGatewayTokenAuthConnectionPort must be defined.", + "type": { + "$id": "1586", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.enableHttpGatewayExclusiveAuthMode", + "serializationOptions": { + "$id": "1587", + "json": { + "$id": "1588", + "name": "enableHttpGatewayExclusiveAuthMode" + } + } + }, + { + "$id": "1589", + "kind": "property", + "name": "autoGeneratedDomainNameLabelScope", + "serializedName": "autoGeneratedDomainNameLabelScope", + "doc": "This property is the entry point to using a public CA cert for your cluster cert. It specifies the level of reuse allowed for the custom FQDN created, matching the subject of the public CA cert.", + "type": { + "$ref": "238" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.autoGeneratedDomainNameLabelScope", + "serializationOptions": { + "$id": "1590", + "json": { + "$id": "1591", + "name": "autoGeneratedDomainNameLabelScope" + } + } + }, + { + "$id": "1592", + "kind": "property", + "name": "allocatedOutboundPorts", + "serializedName": "allocatedOutboundPorts", + "doc": "The number of outbound ports allocated for SNAT for each node in the backend pool of the default load balancer. The default value is 0 which provides dynamic port allocation based on pool size.", + "type": { + "$id": "1593", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.allocatedOutboundPorts", + "serializationOptions": { + "$id": "1594", + "json": { + "$id": "1595", + "name": "allocatedOutboundPorts" + } + } + }, + { + "$id": "1596", + "kind": "property", + "name": "VMImage", + "serializedName": "VMImage", + "doc": "The VM image the node types are configured with. This property controls the Service Fabric component packages to be used for the cluster. Allowed values are: 'Windows'. The default value is 'Windows'.", + "type": { + "$id": "1597", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterProperties.VMImage", + "serializationOptions": { + "$id": "1598", + "json": { + "$id": "1599", + "name": "VMImage" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": true, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedCluster.properties", + "serializationOptions": { + "$id": "1600", + "json": { + "$id": "1601", + "name": "properties" + } + } + }, + { + "$id": "1602", + "kind": "path", + "name": "name", + "serializedName": "name", + "doc": "The name of the cluster resource.", + "type": { + "$id": "1603", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedCluster.name", + "discriminator": false, + "flatten": false + }, + { + "$id": "1604", + "kind": "property", + "name": "etag", + "serializedName": "etag", + "doc": "If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.\",", + "type": { + "$id": "1605", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedCluster.etag", + "serializationOptions": { + "$id": "1606", + "json": { + "$id": "1607", + "name": "etag" + } + } + }, + { + "$id": "1608", + "kind": "property", + "name": "sku", + "serializedName": "sku", + "doc": "The sku of the managed cluster", + "type": { + "$id": "1609", + "kind": "model", + "name": "Sku", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Sku", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Service Fabric managed cluster Sku definition", + "decorators": [], + "properties": [ + { + "$id": "1610", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "Sku Name.", + "type": { + "$ref": "248" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Sku.name", + "serializationOptions": { + "$id": "1611", + "json": { + "$id": "1612", + "name": "name" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedCluster.sku", + "serializationOptions": { + "$id": "1613", + "json": { + "$id": "1614", + "name": "sku" + } + } + } + ] + }, + { + "$ref": "1194" + }, + { + "$ref": "1239" + }, + { + "$ref": "1274" + }, + { + "$ref": "1336" + }, + { + "$ref": "1356" + }, + { + "$ref": "1374" + }, + { + "$ref": "1381" + }, + { + "$ref": "1420" + }, + { + "$ref": "1437" + }, + { + "$ref": "1459" + }, + { + "$ref": "1483" + }, + { + "$ref": "1518" + }, + { + "$ref": "1524" + }, + { + "$ref": "1536" + }, + { + "$ref": "1552" + }, + { + "$ref": "1609" + }, + { + "$ref": "1182" + }, + { + "$id": "1615", + "kind": "model", + "name": "ManagedClusterUpdateParameters", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterUpdateParameters", + "usage": "Input,Json", + "doc": "Managed cluster update request", + "decorators": [], + "properties": [ + { + "$id": "1616", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Managed cluster update parameters", + "type": { + "$id": "1617", + "kind": "dict", + "keyType": { + "$id": "1618", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1619", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterUpdateParameters.tags", + "serializationOptions": { + "$id": "1620", + "json": { + "$id": "1621", + "name": "tags" + } + } + } + ] + }, + { + "$id": "1622", + "kind": "model", + "name": "ManagedClusterListResult", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult", + "usage": "Output,Json", + "doc": "The response of a ManagedCluster list operation.", + "decorators": [], + "properties": [ + { + "$id": "1623", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The ManagedCluster items on this page", + "type": { + "$id": "1624", + "kind": "array", + "name": "ArrayManagedCluster", + "valueType": { + "$ref": "1181" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", + "serializationOptions": { + "$id": "1625", + "json": { + "$id": "1626", + "name": "value" + } + } + }, + { + "$id": "1627", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "1628", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "1629", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.nextLink", + "serializationOptions": { + "$id": "1630", + "json": { + "$id": "1631", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "1632", + "kind": "model", + "name": "FaultSimulationIdContent", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FaultSimulationIdContent", + "usage": "Input,Json", + "doc": "Parameters for Fault Simulation id.", + "decorators": [], + "properties": [ + { + "$id": "1633", + "kind": "property", + "name": "simulationId", + "serializedName": "simulationId", + "doc": "unique identifier for the fault simulation.", + "type": { + "$id": "1634", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FaultSimulationIdContent.simulationId", + "serializationOptions": { + "$id": "1635", + "json": { + "$id": "1636", + "name": "simulationId" + } + } + } + ] + }, + { + "$id": "1637", + "kind": "model", + "name": "FaultSimulation", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FaultSimulation", + "usage": "Output,Json,LroFinalEnvelope", + "doc": "Fault simulation object with status.", + "decorators": [], + "properties": [ + { + "$id": "1638", + "kind": "property", + "name": "simulationId", + "serializedName": "simulationId", + "doc": "unique identifier for the fault simulation.", + "type": { + "$id": "1639", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FaultSimulation.simulationId", + "serializationOptions": { + "$id": "1640", + "json": { + "$id": "1641", + "name": "simulationId" + } + } + }, + { + "$id": "1642", + "kind": "property", + "name": "status", + "serializedName": "status", + "doc": "Fault simulation status", + "type": { + "$ref": "254" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FaultSimulation.status", + "serializationOptions": { + "$id": "1643", + "json": { + "$id": "1644", + "name": "status" + } + } + }, + { + "$id": "1645", + "kind": "property", + "name": "startTime", + "serializedName": "startTime", + "doc": "The start time of the fault simulation.", + "type": { + "$id": "1646", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "1647", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FaultSimulation.startTime", + "serializationOptions": { + "$id": "1648", + "json": { + "$id": "1649", + "name": "startTime" + } + } + }, + { + "$id": "1650", + "kind": "property", + "name": "endTime", + "serializedName": "endTime", + "doc": "The end time of the fault simulation.", + "type": { + "$id": "1651", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "1652", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FaultSimulation.endTime", + "serializationOptions": { + "$id": "1653", + "json": { + "$id": "1654", + "name": "endTime" + } + } + }, + { + "$id": "1655", + "kind": "property", + "name": "details", + "serializedName": "details", + "doc": "Fault simulation details", + "type": { + "$id": "1656", + "kind": "model", + "name": "FaultSimulationDetails", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FaultSimulationDetails", + "usage": "Output,Json,LroFinalEnvelope", + "doc": "Details for Fault Simulation.", + "decorators": [], + "properties": [ + { + "$id": "1657", + "kind": "property", + "name": "clusterId", + "serializedName": "clusterId", + "doc": "unique identifier for the cluster resource.", + "type": { + "$id": "1658", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FaultSimulationDetails.clusterId", + "serializationOptions": { + "$id": "1659", + "json": { + "$id": "1660", + "name": "clusterId" + } + } + }, + { + "$id": "1661", + "kind": "property", + "name": "operationId", + "serializedName": "operationId", + "doc": "unique identifier for the operation associated with the fault simulation.", + "type": { + "$id": "1662", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FaultSimulationDetails.operationId", + "serializationOptions": { + "$id": "1663", + "json": { + "$id": "1664", + "name": "operationId" + } + } + }, + { + "$id": "1665", + "kind": "property", + "name": "nodeTypeFaultSimulation", + "serializedName": "nodeTypeFaultSimulation", + "doc": "List of node type simulations associated with the cluster fault simulation.", + "type": { + "$id": "1666", + "kind": "array", + "name": "ArrayNodeTypeFaultSimulation", + "valueType": { + "$id": "1667", + "kind": "model", + "name": "NodeTypeFaultSimulation", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeFaultSimulation", + "usage": "Output,Json,LroFinalEnvelope", + "doc": "Node type fault simulation object with status.", + "decorators": [], + "properties": [ + { + "$id": "1668", + "kind": "property", + "name": "nodeTypeName", + "serializedName": "nodeTypeName", + "doc": "Node type name.", + "type": { + "$id": "1669", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeFaultSimulation.nodeTypeName", + "serializationOptions": { + "$id": "1670", + "json": { + "$id": "1671", + "name": "nodeTypeName" + } + } + }, + { + "$id": "1672", + "kind": "property", + "name": "status", + "serializedName": "status", + "doc": "Fault simulation status", + "type": { + "$ref": "254" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeFaultSimulation.status", + "serializationOptions": { + "$id": "1673", + "json": { + "$id": "1674", + "name": "status" + } + } + }, + { + "$id": "1675", + "kind": "property", + "name": "operationId", + "serializedName": "operationId", + "doc": "Current or latest asynchronous operation identifier on the node type.", + "type": { + "$id": "1676", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeFaultSimulation.operationId", + "serializationOptions": { + "$id": "1677", + "json": { + "$id": "1678", + "name": "operationId" + } + } + }, + { + "$id": "1679", + "kind": "property", + "name": "operationStatus", + "serializedName": "operationStatus", + "doc": "Current or latest asynchronous operation status on the node type", + "type": { + "$ref": "268" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeFaultSimulation.operationStatus", + "serializationOptions": { + "$id": "1680", + "json": { + "$id": "1681", + "name": "operationStatus" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FaultSimulationDetails.nodeTypeFaultSimulation", + "serializationOptions": { + "$id": "1682", + "json": { + "$id": "1683", + "name": "nodeTypeFaultSimulation" + } + } + }, + { + "$id": "1684", + "kind": "property", + "name": "parameters", + "serializedName": "parameters", + "doc": "Fault simulation parameters.", + "type": { + "$id": "1685", + "kind": "model", + "name": "FaultSimulationContent", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FaultSimulationContent", + "usage": "Input,Output,Json,LroFinalEnvelope", + "doc": "Parameters for Fault Simulation action.", + "decorators": [], + "discriminatorProperty": { + "$id": "1686", + "kind": "property", + "name": "faultKind", + "serializedName": "faultKind", + "doc": "The kind of fault to be simulated.", + "type": { + "$ref": "282" + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FaultSimulationContent.faultKind", + "serializationOptions": { + "$id": "1687", + "json": { + "$id": "1688", + "name": "faultKind" + } + } + }, + "properties": [ + { + "$ref": "1686" + }, + { + "$id": "1689", + "kind": "property", + "name": "force", + "serializedName": "force", + "doc": "Force the action to go through without any check on the cluster.", + "type": { + "$id": "1690", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FaultSimulationContent.force", + "serializationOptions": { + "$id": "1691", + "json": { + "$id": "1692", + "name": "force" + } + } + }, + { + "$id": "1693", + "kind": "property", + "name": "constraints", + "serializedName": "constraints", + "doc": "Constraints for Fault Simulation action.", + "type": { + "$id": "1694", + "kind": "model", + "name": "FaultSimulationConstraints", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FaultSimulationConstraints", + "usage": "Input,Output,Json,LroFinalEnvelope", + "doc": "Constraints for Fault Simulation action.", + "decorators": [], + "properties": [ + { + "$id": "1695", + "kind": "property", + "name": "expirationTime", + "serializedName": "expirationTime", + "doc": "The absolute expiration timestamp (UTC) after which this fault simulation should be stopped if it's still active.", + "type": { + "$id": "1696", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "1697", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FaultSimulationConstraints.expirationTime", + "serializationOptions": { + "$id": "1698", + "json": { + "$id": "1699", + "name": "expirationTime" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FaultSimulationContent.constraints", + "serializationOptions": { + "$id": "1700", + "json": { + "$id": "1701", + "name": "constraints" + } + } + } + ], + "discriminatedSubtypes": { + "$id": "1702", + "Zone": { + "$id": "1703", + "kind": "model", + "name": "ZoneFaultSimulationContent", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ZoneFaultSimulationContent", + "usage": "Input,Output,Json,LroFinalEnvelope", + "doc": "Parameters for Zone Fault Simulation action.", + "discriminatorValue": "Zone", + "decorators": [], + "baseModel": { + "$ref": "1685" + }, + "properties": [ + { + "$id": "1704", + "kind": "property", + "name": "zones", + "serializedName": "zones", + "doc": "Indicates the zones of the fault simulation.", + "type": { + "$id": "1705", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1706", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ZoneFaultSimulationContent.zones", + "serializationOptions": { + "$id": "1707", + "json": { + "$id": "1708", + "name": "zones" + } + } + }, + { + "$id": "1709", + "kind": "property", + "name": "faultKind", + "serializedName": "faultKind", + "doc": "The kind of fault simulation.", + "type": { + "$id": "1710", + "kind": "constant", + "valueType": { + "$id": "1711", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "Zone", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ZoneFaultSimulationContent.faultKind", + "serializationOptions": { + "$id": "1712", + "json": { + "$id": "1713", + "name": "faultKind" + } + } + } + ] + } + } + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FaultSimulationDetails.parameters", + "serializationOptions": { + "$id": "1714", + "json": { + "$id": "1715", + "name": "parameters" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FaultSimulation.details", + "serializationOptions": { + "$id": "1716", + "json": { + "$id": "1717", + "name": "details" + } + } + } + ] + }, + { + "$ref": "1656" + }, + { + "$ref": "1667" + }, + { + "$ref": "1685" + }, + { + "$ref": "1694" + }, + { + "$ref": "1703" + }, + { + "$id": "1718", + "kind": "model", + "name": "FaultSimulationListResult", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FaultSimulationListResult", + "usage": "Output,Json", + "doc": "Fault simulation list results", + "decorators": [], + "properties": [ + { + "$id": "1719", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The FaultSimulation items on this page", + "type": { + "$id": "1720", + "kind": "array", + "name": "ArrayFaultSimulation", + "valueType": { + "$ref": "1637" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FaultSimulationListResult.value", + "serializationOptions": { + "$id": "1721", + "json": { + "$id": "1722", + "name": "value" + } + } + }, + { + "$id": "1723", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "1724", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "1725", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FaultSimulationListResult.nextLink", + "serializationOptions": { + "$id": "1726", + "json": { + "$id": "1727", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "1728", + "kind": "model", + "name": "FaultSimulationContentWrapper", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FaultSimulationContentWrapper", + "usage": "Input,Json", + "doc": "Fault Simulation Request for Start action.", + "decorators": [], + "properties": [ + { + "$id": "1729", + "kind": "property", + "name": "parameters", + "serializedName": "parameters", + "doc": "Parameters for Fault Simulation start action.", + "type": { + "$ref": "1685" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FaultSimulationContentWrapper.parameters", + "serializationOptions": { + "$id": "1730", + "json": { + "$id": "1731", + "name": "parameters" + } + } + } + ] + }, + { + "$id": "1732", + "kind": "model", + "name": "ManagedAzResiliencyStatus", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedAzResiliencyStatusContent", + "usage": "Output,Json", + "doc": "Describes the result of the request to list Managed VM Sizes for Service Fabric Managed Clusters.", + "decorators": [], + "properties": [ + { + "$id": "1733", + "kind": "property", + "name": "baseResourceStatus", + "serializedName": "baseResourceStatus", + "doc": "List of Managed VM Sizes for Service Fabric Managed Clusters.", + "type": { + "$id": "1734", + "kind": "array", + "name": "ArrayResourceAzStatus", + "valueType": { + "$id": "1735", + "kind": "model", + "name": "ResourceAzStatus", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ResourceAzStatus", + "usage": "Output,Json", + "doc": "Describes Az Resiliency status of Base resources", + "decorators": [], + "properties": [ + { + "$id": "1736", + "kind": "property", + "name": "resourceName", + "serializedName": "resourceName", + "doc": "VM Size properties.", + "type": { + "$id": "1737", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ResourceAzStatus.resourceName", + "serializationOptions": { + "$id": "1738", + "json": { + "$id": "1739", + "name": "resourceName" + } + } + }, + { + "$id": "1740", + "kind": "property", + "name": "-|resource-type", + "serializedName": "resourceType", + "doc": "VM Size id.", + "type": { + "$id": "1741", + "kind": "string", + "name": "armResourceType", + "crossLanguageDefinitionId": "Azure.Core.armResourceType", + "baseType": { + "$id": "1742", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ResourceAzStatus.resourceType", + "serializationOptions": { + "$id": "1743", + "json": { + "$id": "1744", + "name": "resourceType" + } + } + }, + { + "$id": "1745", + "kind": "property", + "name": "isZoneResilient", + "serializedName": "isZoneResilient", + "doc": "VM Size name.", + "type": { + "$id": "1746", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ResourceAzStatus.isZoneResilient", + "serializationOptions": { + "$id": "1747", + "json": { + "$id": "1748", + "name": "isZoneResilient" + } + } + }, + { + "$id": "1749", + "kind": "property", + "name": "details", + "serializedName": "details", + "doc": "Zone resiliency status details for the resource.", + "type": { + "$id": "1750", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ResourceAzStatus.details", + "serializationOptions": { + "$id": "1751", + "json": { + "$id": "1752", + "name": "details" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedAzResiliencyStatusContent.baseResourceStatus", + "serializationOptions": { + "$id": "1753", + "json": { + "$id": "1754", + "name": "baseResourceStatus" + } + } + }, + { + "$id": "1755", + "kind": "property", + "name": "isClusterZoneResilient", + "serializedName": "isClusterZoneResilient", + "doc": "URL to get the next set of Managed VM Sizes if there are any.", + "type": { + "$id": "1756", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedAzResiliencyStatusContent.isClusterZoneResilient", + "serializationOptions": { + "$id": "1757", + "json": { + "$id": "1758", + "name": "isClusterZoneResilient" + } + } + } + ] + }, + { + "$ref": "1735" + }, + { + "$id": "1759", + "kind": "model", + "name": "ManagedMaintenanceWindowStatus", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedMaintenanceWindowStatusContent", + "usage": "Output,Json", + "doc": "Describes the maintenance window status of the Service Fabric Managed Cluster.", + "decorators": [], + "properties": [ + { + "$id": "1760", + "kind": "property", + "name": "isWindowEnabled", + "serializedName": "isWindowEnabled", + "doc": "If maintenance window is enabled on this cluster.", + "type": { + "$id": "1761", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedMaintenanceWindowStatusContent.isWindowEnabled", + "serializationOptions": { + "$id": "1762", + "json": { + "$id": "1763", + "name": "isWindowEnabled" + } + } + }, + { + "$id": "1764", + "kind": "property", + "name": "isRegionReady", + "serializedName": "isRegionReady", + "doc": "Indicates if the region is ready to configure maintenance windows.", + "type": { + "$id": "1765", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedMaintenanceWindowStatusContent.isRegionReady", + "serializationOptions": { + "$id": "1766", + "json": { + "$id": "1767", + "name": "isRegionReady" + } + } + }, + { + "$id": "1768", + "kind": "property", + "name": "isWindowActive", + "serializedName": "isWindowActive", + "doc": "If maintenance window is active.", + "type": { + "$id": "1769", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedMaintenanceWindowStatusContent.isWindowActive", + "serializationOptions": { + "$id": "1770", + "json": { + "$id": "1771", + "name": "isWindowActive" + } + } + }, + { + "$id": "1772", + "kind": "property", + "name": "canApplyUpdates", + "serializedName": "canApplyUpdates", + "doc": "If updates can be applied.", + "type": { + "$id": "1773", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedMaintenanceWindowStatusContent.canApplyUpdates", + "serializationOptions": { + "$id": "1774", + "json": { + "$id": "1775", + "name": "canApplyUpdates" + } + } + }, + { + "$id": "1776", + "kind": "property", + "name": "LastWindowStatusUpdatedOn", + "serializedName": "lastWindowStatusUpdateAtUTC", + "doc": "Last window update time in UTC.", + "type": { + "$id": "1777", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "1778", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedMaintenanceWindowStatusContent.lastWindowStatusUpdateAtUTC", + "serializationOptions": { + "$id": "1779", + "json": { + "$id": "1780", + "name": "lastWindowStatusUpdateAtUTC" + } + } + }, + { + "$id": "1781", + "kind": "property", + "name": "LastWindowStartOn", + "serializedName": "lastWindowStartTimeUTC", + "doc": "Last window start time in UTC.", + "type": { + "$id": "1782", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "1783", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedMaintenanceWindowStatusContent.lastWindowStartTimeUTC", + "serializationOptions": { + "$id": "1784", + "json": { + "$id": "1785", + "name": "lastWindowStartTimeUTC" + } + } + }, + { + "$id": "1786", + "kind": "property", + "name": "LastWindowEndOn", + "serializedName": "lastWindowEndTimeUTC", + "doc": "Last window end time in UTC.", + "type": { + "$id": "1787", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "1788", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedMaintenanceWindowStatusContent.lastWindowEndTimeUTC", + "serializationOptions": { + "$id": "1789", + "json": { + "$id": "1790", + "name": "lastWindowEndTimeUTC" + } + } + } + ] + }, + { + "$id": "1791", + "kind": "model", + "name": "ServiceFabricManagedNodeType", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeType", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes a node type in the cluster, each node type represents sub set of nodes in the cluster.", + "decorators": [], + "baseModel": { + "$ref": "442" + }, + "properties": [ + { + "$id": "1792", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The node type properties", + "type": { + "$id": "1793", + "kind": "model", + "name": "NodeTypeProperties", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes a node type in the cluster, each node type represents sub set of nodes in the cluster.", + "decorators": [], + "properties": [ + { + "$id": "1794", + "kind": "property", + "name": "isPrimary", + "serializedName": "isPrimary", + "doc": "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.", + "type": { + "$id": "1795", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.isPrimary", + "serializationOptions": { + "$id": "1796", + "json": { + "$id": "1797", + "name": "isPrimary" + } + } + }, + { + "$id": "1798", + "kind": "property", + "name": "vmInstanceCount", + "serializedName": "vmInstanceCount", + "doc": "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.", + "type": { + "$id": "1799", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.vmInstanceCount", + "serializationOptions": { + "$id": "1800", + "json": { + "$id": "1801", + "name": "vmInstanceCount" + } + } + }, + { + "$id": "1802", + "kind": "property", + "name": "DataDiskSizeInGB", + "serializedName": "dataDiskSizeGB", + "doc": "Disk size for the managed disk attached to the vms on the node type in GBs.", + "type": { + "$id": "1803", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.dataDiskSizeGB", + "serializationOptions": { + "$id": "1804", + "json": { + "$id": "1805", + "name": "dataDiskSizeGB" + } + } + }, + { + "$id": "1806", + "kind": "property", + "name": "dataDiskType", + "serializedName": "dataDiskType", + "doc": "Managed data disk type. Specifies the storage account type for the managed disk", + "type": { + "$ref": "286" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.dataDiskType", + "serializationOptions": { + "$id": "1807", + "json": { + "$id": "1808", + "name": "dataDiskType" + } + } + }, + { + "$id": "1809", + "kind": "property", + "name": "dataDiskLetter", + "serializedName": "dataDiskLetter", + "doc": "Managed data disk letter. It can not use the reserved letter C or D and it can not change after created.", + "type": { + "$id": "1810", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.dataDiskLetter", + "serializationOptions": { + "$id": "1811", + "json": { + "$id": "1812", + "name": "dataDiskLetter" + } + } + }, + { + "$id": "1813", + "kind": "property", + "name": "placementProperties", + "serializedName": "placementProperties", + "doc": "The placement tags applied to nodes in the node type, which can be used to indicate where certain services (workload) should run.", + "type": { + "$id": "1814", + "kind": "dict", + "keyType": { + "$id": "1815", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1816", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.placementProperties", + "serializationOptions": { + "$id": "1817", + "json": { + "$id": "1818", + "name": "placementProperties" + } + } + }, + { + "$id": "1819", + "kind": "property", + "name": "capacities", + "serializedName": "capacities", + "doc": "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.", + "type": { + "$id": "1820", + "kind": "dict", + "keyType": { + "$id": "1821", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "1822", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.capacities", + "serializationOptions": { + "$id": "1823", + "json": { + "$id": "1824", + "name": "capacities" + } + } + }, + { + "$id": "1825", + "kind": "property", + "name": "applicationPorts", + "serializedName": "applicationPorts", + "doc": "The range of ports from which cluster assigned port to Service Fabric applications.", + "type": { + "$id": "1826", + "kind": "model", + "name": "EndpointRangeDescription", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.EndpointRangeDescription", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Port range details", + "decorators": [], + "properties": [ + { + "$id": "1827", + "kind": "property", + "name": "startPort", + "serializedName": "startPort", + "doc": "Starting port of a range of ports", + "type": { + "$id": "1828", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.EndpointRangeDescription.startPort", + "serializationOptions": { + "$id": "1829", + "json": { + "$id": "1830", + "name": "startPort" + } + } + }, + { + "$id": "1831", + "kind": "property", + "name": "endPort", + "serializedName": "endPort", + "doc": "End port of a range of ports", + "type": { + "$id": "1832", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.EndpointRangeDescription.endPort", + "serializationOptions": { + "$id": "1833", + "json": { + "$id": "1834", + "name": "endPort" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.applicationPorts", + "serializationOptions": { + "$id": "1835", + "json": { + "$id": "1836", + "name": "applicationPorts" + } + } + }, + { + "$id": "1837", + "kind": "property", + "name": "ephemeralPorts", + "serializedName": "ephemeralPorts", + "doc": "The range of ephemeral ports that nodes in this node type should be configured with.", + "type": { + "$ref": "1826" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.ephemeralPorts", + "serializationOptions": { + "$id": "1838", + "json": { + "$id": "1839", + "name": "ephemeralPorts" + } + } + }, + { + "$id": "1840", + "kind": "property", + "name": "vmSize", + "serializedName": "vmSize", + "doc": "The size of virtual machines in the pool. All virtual machines in a pool are the same size. For example, Standard_D3.", + "type": { + "$id": "1841", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.vmSize", + "serializationOptions": { + "$id": "1842", + "json": { + "$id": "1843", + "name": "vmSize" + } + } + }, + { + "$id": "1844", + "kind": "property", + "name": "vmImagePublisher", + "serializedName": "vmImagePublisher", + "doc": "The publisher of the Azure Virtual Machines Marketplace image. For example, Canonical or MicrosoftWindowsServer.", + "type": { + "$id": "1845", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.vmImagePublisher", + "serializationOptions": { + "$id": "1846", + "json": { + "$id": "1847", + "name": "vmImagePublisher" + } + } + }, + { + "$id": "1848", + "kind": "property", + "name": "vmImageOffer", + "serializedName": "vmImageOffer", + "doc": "The offer type of the Azure Virtual Machines Marketplace image. For example, UbuntuServer or WindowsServer.", + "type": { + "$id": "1849", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.vmImageOffer", + "serializationOptions": { + "$id": "1850", + "json": { + "$id": "1851", + "name": "vmImageOffer" + } + } + }, + { + "$id": "1852", + "kind": "property", + "name": "vmImageSku", + "serializedName": "vmImageSku", + "doc": "The SKU of the Azure Virtual Machines Marketplace image. For example, 14.04.0-LTS or 2012-R2-Datacenter.", + "type": { + "$id": "1853", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.vmImageSku", + "serializationOptions": { + "$id": "1854", + "json": { + "$id": "1855", + "name": "vmImageSku" + } + } + }, + { + "$id": "1856", + "kind": "property", + "name": "vmImageVersion", + "serializedName": "vmImageVersion", + "doc": "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'.", + "type": { + "$id": "1857", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.vmImageVersion", + "serializationOptions": { + "$id": "1858", + "json": { + "$id": "1859", + "name": "vmImageVersion" + } + } + }, + { + "$id": "1860", + "kind": "property", + "name": "vmSecrets", + "serializedName": "vmSecrets", + "doc": "The secrets to install in the virtual machines.", + "type": { + "$id": "1861", + "kind": "array", + "name": "ArrayVaultSecretGroup", + "valueType": { + "$id": "1862", + "kind": "model", + "name": "NodeTypeVaultSecretGroup", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VaultSecretGroup", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Specifies set of certificates that should be installed onto the virtual machines.", + "decorators": [], + "properties": [ + { + "$id": "1863", + "kind": "property", + "name": "sourceVault", + "serializedName": "sourceVault", + "doc": "The relative URL of the Key Vault containing all of the certificates in VaultCertificates.", + "type": { + "$id": "1864", + "kind": "model", + "name": "SubResource", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.SubResource", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Azure resource identifier.", + "decorators": [], + "properties": [ + { + "$id": "1865", + "kind": "property", + "name": "id", + "serializedName": "id", + "doc": "Azure resource identifier.", + "type": { + "$id": "1866", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.SubResource.id", + "serializationOptions": { + "$id": "1867", + "json": { + "$id": "1868", + "name": "id" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VaultSecretGroup.sourceVault", + "serializationOptions": { + "$id": "1869", + "json": { + "$id": "1870", + "name": "sourceVault" + } + } + }, + { + "$id": "1871", + "kind": "property", + "name": "vaultCertificates", + "serializedName": "vaultCertificates", + "doc": "The list of key vault references in SourceVault which contain certificates.", + "type": { + "$id": "1872", + "kind": "array", + "name": "ArrayVaultCertificate", + "valueType": { + "$id": "1873", + "kind": "model", + "name": "NodeTypeVaultCertificate", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VaultCertificate", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes a single certificate reference in a Key Vault, and where the certificate should reside on the VM.", + "decorators": [], + "properties": [ + { + "$id": "1874", + "kind": "property", + "name": "certificateUrl", + "serializedName": "certificateUrl", + "doc": "This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see [Add a key or secret to the key vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add).", + "type": { + "$id": "1875", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VaultCertificate.certificateUrl", + "serializationOptions": { + "$id": "1876", + "json": { + "$id": "1877", + "name": "certificateUrl" + } + } + }, + { + "$id": "1878", + "kind": "property", + "name": "certificateStore", + "serializedName": "certificateStore", + "doc": "For Windows VMs, specifies the certificate store on the Virtual Machine to which the certificate should be added. The specified certificate store is implicitly in the LocalMachine account. For Linux VMs, the certificate file is placed under the /var/lib/waagent directory, with the file name {UppercaseThumbprint}.crt for the X509 certificate file and {UppercaseThumbprint}.prv for private key. Both of these files are .pem formatted.", + "type": { + "$id": "1879", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VaultCertificate.certificateStore", + "serializationOptions": { + "$id": "1880", + "json": { + "$id": "1881", + "name": "certificateStore" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VaultSecretGroup.vaultCertificates", + "serializationOptions": { + "$id": "1882", + "json": { + "$id": "1883", + "name": "vaultCertificates" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.vmSecrets", + "serializationOptions": { + "$id": "1884", + "json": { + "$id": "1885", + "name": "vmSecrets" + } + } + }, + { + "$id": "1886", + "kind": "property", + "name": "vmExtensions", + "serializedName": "vmExtensions", + "doc": "Set of extensions that should be installed onto the virtual machines.", + "type": { + "$id": "1887", + "kind": "array", + "name": "ArrayVmssExtension", + "valueType": { + "$id": "1888", + "kind": "model", + "name": "NodeTypeVmssExtension", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VMSSExtension", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Specifies set of extensions that should be installed onto the virtual machines.", + "decorators": [], + "properties": [ + { + "$id": "1889", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the extension.", + "type": { + "$id": "1890", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VMSSExtension.name", + "serializationOptions": { + "$id": "1891", + "json": { + "$id": "1892", + "name": "name" + } + } + }, + { + "$id": "1893", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "Describes the properties of a Virtual Machine Scale Set Extension.", + "type": { + "$id": "1894", + "kind": "model", + "name": "VmssExtensionProperties", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VMSSExtensionProperties", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes the properties of a Virtual Machine Scale Set Extension.", + "decorators": [], + "properties": [ + { + "$id": "1895", + "kind": "property", + "name": "publisher", + "serializedName": "publisher", + "doc": "The name of the extension handler publisher.", + "type": { + "$id": "1896", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VMSSExtensionProperties.publisher", + "serializationOptions": { + "$id": "1897", + "json": { + "$id": "1898", + "name": "publisher" + } + } + }, + { + "$id": "1899", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "Specifies the type of the extension; an example is \"CustomScriptExtension\".", + "type": { + "$id": "1900", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VMSSExtensionProperties.type", + "serializationOptions": { + "$id": "1901", + "json": { + "$id": "1902", + "name": "type" + } + } + }, + { + "$id": "1903", + "kind": "property", + "name": "typeHandlerVersion", + "serializedName": "typeHandlerVersion", + "doc": "Specifies the version of the script handler.", + "type": { + "$id": "1904", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VMSSExtensionProperties.typeHandlerVersion", + "serializationOptions": { + "$id": "1905", + "json": { + "$id": "1906", + "name": "typeHandlerVersion" + } + } + }, + { + "$id": "1907", + "kind": "property", + "name": "autoUpgradeMinorVersion", + "serializedName": "autoUpgradeMinorVersion", + "doc": "Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true.", + "type": { + "$id": "1908", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VMSSExtensionProperties.autoUpgradeMinorVersion", + "serializationOptions": { + "$id": "1909", + "json": { + "$id": "1910", + "name": "autoUpgradeMinorVersion" + } + } + }, + { + "$id": "1911", + "kind": "property", + "name": "settings", + "serializedName": "settings", + "doc": "Json formatted public settings for the extension.", + "type": { + "$id": "1912", + "kind": "model", + "name": "VMSSExtensionPropertiesSettings", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VMSSExtensionProperties.settings.anonymous", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [], + "properties": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VMSSExtensionProperties.settings", + "serializationOptions": { + "$id": "1913", + "json": { + "$id": "1914", + "name": "settings" + } + } + }, + { + "$id": "1915", + "kind": "property", + "name": "protectedSettings", + "serializedName": "protectedSettings", + "doc": "The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all.", + "type": { + "$id": "1916", + "kind": "model", + "name": "VMSSExtensionPropertiesProtectedSettings", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VMSSExtensionProperties.protectedSettings.anonymous", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [], + "properties": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VMSSExtensionProperties.protectedSettings", + "serializationOptions": { + "$id": "1917", + "json": { + "$id": "1918", + "name": "protectedSettings" + } + } + }, + { + "$id": "1919", + "kind": "property", + "name": "forceUpdateTag", + "serializedName": "forceUpdateTag", + "doc": "If a value is provided and is different from the previous value, the extension handler will be forced to update even if the extension configuration has not changed.", + "type": { + "$id": "1920", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VMSSExtensionProperties.forceUpdateTag", + "serializationOptions": { + "$id": "1921", + "json": { + "$id": "1922", + "name": "forceUpdateTag" + } + } + }, + { + "$id": "1923", + "kind": "property", + "name": "provisionAfterExtensions", + "serializedName": "provisionAfterExtensions", + "doc": "Collection of extension names after which this extension needs to be provisioned.", + "type": { + "$id": "1924", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1925", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VMSSExtensionProperties.provisionAfterExtensions", + "serializationOptions": { + "$id": "1926", + "json": { + "$id": "1927", + "name": "provisionAfterExtensions" + } + } + }, + { + "$id": "1928", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "The provisioning state, which only appears in the response.", + "type": { + "$id": "1929", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VMSSExtensionProperties.provisioningState", + "serializationOptions": { + "$id": "1930", + "json": { + "$id": "1931", + "name": "provisioningState" + } + } + }, + { + "$id": "1932", + "kind": "property", + "name": "IsAutomaticUpgradeEnabled", + "serializedName": "enableAutomaticUpgrade", + "doc": "Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available.", + "type": { + "$id": "1933", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VMSSExtensionProperties.enableAutomaticUpgrade", + "serializationOptions": { + "$id": "1934", + "json": { + "$id": "1935", + "name": "enableAutomaticUpgrade" + } + } + }, + { + "$id": "1936", + "kind": "property", + "name": "setupOrder", + "serializedName": "setupOrder", + "doc": "Indicates the setup order for the extension.", + "type": { + "$id": "1937", + "kind": "array", + "name": "ArrayVmssExtensionSetupOrder", + "valueType": { + "$ref": "300" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VMSSExtensionProperties.setupOrder", + "serializationOptions": { + "$id": "1938", + "json": { + "$id": "1939", + "name": "setupOrder" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": true, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VMSSExtension.properties", + "serializationOptions": { + "$id": "1940", + "json": { + "$id": "1941", + "name": "properties" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.vmExtensions", + "serializationOptions": { + "$id": "1942", + "json": { + "$id": "1943", + "name": "vmExtensions" + } + } + }, + { + "$id": "1944", + "kind": "property", + "name": "vmManagedIdentity", + "serializedName": "vmManagedIdentity", + "doc": "Identities to assign to the virtual machine scale set under the node type.", + "type": { + "$id": "1945", + "kind": "model", + "name": "VmManagedIdentity", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VmManagedIdentity", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Identities for the virtual machine scale set under the node type.", + "decorators": [], + "properties": [ + { + "$id": "1946", + "kind": "property", + "name": "-|arm-id", + "serializedName": "userAssignedIdentities", + "doc": "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}'.", + "type": { + "$id": "1947", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "1948", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VmManagedIdentity.userAssignedIdentities", + "serializationOptions": { + "$id": "1949", + "json": { + "$id": "1950", + "name": "userAssignedIdentities" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.vmManagedIdentity", + "serializationOptions": { + "$id": "1951", + "json": { + "$id": "1952", + "name": "vmManagedIdentity" + } + } + }, + { + "$id": "1953", + "kind": "property", + "name": "isStateless", + "serializedName": "isStateless", + "doc": "Indicates if the node type can only host Stateless workloads.", + "type": { + "$id": "1954", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.isStateless", + "serializationOptions": { + "$id": "1955", + "json": { + "$id": "1956", + "name": "isStateless" + } + } + }, + { + "$id": "1957", + "kind": "property", + "name": "HasMultiplePlacementGroups", + "serializedName": "multiplePlacementGroups", + "doc": "Indicates if scale set associated with the node type can be composed of multiple placement groups.", + "type": { + "$id": "1958", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.multiplePlacementGroups", + "serializationOptions": { + "$id": "1959", + "json": { + "$id": "1960", + "name": "multiplePlacementGroups" + } + } + }, + { + "$id": "1961", + "kind": "property", + "name": "frontendConfigurations", + "serializedName": "frontendConfigurations", + "doc": "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.", + "type": { + "$id": "1962", + "kind": "array", + "name": "ArrayFrontendConfiguration", + "valueType": { + "$id": "1963", + "kind": "model", + "name": "NodeTypeFrontendConfiguration", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FrontendConfiguration", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes the frontend configurations for the node type.", + "decorators": [], + "properties": [ + { + "$id": "1964", + "kind": "property", + "name": "ipAddressType", + "serializedName": "ipAddressType", + "doc": "The IP address type of this frontend configuration. If omitted the default value is IPv4.", + "type": { + "$ref": "304" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FrontendConfiguration.ipAddressType", + "serializationOptions": { + "$id": "1965", + "json": { + "$id": "1966", + "name": "ipAddressType" + } + } + }, + { + "$id": "1967", + "kind": "property", + "name": "loadBalancerBackendAddressPoolId", + "serializedName": "loadBalancerBackendAddressPoolId", + "doc": "The resource Id of the Load Balancer backend address pool that the VM instances of the node type are associated with. The format of the resource Id is '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}'.", + "type": { + "$id": "1968", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "1969", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FrontendConfiguration.loadBalancerBackendAddressPoolId", + "serializationOptions": { + "$id": "1970", + "json": { + "$id": "1971", + "name": "loadBalancerBackendAddressPoolId" + } + } + }, + { + "$id": "1972", + "kind": "property", + "name": "loadBalancerInboundNatPoolId", + "serializedName": "loadBalancerInboundNatPoolId", + "doc": "The resource Id of the Load Balancer inbound NAT pool that the VM instances of the node type are associated with. The format of the resource Id is '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatPools/{inboundNatPoolName}'.", + "type": { + "$id": "1973", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "1974", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FrontendConfiguration.loadBalancerInboundNatPoolId", + "serializationOptions": { + "$id": "1975", + "json": { + "$id": "1976", + "name": "loadBalancerInboundNatPoolId" + } + } + }, + { + "$id": "1977", + "kind": "property", + "name": "applicationGatewayBackendAddressPoolId", + "serializedName": "applicationGatewayBackendAddressPoolId", + "doc": "The resource Id of application gateway backend address pool. The format of the resource Id is '/subscriptions//resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendAddressPools/{backendAddressPoolName}'.", + "type": { + "$id": "1978", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "1979", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.FrontendConfiguration.applicationGatewayBackendAddressPoolId", + "serializationOptions": { + "$id": "1980", + "json": { + "$id": "1981", + "name": "applicationGatewayBackendAddressPoolId" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.frontendConfigurations", + "serializationOptions": { + "$id": "1982", + "json": { + "$id": "1983", + "name": "frontendConfigurations" + } + } + }, + { + "$id": "1984", + "kind": "property", + "name": "networkSecurityRules", + "serializedName": "networkSecurityRules", + "doc": "The Network Security Rules for this node type. This setting can only be specified for node types that are configured with frontend configurations.", + "type": { + "$id": "1985", + "kind": "array", + "name": "ArrayNetworkSecurityRule", + "valueType": { + "$ref": "1274" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.networkSecurityRules", + "serializationOptions": { + "$id": "1986", + "json": { + "$id": "1987", + "name": "networkSecurityRules" + } + } + }, + { + "$id": "1988", + "kind": "property", + "name": "additionalDataDisks", + "serializedName": "additionalDataDisks", + "doc": "Additional managed data disks.", + "type": { + "$id": "1989", + "kind": "array", + "name": "ArrayVmssDataDisk", + "valueType": { + "$id": "1990", + "kind": "model", + "name": "NodeTypeVmssDataDisk", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VmssDataDisk", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Managed data disk description.", + "decorators": [], + "properties": [ + { + "$id": "1991", + "kind": "property", + "name": "lun", + "serializedName": "lun", + "doc": "Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM. Lun 0 is reserved for the service fabric data disk.", + "type": { + "$id": "1992", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VmssDataDisk.lun", + "serializationOptions": { + "$id": "1993", + "json": { + "$id": "1994", + "name": "lun" + } + } + }, + { + "$id": "1995", + "kind": "property", + "name": "DiskSizeInGB", + "serializedName": "diskSizeGB", + "doc": "Disk size for each vm in the node type in GBs.", + "type": { + "$id": "1996", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VmssDataDisk.diskSizeGB", + "serializationOptions": { + "$id": "1997", + "json": { + "$id": "1998", + "name": "diskSizeGB" + } + } + }, + { + "$id": "1999", + "kind": "property", + "name": "diskType", + "serializedName": "diskType", + "doc": "Managed data disk type. Specifies the storage account type for the managed disk", + "type": { + "$ref": "286" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VmssDataDisk.diskType", + "serializationOptions": { + "$id": "2000", + "json": { + "$id": "2001", + "name": "diskType" + } + } + }, + { + "$id": "2002", + "kind": "property", + "name": "diskLetter", + "serializedName": "diskLetter", + "doc": "Managed data disk letter. It can not use the reserved letter C or D and it can not change after created.", + "type": { + "$id": "2003", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VmssDataDisk.diskLetter", + "serializationOptions": { + "$id": "2004", + "json": { + "$id": "2005", + "name": "diskLetter" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.additionalDataDisks", + "serializationOptions": { + "$id": "2006", + "json": { + "$id": "2007", + "name": "additionalDataDisks" + } + } + }, + { + "$id": "2008", + "kind": "property", + "name": "IsEncryptionAtHostEnabled", + "serializedName": "enableEncryptionAtHost", + "doc": "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.", + "type": { + "$id": "2009", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.enableEncryptionAtHost", + "serializationOptions": { + "$id": "2010", + "json": { + "$id": "2011", + "name": "enableEncryptionAtHost" + } + } + }, + { + "$id": "2012", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "The provisioning state of the node type resource.", + "type": { + "$ref": "176" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.provisioningState", + "serializationOptions": { + "$id": "2013", + "json": { + "$id": "2014", + "name": "provisioningState" + } + } + }, + { + "$id": "2015", + "kind": "property", + "name": "IsAcceleratedNetworkingEnabled", + "serializedName": "enableAcceleratedNetworking", + "doc": "Specifies whether the network interface is accelerated networking-enabled.", + "type": { + "$id": "2016", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.enableAcceleratedNetworking", + "serializationOptions": { + "$id": "2017", + "json": { + "$id": "2018", + "name": "enableAcceleratedNetworking" + } + } + }, + { + "$id": "2019", + "kind": "property", + "name": "useDefaultPublicLoadBalancer", + "serializedName": "useDefaultPublicLoadBalancer", + "doc": "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.", + "type": { + "$id": "2020", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.useDefaultPublicLoadBalancer", + "serializationOptions": { + "$id": "2021", + "json": { + "$id": "2022", + "name": "useDefaultPublicLoadBalancer" + } + } + }, + { + "$id": "2023", + "kind": "property", + "name": "useTempDataDisk", + "serializedName": "useTempDataDisk", + "doc": "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.", + "type": { + "$id": "2024", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.useTempDataDisk", + "serializationOptions": { + "$id": "2025", + "json": { + "$id": "2026", + "name": "useTempDataDisk" + } + } + }, + { + "$id": "2027", + "kind": "property", + "name": "IsOverProvisioningEnabled", + "serializedName": "enableOverProvisioning", + "doc": "Specifies whether the node type should be overprovisioned. It is only allowed for stateless node types.", + "type": { + "$id": "2028", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.enableOverProvisioning", + "serializationOptions": { + "$id": "2029", + "json": { + "$id": "2030", + "name": "enableOverProvisioning" + } + } + }, + { + "$id": "2031", + "kind": "property", + "name": "zones", + "serializedName": "zones", + "doc": "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.", + "type": { + "$id": "2032", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "2033", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.zones", + "serializationOptions": { + "$id": "2034", + "json": { + "$id": "2035", + "name": "zones" + } + } + }, + { + "$id": "2036", + "kind": "property", + "name": "isSpotVM", + "serializedName": "isSpotVM", + "doc": "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.", + "type": { + "$id": "2037", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.isSpotVM", + "serializationOptions": { + "$id": "2038", + "json": { + "$id": "2039", + "name": "isSpotVM" + } + } + }, + { + "$id": "2040", + "kind": "property", + "name": "hostGroupId", + "serializedName": "hostGroupId", + "doc": "Specifies the full host group resource Id. This property is used for deploying on azure dedicated hosts.", + "type": { + "$id": "2041", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.hostGroupId", + "serializationOptions": { + "$id": "2042", + "json": { + "$id": "2043", + "name": "hostGroupId" + } + } + }, + { + "$id": "2044", + "kind": "property", + "name": "useEphemeralOSDisk", + "serializedName": "useEphemeralOSDisk", + "doc": "Indicates whether to use ephemeral os disk. The sku selected on the vmSize property needs to support this feature.", + "type": { + "$id": "2045", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.useEphemeralOSDisk", + "serializationOptions": { + "$id": "2046", + "json": { + "$id": "2047", + "name": "useEphemeralOSDisk" + } + } + }, + { + "$id": "2048", + "kind": "property", + "name": "spotRestoreTimeout", + "serializedName": "spotRestoreTimeout", + "doc": "Indicates the time duration after which the platform will not try to restore the VMSS SPOT instances specified as ISO 8601.", + "type": { + "$id": "2049", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.spotRestoreTimeout", + "serializationOptions": { + "$id": "2050", + "json": { + "$id": "2051", + "name": "spotRestoreTimeout" + } + } + }, + { + "$id": "2052", + "kind": "property", + "name": "evictionPolicy", + "serializedName": "evictionPolicy", + "doc": "Specifies the eviction policy for virtual machines in a SPOT node type. Default is Delete.", + "type": { + "$ref": "310" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.evictionPolicy", + "serializationOptions": { + "$id": "2053", + "json": { + "$id": "2054", + "name": "evictionPolicy" + } + } + }, + { + "$id": "2055", + "kind": "property", + "name": "vmImageResourceId", + "serializedName": "vmImageResourceId", + "doc": "Indicates the resource id of the vm image. This parameter is used for custom vm image.", + "type": { + "$id": "2056", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "2057", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.vmImageResourceId", + "serializationOptions": { + "$id": "2058", + "json": { + "$id": "2059", + "name": "vmImageResourceId" + } + } + }, + { + "$id": "2060", + "kind": "property", + "name": "subnetId", + "serializedName": "subnetId", + "doc": "Indicates the resource id of the subnet for the node type.", + "type": { + "$id": "2061", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "2062", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.subnetId", + "serializationOptions": { + "$id": "2063", + "json": { + "$id": "2064", + "name": "subnetId" + } + } + }, + { + "$id": "2065", + "kind": "property", + "name": "vmSetupActions", + "serializedName": "vmSetupActions", + "doc": "Specifies the actions to be performed on the vms before bootstrapping the service fabric runtime.", + "type": { + "$id": "2066", + "kind": "array", + "name": "ArrayVmSetupAction", + "valueType": { + "$ref": "316" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.vmSetupActions", + "serializationOptions": { + "$id": "2067", + "json": { + "$id": "2068", + "name": "vmSetupActions" + } + } + }, + { + "$id": "2069", + "kind": "property", + "name": "securityType", + "serializedName": "securityType", + "doc": "Specifies the security type of the nodeType. Only Standard and TrustedLaunch are currently supported", + "type": { + "$ref": "322" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.securityType", + "serializationOptions": { + "$id": "2070", + "json": { + "$id": "2071", + "name": "securityType" + } + } + }, + { + "$id": "2072", + "kind": "property", + "name": "IsSecureBootEnabled", + "serializedName": "secureBootEnabled", + "doc": "Specifies whether secure boot should be enabled on the nodeType. Can only be used with TrustedLaunch SecurityType", + "type": { + "$id": "2073", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.secureBootEnabled", + "serializationOptions": { + "$id": "2074", + "json": { + "$id": "2075", + "name": "secureBootEnabled" + } + } + }, + { + "$id": "2076", + "kind": "property", + "name": "IsNodePublicIPEnabled", + "serializedName": "enableNodePublicIP", + "doc": "Specifies whether each node is allocated its own public IPv4 address. This is only supported on secondary node types with custom Load Balancers.", + "type": { + "$id": "2077", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.enableNodePublicIP", + "serializationOptions": { + "$id": "2078", + "json": { + "$id": "2079", + "name": "enableNodePublicIP" + } + } + }, + { + "$id": "2080", + "kind": "property", + "name": "IsNodePublicIPv6Enabled", + "serializedName": "enableNodePublicIPv6", + "doc": "Specifies whether each node is allocated its own public IPv6 address. This is only supported on secondary node types with custom Load Balancers.", + "type": { + "$id": "2081", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.enableNodePublicIPv6", + "serializationOptions": { + "$id": "2082", + "json": { + "$id": "2083", + "name": "enableNodePublicIPv6" + } + } + }, + { + "$id": "2084", + "kind": "property", + "name": "vmSharedGalleryImageId", + "serializedName": "vmSharedGalleryImageId", + "doc": "Indicates the resource id of the vm shared galleries image. This parameter is used for custom vm image.", + "type": { + "$id": "2085", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "2086", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.vmSharedGalleryImageId", + "serializationOptions": { + "$id": "2087", + "json": { + "$id": "2088", + "name": "vmSharedGalleryImageId" + } + } + }, + { + "$id": "2089", + "kind": "property", + "name": "natGatewayId", + "serializedName": "natGatewayId", + "doc": "Specifies the resource id of a NAT Gateway to attach to the subnet of this node type. Node type must use custom load balancer.", + "type": { + "$id": "2090", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "2091", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.natGatewayId", + "serializationOptions": { + "$id": "2092", + "json": { + "$id": "2093", + "name": "natGatewayId" + } + } + }, + { + "$id": "2094", + "kind": "property", + "name": "natConfigurations", + "serializedName": "natConfigurations", + "doc": "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.", + "type": { + "$id": "2095", + "kind": "array", + "name": "ArrayNodeTypeNatConfig", + "valueType": { + "$id": "2096", + "kind": "model", + "name": "NodeTypeNatConfig", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeNatConfig", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Provides information about NAT configuration on the default public Load Balancer for the node type.", + "decorators": [], + "properties": [ + { + "$id": "2097", + "kind": "property", + "name": "backendPort", + "serializedName": "backendPort", + "doc": "The internal port for the NAT configuration.", + "type": { + "$id": "2098", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeNatConfig.backendPort", + "serializationOptions": { + "$id": "2099", + "json": { + "$id": "2100", + "name": "backendPort" + } + } + }, + { + "$id": "2101", + "kind": "property", + "name": "frontendPortRangeStart", + "serializedName": "frontendPortRangeStart", + "doc": "The port range start for the external endpoint.", + "type": { + "$id": "2102", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeNatConfig.frontendPortRangeStart", + "serializationOptions": { + "$id": "2103", + "json": { + "$id": "2104", + "name": "frontendPortRangeStart" + } + } + }, + { + "$id": "2105", + "kind": "property", + "name": "frontendPortRangeEnd", + "serializedName": "frontendPortRangeEnd", + "doc": "The port range end for the external endpoint.", + "type": { + "$id": "2106", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeNatConfig.frontendPortRangeEnd", + "serializationOptions": { + "$id": "2107", + "json": { + "$id": "2108", + "name": "frontendPortRangeEnd" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.natConfigurations", + "serializationOptions": { + "$id": "2109", + "json": { + "$id": "2110", + "name": "natConfigurations" + } + } + }, + { + "$id": "2111", + "kind": "property", + "name": "vmImagePlan", + "serializedName": "vmImagePlan", + "doc": "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.", + "type": { + "$id": "2112", + "kind": "model", + "name": "VmImagePlan", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VmImagePlan", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "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.", + "decorators": [], + "properties": [ + { + "$id": "2113", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The plan ID.", + "type": { + "$id": "2114", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VmImagePlan.name", + "serializationOptions": { + "$id": "2115", + "json": { + "$id": "2116", + "name": "name" + } + } + }, + { + "$id": "2117", + "kind": "property", + "name": "product", + "serializedName": "product", + "doc": "Specifies the product of the image from the marketplace. This is the same value as Offer under the imageReference element.", + "type": { + "$id": "2118", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VmImagePlan.product", + "serializationOptions": { + "$id": "2119", + "json": { + "$id": "2120", + "name": "product" + } + } + }, + { + "$id": "2121", + "kind": "property", + "name": "promotionCode", + "serializedName": "promotionCode", + "doc": "The promotion code.", + "type": { + "$id": "2122", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VmImagePlan.promotionCode", + "serializationOptions": { + "$id": "2123", + "json": { + "$id": "2124", + "name": "promotionCode" + } + } + }, + { + "$id": "2125", + "kind": "property", + "name": "publisher", + "serializedName": "publisher", + "doc": "The publisher ID.", + "type": { + "$id": "2126", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VmImagePlan.publisher", + "serializationOptions": { + "$id": "2127", + "json": { + "$id": "2128", + "name": "publisher" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.vmImagePlan", + "serializationOptions": { + "$id": "2129", + "json": { + "$id": "2130", + "name": "vmImagePlan" + } + } + }, + { + "$id": "2131", + "kind": "property", + "name": "serviceArtifactReferenceId", + "serializedName": "serviceArtifactReferenceId", + "doc": "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.", + "type": { + "$id": "2132", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "2133", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.serviceArtifactReferenceId", + "serializationOptions": { + "$id": "2134", + "json": { + "$id": "2135", + "name": "serviceArtifactReferenceId" + } + } + }, + { + "$id": "2136", + "kind": "property", + "name": "dscpConfigurationId", + "serializedName": "dscpConfigurationId", + "doc": "Specifies the resource id of the DSCP configuration to apply to the node type network interface.", + "type": { + "$id": "2137", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "2138", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.dscpConfigurationId", + "serializationOptions": { + "$id": "2139", + "json": { + "$id": "2140", + "name": "dscpConfigurationId" + } + } + }, + { + "$id": "2141", + "kind": "property", + "name": "additionalNetworkInterfaceConfigurations", + "serializedName": "additionalNetworkInterfaceConfigurations", + "doc": "Specifies the settings for any additional secondary network interfaces to attach to the node type.", + "type": { + "$id": "2142", + "kind": "array", + "name": "ArrayAdditionalNetworkInterfaceConfiguration", + "valueType": { + "$id": "2143", + "kind": "model", + "name": "AdditionalNetworkInterfaceConfiguration", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AdditionalNetworkInterfaceConfiguration", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Specifies the settings for a network interface to attach to the node type.", + "decorators": [], + "properties": [ + { + "$id": "2144", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "Name of the network interface.", + "type": { + "$id": "2145", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AdditionalNetworkInterfaceConfiguration.name", + "serializationOptions": { + "$id": "2146", + "json": { + "$id": "2147", + "name": "name" + } + } + }, + { + "$id": "2148", + "kind": "property", + "name": "enableAcceleratedNetworking", + "serializedName": "enableAcceleratedNetworking", + "doc": "Specifies whether the network interface is accelerated networking-enabled.", + "type": { + "$id": "2149", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AdditionalNetworkInterfaceConfiguration.enableAcceleratedNetworking", + "serializationOptions": { + "$id": "2150", + "json": { + "$id": "2151", + "name": "enableAcceleratedNetworking" + } + } + }, + { + "$id": "2152", + "kind": "property", + "name": "dscpConfiguration", + "serializedName": "dscpConfiguration", + "doc": "Specifies the DSCP configuration to apply to the network interface.", + "type": { + "$ref": "1864" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AdditionalNetworkInterfaceConfiguration.dscpConfiguration", + "serializationOptions": { + "$id": "2153", + "json": { + "$id": "2154", + "name": "dscpConfiguration" + } + } + }, + { + "$id": "2155", + "kind": "property", + "name": "ipConfigurations", + "serializedName": "ipConfigurations", + "doc": "Specifies the IP configurations of the network interface.", + "type": { + "$id": "2156", + "kind": "array", + "name": "ArrayIpConfiguration", + "valueType": { + "$id": "2157", + "kind": "model", + "name": "ServiceFabricManagedClusterIPConfiguration", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.IpConfiguration", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Specifies an IP configuration of the network interface.", + "decorators": [], + "properties": [ + { + "$id": "2158", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "Name of the network interface.", + "type": { + "$id": "2159", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.IpConfiguration.name", + "serializationOptions": { + "$id": "2160", + "json": { + "$id": "2161", + "name": "name" + } + } + }, + { + "$id": "2162", + "kind": "property", + "name": "applicationGatewayBackendAddressPools", + "serializedName": "applicationGatewayBackendAddressPools", + "doc": "Specifies an array of references to backend address pools of application gateways. A node type can reference backend address pools of multiple application gateways. Multiple node types cannot use the same application gateway.", + "type": { + "$id": "2163", + "kind": "array", + "name": "ArraySubResource", + "valueType": { + "$ref": "1864" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.IpConfiguration.applicationGatewayBackendAddressPools", + "serializationOptions": { + "$id": "2164", + "json": { + "$id": "2165", + "name": "applicationGatewayBackendAddressPools" + } + } + }, + { + "$id": "2166", + "kind": "property", + "name": "loadBalancerBackendAddressPools", + "serializedName": "loadBalancerBackendAddressPools", + "doc": "Specifies an array of references to backend address pools of load balancers. A node type can reference backend address pools of one public and one internal load balancer. Multiple node types cannot use the same basic sku load balancer.", + "type": { + "$id": "2167", + "kind": "array", + "name": "ArraySubResource", + "valueType": { + "$ref": "1864" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.IpConfiguration.loadBalancerBackendAddressPools", + "serializationOptions": { + "$id": "2168", + "json": { + "$id": "2169", + "name": "loadBalancerBackendAddressPools" + } + } + }, + { + "$id": "2170", + "kind": "property", + "name": "loadBalancerInboundNatPools", + "serializedName": "loadBalancerInboundNatPools", + "doc": "Specifies an array of references to inbound Nat pools of the load balancers. A node type can reference inbound nat pools of one public and one internal load balancer. Multiple node types cannot use the same basic sku load balancer.", + "type": { + "$id": "2171", + "kind": "array", + "name": "ArraySubResource", + "valueType": { + "$ref": "1864" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.IpConfiguration.loadBalancerInboundNatPools", + "serializationOptions": { + "$id": "2172", + "json": { + "$id": "2173", + "name": "loadBalancerInboundNatPools" + } + } + }, + { + "$id": "2174", + "kind": "property", + "name": "subnet", + "serializedName": "subnet", + "doc": "Specifies the subnet of the network interface.", + "type": { + "$ref": "1864" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.IpConfiguration.subnet", + "serializationOptions": { + "$id": "2175", + "json": { + "$id": "2176", + "name": "subnet" + } + } + }, + { + "$id": "2177", + "kind": "property", + "name": "privateIPAddressVersion", + "serializedName": "privateIPAddressVersion", + "doc": "Specifies whether the IP configuration's private IP is IPv4 or IPv6. Default is IPv4.", + "type": { + "$ref": "328" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.IpConfiguration.privateIPAddressVersion", + "serializationOptions": { + "$id": "2178", + "json": { + "$id": "2179", + "name": "privateIPAddressVersion" + } + } + }, + { + "$id": "2180", + "kind": "property", + "name": "publicIPAddressConfiguration", + "serializedName": "publicIPAddressConfiguration", + "doc": "The public IP address configuration of the network interface.", + "type": { + "$id": "2181", + "kind": "model", + "name": "ServiceFabricManagedClusterPublicIPAddressConfiguration", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.PublicIPAddressConfiguration", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The public IP address configuration of the network interface.", + "decorators": [], + "properties": [ + { + "$id": "2182", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "Name of the network interface.", + "type": { + "$id": "2183", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.PublicIPAddressConfiguration.name", + "serializationOptions": { + "$id": "2184", + "json": { + "$id": "2185", + "name": "name" + } + } + }, + { + "$id": "2186", + "kind": "property", + "name": "ipTags", + "serializedName": "ipTags", + "doc": "Specifies the list of IP tags associated with the public IP address.", + "type": { + "$id": "2187", + "kind": "array", + "name": "ArrayIpTag", + "valueType": { + "$ref": "1437" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.PublicIPAddressConfiguration.ipTags", + "serializationOptions": { + "$id": "2188", + "json": { + "$id": "2189", + "name": "ipTags" + } + } + }, + { + "$id": "2190", + "kind": "property", + "name": "publicIPAddressVersion", + "serializedName": "publicIPAddressVersion", + "doc": "Specifies whether the IP configuration's public IP is IPv4 or IPv6. Default is IPv4.", + "type": { + "$ref": "334" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.PublicIPAddressConfiguration.publicIPAddressVersion", + "serializationOptions": { + "$id": "2191", + "json": { + "$id": "2192", + "name": "publicIPAddressVersion" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.IpConfiguration.publicIPAddressConfiguration", + "serializationOptions": { + "$id": "2193", + "json": { + "$id": "2194", + "name": "publicIPAddressConfiguration" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.AdditionalNetworkInterfaceConfiguration.ipConfigurations", + "serializationOptions": { + "$id": "2195", + "json": { + "$id": "2196", + "name": "ipConfigurations" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.additionalNetworkInterfaceConfigurations", + "serializationOptions": { + "$id": "2197", + "json": { + "$id": "2198", + "name": "additionalNetworkInterfaceConfigurations" + } + } + }, + { + "$id": "2199", + "kind": "property", + "name": "computerNamePrefix", + "serializedName": "computerNamePrefix", + "doc": "Specifies the computer name prefix. Limited to 9 characters. If specified, allows for a longer name to be specified for the node type name.", + "type": { + "$id": "2200", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.computerNamePrefix", + "serializationOptions": { + "$id": "2201", + "json": { + "$id": "2202", + "name": "computerNamePrefix" + } + } + }, + { + "$id": "2203", + "kind": "property", + "name": "vmApplications", + "serializedName": "vmApplications", + "doc": "Specifies the gallery applications that should be made available to the underlying VMSS.", + "type": { + "$id": "2204", + "kind": "array", + "name": "ArrayVmApplication", + "valueType": { + "$id": "2205", + "kind": "model", + "name": "ServiceFabricManagedVmApplication", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VmApplication", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Specifies the gallery application that should be made available to the underlying VMSS.", + "decorators": [], + "properties": [ + { + "$id": "2206", + "kind": "property", + "name": "configurationReference", + "serializedName": "configurationReference", + "doc": "Optional, Specifies the uri to an azure blob that will replace the default configuration for the package if provided.", + "type": { + "$id": "2207", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VmApplication.configurationReference", + "serializationOptions": { + "$id": "2208", + "json": { + "$id": "2209", + "name": "configurationReference" + } + } + }, + { + "$id": "2210", + "kind": "property", + "name": "enableAutomaticUpgrade", + "serializedName": "enableAutomaticUpgrade", + "doc": "If set to true, when a new Gallery Application version is available in PIR/SIG, it will be automatically updated for the underlying VMSS.", + "type": { + "$id": "2211", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VmApplication.enableAutomaticUpgrade", + "serializationOptions": { + "$id": "2212", + "json": { + "$id": "2213", + "name": "enableAutomaticUpgrade" + } + } + }, + { + "$id": "2214", + "kind": "property", + "name": "order", + "serializedName": "order", + "doc": "Optional, Specifies the order in which the packages have to be installed.", + "type": { + "$id": "2215", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VmApplication.order", + "serializationOptions": { + "$id": "2216", + "json": { + "$id": "2217", + "name": "order" + } + } + }, + { + "$id": "2218", + "kind": "property", + "name": "packageReferenceId", + "serializedName": "packageReferenceId", + "doc": "Specifies the GalleryApplicationVersion resource id on the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{application}/versions/{version}.", + "type": { + "$id": "2219", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "2220", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VmApplication.packageReferenceId", + "serializationOptions": { + "$id": "2221", + "json": { + "$id": "2222", + "name": "packageReferenceId" + } + } + }, + { + "$id": "2223", + "kind": "property", + "name": "vmGalleryTags", + "serializedName": "vmGalleryTags", + "doc": "Optional, Specifies a passthrough value for more generic context. Accepts a JSON-formatted string e.g. '{\"Tag1\":\"Value1\",\"Tag2\":\"Value2\"}'.", + "type": { + "$id": "2224", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VmApplication.vmGalleryTags", + "serializationOptions": { + "$id": "2225", + "json": { + "$id": "2226", + "name": "vmGalleryTags" + } + } + }, + { + "$id": "2227", + "kind": "property", + "name": "treatFailureAsDeploymentFailure", + "serializedName": "treatFailureAsDeploymentFailure", + "doc": "Optional, If true, any failure for any operation in the VmApplication will fail the deployment.", + "type": { + "$id": "2228", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.VmApplication.treatFailureAsDeploymentFailure", + "serializationOptions": { + "$id": "2229", + "json": { + "$id": "2230", + "name": "treatFailureAsDeploymentFailure" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.vmApplications", + "serializationOptions": { + "$id": "2231", + "json": { + "$id": "2232", + "name": "vmApplications" + } + } + }, + { + "$id": "2233", + "kind": "property", + "name": "zoneBalance", + "serializedName": "zoneBalance", + "doc": "Setting this to true allows stateless node types to scale out without equal distribution across zones.", + "type": { + "$id": "2234", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeProperties.zoneBalance", + "serializationOptions": { + "$id": "2235", + "json": { + "$id": "2236", + "name": "zoneBalance" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": true, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeType.properties", + "serializationOptions": { + "$id": "2237", + "json": { + "$id": "2238", + "name": "properties" + } + } + }, + { + "$id": "2239", + "kind": "path", + "name": "name", + "serializedName": "name", + "doc": "The name of the node type.", + "type": { + "$id": "2240", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeType.name", + "discriminator": false, + "flatten": false + }, + { + "$id": "2241", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Resource tags.", + "type": { + "$id": "2242", + "kind": "dict", + "keyType": { + "$id": "2243", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "2244", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeType.tags", + "serializationOptions": { + "$id": "2245", + "json": { + "$id": "2246", + "name": "tags" + } + } + }, + { + "$id": "2247", + "kind": "property", + "name": "sku", + "serializedName": "sku", + "doc": "The node type sku.", + "type": { + "$id": "2248", + "kind": "model", + "name": "NodeTypeSku", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeSku", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Describes a node type sku.", + "decorators": [], + "properties": [ + { + "$id": "2249", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The sku name. Name is internally generated and is used in auto-scale scenarios. Property does not allow to be changed to other values than generated. To avoid deployment errors please omit the property.", + "type": { + "$id": "2250", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeSku.name", + "serializationOptions": { + "$id": "2251", + "json": { + "$id": "2252", + "name": "name" + } + } + }, + { + "$id": "2253", + "kind": "property", + "name": "tier", + "serializedName": "tier", + "doc": "Specifies the tier of the node type. Possible Values: **Standard**", + "type": { + "$id": "2254", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeSku.tier", + "serializationOptions": { + "$id": "2255", + "json": { + "$id": "2256", + "name": "tier" + } + } + }, + { + "$id": "2257", + "kind": "property", + "name": "capacity", + "serializedName": "capacity", + "doc": "The number of nodes in the node type. If present in request it will override properties.vmInstanceCount.", + "type": { + "$id": "2258", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeSku.capacity", + "serializationOptions": { + "$id": "2259", + "json": { + "$id": "2260", + "name": "capacity" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeType.sku", + "serializationOptions": { + "$id": "2261", + "json": { + "$id": "2262", + "name": "sku" + } + } + } + ] + }, + { + "$ref": "1793" + }, + { + "$ref": "1826" + }, + { + "$ref": "1862" + }, + { + "$ref": "1864" + }, + { + "$ref": "1873" + }, + { + "$ref": "1888" + }, + { + "$ref": "1894" + }, + { + "$ref": "1912" + }, + { + "$ref": "1916" + }, + { + "$ref": "1945" + }, + { + "$ref": "1963" + }, + { + "$ref": "1990" + }, + { + "$ref": "2096" + }, + { + "$ref": "2112" + }, + { + "$ref": "2143" + }, + { + "$ref": "2157" + }, + { + "$ref": "2181" + }, + { + "$ref": "2205" + }, + { + "$ref": "2248" + }, + { + "$id": "2263", + "kind": "model", + "name": "NodeTypeUpdateParameters", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeUpdateParameters", + "usage": "Input,Json", + "doc": "Node type update request", + "decorators": [], + "properties": [ + { + "$id": "2264", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Node type update parameters", + "type": { + "$id": "2265", + "kind": "dict", + "keyType": { + "$id": "2266", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "2267", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeUpdateParameters.tags", + "serializationOptions": { + "$id": "2268", + "json": { + "$id": "2269", + "name": "tags" + } + } + }, + { + "$id": "2270", + "kind": "property", + "name": "sku", + "serializedName": "sku", + "doc": "The node type sku.", + "type": { + "$ref": "2248" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeUpdateParameters.sku", + "serializationOptions": { + "$id": "2271", + "json": { + "$id": "2272", + "name": "sku" + } + } + } + ] + }, + { + "$id": "2273", + "kind": "model", + "name": "NodeTypeListResult", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult", + "usage": "Output,Json", + "doc": "The response of a NodeType list operation.", + "decorators": [], + "properties": [ + { + "$id": "2274", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The NodeType items on this page", + "type": { + "$id": "2275", + "kind": "array", + "name": "ArrayNodeType", + "valueType": { + "$ref": "1791" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", + "serializationOptions": { + "$id": "2276", + "json": { + "$id": "2277", + "name": "value" + } + } + }, + { + "$id": "2278", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "2279", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "2280", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.nextLink", + "serializationOptions": { + "$id": "2281", + "json": { + "$id": "2282", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "2283", + "kind": "model", + "name": "NodeTypeActionContent", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeActionParameters", + "usage": "Input,Json", + "doc": "Parameters for Node type action. If nodes are not specified on the parameters, the operation will be performed in all nodes of the node type one upgrade domain at a time.", + "decorators": [], + "properties": [ + { + "$id": "2284", + "kind": "property", + "name": "nodes", + "serializedName": "nodes", + "doc": "List of node names from the node type.", + "type": { + "$id": "2285", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "2286", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeActionParameters.nodes", + "serializationOptions": { + "$id": "2287", + "json": { + "$id": "2288", + "name": "nodes" + } + } + }, + { + "$id": "2289", + "kind": "property", + "name": "IsForced", + "serializedName": "force", + "doc": "Force the action to go through.", + "type": { + "$id": "2290", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeActionParameters.force", + "serializationOptions": { + "$id": "2291", + "json": { + "$id": "2292", + "name": "force" + } + } + }, + { + "$id": "2293", + "kind": "property", + "name": "updateType", + "serializedName": "updateType", + "doc": "Specifies the way the operation will be performed.", + "type": { + "$ref": "340" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeActionParameters.updateType", + "serializationOptions": { + "$id": "2294", + "json": { + "$id": "2295", + "name": "updateType" + } + } + } + ] + }, + { + "$id": "2296", + "kind": "model", + "name": "NodeTypeListSkuResult", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeListSkuResult", + "usage": "Output,Json", + "doc": "Node type available sku list results", + "decorators": [], + "properties": [ + { + "$id": "2297", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The NodeTypeAvailableSku items on this page", + "type": { + "$id": "2298", + "kind": "array", + "name": "ArrayNodeTypeAvailableSku", + "valueType": { + "$id": "2299", + "kind": "model", + "name": "NodeTypeAvailableSku", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeAvailableSku", + "usage": "Output,Json", + "doc": "Defines the type of sku available for a node type", + "decorators": [], + "properties": [ + { + "$id": "2300", + "kind": "property", + "name": "-|resource-type", + "serializedName": "resourceType", + "doc": "The type of resource the sku applies to. Value: Microsoft.ServiceFabric/managedClusters/nodeTypes.", + "type": { + "$id": "2301", + "kind": "string", + "name": "armResourceType", + "crossLanguageDefinitionId": "Azure.Core.armResourceType", + "baseType": { + "$id": "2302", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeAvailableSku.resourceType", + "serializationOptions": { + "$id": "2303", + "json": { + "$id": "2304", + "name": "resourceType" + } + } + }, + { + "$id": "2305", + "kind": "property", + "name": "sku", + "serializedName": "sku", + "doc": "The supported SKU for a for node type.", + "type": { + "$id": "2306", + "kind": "model", + "name": "NodeTypeSupportedSku", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeSupportedSku", + "usage": "Output,Json", + "doc": "Describes a node type supported sku.", + "decorators": [], + "properties": [ + { + "$id": "2307", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The sku name.", + "type": { + "$id": "2308", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeSupportedSku.name", + "serializationOptions": { + "$id": "2309", + "json": { + "$id": "2310", + "name": "name" + } + } + }, + { + "$id": "2311", + "kind": "property", + "name": "tier", + "serializedName": "tier", + "doc": "Specifies the tier of the node type. Possible Values: **Standard**", + "type": { + "$id": "2312", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeSupportedSku.tier", + "serializationOptions": { + "$id": "2313", + "json": { + "$id": "2314", + "name": "tier" + } + } + } + ] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeAvailableSku.sku", + "serializationOptions": { + "$id": "2315", + "json": { + "$id": "2316", + "name": "sku" + } + } + }, + { + "$id": "2317", + "kind": "property", + "name": "capacity", + "serializedName": "capacity", + "doc": "Provides information about how the node count can be scaled.", + "type": { + "$id": "2318", + "kind": "model", + "name": "NodeTypeSkuCapacity", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeSkuCapacity", + "usage": "Output,Json", + "doc": "Provides information about how node type can be scaled.", + "decorators": [], + "properties": [ + { + "$id": "2319", + "kind": "property", + "name": "minimum", + "serializedName": "minimum", + "doc": "Lowest permitted node count in a node type.", + "type": { + "$id": "2320", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeSkuCapacity.minimum", + "serializationOptions": { + "$id": "2321", + "json": { + "$id": "2322", + "name": "minimum" + } + } + }, + { + "$id": "2323", + "kind": "property", + "name": "maximum", + "serializedName": "maximum", + "doc": "Highest permitted node count in a node type.", + "type": { + "$id": "2324", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeSkuCapacity.maximum", + "serializationOptions": { + "$id": "2325", + "json": { + "$id": "2326", + "name": "maximum" + } + } + }, + { + "$id": "2327", + "kind": "property", + "name": "default", + "serializedName": "default", + "doc": "Default node count in a node type.", + "type": { + "$id": "2328", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeSkuCapacity.default", + "serializationOptions": { + "$id": "2329", + "json": { + "$id": "2330", + "name": "default" + } + } + }, + { + "$id": "2331", + "kind": "property", + "name": "scaleType", + "serializedName": "scaleType", + "doc": "Node type capacity scale type.", + "type": { + "$ref": "346" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeSkuCapacity.scaleType", + "serializationOptions": { + "$id": "2332", + "json": { + "$id": "2333", + "name": "scaleType" + } + } + } + ] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeAvailableSku.capacity", + "serializationOptions": { + "$id": "2334", + "json": { + "$id": "2335", + "name": "capacity" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeListSkuResult.value", + "serializationOptions": { + "$id": "2336", + "json": { + "$id": "2337", + "name": "value" + } + } + }, + { + "$id": "2338", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "2339", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "2340", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeListSkuResult.nextLink", + "serializationOptions": { + "$id": "2341", + "json": { + "$id": "2342", + "name": "nextLink" + } + } + } + ] + }, + { + "$ref": "2299" + }, + { + "$ref": "2306" + }, + { + "$ref": "2318" + }, + { + "$id": "2343", + "kind": "model", + "name": "LongRunningOperationResult", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.LongRunningOperationResult", + "usage": "Output,Json", + "doc": "Long running operation result.", + "decorators": [], + "properties": [ + { + "$id": "2344", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the operation.", + "type": { + "$id": "2345", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.LongRunningOperationResult.name", + "serializationOptions": { + "$id": "2346", + "json": { + "$id": "2347", + "name": "name" + } + } + }, + { + "$id": "2348", + "kind": "property", + "name": "startTime", + "serializedName": "startTime", + "doc": "The start time of the operation.", + "type": { + "$id": "2349", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "2350", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.LongRunningOperationResult.startTime", + "serializationOptions": { + "$id": "2351", + "json": { + "$id": "2352", + "name": "startTime" + } + } + }, + { + "$id": "2353", + "kind": "property", + "name": "endTime", + "serializedName": "endTime", + "doc": "The end time of the operation.", + "type": { + "$id": "2354", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "2355", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.LongRunningOperationResult.endTime", + "serializationOptions": { + "$id": "2356", + "json": { + "$id": "2357", + "name": "endTime" + } + } + }, + { + "$id": "2358", + "kind": "property", + "name": "percentComplete", + "serializedName": "percentComplete", + "doc": "The completion percentage of the operation.", + "type": { + "$id": "2359", + "kind": "float64", + "name": "float64", + "crossLanguageDefinitionId": "TypeSpec.float64", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.LongRunningOperationResult.percentComplete", + "serializationOptions": { + "$id": "2360", + "json": { + "$id": "2361", + "name": "percentComplete" + } + } + }, + { + "$id": "2362", + "kind": "property", + "name": "status", + "serializedName": "status", + "doc": "The status of the operation.", + "type": { + "$id": "2363", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.LongRunningOperationResult.status", + "serializationOptions": { + "$id": "2364", + "json": { + "$id": "2365", + "name": "status" + } + } + }, + { + "$id": "2366", + "kind": "property", + "name": "error", + "serializedName": "error", + "doc": "The operation error.", + "type": { + "$id": "2367", + "kind": "model", + "name": "ErrorModelError", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ErrorModelError", + "usage": "Output,Json", + "doc": "The error details.", + "decorators": [], + "properties": [ + { + "$id": "2368", + "kind": "property", + "name": "code", + "serializedName": "code", + "doc": "The error code.", + "type": { + "$id": "2369", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ErrorModelError.code", + "serializationOptions": { + "$id": "2370", + "json": { + "$id": "2371", + "name": "code" + } + } + }, + { + "$id": "2372", + "kind": "property", + "name": "message", + "serializedName": "message", + "doc": "The error message.", + "type": { + "$id": "2373", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ErrorModelError.message", + "serializationOptions": { + "$id": "2374", + "json": { + "$id": "2375", + "name": "message" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.LongRunningOperationResult.error", + "serializationOptions": { + "$id": "2376", + "json": { + "$id": "2377", + "name": "error" + } + } + } + ] + }, + { + "$ref": "2367" + } + ], + "clients": [ + { + "$id": "2378", + "kind": "client", + "name": "ServiceFabricClient", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "doc": "Service Fabric Managed Clusters Management Client", + "methods": [], + "parameters": [ + { + "$id": "2379", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "2380", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "location": "Uri", + "isApiVersion": false, + "isContentType": false, + "isRequired": true, + "isEndpoint": true, + "skipUrlEncoding": false, + "explode": false, + "kind": "Client", + "defaultValue": { + "$id": "2381", + "type": { + "$id": "2382", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "2383", + "name": "TypeSpec.@service", + "arguments": { + "$id": "2384", + "options": { + "$id": "2385", + "title": "ServiceFabricManagedClustersManagementClient" + } + } + } + ], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "children": [ + { + "$id": "2386", + "kind": "client", + "name": "Operations", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "methods": [ + { + "$id": "2387", + "kind": "paging", + "name": "list", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Get the list of available Service Fabric resource provider API operations.", + "summary": "Lists all of the available Service Fabric resource provider API operations.", + "operation": { + "$id": "2388", + "name": "list", + "resourceName": "Operations", + "summary": "Lists all of the available Service Fabric resource provider API operations.", + "doc": "Get the list of available Service Fabric resource provider API operations.", + "accessibility": "public", + "parameters": [ + { + "$id": "2389", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "2390", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "2391", + "type": { + "$id": "2392", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2393", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "2394", + "kind": "constant", + "valueType": { + "$id": "2395", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "2396", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "360" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/providers/Microsoft.ServiceFabric/operations", + "bufferResponse": true, + "paging": { + "$id": "2397", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "2398", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Operations.list", + "decorators": [], + "examples": [ + { + "$id": "2399", + "kind": "http", + "name": "List the operations for the provider", + "description": "List the operations for the provider", + "filePath": "2025-03-01-preview/OperationsList_example.json", + "parameters": [ + { + "$id": "2400", + "parameter": { + "$ref": "2389" + }, + "value": { + "$id": "2401", + "kind": "string", + "type": { + "$ref": "2390" + }, + "value": "2025-03-01-preview" + } + } + ], + "responses": [ + { + "$id": "2402", + "response": { + "$ref": "2396" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2403", + "kind": "model", + "type": { + "$ref": "360" + }, + "value": { + "$id": "2404", + "value": { + "$id": "2405", + "kind": "array", + "type": { + "$ref": "362" + }, + "value": [ + { + "$id": "2406", + "kind": "model", + "type": { + "$ref": "363" + }, + "value": { + "$id": "2407", + "name": { + "$id": "2408", + "kind": "string", + "type": { + "$ref": "365" + }, + "value": "Microsoft.ServiceFabric/managedClusters/read" + }, + "display": { + "$id": "2409", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "2410", + "provider": { + "$id": "2411", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "Microsoft ServiceFabric" + }, + "resource": { + "$id": "2412", + "kind": "string", + "type": { + "$ref": "379" + }, + "value": "managedClusters" + }, + "operation": { + "$id": "2413", + "kind": "string", + "type": { + "$ref": "383" + }, + "value": "Read Cluster" + }, + "description": { + "$id": "2414", + "kind": "string", + "type": { + "$ref": "387" + }, + "value": "Read any Cluster" + } + } + } + } + }, + { + "$id": "2415", + "kind": "model", + "type": { + "$ref": "363" + }, + "value": { + "$id": "2416", + "name": { + "$id": "2417", + "kind": "string", + "type": { + "$ref": "365" + }, + "value": "Microsoft.ServiceFabric/managedClusters/write" + }, + "display": { + "$id": "2418", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "2419", + "provider": { + "$id": "2420", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "Microsoft ServiceFabric" + }, + "resource": { + "$id": "2421", + "kind": "string", + "type": { + "$ref": "379" + }, + "value": "managedClusters" + }, + "operation": { + "$id": "2422", + "kind": "string", + "type": { + "$ref": "383" + }, + "value": "Create or Update Cluster" + }, + "description": { + "$id": "2423", + "kind": "string", + "type": { + "$ref": "387" + }, + "value": "Create or Update any Cluster" + } + } + } + } + }, + { + "$id": "2424", + "kind": "model", + "type": { + "$ref": "363" + }, + "value": { + "$id": "2425", + "name": { + "$id": "2426", + "kind": "string", + "type": { + "$ref": "365" + }, + "value": "Microsoft.ServiceFabric/managedClusters/delete" + }, + "display": { + "$id": "2427", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "2428", + "provider": { + "$id": "2429", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "Microsoft ServiceFabric" + }, + "resource": { + "$id": "2430", + "kind": "string", + "type": { + "$ref": "379" + }, + "value": "managedClusters" + }, + "operation": { + "$id": "2431", + "kind": "string", + "type": { + "$ref": "383" + }, + "value": "Delete Cluster" + }, + "description": { + "$id": "2432", + "kind": "string", + "type": { + "$ref": "387" + }, + "value": "Delete any Cluster" + } + } + } + } + }, + { + "$id": "2433", + "kind": "model", + "type": { + "$ref": "363" + }, + "value": { + "$id": "2434", + "name": { + "$id": "2435", + "kind": "string", + "type": { + "$ref": "365" + }, + "value": "Microsoft.ServiceFabric/nodeTypes/read" + }, + "display": { + "$id": "2436", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "2437", + "provider": { + "$id": "2438", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "Microsoft ServiceFabric" + }, + "resource": { + "$id": "2439", + "kind": "string", + "type": { + "$ref": "379" + }, + "value": "nodeTypes" + }, + "operation": { + "$id": "2440", + "kind": "string", + "type": { + "$ref": "383" + }, + "value": "Read Node type" + }, + "description": { + "$id": "2441", + "kind": "string", + "type": { + "$ref": "387" + }, + "value": "Read any Node type" + } + } + } + } + }, + { + "$id": "2442", + "kind": "model", + "type": { + "$ref": "363" + }, + "value": { + "$id": "2443", + "name": { + "$id": "2444", + "kind": "string", + "type": { + "$ref": "365" + }, + "value": "Microsoft.ServiceFabric/nodeTypes/write" + }, + "display": { + "$id": "2445", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "2446", + "provider": { + "$id": "2447", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "Microsoft ServiceFabric" + }, + "resource": { + "$id": "2448", + "kind": "string", + "type": { + "$ref": "379" + }, + "value": "nodeTypes" + }, + "operation": { + "$id": "2449", + "kind": "string", + "type": { + "$ref": "383" + }, + "value": "Create or Update Node type" + }, + "description": { + "$id": "2450", + "kind": "string", + "type": { + "$ref": "387" + }, + "value": "Create or Update any Node type" + } + } + } + } + }, + { + "$id": "2451", + "kind": "model", + "type": { + "$ref": "363" + }, + "value": { + "$id": "2452", + "name": { + "$id": "2453", + "kind": "string", + "type": { + "$ref": "365" + }, + "value": "Microsoft.ServiceFabric/nodeTypes/delete" + }, + "display": { + "$id": "2454", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "2455", + "provider": { + "$id": "2456", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "Microsoft ServiceFabric" + }, + "resource": { + "$id": "2457", + "kind": "string", + "type": { + "$ref": "379" + }, + "value": "nodeTypes" + }, + "operation": { + "$id": "2458", + "kind": "string", + "type": { + "$ref": "383" + }, + "value": "Delete Node type" + }, + "description": { + "$id": "2459", + "kind": "string", + "type": { + "$ref": "387" + }, + "value": "Delete any Node type" + } + } + } + } + }, + { + "$id": "2460", + "kind": "model", + "type": { + "$ref": "363" + }, + "value": { + "$id": "2461", + "name": { + "$id": "2462", + "kind": "string", + "type": { + "$ref": "365" + }, + "value": "Microsoft.ServiceFabric/nodeTypes/restart/action" + }, + "display": { + "$id": "2463", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "2464", + "provider": { + "$id": "2465", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "Microsoft ServiceFabric" + }, + "resource": { + "$id": "2466", + "kind": "string", + "type": { + "$ref": "379" + }, + "value": "nodeTypes" + }, + "operation": { + "$id": "2467", + "kind": "string", + "type": { + "$ref": "383" + }, + "value": "Restart nodes from Node type" + }, + "description": { + "$id": "2468", + "kind": "string", + "type": { + "$ref": "387" + }, + "value": "Restart nodes from Node type" + } + } + } + } + }, + { + "$id": "2469", + "kind": "model", + "type": { + "$ref": "363" + }, + "value": { + "$id": "2470", + "name": { + "$id": "2471", + "kind": "string", + "type": { + "$ref": "365" + }, + "value": "Microsoft.ServiceFabric/nodeTypes/reimage/action" + }, + "display": { + "$id": "2472", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "2473", + "provider": { + "$id": "2474", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "Microsoft ServiceFabric" + }, + "resource": { + "$id": "2475", + "kind": "string", + "type": { + "$ref": "379" + }, + "value": "nodeTypes" + }, + "operation": { + "$id": "2476", + "kind": "string", + "type": { + "$ref": "383" + }, + "value": "Reimage nodes from Node type" + }, + "description": { + "$id": "2477", + "kind": "string", + "type": { + "$ref": "387" + }, + "value": "Reimage nodes from Node type" + } + } + } + } + }, + { + "$id": "2478", + "kind": "model", + "type": { + "$ref": "363" + }, + "value": { + "$id": "2479", + "name": { + "$id": "2480", + "kind": "string", + "type": { + "$ref": "365" + }, + "value": "Microsoft.ServiceFabric/nodeTypes/deleteNode/action" + }, + "display": { + "$id": "2481", + "kind": "model", + "type": { + "$ref": "373" + }, + "value": { + "$id": "2482", + "provider": { + "$id": "2483", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "Microsoft ServiceFabric" + }, + "resource": { + "$id": "2484", + "kind": "string", + "type": { + "$ref": "379" + }, + "value": "nodeTypes" + }, + "operation": { + "$id": "2485", + "kind": "string", + "type": { + "$ref": "383" + }, + "value": "Delete nodes from Node type" + }, + "description": { + "$id": "2486", + "kind": "string", + "type": { + "$ref": "387" + }, + "value": "Delete nodes from Node type" + } + } + } + } + } + ] + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "2487", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "2394" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "2488", + "type": { + "$id": "2489", + "kind": "array", + "name": "ArrayOperationResult", + "valueType": { + "$ref": "363" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "resultSegments": [ + "value" + ] + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Operations.list" + } + ], + "parameters": [ + { + "$id": "2490", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "2491", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "location": "Uri", + "isApiVersion": false, + "isContentType": false, + "isRequired": true, + "isEndpoint": true, + "skipUrlEncoding": false, + "explode": false, + "kind": "Client", + "defaultValue": { + "$id": "2492", + "type": { + "$id": "2493", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "2494", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "2495" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Operations", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "parent": { + "$ref": "2378" + } + }, + { + "$id": "2496", + "kind": "client", + "name": "Applications", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "methods": [ + { + "$id": "2497", + "kind": "basic", + "name": "get", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Get a Service Fabric managed application resource created or in the process of being created in the Service Fabric cluster resource.", + "operation": { + "$id": "2498", + "name": "get", + "resourceName": "ApplicationResource", + "doc": "Get a Service Fabric managed application resource created or in the process of being created in the Service Fabric cluster resource.", + "accessibility": "public", + "parameters": [ + { + "$id": "2499", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "2500", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "2501", + "type": { + "$id": "2502", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2503", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "2504", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2505", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2506", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2507", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "2508", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2509", + "name": "applicationName", + "nameInRequest": "applicationName", + "doc": "The name of the application resource.", + "type": { + "$id": "2510", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2511", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "2512", + "kind": "constant", + "valueType": { + "$id": "2513", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "2514", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "441" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Applications.get", + "decorators": [], + "examples": [ + { + "$id": "2515", + "kind": "http", + "name": "Get an application", + "description": "Get an application", + "filePath": "2025-03-01-preview/ApplicationGetOperation_example.json", + "parameters": [ + { + "$id": "2516", + "parameter": { + "$ref": "2499" + }, + "value": { + "$id": "2517", + "kind": "string", + "type": { + "$ref": "2500" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "2518", + "parameter": { + "$ref": "2509" + }, + "value": { + "$id": "2519", + "kind": "string", + "type": { + "$ref": "2510" + }, + "value": "myApp" + } + }, + { + "$id": "2520", + "parameter": { + "$ref": "2507" + }, + "value": { + "$id": "2521", + "kind": "string", + "type": { + "$ref": "2508" + }, + "value": "myCluster" + } + }, + { + "$id": "2522", + "parameter": { + "$ref": "2505" + }, + "value": { + "$id": "2523", + "kind": "string", + "type": { + "$ref": "2506" + }, + "value": "resRg" + } + }, + { + "$id": "2524", + "parameter": { + "$ref": "2503" + }, + "value": { + "$id": "2525", + "kind": "string", + "type": { + "$ref": "2504" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "2526", + "response": { + "$ref": "2514" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2527", + "kind": "model", + "type": { + "$ref": "441" + }, + "value": { + "$id": "2528", + "name": { + "$id": "2529", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "myApp" + }, + "type": { + "$id": "2530", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/applications" + }, + "id": { + "$id": "2531", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applications/myApp" + }, + "location": { + "$id": "2532", + "kind": "string", + "type": { + "$ref": "637" + }, + "value": "eastus" + }, + "properties": { + "$id": "2533", + "kind": "model", + "type": { + "$ref": "486" + }, + "value": { + "$id": "2534", + "parameters": { + "$id": "2535", + "kind": "dict", + "type": { + "$ref": "496" + }, + "value": { + "$id": "2536", + "param1": { + "$id": "2537", + "kind": "string", + "type": { + "$ref": "498" + }, + "value": "value1" + } + } + }, + "provisioningState": { + "$id": "2538", + "kind": "string", + "type": { + "$ref": "488" + }, + "value": "Updating" + }, + "upgradePolicy": { + "$id": "2539", + "kind": "model", + "type": { + "$ref": "502" + }, + "value": { + "$id": "2540", + "applicationHealthPolicy": { + "$id": "2541", + "kind": "model", + "type": { + "$ref": "504" + }, + "value": { + "$id": "2542", + "considerWarningAsError": { + "$id": "2543", + "kind": "boolean", + "type": { + "$ref": "506" + }, + "value": true + }, + "defaultServiceTypeHealthPolicy": { + "$id": "2544", + "kind": "model", + "type": { + "$ref": "514" + }, + "value": { + "$id": "2545", + "maxPercentUnhealthyPartitionsPerService": { + "$id": "2546", + "kind": "number", + "type": { + "$ref": "520" + }, + "value": 0 + }, + "maxPercentUnhealthyReplicasPerPartition": { + "$id": "2547", + "kind": "number", + "type": { + "$ref": "524" + }, + "value": 0 + }, + "maxPercentUnhealthyServices": { + "$id": "2548", + "kind": "number", + "type": { + "$ref": "516" + }, + "value": 0 + } + } + }, + "maxPercentUnhealthyDeployedApplications": { + "$id": "2549", + "kind": "number", + "type": { + "$ref": "510" + }, + "value": 0 + }, + "serviceTypeHealthPolicyMap": { + "$id": "2550", + "kind": "dict", + "type": { + "$ref": "530" + }, + "value": { + "$id": "2551", + "service1": { + "$id": "2552", + "kind": "model", + "type": { + "$ref": "514" + }, + "value": { + "$id": "2553", + "maxPercentUnhealthyPartitionsPerService": { + "$id": "2554", + "kind": "number", + "type": { + "$ref": "520" + }, + "value": 30 + }, + "maxPercentUnhealthyReplicasPerPartition": { + "$id": "2555", + "kind": "number", + "type": { + "$ref": "524" + }, + "value": 30 + }, + "maxPercentUnhealthyServices": { + "$id": "2556", + "kind": "number", + "type": { + "$ref": "516" + }, + "value": 30 + } + } + } + } + } + } + }, + "forceRestart": { + "$id": "2557", + "kind": "boolean", + "type": { + "$ref": "537" + }, + "value": false + }, + "instanceCloseDelayDuration": { + "$id": "2558", + "kind": "number", + "type": { + "$ref": "568" + }, + "value": 600 + }, + "recreateApplication": { + "$id": "2559", + "kind": "boolean", + "type": { + "$ref": "579" + }, + "value": false + }, + "rollingUpgradeMonitoringPolicy": { + "$id": "2560", + "kind": "model", + "type": { + "$ref": "541" + }, + "value": { + "$id": "2561", + "failureAction": { + "$id": "2562", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Rollback" + }, + "healthCheckRetryTimeout": { + "$id": "2563", + "kind": "string", + "type": { + "$ref": "554" + }, + "value": "00:10:00" + }, + "healthCheckStableDuration": { + "$id": "2564", + "kind": "string", + "type": { + "$ref": "550" + }, + "value": "00:05:00" + }, + "healthCheckWaitDuration": { + "$id": "2565", + "kind": "string", + "type": { + "$ref": "546" + }, + "value": "00:02:00" + }, + "upgradeDomainTimeout": { + "$id": "2566", + "kind": "string", + "type": { + "$ref": "562" + }, + "value": "00:15:00" + }, + "upgradeTimeout": { + "$id": "2567", + "kind": "string", + "type": { + "$ref": "558" + }, + "value": "01:00:00" + } + } + }, + "upgradeMode": { + "$id": "2568", + "kind": "string", + "type": { + "$ref": "8" + }, + "value": "UnmonitoredAuto" + }, + "upgradeReplicaSetCheckTimeout": { + "$id": "2569", + "kind": "number", + "type": { + "$ref": "575" + }, + "value": 3600 + } + } + }, + "version": { + "$id": "2570", + "kind": "string", + "type": { + "$ref": "492" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applicationTypes/myAppType/versions/1.0" + } + } + }, + "tags": { + "$id": "2571", + "kind": "dict", + "type": { + "$ref": "602" + }, + "value": { + "$id": "2572" + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "2573", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2574", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2575", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "2576", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2577", + "name": "applicationName", + "nameInRequest": "applicationName", + "doc": "The name of the application resource.", + "type": { + "$id": "2578", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2579", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "2512" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "2580", + "type": { + "$ref": "441" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Applications.get" + }, + { + "$id": "2581", + "kind": "lro", + "name": "createOrUpdate", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Create or update a Service Fabric managed application resource with the specified name.", + "operation": { + "$id": "2582", + "name": "createOrUpdate", + "resourceName": "ApplicationResource", + "doc": "Create or update a Service Fabric managed application resource with the specified name.", + "accessibility": "public", + "parameters": [ + { + "$id": "2583", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "2584", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "2585", + "type": { + "$id": "2586", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2587", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "2588", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2589", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2590", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2591", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "2592", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2593", + "name": "applicationName", + "nameInRequest": "applicationName", + "doc": "The name of the application resource.", + "type": { + "$id": "2594", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2595", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "2596", + "kind": "constant", + "valueType": { + "$id": "2597", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2598", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "2599", + "kind": "constant", + "valueType": { + "$id": "2600", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2601", + "name": "parameters", + "nameInRequest": "parameters", + "doc": "The application resource.", + "type": { + "$ref": "441" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "2602", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "441" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + { + "$id": "2603", + "statusCodes": [ + 202 + ], + "bodyType": { + "$ref": "441" + }, + "headers": [ + { + "$id": "2604", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "2605", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "2606", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + } + }, + { + "$id": "2607", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "2608", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "PUT", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "longRunning": { + "$id": "2609", + "finalStateVia": 1, + "finalResponse": { + "$id": "2610", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "441" + } + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Applications.createOrUpdate", + "decorators": [], + "examples": [ + { + "$id": "2611", + "kind": "http", + "name": "Put an application with maximum parameters", + "description": "Put an application with maximum parameters", + "filePath": "2025-03-01-preview/ApplicationPutOperation_example_max.json", + "parameters": [ + { + "$id": "2612", + "parameter": { + "$ref": "2583" + }, + "value": { + "$id": "2613", + "kind": "string", + "type": { + "$ref": "2584" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "2614", + "parameter": { + "$ref": "2593" + }, + "value": { + "$id": "2615", + "kind": "string", + "type": { + "$ref": "2594" + }, + "value": "myApp" + } + }, + { + "$id": "2616", + "parameter": { + "$ref": "2591" + }, + "value": { + "$id": "2617", + "kind": "string", + "type": { + "$ref": "2592" + }, + "value": "myCluster" + } + }, + { + "$id": "2618", + "parameter": { + "$ref": "2589" + }, + "value": { + "$id": "2619", + "kind": "string", + "type": { + "$ref": "2590" + }, + "value": "resRg" + } + }, + { + "$id": "2620", + "parameter": { + "$ref": "2587" + }, + "value": { + "$id": "2621", + "kind": "string", + "type": { + "$ref": "2588" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "2622", + "response": { + "$ref": "2602" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2623", + "kind": "model", + "type": { + "$ref": "441" + }, + "value": { + "$id": "2624", + "name": { + "$id": "2625", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "myApp" + }, + "type": { + "$id": "2626", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/applications" + }, + "id": { + "$id": "2627", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applications/myApp" + }, + "location": { + "$id": "2628", + "kind": "string", + "type": { + "$ref": "637" + }, + "value": "eastus" + }, + "properties": { + "$id": "2629", + "kind": "model", + "type": { + "$ref": "486" + }, + "value": { + "$id": "2630", + "parameters": { + "$id": "2631", + "kind": "dict", + "type": { + "$ref": "496" + }, + "value": { + "$id": "2632", + "param1": { + "$id": "2633", + "kind": "string", + "type": { + "$ref": "498" + }, + "value": "value1" + } + } + }, + "provisioningState": { + "$id": "2634", + "kind": "string", + "type": { + "$ref": "488" + }, + "value": "Creating" + }, + "upgradePolicy": { + "$id": "2635", + "kind": "model", + "type": { + "$ref": "502" + }, + "value": { + "$id": "2636", + "applicationHealthPolicy": { + "$id": "2637", + "kind": "model", + "type": { + "$ref": "504" + }, + "value": { + "$id": "2638", + "considerWarningAsError": { + "$id": "2639", + "kind": "boolean", + "type": { + "$ref": "506" + }, + "value": true + }, + "defaultServiceTypeHealthPolicy": { + "$id": "2640", + "kind": "model", + "type": { + "$ref": "514" + }, + "value": { + "$id": "2641", + "maxPercentUnhealthyPartitionsPerService": { + "$id": "2642", + "kind": "number", + "type": { + "$ref": "520" + }, + "value": 0 + }, + "maxPercentUnhealthyReplicasPerPartition": { + "$id": "2643", + "kind": "number", + "type": { + "$ref": "524" + }, + "value": 0 + }, + "maxPercentUnhealthyServices": { + "$id": "2644", + "kind": "number", + "type": { + "$ref": "516" + }, + "value": 0 + } + } + }, + "maxPercentUnhealthyDeployedApplications": { + "$id": "2645", + "kind": "number", + "type": { + "$ref": "510" + }, + "value": 0 + }, + "serviceTypeHealthPolicyMap": { + "$id": "2646", + "kind": "dict", + "type": { + "$ref": "530" + }, + "value": { + "$id": "2647", + "service1": { + "$id": "2648", + "kind": "model", + "type": { + "$ref": "514" + }, + "value": { + "$id": "2649", + "maxPercentUnhealthyPartitionsPerService": { + "$id": "2650", + "kind": "number", + "type": { + "$ref": "520" + }, + "value": 30 + }, + "maxPercentUnhealthyReplicasPerPartition": { + "$id": "2651", + "kind": "number", + "type": { + "$ref": "524" + }, + "value": 30 + }, + "maxPercentUnhealthyServices": { + "$id": "2652", + "kind": "number", + "type": { + "$ref": "516" + }, + "value": 30 + } + } + } + } + } + } + }, + "forceRestart": { + "$id": "2653", + "kind": "boolean", + "type": { + "$ref": "537" + }, + "value": false + }, + "instanceCloseDelayDuration": { + "$id": "2654", + "kind": "number", + "type": { + "$ref": "568" + }, + "value": 600 + }, + "recreateApplication": { + "$id": "2655", + "kind": "boolean", + "type": { + "$ref": "579" + }, + "value": false + }, + "rollingUpgradeMonitoringPolicy": { + "$id": "2656", + "kind": "model", + "type": { + "$ref": "541" + }, + "value": { + "$id": "2657", + "failureAction": { + "$id": "2658", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Rollback" + }, + "healthCheckRetryTimeout": { + "$id": "2659", + "kind": "string", + "type": { + "$ref": "554" + }, + "value": "00:10:00" + }, + "healthCheckStableDuration": { + "$id": "2660", + "kind": "string", + "type": { + "$ref": "550" + }, + "value": "00:05:00" + }, + "healthCheckWaitDuration": { + "$id": "2661", + "kind": "string", + "type": { + "$ref": "546" + }, + "value": "00:02:00" + }, + "upgradeDomainTimeout": { + "$id": "2662", + "kind": "string", + "type": { + "$ref": "562" + }, + "value": "00:15:00" + }, + "upgradeTimeout": { + "$id": "2663", + "kind": "string", + "type": { + "$ref": "558" + }, + "value": "01:00:00" + } + } + }, + "upgradeMode": { + "$id": "2664", + "kind": "string", + "type": { + "$ref": "8" + }, + "value": "UnmonitoredAuto" + }, + "upgradeReplicaSetCheckTimeout": { + "$id": "2665", + "kind": "number", + "type": { + "$ref": "575" + }, + "value": 3600 + } + } + }, + "version": { + "$id": "2666", + "kind": "string", + "type": { + "$ref": "492" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applicationTypes/myAppType/versions/1.0" + } + } + }, + "tags": { + "$id": "2667", + "kind": "dict", + "type": { + "$ref": "602" + }, + "value": { + "$id": "2668", + "a": { + "$id": "2669", + "kind": "string", + "type": { + "$ref": "604" + }, + "value": "b" + } + } + } + } + } + }, + { + "$id": "2670", + "response": { + "$ref": "2603" + }, + "statusCode": 202, + "bodyValue": { + "$id": "2671", + "kind": "model", + "type": { + "$ref": "441" + }, + "value": { + "$id": "2672", + "name": { + "$id": "2673", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "myApp" + }, + "type": { + "$id": "2674", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/applications" + }, + "id": { + "$id": "2675", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applications/myApp" + }, + "properties": { + "$id": "2676", + "kind": "model", + "type": { + "$ref": "486" + }, + "value": { + "$id": "2677", + "parameters": { + "$id": "2678", + "kind": "dict", + "type": { + "$ref": "496" + }, + "value": { + "$id": "2679", + "param1": { + "$id": "2680", + "kind": "string", + "type": { + "$ref": "498" + }, + "value": "value1" + } + } + }, + "provisioningState": { + "$id": "2681", + "kind": "string", + "type": { + "$ref": "488" + }, + "value": "Updating" + }, + "upgradePolicy": { + "$id": "2682", + "kind": "model", + "type": { + "$ref": "502" + }, + "value": { + "$id": "2683", + "applicationHealthPolicy": { + "$id": "2684", + "kind": "model", + "type": { + "$ref": "504" + }, + "value": { + "$id": "2685", + "considerWarningAsError": { + "$id": "2686", + "kind": "boolean", + "type": { + "$ref": "506" + }, + "value": true + }, + "defaultServiceTypeHealthPolicy": { + "$id": "2687", + "kind": "model", + "type": { + "$ref": "514" + }, + "value": { + "$id": "2688", + "maxPercentUnhealthyPartitionsPerService": { + "$id": "2689", + "kind": "number", + "type": { + "$ref": "520" + }, + "value": 0 + }, + "maxPercentUnhealthyReplicasPerPartition": { + "$id": "2690", + "kind": "number", + "type": { + "$ref": "524" + }, + "value": 0 + }, + "maxPercentUnhealthyServices": { + "$id": "2691", + "kind": "number", + "type": { + "$ref": "516" + }, + "value": 0 + } + } + }, + "maxPercentUnhealthyDeployedApplications": { + "$id": "2692", + "kind": "number", + "type": { + "$ref": "510" + }, + "value": 0 + }, + "serviceTypeHealthPolicyMap": { + "$id": "2693", + "kind": "dict", + "type": { + "$ref": "530" + }, + "value": { + "$id": "2694", + "service1": { + "$id": "2695", + "kind": "model", + "type": { + "$ref": "514" + }, + "value": { + "$id": "2696", + "maxPercentUnhealthyPartitionsPerService": { + "$id": "2697", + "kind": "number", + "type": { + "$ref": "520" + }, + "value": 30 + }, + "maxPercentUnhealthyReplicasPerPartition": { + "$id": "2698", + "kind": "number", + "type": { + "$ref": "524" + }, + "value": 30 + }, + "maxPercentUnhealthyServices": { + "$id": "2699", + "kind": "number", + "type": { + "$ref": "516" + }, + "value": 30 + } + } + } + } + } + } + }, + "forceRestart": { + "$id": "2700", + "kind": "boolean", + "type": { + "$ref": "537" + }, + "value": false + }, + "instanceCloseDelayDuration": { + "$id": "2701", + "kind": "number", + "type": { + "$ref": "568" + }, + "value": 600 + }, + "recreateApplication": { + "$id": "2702", + "kind": "boolean", + "type": { + "$ref": "579" + }, + "value": false + }, + "rollingUpgradeMonitoringPolicy": { + "$id": "2703", + "kind": "model", + "type": { + "$ref": "541" + }, + "value": { + "$id": "2704", + "failureAction": { + "$id": "2705", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Rollback" + }, + "healthCheckRetryTimeout": { + "$id": "2706", + "kind": "string", + "type": { + "$ref": "554" + }, + "value": "00:10:00" + }, + "healthCheckStableDuration": { + "$id": "2707", + "kind": "string", + "type": { + "$ref": "550" + }, + "value": "00:05:00" + }, + "healthCheckWaitDuration": { + "$id": "2708", + "kind": "string", + "type": { + "$ref": "546" + }, + "value": "00:02:00" + }, + "upgradeDomainTimeout": { + "$id": "2709", + "kind": "string", + "type": { + "$ref": "562" + }, + "value": "00:15:00" + }, + "upgradeTimeout": { + "$id": "2710", + "kind": "string", + "type": { + "$ref": "558" + }, + "value": "01:00:00" + } + } + }, + "upgradeMode": { + "$id": "2711", + "kind": "string", + "type": { + "$ref": "8" + }, + "value": "UnmonitoredAuto" + }, + "upgradeReplicaSetCheckTimeout": { + "$id": "2712", + "kind": "number", + "type": { + "$ref": "575" + }, + "value": 3600 + } + } + }, + "version": { + "$id": "2713", + "kind": "string", + "type": { + "$ref": "492" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applicationTypes/myAppType/versions/1.0" + } + } + }, + "tags": { + "$id": "2714", + "kind": "dict", + "type": { + "$ref": "602" + }, + "value": { + "$id": "2715", + "a": { + "$id": "2716", + "kind": "string", + "type": { + "$ref": "604" + }, + "value": "b" + } + } + } + } + } + } + ] + }, + { + "$id": "2717", + "kind": "http", + "name": "Put an application with minimum parameters", + "description": "Put an application with minimum parameters", + "filePath": "2025-03-01-preview/ApplicationPutOperation_example_min.json", + "parameters": [ + { + "$id": "2718", + "parameter": { + "$ref": "2583" + }, + "value": { + "$id": "2719", + "kind": "string", + "type": { + "$ref": "2584" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "2720", + "parameter": { + "$ref": "2593" + }, + "value": { + "$id": "2721", + "kind": "string", + "type": { + "$ref": "2594" + }, + "value": "myApp" + } + }, + { + "$id": "2722", + "parameter": { + "$ref": "2591" + }, + "value": { + "$id": "2723", + "kind": "string", + "type": { + "$ref": "2592" + }, + "value": "myCluster" + } + }, + { + "$id": "2724", + "parameter": { + "$ref": "2589" + }, + "value": { + "$id": "2725", + "kind": "string", + "type": { + "$ref": "2590" + }, + "value": "resRg" + } + }, + { + "$id": "2726", + "parameter": { + "$ref": "2587" + }, + "value": { + "$id": "2727", + "kind": "string", + "type": { + "$ref": "2588" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "2728", + "response": { + "$ref": "2602" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2729", + "kind": "model", + "type": { + "$ref": "441" + }, + "value": { + "$id": "2730", + "name": { + "$id": "2731", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "myApp" + }, + "type": { + "$id": "2732", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/applications" + }, + "id": { + "$id": "2733", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applications/myApp" + }, + "location": { + "$id": "2734", + "kind": "string", + "type": { + "$ref": "637" + }, + "value": "eastus" + }, + "properties": { + "$id": "2735", + "kind": "model", + "type": { + "$ref": "486" + }, + "value": { + "$id": "2736", + "parameters": { + "$id": "2737", + "kind": "dict", + "type": { + "$ref": "496" + }, + "value": { + "$id": "2738", + "param1": { + "$id": "2739", + "kind": "string", + "type": { + "$ref": "498" + }, + "value": "value1" + } + } + }, + "provisioningState": { + "$id": "2740", + "kind": "string", + "type": { + "$ref": "488" + }, + "value": "Updating" + }, + "upgradePolicy": { + "$id": "2741", + "kind": "model", + "type": { + "$ref": "502" + }, + "value": { + "$id": "2742", + "applicationHealthPolicy": { + "$id": "2743", + "kind": "model", + "type": { + "$ref": "504" + }, + "value": { + "$id": "2744", + "considerWarningAsError": { + "$id": "2745", + "kind": "boolean", + "type": { + "$ref": "506" + }, + "value": true + }, + "defaultServiceTypeHealthPolicy": { + "$id": "2746", + "kind": "model", + "type": { + "$ref": "514" + }, + "value": { + "$id": "2747", + "maxPercentUnhealthyPartitionsPerService": { + "$id": "2748", + "kind": "number", + "type": { + "$ref": "520" + }, + "value": 0 + }, + "maxPercentUnhealthyReplicasPerPartition": { + "$id": "2749", + "kind": "number", + "type": { + "$ref": "524" + }, + "value": 0 + }, + "maxPercentUnhealthyServices": { + "$id": "2750", + "kind": "number", + "type": { + "$ref": "516" + }, + "value": 0 + } + } + }, + "maxPercentUnhealthyDeployedApplications": { + "$id": "2751", + "kind": "number", + "type": { + "$ref": "510" + }, + "value": 0 + }, + "serviceTypeHealthPolicyMap": { + "$id": "2752", + "kind": "dict", + "type": { + "$ref": "530" + }, + "value": { + "$id": "2753", + "service1": { + "$id": "2754", + "kind": "model", + "type": { + "$ref": "514" + }, + "value": { + "$id": "2755", + "maxPercentUnhealthyPartitionsPerService": { + "$id": "2756", + "kind": "number", + "type": { + "$ref": "520" + }, + "value": 30 + }, + "maxPercentUnhealthyReplicasPerPartition": { + "$id": "2757", + "kind": "number", + "type": { + "$ref": "524" + }, + "value": 30 + }, + "maxPercentUnhealthyServices": { + "$id": "2758", + "kind": "number", + "type": { + "$ref": "516" + }, + "value": 30 + } + } + } + } + } + } + }, + "forceRestart": { + "$id": "2759", + "kind": "boolean", + "type": { + "$ref": "537" + }, + "value": false + }, + "instanceCloseDelayDuration": { + "$id": "2760", + "kind": "number", + "type": { + "$ref": "568" + }, + "value": 600 + }, + "recreateApplication": { + "$id": "2761", + "kind": "boolean", + "type": { + "$ref": "579" + }, + "value": false + }, + "rollingUpgradeMonitoringPolicy": { + "$id": "2762", + "kind": "model", + "type": { + "$ref": "541" + }, + "value": { + "$id": "2763", + "failureAction": { + "$id": "2764", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Rollback" + }, + "healthCheckRetryTimeout": { + "$id": "2765", + "kind": "string", + "type": { + "$ref": "554" + }, + "value": "00:10:00" + }, + "healthCheckStableDuration": { + "$id": "2766", + "kind": "string", + "type": { + "$ref": "550" + }, + "value": "00:05:00" + }, + "healthCheckWaitDuration": { + "$id": "2767", + "kind": "string", + "type": { + "$ref": "546" + }, + "value": "00:02:00" + }, + "upgradeDomainTimeout": { + "$id": "2768", + "kind": "string", + "type": { + "$ref": "562" + }, + "value": "00:15:00" + }, + "upgradeTimeout": { + "$id": "2769", + "kind": "string", + "type": { + "$ref": "558" + }, + "value": "01:00:00" + } + } + }, + "upgradeMode": { + "$id": "2770", + "kind": "string", + "type": { + "$ref": "8" + }, + "value": "UnmonitoredAuto" + }, + "upgradeReplicaSetCheckTimeout": { + "$id": "2771", + "kind": "number", + "type": { + "$ref": "575" + }, + "value": 3600 + } + } + }, + "version": { + "$id": "2772", + "kind": "string", + "type": { + "$ref": "492" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applicationTypes/myAppType/versions/1.0" + } + } + } + } + } + }, + { + "$id": "2773", + "response": { + "$ref": "2603" + }, + "statusCode": 202, + "bodyValue": { + "$id": "2774", + "kind": "model", + "type": { + "$ref": "441" + }, + "value": { + "$id": "2775", + "name": { + "$id": "2776", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "myCluster" + }, + "type": { + "$id": "2777", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/applications" + }, + "id": { + "$id": "2778", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applications/myApp" + }, + "properties": { + "$id": "2779", + "kind": "model", + "type": { + "$ref": "486" + }, + "value": { + "$id": "2780", + "provisioningState": { + "$id": "2781", + "kind": "string", + "type": { + "$ref": "488" + }, + "value": "Updating" + }, + "version": { + "$id": "2782", + "kind": "string", + "type": { + "$ref": "492" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applicationTypes/myAppType/versions/1.0" + } + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "2783", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2784", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2785", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "2786", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2787", + "name": "applicationName", + "nameInRequest": "applicationName", + "doc": "The name of the application resource.", + "type": { + "$id": "2788", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2789", + "name": "parameters", + "nameInRequest": "resource", + "doc": "The application resource.", + "type": { + "$ref": "441" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2790", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "2791", + "kind": "constant", + "valueType": { + "$id": "2792", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2793", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "2794", + "kind": "constant", + "valueType": { + "$id": "2795", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "2796", + "type": { + "$ref": "441" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Applications.createOrUpdate" + }, + { + "$id": "2797", + "kind": "basic", + "name": "update", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Updates the tags of an application resource of a given managed cluster.", + "operation": { + "$id": "2798", + "name": "update", + "resourceName": "ApplicationResource", + "doc": "Updates the tags of an application resource of a given managed cluster.", + "accessibility": "public", + "parameters": [ + { + "$id": "2799", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "2800", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "2801", + "type": { + "$id": "2802", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2803", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "2804", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2805", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2806", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2807", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "2808", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2809", + "name": "applicationName", + "nameInRequest": "applicationName", + "doc": "The name of the application resource.", + "type": { + "$id": "2810", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2811", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "2812", + "kind": "constant", + "valueType": { + "$id": "2813", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2814", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "2815", + "kind": "constant", + "valueType": { + "$id": "2816", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2817", + "name": "parameters", + "nameInRequest": "parameters", + "doc": "The application resource updated tags.", + "type": { + "$ref": "667" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "2818", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "441" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "PATCH", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": false, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Applications.update", + "decorators": [], + "examples": [ + { + "$id": "2819", + "kind": "http", + "name": "Patch an application", + "description": "Patch an application", + "filePath": "2025-03-01-preview/ApplicationPatchOperation_example.json", + "parameters": [ + { + "$id": "2820", + "parameter": { + "$ref": "2799" + }, + "value": { + "$id": "2821", + "kind": "string", + "type": { + "$ref": "2800" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "2822", + "parameter": { + "$ref": "2809" + }, + "value": { + "$id": "2823", + "kind": "string", + "type": { + "$ref": "2810" + }, + "value": "myApp" + } + }, + { + "$id": "2824", + "parameter": { + "$ref": "2807" + }, + "value": { + "$id": "2825", + "kind": "string", + "type": { + "$ref": "2808" + }, + "value": "myCluster" + } + }, + { + "$id": "2826", + "parameter": { + "$ref": "2805" + }, + "value": { + "$id": "2827", + "kind": "string", + "type": { + "$ref": "2806" + }, + "value": "resRg" + } + }, + { + "$id": "2828", + "parameter": { + "$ref": "2803" + }, + "value": { + "$id": "2829", + "kind": "string", + "type": { + "$ref": "2804" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "2830", + "response": { + "$ref": "2818" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2831", + "kind": "model", + "type": { + "$ref": "441" + }, + "value": { + "$id": "2832", + "name": { + "$id": "2833", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "myApp" + }, + "type": { + "$id": "2834", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/applications" + }, + "id": { + "$id": "2835", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applications/myApp" + }, + "location": { + "$id": "2836", + "kind": "string", + "type": { + "$ref": "637" + }, + "value": "eastus" + }, + "properties": { + "$id": "2837", + "kind": "model", + "type": { + "$ref": "486" + }, + "value": { + "$id": "2838", + "parameters": { + "$id": "2839", + "kind": "dict", + "type": { + "$ref": "496" + }, + "value": { + "$id": "2840", + "param1": { + "$id": "2841", + "kind": "string", + "type": { + "$ref": "498" + }, + "value": "value1" + } + } + }, + "provisioningState": { + "$id": "2842", + "kind": "string", + "type": { + "$ref": "488" + }, + "value": "Succeeded" + }, + "upgradePolicy": { + "$id": "2843", + "kind": "model", + "type": { + "$ref": "502" + }, + "value": { + "$id": "2844", + "applicationHealthPolicy": { + "$id": "2845", + "kind": "model", + "type": { + "$ref": "504" + }, + "value": { + "$id": "2846", + "considerWarningAsError": { + "$id": "2847", + "kind": "boolean", + "type": { + "$ref": "506" + }, + "value": true + }, + "defaultServiceTypeHealthPolicy": { + "$id": "2848", + "kind": "model", + "type": { + "$ref": "514" + }, + "value": { + "$id": "2849", + "maxPercentUnhealthyPartitionsPerService": { + "$id": "2850", + "kind": "number", + "type": { + "$ref": "520" + }, + "value": 0 + }, + "maxPercentUnhealthyReplicasPerPartition": { + "$id": "2851", + "kind": "number", + "type": { + "$ref": "524" + }, + "value": 0 + }, + "maxPercentUnhealthyServices": { + "$id": "2852", + "kind": "number", + "type": { + "$ref": "516" + }, + "value": 0 + } + } + }, + "maxPercentUnhealthyDeployedApplications": { + "$id": "2853", + "kind": "number", + "type": { + "$ref": "510" + }, + "value": 0 + }, + "serviceTypeHealthPolicyMap": { + "$id": "2854", + "kind": "dict", + "type": { + "$ref": "530" + }, + "value": { + "$id": "2855", + "service1": { + "$id": "2856", + "kind": "model", + "type": { + "$ref": "514" + }, + "value": { + "$id": "2857", + "maxPercentUnhealthyPartitionsPerService": { + "$id": "2858", + "kind": "number", + "type": { + "$ref": "520" + }, + "value": 30 + }, + "maxPercentUnhealthyReplicasPerPartition": { + "$id": "2859", + "kind": "number", + "type": { + "$ref": "524" + }, + "value": 30 + }, + "maxPercentUnhealthyServices": { + "$id": "2860", + "kind": "number", + "type": { + "$ref": "516" + }, + "value": 30 + } + } + } + } + } + } + }, + "forceRestart": { + "$id": "2861", + "kind": "boolean", + "type": { + "$ref": "537" + }, + "value": false + }, + "instanceCloseDelayDuration": { + "$id": "2862", + "kind": "number", + "type": { + "$ref": "568" + }, + "value": 600 + }, + "recreateApplication": { + "$id": "2863", + "kind": "boolean", + "type": { + "$ref": "579" + }, + "value": false + }, + "rollingUpgradeMonitoringPolicy": { + "$id": "2864", + "kind": "model", + "type": { + "$ref": "541" + }, + "value": { + "$id": "2865", + "failureAction": { + "$id": "2866", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "Rollback" + }, + "healthCheckRetryTimeout": { + "$id": "2867", + "kind": "string", + "type": { + "$ref": "554" + }, + "value": "00:10:00" + }, + "healthCheckStableDuration": { + "$id": "2868", + "kind": "string", + "type": { + "$ref": "550" + }, + "value": "00:05:00" + }, + "healthCheckWaitDuration": { + "$id": "2869", + "kind": "string", + "type": { + "$ref": "546" + }, + "value": "00:02:00" + }, + "upgradeDomainTimeout": { + "$id": "2870", + "kind": "string", + "type": { + "$ref": "562" + }, + "value": "00:15:00" + }, + "upgradeTimeout": { + "$id": "2871", + "kind": "string", + "type": { + "$ref": "558" + }, + "value": "01:00:00" + } + } + }, + "upgradeMode": { + "$id": "2872", + "kind": "string", + "type": { + "$ref": "8" + }, + "value": "UnmonitoredAuto" + }, + "upgradeReplicaSetCheckTimeout": { + "$id": "2873", + "kind": "number", + "type": { + "$ref": "575" + }, + "value": 3600 + } + } + }, + "version": { + "$id": "2874", + "kind": "string", + "type": { + "$ref": "492" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applicationTypes/myAppType/versions/1.0" + } + } + }, + "tags": { + "$id": "2875", + "kind": "dict", + "type": { + "$ref": "602" + }, + "value": { + "$id": "2876", + "a": { + "$id": "2877", + "kind": "string", + "type": { + "$ref": "604" + }, + "value": "b" + } + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "2878", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2879", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2880", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "2881", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2882", + "name": "applicationName", + "nameInRequest": "applicationName", + "doc": "The name of the application resource.", + "type": { + "$id": "2883", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2884", + "name": "parameters", + "nameInRequest": "properties", + "doc": "The application resource updated tags.", + "type": { + "$ref": "667" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2885", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$ref": "2812" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2886", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "2815" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "2887", + "type": { + "$ref": "441" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Applications.update" + }, + { + "$id": "2888", + "kind": "lro", + "name": "delete", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Delete a Service Fabric managed application resource with the specified name.", + "operation": { + "$id": "2889", + "name": "delete", + "resourceName": "ApplicationResource", + "doc": "Delete a Service Fabric managed application resource with the specified name.", + "accessibility": "public", + "parameters": [ + { + "$id": "2890", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "2891", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "2892", + "type": { + "$id": "2893", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2894", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "2895", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2896", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2897", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2898", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "2899", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2900", + "name": "applicationName", + "nameInRequest": "applicationName", + "doc": "The name of the application resource.", + "type": { + "$id": "2901", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2902", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "2903", + "kind": "constant", + "valueType": { + "$id": "2904", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "2905", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "2906", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "2907", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "2908", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + } + }, + { + "$id": "2909", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "2910", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false + }, + { + "$id": "2911", + "statusCodes": [ + 204 + ], + "headers": [], + "isErrorResponse": false + } + ], + "httpMethod": "DELETE", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}", + "bufferResponse": true, + "longRunning": { + "$id": "2912", + "finalStateVia": 1, + "finalResponse": { + "$id": "2913", + "statusCodes": [ + 204 + ] + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Applications.delete", + "decorators": [], + "examples": [ + { + "$id": "2914", + "kind": "http", + "name": "Delete an application", + "description": "Delete an application", + "filePath": "2025-03-01-preview/ApplicationDeleteOperation_example.json", + "parameters": [ + { + "$id": "2915", + "parameter": { + "$ref": "2890" + }, + "value": { + "$id": "2916", + "kind": "string", + "type": { + "$ref": "2891" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "2917", + "parameter": { + "$ref": "2900" + }, + "value": { + "$id": "2918", + "kind": "string", + "type": { + "$ref": "2901" + }, + "value": "myApp" + } + }, + { + "$id": "2919", + "parameter": { + "$ref": "2898" + }, + "value": { + "$id": "2920", + "kind": "string", + "type": { + "$ref": "2899" + }, + "value": "myCluster" + } + }, + { + "$id": "2921", + "parameter": { + "$ref": "2896" + }, + "value": { + "$id": "2922", + "kind": "string", + "type": { + "$ref": "2897" + }, + "value": "resRg" + } + }, + { + "$id": "2923", + "parameter": { + "$ref": "2894" + }, + "value": { + "$id": "2924", + "kind": "string", + "type": { + "$ref": "2895" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "2925", + "response": { + "$ref": "2905" + }, + "statusCode": 202 + }, + { + "$id": "2926", + "response": { + "$ref": "2911" + }, + "statusCode": 204 + } + ] + } + ] + }, + "parameters": [ + { + "$id": "2927", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2928", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2929", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "2930", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2931", + "name": "applicationName", + "nameInRequest": "applicationName", + "doc": "The name of the application resource.", + "type": { + "$id": "2932", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2933", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "2934", + "kind": "constant", + "valueType": { + "$id": "2935", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "2936" + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Applications.delete" + }, + { + "$id": "2937", + "kind": "paging", + "name": "list", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Gets all managed application resources created or in the process of being created in the Service Fabric cluster resource.", + "operation": { + "$id": "2938", + "name": "list", + "resourceName": "ApplicationResource", + "doc": "Gets all managed application resources created or in the process of being created in the Service Fabric cluster resource.", + "accessibility": "public", + "parameters": [ + { + "$id": "2939", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "2940", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "2941", + "type": { + "$id": "2942", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2943", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "2944", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2945", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2946", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2947", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "2948", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2949", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "2950", + "kind": "constant", + "valueType": { + "$id": "2951", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "2952", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "674" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications", + "bufferResponse": true, + "paging": { + "$id": "2953", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "2954", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Applications.list", + "decorators": [], + "examples": [ + { + "$id": "2955", + "kind": "http", + "name": "Get a list of application resources", + "description": "Get a list of application resources", + "filePath": "2025-03-01-preview/ApplicationListOperation_example.json", + "parameters": [ + { + "$id": "2956", + "parameter": { + "$ref": "2939" + }, + "value": { + "$id": "2957", + "kind": "string", + "type": { + "$ref": "2940" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "2958", + "parameter": { + "$ref": "2947" + }, + "value": { + "$id": "2959", + "kind": "string", + "type": { + "$ref": "2948" + }, + "value": "myCluster" + } + }, + { + "$id": "2960", + "parameter": { + "$ref": "2945" + }, + "value": { + "$id": "2961", + "kind": "string", + "type": { + "$ref": "2946" + }, + "value": "resRg" + } + }, + { + "$id": "2962", + "parameter": { + "$ref": "2943" + }, + "value": { + "$id": "2963", + "kind": "string", + "type": { + "$ref": "2944" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "2964", + "response": { + "$ref": "2952" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2965", + "kind": "model", + "type": { + "$ref": "674" + }, + "value": { + "$id": "2966", + "nextLink": { + "$id": "2967", + "kind": "string", + "type": { + "$ref": "680" + }, + "value": "http://examplelink.com" + }, + "value": { + "$id": "2968", + "kind": "array", + "type": { + "$ref": "676" + }, + "value": [ + { + "$id": "2969", + "kind": "model", + "type": { + "$ref": "441" + }, + "value": { + "$id": "2970", + "name": { + "$id": "2971", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "myApp" + }, + "type": { + "$id": "2972", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/applications" + }, + "id": { + "$id": "2973", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applications/myApp" + }, + "properties": { + "$id": "2974", + "kind": "model", + "type": { + "$ref": "486" + }, + "value": { + "$id": "2975", + "provisioningState": { + "$id": "2976", + "kind": "string", + "type": { + "$ref": "488" + }, + "value": "Updating" + }, + "version": { + "$id": "2977", + "kind": "string", + "type": { + "$ref": "492" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applicationTypes/myAppType/versions/1.0" + } + } + } + } + } + ] + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "2978", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2979", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2980", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "2981", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2982", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "2950" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "2983", + "type": { + "$id": "2984", + "kind": "array", + "name": "ArrayApplicationResource", + "valueType": { + "$ref": "441" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "resultSegments": [ + "value" + ] + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Applications.list" + }, + { + "$id": "2985", + "kind": "lro", + "name": "readUpgrade", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Get the status of the latest application upgrade. It will query the cluster to find the status of the latest application upgrade.", + "operation": { + "$id": "2986", + "name": "readUpgrade", + "resourceName": "Applications", + "doc": "Get the status of the latest application upgrade. It will query the cluster to find the status of the latest application upgrade.", + "accessibility": "public", + "parameters": [ + { + "$id": "2987", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "2988", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "2989", + "type": { + "$id": "2990", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2991", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "2992", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2993", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2994", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2995", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "2996", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2997", + "name": "applicationName", + "nameInRequest": "applicationName", + "doc": "The name of the application resource.", + "type": { + "$id": "2998", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2999", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "3000", + "kind": "constant", + "valueType": { + "$id": "3001", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "3002", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "3003", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "3004", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "3005", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + } + }, + { + "$id": "3006", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "3007", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/fetchUpgradeStatus", + "bufferResponse": true, + "longRunning": { + "$id": "3008", + "finalStateVia": 1, + "finalResponse": { + "$id": "3009", + "statusCodes": [ + 200 + ] + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Applications.readUpgrade", + "decorators": [], + "examples": [ + { + "$id": "3010", + "kind": "http", + "name": "Get an application upgrade", + "description": "Get an application upgrade", + "filePath": "2025-03-01-preview/ApplicationActionGetUpgrade_example.json", + "parameters": [ + { + "$id": "3011", + "parameter": { + "$ref": "2987" + }, + "value": { + "$id": "3012", + "kind": "string", + "type": { + "$ref": "2988" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "3013", + "parameter": { + "$ref": "2997" + }, + "value": { + "$id": "3014", + "kind": "string", + "type": { + "$ref": "2998" + }, + "value": "myApp" + } + }, + { + "$id": "3015", + "parameter": { + "$ref": "2995" + }, + "value": { + "$id": "3016", + "kind": "string", + "type": { + "$ref": "2996" + }, + "value": "myCluster" + } + }, + { + "$id": "3017", + "parameter": { + "$ref": "2993" + }, + "value": { + "$id": "3018", + "kind": "string", + "type": { + "$ref": "2994" + }, + "value": "resRg" + } + }, + { + "$id": "3019", + "parameter": { + "$ref": "2991" + }, + "value": { + "$id": "3020", + "kind": "string", + "type": { + "$ref": "2992" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "3021", + "response": { + "$ref": "3002" + }, + "statusCode": 202 + } + ] + } + ] + }, + "parameters": [ + { + "$id": "3022", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3023", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3024", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "3025", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3026", + "name": "applicationName", + "nameInRequest": "applicationName", + "doc": "The name of the application resource.", + "type": { + "$id": "3027", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3028", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "3029", + "kind": "constant", + "valueType": { + "$id": "3030", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "3031" + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Applications.readUpgrade" + }, + { + "$id": "3032", + "kind": "lro", + "name": "resumeUpgrade", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Send a request to resume the current application upgrade. This will resume the application upgrade from where it was paused.", + "operation": { + "$id": "3033", + "name": "resumeUpgrade", + "resourceName": "Applications", + "doc": "Send a request to resume the current application upgrade. This will resume the application upgrade from where it was paused.", + "accessibility": "public", + "parameters": [ + { + "$id": "3034", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "3035", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "3036", + "type": { + "$id": "3037", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3038", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "3039", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3040", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3041", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3042", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "3043", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3044", + "name": "applicationName", + "nameInRequest": "applicationName", + "doc": "The name of the application resource.", + "type": { + "$id": "3045", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3046", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "3047", + "kind": "constant", + "valueType": { + "$id": "3048", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3049", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "3050", + "kind": "constant", + "valueType": { + "$id": "3051", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3052", + "name": "parameters", + "nameInRequest": "parameters", + "doc": "The parameters for resuming an application upgrade.", + "type": { + "$ref": "684" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "3053", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "3054", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "3055", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "3056", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + } + }, + { + "$id": "3057", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "3058", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/resumeUpgrade", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "longRunning": { + "$id": "3059", + "finalStateVia": 1, + "finalResponse": { + "$id": "3060", + "statusCodes": [ + 200 + ] + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Applications.resumeUpgrade", + "decorators": [], + "examples": [ + { + "$id": "3061", + "kind": "http", + "name": "Resume upgrade", + "description": "Resume upgrade", + "filePath": "2025-03-01-preview/ApplicationActionResumeUpgrade_example.json", + "parameters": [ + { + "$id": "3062", + "parameter": { + "$ref": "3034" + }, + "value": { + "$id": "3063", + "kind": "string", + "type": { + "$ref": "3035" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "3064", + "parameter": { + "$ref": "3044" + }, + "value": { + "$id": "3065", + "kind": "string", + "type": { + "$ref": "3045" + }, + "value": "myApp" + } + }, + { + "$id": "3066", + "parameter": { + "$ref": "3042" + }, + "value": { + "$id": "3067", + "kind": "string", + "type": { + "$ref": "3043" + }, + "value": "myCluster" + } + }, + { + "$id": "3068", + "parameter": { + "$ref": "3040" + }, + "value": { + "$id": "3069", + "kind": "string", + "type": { + "$ref": "3041" + }, + "value": "resRg" + } + }, + { + "$id": "3070", + "parameter": { + "$ref": "3038" + }, + "value": { + "$id": "3071", + "kind": "string", + "type": { + "$ref": "3039" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "3072", + "response": { + "$ref": "3053" + }, + "statusCode": 202 + } + ] + } + ] + }, + "parameters": [ + { + "$id": "3073", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3074", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3075", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "3076", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3077", + "name": "applicationName", + "nameInRequest": "applicationName", + "doc": "The name of the application resource.", + "type": { + "$id": "3078", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3079", + "name": "parameters", + "nameInRequest": "body", + "doc": "The parameters for resuming an application upgrade.", + "type": { + "$ref": "684" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3080", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "3081", + "kind": "constant", + "valueType": { + "$id": "3082", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3083", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "3084", + "kind": "constant", + "valueType": { + "$id": "3085", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "3086" + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Applications.resumeUpgrade" + }, + { + "$id": "3087", + "kind": "lro", + "name": "startRollback", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Send a request to start a rollback of the current application upgrade. This will start rolling back the application to the previous version.", + "operation": { + "$id": "3088", + "name": "startRollback", + "resourceName": "Applications", + "doc": "Send a request to start a rollback of the current application upgrade. This will start rolling back the application to the previous version.", + "accessibility": "public", + "parameters": [ + { + "$id": "3089", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "3090", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "3091", + "type": { + "$id": "3092", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3093", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "3094", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3095", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3096", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3097", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "3098", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3099", + "name": "applicationName", + "nameInRequest": "applicationName", + "doc": "The name of the application resource.", + "type": { + "$id": "3100", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3101", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "3102", + "kind": "constant", + "valueType": { + "$id": "3103", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "3104", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "3105", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "3106", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "3107", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + } + }, + { + "$id": "3108", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "3109", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/startRollback", + "bufferResponse": true, + "longRunning": { + "$id": "3110", + "finalStateVia": 1, + "finalResponse": { + "$id": "3111", + "statusCodes": [ + 200 + ] + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Applications.startRollback", + "decorators": [], + "examples": [ + { + "$id": "3112", + "kind": "http", + "name": "Start an application upgrade rollback", + "description": "Start an application upgrade rollback", + "filePath": "2025-03-01-preview/ApplicationActionStartRollback_example.json", + "parameters": [ + { + "$id": "3113", + "parameter": { + "$ref": "3089" + }, + "value": { + "$id": "3114", + "kind": "string", + "type": { + "$ref": "3090" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "3115", + "parameter": { + "$ref": "3099" + }, + "value": { + "$id": "3116", + "kind": "string", + "type": { + "$ref": "3100" + }, + "value": "myApp" + } + }, + { + "$id": "3117", + "parameter": { + "$ref": "3097" + }, + "value": { + "$id": "3118", + "kind": "string", + "type": { + "$ref": "3098" + }, + "value": "myCluster" + } + }, + { + "$id": "3119", + "parameter": { + "$ref": "3095" + }, + "value": { + "$id": "3120", + "kind": "string", + "type": { + "$ref": "3096" + }, + "value": "resRg" + } + }, + { + "$id": "3121", + "parameter": { + "$ref": "3093" + }, + "value": { + "$id": "3122", + "kind": "string", + "type": { + "$ref": "3094" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "3123", + "response": { + "$ref": "3104" + }, + "statusCode": 202 + } + ] + } + ] + }, + "parameters": [ + { + "$id": "3124", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3125", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3126", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "3127", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3128", + "name": "applicationName", + "nameInRequest": "applicationName", + "doc": "The name of the application resource.", + "type": { + "$id": "3129", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3130", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "3131", + "kind": "constant", + "valueType": { + "$id": "3132", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "3133" + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Applications.startRollback" + } + ], + "parameters": [ + { + "$id": "3134", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "3135", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "location": "Uri", + "isApiVersion": false, + "isContentType": false, + "isRequired": true, + "isEndpoint": true, + "skipUrlEncoding": false, + "explode": false, + "kind": "Client", + "defaultValue": { + "$id": "3136", + "type": { + "$id": "3137", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "3138", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "3139" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Applications", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "parent": { + "$ref": "2378" + } + }, + { + "$id": "3140", + "kind": "client", + "name": "ApplicationTypes", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "methods": [ + { + "$id": "3141", + "kind": "basic", + "name": "get", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Get a Service Fabric application type name resource created or in the process of being created in the Service Fabric managed cluster resource.", + "operation": { + "$id": "3142", + "name": "get", + "resourceName": "ApplicationTypeResource", + "doc": "Get a Service Fabric application type name resource created or in the process of being created in the Service Fabric managed cluster resource.", + "accessibility": "public", + "parameters": [ + { + "$id": "3143", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "3144", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "3145", + "type": { + "$id": "3146", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3147", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "3148", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3149", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3150", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3151", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "3152", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3153", + "name": "applicationTypeName", + "nameInRequest": "applicationTypeName", + "doc": "The name of the application type name resource.", + "type": { + "$id": "3154", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3155", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "3156", + "kind": "constant", + "valueType": { + "$id": "3157", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "3158", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "689" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypes.get", + "decorators": [], + "examples": [ + { + "$id": "3159", + "kind": "http", + "name": "Get an application type", + "description": "Get an application type", + "filePath": "2025-03-01-preview/ApplicationTypeNameGetOperation_example.json", + "parameters": [ + { + "$id": "3160", + "parameter": { + "$ref": "3143" + }, + "value": { + "$id": "3161", + "kind": "string", + "type": { + "$ref": "3144" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "3162", + "parameter": { + "$ref": "3153" + }, + "value": { + "$id": "3163", + "kind": "string", + "type": { + "$ref": "3154" + }, + "value": "myAppType" + } + }, + { + "$id": "3164", + "parameter": { + "$ref": "3151" + }, + "value": { + "$id": "3165", + "kind": "string", + "type": { + "$ref": "3152" + }, + "value": "myCluster" + } + }, + { + "$id": "3166", + "parameter": { + "$ref": "3149" + }, + "value": { + "$id": "3167", + "kind": "string", + "type": { + "$ref": "3150" + }, + "value": "resRg" + } + }, + { + "$id": "3168", + "parameter": { + "$ref": "3147" + }, + "value": { + "$id": "3169", + "kind": "string", + "type": { + "$ref": "3148" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "3170", + "response": { + "$ref": "3158" + }, + "statusCode": 200, + "bodyValue": { + "$id": "3171", + "kind": "model", + "type": { + "$ref": "689" + }, + "value": { + "$id": "3172", + "name": { + "$id": "3173", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "myAppType" + }, + "type": { + "$id": "3174", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/applicationTypes" + }, + "id": { + "$id": "3175", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applicationTypes/myAppType" + }, + "properties": { + "$id": "3176", + "kind": "model", + "type": { + "$ref": "691" + }, + "value": { + "$id": "3177", + "provisioningState": { + "$id": "3178", + "kind": "string", + "type": { + "$ref": "693" + }, + "value": "Succeeded" + } + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "3179", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3180", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3181", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "3182", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3183", + "name": "applicationTypeName", + "nameInRequest": "applicationTypeName", + "doc": "The name of the application type name resource.", + "type": { + "$id": "3184", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3185", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "3156" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "3186", + "type": { + "$ref": "689" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypes.get" + }, + { + "$id": "3187", + "kind": "basic", + "name": "createOrUpdate", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Create or update a Service Fabric managed application type name resource with the specified name.", + "operation": { + "$id": "3188", + "name": "createOrUpdate", + "resourceName": "ApplicationTypeResource", + "doc": "Create or update a Service Fabric managed application type name resource with the specified name.", + "accessibility": "public", + "parameters": [ + { + "$id": "3189", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "3190", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "3191", + "type": { + "$id": "3192", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3193", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "3194", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3195", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3196", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3197", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "3198", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3199", + "name": "applicationTypeName", + "nameInRequest": "applicationTypeName", + "doc": "The name of the application type name resource.", + "type": { + "$id": "3200", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3201", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "3202", + "kind": "constant", + "valueType": { + "$id": "3203", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3204", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "3205", + "kind": "constant", + "valueType": { + "$id": "3206", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3207", + "name": "parameters", + "nameInRequest": "parameters", + "doc": "The application type name resource.", + "type": { + "$ref": "689" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "3208", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "689" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "PUT", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypes.createOrUpdate", + "decorators": [], + "examples": [ + { + "$id": "3209", + "kind": "http", + "name": "Put an application type", + "description": "Put an application type", + "filePath": "2025-03-01-preview/ApplicationTypeNamePutOperation_example.json", + "parameters": [ + { + "$id": "3210", + "parameter": { + "$ref": "3189" + }, + "value": { + "$id": "3211", + "kind": "string", + "type": { + "$ref": "3190" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "3212", + "parameter": { + "$ref": "3199" + }, + "value": { + "$id": "3213", + "kind": "string", + "type": { + "$ref": "3200" + }, + "value": "myAppType" + } + }, + { + "$id": "3214", + "parameter": { + "$ref": "3197" + }, + "value": { + "$id": "3215", + "kind": "string", + "type": { + "$ref": "3198" + }, + "value": "myCluster" + } + }, + { + "$id": "3216", + "parameter": { + "$ref": "3195" + }, + "value": { + "$id": "3217", + "kind": "string", + "type": { + "$ref": "3196" + }, + "value": "resRg" + } + }, + { + "$id": "3218", + "parameter": { + "$ref": "3193" + }, + "value": { + "$id": "3219", + "kind": "string", + "type": { + "$ref": "3194" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "3220", + "response": { + "$ref": "3208" + }, + "statusCode": 200, + "bodyValue": { + "$id": "3221", + "kind": "model", + "type": { + "$ref": "689" + }, + "value": { + "$id": "3222", + "name": { + "$id": "3223", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "myAppType" + }, + "type": { + "$id": "3224", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/applicationTypes" + }, + "id": { + "$id": "3225", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applicationTypes/myAppType" + }, + "properties": { + "$id": "3226", + "kind": "model", + "type": { + "$ref": "691" + }, + "value": { + "$id": "3227", + "provisioningState": { + "$id": "3228", + "kind": "string", + "type": { + "$ref": "693" + }, + "value": "Succeeded" + } + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "3229", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3230", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3231", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "3232", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3233", + "name": "applicationTypeName", + "nameInRequest": "applicationTypeName", + "doc": "The name of the application type name resource.", + "type": { + "$id": "3234", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3235", + "name": "parameters", + "nameInRequest": "resource", + "doc": "The application type name resource.", + "type": { + "$ref": "689" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3236", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$ref": "3202" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3237", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "3205" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "3238", + "type": { + "$ref": "689" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypes.createOrUpdate" + }, + { + "$id": "3239", + "kind": "basic", + "name": "update", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Updates the tags of an application type resource of a given managed cluster.", + "operation": { + "$id": "3240", + "name": "update", + "resourceName": "ApplicationTypeResource", + "doc": "Updates the tags of an application type resource of a given managed cluster.", + "accessibility": "public", + "parameters": [ + { + "$id": "3241", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "3242", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "3243", + "type": { + "$id": "3244", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3245", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "3246", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3247", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3248", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3249", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "3250", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3251", + "name": "applicationTypeName", + "nameInRequest": "applicationTypeName", + "doc": "The name of the application type name resource.", + "type": { + "$id": "3252", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3253", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "3254", + "kind": "constant", + "valueType": { + "$id": "3255", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3256", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "3257", + "kind": "constant", + "valueType": { + "$id": "3258", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3259", + "name": "parameters", + "nameInRequest": "parameters", + "doc": "The application type resource updated tags.", + "type": { + "$ref": "710" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "3260", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "689" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "PATCH", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": false, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypes.update", + "decorators": [], + "examples": [ + { + "$id": "3261", + "kind": "http", + "name": "Patch an application type", + "description": "Patch an application type", + "filePath": "2025-03-01-preview/ApplicationTypeNamePatchOperation_example.json", + "parameters": [ + { + "$id": "3262", + "parameter": { + "$ref": "3241" + }, + "value": { + "$id": "3263", + "kind": "string", + "type": { + "$ref": "3242" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "3264", + "parameter": { + "$ref": "3251" + }, + "value": { + "$id": "3265", + "kind": "string", + "type": { + "$ref": "3252" + }, + "value": "myAppType" + } + }, + { + "$id": "3266", + "parameter": { + "$ref": "3249" + }, + "value": { + "$id": "3267", + "kind": "string", + "type": { + "$ref": "3250" + }, + "value": "myCluster" + } + }, + { + "$id": "3268", + "parameter": { + "$ref": "3247" + }, + "value": { + "$id": "3269", + "kind": "string", + "type": { + "$ref": "3248" + }, + "value": "resRg" + } + }, + { + "$id": "3270", + "parameter": { + "$ref": "3245" + }, + "value": { + "$id": "3271", + "kind": "string", + "type": { + "$ref": "3246" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "3272", + "response": { + "$ref": "3260" + }, + "statusCode": 200, + "bodyValue": { + "$id": "3273", + "kind": "model", + "type": { + "$ref": "689" + }, + "value": { + "$id": "3274", + "name": { + "$id": "3275", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "myAppType" + }, + "type": { + "$id": "3276", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/applicationTypes" + }, + "id": { + "$id": "3277", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applicationTypes/myAppType" + }, + "properties": { + "$id": "3278", + "kind": "model", + "type": { + "$ref": "691" + }, + "value": { + "$id": "3279", + "provisioningState": { + "$id": "3280", + "kind": "string", + "type": { + "$ref": "693" + }, + "value": "Succeeded" + } + } + }, + "tags": { + "$id": "3281", + "kind": "dict", + "type": { + "$ref": "701" + }, + "value": { + "$id": "3282", + "a": { + "$id": "3283", + "kind": "string", + "type": { + "$ref": "703" + }, + "value": "b" + } + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "3284", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3285", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3286", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "3287", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3288", + "name": "applicationTypeName", + "nameInRequest": "applicationTypeName", + "doc": "The name of the application type name resource.", + "type": { + "$id": "3289", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3290", + "name": "parameters", + "nameInRequest": "properties", + "doc": "The application type resource updated tags.", + "type": { + "$ref": "710" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3291", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$ref": "3254" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3292", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "3257" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "3293", + "type": { + "$ref": "689" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypes.update" + }, + { + "$id": "3294", + "kind": "lro", + "name": "delete", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Delete a Service Fabric managed application type name resource with the specified name.", + "operation": { + "$id": "3295", + "name": "delete", + "resourceName": "ApplicationTypeResource", + "doc": "Delete a Service Fabric managed application type name resource with the specified name.", + "accessibility": "public", + "parameters": [ + { + "$id": "3296", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "3297", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "3298", + "type": { + "$id": "3299", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3300", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "3301", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3302", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3303", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3304", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "3305", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3306", + "name": "applicationTypeName", + "nameInRequest": "applicationTypeName", + "doc": "The name of the application type name resource.", + "type": { + "$id": "3307", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3308", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "3309", + "kind": "constant", + "valueType": { + "$id": "3310", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "3311", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "3312", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "3313", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "3314", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + } + }, + { + "$id": "3315", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "3316", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false + }, + { + "$id": "3317", + "statusCodes": [ + 204 + ], + "headers": [], + "isErrorResponse": false + } + ], + "httpMethod": "DELETE", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}", + "bufferResponse": true, + "longRunning": { + "$id": "3318", + "finalStateVia": 1, + "finalResponse": { + "$id": "3319", + "statusCodes": [ + 204 + ] + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypes.delete", + "decorators": [], + "examples": [ + { + "$id": "3320", + "kind": "http", + "name": "Delete an application type", + "description": "Delete an application type", + "filePath": "2025-03-01-preview/ApplicationTypeNameDeleteOperation_example.json", + "parameters": [ + { + "$id": "3321", + "parameter": { + "$ref": "3296" + }, + "value": { + "$id": "3322", + "kind": "string", + "type": { + "$ref": "3297" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "3323", + "parameter": { + "$ref": "3306" + }, + "value": { + "$id": "3324", + "kind": "string", + "type": { + "$ref": "3307" + }, + "value": "myAppType" + } + }, + { + "$id": "3325", + "parameter": { + "$ref": "3304" + }, + "value": { + "$id": "3326", + "kind": "string", + "type": { + "$ref": "3305" + }, + "value": "myCluster" + } + }, + { + "$id": "3327", + "parameter": { + "$ref": "3302" + }, + "value": { + "$id": "3328", + "kind": "string", + "type": { + "$ref": "3303" + }, + "value": "resRg" + } + }, + { + "$id": "3329", + "parameter": { + "$ref": "3300" + }, + "value": { + "$id": "3330", + "kind": "string", + "type": { + "$ref": "3301" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "3331", + "response": { + "$ref": "3311" + }, + "statusCode": 202 + }, + { + "$id": "3332", + "response": { + "$ref": "3317" + }, + "statusCode": 204 + } + ] + } + ] + }, + "parameters": [ + { + "$id": "3333", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3334", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3335", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "3336", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3337", + "name": "applicationTypeName", + "nameInRequest": "applicationTypeName", + "doc": "The name of the application type name resource.", + "type": { + "$id": "3338", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3339", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "3340", + "kind": "constant", + "valueType": { + "$id": "3341", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "3342" + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypes.delete" + }, + { + "$id": "3343", + "kind": "paging", + "name": "list", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Gets all application type name resources created or in the process of being created in the Service Fabric managed cluster resource.", + "operation": { + "$id": "3344", + "name": "list", + "resourceName": "ApplicationTypeResource", + "doc": "Gets all application type name resources created or in the process of being created in the Service Fabric managed cluster resource.", + "accessibility": "public", + "parameters": [ + { + "$id": "3345", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "3346", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "3347", + "type": { + "$id": "3348", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3349", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "3350", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3351", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3352", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3353", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "3354", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3355", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "3356", + "kind": "constant", + "valueType": { + "$id": "3357", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "3358", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "717" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes", + "bufferResponse": true, + "paging": { + "$id": "3359", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "3360", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypes.list", + "decorators": [], + "examples": [ + { + "$id": "3361", + "kind": "http", + "name": "Get a list of application type name resources", + "description": "Get a list of application type name resources", + "filePath": "2025-03-01-preview/ApplicationTypeNameListOperation_example.json", + "parameters": [ + { + "$id": "3362", + "parameter": { + "$ref": "3345" + }, + "value": { + "$id": "3363", + "kind": "string", + "type": { + "$ref": "3346" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "3364", + "parameter": { + "$ref": "3353" + }, + "value": { + "$id": "3365", + "kind": "string", + "type": { + "$ref": "3354" + }, + "value": "myCluster" + } + }, + { + "$id": "3366", + "parameter": { + "$ref": "3351" + }, + "value": { + "$id": "3367", + "kind": "string", + "type": { + "$ref": "3352" + }, + "value": "resRg" + } + }, + { + "$id": "3368", + "parameter": { + "$ref": "3349" + }, + "value": { + "$id": "3369", + "kind": "string", + "type": { + "$ref": "3350" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "3370", + "response": { + "$ref": "3358" + }, + "statusCode": 200, + "bodyValue": { + "$id": "3371", + "kind": "model", + "type": { + "$ref": "717" + }, + "value": { + "$id": "3372", + "nextLink": { + "$id": "3373", + "kind": "string", + "type": { + "$ref": "723" + }, + "value": "http://examplelink.com" + }, + "value": { + "$id": "3374", + "kind": "array", + "type": { + "$ref": "719" + }, + "value": [ + { + "$id": "3375", + "kind": "model", + "type": { + "$ref": "689" + }, + "value": { + "$id": "3376", + "name": { + "$id": "3377", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "myAppType" + }, + "type": { + "$id": "3378", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/applicationTypes" + }, + "id": { + "$id": "3379", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applicationTypes/myAppType" + }, + "properties": { + "$id": "3380", + "kind": "model", + "type": { + "$ref": "691" + }, + "value": { + "$id": "3381", + "provisioningState": { + "$id": "3382", + "kind": "string", + "type": { + "$ref": "693" + }, + "value": "Succeeded" + } + } + } + } + } + ] + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "3383", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3384", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3385", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "3386", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3387", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "3356" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "3388", + "type": { + "$id": "3389", + "kind": "array", + "name": "ArrayApplicationTypeResource", + "valueType": { + "$ref": "689" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "resultSegments": [ + "value" + ] + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypes.list" + } + ], + "parameters": [ + { + "$id": "3390", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "3391", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "location": "Uri", + "isApiVersion": false, + "isContentType": false, + "isRequired": true, + "isEndpoint": true, + "skipUrlEncoding": false, + "explode": false, + "kind": "Client", + "defaultValue": { + "$id": "3392", + "type": { + "$id": "3393", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "3394", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "3395" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypes", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "parent": { + "$ref": "2378" + } + }, + { + "$id": "3396", + "kind": "client", + "name": "ApplicationTypeVersions", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "methods": [ + { + "$id": "3397", + "kind": "basic", + "name": "get", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Get a Service Fabric managed application type version resource created or in the process of being created in the Service Fabric managed application type name resource.", + "operation": { + "$id": "3398", + "name": "get", + "resourceName": "ApplicationTypeVersionResource", + "doc": "Get a Service Fabric managed application type version resource created or in the process of being created in the Service Fabric managed application type name resource.", + "accessibility": "public", + "parameters": [ + { + "$id": "3399", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "3400", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "3401", + "type": { + "$id": "3402", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3403", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "3404", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3405", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3406", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3407", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "3408", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3409", + "name": "applicationTypeName", + "nameInRequest": "applicationTypeName", + "doc": "The name of the application type name resource.", + "type": { + "$id": "3410", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3411", + "name": "version", + "nameInRequest": "version", + "doc": "The application type version.", + "type": { + "$id": "3412", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3413", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "3414", + "kind": "constant", + "valueType": { + "$id": "3415", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "3416", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "727" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeVersions.get", + "decorators": [], + "examples": [ + { + "$id": "3417", + "kind": "http", + "name": "Get an application type version", + "description": "Get an application type version", + "filePath": "2025-03-01-preview/ApplicationTypeVersionGetOperation_example.json", + "parameters": [ + { + "$id": "3418", + "parameter": { + "$ref": "3399" + }, + "value": { + "$id": "3419", + "kind": "string", + "type": { + "$ref": "3400" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "3420", + "parameter": { + "$ref": "3409" + }, + "value": { + "$id": "3421", + "kind": "string", + "type": { + "$ref": "3410" + }, + "value": "myAppType" + } + }, + { + "$id": "3422", + "parameter": { + "$ref": "3407" + }, + "value": { + "$id": "3423", + "kind": "string", + "type": { + "$ref": "3408" + }, + "value": "myCluster" + } + }, + { + "$id": "3424", + "parameter": { + "$ref": "3405" + }, + "value": { + "$id": "3425", + "kind": "string", + "type": { + "$ref": "3406" + }, + "value": "resRg" + } + }, + { + "$id": "3426", + "parameter": { + "$ref": "3403" + }, + "value": { + "$id": "3427", + "kind": "string", + "type": { + "$ref": "3404" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + }, + { + "$id": "3428", + "parameter": { + "$ref": "3411" + }, + "value": { + "$id": "3429", + "kind": "string", + "type": { + "$ref": "3412" + }, + "value": "1.0" + } + } + ], + "responses": [ + { + "$id": "3430", + "response": { + "$ref": "3416" + }, + "statusCode": 200, + "bodyValue": { + "$id": "3431", + "kind": "model", + "type": { + "$ref": "727" + }, + "value": { + "$id": "3432", + "name": { + "$id": "3433", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "1.0" + }, + "type": { + "$id": "3434", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/applicationTypes/versions" + }, + "id": { + "$id": "3435", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applicationTypes/myAppType/versions/1.0" + }, + "properties": { + "$id": "3436", + "kind": "model", + "type": { + "$ref": "729" + }, + "value": { + "$id": "3437", + "appPackageUrl": { + "$id": "3438", + "kind": "string", + "type": { + "$ref": "735" + }, + "value": "http://fakelink.test.com/MyAppType" + }, + "provisioningState": { + "$id": "3439", + "kind": "string", + "type": { + "$ref": "731" + }, + "value": "Updating" + } + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "3440", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3441", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3442", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "3443", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3444", + "name": "applicationTypeName", + "nameInRequest": "applicationTypeName", + "doc": "The name of the application type name resource.", + "type": { + "$id": "3445", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3446", + "name": "version", + "nameInRequest": "version", + "doc": "The application type version.", + "type": { + "$id": "3447", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3448", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "3414" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "3449", + "type": { + "$ref": "727" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeVersions.get" + }, + { + "$id": "3450", + "kind": "lro", + "name": "createOrUpdate", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Create or update a Service Fabric managed application type version resource with the specified name.", + "operation": { + "$id": "3451", + "name": "createOrUpdate", + "resourceName": "ApplicationTypeVersionResource", + "doc": "Create or update a Service Fabric managed application type version resource with the specified name.", + "accessibility": "public", + "parameters": [ + { + "$id": "3452", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "3453", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "3454", + "type": { + "$id": "3455", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3456", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "3457", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3458", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3459", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3460", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "3461", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3462", + "name": "applicationTypeName", + "nameInRequest": "applicationTypeName", + "doc": "The name of the application type name resource.", + "type": { + "$id": "3463", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3464", + "name": "version", + "nameInRequest": "version", + "doc": "The application type version.", + "type": { + "$id": "3465", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3466", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "3467", + "kind": "constant", + "valueType": { + "$id": "3468", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3469", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "3470", + "kind": "constant", + "valueType": { + "$id": "3471", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3472", + "name": "parameters", + "nameInRequest": "parameters", + "doc": "The application type version resource.", + "type": { + "$ref": "727" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "3473", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "727" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + { + "$id": "3474", + "statusCodes": [ + 202 + ], + "bodyType": { + "$ref": "727" + }, + "headers": [ + { + "$id": "3475", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "3476", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "3477", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + } + }, + { + "$id": "3478", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "3479", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "PUT", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "longRunning": { + "$id": "3480", + "finalStateVia": 1, + "finalResponse": { + "$id": "3481", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "727" + } + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeVersions.createOrUpdate", + "decorators": [], + "examples": [ + { + "$id": "3482", + "kind": "http", + "name": "Put an application type version", + "description": "Put an application type version", + "filePath": "2025-03-01-preview/ApplicationTypeVersionPutOperation_example.json", + "parameters": [ + { + "$id": "3483", + "parameter": { + "$ref": "3452" + }, + "value": { + "$id": "3484", + "kind": "string", + "type": { + "$ref": "3453" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "3485", + "parameter": { + "$ref": "3462" + }, + "value": { + "$id": "3486", + "kind": "string", + "type": { + "$ref": "3463" + }, + "value": "myAppType" + } + }, + { + "$id": "3487", + "parameter": { + "$ref": "3460" + }, + "value": { + "$id": "3488", + "kind": "string", + "type": { + "$ref": "3461" + }, + "value": "myCluster" + } + }, + { + "$id": "3489", + "parameter": { + "$ref": "3458" + }, + "value": { + "$id": "3490", + "kind": "string", + "type": { + "$ref": "3459" + }, + "value": "resRg" + } + }, + { + "$id": "3491", + "parameter": { + "$ref": "3456" + }, + "value": { + "$id": "3492", + "kind": "string", + "type": { + "$ref": "3457" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + }, + { + "$id": "3493", + "parameter": { + "$ref": "3464" + }, + "value": { + "$id": "3494", + "kind": "string", + "type": { + "$ref": "3465" + }, + "value": "1.0" + } + } + ], + "responses": [ + { + "$id": "3495", + "response": { + "$ref": "3473" + }, + "statusCode": 200, + "bodyValue": { + "$id": "3496", + "kind": "model", + "type": { + "$ref": "727" + }, + "value": { + "$id": "3497", + "name": { + "$id": "3498", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "1.0" + }, + "type": { + "$id": "3499", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/applicationTypes/versions" + }, + "id": { + "$id": "3500", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applicationTypes/myAppType/versions/1.0" + }, + "properties": { + "$id": "3501", + "kind": "model", + "type": { + "$ref": "729" + }, + "value": { + "$id": "3502", + "appPackageUrl": { + "$id": "3503", + "kind": "string", + "type": { + "$ref": "735" + }, + "value": "http://fakelink.test.com/MyAppType" + }, + "provisioningState": { + "$id": "3504", + "kind": "string", + "type": { + "$ref": "731" + }, + "value": "Creating" + } + } + } + } + } + }, + { + "$id": "3505", + "response": { + "$ref": "3474" + }, + "statusCode": 202, + "bodyValue": { + "$id": "3506", + "kind": "model", + "type": { + "$ref": "727" + }, + "value": { + "$id": "3507", + "name": { + "$id": "3508", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "1.0" + }, + "type": { + "$id": "3509", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/applicationTypes/versions" + }, + "id": { + "$id": "3510", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applicationTypes/myAppType/versions/1.0" + }, + "properties": { + "$id": "3511", + "kind": "model", + "type": { + "$ref": "729" + }, + "value": { + "$id": "3512", + "appPackageUrl": { + "$id": "3513", + "kind": "string", + "type": { + "$ref": "735" + }, + "value": "http://fakelink.test.com/MyAppType" + }, + "provisioningState": { + "$id": "3514", + "kind": "string", + "type": { + "$ref": "731" + }, + "value": "Updating" + } + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "3515", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3516", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3517", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "3518", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3519", + "name": "applicationTypeName", + "nameInRequest": "applicationTypeName", + "doc": "The name of the application type name resource.", + "type": { + "$id": "3520", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3521", + "name": "version", + "nameInRequest": "version", + "doc": "The application type version.", + "type": { + "$id": "3522", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3523", + "name": "parameters", + "nameInRequest": "resource", + "doc": "The application type version resource.", + "type": { + "$ref": "727" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3524", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "3525", + "kind": "constant", + "valueType": { + "$id": "3526", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3527", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "3528", + "kind": "constant", + "valueType": { + "$id": "3529", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "3530", + "type": { + "$ref": "727" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeVersions.createOrUpdate" + }, + { + "$id": "3531", + "kind": "basic", + "name": "update", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Updates the tags of an application type version resource of a given managed cluster.", + "operation": { + "$id": "3532", + "name": "update", + "resourceName": "ApplicationTypeVersionResource", + "doc": "Updates the tags of an application type version resource of a given managed cluster.", + "accessibility": "public", + "parameters": [ + { + "$id": "3533", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "3534", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "3535", + "type": { + "$id": "3536", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3537", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "3538", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3539", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3540", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3541", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "3542", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3543", + "name": "applicationTypeName", + "nameInRequest": "applicationTypeName", + "doc": "The name of the application type name resource.", + "type": { + "$id": "3544", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3545", + "name": "version", + "nameInRequest": "version", + "doc": "The application type version.", + "type": { + "$id": "3546", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3547", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "3548", + "kind": "constant", + "valueType": { + "$id": "3549", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3550", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "3551", + "kind": "constant", + "valueType": { + "$id": "3552", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3553", + "name": "parameters", + "nameInRequest": "parameters", + "doc": "The application type version resource updated tags.", + "type": { + "$ref": "752" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "3554", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "727" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "PATCH", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": false, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeVersions.update", + "decorators": [], + "examples": [ + { + "$id": "3555", + "kind": "http", + "name": "Patch an application type version", + "description": "Patch an application type version", + "filePath": "2025-03-01-preview/ApplicationTypeVersionPatchOperation_example.json", + "parameters": [ + { + "$id": "3556", + "parameter": { + "$ref": "3533" + }, + "value": { + "$id": "3557", + "kind": "string", + "type": { + "$ref": "3534" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "3558", + "parameter": { + "$ref": "3543" + }, + "value": { + "$id": "3559", + "kind": "string", + "type": { + "$ref": "3544" + }, + "value": "myAppType" + } + }, + { + "$id": "3560", + "parameter": { + "$ref": "3541" + }, + "value": { + "$id": "3561", + "kind": "string", + "type": { + "$ref": "3542" + }, + "value": "myCluster" + } + }, + { + "$id": "3562", + "parameter": { + "$ref": "3539" + }, + "value": { + "$id": "3563", + "kind": "string", + "type": { + "$ref": "3540" + }, + "value": "resRg" + } + }, + { + "$id": "3564", + "parameter": { + "$ref": "3537" + }, + "value": { + "$id": "3565", + "kind": "string", + "type": { + "$ref": "3538" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + }, + { + "$id": "3566", + "parameter": { + "$ref": "3545" + }, + "value": { + "$id": "3567", + "kind": "string", + "type": { + "$ref": "3546" + }, + "value": "1.0" + } + } + ], + "responses": [ + { + "$id": "3568", + "response": { + "$ref": "3554" + }, + "statusCode": 200, + "bodyValue": { + "$id": "3569", + "kind": "model", + "type": { + "$ref": "727" + }, + "value": { + "$id": "3570", + "name": { + "$id": "3571", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "1.0" + }, + "type": { + "$id": "3572", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/applicationTypes/versions" + }, + "id": { + "$id": "3573", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applicationTypes/myAppType/versions/1.0" + }, + "properties": { + "$id": "3574", + "kind": "model", + "type": { + "$ref": "729" + }, + "value": { + "$id": "3575", + "appPackageUrl": { + "$id": "3576", + "kind": "string", + "type": { + "$ref": "735" + }, + "value": "http://fakelink.test.com/MyAppType" + }, + "provisioningState": { + "$id": "3577", + "kind": "string", + "type": { + "$ref": "731" + }, + "value": "Succeeded" + } + } + }, + "tags": { + "$id": "3578", + "kind": "dict", + "type": { + "$ref": "743" + }, + "value": { + "$id": "3579", + "a": { + "$id": "3580", + "kind": "string", + "type": { + "$ref": "745" + }, + "value": "b" + } + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "3581", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3582", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3583", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "3584", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3585", + "name": "applicationTypeName", + "nameInRequest": "applicationTypeName", + "doc": "The name of the application type name resource.", + "type": { + "$id": "3586", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3587", + "name": "version", + "nameInRequest": "version", + "doc": "The application type version.", + "type": { + "$id": "3588", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3589", + "name": "parameters", + "nameInRequest": "properties", + "doc": "The application type version resource updated tags.", + "type": { + "$ref": "752" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3590", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$ref": "3548" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3591", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "3551" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "3592", + "type": { + "$ref": "727" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeVersions.update" + }, + { + "$id": "3593", + "kind": "lro", + "name": "delete", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Delete a Service Fabric managed application type version resource with the specified name.", + "operation": { + "$id": "3594", + "name": "delete", + "resourceName": "ApplicationTypeVersionResource", + "doc": "Delete a Service Fabric managed application type version resource with the specified name.", + "accessibility": "public", + "parameters": [ + { + "$id": "3595", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "3596", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "3597", + "type": { + "$id": "3598", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3599", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "3600", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3601", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3602", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3603", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "3604", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3605", + "name": "applicationTypeName", + "nameInRequest": "applicationTypeName", + "doc": "The name of the application type name resource.", + "type": { + "$id": "3606", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3607", + "name": "version", + "nameInRequest": "version", + "doc": "The application type version.", + "type": { + "$id": "3608", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3609", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "3610", + "kind": "constant", + "valueType": { + "$id": "3611", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "3612", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "3613", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "3614", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "3615", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + } + }, + { + "$id": "3616", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "3617", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false + }, + { + "$id": "3618", + "statusCodes": [ + 204 + ], + "headers": [], + "isErrorResponse": false + } + ], + "httpMethod": "DELETE", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version}", + "bufferResponse": true, + "longRunning": { + "$id": "3619", + "finalStateVia": 1, + "finalResponse": { + "$id": "3620", + "statusCodes": [ + 204 + ] + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeVersions.delete", + "decorators": [], + "examples": [ + { + "$id": "3621", + "kind": "http", + "name": "Delete an application type version", + "description": "Delete an application type version", + "filePath": "2025-03-01-preview/ApplicationTypeVersionDeleteOperation_example.json", + "parameters": [ + { + "$id": "3622", + "parameter": { + "$ref": "3595" + }, + "value": { + "$id": "3623", + "kind": "string", + "type": { + "$ref": "3596" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "3624", + "parameter": { + "$ref": "3605" + }, + "value": { + "$id": "3625", + "kind": "string", + "type": { + "$ref": "3606" + }, + "value": "myAppType" + } + }, + { + "$id": "3626", + "parameter": { + "$ref": "3603" + }, + "value": { + "$id": "3627", + "kind": "string", + "type": { + "$ref": "3604" + }, + "value": "myCluster" + } + }, + { + "$id": "3628", + "parameter": { + "$ref": "3601" + }, + "value": { + "$id": "3629", + "kind": "string", + "type": { + "$ref": "3602" + }, + "value": "resRg" + } + }, + { + "$id": "3630", + "parameter": { + "$ref": "3599" + }, + "value": { + "$id": "3631", + "kind": "string", + "type": { + "$ref": "3600" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + }, + { + "$id": "3632", + "parameter": { + "$ref": "3607" + }, + "value": { + "$id": "3633", + "kind": "string", + "type": { + "$ref": "3608" + }, + "value": "1.0" + } + } + ], + "responses": [ + { + "$id": "3634", + "response": { + "$ref": "3612" + }, + "statusCode": 202 + }, + { + "$id": "3635", + "response": { + "$ref": "3618" + }, + "statusCode": 204 + } + ] + } + ] + }, + "parameters": [ + { + "$id": "3636", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3637", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3638", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "3639", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3640", + "name": "applicationTypeName", + "nameInRequest": "applicationTypeName", + "doc": "The name of the application type name resource.", + "type": { + "$id": "3641", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3642", + "name": "version", + "nameInRequest": "version", + "doc": "The application type version.", + "type": { + "$id": "3643", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3644", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "3645", + "kind": "constant", + "valueType": { + "$id": "3646", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "3647" + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeVersions.delete" + }, + { + "$id": "3648", + "kind": "paging", + "name": "listByApplicationTypes", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Gets all application type version resources created or in the process of being created in the Service Fabric managed application type name resource.", + "operation": { + "$id": "3649", + "name": "listByApplicationTypes", + "resourceName": "ApplicationTypeVersionResource", + "doc": "Gets all application type version resources created or in the process of being created in the Service Fabric managed application type name resource.", + "accessibility": "public", + "parameters": [ + { + "$id": "3650", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "3651", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "3652", + "type": { + "$id": "3653", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3654", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "3655", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3656", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3657", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3658", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "3659", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3660", + "name": "applicationTypeName", + "nameInRequest": "applicationTypeName", + "doc": "The name of the application type name resource.", + "type": { + "$id": "3661", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3662", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "3663", + "kind": "constant", + "valueType": { + "$id": "3664", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "3665", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "759" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions", + "bufferResponse": true, + "paging": { + "$id": "3666", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "3667", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeVersions.listByApplicationTypes", + "decorators": [], + "examples": [ + { + "$id": "3668", + "kind": "http", + "name": "Get a list of application type version resources", + "description": "Get a list of application type version resources", + "filePath": "2025-03-01-preview/ApplicationTypeVersionListOperation_example.json", + "parameters": [ + { + "$id": "3669", + "parameter": { + "$ref": "3650" + }, + "value": { + "$id": "3670", + "kind": "string", + "type": { + "$ref": "3651" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "3671", + "parameter": { + "$ref": "3660" + }, + "value": { + "$id": "3672", + "kind": "string", + "type": { + "$ref": "3661" + }, + "value": "myAppType" + } + }, + { + "$id": "3673", + "parameter": { + "$ref": "3658" + }, + "value": { + "$id": "3674", + "kind": "string", + "type": { + "$ref": "3659" + }, + "value": "myCluster" + } + }, + { + "$id": "3675", + "parameter": { + "$ref": "3656" + }, + "value": { + "$id": "3676", + "kind": "string", + "type": { + "$ref": "3657" + }, + "value": "resRg" + } + }, + { + "$id": "3677", + "parameter": { + "$ref": "3654" + }, + "value": { + "$id": "3678", + "kind": "string", + "type": { + "$ref": "3655" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "3679", + "response": { + "$ref": "3665" + }, + "statusCode": 200, + "bodyValue": { + "$id": "3680", + "kind": "model", + "type": { + "$ref": "759" + }, + "value": { + "$id": "3681", + "nextLink": { + "$id": "3682", + "kind": "string", + "type": { + "$ref": "765" + }, + "value": "http://examplelink.com" + }, + "value": { + "$id": "3683", + "kind": "array", + "type": { + "$ref": "761" + }, + "value": [ + { + "$id": "3684", + "kind": "model", + "type": { + "$ref": "727" + }, + "value": { + "$id": "3685", + "name": { + "$id": "3686", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "1.0" + }, + "type": { + "$id": "3687", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/applicationTypes/versions" + }, + "id": { + "$id": "3688", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applicationTypes/myAppType/versions/1.0" + }, + "properties": { + "$id": "3689", + "kind": "model", + "type": { + "$ref": "729" + }, + "value": { + "$id": "3690", + "appPackageUrl": { + "$id": "3691", + "kind": "string", + "type": { + "$ref": "735" + }, + "value": "http://fakelink.test.com/MyAppType" + }, + "provisioningState": { + "$id": "3692", + "kind": "string", + "type": { + "$ref": "731" + }, + "value": "Updating" + } + } + } + } + } + ] + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "3693", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3694", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3695", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "3696", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3697", + "name": "applicationTypeName", + "nameInRequest": "applicationTypeName", + "doc": "The name of the application type name resource.", + "type": { + "$id": "3698", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3699", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "3663" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "3700", + "type": { + "$id": "3701", + "kind": "array", + "name": "ArrayApplicationTypeVersionResource", + "valueType": { + "$ref": "727" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "resultSegments": [ + "value" + ] + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeVersions.listByApplicationTypes" + } + ], + "parameters": [ + { + "$id": "3702", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "3703", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "location": "Uri", + "isApiVersion": false, + "isContentType": false, + "isRequired": true, + "isEndpoint": true, + "skipUrlEncoding": false, + "explode": false, + "kind": "Client", + "defaultValue": { + "$id": "3704", + "type": { + "$id": "3705", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "3706", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "3707" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ApplicationTypeVersions", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "parent": { + "$ref": "2378" + } + }, + { + "$id": "3708", + "kind": "client", + "name": "Services", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "methods": [ + { + "$id": "3709", + "kind": "basic", + "name": "get", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Get a Service Fabric service resource created or in the process of being created in the Service Fabric managed application resource.", + "operation": { + "$id": "3710", + "name": "get", + "resourceName": "ServiceResource", + "doc": "Get a Service Fabric service resource created or in the process of being created in the Service Fabric managed application resource.", + "accessibility": "public", + "parameters": [ + { + "$id": "3711", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "3712", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "3713", + "type": { + "$id": "3714", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3715", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "3716", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3717", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3718", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3719", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "3720", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3721", + "name": "applicationName", + "nameInRequest": "applicationName", + "doc": "The name of the application resource.", + "type": { + "$id": "3722", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3723", + "name": "serviceName", + "nameInRequest": "serviceName", + "doc": "The name of the service resource in the format of {applicationName}~{serviceName}.", + "type": { + "$id": "3724", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3725", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "3726", + "kind": "constant", + "valueType": { + "$id": "3727", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "3728", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "769" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Services.get", + "decorators": [], + "examples": [ + { + "$id": "3729", + "kind": "http", + "name": "Get a service", + "description": "Get a service", + "filePath": "2025-03-01-preview/ServiceGetOperation_example.json", + "parameters": [ + { + "$id": "3730", + "parameter": { + "$ref": "3711" + }, + "value": { + "$id": "3731", + "kind": "string", + "type": { + "$ref": "3712" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "3732", + "parameter": { + "$ref": "3721" + }, + "value": { + "$id": "3733", + "kind": "string", + "type": { + "$ref": "3722" + }, + "value": "myApp" + } + }, + { + "$id": "3734", + "parameter": { + "$ref": "3719" + }, + "value": { + "$id": "3735", + "kind": "string", + "type": { + "$ref": "3720" + }, + "value": "myCluster" + } + }, + { + "$id": "3736", + "parameter": { + "$ref": "3717" + }, + "value": { + "$id": "3737", + "kind": "string", + "type": { + "$ref": "3718" + }, + "value": "resRg" + } + }, + { + "$id": "3738", + "parameter": { + "$ref": "3723" + }, + "value": { + "$id": "3739", + "kind": "string", + "type": { + "$ref": "3724" + }, + "value": "myService" + } + }, + { + "$id": "3740", + "parameter": { + "$ref": "3715" + }, + "value": { + "$id": "3741", + "kind": "string", + "type": { + "$ref": "3716" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "3742", + "response": { + "$ref": "3728" + }, + "statusCode": 200, + "bodyValue": { + "$id": "3743", + "kind": "model", + "type": { + "$ref": "769" + }, + "value": { + "$id": "3744", + "name": { + "$id": "3745", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "myService" + }, + "type": { + "$id": "3746", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/applications/services" + }, + "id": { + "$id": "3747", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applications/myApp/services/myService" + }, + "properties": { + "$id": "3748", + "kind": "model", + "type": { + "$ref": "1072" + }, + "value": { + "$id": "3749", + "defaultMoveCost": { + "$id": "3750", + "kind": "string", + "type": { + "$ref": "90" + }, + "value": "Medium" + }, + "instanceCount": { + "$id": "3751", + "kind": "number", + "type": { + "$ref": "1074" + }, + "value": 5 + }, + "partitionDescription": { + "$id": "3752", + "kind": "model", + "type": { + "$ref": "1011" + }, + "value": { + "$id": "3753", + "partitionScheme": { + "$id": "3754", + "kind": "string", + "type": { + "$ref": "1013" + }, + "value": "Singleton" + } + } + }, + "placementConstraints": { + "$id": "3755", + "kind": "string", + "type": { + "$ref": "777" + }, + "value": "NodeType==frontend" + }, + "provisioningState": { + "$id": "3756", + "kind": "string", + "type": { + "$ref": "980" + }, + "value": "Updating" + }, + "serviceKind": { + "$id": "3757", + "kind": "string", + "type": { + "$ref": "1086" + }, + "value": "Stateless" + }, + "serviceLoadMetrics": { + "$id": "3758", + "kind": "array", + "type": { + "$ref": "793" + }, + "value": [ + { + "$id": "3759", + "kind": "model", + "type": { + "$ref": "794" + }, + "value": { + "$id": "3760", + "name": { + "$id": "3761", + "kind": "string", + "type": { + "$ref": "796" + }, + "value": "metric1" + }, + "weight": { + "$id": "3762", + "kind": "string", + "type": { + "$ref": "68" + }, + "value": "Low" + } + } + } + ] + }, + "servicePackageActivationMode": { + "$id": "3763", + "kind": "string", + "type": { + "$ref": "56" + }, + "value": "SharedProcess" + }, + "servicePlacementPolicies": { + "$id": "3764", + "kind": "array", + "type": { + "$ref": "817" + }, + "value": [] + }, + "serviceTypeName": { + "$id": "3765", + "kind": "string", + "type": { + "$ref": "984" + }, + "value": "myServiceType" + } + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "3766", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3767", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3768", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "3769", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3770", + "name": "applicationName", + "nameInRequest": "applicationName", + "doc": "The name of the application resource.", + "type": { + "$id": "3771", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3772", + "name": "serviceName", + "nameInRequest": "serviceName", + "doc": "The name of the service resource in the format of {applicationName}~{serviceName}.", + "type": { + "$id": "3773", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3774", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "3726" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "3775", + "type": { + "$ref": "769" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Services.get" + }, + { + "$id": "3776", + "kind": "lro", + "name": "createOrUpdate", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Create or update a Service Fabric managed service resource with the specified name.", + "operation": { + "$id": "3777", + "name": "createOrUpdate", + "resourceName": "ServiceResource", + "doc": "Create or update a Service Fabric managed service resource with the specified name.", + "accessibility": "public", + "parameters": [ + { + "$id": "3778", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "3779", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "3780", + "type": { + "$id": "3781", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3782", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "3783", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3784", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3785", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3786", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "3787", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3788", + "name": "applicationName", + "nameInRequest": "applicationName", + "doc": "The name of the application resource.", + "type": { + "$id": "3789", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3790", + "name": "serviceName", + "nameInRequest": "serviceName", + "doc": "The name of the service resource in the format of {applicationName}~{serviceName}.", + "type": { + "$id": "3791", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3792", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "3793", + "kind": "constant", + "valueType": { + "$id": "3794", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3795", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "3796", + "kind": "constant", + "valueType": { + "$id": "3797", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3798", + "name": "parameters", + "nameInRequest": "parameters", + "doc": "The service resource.", + "type": { + "$ref": "769" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "3799", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "769" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + { + "$id": "3800", + "statusCodes": [ + 202 + ], + "bodyType": { + "$ref": "769" + }, + "headers": [ + { + "$id": "3801", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "3802", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "3803", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + } + }, + { + "$id": "3804", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "3805", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "PUT", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "longRunning": { + "$id": "3806", + "finalStateVia": 1, + "finalResponse": { + "$id": "3807", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "769" + } + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Services.createOrUpdate", + "decorators": [], + "examples": [ + { + "$id": "3808", + "kind": "http", + "name": "Put a service with maximum parameters", + "description": "Put a service with maximum parameters", + "filePath": "2025-03-01-preview/ServicePutOperation_example_max.json", + "parameters": [ + { + "$id": "3809", + "parameter": { + "$ref": "3778" + }, + "value": { + "$id": "3810", + "kind": "string", + "type": { + "$ref": "3779" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "3811", + "parameter": { + "$ref": "3788" + }, + "value": { + "$id": "3812", + "kind": "string", + "type": { + "$ref": "3789" + }, + "value": "myApp" + } + }, + { + "$id": "3813", + "parameter": { + "$ref": "3786" + }, + "value": { + "$id": "3814", + "kind": "string", + "type": { + "$ref": "3787" + }, + "value": "myCluster" + } + }, + { + "$id": "3815", + "parameter": { + "$ref": "3784" + }, + "value": { + "$id": "3816", + "kind": "string", + "type": { + "$ref": "3785" + }, + "value": "resRg" + } + }, + { + "$id": "3817", + "parameter": { + "$ref": "3790" + }, + "value": { + "$id": "3818", + "kind": "string", + "type": { + "$ref": "3791" + }, + "value": "myService" + } + }, + { + "$id": "3819", + "parameter": { + "$ref": "3782" + }, + "value": { + "$id": "3820", + "kind": "string", + "type": { + "$ref": "3783" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "3821", + "response": { + "$ref": "3799" + }, + "statusCode": 200, + "bodyValue": { + "$id": "3822", + "kind": "model", + "type": { + "$ref": "769" + }, + "value": { + "$id": "3823", + "name": { + "$id": "3824", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "myService" + }, + "type": { + "$id": "3825", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/applications/services" + }, + "id": { + "$id": "3826", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applications/myApp/services/myService" + }, + "properties": { + "$id": "3827", + "kind": "model", + "type": { + "$ref": "1072" + }, + "value": { + "$id": "3828", + "correlationScheme": { + "$id": "3829", + "kind": "array", + "type": { + "$ref": "781" + }, + "value": [ + { + "$id": "3830", + "kind": "model", + "type": { + "$ref": "782" + }, + "value": { + "$id": "3831", + "scheme": { + "$id": "3832", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "AlignedAffinity" + }, + "serviceName": { + "$id": "3833", + "kind": "string", + "type": { + "$ref": "787" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applications/myApp/services/myService1" + } + } + } + ] + }, + "defaultMoveCost": { + "$id": "3834", + "kind": "string", + "type": { + "$ref": "90" + }, + "value": "Medium" + }, + "instanceCount": { + "$id": "3835", + "kind": "number", + "type": { + "$ref": "1074" + }, + "value": 5 + }, + "minInstanceCount": { + "$id": "3836", + "kind": "number", + "type": { + "$ref": "1078" + }, + "value": 3 + }, + "minInstancePercentage": { + "$id": "3837", + "kind": "number", + "type": { + "$ref": "1082" + }, + "value": 30 + }, + "partitionDescription": { + "$id": "3838", + "kind": "model", + "type": { + "$ref": "1011" + }, + "value": { + "$id": "3839", + "partitionScheme": { + "$id": "3840", + "kind": "string", + "type": { + "$ref": "1013" + }, + "value": "Singleton" + } + } + }, + "placementConstraints": { + "$id": "3841", + "kind": "string", + "type": { + "$ref": "777" + }, + "value": "NodeType==frontend" + }, + "provisioningState": { + "$id": "3842", + "kind": "string", + "type": { + "$ref": "980" + }, + "value": "Creating" + }, + "scalingPolicies": { + "$id": "3843", + "kind": "array", + "type": { + "$ref": "875" + }, + "value": [ + { + "$id": "3844", + "kind": "model", + "type": { + "$ref": "876" + }, + "value": { + "$id": "3845", + "scalingMechanism": { + "$id": "3846", + "kind": "model", + "type": { + "$ref": "901" + }, + "value": { + "$id": "3847", + "kind": { + "$id": "3848", + "kind": "string", + "type": { + "$ref": "915" + }, + "value": "ScalePartitionInstanceCount" + }, + "maxInstanceCount": { + "$id": "3849", + "kind": "number", + "type": { + "$ref": "907" + }, + "value": 9 + }, + "minInstanceCount": { + "$id": "3850", + "kind": "number", + "type": { + "$ref": "903" + }, + "value": 3 + }, + "scaleIncrement": { + "$id": "3851", + "kind": "number", + "type": { + "$ref": "911" + }, + "value": 2 + } + } + }, + "scalingTrigger": { + "$id": "3852", + "kind": "model", + "type": { + "$ref": "927" + }, + "value": { + "$id": "3853", + "kind": { + "$id": "3854", + "kind": "string", + "type": { + "$ref": "945" + }, + "value": "AveragePartitionLoadTrigger" + }, + "lowerLoadThreshold": { + "$id": "3855", + "kind": "number", + "type": { + "$ref": "933" + }, + "value": 2 + }, + "metricName": { + "$id": "3856", + "kind": "string", + "type": { + "$ref": "929" + }, + "value": "metricName" + }, + "scaleInterval": { + "$id": "3857", + "kind": "string", + "type": { + "$ref": "941" + }, + "value": "00:01:00" + }, + "upperLoadThreshold": { + "$id": "3858", + "kind": "number", + "type": { + "$ref": "937" + }, + "value": 8 + } + } + } + } + } + ] + }, + "serviceDnsName": { + "$id": "3859", + "kind": "string", + "type": { + "$ref": "1034" + }, + "value": "myservicednsname.myApp" + }, + "serviceKind": { + "$id": "3860", + "kind": "string", + "type": { + "$ref": "1086" + }, + "value": "Stateless" + }, + "serviceLoadMetrics": { + "$id": "3861", + "kind": "array", + "type": { + "$ref": "793" + }, + "value": [ + { + "$id": "3862", + "kind": "model", + "type": { + "$ref": "794" + }, + "value": { + "$id": "3863", + "name": { + "$id": "3864", + "kind": "string", + "type": { + "$ref": "796" + }, + "value": "metric1" + }, + "defaultLoad": { + "$id": "3865", + "kind": "number", + "type": { + "$ref": "811" + }, + "value": 3 + }, + "weight": { + "$id": "3866", + "kind": "string", + "type": { + "$ref": "68" + }, + "value": "Low" + } + } + } + ] + }, + "servicePackageActivationMode": { + "$id": "3867", + "kind": "string", + "type": { + "$ref": "56" + }, + "value": "SharedProcess" + }, + "servicePlacementPolicies": { + "$id": "3868", + "kind": "array", + "type": { + "$ref": "817" + }, + "value": [ + { + "$id": "3869", + "kind": "model", + "type": { + "$ref": "863" + }, + "value": { + "$id": "3870", + "type": { + "$id": "3871", + "kind": "string", + "type": { + "$ref": "865" + }, + "value": "NonPartiallyPlaceService" + } + } + } + ] + }, + "serviceTypeName": { + "$id": "3872", + "kind": "string", + "type": { + "$ref": "984" + }, + "value": "myServiceType" + } + } + }, + "tags": { + "$id": "3873", + "kind": "dict", + "type": { + "$ref": "1095" + }, + "value": { + "$id": "3874", + "a": { + "$id": "3875", + "kind": "string", + "type": { + "$ref": "1097" + }, + "value": "b" + } + } + } + } + } + }, + { + "$id": "3876", + "response": { + "$ref": "3800" + }, + "statusCode": 202, + "bodyValue": { + "$id": "3877", + "kind": "model", + "type": { + "$ref": "769" + }, + "value": { + "$id": "3878", + "name": { + "$id": "3879", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "myService" + }, + "type": { + "$id": "3880", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/applications/services" + }, + "id": { + "$id": "3881", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applications/myApp/services/myService" + }, + "properties": { + "$id": "3882", + "kind": "model", + "type": { + "$ref": "1072" + }, + "value": { + "$id": "3883", + "correlationScheme": { + "$id": "3884", + "kind": "array", + "type": { + "$ref": "781" + }, + "value": [ + { + "$id": "3885", + "kind": "model", + "type": { + "$ref": "782" + }, + "value": { + "$id": "3886", + "scheme": { + "$id": "3887", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "AlignedAffinity" + }, + "serviceName": { + "$id": "3888", + "kind": "string", + "type": { + "$ref": "787" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applications/myApp/services/myService1" + } + } + } + ] + }, + "defaultMoveCost": { + "$id": "3889", + "kind": "string", + "type": { + "$ref": "90" + }, + "value": "Medium" + }, + "instanceCount": { + "$id": "3890", + "kind": "number", + "type": { + "$ref": "1074" + }, + "value": 5 + }, + "minInstanceCount": { + "$id": "3891", + "kind": "number", + "type": { + "$ref": "1078" + }, + "value": 3 + }, + "minInstancePercentage": { + "$id": "3892", + "kind": "number", + "type": { + "$ref": "1082" + }, + "value": 30 + }, + "partitionDescription": { + "$id": "3893", + "kind": "model", + "type": { + "$ref": "1011" + }, + "value": { + "$id": "3894", + "partitionScheme": { + "$id": "3895", + "kind": "string", + "type": { + "$ref": "1013" + }, + "value": "Singleton" + } + } + }, + "placementConstraints": { + "$id": "3896", + "kind": "string", + "type": { + "$ref": "777" + }, + "value": "NodeType==frontend" + }, + "provisioningState": { + "$id": "3897", + "kind": "string", + "type": { + "$ref": "980" + }, + "value": "Updating" + }, + "scalingPolicies": { + "$id": "3898", + "kind": "array", + "type": { + "$ref": "875" + }, + "value": [ + { + "$id": "3899", + "kind": "model", + "type": { + "$ref": "876" + }, + "value": { + "$id": "3900", + "scalingMechanism": { + "$id": "3901", + "kind": "model", + "type": { + "$ref": "901" + }, + "value": { + "$id": "3902", + "kind": { + "$id": "3903", + "kind": "string", + "type": { + "$ref": "915" + }, + "value": "ScalePartitionInstanceCount" + }, + "maxInstanceCount": { + "$id": "3904", + "kind": "number", + "type": { + "$ref": "907" + }, + "value": 9 + }, + "minInstanceCount": { + "$id": "3905", + "kind": "number", + "type": { + "$ref": "903" + }, + "value": 3 + }, + "scaleIncrement": { + "$id": "3906", + "kind": "number", + "type": { + "$ref": "911" + }, + "value": 2 + } + } + }, + "scalingTrigger": { + "$id": "3907", + "kind": "model", + "type": { + "$ref": "927" + }, + "value": { + "$id": "3908", + "kind": { + "$id": "3909", + "kind": "string", + "type": { + "$ref": "945" + }, + "value": "AveragePartitionLoadTrigger" + }, + "lowerLoadThreshold": { + "$id": "3910", + "kind": "number", + "type": { + "$ref": "933" + }, + "value": 2 + }, + "metricName": { + "$id": "3911", + "kind": "string", + "type": { + "$ref": "929" + }, + "value": "metricName" + }, + "scaleInterval": { + "$id": "3912", + "kind": "string", + "type": { + "$ref": "941" + }, + "value": "00:01:00" + }, + "upperLoadThreshold": { + "$id": "3913", + "kind": "number", + "type": { + "$ref": "937" + }, + "value": 8 + } + } + } + } + } + ] + }, + "serviceDnsName": { + "$id": "3914", + "kind": "string", + "type": { + "$ref": "1034" + }, + "value": "myservicednsname.myApp" + }, + "serviceKind": { + "$id": "3915", + "kind": "string", + "type": { + "$ref": "1086" + }, + "value": "Stateless" + }, + "serviceLoadMetrics": { + "$id": "3916", + "kind": "array", + "type": { + "$ref": "793" + }, + "value": [ + { + "$id": "3917", + "kind": "model", + "type": { + "$ref": "794" + }, + "value": { + "$id": "3918", + "name": { + "$id": "3919", + "kind": "string", + "type": { + "$ref": "796" + }, + "value": "metric1" + }, + "defaultLoad": { + "$id": "3920", + "kind": "number", + "type": { + "$ref": "811" + }, + "value": 3 + }, + "weight": { + "$id": "3921", + "kind": "string", + "type": { + "$ref": "68" + }, + "value": "Low" + } + } + } + ] + }, + "servicePackageActivationMode": { + "$id": "3922", + "kind": "string", + "type": { + "$ref": "56" + }, + "value": "SharedProcess" + }, + "servicePlacementPolicies": { + "$id": "3923", + "kind": "array", + "type": { + "$ref": "817" + }, + "value": [ + { + "$id": "3924", + "kind": "model", + "type": { + "$ref": "863" + }, + "value": { + "$id": "3925", + "type": { + "$id": "3926", + "kind": "string", + "type": { + "$ref": "865" + }, + "value": "NonPartiallyPlaceService" + } + } + } + ] + }, + "serviceTypeName": { + "$id": "3927", + "kind": "string", + "type": { + "$ref": "984" + }, + "value": "myServiceType" + } + } + }, + "tags": { + "$id": "3928", + "kind": "dict", + "type": { + "$ref": "1095" + }, + "value": { + "$id": "3929", + "a": { + "$id": "3930", + "kind": "string", + "type": { + "$ref": "1097" + }, + "value": "b" + } + } + } + } + } + } + ] + }, + { + "$id": "3931", + "kind": "http", + "name": "Put a service with minimum parameters", + "description": "Put a service with minimum parameters", + "filePath": "2025-03-01-preview/ServicePutOperation_example_min.json", + "parameters": [ + { + "$id": "3932", + "parameter": { + "$ref": "3778" + }, + "value": { + "$id": "3933", + "kind": "string", + "type": { + "$ref": "3779" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "3934", + "parameter": { + "$ref": "3788" + }, + "value": { + "$id": "3935", + "kind": "string", + "type": { + "$ref": "3789" + }, + "value": "myApp" + } + }, + { + "$id": "3936", + "parameter": { + "$ref": "3786" + }, + "value": { + "$id": "3937", + "kind": "string", + "type": { + "$ref": "3787" + }, + "value": "myCluster" + } + }, + { + "$id": "3938", + "parameter": { + "$ref": "3784" + }, + "value": { + "$id": "3939", + "kind": "string", + "type": { + "$ref": "3785" + }, + "value": "resRg" + } + }, + { + "$id": "3940", + "parameter": { + "$ref": "3790" + }, + "value": { + "$id": "3941", + "kind": "string", + "type": { + "$ref": "3791" + }, + "value": "myService" + } + }, + { + "$id": "3942", + "parameter": { + "$ref": "3782" + }, + "value": { + "$id": "3943", + "kind": "string", + "type": { + "$ref": "3783" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "3944", + "response": { + "$ref": "3799" + }, + "statusCode": 200, + "bodyValue": { + "$id": "3945", + "kind": "model", + "type": { + "$ref": "769" + }, + "value": { + "$id": "3946", + "name": { + "$id": "3947", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "myService" + }, + "type": { + "$id": "3948", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/applications/services" + }, + "id": { + "$id": "3949", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applications/myApp/services/myService" + }, + "properties": { + "$id": "3950", + "kind": "model", + "type": { + "$ref": "1072" + }, + "value": { + "$id": "3951", + "instanceCount": { + "$id": "3952", + "kind": "number", + "type": { + "$ref": "1074" + }, + "value": 1 + }, + "partitionDescription": { + "$id": "3953", + "kind": "model", + "type": { + "$ref": "1011" + }, + "value": { + "$id": "3954", + "partitionScheme": { + "$id": "3955", + "kind": "string", + "type": { + "$ref": "1013" + }, + "value": "Singleton" + } + } + }, + "provisioningState": { + "$id": "3956", + "kind": "string", + "type": { + "$ref": "980" + }, + "value": "Creating" + }, + "serviceKind": { + "$id": "3957", + "kind": "string", + "type": { + "$ref": "1086" + }, + "value": "Stateless" + }, + "serviceTypeName": { + "$id": "3958", + "kind": "string", + "type": { + "$ref": "984" + }, + "value": "myServiceType" + } + } + } + } + } + }, + { + "$id": "3959", + "response": { + "$ref": "3800" + }, + "statusCode": 202, + "bodyValue": { + "$id": "3960", + "kind": "model", + "type": { + "$ref": "769" + }, + "value": { + "$id": "3961", + "name": { + "$id": "3962", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "myService" + }, + "type": { + "$id": "3963", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/applications/services" + }, + "id": { + "$id": "3964", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applications/myApp/services/myService" + }, + "properties": { + "$id": "3965", + "kind": "model", + "type": { + "$ref": "1072" + }, + "value": { + "$id": "3966", + "instanceCount": { + "$id": "3967", + "kind": "number", + "type": { + "$ref": "1074" + }, + "value": 1 + }, + "partitionDescription": { + "$id": "3968", + "kind": "model", + "type": { + "$ref": "1011" + }, + "value": { + "$id": "3969", + "partitionScheme": { + "$id": "3970", + "kind": "string", + "type": { + "$ref": "1013" + }, + "value": "Singleton" + } + } + }, + "provisioningState": { + "$id": "3971", + "kind": "string", + "type": { + "$ref": "980" + }, + "value": "Updating" + }, + "serviceKind": { + "$id": "3972", + "kind": "string", + "type": { + "$ref": "1086" + }, + "value": "Stateless" + }, + "serviceTypeName": { + "$id": "3973", + "kind": "string", + "type": { + "$ref": "984" + }, + "value": "myServiceType" + } + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "3974", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3975", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3976", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "3977", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3978", + "name": "applicationName", + "nameInRequest": "applicationName", + "doc": "The name of the application resource.", + "type": { + "$id": "3979", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3980", + "name": "serviceName", + "nameInRequest": "serviceName", + "doc": "The name of the service resource in the format of {applicationName}~{serviceName}.", + "type": { + "$id": "3981", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3982", + "name": "parameters", + "nameInRequest": "resource", + "doc": "The service resource.", + "type": { + "$ref": "769" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3983", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "3984", + "kind": "constant", + "valueType": { + "$id": "3985", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3986", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "3987", + "kind": "constant", + "valueType": { + "$id": "3988", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "3989", + "type": { + "$ref": "769" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Services.createOrUpdate" + }, + { + "$id": "3990", + "kind": "basic", + "name": "update", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Updates the tags of a service resource of a given managed cluster.", + "operation": { + "$id": "3991", + "name": "update", + "resourceName": "ServiceResource", + "doc": "Updates the tags of a service resource of a given managed cluster.", + "accessibility": "public", + "parameters": [ + { + "$id": "3992", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "3993", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "3994", + "type": { + "$id": "3995", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3996", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "3997", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "3998", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "3999", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4000", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "4001", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4002", + "name": "applicationName", + "nameInRequest": "applicationName", + "doc": "The name of the application resource.", + "type": { + "$id": "4003", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4004", + "name": "serviceName", + "nameInRequest": "serviceName", + "doc": "The name of the service resource in the format of {applicationName}~{serviceName}.", + "type": { + "$id": "4005", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4006", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "4007", + "kind": "constant", + "valueType": { + "$id": "4008", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4009", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "4010", + "kind": "constant", + "valueType": { + "$id": "4011", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4012", + "name": "parameters", + "nameInRequest": "parameters", + "doc": "The service resource updated tags.", + "type": { + "$ref": "1104" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "4013", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "769" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "PATCH", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": false, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Services.update", + "decorators": [], + "examples": [ + { + "$id": "4014", + "kind": "http", + "name": "Patch a service", + "description": "Patch a service", + "filePath": "2025-03-01-preview/ServicePatchOperation_example.json", + "parameters": [ + { + "$id": "4015", + "parameter": { + "$ref": "3992" + }, + "value": { + "$id": "4016", + "kind": "string", + "type": { + "$ref": "3993" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "4017", + "parameter": { + "$ref": "4002" + }, + "value": { + "$id": "4018", + "kind": "string", + "type": { + "$ref": "4003" + }, + "value": "myApp" + } + }, + { + "$id": "4019", + "parameter": { + "$ref": "4000" + }, + "value": { + "$id": "4020", + "kind": "string", + "type": { + "$ref": "4001" + }, + "value": "myCluster" + } + }, + { + "$id": "4021", + "parameter": { + "$ref": "3998" + }, + "value": { + "$id": "4022", + "kind": "string", + "type": { + "$ref": "3999" + }, + "value": "resRg" + } + }, + { + "$id": "4023", + "parameter": { + "$ref": "4004" + }, + "value": { + "$id": "4024", + "kind": "string", + "type": { + "$ref": "4005" + }, + "value": "myService" + } + }, + { + "$id": "4025", + "parameter": { + "$ref": "3996" + }, + "value": { + "$id": "4026", + "kind": "string", + "type": { + "$ref": "3997" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "4027", + "response": { + "$ref": "4013" + }, + "statusCode": 200, + "bodyValue": { + "$id": "4028", + "kind": "model", + "type": { + "$ref": "769" + }, + "value": { + "$id": "4029", + "name": { + "$id": "4030", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "myService" + }, + "type": { + "$id": "4031", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/applications/services" + }, + "id": { + "$id": "4032", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applications/myApp/services/myService" + }, + "properties": { + "$id": "4033", + "kind": "model", + "type": { + "$ref": "1072" + }, + "value": { + "$id": "4034", + "correlationScheme": { + "$id": "4035", + "kind": "array", + "type": { + "$ref": "781" + }, + "value": [ + { + "$id": "4036", + "kind": "model", + "type": { + "$ref": "782" + }, + "value": { + "$id": "4037", + "scheme": { + "$id": "4038", + "kind": "string", + "type": { + "$ref": "62" + }, + "value": "AlignedAffinity" + }, + "serviceName": { + "$id": "4039", + "kind": "string", + "type": { + "$ref": "787" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applications/myApp/services/myService1" + } + } + } + ] + }, + "defaultMoveCost": { + "$id": "4040", + "kind": "string", + "type": { + "$ref": "90" + }, + "value": "Medium" + }, + "instanceCount": { + "$id": "4041", + "kind": "number", + "type": { + "$ref": "1074" + }, + "value": 5 + }, + "minInstanceCount": { + "$id": "4042", + "kind": "number", + "type": { + "$ref": "1078" + }, + "value": 3 + }, + "minInstancePercentage": { + "$id": "4043", + "kind": "number", + "type": { + "$ref": "1082" + }, + "value": 30 + }, + "partitionDescription": { + "$id": "4044", + "kind": "model", + "type": { + "$ref": "1011" + }, + "value": { + "$id": "4045", + "partitionScheme": { + "$id": "4046", + "kind": "string", + "type": { + "$ref": "1013" + }, + "value": "Singleton" + } + } + }, + "placementConstraints": { + "$id": "4047", + "kind": "string", + "type": { + "$ref": "777" + }, + "value": "NodeType==frontend" + }, + "provisioningState": { + "$id": "4048", + "kind": "string", + "type": { + "$ref": "980" + }, + "value": "Succeeded" + }, + "scalingPolicies": { + "$id": "4049", + "kind": "array", + "type": { + "$ref": "875" + }, + "value": [ + { + "$id": "4050", + "kind": "model", + "type": { + "$ref": "876" + }, + "value": { + "$id": "4051", + "scalingMechanism": { + "$id": "4052", + "kind": "model", + "type": { + "$ref": "901" + }, + "value": { + "$id": "4053", + "kind": { + "$id": "4054", + "kind": "string", + "type": { + "$ref": "915" + }, + "value": "ScalePartitionInstanceCount" + }, + "maxInstanceCount": { + "$id": "4055", + "kind": "number", + "type": { + "$ref": "907" + }, + "value": 9 + }, + "minInstanceCount": { + "$id": "4056", + "kind": "number", + "type": { + "$ref": "903" + }, + "value": 3 + }, + "scaleIncrement": { + "$id": "4057", + "kind": "number", + "type": { + "$ref": "911" + }, + "value": 2 + } + } + }, + "scalingTrigger": { + "$id": "4058", + "kind": "model", + "type": { + "$ref": "927" + }, + "value": { + "$id": "4059", + "kind": { + "$id": "4060", + "kind": "string", + "type": { + "$ref": "945" + }, + "value": "AveragePartitionLoadTrigger" + }, + "lowerLoadThreshold": { + "$id": "4061", + "kind": "number", + "type": { + "$ref": "933" + }, + "value": 2 + }, + "metricName": { + "$id": "4062", + "kind": "string", + "type": { + "$ref": "929" + }, + "value": "metricName" + }, + "scaleInterval": { + "$id": "4063", + "kind": "string", + "type": { + "$ref": "941" + }, + "value": "00:01:00" + }, + "upperLoadThreshold": { + "$id": "4064", + "kind": "number", + "type": { + "$ref": "937" + }, + "value": 8 + } + } + } + } + } + ] + }, + "serviceKind": { + "$id": "4065", + "kind": "string", + "type": { + "$ref": "1086" + }, + "value": "Stateless" + }, + "serviceLoadMetrics": { + "$id": "4066", + "kind": "array", + "type": { + "$ref": "793" + }, + "value": [ + { + "$id": "4067", + "kind": "model", + "type": { + "$ref": "794" + }, + "value": { + "$id": "4068", + "name": { + "$id": "4069", + "kind": "string", + "type": { + "$ref": "796" + }, + "value": "metric1" + }, + "defaultLoad": { + "$id": "4070", + "kind": "number", + "type": { + "$ref": "811" + }, + "value": 3 + }, + "weight": { + "$id": "4071", + "kind": "string", + "type": { + "$ref": "68" + }, + "value": "Low" + } + } + } + ] + }, + "servicePackageActivationMode": { + "$id": "4072", + "kind": "string", + "type": { + "$ref": "56" + }, + "value": "SharedProcess" + }, + "servicePlacementPolicies": { + "$id": "4073", + "kind": "array", + "type": { + "$ref": "817" + }, + "value": [ + { + "$id": "4074", + "kind": "model", + "type": { + "$ref": "863" + }, + "value": { + "$id": "4075", + "type": { + "$id": "4076", + "kind": "string", + "type": { + "$ref": "865" + }, + "value": "NonPartiallyPlaceService" + } + } + } + ] + }, + "serviceTypeName": { + "$id": "4077", + "kind": "string", + "type": { + "$ref": "984" + }, + "value": "myServiceType" + } + } + }, + "tags": { + "$id": "4078", + "kind": "dict", + "type": { + "$ref": "1095" + }, + "value": { + "$id": "4079", + "a": { + "$id": "4080", + "kind": "string", + "type": { + "$ref": "1097" + }, + "value": "b" + } + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "4081", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "4082", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4083", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "4084", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4085", + "name": "applicationName", + "nameInRequest": "applicationName", + "doc": "The name of the application resource.", + "type": { + "$id": "4086", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4087", + "name": "serviceName", + "nameInRequest": "serviceName", + "doc": "The name of the service resource in the format of {applicationName}~{serviceName}.", + "type": { + "$id": "4088", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4089", + "name": "parameters", + "nameInRequest": "properties", + "doc": "The service resource updated tags.", + "type": { + "$ref": "1104" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4090", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$ref": "4007" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4091", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "4010" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "4092", + "type": { + "$ref": "769" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Services.update" + }, + { + "$id": "4093", + "kind": "lro", + "name": "delete", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Delete a Service Fabric managed service resource with the specified name.", + "operation": { + "$id": "4094", + "name": "delete", + "resourceName": "ServiceResource", + "doc": "Delete a Service Fabric managed service resource with the specified name.", + "accessibility": "public", + "parameters": [ + { + "$id": "4095", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "4096", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "4097", + "type": { + "$id": "4098", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4099", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "4100", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4101", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "4102", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4103", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "4104", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4105", + "name": "applicationName", + "nameInRequest": "applicationName", + "doc": "The name of the application resource.", + "type": { + "$id": "4106", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4107", + "name": "serviceName", + "nameInRequest": "serviceName", + "doc": "The name of the service resource in the format of {applicationName}~{serviceName}.", + "type": { + "$id": "4108", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4109", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "4110", + "kind": "constant", + "valueType": { + "$id": "4111", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "4112", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "4113", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "4114", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "4115", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + } + }, + { + "$id": "4116", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "4117", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false + }, + { + "$id": "4118", + "statusCodes": [ + 204 + ], + "headers": [], + "isErrorResponse": false + } + ], + "httpMethod": "DELETE", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName}", + "bufferResponse": true, + "longRunning": { + "$id": "4119", + "finalStateVia": 1, + "finalResponse": { + "$id": "4120", + "statusCodes": [ + 204 + ] + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Services.delete", + "decorators": [], + "examples": [ + { + "$id": "4121", + "kind": "http", + "name": "Delete a service", + "description": "Delete a service", + "filePath": "2025-03-01-preview/ServiceDeleteOperation_example.json", + "parameters": [ + { + "$id": "4122", + "parameter": { + "$ref": "4095" + }, + "value": { + "$id": "4123", + "kind": "string", + "type": { + "$ref": "4096" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "4124", + "parameter": { + "$ref": "4105" + }, + "value": { + "$id": "4125", + "kind": "string", + "type": { + "$ref": "4106" + }, + "value": "myApp" + } + }, + { + "$id": "4126", + "parameter": { + "$ref": "4103" + }, + "value": { + "$id": "4127", + "kind": "string", + "type": { + "$ref": "4104" + }, + "value": "myCluster" + } + }, + { + "$id": "4128", + "parameter": { + "$ref": "4101" + }, + "value": { + "$id": "4129", + "kind": "string", + "type": { + "$ref": "4102" + }, + "value": "resRg" + } + }, + { + "$id": "4130", + "parameter": { + "$ref": "4107" + }, + "value": { + "$id": "4131", + "kind": "string", + "type": { + "$ref": "4108" + }, + "value": "myService" + } + }, + { + "$id": "4132", + "parameter": { + "$ref": "4099" + }, + "value": { + "$id": "4133", + "kind": "string", + "type": { + "$ref": "4100" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "4134", + "response": { + "$ref": "4112" + }, + "statusCode": 202 + }, + { + "$id": "4135", + "response": { + "$ref": "4118" + }, + "statusCode": 204 + } + ] + } + ] + }, + "parameters": [ + { + "$id": "4136", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "4137", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4138", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "4139", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4140", + "name": "applicationName", + "nameInRequest": "applicationName", + "doc": "The name of the application resource.", + "type": { + "$id": "4141", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4142", + "name": "serviceName", + "nameInRequest": "serviceName", + "doc": "The name of the service resource in the format of {applicationName}~{serviceName}.", + "type": { + "$id": "4143", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4144", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "4145", + "kind": "constant", + "valueType": { + "$id": "4146", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "4147" + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Services.delete" + }, + { + "$id": "4148", + "kind": "paging", + "name": "listByApplications", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Gets all service resources created or in the process of being created in the Service Fabric managed application resource.", + "operation": { + "$id": "4149", + "name": "listByApplications", + "resourceName": "ServiceResource", + "doc": "Gets all service resources created or in the process of being created in the Service Fabric managed application resource.", + "accessibility": "public", + "parameters": [ + { + "$id": "4150", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "4151", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "4152", + "type": { + "$id": "4153", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4154", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "4155", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4156", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "4157", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4158", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "4159", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4160", + "name": "applicationName", + "nameInRequest": "applicationName", + "doc": "The name of the application resource.", + "type": { + "$id": "4161", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4162", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "4163", + "kind": "constant", + "valueType": { + "$id": "4164", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "4165", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1111" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services", + "bufferResponse": true, + "paging": { + "$id": "4166", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "4167", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Services.listByApplications", + "decorators": [], + "examples": [ + { + "$id": "4168", + "kind": "http", + "name": "Get a list of service resources", + "description": "Get a list of service resources", + "filePath": "2025-03-01-preview/ServiceListOperation_example.json", + "parameters": [ + { + "$id": "4169", + "parameter": { + "$ref": "4150" + }, + "value": { + "$id": "4170", + "kind": "string", + "type": { + "$ref": "4151" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "4171", + "parameter": { + "$ref": "4160" + }, + "value": { + "$id": "4172", + "kind": "string", + "type": { + "$ref": "4161" + }, + "value": "myApp" + } + }, + { + "$id": "4173", + "parameter": { + "$ref": "4158" + }, + "value": { + "$id": "4174", + "kind": "string", + "type": { + "$ref": "4159" + }, + "value": "myCluster" + } + }, + { + "$id": "4175", + "parameter": { + "$ref": "4156" + }, + "value": { + "$id": "4176", + "kind": "string", + "type": { + "$ref": "4157" + }, + "value": "resRg" + } + }, + { + "$id": "4177", + "parameter": { + "$ref": "4154" + }, + "value": { + "$id": "4178", + "kind": "string", + "type": { + "$ref": "4155" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "4179", + "response": { + "$ref": "4165" + }, + "statusCode": 200, + "bodyValue": { + "$id": "4180", + "kind": "model", + "type": { + "$ref": "1111" + }, + "value": { + "$id": "4181", + "nextLink": { + "$id": "4182", + "kind": "string", + "type": { + "$ref": "1117" + }, + "value": "http://examplelink.com" + }, + "value": { + "$id": "4183", + "kind": "array", + "type": { + "$ref": "1113" + }, + "value": [ + { + "$id": "4184", + "kind": "model", + "type": { + "$ref": "769" + }, + "value": { + "$id": "4185", + "name": { + "$id": "4186", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "myService" + }, + "type": { + "$id": "4187", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/applications/services" + }, + "id": { + "$id": "4188", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applications/myApp/services/myService" + }, + "properties": { + "$id": "4189", + "kind": "model", + "type": { + "$ref": "1072" + }, + "value": { + "$id": "4190", + "instanceCount": { + "$id": "4191", + "kind": "number", + "type": { + "$ref": "1074" + }, + "value": 1 + }, + "partitionDescription": { + "$id": "4192", + "kind": "model", + "type": { + "$ref": "1011" + }, + "value": { + "$id": "4193", + "partitionScheme": { + "$id": "4194", + "kind": "string", + "type": { + "$ref": "1013" + }, + "value": "Singleton" + } + } + }, + "provisioningState": { + "$id": "4195", + "kind": "string", + "type": { + "$ref": "980" + }, + "value": "Updating" + }, + "serviceKind": { + "$id": "4196", + "kind": "string", + "type": { + "$ref": "1086" + }, + "value": "Stateless" + }, + "serviceLoadMetrics": { + "$id": "4197", + "kind": "array", + "type": { + "$ref": "793" + }, + "value": [ + { + "$id": "4198", + "kind": "model", + "type": { + "$ref": "794" + }, + "value": { + "$id": "4199", + "name": { + "$id": "4200", + "kind": "string", + "type": { + "$ref": "796" + }, + "value": "metric1" + }, + "weight": { + "$id": "4201", + "kind": "string", + "type": { + "$ref": "68" + }, + "value": "Low" + } + } + } + ] + }, + "servicePackageActivationMode": { + "$id": "4202", + "kind": "string", + "type": { + "$ref": "56" + }, + "value": "SharedProcess" + }, + "serviceTypeName": { + "$id": "4203", + "kind": "string", + "type": { + "$ref": "984" + }, + "value": "myServiceType" + } + } + } + } + } + ] + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "4204", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "4205", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4206", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "4207", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4208", + "name": "applicationName", + "nameInRequest": "applicationName", + "doc": "The name of the application resource.", + "type": { + "$id": "4209", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4210", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "4163" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "4211", + "type": { + "$id": "4212", + "kind": "array", + "name": "ArrayServiceResource", + "valueType": { + "$ref": "769" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "resultSegments": [ + "value" + ] + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Services.listByApplications" + } + ], + "parameters": [ + { + "$id": "4213", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "4214", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "location": "Uri", + "isApiVersion": false, + "isContentType": false, + "isRequired": true, + "isEndpoint": true, + "skipUrlEncoding": false, + "explode": false, + "kind": "Client", + "defaultValue": { + "$id": "4215", + "type": { + "$id": "4216", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "4217", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "4218" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.Services", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "parent": { + "$ref": "2378" + } + }, + { + "$id": "4219", + "kind": "client", + "name": "ManagedClusterVersion", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "methods": [ + { + "$id": "4220", + "kind": "basic", + "name": "get", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Gets information about an available Service Fabric managed cluster code version.", + "summary": "Gets information about a Service Fabric managed cluster code version available in the specified location.", + "operation": { + "$id": "4221", + "name": "get", + "resourceName": "ManagedClusterVersion", + "summary": "Gets information about a Service Fabric managed cluster code version available in the specified location.", + "doc": "Gets information about an available Service Fabric managed cluster code version.", + "accessibility": "public", + "parameters": [ + { + "$id": "4222", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "4223", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "4224", + "type": { + "$id": "4225", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4226", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "4227", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4228", + "name": "location", + "nameInRequest": "location", + "doc": "The location for the cluster code versions. This is different from cluster location.", + "type": { + "$id": "4229", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4230", + "name": "clusterVersion", + "nameInRequest": "clusterVersion", + "doc": "The cluster code version.", + "type": { + "$id": "4231", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4232", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "4233", + "kind": "constant", + "valueType": { + "$id": "4234", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "4235", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1121" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterVersions/{clusterVersion}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterVersion.get", + "decorators": [], + "examples": [ + { + "$id": "4236", + "kind": "http", + "name": "Get cluster version", + "description": "Get cluster version", + "filePath": "2025-03-01-preview/ManagedClusterVersionGet_example.json", + "parameters": [ + { + "$id": "4237", + "parameter": { + "$ref": "4222" + }, + "value": { + "$id": "4238", + "kind": "string", + "type": { + "$ref": "4223" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "4239", + "parameter": { + "$ref": "4230" + }, + "value": { + "$id": "4240", + "kind": "string", + "type": { + "$ref": "4231" + }, + "value": "7.2.477.9590" + } + }, + { + "$id": "4241", + "parameter": { + "$ref": "4228" + }, + "value": { + "$id": "4242", + "kind": "string", + "type": { + "$ref": "4229" + }, + "value": "eastus" + } + }, + { + "$id": "4243", + "parameter": { + "$ref": "4226" + }, + "value": { + "$id": "4244", + "kind": "string", + "type": { + "$ref": "4227" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "4245", + "response": { + "$ref": "4235" + }, + "statusCode": 200, + "bodyValue": { + "$id": "4246", + "kind": "model", + "type": { + "$ref": "1121" + }, + "value": { + "$id": "4247", + "name": { + "$id": "4248", + "kind": "string", + "type": { + "$ref": "1127" + }, + "value": "7.2.477.9590" + }, + "type": { + "$id": "4249", + "kind": "string", + "type": { + "$ref": "1131" + }, + "value": "Microsoft.ServiceFabric/locations/environments/managedClusterVersions" + }, + "id": { + "$id": "4250", + "kind": "string", + "type": { + "$ref": "1123" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/environments/Windows/managedClusterVersions/7.2.477.9590" + }, + "properties": { + "$id": "4251", + "kind": "model", + "type": { + "$ref": "1135" + }, + "value": { + "$id": "4252", + "clusterCodeVersion": { + "$id": "4253", + "kind": "string", + "type": { + "$ref": "1137" + }, + "value": "7.2.477.9590" + }, + "osType": { + "$id": "4254", + "kind": "string", + "type": { + "$ref": "112" + }, + "value": "Windows" + }, + "supportExpiryUtc": { + "$id": "4255", + "kind": "string", + "type": { + "$ref": "1141" + }, + "value": "2021-11-30T00:00:00" + } + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "4256", + "name": "location", + "nameInRequest": "location", + "doc": "The location for the cluster code versions. This is different from cluster location.", + "type": { + "$id": "4257", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4258", + "name": "clusterVersion", + "nameInRequest": "clusterVersion", + "doc": "The cluster code version.", + "type": { + "$id": "4259", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4260", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "4233" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "4261", + "type": { + "$ref": "1121" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterVersion.get" + }, + { + "$id": "4262", + "kind": "basic", + "name": "list", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Gets all available code versions for Service Fabric cluster resources by location.", + "summary": "Gets the list of Service Fabric cluster code versions available for the specified location.", + "operation": { + "$id": "4263", + "name": "list", + "resourceName": "ManagedClusterVersion", + "summary": "Gets the list of Service Fabric cluster code versions available for the specified location.", + "doc": "Gets all available code versions for Service Fabric cluster resources by location.", + "accessibility": "public", + "parameters": [ + { + "$id": "4264", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "4265", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "4266", + "type": { + "$id": "4267", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4268", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "4269", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4270", + "name": "location", + "nameInRequest": "location", + "doc": "The location for the cluster code versions. This is different from cluster location.", + "type": { + "$id": "4271", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4272", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "4273", + "kind": "constant", + "valueType": { + "$id": "4274", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "4275", + "statusCodes": [ + 200 + ], + "bodyType": { + "$id": "4276", + "kind": "array", + "name": "ArrayManagedClusterCodeVersionResult", + "valueType": { + "$ref": "1121" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterVersions", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterVersion.list", + "decorators": [], + "examples": [ + { + "$id": "4277", + "kind": "http", + "name": "List cluster versions", + "description": "List cluster versions", + "filePath": "2025-03-01-preview/ManagedClusterVersionList_example.json", + "parameters": [ + { + "$id": "4278", + "parameter": { + "$ref": "4264" + }, + "value": { + "$id": "4279", + "kind": "string", + "type": { + "$ref": "4265" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "4280", + "parameter": { + "$ref": "4270" + }, + "value": { + "$id": "4281", + "kind": "string", + "type": { + "$ref": "4271" + }, + "value": "eastus" + } + }, + { + "$id": "4282", + "parameter": { + "$ref": "4268" + }, + "value": { + "$id": "4283", + "kind": "string", + "type": { + "$ref": "4269" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "4284", + "response": { + "$ref": "4275" + }, + "statusCode": 200, + "bodyValue": { + "$id": "4285", + "kind": "array", + "type": { + "$ref": "4276" + }, + "value": [ + { + "$id": "4286", + "kind": "model", + "type": { + "$ref": "1121" + }, + "value": { + "$id": "4287", + "name": { + "$id": "4288", + "kind": "string", + "type": { + "$ref": "1127" + }, + "value": "7.2.457.9590" + }, + "type": { + "$id": "4289", + "kind": "string", + "type": { + "$ref": "1131" + }, + "value": "Microsoft.ServiceFabric/locations/environments/managedClusterVersions" + }, + "id": { + "$id": "4290", + "kind": "string", + "type": { + "$ref": "1123" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/environments/Windows/managedClusterVersions/7.2.457.9590" + }, + "properties": { + "$id": "4291", + "kind": "model", + "type": { + "$ref": "1135" + }, + "value": { + "$id": "4292", + "clusterCodeVersion": { + "$id": "4293", + "kind": "string", + "type": { + "$ref": "1137" + }, + "value": "7.2.457.9590" + }, + "osType": { + "$id": "4294", + "kind": "string", + "type": { + "$ref": "112" + }, + "value": "Windows" + }, + "supportExpiryUtc": { + "$id": "4295", + "kind": "string", + "type": { + "$ref": "1141" + }, + "value": "2021-11-30T00:00:00" + } + } + } + } + }, + { + "$id": "4296", + "kind": "model", + "type": { + "$ref": "1121" + }, + "value": { + "$id": "4297", + "name": { + "$id": "4298", + "kind": "string", + "type": { + "$ref": "1127" + }, + "value": "7.2.477.9590" + }, + "type": { + "$id": "4299", + "kind": "string", + "type": { + "$ref": "1131" + }, + "value": "Microsoft.ServiceFabric/locations/environments/managedClusterVersions" + }, + "id": { + "$id": "4300", + "kind": "string", + "type": { + "$ref": "1123" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/environments/Windows/managedClusterVersions/7.2.477.9590" + }, + "properties": { + "$id": "4301", + "kind": "model", + "type": { + "$ref": "1135" + }, + "value": { + "$id": "4302", + "clusterCodeVersion": { + "$id": "4303", + "kind": "string", + "type": { + "$ref": "1137" + }, + "value": "7.2.477.9590" + }, + "osType": { + "$id": "4304", + "kind": "string", + "type": { + "$ref": "112" + }, + "value": "Windows" + }, + "supportExpiryUtc": { + "$id": "4305", + "kind": "string", + "type": { + "$ref": "1141" + }, + "value": "2021-11-30T00:00:00" + } + } + } + } + } + ] + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "4306", + "name": "location", + "nameInRequest": "location", + "doc": "The location for the cluster code versions. This is different from cluster location.", + "type": { + "$id": "4307", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4308", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "4273" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "4309", + "type": { + "$ref": "4276" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterVersion.list" + }, + { + "$id": "4310", + "kind": "basic", + "name": "GetManagedClusterVersionByEnvironment", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Gets information about an available Service Fabric cluster code version by environment.", + "summary": "Gets information about a Service Fabric cluster code version available for the specified environment.", + "operation": { + "$id": "4311", + "name": "GetManagedClusterVersionByEnvironment", + "resourceName": "ManagedClusterVersion", + "summary": "Gets information about a Service Fabric cluster code version available for the specified environment.", + "doc": "Gets information about an available Service Fabric cluster code version by environment.", + "accessibility": "public", + "parameters": [ + { + "$id": "4312", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "4313", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "4314", + "type": { + "$id": "4315", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4316", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "4317", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4318", + "name": "location", + "nameInRequest": "location", + "doc": "The location for the cluster code versions. This is different from cluster location.", + "type": { + "$id": "4319", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4320", + "name": "environment", + "nameInRequest": "environment", + "doc": "The operating system of the cluster.", + "type": { + "$ref": "116" + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4321", + "name": "clusterVersion", + "nameInRequest": "clusterVersion", + "doc": "The cluster code version.", + "type": { + "$id": "4322", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4323", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "4324", + "kind": "constant", + "valueType": { + "$id": "4325", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "4326", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1121" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/environments/{environment}/managedClusterVersions/{clusterVersion}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterVersion.getByEnvironment", + "decorators": [], + "examples": [ + { + "$id": "4327", + "kind": "http", + "name": "Get cluster version by environment", + "description": "Get cluster version by environment", + "filePath": "2025-03-01-preview/ManagedClusterVersionGetByEnvironment_example.json", + "parameters": [ + { + "$id": "4328", + "parameter": { + "$ref": "4312" + }, + "value": { + "$id": "4329", + "kind": "string", + "type": { + "$ref": "4313" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "4330", + "parameter": { + "$ref": "4321" + }, + "value": { + "$id": "4331", + "kind": "string", + "type": { + "$ref": "4322" + }, + "value": "7.2.477.9590" + } + }, + { + "$id": "4332", + "parameter": { + "$ref": "4320" + }, + "value": { + "$id": "4333", + "kind": "string", + "type": { + "$ref": "116" + }, + "value": "Windows" + } + }, + { + "$id": "4334", + "parameter": { + "$ref": "4318" + }, + "value": { + "$id": "4335", + "kind": "string", + "type": { + "$ref": "4319" + }, + "value": "eastus" + } + }, + { + "$id": "4336", + "parameter": { + "$ref": "4316" + }, + "value": { + "$id": "4337", + "kind": "string", + "type": { + "$ref": "4317" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "4338", + "response": { + "$ref": "4326" + }, + "statusCode": 200, + "bodyValue": { + "$id": "4339", + "kind": "model", + "type": { + "$ref": "1121" + }, + "value": { + "$id": "4340", + "name": { + "$id": "4341", + "kind": "string", + "type": { + "$ref": "1127" + }, + "value": "7.2.477.9590" + }, + "type": { + "$id": "4342", + "kind": "string", + "type": { + "$ref": "1131" + }, + "value": "Microsoft.ServiceFabric/locations/environments/managedClusterVersions" + }, + "id": { + "$id": "4343", + "kind": "string", + "type": { + "$ref": "1123" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/environments/Windows/managedClusterVersions/7.2.477.9590" + }, + "properties": { + "$id": "4344", + "kind": "model", + "type": { + "$ref": "1135" + }, + "value": { + "$id": "4345", + "clusterCodeVersion": { + "$id": "4346", + "kind": "string", + "type": { + "$ref": "1137" + }, + "value": "7.2.477.9590" + }, + "osType": { + "$id": "4347", + "kind": "string", + "type": { + "$ref": "112" + }, + "value": "Windows" + }, + "supportExpiryUtc": { + "$id": "4348", + "kind": "string", + "type": { + "$ref": "1141" + }, + "value": "2021-11-30T00:00:00" + } + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "4349", + "name": "location", + "nameInRequest": "location", + "doc": "The location for the cluster code versions. This is different from cluster location.", + "type": { + "$id": "4350", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4351", + "name": "environment", + "nameInRequest": "environment", + "doc": "The operating system of the cluster.", + "type": { + "$ref": "116" + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4352", + "name": "clusterVersion", + "nameInRequest": "clusterVersion", + "doc": "The cluster code version.", + "type": { + "$id": "4353", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4354", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "4324" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "4355", + "type": { + "$ref": "1121" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterVersion.getByEnvironment" + }, + { + "$id": "4356", + "kind": "basic", + "name": "listByEnvironment", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Gets all available code versions for Service Fabric cluster resources by environment.", + "summary": "Gets the list of Service Fabric cluster code versions available for the specified environment.", + "operation": { + "$id": "4357", + "name": "listByEnvironment", + "resourceName": "ManagedClusterVersion", + "summary": "Gets the list of Service Fabric cluster code versions available for the specified environment.", + "doc": "Gets all available code versions for Service Fabric cluster resources by environment.", + "accessibility": "public", + "parameters": [ + { + "$id": "4358", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "4359", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "4360", + "type": { + "$id": "4361", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4362", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "4363", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4364", + "name": "location", + "nameInRequest": "location", + "doc": "The location for the cluster code versions. This is different from cluster location.", + "type": { + "$id": "4365", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4366", + "name": "environment", + "nameInRequest": "environment", + "doc": "The operating system of the cluster.", + "type": { + "$ref": "116" + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4367", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "4368", + "kind": "constant", + "valueType": { + "$id": "4369", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "4370", + "statusCodes": [ + 200 + ], + "bodyType": { + "$id": "4371", + "kind": "array", + "name": "ArrayManagedClusterCodeVersionResult", + "valueType": { + "$ref": "1121" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/environments/{environment}/managedClusterVersions", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterVersion.listByEnvironment", + "decorators": [], + "examples": [ + { + "$id": "4372", + "kind": "http", + "name": "List cluster versions by environment", + "description": "List cluster versions by environment", + "filePath": "2025-03-01-preview/ManagedClusterVersionListByEnvironment.json", + "parameters": [ + { + "$id": "4373", + "parameter": { + "$ref": "4358" + }, + "value": { + "$id": "4374", + "kind": "string", + "type": { + "$ref": "4359" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "4375", + "parameter": { + "$ref": "4366" + }, + "value": { + "$id": "4376", + "kind": "string", + "type": { + "$ref": "116" + }, + "value": "Windows" + } + }, + { + "$id": "4377", + "parameter": { + "$ref": "4364" + }, + "value": { + "$id": "4378", + "kind": "string", + "type": { + "$ref": "4365" + }, + "value": "eastus" + } + }, + { + "$id": "4379", + "parameter": { + "$ref": "4362" + }, + "value": { + "$id": "4380", + "kind": "string", + "type": { + "$ref": "4363" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "4381", + "response": { + "$ref": "4370" + }, + "statusCode": 200, + "bodyValue": { + "$id": "4382", + "kind": "array", + "type": { + "$ref": "4371" + }, + "value": [ + { + "$id": "4383", + "kind": "model", + "type": { + "$ref": "1121" + }, + "value": { + "$id": "4384", + "name": { + "$id": "4385", + "kind": "string", + "type": { + "$ref": "1127" + }, + "value": "7.2.457.9590" + }, + "type": { + "$id": "4386", + "kind": "string", + "type": { + "$ref": "1131" + }, + "value": "Microsoft.ServiceFabric/locations/environments/managedClusterVersions" + }, + "id": { + "$id": "4387", + "kind": "string", + "type": { + "$ref": "1123" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/environments/Windows/managedClusterVersions/7.2.457.9590" + }, + "properties": { + "$id": "4388", + "kind": "model", + "type": { + "$ref": "1135" + }, + "value": { + "$id": "4389", + "clusterCodeVersion": { + "$id": "4390", + "kind": "string", + "type": { + "$ref": "1137" + }, + "value": "7.2.457.9590" + }, + "osType": { + "$id": "4391", + "kind": "string", + "type": { + "$ref": "112" + }, + "value": "Windows" + }, + "supportExpiryUtc": { + "$id": "4392", + "kind": "string", + "type": { + "$ref": "1141" + }, + "value": "2021-11-30T00:00:00" + } + } + } + } + }, + { + "$id": "4393", + "kind": "model", + "type": { + "$ref": "1121" + }, + "value": { + "$id": "4394", + "name": { + "$id": "4395", + "kind": "string", + "type": { + "$ref": "1127" + }, + "value": "7.2.477.9590" + }, + "type": { + "$id": "4396", + "kind": "string", + "type": { + "$ref": "1131" + }, + "value": "Microsoft.ServiceFabric/locations/environments/managedClusterVersions" + }, + "id": { + "$id": "4397", + "kind": "string", + "type": { + "$ref": "1123" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/environments/Windows/managedClusterVersions/7.2.477.9590" + }, + "properties": { + "$id": "4398", + "kind": "model", + "type": { + "$ref": "1135" + }, + "value": { + "$id": "4399", + "clusterCodeVersion": { + "$id": "4400", + "kind": "string", + "type": { + "$ref": "1137" + }, + "value": "7.2.477.9590" + }, + "osType": { + "$id": "4401", + "kind": "string", + "type": { + "$ref": "112" + }, + "value": "Windows" + }, + "supportExpiryUtc": { + "$id": "4402", + "kind": "string", + "type": { + "$ref": "1141" + }, + "value": "2021-11-30T00:00:00" + } + } + } + } + } + ] + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "4403", + "name": "location", + "nameInRequest": "location", + "doc": "The location for the cluster code versions. This is different from cluster location.", + "type": { + "$id": "4404", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4405", + "name": "environment", + "nameInRequest": "environment", + "doc": "The operating system of the cluster.", + "type": { + "$ref": "116" + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4406", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "4368" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "4407", + "type": { + "$ref": "4371" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterVersion.listByEnvironment" + } + ], + "parameters": [ + { + "$id": "4408", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "4409", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "location": "Uri", + "isApiVersion": false, + "isContentType": false, + "isRequired": true, + "isEndpoint": true, + "skipUrlEncoding": false, + "explode": false, + "kind": "Client", + "defaultValue": { + "$id": "4410", + "type": { + "$id": "4411", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusterVersion", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "parent": { + "$ref": "2378" + } + }, + { + "$id": "4412", + "kind": "client", + "name": "ManagedUnsupportedVMSizes", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "methods": [ + { + "$id": "4413", + "kind": "basic", + "name": "GetManagedUnsupportedVmSize", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Get unsupported vm size for Service Fabric Managed Clusters.", + "operation": { + "$id": "4414", + "name": "GetManagedUnsupportedVmSize", + "resourceName": "ManagedUnsupportedVMSizes", + "doc": "Get unsupported vm size for Service Fabric Managed Clusters.", + "accessibility": "public", + "parameters": [ + { + "$id": "4415", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "4416", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "4417", + "type": { + "$id": "4418", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4419", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "4420", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4421", + "name": "location", + "nameInRequest": "location", + "doc": "The location for the cluster code versions. This is different from cluster location.", + "type": { + "$id": "4422", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4423", + "name": "vmSize", + "nameInRequest": "vmSize", + "doc": "VM Size name.", + "type": { + "$id": "4424", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4425", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "4426", + "kind": "constant", + "valueType": { + "$id": "4427", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "4428", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1150" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedUnsupportedVMSizes/{vmSize}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedUnsupportedVMSizes.get", + "decorators": [], + "examples": [ + { + "$id": "4429", + "kind": "http", + "name": "Get unsupported vm sizes", + "description": "Get unsupported vm sizes", + "filePath": "2025-03-01-preview/managedUnsupportedVMSizesGet_example.json", + "parameters": [ + { + "$id": "4430", + "parameter": { + "$ref": "4415" + }, + "value": { + "$id": "4431", + "kind": "string", + "type": { + "$ref": "4416" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "4432", + "parameter": { + "$ref": "4421" + }, + "value": { + "$id": "4433", + "kind": "string", + "type": { + "$ref": "4422" + }, + "value": "eastus" + } + }, + { + "$id": "4434", + "parameter": { + "$ref": "4419" + }, + "value": { + "$id": "4435", + "kind": "string", + "type": { + "$ref": "4420" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + }, + { + "$id": "4436", + "parameter": { + "$ref": "4423" + }, + "value": { + "$id": "4437", + "kind": "string", + "type": { + "$ref": "4424" + }, + "value": "Standard_B1ls1" + } + } + ], + "responses": [ + { + "$id": "4438", + "response": { + "$ref": "4428" + }, + "statusCode": 200, + "bodyValue": { + "$id": "4439", + "kind": "model", + "type": { + "$ref": "1150" + }, + "value": { + "$id": "4440", + "name": { + "$id": "4441", + "kind": "string", + "type": { + "$ref": "1164" + }, + "value": "Standard_B1ls1" + }, + "type": { + "$id": "4442", + "kind": "string", + "type": { + "$ref": "1168" + }, + "value": "Microsoft.ServiceFabric/locations/managedVMSizes" + }, + "id": { + "$id": "4443", + "kind": "string", + "type": { + "$ref": "1160" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/managedVMSizes/Standard_B1ls1" + }, + "properties": { + "$id": "4444", + "kind": "model", + "type": { + "$ref": "1152" + }, + "value": { + "$id": "4445", + "size": { + "$id": "4446", + "kind": "string", + "type": { + "$ref": "1154" + }, + "value": "Standard_B1ls1" + } + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "4447", + "name": "location", + "nameInRequest": "location", + "doc": "The location for the cluster code versions. This is different from cluster location.", + "type": { + "$id": "4448", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4449", + "name": "vmSize", + "nameInRequest": "vmSize", + "doc": "VM Size name.", + "type": { + "$id": "4450", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4451", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "4426" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "4452", + "type": { + "$ref": "1150" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedUnsupportedVMSizes.get" + }, + { + "$id": "4453", + "kind": "paging", + "name": "GetManagedUnsupportedVmSizes", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Get the lists of unsupported vm sizes for Service Fabric Managed Clusters.", + "operation": { + "$id": "4454", + "name": "GetManagedUnsupportedVmSizes", + "resourceName": "ManagedUnsupportedVMSizes", + "doc": "Get the lists of unsupported vm sizes for Service Fabric Managed Clusters.", + "accessibility": "public", + "parameters": [ + { + "$id": "4455", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "4456", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "4457", + "type": { + "$id": "4458", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4459", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "4460", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4461", + "name": "location", + "nameInRequest": "location", + "doc": "The location for the cluster code versions. This is different from cluster location.", + "type": { + "$id": "4462", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4463", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "4464", + "kind": "constant", + "valueType": { + "$id": "4465", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "4466", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1171" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedUnsupportedVMSizes", + "bufferResponse": true, + "paging": { + "$id": "4467", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "4468", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedUnsupportedVMSizes.list", + "decorators": [], + "examples": [ + { + "$id": "4469", + "kind": "http", + "name": "List unsupported vm sizes", + "description": "List unsupported vm sizes", + "filePath": "2025-03-01-preview/managedUnsupportedVMSizesList_example.json", + "parameters": [ + { + "$id": "4470", + "parameter": { + "$ref": "4455" + }, + "value": { + "$id": "4471", + "kind": "string", + "type": { + "$ref": "4456" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "4472", + "parameter": { + "$ref": "4461" + }, + "value": { + "$id": "4473", + "kind": "string", + "type": { + "$ref": "4462" + }, + "value": "eastus" + } + }, + { + "$id": "4474", + "parameter": { + "$ref": "4459" + }, + "value": { + "$id": "4475", + "kind": "string", + "type": { + "$ref": "4460" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "4476", + "response": { + "$ref": "4466" + }, + "statusCode": 200, + "bodyValue": { + "$id": "4477", + "kind": "model", + "type": { + "$ref": "1171" + }, + "value": { + "$id": "4478", + "value": { + "$id": "4479", + "kind": "array", + "type": { + "$ref": "1173" + }, + "value": [ + { + "$id": "4480", + "kind": "model", + "type": { + "$ref": "1150" + }, + "value": { + "$id": "4481", + "name": { + "$id": "4482", + "kind": "string", + "type": { + "$ref": "1164" + }, + "value": "Standard_B1ls1" + }, + "type": { + "$id": "4483", + "kind": "string", + "type": { + "$ref": "1168" + }, + "value": "Microsoft.ServiceFabric/locations/managedVMSizes" + }, + "id": { + "$id": "4484", + "kind": "string", + "type": { + "$ref": "1160" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/managedVMSizes/Standard_B1ls1" + }, + "properties": { + "$id": "4485", + "kind": "model", + "type": { + "$ref": "1152" + }, + "value": { + "$id": "4486", + "size": { + "$id": "4487", + "kind": "string", + "type": { + "$ref": "1154" + }, + "value": "Standard_B1ls1" + } + } + } + } + }, + { + "$id": "4488", + "kind": "model", + "type": { + "$ref": "1150" + }, + "value": { + "$id": "4489", + "name": { + "$id": "4490", + "kind": "string", + "type": { + "$ref": "1164" + }, + "value": "Standard_B1s" + }, + "type": { + "$id": "4491", + "kind": "string", + "type": { + "$ref": "1168" + }, + "value": "Microsoft.ServiceFabric/locations/managedVMSizes" + }, + "id": { + "$id": "4492", + "kind": "string", + "type": { + "$ref": "1160" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/managedVMSizes/Standard_B1s" + }, + "properties": { + "$id": "4493", + "kind": "model", + "type": { + "$ref": "1152" + }, + "value": { + "$id": "4494", + "size": { + "$id": "4495", + "kind": "string", + "type": { + "$ref": "1154" + }, + "value": "Standard_B1s" + } + } + } + } + }, + { + "$id": "4496", + "kind": "model", + "type": { + "$ref": "1150" + }, + "value": { + "$id": "4497", + "name": { + "$id": "4498", + "kind": "string", + "type": { + "$ref": "1164" + }, + "value": "Standard_B1ms" + }, + "type": { + "$id": "4499", + "kind": "string", + "type": { + "$ref": "1168" + }, + "value": "Microsoft.ServiceFabric/locations/managedVMSizes" + }, + "id": { + "$id": "4500", + "kind": "string", + "type": { + "$ref": "1160" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/managedVMSizes/Standard_B1ms" + }, + "properties": { + "$id": "4501", + "kind": "model", + "type": { + "$ref": "1152" + }, + "value": { + "$id": "4502", + "size": { + "$id": "4503", + "kind": "string", + "type": { + "$ref": "1154" + }, + "value": "Standard_B1ms" + } + } + } + } + }, + { + "$id": "4504", + "kind": "model", + "type": { + "$ref": "1150" + }, + "value": { + "$id": "4505", + "name": { + "$id": "4506", + "kind": "string", + "type": { + "$ref": "1164" + }, + "value": "Standard_B2s" + }, + "type": { + "$id": "4507", + "kind": "string", + "type": { + "$ref": "1168" + }, + "value": "Microsoft.ServiceFabric/locations/managedVMSizes" + }, + "id": { + "$id": "4508", + "kind": "string", + "type": { + "$ref": "1160" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/managedVMSizes/Standard_B2s" + }, + "properties": { + "$id": "4509", + "kind": "model", + "type": { + "$ref": "1152" + }, + "value": { + "$id": "4510", + "size": { + "$id": "4511", + "kind": "string", + "type": { + "$ref": "1154" + }, + "value": "Standard_B2s" + } + } + } + } + }, + { + "$id": "4512", + "kind": "model", + "type": { + "$ref": "1150" + }, + "value": { + "$id": "4513", + "name": { + "$id": "4514", + "kind": "string", + "type": { + "$ref": "1164" + }, + "value": "Standard_B2ms" + }, + "type": { + "$id": "4515", + "kind": "string", + "type": { + "$ref": "1168" + }, + "value": "Microsoft.ServiceFabric/locations/managedVMSizes" + }, + "id": { + "$id": "4516", + "kind": "string", + "type": { + "$ref": "1160" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/managedVMSizes/Standard_B2ms" + }, + "properties": { + "$id": "4517", + "kind": "model", + "type": { + "$ref": "1152" + }, + "value": { + "$id": "4518", + "size": { + "$id": "4519", + "kind": "string", + "type": { + "$ref": "1154" + }, + "value": "Standard_B2ms" + } + } + } + } + }, + { + "$id": "4520", + "kind": "model", + "type": { + "$ref": "1150" + }, + "value": { + "$id": "4521", + "name": { + "$id": "4522", + "kind": "string", + "type": { + "$ref": "1164" + }, + "value": "Standard_B4ms" + }, + "type": { + "$id": "4523", + "kind": "string", + "type": { + "$ref": "1168" + }, + "value": "Microsoft.ServiceFabric/locations/managedVMSizes" + }, + "id": { + "$id": "4524", + "kind": "string", + "type": { + "$ref": "1160" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/managedVMSizes/Standard_B4ms" + }, + "properties": { + "$id": "4525", + "kind": "model", + "type": { + "$ref": "1152" + }, + "value": { + "$id": "4526", + "size": { + "$id": "4527", + "kind": "string", + "type": { + "$ref": "1154" + }, + "value": "Standard_B4ms" + } + } + } + } + }, + { + "$id": "4528", + "kind": "model", + "type": { + "$ref": "1150" + }, + "value": { + "$id": "4529", + "name": { + "$id": "4530", + "kind": "string", + "type": { + "$ref": "1164" + }, + "value": "Standard_B8ms" + }, + "type": { + "$id": "4531", + "kind": "string", + "type": { + "$ref": "1168" + }, + "value": "Microsoft.ServiceFabric/locations/managedVMSizes" + }, + "id": { + "$id": "4532", + "kind": "string", + "type": { + "$ref": "1160" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/managedVMSizes/Standard_B8ms" + }, + "properties": { + "$id": "4533", + "kind": "model", + "type": { + "$ref": "1152" + }, + "value": { + "$id": "4534", + "size": { + "$id": "4535", + "kind": "string", + "type": { + "$ref": "1154" + }, + "value": "Standard_B8ms" + } + } + } + } + }, + { + "$id": "4536", + "kind": "model", + "type": { + "$ref": "1150" + }, + "value": { + "$id": "4537", + "name": { + "$id": "4538", + "kind": "string", + "type": { + "$ref": "1164" + }, + "value": "Standard_A1_v2" + }, + "type": { + "$id": "4539", + "kind": "string", + "type": { + "$ref": "1168" + }, + "value": "Microsoft.ServiceFabric/locations/managedVMSizes" + }, + "id": { + "$id": "4540", + "kind": "string", + "type": { + "$ref": "1160" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/managedVMSizes/Standard_A1_v2" + }, + "properties": { + "$id": "4541", + "kind": "model", + "type": { + "$ref": "1152" + }, + "value": { + "$id": "4542", + "size": { + "$id": "4543", + "kind": "string", + "type": { + "$ref": "1154" + }, + "value": "Standard_A1_v2" + } + } + } + } + }, + { + "$id": "4544", + "kind": "model", + "type": { + "$ref": "1150" + }, + "value": { + "$id": "4545", + "name": { + "$id": "4546", + "kind": "string", + "type": { + "$ref": "1164" + }, + "value": "Standard_A2_v2" + }, + "type": { + "$id": "4547", + "kind": "string", + "type": { + "$ref": "1168" + }, + "value": "Microsoft.ServiceFabric/locations/managedVMSizes" + }, + "id": { + "$id": "4548", + "kind": "string", + "type": { + "$ref": "1160" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/managedVMSizes/Standard_A2_v2" + }, + "properties": { + "$id": "4549", + "kind": "model", + "type": { + "$ref": "1152" + }, + "value": { + "$id": "4550", + "size": { + "$id": "4551", + "kind": "string", + "type": { + "$ref": "1154" + }, + "value": "Standard_A2_v2" + } + } + } + } + }, + { + "$id": "4552", + "kind": "model", + "type": { + "$ref": "1150" + }, + "value": { + "$id": "4553", + "name": { + "$id": "4554", + "kind": "string", + "type": { + "$ref": "1164" + }, + "value": "Standard_A4_v2" + }, + "type": { + "$id": "4555", + "kind": "string", + "type": { + "$ref": "1168" + }, + "value": "Microsoft.ServiceFabric/locations/managedVMSizes" + }, + "id": { + "$id": "4556", + "kind": "string", + "type": { + "$ref": "1160" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/managedVMSizes/Standard_A4_v2" + }, + "properties": { + "$id": "4557", + "kind": "model", + "type": { + "$ref": "1152" + }, + "value": { + "$id": "4558", + "size": { + "$id": "4559", + "kind": "string", + "type": { + "$ref": "1154" + }, + "value": "Standard_A4_v2" + } + } + } + } + }, + { + "$id": "4560", + "kind": "model", + "type": { + "$ref": "1150" + }, + "value": { + "$id": "4561", + "name": { + "$id": "4562", + "kind": "string", + "type": { + "$ref": "1164" + }, + "value": "Standard_A8_v2" + }, + "type": { + "$id": "4563", + "kind": "string", + "type": { + "$ref": "1168" + }, + "value": "Microsoft.ServiceFabric/locations/managedVMSizes" + }, + "id": { + "$id": "4564", + "kind": "string", + "type": { + "$ref": "1160" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/managedVMSizes/Standard_A8_v2" + }, + "properties": { + "$id": "4565", + "kind": "model", + "type": { + "$ref": "1152" + }, + "value": { + "$id": "4566", + "size": { + "$id": "4567", + "kind": "string", + "type": { + "$ref": "1154" + }, + "value": "Standard_A8_v2" + } + } + } + } + }, + { + "$id": "4568", + "kind": "model", + "type": { + "$ref": "1150" + }, + "value": { + "$id": "4569", + "name": { + "$id": "4570", + "kind": "string", + "type": { + "$ref": "1164" + }, + "value": "Standard_A2m_v2" + }, + "type": { + "$id": "4571", + "kind": "string", + "type": { + "$ref": "1168" + }, + "value": "Microsoft.ServiceFabric/locations/managedVMSizes" + }, + "id": { + "$id": "4572", + "kind": "string", + "type": { + "$ref": "1160" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/managedVMSizes/Standard_A2m_v2" + }, + "properties": { + "$id": "4573", + "kind": "model", + "type": { + "$ref": "1152" + }, + "value": { + "$id": "4574", + "size": { + "$id": "4575", + "kind": "string", + "type": { + "$ref": "1154" + }, + "value": "Standard_A2m_v2" + } + } + } + } + }, + { + "$id": "4576", + "kind": "model", + "type": { + "$ref": "1150" + }, + "value": { + "$id": "4577", + "name": { + "$id": "4578", + "kind": "string", + "type": { + "$ref": "1164" + }, + "value": "Standard_A4m_v2" + }, + "type": { + "$id": "4579", + "kind": "string", + "type": { + "$ref": "1168" + }, + "value": "Microsoft.ServiceFabric/locations/managedVMSizes" + }, + "id": { + "$id": "4580", + "kind": "string", + "type": { + "$ref": "1160" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/managedVMSizes/Standard_A4m_v2" + }, + "properties": { + "$id": "4581", + "kind": "model", + "type": { + "$ref": "1152" + }, + "value": { + "$id": "4582", + "size": { + "$id": "4583", + "kind": "string", + "type": { + "$ref": "1154" + }, + "value": "Standard_A4m_v2" + } + } + } + } + }, + { + "$id": "4584", + "kind": "model", + "type": { + "$ref": "1150" + }, + "value": { + "$id": "4585", + "name": { + "$id": "4586", + "kind": "string", + "type": { + "$ref": "1164" + }, + "value": "Standard_A8m_v2" + }, + "type": { + "$id": "4587", + "kind": "string", + "type": { + "$ref": "1168" + }, + "value": "Microsoft.ServiceFabric/locations/managedVMSizes" + }, + "id": { + "$id": "4588", + "kind": "string", + "type": { + "$ref": "1160" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/managedVMSizes/Standard_A8m_v2" + }, + "properties": { + "$id": "4589", + "kind": "model", + "type": { + "$ref": "1152" + }, + "value": { + "$id": "4590", + "size": { + "$id": "4591", + "kind": "string", + "type": { + "$ref": "1154" + }, + "value": "Standard_A8m_v2" + } + } + } + } + }, + { + "$id": "4592", + "kind": "model", + "type": { + "$ref": "1150" + }, + "value": { + "$id": "4593", + "name": { + "$id": "4594", + "kind": "string", + "type": { + "$ref": "1164" + }, + "value": "Basic_A0" + }, + "type": { + "$id": "4595", + "kind": "string", + "type": { + "$ref": "1168" + }, + "value": "Microsoft.ServiceFabric/locations/managedVMSizes" + }, + "id": { + "$id": "4596", + "kind": "string", + "type": { + "$ref": "1160" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/managedVMSizes/Basic_A0" + }, + "properties": { + "$id": "4597", + "kind": "model", + "type": { + "$ref": "1152" + }, + "value": { + "$id": "4598", + "size": { + "$id": "4599", + "kind": "string", + "type": { + "$ref": "1154" + }, + "value": "Basic_A0" + } + } + } + } + }, + { + "$id": "4600", + "kind": "model", + "type": { + "$ref": "1150" + }, + "value": { + "$id": "4601", + "name": { + "$id": "4602", + "kind": "string", + "type": { + "$ref": "1164" + }, + "value": "Basic_A1" + }, + "type": { + "$id": "4603", + "kind": "string", + "type": { + "$ref": "1168" + }, + "value": "Microsoft.ServiceFabric/locations/managedVMSizes" + }, + "id": { + "$id": "4604", + "kind": "string", + "type": { + "$ref": "1160" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/managedVMSizes/Basic_A1" + }, + "properties": { + "$id": "4605", + "kind": "model", + "type": { + "$ref": "1152" + }, + "value": { + "$id": "4606", + "size": { + "$id": "4607", + "kind": "string", + "type": { + "$ref": "1154" + }, + "value": "Basic_A1" + } + } + } + } + }, + { + "$id": "4608", + "kind": "model", + "type": { + "$ref": "1150" + }, + "value": { + "$id": "4609", + "name": { + "$id": "4610", + "kind": "string", + "type": { + "$ref": "1164" + }, + "value": "Basic_A2" + }, + "type": { + "$id": "4611", + "kind": "string", + "type": { + "$ref": "1168" + }, + "value": "Microsoft.ServiceFabric/locations/managedVMSizes" + }, + "id": { + "$id": "4612", + "kind": "string", + "type": { + "$ref": "1160" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/managedVMSizes/Basic_A2" + }, + "properties": { + "$id": "4613", + "kind": "model", + "type": { + "$ref": "1152" + }, + "value": { + "$id": "4614", + "size": { + "$id": "4615", + "kind": "string", + "type": { + "$ref": "1154" + }, + "value": "Basic_A2" + } + } + } + } + }, + { + "$id": "4616", + "kind": "model", + "type": { + "$ref": "1150" + }, + "value": { + "$id": "4617", + "name": { + "$id": "4618", + "kind": "string", + "type": { + "$ref": "1164" + }, + "value": "Basic_A3" + }, + "type": { + "$id": "4619", + "kind": "string", + "type": { + "$ref": "1168" + }, + "value": "Microsoft.ServiceFabric/locations/managedVMSizes" + }, + "id": { + "$id": "4620", + "kind": "string", + "type": { + "$ref": "1160" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/managedVMSizes/Basic_A3" + }, + "properties": { + "$id": "4621", + "kind": "model", + "type": { + "$ref": "1152" + }, + "value": { + "$id": "4622", + "size": { + "$id": "4623", + "kind": "string", + "type": { + "$ref": "1154" + }, + "value": "Basic_A3" + } + } + } + } + }, + { + "$id": "4624", + "kind": "model", + "type": { + "$ref": "1150" + }, + "value": { + "$id": "4625", + "name": { + "$id": "4626", + "kind": "string", + "type": { + "$ref": "1164" + }, + "value": "Basic_A4" + }, + "type": { + "$id": "4627", + "kind": "string", + "type": { + "$ref": "1168" + }, + "value": "Microsoft.ServiceFabric/locations/managedVMSizes" + }, + "id": { + "$id": "4628", + "kind": "string", + "type": { + "$ref": "1160" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/managedVMSizes/Basic_A4" + }, + "properties": { + "$id": "4629", + "kind": "model", + "type": { + "$ref": "1152" + }, + "value": { + "$id": "4630", + "size": { + "$id": "4631", + "kind": "string", + "type": { + "$ref": "1154" + }, + "value": "Basic_A4" + } + } + } + } + }, + { + "$id": "4632", + "kind": "model", + "type": { + "$ref": "1150" + }, + "value": { + "$id": "4633", + "name": { + "$id": "4634", + "kind": "string", + "type": { + "$ref": "1164" + }, + "value": "Standard_A0" + }, + "type": { + "$id": "4635", + "kind": "string", + "type": { + "$ref": "1168" + }, + "value": "Microsoft.ServiceFabric/locations/managedVMSizes" + }, + "id": { + "$id": "4636", + "kind": "string", + "type": { + "$ref": "1160" + }, + "value": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ServiceFabric/locations/eastus/managedVMSizes/Standard_A0" + }, + "properties": { + "$id": "4637", + "kind": "model", + "type": { + "$ref": "1152" + }, + "value": { + "$id": "4638", + "size": { + "$id": "4639", + "kind": "string", + "type": { + "$ref": "1154" + }, + "value": "Standard_A0" + } + } + } + } + } + ] + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "4640", + "name": "location", + "nameInRequest": "location", + "doc": "The location for the cluster code versions. This is different from cluster location.", + "type": { + "$id": "4641", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4642", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "4464" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "4643", + "type": { + "$id": "4644", + "kind": "array", + "name": "ArrayManagedVmSize", + "valueType": { + "$ref": "1150" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "resultSegments": [ + "value" + ] + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedUnsupportedVMSizes.list" + } + ], + "parameters": [ + { + "$id": "4645", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "4646", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "location": "Uri", + "isApiVersion": false, + "isContentType": false, + "isRequired": true, + "isEndpoint": true, + "skipUrlEncoding": false, + "explode": false, + "kind": "Client", + "defaultValue": { + "$id": "4647", + "type": { + "$id": "4648", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedUnsupportedVMSizes", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "parent": { + "$ref": "2378" + } + }, + { + "$id": "4649", + "kind": "client", + "name": "ManagedClusters", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "methods": [ + { + "$id": "4650", + "kind": "basic", + "name": "get", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Get a Service Fabric managed cluster resource created or in the process of being created in the specified resource group.", + "operation": { + "$id": "4651", + "name": "get", + "resourceName": "ManagedCluster", + "doc": "Get a Service Fabric managed cluster resource created or in the process of being created in the specified resource group.", + "accessibility": "public", + "parameters": [ + { + "$id": "4652", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "4653", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "4654", + "type": { + "$id": "4655", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4656", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "4657", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4658", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "4659", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4660", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "4661", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4662", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "4663", + "kind": "constant", + "valueType": { + "$id": "4664", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "4665", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1181" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusters.get", + "decorators": [], + "examples": [ + { + "$id": "4666", + "kind": "http", + "name": "Get a cluster", + "description": "Get a cluster", + "filePath": "2025-03-01-preview/ManagedClusterGetOperation_example.json", + "parameters": [ + { + "$id": "4667", + "parameter": { + "$ref": "4652" + }, + "value": { + "$id": "4668", + "kind": "string", + "type": { + "$ref": "4653" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "4669", + "parameter": { + "$ref": "4660" + }, + "value": { + "$id": "4670", + "kind": "string", + "type": { + "$ref": "4661" + }, + "value": "myCluster" + } + }, + { + "$id": "4671", + "parameter": { + "$ref": "4658" + }, + "value": { + "$id": "4672", + "kind": "string", + "type": { + "$ref": "4659" + }, + "value": "resRg" + } + }, + { + "$id": "4673", + "parameter": { + "$ref": "4656" + }, + "value": { + "$id": "4674", + "kind": "string", + "type": { + "$ref": "4657" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "4675", + "response": { + "$ref": "4665" + }, + "statusCode": 200, + "bodyValue": { + "$id": "4676", + "kind": "model", + "type": { + "$ref": "1181" + }, + "value": { + "$id": "4677", + "name": { + "$id": "4678", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "myCluster" + }, + "type": { + "$id": "4679", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters" + }, + "etag": { + "$id": "4680", + "kind": "string", + "type": { + "$ref": "1605" + }, + "value": "W/\"636462502169240745\"" + }, + "id": { + "$id": "4681", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster" + }, + "location": { + "$id": "4682", + "kind": "string", + "type": { + "$ref": "1190" + }, + "value": "eastus" + }, + "properties": { + "$id": "4683", + "kind": "model", + "type": { + "$ref": "1194" + }, + "value": { + "$id": "4684", + "adminUserName": { + "$id": "4685", + "kind": "string", + "type": { + "$ref": "1230" + }, + "value": "vmadmin" + }, + "clientConnectionPort": { + "$id": "4686", + "kind": "number", + "type": { + "$ref": "1222" + }, + "value": 19000 + }, + "clusterCertificateThumbprints": { + "$id": "4687", + "kind": "array", + "type": { + "$ref": "1217" + }, + "value": [ + { + "$id": "4688", + "kind": "string", + "type": { + "$ref": "1218" + }, + "value": "12599211F8F14C90AFA9532AD79A6F2CA1C00622" + } + ] + }, + "clusterCodeVersion": { + "$id": "4689", + "kind": "string", + "type": { + "$ref": "1398" + }, + "value": "7.1.168.9494" + }, + "clusterId": { + "$id": "4690", + "kind": "string", + "type": { + "$ref": "1209" + }, + "value": "92584666-9889-4ae8-8d02-91902923d37f" + }, + "clusterState": { + "$id": "4691", + "kind": "string", + "type": { + "$ref": "120" + }, + "value": "WaitingForNodes" + }, + "clusterUpgradeCadence": { + "$id": "4692", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "Wave0" + }, + "clusterUpgradeMode": { + "$id": "4693", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "Automatic" + }, + "dnsName": { + "$id": "4694", + "kind": "string", + "type": { + "$ref": "1196" + }, + "value": "myCluster" + }, + "fabricSettings": { + "$id": "4695", + "kind": "array", + "type": { + "$ref": "1373" + }, + "value": [ + { + "$id": "4696", + "kind": "model", + "type": { + "$ref": "1374" + }, + "value": { + "$id": "4697", + "name": { + "$id": "4698", + "kind": "string", + "type": { + "$ref": "1376" + }, + "value": "ManagedIdentityTokenService" + }, + "parameters": { + "$id": "4699", + "kind": "array", + "type": { + "$ref": "1380" + }, + "value": [ + { + "$id": "4700", + "kind": "model", + "type": { + "$ref": "1381" + }, + "value": { + "$id": "4701", + "name": { + "$id": "4702", + "kind": "string", + "type": { + "$ref": "1383" + }, + "value": "IsEnabled" + }, + "value": { + "$id": "4703", + "kind": "string", + "type": { + "$ref": "1387" + }, + "value": "true" + } + } + } + ] + } + } + } + ] + }, + "fqdn": { + "$id": "4704", + "kind": "string", + "type": { + "$ref": "1200" + }, + "value": "MyCluster.eastus.cloudapp.azure.com" + }, + "httpGatewayConnectionPort": { + "$id": "4705", + "kind": "number", + "type": { + "$ref": "1226" + }, + "value": 19080 + }, + "loadBalancingRules": { + "$id": "4706", + "kind": "array", + "type": { + "$ref": "1238" + }, + "value": [ + { + "$id": "4707", + "kind": "model", + "type": { + "$ref": "1239" + }, + "value": { + "$id": "4708", + "backendPort": { + "$id": "4709", + "kind": "number", + "type": { + "$ref": "1245" + }, + "value": 80 + }, + "frontendPort": { + "$id": "4710", + "kind": "number", + "type": { + "$ref": "1241" + }, + "value": 80 + }, + "probePort": { + "$id": "4711", + "kind": "number", + "type": { + "$ref": "1252" + }, + "value": 80 + }, + "probeProtocol": { + "$id": "4712", + "kind": "string", + "type": { + "$ref": "140" + }, + "value": "http" + }, + "protocol": { + "$id": "4713", + "kind": "string", + "type": { + "$ref": "134" + }, + "value": "http" + } + } + }, + { + "$id": "4714", + "kind": "model", + "type": { + "$ref": "1239" + }, + "value": { + "$id": "4715", + "backendPort": { + "$id": "4716", + "kind": "number", + "type": { + "$ref": "1245" + }, + "value": 443 + }, + "frontendPort": { + "$id": "4717", + "kind": "number", + "type": { + "$ref": "1241" + }, + "value": 443 + }, + "probePort": { + "$id": "4718", + "kind": "number", + "type": { + "$ref": "1252" + }, + "value": 443 + }, + "probeProtocol": { + "$id": "4719", + "kind": "string", + "type": { + "$ref": "140" + }, + "value": "http" + }, + "protocol": { + "$id": "4720", + "kind": "string", + "type": { + "$ref": "134" + }, + "value": "http" + } + } + }, + { + "$id": "4721", + "kind": "model", + "type": { + "$ref": "1239" + }, + "value": { + "$id": "4722", + "backendPort": { + "$id": "4723", + "kind": "number", + "type": { + "$ref": "1245" + }, + "value": 10000 + }, + "frontendPort": { + "$id": "4724", + "kind": "number", + "type": { + "$ref": "1241" + }, + "value": 10000 + }, + "probePort": { + "$id": "4725", + "kind": "number", + "type": { + "$ref": "1252" + }, + "value": 10000 + }, + "probeProtocol": { + "$id": "4726", + "kind": "string", + "type": { + "$ref": "140" + }, + "value": "tcp" + }, + "protocol": { + "$id": "4727", + "kind": "string", + "type": { + "$ref": "134" + }, + "value": "tcp" + } + } + } + ] + }, + "provisioningState": { + "$id": "4728", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Succeeded" + } + } + }, + "sku": { + "$id": "4729", + "kind": "model", + "type": { + "$ref": "1609" + }, + "value": { + "$id": "4730", + "name": { + "$id": "4731", + "kind": "string", + "type": { + "$ref": "248" + }, + "value": "Standard" + } + } + }, + "tags": { + "$id": "4732", + "kind": "dict", + "type": { + "$ref": "1184" + }, + "value": { + "$id": "4733" + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "4734", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "4735", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4736", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "4737", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4738", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "4663" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "4739", + "type": { + "$ref": "1181" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusters.get" + }, + { + "$id": "4740", + "kind": "lro", + "name": "createOrUpdate", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Create or update a Service Fabric managed cluster resource with the specified name.", + "operation": { + "$id": "4741", + "name": "createOrUpdate", + "resourceName": "ManagedCluster", + "doc": "Create or update a Service Fabric managed cluster resource with the specified name.", + "accessibility": "public", + "parameters": [ + { + "$id": "4742", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "4743", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "4744", + "type": { + "$id": "4745", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4746", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "4747", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4748", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "4749", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4750", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "4751", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4752", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "4753", + "kind": "constant", + "valueType": { + "$id": "4754", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4755", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "4756", + "kind": "constant", + "valueType": { + "$id": "4757", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "4758", + "name": "parameters", + "nameInRequest": "parameters", + "doc": "The cluster resource.", + "type": { + "$ref": "1181" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "4759", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1181" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + { + "$id": "4760", + "statusCodes": [ + 202 + ], + "bodyType": { + "$ref": "1181" + }, + "headers": [ + { + "$id": "4761", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "4762", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "4763", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + } + }, + { + "$id": "4764", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "4765", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "PUT", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "longRunning": { + "$id": "4766", + "finalStateVia": 1, + "finalResponse": { + "$id": "4767", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1181" + } + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusters.createOrUpdate", + "decorators": [], + "examples": [ + { + "$id": "4768", + "kind": "http", + "name": "Put a cluster with maximum parameters", + "description": "Put a cluster with maximum parameters", + "filePath": "2025-03-01-preview/ManagedClusterPutOperation_example_max.json", + "parameters": [ + { + "$id": "4769", + "parameter": { + "$ref": "4742" + }, + "value": { + "$id": "4770", + "kind": "string", + "type": { + "$ref": "4743" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "4771", + "parameter": { + "$ref": "4750" + }, + "value": { + "$id": "4772", + "kind": "string", + "type": { + "$ref": "4751" + }, + "value": "mycluster" + } + }, + { + "$id": "4773", + "parameter": { + "$ref": "4748" + }, + "value": { + "$id": "4774", + "kind": "string", + "type": { + "$ref": "4749" + }, + "value": "resRg" + } + }, + { + "$id": "4775", + "parameter": { + "$ref": "4746" + }, + "value": { + "$id": "4776", + "kind": "string", + "type": { + "$ref": "4747" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "4777", + "response": { + "$ref": "4759" + }, + "statusCode": 200, + "bodyValue": { + "$id": "4778", + "kind": "model", + "type": { + "$ref": "1181" + }, + "value": { + "$id": "4779", + "name": { + "$id": "4780", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "myCluster" + }, + "type": { + "$id": "4781", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters" + }, + "etag": { + "$id": "4782", + "kind": "string", + "type": { + "$ref": "1605" + }, + "value": "W/\"636462502169240745\"" + }, + "id": { + "$id": "4783", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster" + }, + "location": { + "$id": "4784", + "kind": "string", + "type": { + "$ref": "1190" + }, + "value": "eastus" + }, + "properties": { + "$id": "4785", + "kind": "model", + "type": { + "$ref": "1194" + }, + "value": { + "$id": "4786", + "addonFeatures": { + "$id": "4787", + "kind": "array", + "type": { + "$ref": "1408" + }, + "value": [ + { + "$id": "4788", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "DnsService" + }, + { + "$id": "4789", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "BackupRestoreService" + }, + { + "$id": "4790", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "ResourceMonitorService" + } + ] + }, + "adminUserName": { + "$id": "4791", + "kind": "string", + "type": { + "$ref": "1230" + }, + "value": "vmadmin" + }, + "allocatedOutboundPorts": { + "$id": "4792", + "kind": "number", + "type": { + "$ref": "1593" + }, + "value": 0 + }, + "allowRdpAccess": { + "$id": "4793", + "kind": "boolean", + "type": { + "$ref": "1269" + }, + "value": true + }, + "applicationTypeVersionsCleanupPolicy": { + "$id": "4794", + "kind": "model", + "type": { + "$ref": "1420" + }, + "value": { + "$id": "4795", + "maxUnusedVersionsToKeep": { + "$id": "4796", + "kind": "number", + "type": { + "$ref": "1422" + }, + "value": 3 + } + } + }, + "autoGeneratedDomainNameLabelScope": { + "$id": "4797", + "kind": "string", + "type": { + "$ref": "238" + }, + "value": "SubscriptionReuse" + }, + "auxiliarySubnets": { + "$id": "4798", + "kind": "array", + "type": { + "$ref": "1458" + }, + "value": [ + { + "$id": "4799", + "kind": "model", + "type": { + "$ref": "1459" + }, + "value": { + "$id": "4800", + "name": { + "$id": "4801", + "kind": "string", + "type": { + "$ref": "1461" + }, + "value": "testSubnet1" + }, + "enableIpv6": { + "$id": "4802", + "kind": "boolean", + "type": { + "$ref": "1465" + }, + "value": true + }, + "networkSecurityGroupId": { + "$id": "4803", + "kind": "string", + "type": { + "$ref": "1475" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/networkSecurityGroups/sn1" + }, + "privateEndpointNetworkPolicies": { + "$id": "4804", + "kind": "string", + "type": { + "$ref": "220" + }, + "value": "enabled" + }, + "privateLinkServiceNetworkPolicies": { + "$id": "4805", + "kind": "string", + "type": { + "$ref": "226" + }, + "value": "enabled" + } + } + } + ] + }, + "clientConnectionPort": { + "$id": "4806", + "kind": "number", + "type": { + "$ref": "1222" + }, + "value": 19000 + }, + "clusterCertificateThumbprints": { + "$id": "4807", + "kind": "array", + "type": { + "$ref": "1217" + }, + "value": [ + { + "$id": "4808", + "kind": "string", + "type": { + "$ref": "1218" + }, + "value": "12599211F8F14C90AFA9532AD79A6F2CA1C00622" + } + ] + }, + "clusterCodeVersion": { + "$id": "4809", + "kind": "string", + "type": { + "$ref": "1398" + }, + "value": "7.1.168.9494" + }, + "clusterId": { + "$id": "4810", + "kind": "string", + "type": { + "$ref": "1209" + }, + "value": "92584666-9889-4ae8-8d02-91902923d37f" + }, + "clusterState": { + "$id": "4811", + "kind": "string", + "type": { + "$ref": "120" + }, + "value": "WaitingForNodes" + }, + "clusterUpgradeMode": { + "$id": "4812", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "Manual" + }, + "ddosProtectionPlanId": { + "$id": "4813", + "kind": "string", + "type": { + "$ref": "1513" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/ddosProtectionPlans/myDDoSProtectionPlan" + }, + "dnsName": { + "$id": "4814", + "kind": "string", + "type": { + "$ref": "1196" + }, + "value": "mycluster" + }, + "enableAutoOSUpgrade": { + "$id": "4815", + "kind": "boolean", + "type": { + "$ref": "1412" + }, + "value": true + }, + "enableHttpGatewayExclusiveAuthMode": { + "$id": "4816", + "kind": "boolean", + "type": { + "$ref": "1586" + }, + "value": true + }, + "enableIpv6": { + "$id": "4817", + "kind": "boolean", + "type": { + "$ref": "1428" + }, + "value": true + }, + "enableServicePublicIP": { + "$id": "4818", + "kind": "boolean", + "type": { + "$ref": "1454" + }, + "value": true + }, + "fabricSettings": { + "$id": "4819", + "kind": "array", + "type": { + "$ref": "1373" + }, + "value": [ + { + "$id": "4820", + "kind": "model", + "type": { + "$ref": "1374" + }, + "value": { + "$id": "4821", + "name": { + "$id": "4822", + "kind": "string", + "type": { + "$ref": "1376" + }, + "value": "ManagedIdentityTokenService" + }, + "parameters": { + "$id": "4823", + "kind": "array", + "type": { + "$ref": "1380" + }, + "value": [ + { + "$id": "4824", + "kind": "model", + "type": { + "$ref": "1381" + }, + "value": { + "$id": "4825", + "name": { + "$id": "4826", + "kind": "string", + "type": { + "$ref": "1383" + }, + "value": "IsEnabled" + }, + "value": { + "$id": "4827", + "kind": "string", + "type": { + "$ref": "1387" + }, + "value": "true" + } + } + } + ] + } + } + } + ] + }, + "fqdn": { + "$id": "4828", + "kind": "string", + "type": { + "$ref": "1200" + }, + "value": "mycluster.eastus.cloudapp.azure.com" + }, + "httpGatewayConnectionPort": { + "$id": "4829", + "kind": "number", + "type": { + "$ref": "1226" + }, + "value": 19080 + }, + "httpGatewayTokenAuthConnectionPort": { + "$id": "4830", + "kind": "number", + "type": { + "$ref": "1582" + }, + "value": 19081 + }, + "ipTags": { + "$id": "4831", + "kind": "array", + "type": { + "$ref": "1436" + }, + "value": [ + { + "$id": "4832", + "kind": "model", + "type": { + "$ref": "1437" + }, + "value": { + "$id": "4833", + "ipTagType": { + "$id": "4834", + "kind": "string", + "type": { + "$ref": "1439" + }, + "value": "FirstPartyUsage" + }, + "tag": { + "$id": "4835", + "kind": "string", + "type": { + "$ref": "1443" + }, + "value": "SQL" + } + } + } + ] + }, + "ipv6Address": { + "$id": "4836", + "kind": "string", + "type": { + "$ref": "1449" + }, + "value": "0000:0000:0000:0000:0000:0000:0000:0000" + }, + "loadBalancingRules": { + "$id": "4837", + "kind": "array", + "type": { + "$ref": "1238" + }, + "value": [ + { + "$id": "4838", + "kind": "model", + "type": { + "$ref": "1239" + }, + "value": { + "$id": "4839", + "backendPort": { + "$id": "4840", + "kind": "number", + "type": { + "$ref": "1245" + }, + "value": 80 + }, + "frontendPort": { + "$id": "4841", + "kind": "number", + "type": { + "$ref": "1241" + }, + "value": 80 + }, + "probePort": { + "$id": "4842", + "kind": "number", + "type": { + "$ref": "1252" + }, + "value": 80 + }, + "probeProtocol": { + "$id": "4843", + "kind": "string", + "type": { + "$ref": "140" + }, + "value": "http" + }, + "protocol": { + "$id": "4844", + "kind": "string", + "type": { + "$ref": "134" + }, + "value": "http" + } + } + }, + { + "$id": "4845", + "kind": "model", + "type": { + "$ref": "1239" + }, + "value": { + "$id": "4846", + "backendPort": { + "$id": "4847", + "kind": "number", + "type": { + "$ref": "1245" + }, + "value": 443 + }, + "frontendPort": { + "$id": "4848", + "kind": "number", + "type": { + "$ref": "1241" + }, + "value": 443 + }, + "probePort": { + "$id": "4849", + "kind": "number", + "type": { + "$ref": "1252" + }, + "value": 443 + }, + "probeProtocol": { + "$id": "4850", + "kind": "string", + "type": { + "$ref": "140" + }, + "value": "http" + }, + "protocol": { + "$id": "4851", + "kind": "string", + "type": { + "$ref": "134" + }, + "value": "http" + } + } + }, + { + "$id": "4852", + "kind": "model", + "type": { + "$ref": "1239" + }, + "value": { + "$id": "4853", + "backendPort": { + "$id": "4854", + "kind": "number", + "type": { + "$ref": "1245" + }, + "value": 10000 + }, + "frontendPort": { + "$id": "4855", + "kind": "number", + "type": { + "$ref": "1241" + }, + "value": 10000 + }, + "loadDistribution": { + "$id": "4856", + "kind": "string", + "type": { + "$ref": "1263" + }, + "value": "Default" + }, + "probePort": { + "$id": "4857", + "kind": "number", + "type": { + "$ref": "1252" + }, + "value": 10000 + }, + "probeProtocol": { + "$id": "4858", + "kind": "string", + "type": { + "$ref": "140" + }, + "value": "tcp" + }, + "protocol": { + "$id": "4859", + "kind": "string", + "type": { + "$ref": "134" + }, + "value": "tcp" + } + } + } + ] + }, + "networkSecurityRules": { + "$id": "4860", + "kind": "array", + "type": { + "$ref": "1273" + }, + "value": [ + { + "$id": "4861", + "kind": "model", + "type": { + "$ref": "1274" + }, + "value": { + "$id": "4862", + "name": { + "$id": "4863", + "kind": "string", + "type": { + "$ref": "1276" + }, + "value": "TestName" + }, + "description": { + "$id": "4864", + "kind": "string", + "type": { + "$ref": "1280" + }, + "value": "Test description" + }, + "access": { + "$id": "4865", + "kind": "string", + "type": { + "$ref": "164" + }, + "value": "allow" + }, + "destinationAddressPrefixes": { + "$id": "4866", + "kind": "array", + "type": { + "$ref": "1292" + }, + "value": [ + { + "$id": "4867", + "kind": "string", + "type": { + "$ref": "1293" + }, + "value": "*" + } + ] + }, + "destinationPortRanges": { + "$id": "4868", + "kind": "array", + "type": { + "$ref": "1302" + }, + "value": [ + { + "$id": "4869", + "kind": "string", + "type": { + "$ref": "1303" + }, + "value": "*" + } + ] + }, + "direction": { + "$id": "4870", + "kind": "string", + "type": { + "$ref": "170" + }, + "value": "inbound" + }, + "priority": { + "$id": "4871", + "kind": "number", + "type": { + "$ref": "1326" + }, + "value": 1010 + }, + "sourceAddressPrefixes": { + "$id": "4872", + "kind": "array", + "type": { + "$ref": "1287" + }, + "value": [ + { + "$id": "4873", + "kind": "string", + "type": { + "$ref": "1288" + }, + "value": "*" + } + ] + }, + "sourcePortRanges": { + "$id": "4874", + "kind": "array", + "type": { + "$ref": "1297" + }, + "value": [ + { + "$id": "4875", + "kind": "string", + "type": { + "$ref": "1298" + }, + "value": "*" + } + ] + }, + "protocol": { + "$id": "4876", + "kind": "string", + "type": { + "$ref": "148" + }, + "value": "tcp" + } + } + }, + { + "$id": "4877", + "kind": "model", + "type": { + "$ref": "1274" + }, + "value": { + "$id": "4878", + "name": { + "$id": "4879", + "kind": "string", + "type": { + "$ref": "1276" + }, + "value": "AllowARM" + }, + "access": { + "$id": "4880", + "kind": "string", + "type": { + "$ref": "164" + }, + "value": "allow" + }, + "destinationAddressPrefix": { + "$id": "4881", + "kind": "string", + "type": { + "$ref": "1311" + }, + "value": "*" + }, + "destinationPortRange": { + "$id": "4882", + "kind": "string", + "type": { + "$ref": "1319" + }, + "value": "33500-33699" + }, + "direction": { + "$id": "4883", + "kind": "string", + "type": { + "$ref": "170" + }, + "value": "inbound" + }, + "priority": { + "$id": "4884", + "kind": "number", + "type": { + "$ref": "1326" + }, + "value": 2002 + }, + "sourceAddressPrefix": { + "$id": "4885", + "kind": "string", + "type": { + "$ref": "1307" + }, + "value": "AzureResourceManager" + }, + "sourcePortRange": { + "$id": "4886", + "kind": "string", + "type": { + "$ref": "1315" + }, + "value": "*" + }, + "protocol": { + "$id": "4887", + "kind": "string", + "type": { + "$ref": "148" + }, + "value": "*" + } + } + } + ] + }, + "provisioningState": { + "$id": "4888", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Creating" + }, + "publicIPPrefixId": { + "$id": "4889", + "kind": "string", + "type": { + "$ref": "1503" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.Network/publicIPPrefixes/myPublicIPPrefix" + }, + "publicIPv6PrefixId": { + "$id": "4890", + "kind": "string", + "type": { + "$ref": "1508" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.Network/publicIPPrefixes/myPublicIPv6Prefix" + }, + "serviceEndpoints": { + "$id": "4891", + "kind": "array", + "type": { + "$ref": "1482" + }, + "value": [ + { + "$id": "4892", + "kind": "model", + "type": { + "$ref": "1483" + }, + "value": { + "$id": "4893", + "locations": { + "$id": "4894", + "kind": "array", + "type": { + "$ref": "1489" + }, + "value": [ + { + "$id": "4895", + "kind": "string", + "type": { + "$ref": "1490" + }, + "value": "eastus2" + }, + { + "$id": "4896", + "kind": "string", + "type": { + "$ref": "1490" + }, + "value": "usnorth" + } + ] + }, + "service": { + "$id": "4897", + "kind": "string", + "type": { + "$ref": "1485" + }, + "value": "Microsoft.Storage" + } + } + } + ] + }, + "upgradeDescription": { + "$id": "4898", + "kind": "model", + "type": { + "$ref": "1518" + }, + "value": { + "$id": "4899", + "deltaHealthPolicy": { + "$id": "4900", + "kind": "model", + "type": { + "$ref": "1536" + }, + "value": { + "$id": "4901", + "maxPercentDeltaUnhealthyApplications": { + "$id": "4902", + "kind": "number", + "type": { + "$ref": "1546" + }, + "value": 40 + }, + "maxPercentDeltaUnhealthyNodes": { + "$id": "4903", + "kind": "number", + "type": { + "$ref": "1538" + }, + "value": 20 + }, + "maxPercentUpgradeDomainDeltaUnhealthyNodes": { + "$id": "4904", + "kind": "number", + "type": { + "$ref": "1542" + }, + "value": 40 + } + } + }, + "forceRestart": { + "$id": "4905", + "kind": "boolean", + "type": { + "$ref": "1520" + }, + "value": false + }, + "healthPolicy": { + "$id": "4906", + "kind": "model", + "type": { + "$ref": "1524" + }, + "value": { + "$id": "4907", + "maxPercentUnhealthyApplications": { + "$id": "4908", + "kind": "number", + "type": { + "$ref": "1530" + }, + "value": 30 + }, + "maxPercentUnhealthyNodes": { + "$id": "4909", + "kind": "number", + "type": { + "$ref": "1526" + }, + "value": 10 + } + } + }, + "monitoringPolicy": { + "$id": "4910", + "kind": "model", + "type": { + "$ref": "1552" + }, + "value": { + "$id": "4911", + "healthCheckRetryTimeout": { + "$id": "4912", + "kind": "string", + "type": { + "$ref": "1562" + }, + "value": "00:55:00" + }, + "healthCheckStableDuration": { + "$id": "4913", + "kind": "string", + "type": { + "$ref": "1558" + }, + "value": "00:45:00" + }, + "healthCheckWaitDuration": { + "$id": "4914", + "kind": "string", + "type": { + "$ref": "1554" + }, + "value": "00:05:00" + }, + "upgradeDomainTimeout": { + "$id": "4915", + "kind": "string", + "type": { + "$ref": "1570" + }, + "value": "03:00:00" + }, + "upgradeTimeout": { + "$id": "4916", + "kind": "string", + "type": { + "$ref": "1566" + }, + "value": "12:00:00" + } + } + }, + "upgradeReplicaSetCheckTimeout": { + "$id": "4917", + "kind": "string", + "type": { + "$ref": "1576" + }, + "value": "49710.06:28:16" + } + } + }, + "useCustomVnet": { + "$id": "4918", + "kind": "boolean", + "type": { + "$ref": "1499" + }, + "value": true + }, + "zonalResiliency": { + "$id": "4919", + "kind": "boolean", + "type": { + "$ref": "1416" + }, + "value": true + }, + "zonalUpdateMode": { + "$id": "4920", + "kind": "string", + "type": { + "$ref": "232" + }, + "value": "Fast" + } + } + }, + "sku": { + "$id": "4921", + "kind": "model", + "type": { + "$ref": "1609" + }, + "value": { + "$id": "4922", + "name": { + "$id": "4923", + "kind": "string", + "type": { + "$ref": "248" + }, + "value": "Basic" + } + } + }, + "tags": { + "$id": "4924", + "kind": "dict", + "type": { + "$ref": "1184" + }, + "value": { + "$id": "4925" + } + } + } + } + }, + { + "$id": "4926", + "response": { + "$ref": "4760" + }, + "statusCode": 202, + "bodyValue": { + "$id": "4927", + "kind": "model", + "type": { + "$ref": "1181" + }, + "value": { + "$id": "4928", + "name": { + "$id": "4929", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "mycluster" + }, + "type": { + "$id": "4930", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters" + }, + "etag": { + "$id": "4931", + "kind": "string", + "type": { + "$ref": "1605" + }, + "value": "W/\"636462502169240745\"" + }, + "id": { + "$id": "4932", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster" + }, + "location": { + "$id": "4933", + "kind": "string", + "type": { + "$ref": "1190" + }, + "value": "eastus" + }, + "properties": { + "$id": "4934", + "kind": "model", + "type": { + "$ref": "1194" + }, + "value": { + "$id": "4935", + "addonFeatures": { + "$id": "4936", + "kind": "array", + "type": { + "$ref": "1408" + }, + "value": [ + { + "$id": "4937", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "DnsService" + }, + { + "$id": "4938", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "BackupRestoreService" + }, + { + "$id": "4939", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "ResourceMonitorService" + } + ] + }, + "adminUserName": { + "$id": "4940", + "kind": "string", + "type": { + "$ref": "1230" + }, + "value": "vmadmin" + }, + "allocatedOutboundPorts": { + "$id": "4941", + "kind": "number", + "type": { + "$ref": "1593" + }, + "value": 0 + }, + "allowRdpAccess": { + "$id": "4942", + "kind": "boolean", + "type": { + "$ref": "1269" + }, + "value": true + }, + "applicationTypeVersionsCleanupPolicy": { + "$id": "4943", + "kind": "model", + "type": { + "$ref": "1420" + }, + "value": { + "$id": "4944", + "maxUnusedVersionsToKeep": { + "$id": "4945", + "kind": "number", + "type": { + "$ref": "1422" + }, + "value": 3 + } + } + }, + "autoGeneratedDomainNameLabelScope": { + "$id": "4946", + "kind": "string", + "type": { + "$ref": "238" + }, + "value": "SubscriptionReuse" + }, + "auxiliarySubnets": { + "$id": "4947", + "kind": "array", + "type": { + "$ref": "1458" + }, + "value": [ + { + "$id": "4948", + "kind": "model", + "type": { + "$ref": "1459" + }, + "value": { + "$id": "4949", + "name": { + "$id": "4950", + "kind": "string", + "type": { + "$ref": "1461" + }, + "value": "testSubnet1" + }, + "enableIpv6": { + "$id": "4951", + "kind": "boolean", + "type": { + "$ref": "1465" + }, + "value": true + }, + "networkSecurityGroupId": { + "$id": "4952", + "kind": "string", + "type": { + "$ref": "1475" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/networkSecurityGroups/sn1" + }, + "privateEndpointNetworkPolicies": { + "$id": "4953", + "kind": "string", + "type": { + "$ref": "220" + }, + "value": "enabled" + }, + "privateLinkServiceNetworkPolicies": { + "$id": "4954", + "kind": "string", + "type": { + "$ref": "226" + }, + "value": "enabled" + } + } + } + ] + }, + "clientConnectionPort": { + "$id": "4955", + "kind": "number", + "type": { + "$ref": "1222" + }, + "value": 19000 + }, + "clusterCertificateThumbprints": { + "$id": "4956", + "kind": "array", + "type": { + "$ref": "1217" + }, + "value": [ + { + "$id": "4957", + "kind": "string", + "type": { + "$ref": "1218" + }, + "value": "12599211F8F14C90AFA9532AD79A6F2CA1C00622" + } + ] + }, + "clusterCodeVersion": { + "$id": "4958", + "kind": "string", + "type": { + "$ref": "1398" + }, + "value": "7.1.168.9494" + }, + "clusterId": { + "$id": "4959", + "kind": "string", + "type": { + "$ref": "1209" + }, + "value": "92584666-9889-4ae8-8d02-91902923d37f" + }, + "clusterState": { + "$id": "4960", + "kind": "string", + "type": { + "$ref": "120" + }, + "value": "WaitingForNodes" + }, + "clusterUpgradeMode": { + "$id": "4961", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "Manual" + }, + "ddosProtectionPlanId": { + "$id": "4962", + "kind": "string", + "type": { + "$ref": "1513" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/ddosProtectionPlans/myDDoSProtectionPlan" + }, + "dnsName": { + "$id": "4963", + "kind": "string", + "type": { + "$ref": "1196" + }, + "value": "mycluster" + }, + "enableAutoOSUpgrade": { + "$id": "4964", + "kind": "boolean", + "type": { + "$ref": "1412" + }, + "value": true + }, + "enableHttpGatewayExclusiveAuthMode": { + "$id": "4965", + "kind": "boolean", + "type": { + "$ref": "1586" + }, + "value": true + }, + "enableIpv6": { + "$id": "4966", + "kind": "boolean", + "type": { + "$ref": "1428" + }, + "value": true + }, + "enableServicePublicIP": { + "$id": "4967", + "kind": "boolean", + "type": { + "$ref": "1454" + }, + "value": true + }, + "fabricSettings": { + "$id": "4968", + "kind": "array", + "type": { + "$ref": "1373" + }, + "value": [ + { + "$id": "4969", + "kind": "model", + "type": { + "$ref": "1374" + }, + "value": { + "$id": "4970", + "name": { + "$id": "4971", + "kind": "string", + "type": { + "$ref": "1376" + }, + "value": "ManagedIdentityTokenService" + }, + "parameters": { + "$id": "4972", + "kind": "array", + "type": { + "$ref": "1380" + }, + "value": [ + { + "$id": "4973", + "kind": "model", + "type": { + "$ref": "1381" + }, + "value": { + "$id": "4974", + "name": { + "$id": "4975", + "kind": "string", + "type": { + "$ref": "1383" + }, + "value": "IsEnabled" + }, + "value": { + "$id": "4976", + "kind": "string", + "type": { + "$ref": "1387" + }, + "value": "true" + } + } + } + ] + } + } + } + ] + }, + "fqdn": { + "$id": "4977", + "kind": "string", + "type": { + "$ref": "1200" + }, + "value": "mycluster.eastus.cloudapp.azure.com" + }, + "httpGatewayConnectionPort": { + "$id": "4978", + "kind": "number", + "type": { + "$ref": "1226" + }, + "value": 19080 + }, + "httpGatewayTokenAuthConnectionPort": { + "$id": "4979", + "kind": "number", + "type": { + "$ref": "1582" + }, + "value": 19081 + }, + "ipTags": { + "$id": "4980", + "kind": "array", + "type": { + "$ref": "1436" + }, + "value": [ + { + "$id": "4981", + "kind": "model", + "type": { + "$ref": "1437" + }, + "value": { + "$id": "4982", + "ipTagType": { + "$id": "4983", + "kind": "string", + "type": { + "$ref": "1439" + }, + "value": "FirstPartyUsage" + }, + "tag": { + "$id": "4984", + "kind": "string", + "type": { + "$ref": "1443" + }, + "value": "SQL" + } + } + } + ] + }, + "loadBalancingRules": { + "$id": "4985", + "kind": "array", + "type": { + "$ref": "1238" + }, + "value": [ + { + "$id": "4986", + "kind": "model", + "type": { + "$ref": "1239" + }, + "value": { + "$id": "4987", + "backendPort": { + "$id": "4988", + "kind": "number", + "type": { + "$ref": "1245" + }, + "value": 80 + }, + "frontendPort": { + "$id": "4989", + "kind": "number", + "type": { + "$ref": "1241" + }, + "value": 80 + }, + "probePort": { + "$id": "4990", + "kind": "number", + "type": { + "$ref": "1252" + }, + "value": 80 + }, + "probeProtocol": { + "$id": "4991", + "kind": "string", + "type": { + "$ref": "140" + }, + "value": "http" + }, + "protocol": { + "$id": "4992", + "kind": "string", + "type": { + "$ref": "134" + }, + "value": "http" + } + } + }, + { + "$id": "4993", + "kind": "model", + "type": { + "$ref": "1239" + }, + "value": { + "$id": "4994", + "backendPort": { + "$id": "4995", + "kind": "number", + "type": { + "$ref": "1245" + }, + "value": 443 + }, + "frontendPort": { + "$id": "4996", + "kind": "number", + "type": { + "$ref": "1241" + }, + "value": 443 + }, + "probePort": { + "$id": "4997", + "kind": "number", + "type": { + "$ref": "1252" + }, + "value": 443 + }, + "probeProtocol": { + "$id": "4998", + "kind": "string", + "type": { + "$ref": "140" + }, + "value": "http" + }, + "protocol": { + "$id": "4999", + "kind": "string", + "type": { + "$ref": "134" + }, + "value": "http" + } + } + }, + { + "$id": "5000", + "kind": "model", + "type": { + "$ref": "1239" + }, + "value": { + "$id": "5001", + "backendPort": { + "$id": "5002", + "kind": "number", + "type": { + "$ref": "1245" + }, + "value": 10000 + }, + "frontendPort": { + "$id": "5003", + "kind": "number", + "type": { + "$ref": "1241" + }, + "value": 10000 + }, + "loadDistribution": { + "$id": "5004", + "kind": "string", + "type": { + "$ref": "1263" + }, + "value": "Default" + }, + "probePort": { + "$id": "5005", + "kind": "number", + "type": { + "$ref": "1252" + }, + "value": 10000 + }, + "probeProtocol": { + "$id": "5006", + "kind": "string", + "type": { + "$ref": "140" + }, + "value": "tcp" + }, + "protocol": { + "$id": "5007", + "kind": "string", + "type": { + "$ref": "134" + }, + "value": "tcp" + } + } + } + ] + }, + "networkSecurityRules": { + "$id": "5008", + "kind": "array", + "type": { + "$ref": "1273" + }, + "value": [ + { + "$id": "5009", + "kind": "model", + "type": { + "$ref": "1274" + }, + "value": { + "$id": "5010", + "name": { + "$id": "5011", + "kind": "string", + "type": { + "$ref": "1276" + }, + "value": "TestName" + }, + "description": { + "$id": "5012", + "kind": "string", + "type": { + "$ref": "1280" + }, + "value": "Test description" + }, + "access": { + "$id": "5013", + "kind": "string", + "type": { + "$ref": "164" + }, + "value": "allow" + }, + "destinationAddressPrefixes": { + "$id": "5014", + "kind": "array", + "type": { + "$ref": "1292" + }, + "value": [ + { + "$id": "5015", + "kind": "string", + "type": { + "$ref": "1293" + }, + "value": "*" + } + ] + }, + "destinationPortRanges": { + "$id": "5016", + "kind": "array", + "type": { + "$ref": "1302" + }, + "value": [ + { + "$id": "5017", + "kind": "string", + "type": { + "$ref": "1303" + }, + "value": "*" + } + ] + }, + "direction": { + "$id": "5018", + "kind": "string", + "type": { + "$ref": "170" + }, + "value": "inbound" + }, + "priority": { + "$id": "5019", + "kind": "number", + "type": { + "$ref": "1326" + }, + "value": 1010 + }, + "sourceAddressPrefixes": { + "$id": "5020", + "kind": "array", + "type": { + "$ref": "1287" + }, + "value": [ + { + "$id": "5021", + "kind": "string", + "type": { + "$ref": "1288" + }, + "value": "*" + } + ] + }, + "sourcePortRanges": { + "$id": "5022", + "kind": "array", + "type": { + "$ref": "1297" + }, + "value": [ + { + "$id": "5023", + "kind": "string", + "type": { + "$ref": "1298" + }, + "value": "*" + } + ] + }, + "protocol": { + "$id": "5024", + "kind": "string", + "type": { + "$ref": "148" + }, + "value": "tcp" + } + } + }, + { + "$id": "5025", + "kind": "model", + "type": { + "$ref": "1274" + }, + "value": { + "$id": "5026", + "name": { + "$id": "5027", + "kind": "string", + "type": { + "$ref": "1276" + }, + "value": "AllowARM" + }, + "access": { + "$id": "5028", + "kind": "string", + "type": { + "$ref": "164" + }, + "value": "allow" + }, + "destinationAddressPrefix": { + "$id": "5029", + "kind": "string", + "type": { + "$ref": "1311" + }, + "value": "*" + }, + "destinationPortRange": { + "$id": "5030", + "kind": "string", + "type": { + "$ref": "1319" + }, + "value": "33500-33699" + }, + "direction": { + "$id": "5031", + "kind": "string", + "type": { + "$ref": "170" + }, + "value": "inbound" + }, + "priority": { + "$id": "5032", + "kind": "number", + "type": { + "$ref": "1326" + }, + "value": 2002 + }, + "sourceAddressPrefix": { + "$id": "5033", + "kind": "string", + "type": { + "$ref": "1307" + }, + "value": "AzureResourceManager" + }, + "sourcePortRange": { + "$id": "5034", + "kind": "string", + "type": { + "$ref": "1315" + }, + "value": "*" + }, + "protocol": { + "$id": "5035", + "kind": "string", + "type": { + "$ref": "148" + }, + "value": "*" + } + } + } + ] + }, + "provisioningState": { + "$id": "5036", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Updating" + }, + "publicIPPrefixId": { + "$id": "5037", + "kind": "string", + "type": { + "$ref": "1503" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.Network/publicIPPrefixes/myPublicIPPrefix" + }, + "publicIPv6PrefixId": { + "$id": "5038", + "kind": "string", + "type": { + "$ref": "1508" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.Network/publicIPPrefixes/myPublicIPv6Prefix" + }, + "serviceEndpoints": { + "$id": "5039", + "kind": "array", + "type": { + "$ref": "1482" + }, + "value": [ + { + "$id": "5040", + "kind": "model", + "type": { + "$ref": "1483" + }, + "value": { + "$id": "5041", + "locations": { + "$id": "5042", + "kind": "array", + "type": { + "$ref": "1489" + }, + "value": [ + { + "$id": "5043", + "kind": "string", + "type": { + "$ref": "1490" + }, + "value": "eastus2" + }, + { + "$id": "5044", + "kind": "string", + "type": { + "$ref": "1490" + }, + "value": "usnorth" + } + ] + }, + "service": { + "$id": "5045", + "kind": "string", + "type": { + "$ref": "1485" + }, + "value": "Microsoft.Storage" + } + } + } + ] + }, + "upgradeDescription": { + "$id": "5046", + "kind": "model", + "type": { + "$ref": "1518" + }, + "value": { + "$id": "5047", + "deltaHealthPolicy": { + "$id": "5048", + "kind": "model", + "type": { + "$ref": "1536" + }, + "value": { + "$id": "5049", + "maxPercentDeltaUnhealthyApplications": { + "$id": "5050", + "kind": "number", + "type": { + "$ref": "1546" + }, + "value": 40 + }, + "maxPercentDeltaUnhealthyNodes": { + "$id": "5051", + "kind": "number", + "type": { + "$ref": "1538" + }, + "value": 20 + }, + "maxPercentUpgradeDomainDeltaUnhealthyNodes": { + "$id": "5052", + "kind": "number", + "type": { + "$ref": "1542" + }, + "value": 40 + } + } + }, + "forceRestart": { + "$id": "5053", + "kind": "boolean", + "type": { + "$ref": "1520" + }, + "value": false + }, + "healthPolicy": { + "$id": "5054", + "kind": "model", + "type": { + "$ref": "1524" + }, + "value": { + "$id": "5055", + "maxPercentUnhealthyApplications": { + "$id": "5056", + "kind": "number", + "type": { + "$ref": "1530" + }, + "value": 30 + }, + "maxPercentUnhealthyNodes": { + "$id": "5057", + "kind": "number", + "type": { + "$ref": "1526" + }, + "value": 10 + } + } + }, + "monitoringPolicy": { + "$id": "5058", + "kind": "model", + "type": { + "$ref": "1552" + }, + "value": { + "$id": "5059", + "healthCheckRetryTimeout": { + "$id": "5060", + "kind": "string", + "type": { + "$ref": "1562" + }, + "value": "00:55:00" + }, + "healthCheckStableDuration": { + "$id": "5061", + "kind": "string", + "type": { + "$ref": "1558" + }, + "value": "00:45:00" + }, + "healthCheckWaitDuration": { + "$id": "5062", + "kind": "string", + "type": { + "$ref": "1554" + }, + "value": "00:05:00" + }, + "upgradeDomainTimeout": { + "$id": "5063", + "kind": "string", + "type": { + "$ref": "1570" + }, + "value": "03:00:00" + }, + "upgradeTimeout": { + "$id": "5064", + "kind": "string", + "type": { + "$ref": "1566" + }, + "value": "12:00:00" + } + } + } + } + }, + "useCustomVnet": { + "$id": "5065", + "kind": "boolean", + "type": { + "$ref": "1499" + }, + "value": true + }, + "zonalResiliency": { + "$id": "5066", + "kind": "boolean", + "type": { + "$ref": "1416" + }, + "value": true + }, + "zonalUpdateMode": { + "$id": "5067", + "kind": "string", + "type": { + "$ref": "232" + }, + "value": "Fast" + } + } + }, + "sku": { + "$id": "5068", + "kind": "model", + "type": { + "$ref": "1609" + }, + "value": { + "$id": "5069", + "name": { + "$id": "5070", + "kind": "string", + "type": { + "$ref": "248" + }, + "value": "Basic" + } + } + }, + "tags": { + "$id": "5071", + "kind": "dict", + "type": { + "$ref": "1184" + }, + "value": { + "$id": "5072" + } + } + } + } + } + ] + }, + { + "$id": "5073", + "kind": "http", + "name": "Put a cluster with minimum parameters", + "description": "Put a cluster with minimum parameters", + "filePath": "2025-03-01-preview/ManagedClusterPutOperation_example_min.json", + "parameters": [ + { + "$id": "5074", + "parameter": { + "$ref": "4742" + }, + "value": { + "$id": "5075", + "kind": "string", + "type": { + "$ref": "4743" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "5076", + "parameter": { + "$ref": "4750" + }, + "value": { + "$id": "5077", + "kind": "string", + "type": { + "$ref": "4751" + }, + "value": "myCluster" + } + }, + { + "$id": "5078", + "parameter": { + "$ref": "4748" + }, + "value": { + "$id": "5079", + "kind": "string", + "type": { + "$ref": "4749" + }, + "value": "resRg" + } + }, + { + "$id": "5080", + "parameter": { + "$ref": "4746" + }, + "value": { + "$id": "5081", + "kind": "string", + "type": { + "$ref": "4747" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "5082", + "response": { + "$ref": "4759" + }, + "statusCode": 200, + "bodyValue": { + "$id": "5083", + "kind": "model", + "type": { + "$ref": "1181" + }, + "value": { + "$id": "5084", + "name": { + "$id": "5085", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "myCluster" + }, + "type": { + "$id": "5086", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters" + }, + "etag": { + "$id": "5087", + "kind": "string", + "type": { + "$ref": "1605" + }, + "value": "W/\"636462502169240745\"" + }, + "id": { + "$id": "5088", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster" + }, + "location": { + "$id": "5089", + "kind": "string", + "type": { + "$ref": "1190" + }, + "value": "eastus" + }, + "properties": { + "$id": "5090", + "kind": "model", + "type": { + "$ref": "1194" + }, + "value": { + "$id": "5091", + "adminUserName": { + "$id": "5092", + "kind": "string", + "type": { + "$ref": "1230" + }, + "value": "vmadmin" + }, + "clientConnectionPort": { + "$id": "5093", + "kind": "number", + "type": { + "$ref": "1222" + }, + "value": 19000 + }, + "clusterCertificateThumbprints": { + "$id": "5094", + "kind": "array", + "type": { + "$ref": "1217" + }, + "value": [ + { + "$id": "5095", + "kind": "string", + "type": { + "$ref": "1218" + }, + "value": "12599211F8F14C90AFA9532AD79A6F2CA1C00622" + } + ] + }, + "clusterId": { + "$id": "5096", + "kind": "string", + "type": { + "$ref": "1209" + }, + "value": "92584666-9889-4ae8-8d02-91902923d37f" + }, + "clusterState": { + "$id": "5097", + "kind": "string", + "type": { + "$ref": "120" + }, + "value": "WaitingForNodes" + }, + "clusterUpgradeCadence": { + "$id": "5098", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "Wave1" + }, + "clusterUpgradeMode": { + "$id": "5099", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "Automatic" + }, + "dnsName": { + "$id": "5100", + "kind": "string", + "type": { + "$ref": "1196" + }, + "value": "myCluster" + }, + "fabricSettings": { + "$id": "5101", + "kind": "array", + "type": { + "$ref": "1373" + }, + "value": [ + { + "$id": "5102", + "kind": "model", + "type": { + "$ref": "1374" + }, + "value": { + "$id": "5103", + "name": { + "$id": "5104", + "kind": "string", + "type": { + "$ref": "1376" + }, + "value": "ManagedIdentityTokenService" + }, + "parameters": { + "$id": "5105", + "kind": "array", + "type": { + "$ref": "1380" + }, + "value": [ + { + "$id": "5106", + "kind": "model", + "type": { + "$ref": "1381" + }, + "value": { + "$id": "5107", + "name": { + "$id": "5108", + "kind": "string", + "type": { + "$ref": "1383" + }, + "value": "IsEnabled" + }, + "value": { + "$id": "5109", + "kind": "string", + "type": { + "$ref": "1387" + }, + "value": "true" + } + } + } + ] + } + } + } + ] + }, + "fqdn": { + "$id": "5110", + "kind": "string", + "type": { + "$ref": "1200" + }, + "value": "MyCluster.eastus.cloudapp.azure.com" + }, + "httpGatewayConnectionPort": { + "$id": "5111", + "kind": "number", + "type": { + "$ref": "1226" + }, + "value": 19080 + }, + "loadBalancingRules": { + "$id": "5112", + "kind": "array", + "type": { + "$ref": "1238" + }, + "value": [] + }, + "provisioningState": { + "$id": "5113", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Creating" + } + } + }, + "sku": { + "$id": "5114", + "kind": "model", + "type": { + "$ref": "1609" + }, + "value": { + "$id": "5115", + "name": { + "$id": "5116", + "kind": "string", + "type": { + "$ref": "248" + }, + "value": "Basic" + } + } + }, + "tags": { + "$id": "5117", + "kind": "dict", + "type": { + "$ref": "1184" + }, + "value": { + "$id": "5118" + } + } + } + } + }, + { + "$id": "5119", + "response": { + "$ref": "4760" + }, + "statusCode": 202, + "bodyValue": { + "$id": "5120", + "kind": "model", + "type": { + "$ref": "1181" + }, + "value": { + "$id": "5121", + "name": { + "$id": "5122", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "myCluster" + }, + "type": { + "$id": "5123", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters" + }, + "etag": { + "$id": "5124", + "kind": "string", + "type": { + "$ref": "1605" + }, + "value": "W/\"636462502169240745\"" + }, + "id": { + "$id": "5125", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster" + }, + "location": { + "$id": "5126", + "kind": "string", + "type": { + "$ref": "1190" + }, + "value": "eastus" + }, + "properties": { + "$id": "5127", + "kind": "model", + "type": { + "$ref": "1194" + }, + "value": { + "$id": "5128", + "adminUserName": { + "$id": "5129", + "kind": "string", + "type": { + "$ref": "1230" + }, + "value": "vmadmin" + }, + "clientConnectionPort": { + "$id": "5130", + "kind": "number", + "type": { + "$ref": "1222" + }, + "value": 19000 + }, + "clusterCertificateThumbprints": { + "$id": "5131", + "kind": "array", + "type": { + "$ref": "1217" + }, + "value": [ + { + "$id": "5132", + "kind": "string", + "type": { + "$ref": "1218" + }, + "value": "12599211F8F14C90AFA9532AD79A6F2CA1C00622" + } + ] + }, + "clusterId": { + "$id": "5133", + "kind": "string", + "type": { + "$ref": "1209" + }, + "value": "92584666-9889-4ae8-8d02-91902923d37f" + }, + "clusterState": { + "$id": "5134", + "kind": "string", + "type": { + "$ref": "120" + }, + "value": "WaitingForNodes" + }, + "clusterUpgradeCadence": { + "$id": "5135", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "Wave1" + }, + "clusterUpgradeMode": { + "$id": "5136", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "Automatic" + }, + "dnsName": { + "$id": "5137", + "kind": "string", + "type": { + "$ref": "1196" + }, + "value": "myCluster" + }, + "fabricSettings": { + "$id": "5138", + "kind": "array", + "type": { + "$ref": "1373" + }, + "value": [ + { + "$id": "5139", + "kind": "model", + "type": { + "$ref": "1374" + }, + "value": { + "$id": "5140", + "name": { + "$id": "5141", + "kind": "string", + "type": { + "$ref": "1376" + }, + "value": "ManagedIdentityTokenService" + }, + "parameters": { + "$id": "5142", + "kind": "array", + "type": { + "$ref": "1380" + }, + "value": [ + { + "$id": "5143", + "kind": "model", + "type": { + "$ref": "1381" + }, + "value": { + "$id": "5144", + "name": { + "$id": "5145", + "kind": "string", + "type": { + "$ref": "1383" + }, + "value": "IsEnabled" + }, + "value": { + "$id": "5146", + "kind": "string", + "type": { + "$ref": "1387" + }, + "value": "true" + } + } + } + ] + } + } + } + ] + }, + "fqdn": { + "$id": "5147", + "kind": "string", + "type": { + "$ref": "1200" + }, + "value": "MyCluster.eastus.cloudapp.azure.com" + }, + "httpGatewayConnectionPort": { + "$id": "5148", + "kind": "number", + "type": { + "$ref": "1226" + }, + "value": 19080 + }, + "loadBalancingRules": { + "$id": "5149", + "kind": "array", + "type": { + "$ref": "1238" + }, + "value": [] + }, + "provisioningState": { + "$id": "5150", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Updating" + } + } + }, + "sku": { + "$id": "5151", + "kind": "model", + "type": { + "$ref": "1609" + }, + "value": { + "$id": "5152", + "name": { + "$id": "5153", + "kind": "string", + "type": { + "$ref": "248" + }, + "value": "Basic" + } + } + }, + "tags": { + "$id": "5154", + "kind": "dict", + "type": { + "$ref": "1184" + }, + "value": { + "$id": "5155" + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "5156", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "5157", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5158", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "5159", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5160", + "name": "parameters", + "nameInRequest": "resource", + "doc": "The cluster resource.", + "type": { + "$ref": "1181" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5161", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "5162", + "kind": "constant", + "valueType": { + "$id": "5163", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5164", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "5165", + "kind": "constant", + "valueType": { + "$id": "5166", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "5167", + "type": { + "$ref": "1181" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusters.createOrUpdate" + }, + { + "$id": "5168", + "kind": "basic", + "name": "update", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Update the tags of of a Service Fabric managed cluster resource with the specified name.", + "operation": { + "$id": "5169", + "name": "update", + "resourceName": "ManagedCluster", + "doc": "Update the tags of of a Service Fabric managed cluster resource with the specified name.", + "accessibility": "public", + "parameters": [ + { + "$id": "5170", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "5171", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "5172", + "type": { + "$id": "5173", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5174", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "5175", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5176", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "5177", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5178", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "5179", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5180", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "5181", + "kind": "constant", + "valueType": { + "$id": "5182", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5183", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "5184", + "kind": "constant", + "valueType": { + "$id": "5185", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5186", + "name": "parameters", + "nameInRequest": "parameters", + "doc": "The managed cluster resource updated tags.", + "type": { + "$ref": "1615" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "5187", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1181" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "PATCH", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": false, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusters.update", + "decorators": [], + "examples": [ + { + "$id": "5188", + "kind": "http", + "name": "Patch a managed cluster", + "description": "Patch a managed cluster", + "filePath": "2025-03-01-preview/ManagedClusterPatchOperation_example.json", + "parameters": [ + { + "$id": "5189", + "parameter": { + "$ref": "5170" + }, + "value": { + "$id": "5190", + "kind": "string", + "type": { + "$ref": "5171" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "5191", + "parameter": { + "$ref": "5178" + }, + "value": { + "$id": "5192", + "kind": "string", + "type": { + "$ref": "5179" + }, + "value": "myCluster" + } + }, + { + "$id": "5193", + "parameter": { + "$ref": "5176" + }, + "value": { + "$id": "5194", + "kind": "string", + "type": { + "$ref": "5177" + }, + "value": "resRg" + } + }, + { + "$id": "5195", + "parameter": { + "$ref": "5174" + }, + "value": { + "$id": "5196", + "kind": "string", + "type": { + "$ref": "5175" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "5197", + "response": { + "$ref": "5187" + }, + "statusCode": 200, + "bodyValue": { + "$id": "5198", + "kind": "model", + "type": { + "$ref": "1181" + }, + "value": { + "$id": "5199", + "name": { + "$id": "5200", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "myCluster" + }, + "type": { + "$id": "5201", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters" + }, + "etag": { + "$id": "5202", + "kind": "string", + "type": { + "$ref": "1605" + }, + "value": "W/\"636462502169240745\"" + }, + "id": { + "$id": "5203", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster" + }, + "location": { + "$id": "5204", + "kind": "string", + "type": { + "$ref": "1190" + }, + "value": "eastus" + }, + "properties": { + "$id": "5205", + "kind": "model", + "type": { + "$ref": "1194" + }, + "value": { + "$id": "5206", + "addonFeatures": { + "$id": "5207", + "kind": "array", + "type": { + "$ref": "1408" + }, + "value": [ + { + "$id": "5208", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "DnsService" + }, + { + "$id": "5209", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "BackupRestoreService" + }, + { + "$id": "5210", + "kind": "string", + "type": { + "$ref": "212" + }, + "value": "ResourceMonitorService" + } + ] + }, + "adminUserName": { + "$id": "5211", + "kind": "string", + "type": { + "$ref": "1230" + }, + "value": "vmadmin" + }, + "allowRdpAccess": { + "$id": "5212", + "kind": "boolean", + "type": { + "$ref": "1269" + }, + "value": true + }, + "clientConnectionPort": { + "$id": "5213", + "kind": "number", + "type": { + "$ref": "1222" + }, + "value": 19001 + }, + "clusterCertificateThumbprints": { + "$id": "5214", + "kind": "array", + "type": { + "$ref": "1217" + }, + "value": [ + { + "$id": "5215", + "kind": "string", + "type": { + "$ref": "1218" + }, + "value": "12599211F8F14C90AFA9532AD79A6F2CA1C00622" + } + ] + }, + "clusterCodeVersion": { + "$id": "5216", + "kind": "string", + "type": { + "$ref": "1398" + }, + "value": "7.1.168.9494" + }, + "clusterId": { + "$id": "5217", + "kind": "string", + "type": { + "$ref": "1209" + }, + "value": "92584666-9889-4ae8-8d02-91902923d37f" + }, + "clusterState": { + "$id": "5218", + "kind": "string", + "type": { + "$ref": "120" + }, + "value": "WaitingForNodes" + }, + "clusterUpgradeCadence": { + "$id": "5219", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "Wave0" + }, + "clusterUpgradeMode": { + "$id": "5220", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "Automatic" + }, + "dnsName": { + "$id": "5221", + "kind": "string", + "type": { + "$ref": "1196" + }, + "value": "myCluster" + }, + "enableAutoOSUpgrade": { + "$id": "5222", + "kind": "boolean", + "type": { + "$ref": "1412" + }, + "value": true + }, + "fabricSettings": { + "$id": "5223", + "kind": "array", + "type": { + "$ref": "1373" + }, + "value": [ + { + "$id": "5224", + "kind": "model", + "type": { + "$ref": "1374" + }, + "value": { + "$id": "5225", + "name": { + "$id": "5226", + "kind": "string", + "type": { + "$ref": "1376" + }, + "value": "ManagedIdentityTokenService" + }, + "parameters": { + "$id": "5227", + "kind": "array", + "type": { + "$ref": "1380" + }, + "value": [ + { + "$id": "5228", + "kind": "model", + "type": { + "$ref": "1381" + }, + "value": { + "$id": "5229", + "name": { + "$id": "5230", + "kind": "string", + "type": { + "$ref": "1383" + }, + "value": "IsEnabled" + }, + "value": { + "$id": "5231", + "kind": "string", + "type": { + "$ref": "1387" + }, + "value": "false" + } + } + } + ] + } + } + } + ] + }, + "fqdn": { + "$id": "5232", + "kind": "string", + "type": { + "$ref": "1200" + }, + "value": "MyCluster.eastus.cloudapp.azure.com" + }, + "httpGatewayConnectionPort": { + "$id": "5233", + "kind": "number", + "type": { + "$ref": "1226" + }, + "value": 19081 + }, + "loadBalancingRules": { + "$id": "5234", + "kind": "array", + "type": { + "$ref": "1238" + }, + "value": [ + { + "$id": "5235", + "kind": "model", + "type": { + "$ref": "1239" + }, + "value": { + "$id": "5236", + "backendPort": { + "$id": "5237", + "kind": "number", + "type": { + "$ref": "1245" + }, + "value": 80 + }, + "frontendPort": { + "$id": "5238", + "kind": "number", + "type": { + "$ref": "1241" + }, + "value": 80 + }, + "probePort": { + "$id": "5239", + "kind": "number", + "type": { + "$ref": "1252" + }, + "value": 80 + }, + "probeProtocol": { + "$id": "5240", + "kind": "string", + "type": { + "$ref": "140" + }, + "value": "http" + }, + "protocol": { + "$id": "5241", + "kind": "string", + "type": { + "$ref": "134" + }, + "value": "http" + } + } + }, + { + "$id": "5242", + "kind": "model", + "type": { + "$ref": "1239" + }, + "value": { + "$id": "5243", + "backendPort": { + "$id": "5244", + "kind": "number", + "type": { + "$ref": "1245" + }, + "value": 443 + }, + "frontendPort": { + "$id": "5245", + "kind": "number", + "type": { + "$ref": "1241" + }, + "value": 443 + }, + "probePort": { + "$id": "5246", + "kind": "number", + "type": { + "$ref": "1252" + }, + "value": 443 + }, + "probeProtocol": { + "$id": "5247", + "kind": "string", + "type": { + "$ref": "140" + }, + "value": "http" + }, + "protocol": { + "$id": "5248", + "kind": "string", + "type": { + "$ref": "134" + }, + "value": "http" + } + } + }, + { + "$id": "5249", + "kind": "model", + "type": { + "$ref": "1239" + }, + "value": { + "$id": "5250", + "backendPort": { + "$id": "5251", + "kind": "number", + "type": { + "$ref": "1245" + }, + "value": 10000 + }, + "frontendPort": { + "$id": "5252", + "kind": "number", + "type": { + "$ref": "1241" + }, + "value": 10000 + }, + "probePort": { + "$id": "5253", + "kind": "number", + "type": { + "$ref": "1252" + }, + "value": 10000 + }, + "probeProtocol": { + "$id": "5254", + "kind": "string", + "type": { + "$ref": "140" + }, + "value": "http" + }, + "protocol": { + "$id": "5255", + "kind": "string", + "type": { + "$ref": "134" + }, + "value": "tcp" + } + } + } + ] + }, + "networkSecurityRules": { + "$id": "5256", + "kind": "array", + "type": { + "$ref": "1273" + }, + "value": [ + { + "$id": "5257", + "kind": "model", + "type": { + "$ref": "1274" + }, + "value": { + "$id": "5258", + "name": { + "$id": "5259", + "kind": "string", + "type": { + "$ref": "1276" + }, + "value": "TestName" + }, + "description": { + "$id": "5260", + "kind": "string", + "type": { + "$ref": "1280" + }, + "value": "Test description" + }, + "access": { + "$id": "5261", + "kind": "string", + "type": { + "$ref": "164" + }, + "value": "allow" + }, + "destinationAddressPrefixes": { + "$id": "5262", + "kind": "array", + "type": { + "$ref": "1292" + }, + "value": [ + { + "$id": "5263", + "kind": "string", + "type": { + "$ref": "1293" + }, + "value": "*" + } + ] + }, + "destinationPortRanges": { + "$id": "5264", + "kind": "array", + "type": { + "$ref": "1302" + }, + "value": [ + { + "$id": "5265", + "kind": "string", + "type": { + "$ref": "1303" + }, + "value": "*" + } + ] + }, + "direction": { + "$id": "5266", + "kind": "string", + "type": { + "$ref": "170" + }, + "value": "inbound" + }, + "priority": { + "$id": "5267", + "kind": "number", + "type": { + "$ref": "1326" + }, + "value": 1010 + }, + "sourceAddressPrefixes": { + "$id": "5268", + "kind": "array", + "type": { + "$ref": "1287" + }, + "value": [ + { + "$id": "5269", + "kind": "string", + "type": { + "$ref": "1288" + }, + "value": "*" + } + ] + }, + "sourcePortRanges": { + "$id": "5270", + "kind": "array", + "type": { + "$ref": "1297" + }, + "value": [ + { + "$id": "5271", + "kind": "string", + "type": { + "$ref": "1298" + }, + "value": "*" + } + ] + }, + "protocol": { + "$id": "5272", + "kind": "string", + "type": { + "$ref": "148" + }, + "value": "tcp" + } + } + } + ] + }, + "provisioningState": { + "$id": "5273", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Succeeded" + } + } + }, + "sku": { + "$id": "5274", + "kind": "model", + "type": { + "$ref": "1609" + }, + "value": { + "$id": "5275", + "name": { + "$id": "5276", + "kind": "string", + "type": { + "$ref": "248" + }, + "value": "Standard" + } + } + }, + "tags": { + "$id": "5277", + "kind": "dict", + "type": { + "$ref": "1184" + }, + "value": { + "$id": "5278", + "a": { + "$id": "5279", + "kind": "string", + "type": { + "$ref": "1186" + }, + "value": "b" + } + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "5280", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "5281", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5282", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "5283", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5284", + "name": "parameters", + "nameInRequest": "properties", + "doc": "The managed cluster resource updated tags.", + "type": { + "$ref": "1615" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5285", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$ref": "5181" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5286", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "5184" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "5287", + "type": { + "$ref": "1181" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusters.update" + }, + { + "$id": "5288", + "kind": "lro", + "name": "delete", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Delete a Service Fabric managed cluster resource with the specified name.", + "operation": { + "$id": "5289", + "name": "delete", + "resourceName": "ManagedCluster", + "doc": "Delete a Service Fabric managed cluster resource with the specified name.", + "accessibility": "public", + "parameters": [ + { + "$id": "5290", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "5291", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "5292", + "type": { + "$id": "5293", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5294", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "5295", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5296", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "5297", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5298", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "5299", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5300", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "5301", + "kind": "constant", + "valueType": { + "$id": "5302", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "5303", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "5304", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "5305", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "5306", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + } + }, + { + "$id": "5307", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "5308", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false + }, + { + "$id": "5309", + "statusCodes": [ + 204 + ], + "headers": [], + "isErrorResponse": false + } + ], + "httpMethod": "DELETE", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}", + "bufferResponse": true, + "longRunning": { + "$id": "5310", + "finalStateVia": 1, + "finalResponse": { + "$id": "5311", + "statusCodes": [ + 204 + ] + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusters.delete", + "decorators": [], + "examples": [ + { + "$id": "5312", + "kind": "http", + "name": "Delete a cluster", + "description": "Delete a cluster", + "filePath": "2025-03-01-preview/ManagedClusterDeleteOperation_example.json", + "parameters": [ + { + "$id": "5313", + "parameter": { + "$ref": "5290" + }, + "value": { + "$id": "5314", + "kind": "string", + "type": { + "$ref": "5291" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "5315", + "parameter": { + "$ref": "5298" + }, + "value": { + "$id": "5316", + "kind": "string", + "type": { + "$ref": "5299" + }, + "value": "myCluster" + } + }, + { + "$id": "5317", + "parameter": { + "$ref": "5296" + }, + "value": { + "$id": "5318", + "kind": "string", + "type": { + "$ref": "5297" + }, + "value": "resRg" + } + }, + { + "$id": "5319", + "parameter": { + "$ref": "5294" + }, + "value": { + "$id": "5320", + "kind": "string", + "type": { + "$ref": "5295" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "5321", + "response": { + "$ref": "5303" + }, + "statusCode": 202 + }, + { + "$id": "5322", + "response": { + "$ref": "5309" + }, + "statusCode": 204 + } + ] + } + ] + }, + "parameters": [ + { + "$id": "5323", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "5324", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5325", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "5326", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5327", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "5328", + "kind": "constant", + "valueType": { + "$id": "5329", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "5330" + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusters.delete" + }, + { + "$id": "5331", + "kind": "paging", + "name": "listByResourceGroup", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Gets all Service Fabric cluster resources created or in the process of being created in the resource group.", + "operation": { + "$id": "5332", + "name": "listByResourceGroup", + "resourceName": "ManagedCluster", + "doc": "Gets all Service Fabric cluster resources created or in the process of being created in the resource group.", + "accessibility": "public", + "parameters": [ + { + "$id": "5333", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "5334", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "5335", + "type": { + "$id": "5336", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5337", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "5338", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5339", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "5340", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5341", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "5342", + "kind": "constant", + "valueType": { + "$id": "5343", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "5344", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1622" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters", + "bufferResponse": true, + "paging": { + "$id": "5345", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "5346", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusters.listByResourceGroup", + "decorators": [], + "examples": [ + { + "$id": "5347", + "kind": "http", + "name": "List cluster by resource group", + "description": "List cluster by resource group", + "filePath": "2025-03-01-preview/ManagedClusterListByResourceGroupOperation_example.json", + "parameters": [ + { + "$id": "5348", + "parameter": { + "$ref": "5333" + }, + "value": { + "$id": "5349", + "kind": "string", + "type": { + "$ref": "5334" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "5350", + "parameter": { + "$ref": "5339" + }, + "value": { + "$id": "5351", + "kind": "string", + "type": { + "$ref": "5340" + }, + "value": "resRg" + } + }, + { + "$id": "5352", + "parameter": { + "$ref": "5337" + }, + "value": { + "$id": "5353", + "kind": "string", + "type": { + "$ref": "5338" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "5354", + "response": { + "$ref": "5344" + }, + "statusCode": 200, + "bodyValue": { + "$id": "5355", + "kind": "model", + "type": { + "$ref": "1622" + }, + "value": { + "$id": "5356", + "nextLink": { + "$id": "5357", + "kind": "string", + "type": { + "$ref": "1628" + }, + "value": "http://examplelink.com" + }, + "value": { + "$id": "5358", + "kind": "array", + "type": { + "$ref": "1624" + }, + "value": [ + { + "$id": "5359", + "kind": "model", + "type": { + "$ref": "1181" + }, + "value": { + "$id": "5360", + "name": { + "$id": "5361", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "myCluster" + }, + "type": { + "$id": "5362", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters" + }, + "etag": { + "$id": "5363", + "kind": "string", + "type": { + "$ref": "1605" + }, + "value": "W/\"636462502169240745\"" + }, + "id": { + "$id": "5364", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster" + }, + "location": { + "$id": "5365", + "kind": "string", + "type": { + "$ref": "1190" + }, + "value": "eastus" + }, + "properties": { + "$id": "5366", + "kind": "model", + "type": { + "$ref": "1194" + }, + "value": { + "$id": "5367", + "adminUserName": { + "$id": "5368", + "kind": "string", + "type": { + "$ref": "1230" + }, + "value": "vmadmin" + }, + "clientConnectionPort": { + "$id": "5369", + "kind": "number", + "type": { + "$ref": "1222" + }, + "value": 19000 + }, + "clusterCertificateThumbprints": { + "$id": "5370", + "kind": "array", + "type": { + "$ref": "1217" + }, + "value": [ + { + "$id": "5371", + "kind": "string", + "type": { + "$ref": "1218" + }, + "value": "12599211F8F14C90AFA9532AD79A6F2CA1C00622" + } + ] + }, + "clusterCodeVersion": { + "$id": "5372", + "kind": "string", + "type": { + "$ref": "1398" + }, + "value": "7.1.168.9494" + }, + "clusterId": { + "$id": "5373", + "kind": "string", + "type": { + "$ref": "1209" + }, + "value": "92584666-9889-4ae8-8d02-91902923d37f" + }, + "clusterState": { + "$id": "5374", + "kind": "string", + "type": { + "$ref": "120" + }, + "value": "WaitingForNodes" + }, + "clusterUpgradeCadence": { + "$id": "5375", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "Wave0" + }, + "clusterUpgradeMode": { + "$id": "5376", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "Automatic" + }, + "dnsName": { + "$id": "5377", + "kind": "string", + "type": { + "$ref": "1196" + }, + "value": "myCluster" + }, + "fabricSettings": { + "$id": "5378", + "kind": "array", + "type": { + "$ref": "1373" + }, + "value": [ + { + "$id": "5379", + "kind": "model", + "type": { + "$ref": "1374" + }, + "value": { + "$id": "5380", + "name": { + "$id": "5381", + "kind": "string", + "type": { + "$ref": "1376" + }, + "value": "ManagedIdentityTokenService" + }, + "parameters": { + "$id": "5382", + "kind": "array", + "type": { + "$ref": "1380" + }, + "value": [ + { + "$id": "5383", + "kind": "model", + "type": { + "$ref": "1381" + }, + "value": { + "$id": "5384", + "name": { + "$id": "5385", + "kind": "string", + "type": { + "$ref": "1383" + }, + "value": "IsEnabled" + }, + "value": { + "$id": "5386", + "kind": "string", + "type": { + "$ref": "1387" + }, + "value": "true" + } + } + } + ] + } + } + } + ] + }, + "fqdn": { + "$id": "5387", + "kind": "string", + "type": { + "$ref": "1200" + }, + "value": "MyCluster.eastus.cloudapp.azure.com" + }, + "httpGatewayConnectionPort": { + "$id": "5388", + "kind": "number", + "type": { + "$ref": "1226" + }, + "value": 19080 + }, + "loadBalancingRules": { + "$id": "5389", + "kind": "array", + "type": { + "$ref": "1238" + }, + "value": [] + }, + "provisioningState": { + "$id": "5390", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Succeeded" + } + } + }, + "sku": { + "$id": "5391", + "kind": "model", + "type": { + "$ref": "1609" + }, + "value": { + "$id": "5392", + "name": { + "$id": "5393", + "kind": "string", + "type": { + "$ref": "248" + }, + "value": "Standard" + } + } + }, + "tags": { + "$id": "5394", + "kind": "dict", + "type": { + "$ref": "1184" + }, + "value": { + "$id": "5395" + } + } + } + }, + { + "$id": "5396", + "kind": "model", + "type": { + "$ref": "1181" + }, + "value": { + "$id": "5397", + "name": { + "$id": "5398", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "myCluster2" + }, + "type": { + "$id": "5399", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters" + }, + "etag": { + "$id": "5400", + "kind": "string", + "type": { + "$ref": "1605" + }, + "value": "W/\"636462502164040075\"" + }, + "id": { + "$id": "5401", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster2" + }, + "location": { + "$id": "5402", + "kind": "string", + "type": { + "$ref": "1190" + }, + "value": "eastus" + }, + "properties": { + "$id": "5403", + "kind": "model", + "type": { + "$ref": "1194" + }, + "value": { + "$id": "5404", + "adminUserName": { + "$id": "5405", + "kind": "string", + "type": { + "$ref": "1230" + }, + "value": "vmadmin" + }, + "clientConnectionPort": { + "$id": "5406", + "kind": "number", + "type": { + "$ref": "1222" + }, + "value": 19000 + }, + "clusterCertificateThumbprints": { + "$id": "5407", + "kind": "array", + "type": { + "$ref": "1217" + }, + "value": [ + { + "$id": "5408", + "kind": "string", + "type": { + "$ref": "1218" + }, + "value": "12599211F8F14C90AFA9532AD79A6F2CA1C00622" + } + ] + }, + "clusterCodeVersion": { + "$id": "5409", + "kind": "string", + "type": { + "$ref": "1398" + }, + "value": "7.1.168.9494" + }, + "clusterId": { + "$id": "5410", + "kind": "string", + "type": { + "$ref": "1209" + }, + "value": "2747e469-b24e-4039-8a0a-46151419523f" + }, + "clusterState": { + "$id": "5411", + "kind": "string", + "type": { + "$ref": "120" + }, + "value": "WaitingForNodes" + }, + "clusterUpgradeCadence": { + "$id": "5412", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "Wave0" + }, + "clusterUpgradeMode": { + "$id": "5413", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "Automatic" + }, + "dnsName": { + "$id": "5414", + "kind": "string", + "type": { + "$ref": "1196" + }, + "value": "myCluster2" + }, + "fabricSettings": { + "$id": "5415", + "kind": "array", + "type": { + "$ref": "1373" + }, + "value": [ + { + "$id": "5416", + "kind": "model", + "type": { + "$ref": "1374" + }, + "value": { + "$id": "5417", + "name": { + "$id": "5418", + "kind": "string", + "type": { + "$ref": "1376" + }, + "value": "ManagedIdentityTokenService" + }, + "parameters": { + "$id": "5419", + "kind": "array", + "type": { + "$ref": "1380" + }, + "value": [ + { + "$id": "5420", + "kind": "model", + "type": { + "$ref": "1381" + }, + "value": { + "$id": "5421", + "name": { + "$id": "5422", + "kind": "string", + "type": { + "$ref": "1383" + }, + "value": "IsEnabled" + }, + "value": { + "$id": "5423", + "kind": "string", + "type": { + "$ref": "1387" + }, + "value": "true" + } + } + } + ] + } + } + } + ] + }, + "fqdn": { + "$id": "5424", + "kind": "string", + "type": { + "$ref": "1200" + }, + "value": "MyCluster.eastus.cloudapp.azure.com" + }, + "httpGatewayConnectionPort": { + "$id": "5425", + "kind": "number", + "type": { + "$ref": "1226" + }, + "value": 19080 + }, + "loadBalancingRules": { + "$id": "5426", + "kind": "array", + "type": { + "$ref": "1238" + }, + "value": [] + }, + "provisioningState": { + "$id": "5427", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Succeeded" + } + } + }, + "sku": { + "$id": "5428", + "kind": "model", + "type": { + "$ref": "1609" + }, + "value": { + "$id": "5429", + "name": { + "$id": "5430", + "kind": "string", + "type": { + "$ref": "248" + }, + "value": "Standard" + } + } + }, + "tags": { + "$id": "5431", + "kind": "dict", + "type": { + "$ref": "1184" + }, + "value": { + "$id": "5432" + } + } + } + } + ] + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "5433", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "5434", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5435", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "5342" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "5436", + "type": { + "$id": "5437", + "kind": "array", + "name": "ArrayManagedCluster", + "valueType": { + "$ref": "1181" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "resultSegments": [ + "value" + ] + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusters.listByResourceGroup" + }, + { + "$id": "5438", + "kind": "paging", + "name": "listBySubscription", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Gets all Service Fabric cluster resources created or in the process of being created in the subscription.", + "operation": { + "$id": "5439", + "name": "listBySubscription", + "resourceName": "ManagedCluster", + "doc": "Gets all Service Fabric cluster resources created or in the process of being created in the subscription.", + "accessibility": "public", + "parameters": [ + { + "$id": "5440", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "5441", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "5442", + "type": { + "$id": "5443", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5444", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "5445", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5446", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "5447", + "kind": "constant", + "valueType": { + "$id": "5448", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "5449", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1622" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/managedClusters", + "bufferResponse": true, + "paging": { + "$id": "5450", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "5451", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusters.listBySubscription", + "decorators": [], + "examples": [ + { + "$id": "5452", + "kind": "http", + "name": "List managed clusters", + "description": "List managed clusters", + "filePath": "2025-03-01-preview/ManagedClusterListBySubscriptionOperation_example.json", + "parameters": [ + { + "$id": "5453", + "parameter": { + "$ref": "5440" + }, + "value": { + "$id": "5454", + "kind": "string", + "type": { + "$ref": "5441" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "5455", + "parameter": { + "$ref": "5444" + }, + "value": { + "$id": "5456", + "kind": "string", + "type": { + "$ref": "5445" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "5457", + "response": { + "$ref": "5449" + }, + "statusCode": 200, + "bodyValue": { + "$id": "5458", + "kind": "model", + "type": { + "$ref": "1622" + }, + "value": { + "$id": "5459", + "nextLink": { + "$id": "5460", + "kind": "string", + "type": { + "$ref": "1628" + }, + "value": "http://examplelink.com" + }, + "value": { + "$id": "5461", + "kind": "array", + "type": { + "$ref": "1624" + }, + "value": [ + { + "$id": "5462", + "kind": "model", + "type": { + "$ref": "1181" + }, + "value": { + "$id": "5463", + "name": { + "$id": "5464", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "myCluster" + }, + "type": { + "$id": "5465", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters" + }, + "etag": { + "$id": "5466", + "kind": "string", + "type": { + "$ref": "1605" + }, + "value": "W/\"636462502169240745\"" + }, + "id": { + "$id": "5467", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster" + }, + "location": { + "$id": "5468", + "kind": "string", + "type": { + "$ref": "1190" + }, + "value": "eastus" + }, + "properties": { + "$id": "5469", + "kind": "model", + "type": { + "$ref": "1194" + }, + "value": { + "$id": "5470", + "adminUserName": { + "$id": "5471", + "kind": "string", + "type": { + "$ref": "1230" + }, + "value": "vmadmin" + }, + "clientConnectionPort": { + "$id": "5472", + "kind": "number", + "type": { + "$ref": "1222" + }, + "value": 19000 + }, + "clusterCertificateThumbprints": { + "$id": "5473", + "kind": "array", + "type": { + "$ref": "1217" + }, + "value": [ + { + "$id": "5474", + "kind": "string", + "type": { + "$ref": "1218" + }, + "value": "12599211F8F14C90AFA9532AD79A6F2CA1C00622" + } + ] + }, + "clusterCodeVersion": { + "$id": "5475", + "kind": "string", + "type": { + "$ref": "1398" + }, + "value": "7.1.168.9494" + }, + "clusterId": { + "$id": "5476", + "kind": "string", + "type": { + "$ref": "1209" + }, + "value": "92584666-9889-4ae8-8d02-91902923d37f" + }, + "clusterState": { + "$id": "5477", + "kind": "string", + "type": { + "$ref": "120" + }, + "value": "WaitingForNodes" + }, + "clusterUpgradeCadence": { + "$id": "5478", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "Wave0" + }, + "clusterUpgradeMode": { + "$id": "5479", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "Automatic" + }, + "dnsName": { + "$id": "5480", + "kind": "string", + "type": { + "$ref": "1196" + }, + "value": "myCluster" + }, + "fabricSettings": { + "$id": "5481", + "kind": "array", + "type": { + "$ref": "1373" + }, + "value": [ + { + "$id": "5482", + "kind": "model", + "type": { + "$ref": "1374" + }, + "value": { + "$id": "5483", + "name": { + "$id": "5484", + "kind": "string", + "type": { + "$ref": "1376" + }, + "value": "ManagedIdentityTokenService" + }, + "parameters": { + "$id": "5485", + "kind": "array", + "type": { + "$ref": "1380" + }, + "value": [ + { + "$id": "5486", + "kind": "model", + "type": { + "$ref": "1381" + }, + "value": { + "$id": "5487", + "name": { + "$id": "5488", + "kind": "string", + "type": { + "$ref": "1383" + }, + "value": "IsEnabled" + }, + "value": { + "$id": "5489", + "kind": "string", + "type": { + "$ref": "1387" + }, + "value": "true" + } + } + } + ] + } + } + } + ] + }, + "fqdn": { + "$id": "5490", + "kind": "string", + "type": { + "$ref": "1200" + }, + "value": "MyCluster.eastus.cloudapp.azure.com" + }, + "httpGatewayConnectionPort": { + "$id": "5491", + "kind": "number", + "type": { + "$ref": "1226" + }, + "value": 19080 + }, + "loadBalancingRules": { + "$id": "5492", + "kind": "array", + "type": { + "$ref": "1238" + }, + "value": [] + }, + "provisioningState": { + "$id": "5493", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Succeeded" + } + } + }, + "sku": { + "$id": "5494", + "kind": "model", + "type": { + "$ref": "1609" + }, + "value": { + "$id": "5495", + "name": { + "$id": "5496", + "kind": "string", + "type": { + "$ref": "248" + }, + "value": "Standard" + } + } + }, + "tags": { + "$id": "5497", + "kind": "dict", + "type": { + "$ref": "1184" + }, + "value": { + "$id": "5498" + } + } + } + }, + { + "$id": "5499", + "kind": "model", + "type": { + "$ref": "1181" + }, + "value": { + "$id": "5500", + "name": { + "$id": "5501", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "myCluster2" + }, + "type": { + "$id": "5502", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters" + }, + "etag": { + "$id": "5503", + "kind": "string", + "type": { + "$ref": "1605" + }, + "value": "W/\"636462502164040075\"" + }, + "id": { + "$id": "5504", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster2" + }, + "location": { + "$id": "5505", + "kind": "string", + "type": { + "$ref": "1190" + }, + "value": "eastus" + }, + "properties": { + "$id": "5506", + "kind": "model", + "type": { + "$ref": "1194" + }, + "value": { + "$id": "5507", + "adminUserName": { + "$id": "5508", + "kind": "string", + "type": { + "$ref": "1230" + }, + "value": "vmadmin" + }, + "clientConnectionPort": { + "$id": "5509", + "kind": "number", + "type": { + "$ref": "1222" + }, + "value": 19000 + }, + "clusterCertificateThumbprints": { + "$id": "5510", + "kind": "array", + "type": { + "$ref": "1217" + }, + "value": [ + { + "$id": "5511", + "kind": "string", + "type": { + "$ref": "1218" + }, + "value": "12599211F8F14C90AFA9532AD79A6F2CA1C00622" + } + ] + }, + "clusterCodeVersion": { + "$id": "5512", + "kind": "string", + "type": { + "$ref": "1398" + }, + "value": "7.1.168.9494" + }, + "clusterId": { + "$id": "5513", + "kind": "string", + "type": { + "$ref": "1209" + }, + "value": "2747e469-b24e-4039-8a0a-46151419523f" + }, + "clusterState": { + "$id": "5514", + "kind": "string", + "type": { + "$ref": "120" + }, + "value": "WaitingForNodes" + }, + "clusterUpgradeCadence": { + "$id": "5515", + "kind": "string", + "type": { + "$ref": "204" + }, + "value": "Wave0" + }, + "clusterUpgradeMode": { + "$id": "5516", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "Automatic" + }, + "dnsName": { + "$id": "5517", + "kind": "string", + "type": { + "$ref": "1196" + }, + "value": "myCluster2" + }, + "fabricSettings": { + "$id": "5518", + "kind": "array", + "type": { + "$ref": "1373" + }, + "value": [ + { + "$id": "5519", + "kind": "model", + "type": { + "$ref": "1374" + }, + "value": { + "$id": "5520", + "name": { + "$id": "5521", + "kind": "string", + "type": { + "$ref": "1376" + }, + "value": "ManagedIdentityTokenService" + }, + "parameters": { + "$id": "5522", + "kind": "array", + "type": { + "$ref": "1380" + }, + "value": [ + { + "$id": "5523", + "kind": "model", + "type": { + "$ref": "1381" + }, + "value": { + "$id": "5524", + "name": { + "$id": "5525", + "kind": "string", + "type": { + "$ref": "1383" + }, + "value": "IsEnabled" + }, + "value": { + "$id": "5526", + "kind": "string", + "type": { + "$ref": "1387" + }, + "value": "true" + } + } + } + ] + } + } + } + ] + }, + "fqdn": { + "$id": "5527", + "kind": "string", + "type": { + "$ref": "1200" + }, + "value": "MyCluster.eastus.cloudapp.azure.com" + }, + "httpGatewayConnectionPort": { + "$id": "5528", + "kind": "number", + "type": { + "$ref": "1226" + }, + "value": 19080 + }, + "loadBalancingRules": { + "$id": "5529", + "kind": "array", + "type": { + "$ref": "1238" + }, + "value": [] + }, + "provisioningState": { + "$id": "5530", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Succeeded" + } + } + }, + "sku": { + "$id": "5531", + "kind": "model", + "type": { + "$ref": "1609" + }, + "value": { + "$id": "5532", + "name": { + "$id": "5533", + "kind": "string", + "type": { + "$ref": "248" + }, + "value": "Standard" + } + } + }, + "tags": { + "$id": "5534", + "kind": "dict", + "type": { + "$ref": "1184" + }, + "value": { + "$id": "5535" + } + } + } + } + ] + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "5536", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "5447" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "5537", + "type": { + "$id": "5538", + "kind": "array", + "name": "ArrayManagedCluster", + "valueType": { + "$ref": "1181" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "resultSegments": [ + "value" + ] + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusters.listBySubscription" + }, + { + "$id": "5539", + "kind": "basic", + "name": "getFaultSimulation", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Gets a fault simulation by the simulationId.", + "operation": { + "$id": "5540", + "name": "getFaultSimulation", + "resourceName": "ManagedClusters", + "doc": "Gets a fault simulation by the simulationId.", + "accessibility": "public", + "parameters": [ + { + "$id": "5541", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "5542", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "5543", + "type": { + "$id": "5544", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5545", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "5546", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5547", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "5548", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5549", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "5550", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5551", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "5552", + "kind": "constant", + "valueType": { + "$id": "5553", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5554", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "5555", + "kind": "constant", + "valueType": { + "$id": "5556", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5557", + "name": "parameters", + "nameInRequest": "parameters", + "doc": "parameter with fault simulation id.", + "type": { + "$ref": "1632" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "5558", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1637" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/getFaultSimulation", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusters.getFaultSimulation", + "decorators": [] + }, + "parameters": [ + { + "$id": "5559", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "5560", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5561", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "5562", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5563", + "name": "parameters", + "nameInRequest": "body", + "doc": "parameter with fault simulation id.", + "type": { + "$ref": "1632" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5564", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$ref": "5552" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5565", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "5555" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "5566", + "type": { + "$ref": "1637" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusters.getFaultSimulation" + }, + { + "$id": "5567", + "kind": "paging", + "name": "listFaultSimulation", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Gets the list of recent fault simulations for the cluster.", + "operation": { + "$id": "5568", + "name": "listFaultSimulation", + "resourceName": "ManagedClusters", + "doc": "Gets the list of recent fault simulations for the cluster.", + "accessibility": "public", + "parameters": [ + { + "$id": "5569", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "5570", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "5571", + "type": { + "$id": "5572", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5573", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "5574", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5575", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "5576", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5577", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "5578", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5579", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "5580", + "kind": "constant", + "valueType": { + "$id": "5581", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "5582", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1718" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/listFaultSimulation", + "bufferResponse": true, + "paging": { + "$id": "5583", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "5584", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusters.listFaultSimulation", + "decorators": [] + }, + "parameters": [ + { + "$id": "5585", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "5586", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5587", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "5588", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5589", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "5580" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "5590", + "type": { + "$id": "5591", + "kind": "array", + "name": "ArrayFaultSimulation", + "valueType": { + "$ref": "1637" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "resultSegments": [ + "value" + ] + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusters.listFaultSimulation" + }, + { + "$id": "5592", + "kind": "lro", + "name": "startFaultSimulation", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Starts a fault simulation on the cluster.", + "operation": { + "$id": "5593", + "name": "startFaultSimulation", + "resourceName": "ManagedClusters", + "doc": "Starts a fault simulation on the cluster.", + "accessibility": "public", + "parameters": [ + { + "$id": "5594", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "5595", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "5596", + "type": { + "$id": "5597", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5598", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "5599", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5600", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "5601", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5602", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "5603", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5604", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "5605", + "kind": "constant", + "valueType": { + "$id": "5606", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5607", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "5608", + "kind": "constant", + "valueType": { + "$id": "5609", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5610", + "name": "parameters", + "nameInRequest": "parameters", + "doc": "parameters describing the fault simulation.", + "type": { + "$ref": "1728" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "5611", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "5612", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "5613", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "5614", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "5615", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/startFaultSimulation", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "longRunning": { + "$id": "5616", + "finalStateVia": 1, + "finalResponse": { + "$id": "5617", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1637" + } + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusters.startFaultSimulation", + "decorators": [] + }, + "parameters": [ + { + "$id": "5618", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "5619", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5620", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "5621", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5622", + "name": "parameters", + "nameInRequest": "body", + "doc": "parameters describing the fault simulation.", + "type": { + "$ref": "1728" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5623", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "5624", + "kind": "constant", + "valueType": { + "$id": "5625", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5626", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "5627", + "kind": "constant", + "valueType": { + "$id": "5628", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "5629", + "type": { + "$ref": "1637" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusters.startFaultSimulation" + }, + { + "$id": "5630", + "kind": "lro", + "name": "stopFaultSimulation", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Stops a fault simulation on the cluster.", + "operation": { + "$id": "5631", + "name": "stopFaultSimulation", + "resourceName": "ManagedClusters", + "doc": "Stops a fault simulation on the cluster.", + "accessibility": "public", + "parameters": [ + { + "$id": "5632", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "5633", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "5634", + "type": { + "$id": "5635", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5636", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "5637", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5638", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "5639", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5640", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "5641", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5642", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "5643", + "kind": "constant", + "valueType": { + "$id": "5644", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5645", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "5646", + "kind": "constant", + "valueType": { + "$id": "5647", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5648", + "name": "parameters", + "nameInRequest": "parameters", + "doc": "parameter with fault simulation id.", + "type": { + "$ref": "1632" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "5649", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "5650", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "5651", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "5652", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "5653", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/stopFaultSimulation", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "longRunning": { + "$id": "5654", + "finalStateVia": 1, + "finalResponse": { + "$id": "5655", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1637" + } + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusters.stopFaultSimulation", + "decorators": [] + }, + "parameters": [ + { + "$id": "5656", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "5657", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5658", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "5659", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5660", + "name": "parameters", + "nameInRequest": "body", + "doc": "parameter with fault simulation id.", + "type": { + "$ref": "1632" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5661", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "5662", + "kind": "constant", + "valueType": { + "$id": "5663", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5664", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "5665", + "kind": "constant", + "valueType": { + "$id": "5666", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "5667", + "type": { + "$ref": "1637" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusters.stopFaultSimulation" + } + ], + "parameters": [ + { + "$id": "5668", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "5669", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "location": "Uri", + "isApiVersion": false, + "isContentType": false, + "isRequired": true, + "isEndpoint": true, + "skipUrlEncoding": false, + "explode": false, + "kind": "Client", + "defaultValue": { + "$id": "5670", + "type": { + "$id": "5671", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "5672", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "5673" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedClusters", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "parent": { + "$ref": "2378" + } + }, + { + "$id": "5674", + "kind": "client", + "name": "ManagedAzResiliencyStatus", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "methods": [ + { + "$id": "5675", + "kind": "basic", + "name": "GetManagedAzResiliencyStatus", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Action to get Az Resiliency Status of all the Base resources constituting Service Fabric Managed Clusters.", + "operation": { + "$id": "5676", + "name": "GetManagedAzResiliencyStatus", + "resourceName": "ManagedAzResiliencyStatus", + "doc": "Action to get Az Resiliency Status of all the Base resources constituting Service Fabric Managed Clusters.", + "accessibility": "public", + "parameters": [ + { + "$id": "5677", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "5678", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "5679", + "type": { + "$id": "5680", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5681", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "5682", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5683", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "5684", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5685", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "5686", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5687", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "5688", + "kind": "constant", + "valueType": { + "$id": "5689", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "5690", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1732" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/getazresiliencystatus", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedAzResiliencyStatus.get", + "decorators": [], + "examples": [ + { + "$id": "5691", + "kind": "http", + "name": "Az Resiliency status of Base Resources", + "description": "Az Resiliency status of Base Resources", + "filePath": "2025-03-01-preview/managedAzResiliencyStatusGet_example.json", + "parameters": [ + { + "$id": "5692", + "parameter": { + "$ref": "5677" + }, + "value": { + "$id": "5693", + "kind": "string", + "type": { + "$ref": "5678" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "5694", + "parameter": { + "$ref": "5685" + }, + "value": { + "$id": "5695", + "kind": "string", + "type": { + "$ref": "5686" + }, + "value": "mycluster1" + } + }, + { + "$id": "5696", + "parameter": { + "$ref": "5683" + }, + "value": { + "$id": "5697", + "kind": "string", + "type": { + "$ref": "5684" + }, + "value": "resourceGroup1" + } + }, + { + "$id": "5698", + "parameter": { + "$ref": "5681" + }, + "value": { + "$id": "5699", + "kind": "string", + "type": { + "$ref": "5682" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "5700", + "response": { + "$ref": "5690" + }, + "statusCode": 200, + "bodyValue": { + "$id": "5701", + "kind": "model", + "type": { + "$ref": "1732" + }, + "value": { + "$id": "5702", + "baseResourceStatus": { + "$id": "5703", + "kind": "array", + "type": { + "$ref": "1734" + }, + "value": [ + { + "$id": "5704", + "kind": "model", + "type": { + "$ref": "1735" + }, + "value": { + "$id": "5705", + "isZoneResilient": { + "$id": "5706", + "kind": "boolean", + "type": { + "$ref": "1746" + }, + "value": false + }, + "resourceName": { + "$id": "5707", + "kind": "string", + "type": { + "$ref": "1737" + }, + "value": "mycluster1storage" + }, + "resourceType": { + "$id": "5708", + "kind": "string", + "type": { + "$ref": "1741" + }, + "value": "Microsoft.Storage/storageaccounts" + } + } + }, + { + "$id": "5709", + "kind": "model", + "type": { + "$ref": "1735" + }, + "value": { + "$id": "5710", + "isZoneResilient": { + "$id": "5711", + "kind": "boolean", + "type": { + "$ref": "1746" + }, + "value": true + }, + "resourceName": { + "$id": "5712", + "kind": "string", + "type": { + "$ref": "1737" + }, + "value": "PublicIP-mycluster1" + }, + "resourceType": { + "$id": "5713", + "kind": "string", + "type": { + "$ref": "1741" + }, + "value": "Microsoft.Network/publicIPAddress" + } + } + }, + { + "$id": "5714", + "kind": "model", + "type": { + "$ref": "1735" + }, + "value": { + "$id": "5715", + "isZoneResilient": { + "$id": "5716", + "kind": "boolean", + "type": { + "$ref": "1746" + }, + "value": false + }, + "resourceName": { + "$id": "5717", + "kind": "string", + "type": { + "$ref": "1737" + }, + "value": "Primary" + }, + "resourceType": { + "$id": "5718", + "kind": "string", + "type": { + "$ref": "1741" + }, + "value": "Microsoft.Compute/virtualmachinescalesets" + }, + "details": { + "$id": "5719", + "kind": "string", + "type": { + "$ref": "1750" + }, + "value": "Status: InProgress, ZonalNodes: 3, RegionalNodes: 3" + } + } + } + ] + }, + "isClusterZoneResilient": { + "$id": "5720", + "kind": "boolean", + "type": { + "$ref": "1756" + }, + "value": false + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "5721", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "5722", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5723", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "5724", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5725", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "5688" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "5726", + "type": { + "$ref": "1732" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedAzResiliencyStatus.get" + } + ], + "parameters": [ + { + "$id": "5727", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "5728", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "location": "Uri", + "isApiVersion": false, + "isContentType": false, + "isRequired": true, + "isEndpoint": true, + "skipUrlEncoding": false, + "explode": false, + "kind": "Client", + "defaultValue": { + "$id": "5729", + "type": { + "$id": "5730", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "5731", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "5732" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedAzResiliencyStatus", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "parent": { + "$ref": "2378" + } + }, + { + "$id": "5733", + "kind": "client", + "name": "ManagedApplyMaintenanceWindow", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "methods": [ + { + "$id": "5734", + "kind": "basic", + "name": "post", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Action to Apply Maintenance window on the Service Fabric Managed Clusters, right now. Any pending update will be applied.", + "operation": { + "$id": "5735", + "name": "post", + "resourceName": "ManagedApplyMaintenanceWindow", + "doc": "Action to Apply Maintenance window on the Service Fabric Managed Clusters, right now. Any pending update will be applied.", + "accessibility": "public", + "parameters": [ + { + "$id": "5736", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "5737", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "5738", + "type": { + "$id": "5739", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5740", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "5741", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5742", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "5743", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5744", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "5745", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5746", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "5747", + "kind": "constant", + "valueType": { + "$id": "5748", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "5749", + "statusCodes": [ + 200 + ], + "headers": [], + "isErrorResponse": false + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applyMaintenanceWindow", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedApplyMaintenanceWindow.post", + "decorators": [], + "examples": [ + { + "$id": "5750", + "kind": "http", + "name": "Apply Maintenance Window Status", + "description": "Apply Maintenance Window Status", + "filePath": "2025-03-01-preview/ManagedApplyMaintenanceWindowPost_example.json", + "parameters": [ + { + "$id": "5751", + "parameter": { + "$ref": "5736" + }, + "value": { + "$id": "5752", + "kind": "string", + "type": { + "$ref": "5737" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "5753", + "parameter": { + "$ref": "5744" + }, + "value": { + "$id": "5754", + "kind": "string", + "type": { + "$ref": "5745" + }, + "value": "mycluster1" + } + }, + { + "$id": "5755", + "parameter": { + "$ref": "5742" + }, + "value": { + "$id": "5756", + "kind": "string", + "type": { + "$ref": "5743" + }, + "value": "resourceGroup1" + } + }, + { + "$id": "5757", + "parameter": { + "$ref": "5740" + }, + "value": { + "$id": "5758", + "kind": "string", + "type": { + "$ref": "5741" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "5759", + "response": { + "$ref": "5749" + }, + "statusCode": 200 + } + ] + } + ] + }, + "parameters": [ + { + "$id": "5760", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "5761", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5762", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "5763", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5764", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "5747" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "5765" + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedApplyMaintenanceWindow.post" + } + ], + "parameters": [ + { + "$id": "5766", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "5767", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "location": "Uri", + "isApiVersion": false, + "isContentType": false, + "isRequired": true, + "isEndpoint": true, + "skipUrlEncoding": false, + "explode": false, + "kind": "Client", + "defaultValue": { + "$id": "5768", + "type": { + "$id": "5769", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "5770", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "5771" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedApplyMaintenanceWindow", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "parent": { + "$ref": "2378" + } + }, + { + "$id": "5772", + "kind": "client", + "name": "ManagedMaintenanceWindowStatus", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "methods": [ + { + "$id": "5773", + "kind": "basic", + "name": "get", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Action to get Maintenance Window Status of the Service Fabric Managed Clusters.", + "operation": { + "$id": "5774", + "name": "get", + "resourceName": "ManagedMaintenanceWindowStatus", + "doc": "Action to get Maintenance Window Status of the Service Fabric Managed Clusters.", + "accessibility": "public", + "parameters": [ + { + "$id": "5775", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "5776", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "5777", + "type": { + "$id": "5778", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5779", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "5780", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5781", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "5782", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5783", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "5784", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5785", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "5786", + "kind": "constant", + "valueType": { + "$id": "5787", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "5788", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1759" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/getMaintenanceWindowStatus", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedMaintenanceWindowStatus.get", + "decorators": [], + "examples": [ + { + "$id": "5789", + "kind": "http", + "name": "Get Maintenance Window Status", + "description": "Get Maintenance Window Status", + "filePath": "2025-03-01-preview/ManagedMaintenanceWindowStatusGet_example.json", + "parameters": [ + { + "$id": "5790", + "parameter": { + "$ref": "5775" + }, + "value": { + "$id": "5791", + "kind": "string", + "type": { + "$ref": "5776" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "5792", + "parameter": { + "$ref": "5783" + }, + "value": { + "$id": "5793", + "kind": "string", + "type": { + "$ref": "5784" + }, + "value": "mycluster1" + } + }, + { + "$id": "5794", + "parameter": { + "$ref": "5781" + }, + "value": { + "$id": "5795", + "kind": "string", + "type": { + "$ref": "5782" + }, + "value": "resourceGroup1" + } + }, + { + "$id": "5796", + "parameter": { + "$ref": "5779" + }, + "value": { + "$id": "5797", + "kind": "string", + "type": { + "$ref": "5780" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "5798", + "response": { + "$ref": "5788" + }, + "statusCode": 200, + "bodyValue": { + "$id": "5799", + "kind": "model", + "type": { + "$ref": "1759" + }, + "value": { + "$id": "5800", + "canApplyUpdates": { + "$id": "5801", + "kind": "boolean", + "type": { + "$ref": "1773" + }, + "value": true + }, + "isRegionReady": { + "$id": "5802", + "kind": "boolean", + "type": { + "$ref": "1765" + }, + "value": true + }, + "isWindowActive": { + "$id": "5803", + "kind": "boolean", + "type": { + "$ref": "1769" + }, + "value": true + }, + "isWindowEnabled": { + "$id": "5804", + "kind": "boolean", + "type": { + "$ref": "1761" + }, + "value": false + }, + "lastWindowEndTimeUTC": { + "$id": "5805", + "kind": "string", + "type": { + "$ref": "1787" + }, + "value": "2023-04-30T00:00:00" + }, + "lastWindowStartTimeUTC": { + "$id": "5806", + "kind": "string", + "type": { + "$ref": "1782" + }, + "value": "2023-04-30T00:00:00" + }, + "lastWindowStatusUpdateAtUTC": { + "$id": "5807", + "kind": "string", + "type": { + "$ref": "1777" + }, + "value": "2023-04-30T00:00:00" + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "5808", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "5809", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5810", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "5811", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5812", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "5786" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "5813", + "type": { + "$ref": "1759" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedMaintenanceWindowStatus.get" + } + ], + "parameters": [ + { + "$id": "5814", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "5815", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "location": "Uri", + "isApiVersion": false, + "isContentType": false, + "isRequired": true, + "isEndpoint": true, + "skipUrlEncoding": false, + "explode": false, + "kind": "Client", + "defaultValue": { + "$id": "5816", + "type": { + "$id": "5817", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "5818", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "5819" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.ManagedMaintenanceWindowStatus", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "parent": { + "$ref": "2378" + } + }, + { + "$id": "5820", + "kind": "client", + "name": "NodeTypes", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "methods": [ + { + "$id": "5821", + "kind": "basic", + "name": "get", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Get a Service Fabric node type of a given managed cluster.", + "operation": { + "$id": "5822", + "name": "get", + "resourceName": "NodeType", + "doc": "Get a Service Fabric node type of a given managed cluster.", + "accessibility": "public", + "parameters": [ + { + "$id": "5823", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "5824", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "5825", + "type": { + "$id": "5826", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5827", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "5828", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5829", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "5830", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5831", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "5832", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5833", + "name": "nodeTypeName", + "nameInRequest": "nodeTypeName", + "doc": "The name of the node type.", + "type": { + "$id": "5834", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5835", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "5836", + "kind": "constant", + "valueType": { + "$id": "5837", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "5838", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1791" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypes.get", + "decorators": [], + "examples": [ + { + "$id": "5839", + "kind": "http", + "name": "Get a node type", + "description": "Get a node type", + "filePath": "2025-03-01-preview/NodeTypeGetOperation_example.json", + "parameters": [ + { + "$id": "5840", + "parameter": { + "$ref": "5823" + }, + "value": { + "$id": "5841", + "kind": "string", + "type": { + "$ref": "5824" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "5842", + "parameter": { + "$ref": "5831" + }, + "value": { + "$id": "5843", + "kind": "string", + "type": { + "$ref": "5832" + }, + "value": "myCluster" + } + }, + { + "$id": "5844", + "parameter": { + "$ref": "5833" + }, + "value": { + "$id": "5845", + "kind": "string", + "type": { + "$ref": "5834" + }, + "value": "FE" + } + }, + { + "$id": "5846", + "parameter": { + "$ref": "5829" + }, + "value": { + "$id": "5847", + "kind": "string", + "type": { + "$ref": "5830" + }, + "value": "resRg" + } + }, + { + "$id": "5848", + "parameter": { + "$ref": "5827" + }, + "value": { + "$id": "5849", + "kind": "string", + "type": { + "$ref": "5828" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "5850", + "response": { + "$ref": "5838" + }, + "statusCode": 200, + "bodyValue": { + "$id": "5851", + "kind": "model", + "type": { + "$ref": "1791" + }, + "value": { + "$id": "5852", + "name": { + "$id": "5853", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "FE" + }, + "type": { + "$id": "5854", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/nodeTypes" + }, + "id": { + "$id": "5855", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster/nodeTypes/FE" + }, + "properties": { + "$id": "5856", + "kind": "model", + "type": { + "$ref": "1793" + }, + "value": { + "$id": "5857", + "capacities": { + "$id": "5858", + "kind": "dict", + "type": { + "$ref": "1820" + }, + "value": { + "$id": "5859" + } + }, + "dataDiskSizeGB": { + "$id": "5860", + "kind": "number", + "type": { + "$ref": "1803" + }, + "value": 100 + }, + "dataDiskType": { + "$id": "5861", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "StandardSSD_LRS" + }, + "isPrimary": { + "$id": "5862", + "kind": "boolean", + "type": { + "$ref": "1795" + }, + "value": true + }, + "isStateless": { + "$id": "5863", + "kind": "boolean", + "type": { + "$ref": "1954" + }, + "value": false + }, + "placementProperties": { + "$id": "5864", + "kind": "dict", + "type": { + "$ref": "1814" + }, + "value": { + "$id": "5865" + } + }, + "vmImageOffer": { + "$id": "5866", + "kind": "string", + "type": { + "$ref": "1849" + }, + "value": "WindowsServer" + }, + "vmImagePublisher": { + "$id": "5867", + "kind": "string", + "type": { + "$ref": "1845" + }, + "value": "MicrosoftWindowsServer" + }, + "vmImageSku": { + "$id": "5868", + "kind": "string", + "type": { + "$ref": "1853" + }, + "value": "2016-Datacenter" + }, + "vmImageVersion": { + "$id": "5869", + "kind": "string", + "type": { + "$ref": "1857" + }, + "value": "latest" + }, + "vmInstanceCount": { + "$id": "5870", + "kind": "number", + "type": { + "$ref": "1799" + }, + "value": 5 + }, + "vmSecrets": { + "$id": "5871", + "kind": "array", + "type": { + "$ref": "1861" + }, + "value": [ + { + "$id": "5872", + "kind": "model", + "type": { + "$ref": "1862" + }, + "value": { + "$id": "5873", + "sourceVault": { + "$id": "5874", + "kind": "model", + "type": { + "$ref": "1864" + }, + "value": { + "$id": "5875", + "id": { + "$id": "5876", + "kind": "string", + "type": { + "$ref": "1866" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.KeyVault/vaults/myVault" + } + } + }, + "vaultCertificates": { + "$id": "5877", + "kind": "array", + "type": { + "$ref": "1872" + }, + "value": [ + { + "$id": "5878", + "kind": "model", + "type": { + "$ref": "1873" + }, + "value": { + "$id": "5879", + "certificateStore": { + "$id": "5880", + "kind": "string", + "type": { + "$ref": "1879" + }, + "value": "My" + }, + "certificateUrl": { + "$id": "5881", + "kind": "string", + "type": { + "$ref": "1875" + }, + "value": "https://myVault.vault.azure.net:443/secrets/myCert/ef1a31d39e1f46bca33def54b6cda54c" + } + } + } + ] + } + } + } + ] + }, + "vmSize": { + "$id": "5882", + "kind": "string", + "type": { + "$ref": "1841" + }, + "value": "Standard_D2" + } + } + }, + "tags": { + "$id": "5883", + "kind": "dict", + "type": { + "$ref": "2242" + }, + "value": { + "$id": "5884" + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "5885", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "5886", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5887", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "5888", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5889", + "name": "nodeTypeName", + "nameInRequest": "nodeTypeName", + "doc": "The name of the node type.", + "type": { + "$id": "5890", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5891", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "5836" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "5892", + "type": { + "$ref": "1791" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypes.get" + }, + { + "$id": "5893", + "kind": "lro", + "name": "createOrUpdate", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Create or update a Service Fabric node type of a given managed cluster.", + "operation": { + "$id": "5894", + "name": "createOrUpdate", + "resourceName": "NodeType", + "doc": "Create or update a Service Fabric node type of a given managed cluster.", + "accessibility": "public", + "parameters": [ + { + "$id": "5895", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "5896", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "5897", + "type": { + "$id": "5898", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5899", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "5900", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5901", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "5902", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5903", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "5904", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5905", + "name": "nodeTypeName", + "nameInRequest": "nodeTypeName", + "doc": "The name of the node type.", + "type": { + "$id": "5906", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5907", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "5908", + "kind": "constant", + "valueType": { + "$id": "5909", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5910", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "5911", + "kind": "constant", + "valueType": { + "$id": "5912", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "5913", + "name": "parameters", + "nameInRequest": "parameters", + "doc": "The node type resource.", + "type": { + "$ref": "1791" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "5914", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1791" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + { + "$id": "5915", + "statusCodes": [ + 202 + ], + "bodyType": { + "$ref": "1791" + }, + "headers": [ + { + "$id": "5916", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "5917", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "5918", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + } + }, + { + "$id": "5919", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "5920", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "PUT", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "longRunning": { + "$id": "5921", + "finalStateVia": 1, + "finalResponse": { + "$id": "5922", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1791" + } + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypes.createOrUpdate", + "decorators": [], + "examples": [ + { + "$id": "5923", + "kind": "http", + "name": "Put a node type with auto-scale parameters", + "description": "Put a node type with auto-scale parameters", + "filePath": "2025-03-01-preview/NodeTypePutOperationAutoScale_example.json", + "parameters": [ + { + "$id": "5924", + "parameter": { + "$ref": "5895" + }, + "value": { + "$id": "5925", + "kind": "string", + "type": { + "$ref": "5896" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "5926", + "parameter": { + "$ref": "5903" + }, + "value": { + "$id": "5927", + "kind": "string", + "type": { + "$ref": "5904" + }, + "value": "myCluster" + } + }, + { + "$id": "5928", + "parameter": { + "$ref": "5905" + }, + "value": { + "$id": "5929", + "kind": "string", + "type": { + "$ref": "5906" + }, + "value": "BE" + } + }, + { + "$id": "5930", + "parameter": { + "$ref": "5901" + }, + "value": { + "$id": "5931", + "kind": "string", + "type": { + "$ref": "5902" + }, + "value": "resRg" + } + }, + { + "$id": "5932", + "parameter": { + "$ref": "5899" + }, + "value": { + "$id": "5933", + "kind": "string", + "type": { + "$ref": "5900" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "5934", + "response": { + "$ref": "5914" + }, + "statusCode": 200, + "bodyValue": { + "$id": "5935", + "kind": "model", + "type": { + "$ref": "1791" + }, + "value": { + "$id": "5936", + "name": { + "$id": "5937", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "BE" + }, + "type": { + "$id": "5938", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/nodeTypes" + }, + "id": { + "$id": "5939", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster/nodeTypes/BE" + }, + "properties": { + "$id": "5940", + "kind": "model", + "type": { + "$ref": "1793" + }, + "value": { + "$id": "5941", + "capacities": { + "$id": "5942", + "kind": "dict", + "type": { + "$ref": "1820" + }, + "value": { + "$id": "5943", + "ClientConnections": { + "$id": "5944", + "kind": "string", + "type": { + "$ref": "1822" + }, + "value": "65536" + } + } + }, + "dataDiskSizeGB": { + "$id": "5945", + "kind": "number", + "type": { + "$ref": "1803" + }, + "value": 200 + }, + "dataDiskType": { + "$id": "5946", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "Premium_LRS" + }, + "isPrimary": { + "$id": "5947", + "kind": "boolean", + "type": { + "$ref": "1795" + }, + "value": false + }, + "isStateless": { + "$id": "5948", + "kind": "boolean", + "type": { + "$ref": "1954" + }, + "value": true + }, + "multiplePlacementGroups": { + "$id": "5949", + "kind": "boolean", + "type": { + "$ref": "1958" + }, + "value": true + }, + "placementProperties": { + "$id": "5950", + "kind": "dict", + "type": { + "$ref": "1814" + }, + "value": { + "$id": "5951", + "HasSSD": { + "$id": "5952", + "kind": "string", + "type": { + "$ref": "1816" + }, + "value": "true" + }, + "NodeColor": { + "$id": "5953", + "kind": "string", + "type": { + "$ref": "1816" + }, + "value": "green" + }, + "SomeProperty": { + "$id": "5954", + "kind": "string", + "type": { + "$ref": "1816" + }, + "value": "5" + } + } + }, + "provisioningState": { + "$id": "5955", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Creating" + }, + "vmExtensions": { + "$id": "5956", + "kind": "array", + "type": { + "$ref": "1887" + }, + "value": [ + { + "$id": "5957", + "kind": "model", + "type": { + "$ref": "1888" + }, + "value": { + "$id": "5958", + "name": { + "$id": "5959", + "kind": "string", + "type": { + "$ref": "1890" + }, + "value": "Microsoft.Azure.Geneva.GenevaMonitoring" + }, + "properties": { + "$id": "5960", + "kind": "model", + "type": { + "$ref": "1894" + }, + "value": { + "$id": "5961", + "type": { + "$id": "5962", + "kind": "string", + "type": { + "$ref": "1900" + }, + "value": "GenevaMonitoring" + }, + "autoUpgradeMinorVersion": { + "$id": "5963", + "kind": "boolean", + "type": { + "$ref": "1908" + }, + "value": true + }, + "forceUpdateTag": { + "$id": "5964", + "kind": "string", + "type": { + "$ref": "1920" + }, + "value": "v.1.0" + }, + "publisher": { + "$id": "5965", + "kind": "string", + "type": { + "$ref": "1896" + }, + "value": "Microsoft.Azure.Geneva" + }, + "settings": { + "$id": "5966", + "kind": "model", + "type": { + "$ref": "1912" + }, + "value": { + "$id": "5967" + } + }, + "typeHandlerVersion": { + "$id": "5968", + "kind": "string", + "type": { + "$ref": "1904" + }, + "value": "2.0" + } + } + } + } + } + ] + }, + "vmImageOffer": { + "$id": "5969", + "kind": "string", + "type": { + "$ref": "1849" + }, + "value": "WindowsServer" + }, + "vmImagePublisher": { + "$id": "5970", + "kind": "string", + "type": { + "$ref": "1845" + }, + "value": "MicrosoftWindowsServer" + }, + "vmImageSku": { + "$id": "5971", + "kind": "string", + "type": { + "$ref": "1853" + }, + "value": "2016-Datacenter-Server-Core" + }, + "vmImageVersion": { + "$id": "5972", + "kind": "string", + "type": { + "$ref": "1857" + }, + "value": "latest" + }, + "vmInstanceCount": { + "$id": "5973", + "kind": "number", + "type": { + "$ref": "1799" + }, + "value": 10 + }, + "vmManagedIdentity": { + "$id": "5974", + "kind": "model", + "type": { + "$ref": "1945" + }, + "value": { + "$id": "5975", + "userAssignedIdentities": { + "$id": "5976", + "kind": "array", + "type": { + "$ref": "1947" + }, + "value": [ + { + "$id": "5977", + "kind": "string", + "type": { + "$ref": "1948" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity" + }, + { + "$id": "5978", + "kind": "string", + "type": { + "$ref": "1948" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity2" + } + ] + } + } + }, + "vmSecrets": { + "$id": "5979", + "kind": "array", + "type": { + "$ref": "1861" + }, + "value": [ + { + "$id": "5980", + "kind": "model", + "type": { + "$ref": "1862" + }, + "value": { + "$id": "5981", + "sourceVault": { + "$id": "5982", + "kind": "model", + "type": { + "$ref": "1864" + }, + "value": { + "$id": "5983", + "id": { + "$id": "5984", + "kind": "string", + "type": { + "$ref": "1866" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.KeyVault/vaults/myVault" + } + } + }, + "vaultCertificates": { + "$id": "5985", + "kind": "array", + "type": { + "$ref": "1872" + }, + "value": [ + { + "$id": "5986", + "kind": "model", + "type": { + "$ref": "1873" + }, + "value": { + "$id": "5987", + "certificateStore": { + "$id": "5988", + "kind": "string", + "type": { + "$ref": "1879" + }, + "value": "My" + }, + "certificateUrl": { + "$id": "5989", + "kind": "string", + "type": { + "$ref": "1875" + }, + "value": "https://myVault.vault.azure.net:443/secrets/myCert/ef1a31d39e1f46bca33def54b6cda54c" + } + } + } + ] + } + } + } + ] + }, + "vmSize": { + "$id": "5990", + "kind": "string", + "type": { + "$ref": "1841" + }, + "value": "Standard_DS3" + } + } + }, + "sku": { + "$id": "5991", + "kind": "model", + "type": { + "$ref": "2248" + }, + "value": { + "$id": "5992", + "name": { + "$id": "5993", + "kind": "string", + "type": { + "$ref": "2250" + }, + "value": "Standard_S2" + }, + "capacity": { + "$id": "5994", + "kind": "number", + "type": { + "$ref": "2258" + }, + "value": 10 + }, + "tier": { + "$id": "5995", + "kind": "string", + "type": { + "$ref": "2254" + }, + "value": "Standard" + } + } + }, + "tags": { + "$id": "5996", + "kind": "dict", + "type": { + "$ref": "2242" + }, + "value": { + "$id": "5997" + } + } + } + } + }, + { + "$id": "5998", + "response": { + "$ref": "5915" + }, + "statusCode": 202, + "bodyValue": { + "$id": "5999", + "kind": "model", + "type": { + "$ref": "1791" + }, + "value": { + "$id": "6000", + "name": { + "$id": "6001", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "BE" + }, + "type": { + "$id": "6002", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/nodeTypes" + }, + "id": { + "$id": "6003", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster/nodeTypes/BE" + }, + "properties": { + "$id": "6004", + "kind": "model", + "type": { + "$ref": "1793" + }, + "value": { + "$id": "6005", + "capacities": { + "$id": "6006", + "kind": "dict", + "type": { + "$ref": "1820" + }, + "value": { + "$id": "6007", + "ClientConnections": { + "$id": "6008", + "kind": "string", + "type": { + "$ref": "1822" + }, + "value": "65536" + } + } + }, + "dataDiskSizeGB": { + "$id": "6009", + "kind": "number", + "type": { + "$ref": "1803" + }, + "value": 200 + }, + "dataDiskType": { + "$id": "6010", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "Premium_LRS" + }, + "isPrimary": { + "$id": "6011", + "kind": "boolean", + "type": { + "$ref": "1795" + }, + "value": false + }, + "isStateless": { + "$id": "6012", + "kind": "boolean", + "type": { + "$ref": "1954" + }, + "value": true + }, + "multiplePlacementGroups": { + "$id": "6013", + "kind": "boolean", + "type": { + "$ref": "1958" + }, + "value": true + }, + "placementProperties": { + "$id": "6014", + "kind": "dict", + "type": { + "$ref": "1814" + }, + "value": { + "$id": "6015", + "HasSSD": { + "$id": "6016", + "kind": "string", + "type": { + "$ref": "1816" + }, + "value": "true" + }, + "NodeColor": { + "$id": "6017", + "kind": "string", + "type": { + "$ref": "1816" + }, + "value": "green" + }, + "SomeProperty": { + "$id": "6018", + "kind": "string", + "type": { + "$ref": "1816" + }, + "value": "5" + } + } + }, + "provisioningState": { + "$id": "6019", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Updating" + }, + "vmExtensions": { + "$id": "6020", + "kind": "array", + "type": { + "$ref": "1887" + }, + "value": [ + { + "$id": "6021", + "kind": "model", + "type": { + "$ref": "1888" + }, + "value": { + "$id": "6022", + "name": { + "$id": "6023", + "kind": "string", + "type": { + "$ref": "1890" + }, + "value": "Microsoft.Azure.Geneva.GenevaMonitoring" + }, + "properties": { + "$id": "6024", + "kind": "model", + "type": { + "$ref": "1894" + }, + "value": { + "$id": "6025", + "type": { + "$id": "6026", + "kind": "string", + "type": { + "$ref": "1900" + }, + "value": "GenevaMonitoring" + }, + "autoUpgradeMinorVersion": { + "$id": "6027", + "kind": "boolean", + "type": { + "$ref": "1908" + }, + "value": true + }, + "forceUpdateTag": { + "$id": "6028", + "kind": "string", + "type": { + "$ref": "1920" + }, + "value": "v.1.0" + }, + "publisher": { + "$id": "6029", + "kind": "string", + "type": { + "$ref": "1896" + }, + "value": "Microsoft.Azure.Geneva" + }, + "settings": { + "$id": "6030", + "kind": "model", + "type": { + "$ref": "1912" + }, + "value": { + "$id": "6031" + } + }, + "typeHandlerVersion": { + "$id": "6032", + "kind": "string", + "type": { + "$ref": "1904" + }, + "value": "2.0" + } + } + } + } + } + ] + }, + "vmImageOffer": { + "$id": "6033", + "kind": "string", + "type": { + "$ref": "1849" + }, + "value": "WindowsServer" + }, + "vmImagePublisher": { + "$id": "6034", + "kind": "string", + "type": { + "$ref": "1845" + }, + "value": "MicrosoftWindowsServer" + }, + "vmImageSku": { + "$id": "6035", + "kind": "string", + "type": { + "$ref": "1853" + }, + "value": "2016-Datacenter-Server-Core" + }, + "vmImageVersion": { + "$id": "6036", + "kind": "string", + "type": { + "$ref": "1857" + }, + "value": "latest" + }, + "vmInstanceCount": { + "$id": "6037", + "kind": "number", + "type": { + "$ref": "1799" + }, + "value": 10 + }, + "vmSecrets": { + "$id": "6038", + "kind": "array", + "type": { + "$ref": "1861" + }, + "value": [ + { + "$id": "6039", + "kind": "model", + "type": { + "$ref": "1862" + }, + "value": { + "$id": "6040", + "sourceVault": { + "$id": "6041", + "kind": "model", + "type": { + "$ref": "1864" + }, + "value": { + "$id": "6042", + "id": { + "$id": "6043", + "kind": "string", + "type": { + "$ref": "1866" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.KeyVault/vaults/myVault" + } + } + }, + "vaultCertificates": { + "$id": "6044", + "kind": "array", + "type": { + "$ref": "1872" + }, + "value": [ + { + "$id": "6045", + "kind": "model", + "type": { + "$ref": "1873" + }, + "value": { + "$id": "6046", + "certificateStore": { + "$id": "6047", + "kind": "string", + "type": { + "$ref": "1879" + }, + "value": "My" + }, + "certificateUrl": { + "$id": "6048", + "kind": "string", + "type": { + "$ref": "1875" + }, + "value": "https://myVault.vault.azure.net:443/secrets/myCert/ef1a31d39e1f46bca33def54b6cda54c" + } + } + } + ] + } + } + } + ] + }, + "vmSize": { + "$id": "6049", + "kind": "string", + "type": { + "$ref": "1841" + }, + "value": "Standard_DS3" + } + } + }, + "sku": { + "$id": "6050", + "kind": "model", + "type": { + "$ref": "2248" + }, + "value": { + "$id": "6051", + "name": { + "$id": "6052", + "kind": "string", + "type": { + "$ref": "2250" + }, + "value": "Standard_S2" + }, + "capacity": { + "$id": "6053", + "kind": "number", + "type": { + "$ref": "2258" + }, + "value": 10 + }, + "tier": { + "$id": "6054", + "kind": "string", + "type": { + "$ref": "2254" + }, + "value": "Standard" + } + } + }, + "tags": { + "$id": "6055", + "kind": "dict", + "type": { + "$ref": "2242" + }, + "value": { + "$id": "6056" + } + } + } + } + } + ] + }, + { + "$id": "6057", + "kind": "http", + "name": "Put node type with custom vm image", + "description": "Put node type with custom vm image", + "filePath": "2025-03-01-preview/NodeTypePutOperationCustomImage_example.json", + "parameters": [ + { + "$id": "6058", + "parameter": { + "$ref": "5895" + }, + "value": { + "$id": "6059", + "kind": "string", + "type": { + "$ref": "5896" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "6060", + "parameter": { + "$ref": "5903" + }, + "value": { + "$id": "6061", + "kind": "string", + "type": { + "$ref": "5904" + }, + "value": "myCluster" + } + }, + { + "$id": "6062", + "parameter": { + "$ref": "5905" + }, + "value": { + "$id": "6063", + "kind": "string", + "type": { + "$ref": "5906" + }, + "value": "BE" + } + }, + { + "$id": "6064", + "parameter": { + "$ref": "5901" + }, + "value": { + "$id": "6065", + "kind": "string", + "type": { + "$ref": "5902" + }, + "value": "resRg" + } + }, + { + "$id": "6066", + "parameter": { + "$ref": "5899" + }, + "value": { + "$id": "6067", + "kind": "string", + "type": { + "$ref": "5900" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "6068", + "response": { + "$ref": "5914" + }, + "statusCode": 200, + "bodyValue": { + "$id": "6069", + "kind": "model", + "type": { + "$ref": "1791" + }, + "value": { + "$id": "6070", + "name": { + "$id": "6071", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "BE" + }, + "type": { + "$id": "6072", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/nodeTypes" + }, + "id": { + "$id": "6073", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster/nodeTypes/BE" + }, + "properties": { + "$id": "6074", + "kind": "model", + "type": { + "$ref": "1793" + }, + "value": { + "$id": "6075", + "capacities": { + "$id": "6076", + "kind": "dict", + "type": { + "$ref": "1820" + }, + "value": { + "$id": "6077" + } + }, + "dataDiskSizeGB": { + "$id": "6078", + "kind": "number", + "type": { + "$ref": "1803" + }, + "value": 200 + }, + "dataDiskType": { + "$id": "6079", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "StandardSSD_LRS" + }, + "isPrimary": { + "$id": "6080", + "kind": "boolean", + "type": { + "$ref": "1795" + }, + "value": false + }, + "isStateless": { + "$id": "6081", + "kind": "boolean", + "type": { + "$ref": "1954" + }, + "value": false + }, + "placementProperties": { + "$id": "6082", + "kind": "dict", + "type": { + "$ref": "1814" + }, + "value": { + "$id": "6083" + } + }, + "provisioningState": { + "$id": "6084", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Creating" + }, + "vmImageResourceId": { + "$id": "6085", + "kind": "string", + "type": { + "$ref": "2056" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-custom-image/providers/Microsoft.Compute/galleries/myCustomImages/images/Win2019DC" + }, + "vmInstanceCount": { + "$id": "6086", + "kind": "number", + "type": { + "$ref": "1799" + }, + "value": 10 + }, + "vmSize": { + "$id": "6087", + "kind": "string", + "type": { + "$ref": "1841" + }, + "value": "Standard_D3" + } + } + }, + "tags": { + "$id": "6088", + "kind": "dict", + "type": { + "$ref": "2242" + }, + "value": { + "$id": "6089" + } + } + } + } + }, + { + "$id": "6090", + "response": { + "$ref": "5915" + }, + "statusCode": 202, + "bodyValue": { + "$id": "6091", + "kind": "model", + "type": { + "$ref": "1791" + }, + "value": { + "$id": "6092", + "name": { + "$id": "6093", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "BE" + }, + "type": { + "$id": "6094", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/nodeTypes" + }, + "id": { + "$id": "6095", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster/nodeTypes/BE" + }, + "properties": { + "$id": "6096", + "kind": "model", + "type": { + "$ref": "1793" + }, + "value": { + "$id": "6097", + "capacities": { + "$id": "6098", + "kind": "dict", + "type": { + "$ref": "1820" + }, + "value": { + "$id": "6099" + } + }, + "dataDiskSizeGB": { + "$id": "6100", + "kind": "number", + "type": { + "$ref": "1803" + }, + "value": 200 + }, + "dataDiskType": { + "$id": "6101", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "StandardSSD_LRS" + }, + "isPrimary": { + "$id": "6102", + "kind": "boolean", + "type": { + "$ref": "1795" + }, + "value": false + }, + "isStateless": { + "$id": "6103", + "kind": "boolean", + "type": { + "$ref": "1954" + }, + "value": false + }, + "placementProperties": { + "$id": "6104", + "kind": "dict", + "type": { + "$ref": "1814" + }, + "value": { + "$id": "6105" + } + }, + "provisioningState": { + "$id": "6106", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Updating" + }, + "vmImageResourceId": { + "$id": "6107", + "kind": "string", + "type": { + "$ref": "2056" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-custom-image/providers/Microsoft.Compute/galleries/myCustomImages/images/Win2019DC" + }, + "vmInstanceCount": { + "$id": "6108", + "kind": "number", + "type": { + "$ref": "1799" + }, + "value": 10 + }, + "vmSize": { + "$id": "6109", + "kind": "string", + "type": { + "$ref": "1841" + }, + "value": "Standard_D3" + } + } + }, + "tags": { + "$id": "6110", + "kind": "dict", + "type": { + "$ref": "2242" + }, + "value": { + "$id": "6111" + } + } + } + } + } + ] + }, + { + "$id": "6112", + "kind": "http", + "name": "Put node type with shared galleries custom vm image", + "description": "Put node type with shared galleries custom vm image", + "filePath": "2025-03-01-preview/NodeTypePutOperationCustomSharedGalleriesImage_example.json", + "parameters": [ + { + "$id": "6113", + "parameter": { + "$ref": "5895" + }, + "value": { + "$id": "6114", + "kind": "string", + "type": { + "$ref": "5896" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "6115", + "parameter": { + "$ref": "5903" + }, + "value": { + "$id": "6116", + "kind": "string", + "type": { + "$ref": "5904" + }, + "value": "myCluster" + } + }, + { + "$id": "6117", + "parameter": { + "$ref": "5905" + }, + "value": { + "$id": "6118", + "kind": "string", + "type": { + "$ref": "5906" + }, + "value": "BE" + } + }, + { + "$id": "6119", + "parameter": { + "$ref": "5901" + }, + "value": { + "$id": "6120", + "kind": "string", + "type": { + "$ref": "5902" + }, + "value": "resRg" + } + }, + { + "$id": "6121", + "parameter": { + "$ref": "5899" + }, + "value": { + "$id": "6122", + "kind": "string", + "type": { + "$ref": "5900" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "6123", + "response": { + "$ref": "5914" + }, + "statusCode": 200, + "bodyValue": { + "$id": "6124", + "kind": "model", + "type": { + "$ref": "1791" + }, + "value": { + "$id": "6125", + "name": { + "$id": "6126", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "BE" + }, + "type": { + "$id": "6127", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/nodeTypes" + }, + "id": { + "$id": "6128", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster/nodeTypes/BE" + }, + "properties": { + "$id": "6129", + "kind": "model", + "type": { + "$ref": "1793" + }, + "value": { + "$id": "6130", + "capacities": { + "$id": "6131", + "kind": "dict", + "type": { + "$ref": "1820" + }, + "value": { + "$id": "6132" + } + }, + "dataDiskSizeGB": { + "$id": "6133", + "kind": "number", + "type": { + "$ref": "1803" + }, + "value": 200 + }, + "dataDiskType": { + "$id": "6134", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "StandardSSD_LRS" + }, + "isPrimary": { + "$id": "6135", + "kind": "boolean", + "type": { + "$ref": "1795" + }, + "value": false + }, + "isStateless": { + "$id": "6136", + "kind": "boolean", + "type": { + "$ref": "1954" + }, + "value": false + }, + "placementProperties": { + "$id": "6137", + "kind": "dict", + "type": { + "$ref": "1814" + }, + "value": { + "$id": "6138" + } + }, + "provisioningState": { + "$id": "6139", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Creating" + }, + "vmInstanceCount": { + "$id": "6140", + "kind": "number", + "type": { + "$ref": "1799" + }, + "value": 10 + }, + "vmSharedGalleryImageId": { + "$id": "6141", + "kind": "string", + "type": { + "$ref": "2085" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-custom-image/providers/Microsoft.Compute/sharedGalleries/35349201-a0b3-405e-8a23-9f1450984307-SFSHAREDGALLERY/images/TestNoProdContainerDImage/versions/latest" + }, + "vmSize": { + "$id": "6142", + "kind": "string", + "type": { + "$ref": "1841" + }, + "value": "Standard_D3" + } + } + }, + "tags": { + "$id": "6143", + "kind": "dict", + "type": { + "$ref": "2242" + }, + "value": { + "$id": "6144" + } + } + } + } + }, + { + "$id": "6145", + "response": { + "$ref": "5915" + }, + "statusCode": 202, + "bodyValue": { + "$id": "6146", + "kind": "model", + "type": { + "$ref": "1791" + }, + "value": { + "$id": "6147", + "name": { + "$id": "6148", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "BE" + }, + "type": { + "$id": "6149", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/nodeTypes" + }, + "id": { + "$id": "6150", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster/nodeTypes/BE" + }, + "properties": { + "$id": "6151", + "kind": "model", + "type": { + "$ref": "1793" + }, + "value": { + "$id": "6152", + "capacities": { + "$id": "6153", + "kind": "dict", + "type": { + "$ref": "1820" + }, + "value": { + "$id": "6154" + } + }, + "dataDiskSizeGB": { + "$id": "6155", + "kind": "number", + "type": { + "$ref": "1803" + }, + "value": 200 + }, + "dataDiskType": { + "$id": "6156", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "StandardSSD_LRS" + }, + "isPrimary": { + "$id": "6157", + "kind": "boolean", + "type": { + "$ref": "1795" + }, + "value": false + }, + "isStateless": { + "$id": "6158", + "kind": "boolean", + "type": { + "$ref": "1954" + }, + "value": false + }, + "placementProperties": { + "$id": "6159", + "kind": "dict", + "type": { + "$ref": "1814" + }, + "value": { + "$id": "6160" + } + }, + "provisioningState": { + "$id": "6161", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Updating" + }, + "vmInstanceCount": { + "$id": "6162", + "kind": "number", + "type": { + "$ref": "1799" + }, + "value": 10 + }, + "vmSharedGalleryImageId": { + "$id": "6163", + "kind": "string", + "type": { + "$ref": "2085" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-custom-image/providers/Microsoft.Compute/sharedGalleries/35349201-a0b3-405e-8a23-9f1450984307-SFSHAREDGALLERY/images/TestNoProdContainerDImage/versions/latest" + }, + "vmSize": { + "$id": "6164", + "kind": "string", + "type": { + "$ref": "1841" + }, + "value": "Standard_D3" + } + } + }, + "tags": { + "$id": "6165", + "kind": "dict", + "type": { + "$ref": "2242" + }, + "value": { + "$id": "6166" + } + } + } + } + } + ] + }, + { + "$id": "6167", + "kind": "http", + "name": "Put node type with dedicated hosts", + "description": "Put node type with dedicated hosts", + "filePath": "2025-03-01-preview/NodeTypePutOperationDedicatedHost_example.json", + "parameters": [ + { + "$id": "6168", + "parameter": { + "$ref": "5895" + }, + "value": { + "$id": "6169", + "kind": "string", + "type": { + "$ref": "5896" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "6170", + "parameter": { + "$ref": "5903" + }, + "value": { + "$id": "6171", + "kind": "string", + "type": { + "$ref": "5904" + }, + "value": "myCluster" + } + }, + { + "$id": "6172", + "parameter": { + "$ref": "5905" + }, + "value": { + "$id": "6173", + "kind": "string", + "type": { + "$ref": "5906" + }, + "value": "BE" + } + }, + { + "$id": "6174", + "parameter": { + "$ref": "5901" + }, + "value": { + "$id": "6175", + "kind": "string", + "type": { + "$ref": "5902" + }, + "value": "resRg" + } + }, + { + "$id": "6176", + "parameter": { + "$ref": "5899" + }, + "value": { + "$id": "6177", + "kind": "string", + "type": { + "$ref": "5900" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "6178", + "response": { + "$ref": "5914" + }, + "statusCode": 200, + "bodyValue": { + "$id": "6179", + "kind": "model", + "type": { + "$ref": "1791" + }, + "value": { + "$id": "6180", + "name": { + "$id": "6181", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "BE" + }, + "type": { + "$id": "6182", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/nodeTypes" + }, + "id": { + "$id": "6183", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster/nodeTypes/BE" + }, + "properties": { + "$id": "6184", + "kind": "model", + "type": { + "$ref": "1793" + }, + "value": { + "$id": "6185", + "capacities": { + "$id": "6186", + "kind": "dict", + "type": { + "$ref": "1820" + }, + "value": { + "$id": "6187" + } + }, + "dataDiskSizeGB": { + "$id": "6188", + "kind": "number", + "type": { + "$ref": "1803" + }, + "value": 200 + }, + "dataDiskType": { + "$id": "6189", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "StandardSSD_LRS" + }, + "hostGroupId": { + "$id": "6190", + "kind": "string", + "type": { + "$ref": "2041" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testhostgroupRG/providers/Microsoft.Compute/hostGroups/testHostGroup" + }, + "isPrimary": { + "$id": "6191", + "kind": "boolean", + "type": { + "$ref": "1795" + }, + "value": false + }, + "isStateless": { + "$id": "6192", + "kind": "boolean", + "type": { + "$ref": "1954" + }, + "value": false + }, + "placementProperties": { + "$id": "6193", + "kind": "dict", + "type": { + "$ref": "1814" + }, + "value": { + "$id": "6194" + } + }, + "provisioningState": { + "$id": "6195", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Creating" + }, + "vmImageOffer": { + "$id": "6196", + "kind": "string", + "type": { + "$ref": "1849" + }, + "value": "WindowsServer" + }, + "vmImagePublisher": { + "$id": "6197", + "kind": "string", + "type": { + "$ref": "1845" + }, + "value": "MicrosoftWindowsServer" + }, + "vmImageSku": { + "$id": "6198", + "kind": "string", + "type": { + "$ref": "1853" + }, + "value": "2019-Datacenter" + }, + "vmImageVersion": { + "$id": "6199", + "kind": "string", + "type": { + "$ref": "1857" + }, + "value": "latest" + }, + "vmInstanceCount": { + "$id": "6200", + "kind": "number", + "type": { + "$ref": "1799" + }, + "value": 10 + }, + "vmSize": { + "$id": "6201", + "kind": "string", + "type": { + "$ref": "1841" + }, + "value": "Standard_D8s_v3" + }, + "zones": { + "$id": "6202", + "kind": "array", + "type": { + "$ref": "2032" + }, + "value": [ + { + "$id": "6203", + "kind": "string", + "type": { + "$ref": "2033" + }, + "value": "1" + } + ] + } + } + }, + "tags": { + "$id": "6204", + "kind": "dict", + "type": { + "$ref": "2242" + }, + "value": { + "$id": "6205" + } + } + } + } + }, + { + "$id": "6206", + "response": { + "$ref": "5915" + }, + "statusCode": 202, + "bodyValue": { + "$id": "6207", + "kind": "model", + "type": { + "$ref": "1791" + }, + "value": { + "$id": "6208", + "name": { + "$id": "6209", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "BE" + }, + "type": { + "$id": "6210", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/nodeTypes" + }, + "id": { + "$id": "6211", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster/nodeTypes/BE" + }, + "properties": { + "$id": "6212", + "kind": "model", + "type": { + "$ref": "1793" + }, + "value": { + "$id": "6213", + "capacities": { + "$id": "6214", + "kind": "dict", + "type": { + "$ref": "1820" + }, + "value": { + "$id": "6215" + } + }, + "dataDiskSizeGB": { + "$id": "6216", + "kind": "number", + "type": { + "$ref": "1803" + }, + "value": 200 + }, + "dataDiskType": { + "$id": "6217", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "StandardSSD_LRS" + }, + "hostGroupId": { + "$id": "6218", + "kind": "string", + "type": { + "$ref": "2041" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testhostgroupRG/providers/Microsoft.Compute/hostGroups/testHostGroup" + }, + "isPrimary": { + "$id": "6219", + "kind": "boolean", + "type": { + "$ref": "1795" + }, + "value": false + }, + "isStateless": { + "$id": "6220", + "kind": "boolean", + "type": { + "$ref": "1954" + }, + "value": false + }, + "placementProperties": { + "$id": "6221", + "kind": "dict", + "type": { + "$ref": "1814" + }, + "value": { + "$id": "6222" + } + }, + "provisioningState": { + "$id": "6223", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Updating" + }, + "vmImageOffer": { + "$id": "6224", + "kind": "string", + "type": { + "$ref": "1849" + }, + "value": "WindowsServer" + }, + "vmImagePublisher": { + "$id": "6225", + "kind": "string", + "type": { + "$ref": "1845" + }, + "value": "MicrosoftWindowsServer" + }, + "vmImageSku": { + "$id": "6226", + "kind": "string", + "type": { + "$ref": "1853" + }, + "value": "2019-Datacenter" + }, + "vmImageVersion": { + "$id": "6227", + "kind": "string", + "type": { + "$ref": "1857" + }, + "value": "latest" + }, + "vmInstanceCount": { + "$id": "6228", + "kind": "number", + "type": { + "$ref": "1799" + }, + "value": 10 + }, + "vmSize": { + "$id": "6229", + "kind": "string", + "type": { + "$ref": "1841" + }, + "value": "Standard_D8s_v3" + }, + "zones": { + "$id": "6230", + "kind": "array", + "type": { + "$ref": "2032" + }, + "value": [ + { + "$id": "6231", + "kind": "string", + "type": { + "$ref": "2033" + }, + "value": "1" + } + ] + } + } + }, + "tags": { + "$id": "6232", + "kind": "dict", + "type": { + "$ref": "2242" + }, + "value": { + "$id": "6233" + } + } + } + } + } + ] + }, + { + "$id": "6234", + "kind": "http", + "name": "Put an stateless node type with temporary disk for service fabric", + "description": "Put an stateless node type with temporary disk for service fabric", + "filePath": "2025-03-01-preview/NodeTypePutOperationStateless_example.json", + "parameters": [ + { + "$id": "6235", + "parameter": { + "$ref": "5895" + }, + "value": { + "$id": "6236", + "kind": "string", + "type": { + "$ref": "5896" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "6237", + "parameter": { + "$ref": "5903" + }, + "value": { + "$id": "6238", + "kind": "string", + "type": { + "$ref": "5904" + }, + "value": "myCluster" + } + }, + { + "$id": "6239", + "parameter": { + "$ref": "5905" + }, + "value": { + "$id": "6240", + "kind": "string", + "type": { + "$ref": "5906" + }, + "value": "BE" + } + }, + { + "$id": "6241", + "parameter": { + "$ref": "5901" + }, + "value": { + "$id": "6242", + "kind": "string", + "type": { + "$ref": "5902" + }, + "value": "resRg" + } + }, + { + "$id": "6243", + "parameter": { + "$ref": "5899" + }, + "value": { + "$id": "6244", + "kind": "string", + "type": { + "$ref": "5900" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "6245", + "response": { + "$ref": "5914" + }, + "statusCode": 200, + "bodyValue": { + "$id": "6246", + "kind": "model", + "type": { + "$ref": "1791" + }, + "value": { + "$id": "6247", + "name": { + "$id": "6248", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "BE" + }, + "type": { + "$id": "6249", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/nodeTypes" + }, + "id": { + "$id": "6250", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster/nodeTypes/BE" + }, + "properties": { + "$id": "6251", + "kind": "model", + "type": { + "$ref": "1793" + }, + "value": { + "$id": "6252", + "enableEncryptionAtHost": { + "$id": "6253", + "kind": "boolean", + "type": { + "$ref": "2009" + }, + "value": true + }, + "isPrimary": { + "$id": "6254", + "kind": "boolean", + "type": { + "$ref": "1795" + }, + "value": false + }, + "isStateless": { + "$id": "6255", + "kind": "boolean", + "type": { + "$ref": "1954" + }, + "value": true + }, + "multiplePlacementGroups": { + "$id": "6256", + "kind": "boolean", + "type": { + "$ref": "1958" + }, + "value": true + }, + "provisioningState": { + "$id": "6257", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Creating" + }, + "useTempDataDisk": { + "$id": "6258", + "kind": "boolean", + "type": { + "$ref": "2024" + }, + "value": true + }, + "vmExtensions": { + "$id": "6259", + "kind": "array", + "type": { + "$ref": "1887" + }, + "value": [ + { + "$id": "6260", + "kind": "model", + "type": { + "$ref": "1888" + }, + "value": { + "$id": "6261", + "name": { + "$id": "6262", + "kind": "string", + "type": { + "$ref": "1890" + }, + "value": "Microsoft.Azure.Geneva.GenevaMonitoring" + }, + "properties": { + "$id": "6263", + "kind": "model", + "type": { + "$ref": "1894" + }, + "value": { + "$id": "6264", + "type": { + "$id": "6265", + "kind": "string", + "type": { + "$ref": "1900" + }, + "value": "GenevaMonitoring" + }, + "autoUpgradeMinorVersion": { + "$id": "6266", + "kind": "boolean", + "type": { + "$ref": "1908" + }, + "value": true + }, + "publisher": { + "$id": "6267", + "kind": "string", + "type": { + "$ref": "1896" + }, + "value": "Microsoft.Azure.Geneva" + }, + "settings": { + "$id": "6268", + "kind": "model", + "type": { + "$ref": "1912" + }, + "value": { + "$id": "6269" + } + }, + "typeHandlerVersion": { + "$id": "6270", + "kind": "string", + "type": { + "$ref": "1904" + }, + "value": "2.0" + } + } + } + } + } + ] + }, + "vmImageOffer": { + "$id": "6271", + "kind": "string", + "type": { + "$ref": "1849" + }, + "value": "WindowsServer" + }, + "vmImagePublisher": { + "$id": "6272", + "kind": "string", + "type": { + "$ref": "1845" + }, + "value": "MicrosoftWindowsServer" + }, + "vmImageSku": { + "$id": "6273", + "kind": "string", + "type": { + "$ref": "1853" + }, + "value": "2016-Datacenter-Server-Core" + }, + "vmImageVersion": { + "$id": "6274", + "kind": "string", + "type": { + "$ref": "1857" + }, + "value": "latest" + }, + "vmInstanceCount": { + "$id": "6275", + "kind": "number", + "type": { + "$ref": "1799" + }, + "value": 10 + }, + "vmSize": { + "$id": "6276", + "kind": "string", + "type": { + "$ref": "1841" + }, + "value": "Standard_DS3" + } + } + }, + "tags": { + "$id": "6277", + "kind": "dict", + "type": { + "$ref": "2242" + }, + "value": { + "$id": "6278" + } + } + } + } + }, + { + "$id": "6279", + "response": { + "$ref": "5915" + }, + "statusCode": 202, + "bodyValue": { + "$id": "6280", + "kind": "model", + "type": { + "$ref": "1791" + }, + "value": { + "$id": "6281", + "name": { + "$id": "6282", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "BE" + }, + "type": { + "$id": "6283", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/nodeTypes" + }, + "id": { + "$id": "6284", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster/nodeTypes/BE" + }, + "properties": { + "$id": "6285", + "kind": "model", + "type": { + "$ref": "1793" + }, + "value": { + "$id": "6286", + "enableEncryptionAtHost": { + "$id": "6287", + "kind": "boolean", + "type": { + "$ref": "2009" + }, + "value": true + }, + "isPrimary": { + "$id": "6288", + "kind": "boolean", + "type": { + "$ref": "1795" + }, + "value": false + }, + "isStateless": { + "$id": "6289", + "kind": "boolean", + "type": { + "$ref": "1954" + }, + "value": true + }, + "multiplePlacementGroups": { + "$id": "6290", + "kind": "boolean", + "type": { + "$ref": "1958" + }, + "value": true + }, + "provisioningState": { + "$id": "6291", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Updating" + }, + "useTempDataDisk": { + "$id": "6292", + "kind": "boolean", + "type": { + "$ref": "2024" + }, + "value": true + }, + "vmExtensions": { + "$id": "6293", + "kind": "array", + "type": { + "$ref": "1887" + }, + "value": [ + { + "$id": "6294", + "kind": "model", + "type": { + "$ref": "1888" + }, + "value": { + "$id": "6295", + "name": { + "$id": "6296", + "kind": "string", + "type": { + "$ref": "1890" + }, + "value": "Microsoft.Azure.Geneva.GenevaMonitoring" + }, + "properties": { + "$id": "6297", + "kind": "model", + "type": { + "$ref": "1894" + }, + "value": { + "$id": "6298", + "type": { + "$id": "6299", + "kind": "string", + "type": { + "$ref": "1900" + }, + "value": "GenevaMonitoring" + }, + "autoUpgradeMinorVersion": { + "$id": "6300", + "kind": "boolean", + "type": { + "$ref": "1908" + }, + "value": true + }, + "publisher": { + "$id": "6301", + "kind": "string", + "type": { + "$ref": "1896" + }, + "value": "Microsoft.Azure.Geneva" + }, + "settings": { + "$id": "6302", + "kind": "model", + "type": { + "$ref": "1912" + }, + "value": { + "$id": "6303" + } + }, + "typeHandlerVersion": { + "$id": "6304", + "kind": "string", + "type": { + "$ref": "1904" + }, + "value": "2.0" + } + } + } + } + } + ] + }, + "vmImageOffer": { + "$id": "6305", + "kind": "string", + "type": { + "$ref": "1849" + }, + "value": "WindowsServer" + }, + "vmImagePublisher": { + "$id": "6306", + "kind": "string", + "type": { + "$ref": "1845" + }, + "value": "MicrosoftWindowsServer" + }, + "vmImageSku": { + "$id": "6307", + "kind": "string", + "type": { + "$ref": "1853" + }, + "value": "2016-Datacenter-Server-Core" + }, + "vmImageVersion": { + "$id": "6308", + "kind": "string", + "type": { + "$ref": "1857" + }, + "value": "latest" + }, + "vmInstanceCount": { + "$id": "6309", + "kind": "number", + "type": { + "$ref": "1799" + }, + "value": 10 + }, + "vmSize": { + "$id": "6310", + "kind": "string", + "type": { + "$ref": "1841" + }, + "value": "Standard_DS3" + } + } + }, + "tags": { + "$id": "6311", + "kind": "dict", + "type": { + "$ref": "2242" + }, + "value": { + "$id": "6312" + } + } + } + } + } + ] + }, + { + "$id": "6313", + "kind": "http", + "name": "Put node type with vm image plan ", + "description": "Put node type with vm image plan ", + "filePath": "2025-03-01-preview/NodeTypePutOperationVmImagePlan_example.json", + "parameters": [ + { + "$id": "6314", + "parameter": { + "$ref": "5895" + }, + "value": { + "$id": "6315", + "kind": "string", + "type": { + "$ref": "5896" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "6316", + "parameter": { + "$ref": "5903" + }, + "value": { + "$id": "6317", + "kind": "string", + "type": { + "$ref": "5904" + }, + "value": "myCluster" + } + }, + { + "$id": "6318", + "parameter": { + "$ref": "5905" + }, + "value": { + "$id": "6319", + "kind": "string", + "type": { + "$ref": "5906" + }, + "value": "BE" + } + }, + { + "$id": "6320", + "parameter": { + "$ref": "5901" + }, + "value": { + "$id": "6321", + "kind": "string", + "type": { + "$ref": "5902" + }, + "value": "resRg" + } + }, + { + "$id": "6322", + "parameter": { + "$ref": "5899" + }, + "value": { + "$id": "6323", + "kind": "string", + "type": { + "$ref": "5900" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "6324", + "response": { + "$ref": "5914" + }, + "statusCode": 200, + "bodyValue": { + "$id": "6325", + "kind": "model", + "type": { + "$ref": "1791" + }, + "value": { + "$id": "6326", + "name": { + "$id": "6327", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "BE" + }, + "type": { + "$id": "6328", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/nodeTypes" + }, + "id": { + "$id": "6329", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster/nodeTypes/BE" + }, + "properties": { + "$id": "6330", + "kind": "model", + "type": { + "$ref": "1793" + }, + "value": { + "$id": "6331", + "capacities": { + "$id": "6332", + "kind": "dict", + "type": { + "$ref": "1820" + }, + "value": { + "$id": "6333" + } + }, + "dataDiskSizeGB": { + "$id": "6334", + "kind": "number", + "type": { + "$ref": "1803" + }, + "value": 200 + }, + "dataDiskType": { + "$id": "6335", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "StandardSSD_LRS" + }, + "isPrimary": { + "$id": "6336", + "kind": "boolean", + "type": { + "$ref": "1795" + }, + "value": false + }, + "isStateless": { + "$id": "6337", + "kind": "boolean", + "type": { + "$ref": "1954" + }, + "value": false + }, + "placementProperties": { + "$id": "6338", + "kind": "dict", + "type": { + "$ref": "1814" + }, + "value": { + "$id": "6339" + } + }, + "provisioningState": { + "$id": "6340", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Creating" + }, + "vmImageOffer": { + "$id": "6341", + "kind": "string", + "type": { + "$ref": "1849" + }, + "value": "windows_2022_test" + }, + "vmImagePlan": { + "$id": "6342", + "kind": "model", + "type": { + "$ref": "2112" + }, + "value": { + "$id": "6343", + "name": { + "$id": "6344", + "kind": "string", + "type": { + "$ref": "2114" + }, + "value": "win_2022_test_20_10_gen2" + }, + "product": { + "$id": "6345", + "kind": "string", + "type": { + "$ref": "2118" + }, + "value": "windows_2022_test" + }, + "publisher": { + "$id": "6346", + "kind": "string", + "type": { + "$ref": "2126" + }, + "value": "testpublisher" + } + } + }, + "vmImagePublisher": { + "$id": "6347", + "kind": "string", + "type": { + "$ref": "1845" + }, + "value": "testpublisher" + }, + "vmImageSku": { + "$id": "6348", + "kind": "string", + "type": { + "$ref": "1853" + }, + "value": "win_2022_test_20_10_gen2" + }, + "vmImageVersion": { + "$id": "6349", + "kind": "string", + "type": { + "$ref": "1857" + }, + "value": "latest" + }, + "vmInstanceCount": { + "$id": "6350", + "kind": "number", + "type": { + "$ref": "1799" + }, + "value": 10 + }, + "vmSize": { + "$id": "6351", + "kind": "string", + "type": { + "$ref": "1841" + }, + "value": "Standard_D3" + } + } + }, + "tags": { + "$id": "6352", + "kind": "dict", + "type": { + "$ref": "2242" + }, + "value": { + "$id": "6353" + } + } + } + } + }, + { + "$id": "6354", + "response": { + "$ref": "5915" + }, + "statusCode": 202, + "bodyValue": { + "$id": "6355", + "kind": "model", + "type": { + "$ref": "1791" + }, + "value": { + "$id": "6356", + "name": { + "$id": "6357", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "BE" + }, + "type": { + "$id": "6358", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/nodeTypes" + }, + "id": { + "$id": "6359", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster/nodeTypes/BE" + }, + "properties": { + "$id": "6360", + "kind": "model", + "type": { + "$ref": "1793" + }, + "value": { + "$id": "6361", + "capacities": { + "$id": "6362", + "kind": "dict", + "type": { + "$ref": "1820" + }, + "value": { + "$id": "6363" + } + }, + "dataDiskSizeGB": { + "$id": "6364", + "kind": "number", + "type": { + "$ref": "1803" + }, + "value": 200 + }, + "dataDiskType": { + "$id": "6365", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "StandardSSD_LRS" + }, + "isPrimary": { + "$id": "6366", + "kind": "boolean", + "type": { + "$ref": "1795" + }, + "value": false + }, + "isStateless": { + "$id": "6367", + "kind": "boolean", + "type": { + "$ref": "1954" + }, + "value": false + }, + "placementProperties": { + "$id": "6368", + "kind": "dict", + "type": { + "$ref": "1814" + }, + "value": { + "$id": "6369" + } + }, + "provisioningState": { + "$id": "6370", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Updating" + }, + "vmImageOffer": { + "$id": "6371", + "kind": "string", + "type": { + "$ref": "1849" + }, + "value": "windows_2022_test" + }, + "vmImagePlan": { + "$id": "6372", + "kind": "model", + "type": { + "$ref": "2112" + }, + "value": { + "$id": "6373", + "name": { + "$id": "6374", + "kind": "string", + "type": { + "$ref": "2114" + }, + "value": "win_2022_test_20_10_gen2" + }, + "product": { + "$id": "6375", + "kind": "string", + "type": { + "$ref": "2118" + }, + "value": "windows_2022_test" + }, + "publisher": { + "$id": "6376", + "kind": "string", + "type": { + "$ref": "2126" + }, + "value": "testpublisher" + } + } + }, + "vmImagePublisher": { + "$id": "6377", + "kind": "string", + "type": { + "$ref": "1845" + }, + "value": "testpublisher" + }, + "vmImageSku": { + "$id": "6378", + "kind": "string", + "type": { + "$ref": "1853" + }, + "value": "win_2022_test_20_10_gen2" + }, + "vmImageVersion": { + "$id": "6379", + "kind": "string", + "type": { + "$ref": "1857" + }, + "value": "latest" + }, + "vmInstanceCount": { + "$id": "6380", + "kind": "number", + "type": { + "$ref": "1799" + }, + "value": 10 + }, + "vmSize": { + "$id": "6381", + "kind": "string", + "type": { + "$ref": "1841" + }, + "value": "Standard_D3" + } + } + }, + "tags": { + "$id": "6382", + "kind": "dict", + "type": { + "$ref": "2242" + }, + "value": { + "$id": "6383" + } + } + } + } + } + ] + }, + { + "$id": "6384", + "kind": "http", + "name": "Put a node type with maximum parameters", + "description": "Put a node type with maximum parameters", + "filePath": "2025-03-01-preview/NodeTypePutOperation_example_max.json", + "parameters": [ + { + "$id": "6385", + "parameter": { + "$ref": "5895" + }, + "value": { + "$id": "6386", + "kind": "string", + "type": { + "$ref": "5896" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "6387", + "parameter": { + "$ref": "5903" + }, + "value": { + "$id": "6388", + "kind": "string", + "type": { + "$ref": "5904" + }, + "value": "myCluster" + } + }, + { + "$id": "6389", + "parameter": { + "$ref": "5905" + }, + "value": { + "$id": "6390", + "kind": "string", + "type": { + "$ref": "5906" + }, + "value": "BE-testResourceGroup-testRegion-test" + } + }, + { + "$id": "6391", + "parameter": { + "$ref": "5901" + }, + "value": { + "$id": "6392", + "kind": "string", + "type": { + "$ref": "5902" + }, + "value": "resRg" + } + }, + { + "$id": "6393", + "parameter": { + "$ref": "5899" + }, + "value": { + "$id": "6394", + "kind": "string", + "type": { + "$ref": "5900" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "6395", + "response": { + "$ref": "5914" + }, + "statusCode": 200, + "bodyValue": { + "$id": "6396", + "kind": "model", + "type": { + "$ref": "1791" + }, + "value": { + "$id": "6397", + "name": { + "$id": "6398", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "BE" + }, + "type": { + "$id": "6399", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/nodeTypes" + }, + "id": { + "$id": "6400", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster/nodeTypes/BE" + }, + "properties": { + "$id": "6401", + "kind": "model", + "type": { + "$ref": "1793" + }, + "value": { + "$id": "6402", + "additionalDataDisks": { + "$id": "6403", + "kind": "array", + "type": { + "$ref": "1989" + }, + "value": [ + { + "$id": "6404", + "kind": "model", + "type": { + "$ref": "1990" + }, + "value": { + "$id": "6405", + "diskLetter": { + "$id": "6406", + "kind": "string", + "type": { + "$ref": "2003" + }, + "value": "F" + }, + "diskSizeGB": { + "$id": "6407", + "kind": "number", + "type": { + "$ref": "1996" + }, + "value": 256 + }, + "diskType": { + "$id": "6408", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "StandardSSD_LRS" + }, + "lun": { + "$id": "6409", + "kind": "number", + "type": { + "$ref": "1992" + }, + "value": 1 + } + } + }, + { + "$id": "6410", + "kind": "model", + "type": { + "$ref": "1990" + }, + "value": { + "$id": "6411", + "diskLetter": { + "$id": "6412", + "kind": "string", + "type": { + "$ref": "2003" + }, + "value": "G" + }, + "diskSizeGB": { + "$id": "6413", + "kind": "number", + "type": { + "$ref": "1996" + }, + "value": 150 + }, + "diskType": { + "$id": "6414", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "Premium_LRS" + }, + "lun": { + "$id": "6415", + "kind": "number", + "type": { + "$ref": "1992" + }, + "value": 2 + } + } + } + ] + }, + "additionalNetworkInterfaceConfigurations": { + "$id": "6416", + "kind": "array", + "type": { + "$ref": "2142" + }, + "value": [ + { + "$id": "6417", + "kind": "model", + "type": { + "$ref": "2143" + }, + "value": { + "$id": "6418", + "name": { + "$id": "6419", + "kind": "string", + "type": { + "$ref": "2145" + }, + "value": "nic-1" + }, + "dscpConfiguration": { + "$id": "6420", + "kind": "model", + "type": { + "$ref": "1864" + }, + "value": { + "$id": "6421", + "id": { + "$id": "6422", + "kind": "string", + "type": { + "$ref": "1866" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/dscpConfigurations/myDscpConfig" + } + } + }, + "enableAcceleratedNetworking": { + "$id": "6423", + "kind": "boolean", + "type": { + "$ref": "2149" + }, + "value": true + }, + "ipConfigurations": { + "$id": "6424", + "kind": "array", + "type": { + "$ref": "2156" + }, + "value": [ + { + "$id": "6425", + "kind": "model", + "type": { + "$ref": "2157" + }, + "value": { + "$id": "6426", + "name": { + "$id": "6427", + "kind": "string", + "type": { + "$ref": "2159" + }, + "value": "ipconfig-1" + }, + "applicationGatewayBackendAddressPools": { + "$id": "6428", + "kind": "array", + "type": { + "$ref": "2163" + }, + "value": [ + { + "$id": "6429", + "kind": "model", + "type": { + "$ref": "1864" + }, + "value": { + "$id": "6430", + "id": { + "$id": "6431", + "kind": "string", + "type": { + "$ref": "1866" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/applicationGateways/appgw-test/backendAddressPools/appgwBepoolTest" + } + } + } + ] + }, + "loadBalancerBackendAddressPools": { + "$id": "6432", + "kind": "array", + "type": { + "$ref": "2167" + }, + "value": [ + { + "$id": "6433", + "kind": "model", + "type": { + "$ref": "1864" + }, + "value": { + "$id": "6434", + "id": { + "$id": "6435", + "kind": "string", + "type": { + "$ref": "1866" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/loadBalancers/test-LB/backendAddressPools/LoadBalancerBEAddressPool" + } + } + } + ] + }, + "loadBalancerInboundNatPools": { + "$id": "6436", + "kind": "array", + "type": { + "$ref": "2171" + }, + "value": [ + { + "$id": "6437", + "kind": "model", + "type": { + "$ref": "1864" + }, + "value": { + "$id": "6438", + "id": { + "$id": "6439", + "kind": "string", + "type": { + "$ref": "1866" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/loadBalancers/test-LB/inboundNatPools/LoadBalancerNATPool" + } + } + } + ] + }, + "privateIPAddressVersion": { + "$id": "6440", + "kind": "string", + "type": { + "$ref": "328" + }, + "value": "IPv4" + }, + "publicIPAddressConfiguration": { + "$id": "6441", + "kind": "model", + "type": { + "$ref": "2181" + }, + "value": { + "$id": "6442", + "name": { + "$id": "6443", + "kind": "string", + "type": { + "$ref": "2183" + }, + "value": "publicip-1" + }, + "ipTags": { + "$id": "6444", + "kind": "array", + "type": { + "$ref": "2187" + }, + "value": [ + { + "$id": "6445", + "kind": "model", + "type": { + "$ref": "1437" + }, + "value": { + "$id": "6446", + "ipTagType": { + "$id": "6447", + "kind": "string", + "type": { + "$ref": "1439" + }, + "value": "RoutingPreference" + }, + "tag": { + "$id": "6448", + "kind": "string", + "type": { + "$ref": "1443" + }, + "value": "Internet" + } + } + } + ] + }, + "publicIPAddressVersion": { + "$id": "6449", + "kind": "string", + "type": { + "$ref": "334" + }, + "value": "IPv4" + } + } + }, + "subnet": { + "$id": "6450", + "kind": "model", + "type": { + "$ref": "1864" + }, + "value": { + "$id": "6451", + "id": { + "$id": "6452", + "kind": "string", + "type": { + "$ref": "1866" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1" + } + } + } + } + } + ] + } + } + } + ] + }, + "capacities": { + "$id": "6453", + "kind": "dict", + "type": { + "$ref": "1820" + }, + "value": { + "$id": "6454", + "ClientConnections": { + "$id": "6455", + "kind": "string", + "type": { + "$ref": "1822" + }, + "value": "65536" + } + } + }, + "dataDiskLetter": { + "$id": "6456", + "kind": "string", + "type": { + "$ref": "1810" + }, + "value": "S" + }, + "dataDiskSizeGB": { + "$id": "6457", + "kind": "number", + "type": { + "$ref": "1803" + }, + "value": 200 + }, + "dataDiskType": { + "$id": "6458", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "Premium_LRS" + }, + "dscpConfigurationId": { + "$id": "6459", + "kind": "string", + "type": { + "$ref": "2137" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/dscpConfigurations/myDscpConfig" + }, + "enableAcceleratedNetworking": { + "$id": "6460", + "kind": "boolean", + "type": { + "$ref": "2016" + }, + "value": true + }, + "enableEncryptionAtHost": { + "$id": "6461", + "kind": "boolean", + "type": { + "$ref": "2009" + }, + "value": true + }, + "enableNodePublicIP": { + "$id": "6462", + "kind": "boolean", + "type": { + "$ref": "2077" + }, + "value": true + }, + "enableNodePublicIPv6": { + "$id": "6463", + "kind": "boolean", + "type": { + "$ref": "2081" + }, + "value": true + }, + "enableOverProvisioning": { + "$id": "6464", + "kind": "boolean", + "type": { + "$ref": "2028" + }, + "value": false + }, + "evictionPolicy": { + "$id": "6465", + "kind": "string", + "type": { + "$ref": "310" + }, + "value": "Deallocate" + }, + "frontendConfigurations": { + "$id": "6466", + "kind": "array", + "type": { + "$ref": "1962" + }, + "value": [ + { + "$id": "6467", + "kind": "model", + "type": { + "$ref": "1963" + }, + "value": { + "$id": "6468", + "applicationGatewayBackendAddressPoolId": { + "$id": "6469", + "kind": "string", + "type": { + "$ref": "1978" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/applicationGateways/appgw-test/backendAddressPools/appgwBepoolTest" + }, + "loadBalancerBackendAddressPoolId": { + "$id": "6470", + "kind": "string", + "type": { + "$ref": "1968" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/loadBalancers/test-LB/backendAddressPools/LoadBalancerBEAddressPool" + }, + "loadBalancerInboundNatPoolId": { + "$id": "6471", + "kind": "string", + "type": { + "$ref": "1973" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/loadBalancers/test-LB/inboundNatPools/LoadBalancerNATPool" + } + } + } + ] + }, + "isPrimary": { + "$id": "6472", + "kind": "boolean", + "type": { + "$ref": "1795" + }, + "value": false + }, + "isSpotVM": { + "$id": "6473", + "kind": "boolean", + "type": { + "$ref": "2037" + }, + "value": true + }, + "isStateless": { + "$id": "6474", + "kind": "boolean", + "type": { + "$ref": "1954" + }, + "value": true + }, + "multiplePlacementGroups": { + "$id": "6475", + "kind": "boolean", + "type": { + "$ref": "1958" + }, + "value": true + }, + "natGatewayId": { + "$id": "6476", + "kind": "string", + "type": { + "$ref": "2090" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/natGateways/myNatGateway" + }, + "placementProperties": { + "$id": "6477", + "kind": "dict", + "type": { + "$ref": "1814" + }, + "value": { + "$id": "6478", + "HasSSD": { + "$id": "6479", + "kind": "string", + "type": { + "$ref": "1816" + }, + "value": "true" + }, + "NodeColor": { + "$id": "6480", + "kind": "string", + "type": { + "$ref": "1816" + }, + "value": "green" + }, + "SomeProperty": { + "$id": "6481", + "kind": "string", + "type": { + "$ref": "1816" + }, + "value": "5" + } + } + }, + "provisioningState": { + "$id": "6482", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Creating" + }, + "secureBootEnabled": { + "$id": "6483", + "kind": "boolean", + "type": { + "$ref": "2073" + }, + "value": true + }, + "securityType": { + "$id": "6484", + "kind": "string", + "type": { + "$ref": "322" + }, + "value": "TrustedLaunch" + }, + "serviceArtifactReferenceId": { + "$id": "6485", + "kind": "string", + "type": { + "$ref": "2132" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Compute/galleries/myGallery/serviceArtifacts/myServiceArtifact/vmArtifactsProfiles/myVmArtifactProfile" + }, + "spotRestoreTimeout": { + "$id": "6486", + "kind": "string", + "type": { + "$ref": "2049" + }, + "value": "PT30M" + }, + "subnetId": { + "$id": "6487", + "kind": "string", + "type": { + "$ref": "2061" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1" + }, + "useDefaultPublicLoadBalancer": { + "$id": "6488", + "kind": "boolean", + "type": { + "$ref": "2020" + }, + "value": true + }, + "useEphemeralOSDisk": { + "$id": "6489", + "kind": "boolean", + "type": { + "$ref": "2045" + }, + "value": true + }, + "vmApplications": { + "$id": "6490", + "kind": "array", + "type": { + "$ref": "2204" + }, + "value": [ + { + "$id": "6491", + "kind": "model", + "type": { + "$ref": "2205" + }, + "value": { + "$id": "6492", + "configurationReference": { + "$id": "6493", + "kind": "string", + "type": { + "$ref": "2207" + }, + "value": "https://mystorageaccount.blob.core.windows.net/containername/blobname" + }, + "enableAutomaticUpgrade": { + "$id": "6494", + "kind": "boolean", + "type": { + "$ref": "2211" + }, + "value": true + }, + "order": { + "$id": "6495", + "kind": "number", + "type": { + "$ref": "2215" + }, + "value": 1 + }, + "packageReferenceId": { + "$id": "6496", + "kind": "string", + "type": { + "$ref": "2219" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Compute/galleries/myGallery/applications/myApplication/versions/1.0.0" + }, + "treatFailureAsDeploymentFailure": { + "$id": "6497", + "kind": "boolean", + "type": { + "$ref": "2228" + }, + "value": false + }, + "vmGalleryTags": { + "$id": "6498", + "kind": "string", + "type": { + "$ref": "2224" + }, + "value": "{\"Tag1\":\"Value1\",\"Tag2\":\"Value2\"}" + } + } + } + ] + }, + "vmExtensions": { + "$id": "6499", + "kind": "array", + "type": { + "$ref": "1887" + }, + "value": [ + { + "$id": "6500", + "kind": "model", + "type": { + "$ref": "1888" + }, + "value": { + "$id": "6501", + "name": { + "$id": "6502", + "kind": "string", + "type": { + "$ref": "1890" + }, + "value": "Microsoft.Azure.Geneva.GenevaMonitoring" + }, + "properties": { + "$id": "6503", + "kind": "model", + "type": { + "$ref": "1894" + }, + "value": { + "$id": "6504", + "type": { + "$id": "6505", + "kind": "string", + "type": { + "$ref": "1900" + }, + "value": "GenevaMonitoring" + }, + "autoUpgradeMinorVersion": { + "$id": "6506", + "kind": "boolean", + "type": { + "$ref": "1908" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "6507", + "kind": "boolean", + "type": { + "$ref": "1933" + }, + "value": true + }, + "forceUpdateTag": { + "$id": "6508", + "kind": "string", + "type": { + "$ref": "1920" + }, + "value": "v.1.0" + }, + "publisher": { + "$id": "6509", + "kind": "string", + "type": { + "$ref": "1896" + }, + "value": "Microsoft.Azure.Geneva" + }, + "settings": { + "$id": "6510", + "kind": "model", + "type": { + "$ref": "1912" + }, + "value": { + "$id": "6511" + } + }, + "setupOrder": { + "$id": "6512", + "kind": "array", + "type": { + "$ref": "1937" + }, + "value": [ + { + "$id": "6513", + "kind": "string", + "type": { + "$ref": "300" + }, + "value": "BeforeSFRuntime" + } + ] + }, + "typeHandlerVersion": { + "$id": "6514", + "kind": "string", + "type": { + "$ref": "1904" + }, + "value": "2.0" + } + } + } + } + } + ] + }, + "vmImageOffer": { + "$id": "6515", + "kind": "string", + "type": { + "$ref": "1849" + }, + "value": "WindowsServer" + }, + "vmImagePublisher": { + "$id": "6516", + "kind": "string", + "type": { + "$ref": "1845" + }, + "value": "MicrosoftWindowsServer" + }, + "vmImageSku": { + "$id": "6517", + "kind": "string", + "type": { + "$ref": "1853" + }, + "value": "2016-Datacenter-Server-Core" + }, + "vmImageVersion": { + "$id": "6518", + "kind": "string", + "type": { + "$ref": "1857" + }, + "value": "latest" + }, + "vmInstanceCount": { + "$id": "6519", + "kind": "number", + "type": { + "$ref": "1799" + }, + "value": 10 + }, + "vmManagedIdentity": { + "$id": "6520", + "kind": "model", + "type": { + "$ref": "1945" + }, + "value": { + "$id": "6521", + "userAssignedIdentities": { + "$id": "6522", + "kind": "array", + "type": { + "$ref": "1947" + }, + "value": [ + { + "$id": "6523", + "kind": "string", + "type": { + "$ref": "1948" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity" + }, + { + "$id": "6524", + "kind": "string", + "type": { + "$ref": "1948" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity2" + } + ] + } + } + }, + "vmSecrets": { + "$id": "6525", + "kind": "array", + "type": { + "$ref": "1861" + }, + "value": [ + { + "$id": "6526", + "kind": "model", + "type": { + "$ref": "1862" + }, + "value": { + "$id": "6527", + "sourceVault": { + "$id": "6528", + "kind": "model", + "type": { + "$ref": "1864" + }, + "value": { + "$id": "6529", + "id": { + "$id": "6530", + "kind": "string", + "type": { + "$ref": "1866" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.KeyVault/vaults/myVault" + } + } + }, + "vaultCertificates": { + "$id": "6531", + "kind": "array", + "type": { + "$ref": "1872" + }, + "value": [ + { + "$id": "6532", + "kind": "model", + "type": { + "$ref": "1873" + }, + "value": { + "$id": "6533", + "certificateStore": { + "$id": "6534", + "kind": "string", + "type": { + "$ref": "1879" + }, + "value": "My" + }, + "certificateUrl": { + "$id": "6535", + "kind": "string", + "type": { + "$ref": "1875" + }, + "value": "https://myVault.vault.azure.net:443/secrets/myCert/ef1a31d39e1f46bca33def54b6cda54c" + } + } + } + ] + } + } + } + ] + }, + "vmSetupActions": { + "$id": "6536", + "kind": "array", + "type": { + "$ref": "2066" + }, + "value": [ + { + "$id": "6537", + "kind": "string", + "type": { + "$ref": "316" + }, + "value": "EnableContainers" + }, + { + "$id": "6538", + "kind": "string", + "type": { + "$ref": "316" + }, + "value": "EnableHyperV" + } + ] + }, + "vmSize": { + "$id": "6539", + "kind": "string", + "type": { + "$ref": "1841" + }, + "value": "Standard_DS3" + }, + "zones": { + "$id": "6540", + "kind": "array", + "type": { + "$ref": "2032" + }, + "value": [ + { + "$id": "6541", + "kind": "string", + "type": { + "$ref": "2033" + }, + "value": "1" + }, + { + "$id": "6542", + "kind": "string", + "type": { + "$ref": "2033" + }, + "value": "2" + }, + { + "$id": "6543", + "kind": "string", + "type": { + "$ref": "2033" + }, + "value": "3" + } + ] + } + } + }, + "tags": { + "$id": "6544", + "kind": "dict", + "type": { + "$ref": "2242" + }, + "value": { + "$id": "6545" + } + } + } + } + }, + { + "$id": "6546", + "response": { + "$ref": "5915" + }, + "statusCode": 202, + "bodyValue": { + "$id": "6547", + "kind": "model", + "type": { + "$ref": "1791" + }, + "value": { + "$id": "6548", + "name": { + "$id": "6549", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "BE" + }, + "type": { + "$id": "6550", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/nodeTypes" + }, + "id": { + "$id": "6551", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster/nodeTypes/BE" + }, + "properties": { + "$id": "6552", + "kind": "model", + "type": { + "$ref": "1793" + }, + "value": { + "$id": "6553", + "additionalDataDisks": { + "$id": "6554", + "kind": "array", + "type": { + "$ref": "1989" + }, + "value": [ + { + "$id": "6555", + "kind": "model", + "type": { + "$ref": "1990" + }, + "value": { + "$id": "6556", + "diskLetter": { + "$id": "6557", + "kind": "string", + "type": { + "$ref": "2003" + }, + "value": "F" + }, + "diskSizeGB": { + "$id": "6558", + "kind": "number", + "type": { + "$ref": "1996" + }, + "value": 256 + }, + "diskType": { + "$id": "6559", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "StandardSSD_LRS" + }, + "lun": { + "$id": "6560", + "kind": "number", + "type": { + "$ref": "1992" + }, + "value": 1 + } + } + }, + { + "$id": "6561", + "kind": "model", + "type": { + "$ref": "1990" + }, + "value": { + "$id": "6562", + "diskLetter": { + "$id": "6563", + "kind": "string", + "type": { + "$ref": "2003" + }, + "value": "G" + }, + "diskSizeGB": { + "$id": "6564", + "kind": "number", + "type": { + "$ref": "1996" + }, + "value": 150 + }, + "diskType": { + "$id": "6565", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "Premium_LRS" + }, + "lun": { + "$id": "6566", + "kind": "number", + "type": { + "$ref": "1992" + }, + "value": 2 + } + } + } + ] + }, + "additionalNetworkInterfaceConfigurations": { + "$id": "6567", + "kind": "array", + "type": { + "$ref": "2142" + }, + "value": [ + { + "$id": "6568", + "kind": "model", + "type": { + "$ref": "2143" + }, + "value": { + "$id": "6569", + "name": { + "$id": "6570", + "kind": "string", + "type": { + "$ref": "2145" + }, + "value": "nic-1" + }, + "dscpConfiguration": { + "$id": "6571", + "kind": "model", + "type": { + "$ref": "1864" + }, + "value": { + "$id": "6572", + "id": { + "$id": "6573", + "kind": "string", + "type": { + "$ref": "1866" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/dscpConfigurations/myDscpConfig" + } + } + }, + "enableAcceleratedNetworking": { + "$id": "6574", + "kind": "boolean", + "type": { + "$ref": "2149" + }, + "value": true + }, + "ipConfigurations": { + "$id": "6575", + "kind": "array", + "type": { + "$ref": "2156" + }, + "value": [ + { + "$id": "6576", + "kind": "model", + "type": { + "$ref": "2157" + }, + "value": { + "$id": "6577", + "name": { + "$id": "6578", + "kind": "string", + "type": { + "$ref": "2159" + }, + "value": "ipconfig-1" + }, + "applicationGatewayBackendAddressPools": { + "$id": "6579", + "kind": "array", + "type": { + "$ref": "2163" + }, + "value": [ + { + "$id": "6580", + "kind": "model", + "type": { + "$ref": "1864" + }, + "value": { + "$id": "6581", + "id": { + "$id": "6582", + "kind": "string", + "type": { + "$ref": "1866" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/applicationGateways/appgw-test/backendAddressPools/appgwBepoolTest" + } + } + } + ] + }, + "loadBalancerBackendAddressPools": { + "$id": "6583", + "kind": "array", + "type": { + "$ref": "2167" + }, + "value": [ + { + "$id": "6584", + "kind": "model", + "type": { + "$ref": "1864" + }, + "value": { + "$id": "6585", + "id": { + "$id": "6586", + "kind": "string", + "type": { + "$ref": "1866" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/loadBalancers/test-LB/backendAddressPools/LoadBalancerBEAddressPool" + } + } + } + ] + }, + "loadBalancerInboundNatPools": { + "$id": "6587", + "kind": "array", + "type": { + "$ref": "2171" + }, + "value": [ + { + "$id": "6588", + "kind": "model", + "type": { + "$ref": "1864" + }, + "value": { + "$id": "6589", + "id": { + "$id": "6590", + "kind": "string", + "type": { + "$ref": "1866" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/loadBalancers/test-LB/inboundNatPools/LoadBalancerNATPool" + } + } + } + ] + }, + "privateIPAddressVersion": { + "$id": "6591", + "kind": "string", + "type": { + "$ref": "328" + }, + "value": "IPv4" + }, + "publicIPAddressConfiguration": { + "$id": "6592", + "kind": "model", + "type": { + "$ref": "2181" + }, + "value": { + "$id": "6593", + "name": { + "$id": "6594", + "kind": "string", + "type": { + "$ref": "2183" + }, + "value": "publicip-1" + }, + "ipTags": { + "$id": "6595", + "kind": "array", + "type": { + "$ref": "2187" + }, + "value": [ + { + "$id": "6596", + "kind": "model", + "type": { + "$ref": "1437" + }, + "value": { + "$id": "6597", + "ipTagType": { + "$id": "6598", + "kind": "string", + "type": { + "$ref": "1439" + }, + "value": "RoutingPreference" + }, + "tag": { + "$id": "6599", + "kind": "string", + "type": { + "$ref": "1443" + }, + "value": "Internet" + } + } + } + ] + }, + "publicIPAddressVersion": { + "$id": "6600", + "kind": "string", + "type": { + "$ref": "334" + }, + "value": "IPv4" + } + } + }, + "subnet": { + "$id": "6601", + "kind": "model", + "type": { + "$ref": "1864" + }, + "value": { + "$id": "6602", + "id": { + "$id": "6603", + "kind": "string", + "type": { + "$ref": "1866" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1" + } + } + } + } + } + ] + } + } + } + ] + }, + "capacities": { + "$id": "6604", + "kind": "dict", + "type": { + "$ref": "1820" + }, + "value": { + "$id": "6605", + "ClientConnections": { + "$id": "6606", + "kind": "string", + "type": { + "$ref": "1822" + }, + "value": "65536" + } + } + }, + "dataDiskLetter": { + "$id": "6607", + "kind": "string", + "type": { + "$ref": "1810" + }, + "value": "S" + }, + "dataDiskSizeGB": { + "$id": "6608", + "kind": "number", + "type": { + "$ref": "1803" + }, + "value": 200 + }, + "dataDiskType": { + "$id": "6609", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "Premium_LRS" + }, + "dscpConfigurationId": { + "$id": "6610", + "kind": "string", + "type": { + "$ref": "2137" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/dscpConfigurations/myDscpConfig" + }, + "enableAcceleratedNetworking": { + "$id": "6611", + "kind": "boolean", + "type": { + "$ref": "2016" + }, + "value": true + }, + "enableEncryptionAtHost": { + "$id": "6612", + "kind": "boolean", + "type": { + "$ref": "2009" + }, + "value": true + }, + "enableNodePublicIP": { + "$id": "6613", + "kind": "boolean", + "type": { + "$ref": "2077" + }, + "value": true + }, + "enableNodePublicIPv6": { + "$id": "6614", + "kind": "boolean", + "type": { + "$ref": "2081" + }, + "value": true + }, + "enableOverProvisioning": { + "$id": "6615", + "kind": "boolean", + "type": { + "$ref": "2028" + }, + "value": false + }, + "evictionPolicy": { + "$id": "6616", + "kind": "string", + "type": { + "$ref": "310" + }, + "value": "Deallocate" + }, + "frontendConfigurations": { + "$id": "6617", + "kind": "array", + "type": { + "$ref": "1962" + }, + "value": [ + { + "$id": "6618", + "kind": "model", + "type": { + "$ref": "1963" + }, + "value": { + "$id": "6619", + "applicationGatewayBackendAddressPoolId": { + "$id": "6620", + "kind": "string", + "type": { + "$ref": "1978" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/applicationGateways/appgw-test/backendAddressPools/appgwBepoolTest" + }, + "loadBalancerBackendAddressPoolId": { + "$id": "6621", + "kind": "string", + "type": { + "$ref": "1968" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/loadBalancers/test-LB/backendAddressPools/LoadBalancerBEAddressPool" + }, + "loadBalancerInboundNatPoolId": { + "$id": "6622", + "kind": "string", + "type": { + "$ref": "1973" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/loadBalancers/test-LB/inboundNatPools/LoadBalancerNATPool" + } + } + } + ] + }, + "isPrimary": { + "$id": "6623", + "kind": "boolean", + "type": { + "$ref": "1795" + }, + "value": false + }, + "isSpotVM": { + "$id": "6624", + "kind": "boolean", + "type": { + "$ref": "2037" + }, + "value": true + }, + "isStateless": { + "$id": "6625", + "kind": "boolean", + "type": { + "$ref": "1954" + }, + "value": true + }, + "multiplePlacementGroups": { + "$id": "6626", + "kind": "boolean", + "type": { + "$ref": "1958" + }, + "value": true + }, + "natGatewayId": { + "$id": "6627", + "kind": "string", + "type": { + "$ref": "2090" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/natGateways/myNatGateway" + }, + "placementProperties": { + "$id": "6628", + "kind": "dict", + "type": { + "$ref": "1814" + }, + "value": { + "$id": "6629", + "HasSSD": { + "$id": "6630", + "kind": "string", + "type": { + "$ref": "1816" + }, + "value": "true" + }, + "NodeColor": { + "$id": "6631", + "kind": "string", + "type": { + "$ref": "1816" + }, + "value": "green" + }, + "SomeProperty": { + "$id": "6632", + "kind": "string", + "type": { + "$ref": "1816" + }, + "value": "5" + } + } + }, + "provisioningState": { + "$id": "6633", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Updating" + }, + "secureBootEnabled": { + "$id": "6634", + "kind": "boolean", + "type": { + "$ref": "2073" + }, + "value": true + }, + "securityType": { + "$id": "6635", + "kind": "string", + "type": { + "$ref": "322" + }, + "value": "TrustedLaunch" + }, + "serviceArtifactReferenceId": { + "$id": "6636", + "kind": "string", + "type": { + "$ref": "2132" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Compute/galleries/myGallery/serviceArtifacts/myServiceArtifact/vmArtifactsProfiles/myVmArtifactProfile" + }, + "spotRestoreTimeout": { + "$id": "6637", + "kind": "string", + "type": { + "$ref": "2049" + }, + "value": "PT30M" + }, + "subnetId": { + "$id": "6638", + "kind": "string", + "type": { + "$ref": "2061" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1" + }, + "useDefaultPublicLoadBalancer": { + "$id": "6639", + "kind": "boolean", + "type": { + "$ref": "2020" + }, + "value": true + }, + "useEphemeralOSDisk": { + "$id": "6640", + "kind": "boolean", + "type": { + "$ref": "2045" + }, + "value": true + }, + "vmApplications": { + "$id": "6641", + "kind": "array", + "type": { + "$ref": "2204" + }, + "value": [ + { + "$id": "6642", + "kind": "model", + "type": { + "$ref": "2205" + }, + "value": { + "$id": "6643", + "configurationReference": { + "$id": "6644", + "kind": "string", + "type": { + "$ref": "2207" + }, + "value": "https://mystorageaccount.blob.core.windows.net/containername/blobname" + }, + "enableAutomaticUpgrade": { + "$id": "6645", + "kind": "boolean", + "type": { + "$ref": "2211" + }, + "value": true + }, + "order": { + "$id": "6646", + "kind": "number", + "type": { + "$ref": "2215" + }, + "value": 1 + }, + "packageReferenceId": { + "$id": "6647", + "kind": "string", + "type": { + "$ref": "2219" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Compute/galleries/myGallery/applications/myApplication/versions/1.0.0" + }, + "treatFailureAsDeploymentFailure": { + "$id": "6648", + "kind": "boolean", + "type": { + "$ref": "2228" + }, + "value": false + }, + "vmGalleryTags": { + "$id": "6649", + "kind": "string", + "type": { + "$ref": "2224" + }, + "value": "{\"Tag1\":\"Value1\",\"Tag2\":\"Value2\"}" + } + } + } + ] + }, + "vmExtensions": { + "$id": "6650", + "kind": "array", + "type": { + "$ref": "1887" + }, + "value": [ + { + "$id": "6651", + "kind": "model", + "type": { + "$ref": "1888" + }, + "value": { + "$id": "6652", + "name": { + "$id": "6653", + "kind": "string", + "type": { + "$ref": "1890" + }, + "value": "Microsoft.Azure.Geneva.GenevaMonitoring" + }, + "properties": { + "$id": "6654", + "kind": "model", + "type": { + "$ref": "1894" + }, + "value": { + "$id": "6655", + "type": { + "$id": "6656", + "kind": "string", + "type": { + "$ref": "1900" + }, + "value": "GenevaMonitoring" + }, + "autoUpgradeMinorVersion": { + "$id": "6657", + "kind": "boolean", + "type": { + "$ref": "1908" + }, + "value": true + }, + "enableAutomaticUpgrade": { + "$id": "6658", + "kind": "boolean", + "type": { + "$ref": "1933" + }, + "value": true + }, + "forceUpdateTag": { + "$id": "6659", + "kind": "string", + "type": { + "$ref": "1920" + }, + "value": "v.1.0" + }, + "publisher": { + "$id": "6660", + "kind": "string", + "type": { + "$ref": "1896" + }, + "value": "Microsoft.Azure.Geneva" + }, + "settings": { + "$id": "6661", + "kind": "model", + "type": { + "$ref": "1912" + }, + "value": { + "$id": "6662" + } + }, + "setupOrder": { + "$id": "6663", + "kind": "array", + "type": { + "$ref": "1937" + }, + "value": [ + { + "$id": "6664", + "kind": "string", + "type": { + "$ref": "300" + }, + "value": "BeforeSFRuntime" + } + ] + }, + "typeHandlerVersion": { + "$id": "6665", + "kind": "string", + "type": { + "$ref": "1904" + }, + "value": "2.0" + } + } + } + } + } + ] + }, + "vmImageOffer": { + "$id": "6666", + "kind": "string", + "type": { + "$ref": "1849" + }, + "value": "WindowsServer" + }, + "vmImagePublisher": { + "$id": "6667", + "kind": "string", + "type": { + "$ref": "1845" + }, + "value": "MicrosoftWindowsServer" + }, + "vmImageSku": { + "$id": "6668", + "kind": "string", + "type": { + "$ref": "1853" + }, + "value": "2016-Datacenter-Server-Core" + }, + "vmImageVersion": { + "$id": "6669", + "kind": "string", + "type": { + "$ref": "1857" + }, + "value": "latest" + }, + "vmInstanceCount": { + "$id": "6670", + "kind": "number", + "type": { + "$ref": "1799" + }, + "value": 10 + }, + "vmManagedIdentity": { + "$id": "6671", + "kind": "model", + "type": { + "$ref": "1945" + }, + "value": { + "$id": "6672", + "userAssignedIdentities": { + "$id": "6673", + "kind": "array", + "type": { + "$ref": "1947" + }, + "value": [ + { + "$id": "6674", + "kind": "string", + "type": { + "$ref": "1948" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity" + }, + { + "$id": "6675", + "kind": "string", + "type": { + "$ref": "1948" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity2" + } + ] + } + } + }, + "vmSecrets": { + "$id": "6676", + "kind": "array", + "type": { + "$ref": "1861" + }, + "value": [ + { + "$id": "6677", + "kind": "model", + "type": { + "$ref": "1862" + }, + "value": { + "$id": "6678", + "sourceVault": { + "$id": "6679", + "kind": "model", + "type": { + "$ref": "1864" + }, + "value": { + "$id": "6680", + "id": { + "$id": "6681", + "kind": "string", + "type": { + "$ref": "1866" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.KeyVault/vaults/myVault" + } + } + }, + "vaultCertificates": { + "$id": "6682", + "kind": "array", + "type": { + "$ref": "1872" + }, + "value": [ + { + "$id": "6683", + "kind": "model", + "type": { + "$ref": "1873" + }, + "value": { + "$id": "6684", + "certificateStore": { + "$id": "6685", + "kind": "string", + "type": { + "$ref": "1879" + }, + "value": "My" + }, + "certificateUrl": { + "$id": "6686", + "kind": "string", + "type": { + "$ref": "1875" + }, + "value": "https://myVault.vault.azure.net:443/secrets/myCert/ef1a31d39e1f46bca33def54b6cda54c" + } + } + } + ] + } + } + } + ] + }, + "vmSetupActions": { + "$id": "6687", + "kind": "array", + "type": { + "$ref": "2066" + }, + "value": [ + { + "$id": "6688", + "kind": "string", + "type": { + "$ref": "316" + }, + "value": "EnableContainers" + }, + { + "$id": "6689", + "kind": "string", + "type": { + "$ref": "316" + }, + "value": "EnableHyperV" + } + ] + }, + "vmSize": { + "$id": "6690", + "kind": "string", + "type": { + "$ref": "1841" + }, + "value": "Standard_DS3" + }, + "zones": { + "$id": "6691", + "kind": "array", + "type": { + "$ref": "2032" + }, + "value": [ + { + "$id": "6692", + "kind": "string", + "type": { + "$ref": "2033" + }, + "value": "1" + }, + { + "$id": "6693", + "kind": "string", + "type": { + "$ref": "2033" + }, + "value": "2" + }, + { + "$id": "6694", + "kind": "string", + "type": { + "$ref": "2033" + }, + "value": "3" + } + ] + } + } + }, + "tags": { + "$id": "6695", + "kind": "dict", + "type": { + "$ref": "2242" + }, + "value": { + "$id": "6696" + } + } + } + } + } + ] + }, + { + "$id": "6697", + "kind": "http", + "name": "Put a node type with minimum parameters", + "description": "Put a node type with minimum parameters", + "filePath": "2025-03-01-preview/NodeTypePutOperation_example_min.json", + "parameters": [ + { + "$id": "6698", + "parameter": { + "$ref": "5895" + }, + "value": { + "$id": "6699", + "kind": "string", + "type": { + "$ref": "5896" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "6700", + "parameter": { + "$ref": "5903" + }, + "value": { + "$id": "6701", + "kind": "string", + "type": { + "$ref": "5904" + }, + "value": "myCluster" + } + }, + { + "$id": "6702", + "parameter": { + "$ref": "5905" + }, + "value": { + "$id": "6703", + "kind": "string", + "type": { + "$ref": "5906" + }, + "value": "BE" + } + }, + { + "$id": "6704", + "parameter": { + "$ref": "5901" + }, + "value": { + "$id": "6705", + "kind": "string", + "type": { + "$ref": "5902" + }, + "value": "resRg" + } + }, + { + "$id": "6706", + "parameter": { + "$ref": "5899" + }, + "value": { + "$id": "6707", + "kind": "string", + "type": { + "$ref": "5900" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "6708", + "response": { + "$ref": "5914" + }, + "statusCode": 200, + "bodyValue": { + "$id": "6709", + "kind": "model", + "type": { + "$ref": "1791" + }, + "value": { + "$id": "6710", + "name": { + "$id": "6711", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "BE" + }, + "type": { + "$id": "6712", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/nodeTypes" + }, + "id": { + "$id": "6713", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster/nodeTypes/BE" + }, + "properties": { + "$id": "6714", + "kind": "model", + "type": { + "$ref": "1793" + }, + "value": { + "$id": "6715", + "capacities": { + "$id": "6716", + "kind": "dict", + "type": { + "$ref": "1820" + }, + "value": { + "$id": "6717" + } + }, + "dataDiskSizeGB": { + "$id": "6718", + "kind": "number", + "type": { + "$ref": "1803" + }, + "value": 200 + }, + "dataDiskType": { + "$id": "6719", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "StandardSSD_LRS" + }, + "isPrimary": { + "$id": "6720", + "kind": "boolean", + "type": { + "$ref": "1795" + }, + "value": false + }, + "isStateless": { + "$id": "6721", + "kind": "boolean", + "type": { + "$ref": "1954" + }, + "value": false + }, + "placementProperties": { + "$id": "6722", + "kind": "dict", + "type": { + "$ref": "1814" + }, + "value": { + "$id": "6723" + } + }, + "provisioningState": { + "$id": "6724", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Creating" + }, + "vmImageOffer": { + "$id": "6725", + "kind": "string", + "type": { + "$ref": "1849" + }, + "value": "WindowsServer" + }, + "vmImagePublisher": { + "$id": "6726", + "kind": "string", + "type": { + "$ref": "1845" + }, + "value": "MicrosoftWindowsServer" + }, + "vmImageSku": { + "$id": "6727", + "kind": "string", + "type": { + "$ref": "1853" + }, + "value": "2016-Datacenter-Server-Core" + }, + "vmImageVersion": { + "$id": "6728", + "kind": "string", + "type": { + "$ref": "1857" + }, + "value": "latest" + }, + "vmInstanceCount": { + "$id": "6729", + "kind": "number", + "type": { + "$ref": "1799" + }, + "value": 10 + }, + "vmSize": { + "$id": "6730", + "kind": "string", + "type": { + "$ref": "1841" + }, + "value": "Standard_D3" + } + } + }, + "tags": { + "$id": "6731", + "kind": "dict", + "type": { + "$ref": "2242" + }, + "value": { + "$id": "6732" + } + } + } + } + }, + { + "$id": "6733", + "response": { + "$ref": "5915" + }, + "statusCode": 202, + "bodyValue": { + "$id": "6734", + "kind": "model", + "type": { + "$ref": "1791" + }, + "value": { + "$id": "6735", + "name": { + "$id": "6736", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "BE" + }, + "type": { + "$id": "6737", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/nodeTypes" + }, + "id": { + "$id": "6738", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster/nodeTypes/BE" + }, + "properties": { + "$id": "6739", + "kind": "model", + "type": { + "$ref": "1793" + }, + "value": { + "$id": "6740", + "capacities": { + "$id": "6741", + "kind": "dict", + "type": { + "$ref": "1820" + }, + "value": { + "$id": "6742" + } + }, + "dataDiskSizeGB": { + "$id": "6743", + "kind": "number", + "type": { + "$ref": "1803" + }, + "value": 200 + }, + "dataDiskType": { + "$id": "6744", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "StandardSSD_LRS" + }, + "isPrimary": { + "$id": "6745", + "kind": "boolean", + "type": { + "$ref": "1795" + }, + "value": false + }, + "isStateless": { + "$id": "6746", + "kind": "boolean", + "type": { + "$ref": "1954" + }, + "value": false + }, + "placementProperties": { + "$id": "6747", + "kind": "dict", + "type": { + "$ref": "1814" + }, + "value": { + "$id": "6748" + } + }, + "provisioningState": { + "$id": "6749", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Updating" + }, + "vmImageOffer": { + "$id": "6750", + "kind": "string", + "type": { + "$ref": "1849" + }, + "value": "WindowsServer" + }, + "vmImagePublisher": { + "$id": "6751", + "kind": "string", + "type": { + "$ref": "1845" + }, + "value": "MicrosoftWindowsServer" + }, + "vmImageSku": { + "$id": "6752", + "kind": "string", + "type": { + "$ref": "1853" + }, + "value": "2016-Datacenter-Server-Core" + }, + "vmImageVersion": { + "$id": "6753", + "kind": "string", + "type": { + "$ref": "1857" + }, + "value": "latest" + }, + "vmInstanceCount": { + "$id": "6754", + "kind": "number", + "type": { + "$ref": "1799" + }, + "value": 10 + }, + "vmSize": { + "$id": "6755", + "kind": "string", + "type": { + "$ref": "1841" + }, + "value": "Standard_D3" + } + } + }, + "tags": { + "$id": "6756", + "kind": "dict", + "type": { + "$ref": "2242" + }, + "value": { + "$id": "6757" + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "6758", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "6759", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6760", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "6761", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6762", + "name": "nodeTypeName", + "nameInRequest": "nodeTypeName", + "doc": "The name of the node type.", + "type": { + "$id": "6763", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6764", + "name": "parameters", + "nameInRequest": "resource", + "doc": "The node type resource.", + "type": { + "$ref": "1791" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6765", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "6766", + "kind": "constant", + "valueType": { + "$id": "6767", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6768", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "6769", + "kind": "constant", + "valueType": { + "$id": "6770", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "6771", + "type": { + "$ref": "1791" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypes.createOrUpdate" + }, + { + "$id": "6772", + "kind": "lro", + "name": "update", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Update the configuration of a node type of a given managed cluster, only updating tags.", + "operation": { + "$id": "6773", + "name": "update", + "resourceName": "NodeType", + "doc": "Update the configuration of a node type of a given managed cluster, only updating tags.", + "accessibility": "public", + "parameters": [ + { + "$id": "6774", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "6775", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "6776", + "type": { + "$id": "6777", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6778", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "6779", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6780", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "6781", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6782", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "6783", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6784", + "name": "nodeTypeName", + "nameInRequest": "nodeTypeName", + "doc": "The name of the node type.", + "type": { + "$id": "6785", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6786", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "6787", + "kind": "constant", + "valueType": { + "$id": "6788", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6789", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "6790", + "kind": "constant", + "valueType": { + "$id": "6791", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6792", + "name": "parameters", + "nameInRequest": "parameters", + "doc": "The parameters to update the node type configuration.", + "type": { + "$ref": "2263" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "6793", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1791" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + { + "$id": "6794", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "6795", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "6796", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "6797", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + } + }, + { + "$id": "6798", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "6799", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false + } + ], + "httpMethod": "PATCH", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "longRunning": { + "$id": "6800", + "finalStateVia": 1, + "finalResponse": { + "$id": "6801", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1791" + } + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": false, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypes.update", + "decorators": [], + "examples": [ + { + "$id": "6802", + "kind": "http", + "name": "Patch a node type while auto-scaling", + "description": "Patch a node type while auto-scaling", + "filePath": "2025-03-01-preview/NodeTypePatchOperationAutoScale_example.json", + "parameters": [ + { + "$id": "6803", + "parameter": { + "$ref": "6774" + }, + "value": { + "$id": "6804", + "kind": "string", + "type": { + "$ref": "6775" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "6805", + "parameter": { + "$ref": "6782" + }, + "value": { + "$id": "6806", + "kind": "string", + "type": { + "$ref": "6783" + }, + "value": "myCluster" + } + }, + { + "$id": "6807", + "parameter": { + "$ref": "6784" + }, + "value": { + "$id": "6808", + "kind": "string", + "type": { + "$ref": "6785" + }, + "value": "BE" + } + }, + { + "$id": "6809", + "parameter": { + "$ref": "6780" + }, + "value": { + "$id": "6810", + "kind": "string", + "type": { + "$ref": "6781" + }, + "value": "resRg" + } + }, + { + "$id": "6811", + "parameter": { + "$ref": "6778" + }, + "value": { + "$id": "6812", + "kind": "string", + "type": { + "$ref": "6779" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "6813", + "response": { + "$ref": "6793" + }, + "statusCode": 200, + "bodyValue": { + "$id": "6814", + "kind": "model", + "type": { + "$ref": "1791" + }, + "value": { + "$id": "6815", + "name": { + "$id": "6816", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "BE" + }, + "type": { + "$id": "6817", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/nodeTypes" + }, + "id": { + "$id": "6818", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster/nodeTypes/BE" + }, + "properties": { + "$id": "6819", + "kind": "model", + "type": { + "$ref": "1793" + }, + "value": { + "$id": "6820", + "capacities": { + "$id": "6821", + "kind": "dict", + "type": { + "$ref": "1820" + }, + "value": { + "$id": "6822", + "ClientConnections": { + "$id": "6823", + "kind": "string", + "type": { + "$ref": "1822" + }, + "value": "65536" + } + } + }, + "dataDiskSizeGB": { + "$id": "6824", + "kind": "number", + "type": { + "$ref": "1803" + }, + "value": 200 + }, + "dataDiskType": { + "$id": "6825", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "StandardSSD_LRS" + }, + "isPrimary": { + "$id": "6826", + "kind": "boolean", + "type": { + "$ref": "1795" + }, + "value": false + }, + "isStateless": { + "$id": "6827", + "kind": "boolean", + "type": { + "$ref": "1954" + }, + "value": false + }, + "placementProperties": { + "$id": "6828", + "kind": "dict", + "type": { + "$ref": "1814" + }, + "value": { + "$id": "6829", + "HasSSD": { + "$id": "6830", + "kind": "string", + "type": { + "$ref": "1816" + }, + "value": "true" + }, + "NodeColor": { + "$id": "6831", + "kind": "string", + "type": { + "$ref": "1816" + }, + "value": "green" + }, + "SomeProperty": { + "$id": "6832", + "kind": "string", + "type": { + "$ref": "1816" + }, + "value": "5" + } + } + }, + "provisioningState": { + "$id": "6833", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Succeeded" + }, + "vmExtensions": { + "$id": "6834", + "kind": "array", + "type": { + "$ref": "1887" + }, + "value": [ + { + "$id": "6835", + "kind": "model", + "type": { + "$ref": "1888" + }, + "value": { + "$id": "6836", + "name": { + "$id": "6837", + "kind": "string", + "type": { + "$ref": "1890" + }, + "value": "Microsoft.Azure.Geneva.GenevaMonitoring" + }, + "properties": { + "$id": "6838", + "kind": "model", + "type": { + "$ref": "1894" + }, + "value": { + "$id": "6839", + "type": { + "$id": "6840", + "kind": "string", + "type": { + "$ref": "1900" + }, + "value": "GenevaMonitoring" + }, + "autoUpgradeMinorVersion": { + "$id": "6841", + "kind": "boolean", + "type": { + "$ref": "1908" + }, + "value": true + }, + "publisher": { + "$id": "6842", + "kind": "string", + "type": { + "$ref": "1896" + }, + "value": "Microsoft.Azure.Geneva" + }, + "settings": { + "$id": "6843", + "kind": "model", + "type": { + "$ref": "1912" + }, + "value": { + "$id": "6844" + } + }, + "typeHandlerVersion": { + "$id": "6845", + "kind": "string", + "type": { + "$ref": "1904" + }, + "value": "2.0" + } + } + } + } + } + ] + }, + "vmImageOffer": { + "$id": "6846", + "kind": "string", + "type": { + "$ref": "1849" + }, + "value": "WindowsServer" + }, + "vmImagePublisher": { + "$id": "6847", + "kind": "string", + "type": { + "$ref": "1845" + }, + "value": "MicrosoftWindowsServer" + }, + "vmImageSku": { + "$id": "6848", + "kind": "string", + "type": { + "$ref": "1853" + }, + "value": "2016-Datacenter-Server-Core" + }, + "vmImageVersion": { + "$id": "6849", + "kind": "string", + "type": { + "$ref": "1857" + }, + "value": "latest" + }, + "vmInstanceCount": { + "$id": "6850", + "kind": "number", + "type": { + "$ref": "1799" + }, + "value": 10 + }, + "vmManagedIdentity": { + "$id": "6851", + "kind": "model", + "type": { + "$ref": "1945" + }, + "value": { + "$id": "6852", + "userAssignedIdentities": { + "$id": "6853", + "kind": "array", + "type": { + "$ref": "1947" + }, + "value": [ + { + "$id": "6854", + "kind": "string", + "type": { + "$ref": "1948" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity" + } + ] + } + } + }, + "vmSecrets": { + "$id": "6855", + "kind": "array", + "type": { + "$ref": "1861" + }, + "value": [ + { + "$id": "6856", + "kind": "model", + "type": { + "$ref": "1862" + }, + "value": { + "$id": "6857", + "sourceVault": { + "$id": "6858", + "kind": "model", + "type": { + "$ref": "1864" + }, + "value": { + "$id": "6859", + "id": { + "$id": "6860", + "kind": "string", + "type": { + "$ref": "1866" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.KeyVault/vaults/myVault" + } + } + }, + "vaultCertificates": { + "$id": "6861", + "kind": "array", + "type": { + "$ref": "1872" + }, + "value": [ + { + "$id": "6862", + "kind": "model", + "type": { + "$ref": "1873" + }, + "value": { + "$id": "6863", + "certificateStore": { + "$id": "6864", + "kind": "string", + "type": { + "$ref": "1879" + }, + "value": "My" + }, + "certificateUrl": { + "$id": "6865", + "kind": "string", + "type": { + "$ref": "1875" + }, + "value": "https://myVault.vault.azure.net:443/secrets/myCert/ef1a31d39e1f46bca33def54b6cda54c" + } + } + } + ] + } + } + } + ] + }, + "vmSize": { + "$id": "6866", + "kind": "string", + "type": { + "$ref": "1841" + }, + "value": "Standard_D3" + } + } + }, + "sku": { + "$id": "6867", + "kind": "model", + "type": { + "$ref": "2248" + }, + "value": { + "$id": "6868", + "name": { + "$id": "6869", + "kind": "string", + "type": { + "$ref": "2250" + }, + "value": "Standard_S0" + }, + "capacity": { + "$id": "6870", + "kind": "number", + "type": { + "$ref": "2258" + }, + "value": 10 + }, + "tier": { + "$id": "6871", + "kind": "string", + "type": { + "$ref": "2254" + }, + "value": "Standard" + } + } + }, + "tags": { + "$id": "6872", + "kind": "dict", + "type": { + "$ref": "2242" + }, + "value": { + "$id": "6873", + "a": { + "$id": "6874", + "kind": "string", + "type": { + "$ref": "2244" + }, + "value": "b" + } + } + } + } + } + }, + { + "$id": "6875", + "response": { + "$ref": "6794" + }, + "statusCode": 202 + } + ] + }, + { + "$id": "6876", + "kind": "http", + "name": "Patch a node type", + "description": "Patch a node type", + "filePath": "2025-03-01-preview/NodeTypePatchOperation_example.json", + "parameters": [ + { + "$id": "6877", + "parameter": { + "$ref": "6774" + }, + "value": { + "$id": "6878", + "kind": "string", + "type": { + "$ref": "6775" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "6879", + "parameter": { + "$ref": "6782" + }, + "value": { + "$id": "6880", + "kind": "string", + "type": { + "$ref": "6783" + }, + "value": "myCluster" + } + }, + { + "$id": "6881", + "parameter": { + "$ref": "6784" + }, + "value": { + "$id": "6882", + "kind": "string", + "type": { + "$ref": "6785" + }, + "value": "BE" + } + }, + { + "$id": "6883", + "parameter": { + "$ref": "6780" + }, + "value": { + "$id": "6884", + "kind": "string", + "type": { + "$ref": "6781" + }, + "value": "resRg" + } + }, + { + "$id": "6885", + "parameter": { + "$ref": "6778" + }, + "value": { + "$id": "6886", + "kind": "string", + "type": { + "$ref": "6779" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "6887", + "response": { + "$ref": "6793" + }, + "statusCode": 200, + "bodyValue": { + "$id": "6888", + "kind": "model", + "type": { + "$ref": "1791" + }, + "value": { + "$id": "6889", + "name": { + "$id": "6890", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "BE" + }, + "type": { + "$id": "6891", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/nodeTypes" + }, + "id": { + "$id": "6892", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster/nodeTypes/BE" + }, + "properties": { + "$id": "6893", + "kind": "model", + "type": { + "$ref": "1793" + }, + "value": { + "$id": "6894", + "capacities": { + "$id": "6895", + "kind": "dict", + "type": { + "$ref": "1820" + }, + "value": { + "$id": "6896", + "ClientConnections": { + "$id": "6897", + "kind": "string", + "type": { + "$ref": "1822" + }, + "value": "65536" + } + } + }, + "dataDiskSizeGB": { + "$id": "6898", + "kind": "number", + "type": { + "$ref": "1803" + }, + "value": 200 + }, + "dataDiskType": { + "$id": "6899", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "StandardSSD_LRS" + }, + "isPrimary": { + "$id": "6900", + "kind": "boolean", + "type": { + "$ref": "1795" + }, + "value": false + }, + "isStateless": { + "$id": "6901", + "kind": "boolean", + "type": { + "$ref": "1954" + }, + "value": false + }, + "placementProperties": { + "$id": "6902", + "kind": "dict", + "type": { + "$ref": "1814" + }, + "value": { + "$id": "6903", + "HasSSD": { + "$id": "6904", + "kind": "string", + "type": { + "$ref": "1816" + }, + "value": "true" + }, + "NodeColor": { + "$id": "6905", + "kind": "string", + "type": { + "$ref": "1816" + }, + "value": "green" + }, + "SomeProperty": { + "$id": "6906", + "kind": "string", + "type": { + "$ref": "1816" + }, + "value": "5" + } + } + }, + "provisioningState": { + "$id": "6907", + "kind": "string", + "type": { + "$ref": "176" + }, + "value": "Succeeded" + }, + "vmExtensions": { + "$id": "6908", + "kind": "array", + "type": { + "$ref": "1887" + }, + "value": [ + { + "$id": "6909", + "kind": "model", + "type": { + "$ref": "1888" + }, + "value": { + "$id": "6910", + "name": { + "$id": "6911", + "kind": "string", + "type": { + "$ref": "1890" + }, + "value": "Microsoft.Azure.Geneva.GenevaMonitoring" + }, + "properties": { + "$id": "6912", + "kind": "model", + "type": { + "$ref": "1894" + }, + "value": { + "$id": "6913", + "type": { + "$id": "6914", + "kind": "string", + "type": { + "$ref": "1900" + }, + "value": "GenevaMonitoring" + }, + "autoUpgradeMinorVersion": { + "$id": "6915", + "kind": "boolean", + "type": { + "$ref": "1908" + }, + "value": true + }, + "publisher": { + "$id": "6916", + "kind": "string", + "type": { + "$ref": "1896" + }, + "value": "Microsoft.Azure.Geneva" + }, + "settings": { + "$id": "6917", + "kind": "model", + "type": { + "$ref": "1912" + }, + "value": { + "$id": "6918" + } + }, + "typeHandlerVersion": { + "$id": "6919", + "kind": "string", + "type": { + "$ref": "1904" + }, + "value": "2.0" + } + } + } + } + } + ] + }, + "vmImageOffer": { + "$id": "6920", + "kind": "string", + "type": { + "$ref": "1849" + }, + "value": "WindowsServer" + }, + "vmImagePublisher": { + "$id": "6921", + "kind": "string", + "type": { + "$ref": "1845" + }, + "value": "MicrosoftWindowsServer" + }, + "vmImageSku": { + "$id": "6922", + "kind": "string", + "type": { + "$ref": "1853" + }, + "value": "2016-Datacenter-Server-Core" + }, + "vmImageVersion": { + "$id": "6923", + "kind": "string", + "type": { + "$ref": "1857" + }, + "value": "latest" + }, + "vmInstanceCount": { + "$id": "6924", + "kind": "number", + "type": { + "$ref": "1799" + }, + "value": 10 + }, + "vmManagedIdentity": { + "$id": "6925", + "kind": "model", + "type": { + "$ref": "1945" + }, + "value": { + "$id": "6926", + "userAssignedIdentities": { + "$id": "6927", + "kind": "array", + "type": { + "$ref": "1947" + }, + "value": [ + { + "$id": "6928", + "kind": "string", + "type": { + "$ref": "1948" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity" + } + ] + } + } + }, + "vmSecrets": { + "$id": "6929", + "kind": "array", + "type": { + "$ref": "1861" + }, + "value": [ + { + "$id": "6930", + "kind": "model", + "type": { + "$ref": "1862" + }, + "value": { + "$id": "6931", + "sourceVault": { + "$id": "6932", + "kind": "model", + "type": { + "$ref": "1864" + }, + "value": { + "$id": "6933", + "id": { + "$id": "6934", + "kind": "string", + "type": { + "$ref": "1866" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.KeyVault/vaults/myVault" + } + } + }, + "vaultCertificates": { + "$id": "6935", + "kind": "array", + "type": { + "$ref": "1872" + }, + "value": [ + { + "$id": "6936", + "kind": "model", + "type": { + "$ref": "1873" + }, + "value": { + "$id": "6937", + "certificateStore": { + "$id": "6938", + "kind": "string", + "type": { + "$ref": "1879" + }, + "value": "My" + }, + "certificateUrl": { + "$id": "6939", + "kind": "string", + "type": { + "$ref": "1875" + }, + "value": "https://myVault.vault.azure.net:443/secrets/myCert/ef1a31d39e1f46bca33def54b6cda54c" + } + } + } + ] + } + } + } + ] + }, + "vmSize": { + "$id": "6940", + "kind": "string", + "type": { + "$ref": "1841" + }, + "value": "Standard_D3" + } + } + }, + "tags": { + "$id": "6941", + "kind": "dict", + "type": { + "$ref": "2242" + }, + "value": { + "$id": "6942", + "a": { + "$id": "6943", + "kind": "string", + "type": { + "$ref": "2244" + }, + "value": "b" + } + } + } + } + } + }, + { + "$id": "6944", + "response": { + "$ref": "6794" + }, + "statusCode": 202 + } + ] + } + ] + }, + "parameters": [ + { + "$id": "6945", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "6946", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6947", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "6948", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6949", + "name": "nodeTypeName", + "nameInRequest": "nodeTypeName", + "doc": "The name of the node type.", + "type": { + "$id": "6950", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6951", + "name": "parameters", + "nameInRequest": "properties", + "doc": "The parameters to update the node type configuration.", + "type": { + "$ref": "2263" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6952", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "6953", + "kind": "constant", + "valueType": { + "$id": "6954", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6955", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "6956", + "kind": "constant", + "valueType": { + "$id": "6957", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "6958", + "type": { + "$ref": "1791" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypes.update" + }, + { + "$id": "6959", + "kind": "lro", + "name": "delete", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Delete a Service Fabric node type of a given managed cluster.", + "operation": { + "$id": "6960", + "name": "delete", + "resourceName": "NodeType", + "doc": "Delete a Service Fabric node type of a given managed cluster.", + "accessibility": "public", + "parameters": [ + { + "$id": "6961", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "6962", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "6963", + "type": { + "$id": "6964", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6965", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "6966", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6967", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "6968", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6969", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "6970", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6971", + "name": "nodeTypeName", + "nameInRequest": "nodeTypeName", + "doc": "The name of the node type.", + "type": { + "$id": "6972", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "6973", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "6974", + "kind": "constant", + "valueType": { + "$id": "6975", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "6976", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "6977", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "6978", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "6979", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + } + }, + { + "$id": "6980", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "6981", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false + }, + { + "$id": "6982", + "statusCodes": [ + 204 + ], + "headers": [], + "isErrorResponse": false + } + ], + "httpMethod": "DELETE", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}", + "bufferResponse": true, + "longRunning": { + "$id": "6983", + "finalStateVia": 1, + "finalResponse": { + "$id": "6984", + "statusCodes": [ + 204 + ] + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypes.delete", + "decorators": [], + "examples": [ + { + "$id": "6985", + "kind": "http", + "name": "Delete a node type", + "description": "Delete a node type", + "filePath": "2025-03-01-preview/NodeTypeDeleteOperation_example.json", + "parameters": [ + { + "$id": "6986", + "parameter": { + "$ref": "6961" + }, + "value": { + "$id": "6987", + "kind": "string", + "type": { + "$ref": "6962" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "6988", + "parameter": { + "$ref": "6969" + }, + "value": { + "$id": "6989", + "kind": "string", + "type": { + "$ref": "6970" + }, + "value": "myCluster" + } + }, + { + "$id": "6990", + "parameter": { + "$ref": "6971" + }, + "value": { + "$id": "6991", + "kind": "string", + "type": { + "$ref": "6972" + }, + "value": "BE" + } + }, + { + "$id": "6992", + "parameter": { + "$ref": "6967" + }, + "value": { + "$id": "6993", + "kind": "string", + "type": { + "$ref": "6968" + }, + "value": "resRg" + } + }, + { + "$id": "6994", + "parameter": { + "$ref": "6965" + }, + "value": { + "$id": "6995", + "kind": "string", + "type": { + "$ref": "6966" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "6996", + "response": { + "$ref": "6976" + }, + "statusCode": 202 + }, + { + "$id": "6997", + "response": { + "$ref": "6982" + }, + "statusCode": 204 + } + ] + } + ] + }, + "parameters": [ + { + "$id": "6998", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "6999", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7000", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "7001", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7002", + "name": "nodeTypeName", + "nameInRequest": "nodeTypeName", + "doc": "The name of the node type.", + "type": { + "$id": "7003", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7004", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "7005", + "kind": "constant", + "valueType": { + "$id": "7006", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "7007" + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypes.delete" + }, + { + "$id": "7008", + "kind": "paging", + "name": "listByManagedClusters", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Gets all Node types of the specified managed cluster.", + "operation": { + "$id": "7009", + "name": "listByManagedClusters", + "resourceName": "NodeType", + "doc": "Gets all Node types of the specified managed cluster.", + "accessibility": "public", + "parameters": [ + { + "$id": "7010", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "7011", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "7012", + "type": { + "$id": "7013", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7014", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "7015", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7016", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "7017", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7018", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "7019", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7020", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "7021", + "kind": "constant", + "valueType": { + "$id": "7022", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "7023", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "2273" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes", + "bufferResponse": true, + "paging": { + "$id": "7024", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "7025", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypes.listByManagedClusters", + "decorators": [], + "examples": [ + { + "$id": "7026", + "kind": "http", + "name": "List node type of the specified managed cluster", + "description": "List node type of the specified managed cluster", + "filePath": "2025-03-01-preview/NodeTypeListOperation_example.json", + "parameters": [ + { + "$id": "7027", + "parameter": { + "$ref": "7010" + }, + "value": { + "$id": "7028", + "kind": "string", + "type": { + "$ref": "7011" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "7029", + "parameter": { + "$ref": "7018" + }, + "value": { + "$id": "7030", + "kind": "string", + "type": { + "$ref": "7019" + }, + "value": "myCluster" + } + }, + { + "$id": "7031", + "parameter": { + "$ref": "7016" + }, + "value": { + "$id": "7032", + "kind": "string", + "type": { + "$ref": "7017" + }, + "value": "resRg" + } + }, + { + "$id": "7033", + "parameter": { + "$ref": "7014" + }, + "value": { + "$id": "7034", + "kind": "string", + "type": { + "$ref": "7015" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "7035", + "response": { + "$ref": "7023" + }, + "statusCode": 200, + "bodyValue": { + "$id": "7036", + "kind": "model", + "type": { + "$ref": "2273" + }, + "value": { + "$id": "7037", + "nextLink": { + "$id": "7038", + "kind": "string", + "type": { + "$ref": "2279" + }, + "value": "http://examplelink.com" + }, + "value": { + "$id": "7039", + "kind": "array", + "type": { + "$ref": "2275" + }, + "value": [ + { + "$id": "7040", + "kind": "model", + "type": { + "$ref": "1791" + }, + "value": { + "$id": "7041", + "name": { + "$id": "7042", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "FE" + }, + "type": { + "$id": "7043", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/nodeTypes" + }, + "id": { + "$id": "7044", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster/nodeTypes/FE" + }, + "properties": { + "$id": "7045", + "kind": "model", + "type": { + "$ref": "1793" + }, + "value": { + "$id": "7046", + "capacities": { + "$id": "7047", + "kind": "dict", + "type": { + "$ref": "1820" + }, + "value": { + "$id": "7048" + } + }, + "dataDiskSizeGB": { + "$id": "7049", + "kind": "number", + "type": { + "$ref": "1803" + }, + "value": 100 + }, + "dataDiskType": { + "$id": "7050", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "StandardSSD_LRS" + }, + "isPrimary": { + "$id": "7051", + "kind": "boolean", + "type": { + "$ref": "1795" + }, + "value": true + }, + "isStateless": { + "$id": "7052", + "kind": "boolean", + "type": { + "$ref": "1954" + }, + "value": false + }, + "placementProperties": { + "$id": "7053", + "kind": "dict", + "type": { + "$ref": "1814" + }, + "value": { + "$id": "7054" + } + }, + "vmImageOffer": { + "$id": "7055", + "kind": "string", + "type": { + "$ref": "1849" + }, + "value": "WindowsServer" + }, + "vmImagePublisher": { + "$id": "7056", + "kind": "string", + "type": { + "$ref": "1845" + }, + "value": "MicrosoftWindowsServer" + }, + "vmImageSku": { + "$id": "7057", + "kind": "string", + "type": { + "$ref": "1853" + }, + "value": "2016-Datacenter" + }, + "vmImageVersion": { + "$id": "7058", + "kind": "string", + "type": { + "$ref": "1857" + }, + "value": "latest" + }, + "vmInstanceCount": { + "$id": "7059", + "kind": "number", + "type": { + "$ref": "1799" + }, + "value": 5 + }, + "vmSize": { + "$id": "7060", + "kind": "string", + "type": { + "$ref": "1841" + }, + "value": "Standard_D2" + } + } + }, + "sku": { + "$id": "7061", + "kind": "model", + "type": { + "$ref": "2248" + }, + "value": { + "$id": "7062", + "name": { + "$id": "7063", + "kind": "string", + "type": { + "$ref": "2250" + }, + "value": "Standard_P0" + }, + "capacity": { + "$id": "7064", + "kind": "number", + "type": { + "$ref": "2258" + }, + "value": 5 + }, + "tier": { + "$id": "7065", + "kind": "string", + "type": { + "$ref": "2254" + }, + "value": "Standard" + } + } + }, + "tags": { + "$id": "7066", + "kind": "dict", + "type": { + "$ref": "2242" + }, + "value": { + "$id": "7067" + } + } + } + }, + { + "$id": "7068", + "kind": "model", + "type": { + "$ref": "1791" + }, + "value": { + "$id": "7069", + "name": { + "$id": "7070", + "kind": "string", + "type": { + "$ref": "449" + }, + "value": "BE" + }, + "type": { + "$id": "7071", + "kind": "string", + "type": { + "$ref": "453" + }, + "value": "Microsoft.ServiceFabric/managedClusters/nodeTypes" + }, + "id": { + "$id": "7072", + "kind": "string", + "type": { + "$ref": "445" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedClusters/myCluster/nodeTypes/BE" + }, + "properties": { + "$id": "7073", + "kind": "model", + "type": { + "$ref": "1793" + }, + "value": { + "$id": "7074", + "capacities": { + "$id": "7075", + "kind": "dict", + "type": { + "$ref": "1820" + }, + "value": { + "$id": "7076" + } + }, + "dataDiskSizeGB": { + "$id": "7077", + "kind": "number", + "type": { + "$ref": "1803" + }, + "value": 200 + }, + "dataDiskType": { + "$id": "7078", + "kind": "string", + "type": { + "$ref": "286" + }, + "value": "Premium_LRS" + }, + "isPrimary": { + "$id": "7079", + "kind": "boolean", + "type": { + "$ref": "1795" + }, + "value": false + }, + "isStateless": { + "$id": "7080", + "kind": "boolean", + "type": { + "$ref": "1954" + }, + "value": false + }, + "placementProperties": { + "$id": "7081", + "kind": "dict", + "type": { + "$ref": "1814" + }, + "value": { + "$id": "7082" + } + }, + "vmExtensions": { + "$id": "7083", + "kind": "array", + "type": { + "$ref": "1887" + }, + "value": [ + { + "$id": "7084", + "kind": "model", + "type": { + "$ref": "1888" + }, + "value": { + "$id": "7085", + "name": { + "$id": "7086", + "kind": "string", + "type": { + "$ref": "1890" + }, + "value": "Microsoft.Azure.Geneva.GenevaMonitoring" + }, + "properties": { + "$id": "7087", + "kind": "model", + "type": { + "$ref": "1894" + }, + "value": { + "$id": "7088", + "type": { + "$id": "7089", + "kind": "string", + "type": { + "$ref": "1900" + }, + "value": "GenevaMonitoring" + }, + "autoUpgradeMinorVersion": { + "$id": "7090", + "kind": "boolean", + "type": { + "$ref": "1908" + }, + "value": true + }, + "publisher": { + "$id": "7091", + "kind": "string", + "type": { + "$ref": "1896" + }, + "value": "Microsoft.Azure.Geneva" + }, + "settings": { + "$id": "7092", + "kind": "model", + "type": { + "$ref": "1912" + }, + "value": { + "$id": "7093" + } + }, + "typeHandlerVersion": { + "$id": "7094", + "kind": "string", + "type": { + "$ref": "1904" + }, + "value": "2.0" + } + } + } + } + } + ] + }, + "vmImageOffer": { + "$id": "7095", + "kind": "string", + "type": { + "$ref": "1849" + }, + "value": "WindowsServer" + }, + "vmImagePublisher": { + "$id": "7096", + "kind": "string", + "type": { + "$ref": "1845" + }, + "value": "MicrosoftWindowsServer" + }, + "vmImageSku": { + "$id": "7097", + "kind": "string", + "type": { + "$ref": "1853" + }, + "value": "2016-Datacenter-Server-Core" + }, + "vmImageVersion": { + "$id": "7098", + "kind": "string", + "type": { + "$ref": "1857" + }, + "value": "latest" + }, + "vmInstanceCount": { + "$id": "7099", + "kind": "number", + "type": { + "$ref": "1799" + }, + "value": 10 + }, + "vmSecrets": { + "$id": "7100", + "kind": "array", + "type": { + "$ref": "1861" + }, + "value": [ + { + "$id": "7101", + "kind": "model", + "type": { + "$ref": "1862" + }, + "value": { + "$id": "7102", + "sourceVault": { + "$id": "7103", + "kind": "model", + "type": { + "$ref": "1864" + }, + "value": { + "$id": "7104", + "id": { + "$id": "7105", + "kind": "string", + "type": { + "$ref": "1866" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.KeyVault/vaults/myVault" + } + } + }, + "vaultCertificates": { + "$id": "7106", + "kind": "array", + "type": { + "$ref": "1872" + }, + "value": [ + { + "$id": "7107", + "kind": "model", + "type": { + "$ref": "1873" + }, + "value": { + "$id": "7108", + "certificateStore": { + "$id": "7109", + "kind": "string", + "type": { + "$ref": "1879" + }, + "value": "My" + }, + "certificateUrl": { + "$id": "7110", + "kind": "string", + "type": { + "$ref": "1875" + }, + "value": "https://myVault.vault.azure.net:443/secrets/myCert/ef1a31d39e1f46bca33def54b6cda54c" + } + } + } + ] + } + } + } + ] + }, + "vmSize": { + "$id": "7111", + "kind": "string", + "type": { + "$ref": "1841" + }, + "value": "Standard_DS3" + } + } + }, + "sku": { + "$id": "7112", + "kind": "model", + "type": { + "$ref": "2248" + }, + "value": { + "$id": "7113", + "name": { + "$id": "7114", + "kind": "string", + "type": { + "$ref": "2250" + }, + "value": "Standard_S0" + }, + "capacity": { + "$id": "7115", + "kind": "number", + "type": { + "$ref": "2258" + }, + "value": 10 + }, + "tier": { + "$id": "7116", + "kind": "string", + "type": { + "$ref": "2254" + }, + "value": "Standard" + } + } + }, + "tags": { + "$id": "7117", + "kind": "dict", + "type": { + "$ref": "2242" + }, + "value": { + "$id": "7118" + } + } + } + } + ] + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "7119", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "7120", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7121", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "7122", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7123", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "7021" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "7124", + "type": { + "$id": "7125", + "kind": "array", + "name": "ArrayNodeType", + "valueType": { + "$ref": "1791" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "resultSegments": [ + "value" + ] + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypes.listByManagedClusters" + }, + { + "$id": "7126", + "kind": "lro", + "name": "deallocate", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Deallocates one or more nodes on the node type. It will disable the fabric nodes, trigger a shutdown on the VMs and release them from the cluster.", + "operation": { + "$id": "7127", + "name": "deallocate", + "resourceName": "NodeTypes", + "doc": "Deallocates one or more nodes on the node type. It will disable the fabric nodes, trigger a shutdown on the VMs and release them from the cluster.", + "accessibility": "public", + "parameters": [ + { + "$id": "7128", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "7129", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "7130", + "type": { + "$id": "7131", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7132", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "7133", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7134", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "7135", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7136", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "7137", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7138", + "name": "nodeTypeName", + "nameInRequest": "nodeTypeName", + "doc": "The name of the node type.", + "type": { + "$id": "7139", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7140", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "7141", + "kind": "constant", + "valueType": { + "$id": "7142", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7143", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "7144", + "kind": "constant", + "valueType": { + "$id": "7145", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7146", + "name": "parameters", + "nameInRequest": "parameters", + "doc": "parameters for deallocate action.", + "type": { + "$ref": "2283" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "7147", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "7148", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "7149", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "7150", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + } + }, + { + "$id": "7151", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "7152", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/deallocate", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "longRunning": { + "$id": "7153", + "finalStateVia": 1, + "finalResponse": { + "$id": "7154", + "statusCodes": [ + 200 + ] + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypes.deallocate", + "decorators": [], + "examples": [ + { + "$id": "7155", + "kind": "http", + "name": "Deallocate nodes", + "description": "Deallocate nodes", + "filePath": "2025-03-01-preview/DeallocateNodes_example.json", + "parameters": [ + { + "$id": "7156", + "parameter": { + "$ref": "7128" + }, + "value": { + "$id": "7157", + "kind": "string", + "type": { + "$ref": "7129" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "7158", + "parameter": { + "$ref": "7136" + }, + "value": { + "$id": "7159", + "kind": "string", + "type": { + "$ref": "7137" + }, + "value": "myCluster" + } + }, + { + "$id": "7160", + "parameter": { + "$ref": "7138" + }, + "value": { + "$id": "7161", + "kind": "string", + "type": { + "$ref": "7139" + }, + "value": "BE" + } + }, + { + "$id": "7162", + "parameter": { + "$ref": "7134" + }, + "value": { + "$id": "7163", + "kind": "string", + "type": { + "$ref": "7135" + }, + "value": "resRg" + } + }, + { + "$id": "7164", + "parameter": { + "$ref": "7132" + }, + "value": { + "$id": "7165", + "kind": "string", + "type": { + "$ref": "7133" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "7166", + "response": { + "$ref": "7147" + }, + "statusCode": 202 + } + ] + } + ] + }, + "parameters": [ + { + "$id": "7167", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "7168", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7169", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "7170", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7171", + "name": "nodeTypeName", + "nameInRequest": "nodeTypeName", + "doc": "The name of the node type.", + "type": { + "$id": "7172", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7173", + "name": "parameters", + "nameInRequest": "body", + "doc": "parameters for deallocate action.", + "type": { + "$ref": "2283" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7174", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "7175", + "kind": "constant", + "valueType": { + "$id": "7176", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7177", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "7178", + "kind": "constant", + "valueType": { + "$id": "7179", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "7180" + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypes.deallocate" + }, + { + "$id": "7181", + "kind": "lro", + "name": "deleteNode", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and removes the state from the cluster.", + "operation": { + "$id": "7182", + "name": "deleteNode", + "resourceName": "NodeTypes", + "doc": "Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and removes the state from the cluster.", + "accessibility": "public", + "parameters": [ + { + "$id": "7183", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "7184", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "7185", + "type": { + "$id": "7186", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7187", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "7188", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7189", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "7190", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7191", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "7192", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7193", + "name": "nodeTypeName", + "nameInRequest": "nodeTypeName", + "doc": "The name of the node type.", + "type": { + "$id": "7194", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7195", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "7196", + "kind": "constant", + "valueType": { + "$id": "7197", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7198", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "7199", + "kind": "constant", + "valueType": { + "$id": "7200", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7201", + "name": "parameters", + "nameInRequest": "parameters", + "doc": "parameters for delete action.", + "type": { + "$ref": "2283" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "7202", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "7203", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "7204", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "7205", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + } + }, + { + "$id": "7206", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "7207", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/deleteNode", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "longRunning": { + "$id": "7208", + "finalStateVia": 1, + "finalResponse": { + "$id": "7209", + "statusCodes": [ + 200 + ] + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypes.deleteNode", + "decorators": [], + "examples": [ + { + "$id": "7210", + "kind": "http", + "name": "Delete nodes", + "description": "Delete nodes", + "filePath": "2025-03-01-preview/DeleteNodes_example.json", + "parameters": [ + { + "$id": "7211", + "parameter": { + "$ref": "7183" + }, + "value": { + "$id": "7212", + "kind": "string", + "type": { + "$ref": "7184" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "7213", + "parameter": { + "$ref": "7191" + }, + "value": { + "$id": "7214", + "kind": "string", + "type": { + "$ref": "7192" + }, + "value": "myCluster" + } + }, + { + "$id": "7215", + "parameter": { + "$ref": "7193" + }, + "value": { + "$id": "7216", + "kind": "string", + "type": { + "$ref": "7194" + }, + "value": "BE" + } + }, + { + "$id": "7217", + "parameter": { + "$ref": "7189" + }, + "value": { + "$id": "7218", + "kind": "string", + "type": { + "$ref": "7190" + }, + "value": "resRg" + } + }, + { + "$id": "7219", + "parameter": { + "$ref": "7187" + }, + "value": { + "$id": "7220", + "kind": "string", + "type": { + "$ref": "7188" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "7221", + "response": { + "$ref": "7202" + }, + "statusCode": 202 + } + ] + } + ] + }, + "parameters": [ + { + "$id": "7222", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "7223", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7224", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "7225", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7226", + "name": "nodeTypeName", + "nameInRequest": "nodeTypeName", + "doc": "The name of the node type.", + "type": { + "$id": "7227", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7228", + "name": "parameters", + "nameInRequest": "body", + "doc": "parameters for delete action.", + "type": { + "$ref": "2283" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7229", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "7230", + "kind": "constant", + "valueType": { + "$id": "7231", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7232", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "7233", + "kind": "constant", + "valueType": { + "$id": "7234", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "7235" + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypes.deleteNode" + }, + { + "$id": "7236", + "kind": "lro", + "name": "redeploy", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "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.", + "operation": { + "$id": "7237", + "name": "redeploy", + "resourceName": "NodeTypes", + "doc": "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.", + "accessibility": "public", + "parameters": [ + { + "$id": "7238", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "7239", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "7240", + "type": { + "$id": "7241", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7242", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "7243", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7244", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "7245", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7246", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "7247", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7248", + "name": "nodeTypeName", + "nameInRequest": "nodeTypeName", + "doc": "The name of the node type.", + "type": { + "$id": "7249", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7250", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "7251", + "kind": "constant", + "valueType": { + "$id": "7252", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7253", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "7254", + "kind": "constant", + "valueType": { + "$id": "7255", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7256", + "name": "parameters", + "nameInRequest": "parameters", + "doc": "parameters for redeploy action.", + "type": { + "$ref": "2283" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "7257", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "7258", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "7259", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "7260", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + } + }, + { + "$id": "7261", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "7262", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/redeploy", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "longRunning": { + "$id": "7263", + "finalStateVia": 1, + "finalResponse": { + "$id": "7264", + "statusCodes": [ + 200 + ] + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypes.redeploy", + "decorators": [], + "examples": [ + { + "$id": "7265", + "kind": "http", + "name": "Redeploy all nodes by upgrade domain", + "description": "Redeploy all nodes by upgrade domain", + "filePath": "2025-03-01-preview/RedeployNodes_UD_example.json", + "parameters": [ + { + "$id": "7266", + "parameter": { + "$ref": "7238" + }, + "value": { + "$id": "7267", + "kind": "string", + "type": { + "$ref": "7239" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "7268", + "parameter": { + "$ref": "7246" + }, + "value": { + "$id": "7269", + "kind": "string", + "type": { + "$ref": "7247" + }, + "value": "myCluster" + } + }, + { + "$id": "7270", + "parameter": { + "$ref": "7248" + }, + "value": { + "$id": "7271", + "kind": "string", + "type": { + "$ref": "7249" + }, + "value": "BE" + } + }, + { + "$id": "7272", + "parameter": { + "$ref": "7244" + }, + "value": { + "$id": "7273", + "kind": "string", + "type": { + "$ref": "7245" + }, + "value": "resRg" + } + }, + { + "$id": "7274", + "parameter": { + "$ref": "7242" + }, + "value": { + "$id": "7275", + "kind": "string", + "type": { + "$ref": "7243" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "7276", + "response": { + "$ref": "7257" + }, + "statusCode": 202 + } + ] + }, + { + "$id": "7277", + "kind": "http", + "name": "Redeploy nodes", + "description": "Redeploy nodes", + "filePath": "2025-03-01-preview/RedeployNodes_example.json", + "parameters": [ + { + "$id": "7278", + "parameter": { + "$ref": "7238" + }, + "value": { + "$id": "7279", + "kind": "string", + "type": { + "$ref": "7239" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "7280", + "parameter": { + "$ref": "7246" + }, + "value": { + "$id": "7281", + "kind": "string", + "type": { + "$ref": "7247" + }, + "value": "myCluster" + } + }, + { + "$id": "7282", + "parameter": { + "$ref": "7248" + }, + "value": { + "$id": "7283", + "kind": "string", + "type": { + "$ref": "7249" + }, + "value": "BE" + } + }, + { + "$id": "7284", + "parameter": { + "$ref": "7244" + }, + "value": { + "$id": "7285", + "kind": "string", + "type": { + "$ref": "7245" + }, + "value": "resRg" + } + }, + { + "$id": "7286", + "parameter": { + "$ref": "7242" + }, + "value": { + "$id": "7287", + "kind": "string", + "type": { + "$ref": "7243" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "7288", + "response": { + "$ref": "7257" + }, + "statusCode": 202 + } + ] + } + ] + }, + "parameters": [ + { + "$id": "7289", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "7290", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7291", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "7292", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7293", + "name": "nodeTypeName", + "nameInRequest": "nodeTypeName", + "doc": "The name of the node type.", + "type": { + "$id": "7294", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7295", + "name": "parameters", + "nameInRequest": "body", + "doc": "parameters for redeploy action.", + "type": { + "$ref": "2283" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7296", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "7297", + "kind": "constant", + "valueType": { + "$id": "7298", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7299", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "7300", + "kind": "constant", + "valueType": { + "$id": "7301", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "7302" + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypes.redeploy" + }, + { + "$id": "7303", + "kind": "lro", + "name": "reimage", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and activate the nodes back again.", + "operation": { + "$id": "7304", + "name": "reimage", + "resourceName": "NodeTypes", + "doc": "Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and activate the nodes back again.", + "accessibility": "public", + "parameters": [ + { + "$id": "7305", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "7306", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "7307", + "type": { + "$id": "7308", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7309", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "7310", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7311", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "7312", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7313", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "7314", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7315", + "name": "nodeTypeName", + "nameInRequest": "nodeTypeName", + "doc": "The name of the node type.", + "type": { + "$id": "7316", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7317", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "7318", + "kind": "constant", + "valueType": { + "$id": "7319", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7320", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "7321", + "kind": "constant", + "valueType": { + "$id": "7322", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7323", + "name": "parameters", + "nameInRequest": "parameters", + "doc": "parameters for reimage action.", + "type": { + "$ref": "2283" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "7324", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "7325", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "7326", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "7327", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + } + }, + { + "$id": "7328", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "7329", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/reimage", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "longRunning": { + "$id": "7330", + "finalStateVia": 1, + "finalResponse": { + "$id": "7331", + "statusCodes": [ + 200 + ] + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypes.reimage", + "decorators": [], + "examples": [ + { + "$id": "7332", + "kind": "http", + "name": "Reimage all nodes by upgrade domain", + "description": "Reimage all nodes by upgrade domain", + "filePath": "2025-03-01-preview/ReimageNodes_UD_example.json", + "parameters": [ + { + "$id": "7333", + "parameter": { + "$ref": "7305" + }, + "value": { + "$id": "7334", + "kind": "string", + "type": { + "$ref": "7306" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "7335", + "parameter": { + "$ref": "7313" + }, + "value": { + "$id": "7336", + "kind": "string", + "type": { + "$ref": "7314" + }, + "value": "myCluster" + } + }, + { + "$id": "7337", + "parameter": { + "$ref": "7315" + }, + "value": { + "$id": "7338", + "kind": "string", + "type": { + "$ref": "7316" + }, + "value": "BE" + } + }, + { + "$id": "7339", + "parameter": { + "$ref": "7311" + }, + "value": { + "$id": "7340", + "kind": "string", + "type": { + "$ref": "7312" + }, + "value": "resRg" + } + }, + { + "$id": "7341", + "parameter": { + "$ref": "7309" + }, + "value": { + "$id": "7342", + "kind": "string", + "type": { + "$ref": "7310" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "7343", + "response": { + "$ref": "7324" + }, + "statusCode": 202 + } + ] + }, + { + "$id": "7344", + "kind": "http", + "name": "Reimage nodes", + "description": "Reimage nodes", + "filePath": "2025-03-01-preview/ReimageNodes_example.json", + "parameters": [ + { + "$id": "7345", + "parameter": { + "$ref": "7305" + }, + "value": { + "$id": "7346", + "kind": "string", + "type": { + "$ref": "7306" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "7347", + "parameter": { + "$ref": "7313" + }, + "value": { + "$id": "7348", + "kind": "string", + "type": { + "$ref": "7314" + }, + "value": "myCluster" + } + }, + { + "$id": "7349", + "parameter": { + "$ref": "7315" + }, + "value": { + "$id": "7350", + "kind": "string", + "type": { + "$ref": "7316" + }, + "value": "BE" + } + }, + { + "$id": "7351", + "parameter": { + "$ref": "7311" + }, + "value": { + "$id": "7352", + "kind": "string", + "type": { + "$ref": "7312" + }, + "value": "resRg" + } + }, + { + "$id": "7353", + "parameter": { + "$ref": "7309" + }, + "value": { + "$id": "7354", + "kind": "string", + "type": { + "$ref": "7310" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "7355", + "response": { + "$ref": "7324" + }, + "statusCode": 202 + } + ] + } + ] + }, + "parameters": [ + { + "$id": "7356", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "7357", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7358", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "7359", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7360", + "name": "nodeTypeName", + "nameInRequest": "nodeTypeName", + "doc": "The name of the node type.", + "type": { + "$id": "7361", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7362", + "name": "parameters", + "nameInRequest": "body", + "doc": "parameters for reimage action.", + "type": { + "$ref": "2283" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7363", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "7364", + "kind": "constant", + "valueType": { + "$id": "7365", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7366", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "7367", + "kind": "constant", + "valueType": { + "$id": "7368", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "7369" + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypes.reimage" + }, + { + "$id": "7370", + "kind": "lro", + "name": "restart", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and activate the nodes back again.", + "operation": { + "$id": "7371", + "name": "restart", + "resourceName": "NodeTypes", + "doc": "Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and activate the nodes back again.", + "accessibility": "public", + "parameters": [ + { + "$id": "7372", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "7373", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "7374", + "type": { + "$id": "7375", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7376", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "7377", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7378", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "7379", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7380", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "7381", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7382", + "name": "nodeTypeName", + "nameInRequest": "nodeTypeName", + "doc": "The name of the node type.", + "type": { + "$id": "7383", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7384", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "7385", + "kind": "constant", + "valueType": { + "$id": "7386", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7387", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "7388", + "kind": "constant", + "valueType": { + "$id": "7389", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7390", + "name": "parameters", + "nameInRequest": "parameters", + "doc": "parameters for restart action.", + "type": { + "$ref": "2283" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "7391", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "7392", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "7393", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "7394", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + } + }, + { + "$id": "7395", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "7396", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/restart", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "longRunning": { + "$id": "7397", + "finalStateVia": 1, + "finalResponse": { + "$id": "7398", + "statusCodes": [ + 200 + ] + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypes.restart", + "decorators": [], + "examples": [ + { + "$id": "7399", + "kind": "http", + "name": "Restart nodes", + "description": "Restart nodes", + "filePath": "2025-03-01-preview/RestartNodes_example.json", + "parameters": [ + { + "$id": "7400", + "parameter": { + "$ref": "7372" + }, + "value": { + "$id": "7401", + "kind": "string", + "type": { + "$ref": "7373" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "7402", + "parameter": { + "$ref": "7380" + }, + "value": { + "$id": "7403", + "kind": "string", + "type": { + "$ref": "7381" + }, + "value": "myCluster" + } + }, + { + "$id": "7404", + "parameter": { + "$ref": "7382" + }, + "value": { + "$id": "7405", + "kind": "string", + "type": { + "$ref": "7383" + }, + "value": "BE" + } + }, + { + "$id": "7406", + "parameter": { + "$ref": "7378" + }, + "value": { + "$id": "7407", + "kind": "string", + "type": { + "$ref": "7379" + }, + "value": "resRg" + } + }, + { + "$id": "7408", + "parameter": { + "$ref": "7376" + }, + "value": { + "$id": "7409", + "kind": "string", + "type": { + "$ref": "7377" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "7410", + "response": { + "$ref": "7391" + }, + "statusCode": 202 + } + ] + } + ] + }, + "parameters": [ + { + "$id": "7411", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "7412", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7413", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "7414", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7415", + "name": "nodeTypeName", + "nameInRequest": "nodeTypeName", + "doc": "The name of the node type.", + "type": { + "$id": "7416", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7417", + "name": "parameters", + "nameInRequest": "body", + "doc": "parameters for restart action.", + "type": { + "$ref": "2283" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7418", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "7419", + "kind": "constant", + "valueType": { + "$id": "7420", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7421", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "7422", + "kind": "constant", + "valueType": { + "$id": "7423", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "7424" + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypes.restart" + }, + { + "$id": "7425", + "kind": "lro", + "name": "start", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Starts one or more nodes on the node type. It will trigger an allocation of the fabric node if needed and activate them.", + "operation": { + "$id": "7426", + "name": "start", + "resourceName": "NodeTypes", + "doc": "Starts one or more nodes on the node type. It will trigger an allocation of the fabric node if needed and activate them.", + "accessibility": "public", + "parameters": [ + { + "$id": "7427", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "7428", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "7429", + "type": { + "$id": "7430", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7431", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "7432", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7433", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "7434", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7435", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "7436", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7437", + "name": "nodeTypeName", + "nameInRequest": "nodeTypeName", + "doc": "The name of the node type.", + "type": { + "$id": "7438", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7439", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "7440", + "kind": "constant", + "valueType": { + "$id": "7441", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7442", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "7443", + "kind": "constant", + "valueType": { + "$id": "7444", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7445", + "name": "parameters", + "nameInRequest": "parameters", + "doc": "parameters for start action.", + "type": { + "$ref": "2283" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "7446", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "7447", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "7448", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "7449", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + } + }, + { + "$id": "7450", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "7451", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/start", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "longRunning": { + "$id": "7452", + "finalStateVia": 1, + "finalResponse": { + "$id": "7453", + "statusCodes": [ + 200 + ] + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypes.start", + "decorators": [], + "examples": [ + { + "$id": "7454", + "kind": "http", + "name": "Start nodes", + "description": "Start nodes", + "filePath": "2025-03-01-preview/StartNodes_example.json", + "parameters": [ + { + "$id": "7455", + "parameter": { + "$ref": "7427" + }, + "value": { + "$id": "7456", + "kind": "string", + "type": { + "$ref": "7428" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "7457", + "parameter": { + "$ref": "7435" + }, + "value": { + "$id": "7458", + "kind": "string", + "type": { + "$ref": "7436" + }, + "value": "myCluster" + } + }, + { + "$id": "7459", + "parameter": { + "$ref": "7437" + }, + "value": { + "$id": "7460", + "kind": "string", + "type": { + "$ref": "7438" + }, + "value": "BE" + } + }, + { + "$id": "7461", + "parameter": { + "$ref": "7433" + }, + "value": { + "$id": "7462", + "kind": "string", + "type": { + "$ref": "7434" + }, + "value": "resRg" + } + }, + { + "$id": "7463", + "parameter": { + "$ref": "7431" + }, + "value": { + "$id": "7464", + "kind": "string", + "type": { + "$ref": "7432" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "7465", + "response": { + "$ref": "7446" + }, + "statusCode": 202 + } + ] + } + ] + }, + "parameters": [ + { + "$id": "7466", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "7467", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7468", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "7469", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7470", + "name": "nodeTypeName", + "nameInRequest": "nodeTypeName", + "doc": "The name of the node type.", + "type": { + "$id": "7471", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7472", + "name": "parameters", + "nameInRequest": "body", + "doc": "parameters for start action.", + "type": { + "$ref": "2283" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7473", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "7474", + "kind": "constant", + "valueType": { + "$id": "7475", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7476", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "7477", + "kind": "constant", + "valueType": { + "$id": "7478", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "7479" + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypes.start" + }, + { + "$id": "7480", + "kind": "lro", + "name": "startFaultSimulation", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Starts a fault simulation on the node type.", + "operation": { + "$id": "7481", + "name": "startFaultSimulation", + "resourceName": "NodeTypes", + "doc": "Starts a fault simulation on the node type.", + "accessibility": "public", + "parameters": [ + { + "$id": "7482", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "7483", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "7484", + "type": { + "$id": "7485", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7486", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "7487", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7488", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "7489", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7490", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "7491", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7492", + "name": "nodeTypeName", + "nameInRequest": "nodeTypeName", + "doc": "The name of the node type.", + "type": { + "$id": "7493", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7494", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "7495", + "kind": "constant", + "valueType": { + "$id": "7496", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7497", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "7498", + "kind": "constant", + "valueType": { + "$id": "7499", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7500", + "name": "parameters", + "nameInRequest": "parameters", + "doc": "parameters describing the fault simulation.", + "type": { + "$ref": "1728" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "7501", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "7502", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "7503", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "7504", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "7505", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/startFaultSimulation", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "longRunning": { + "$id": "7506", + "finalStateVia": 1, + "finalResponse": { + "$id": "7507", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1637" + } + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypes.startFaultSimulation", + "decorators": [] + }, + "parameters": [ + { + "$id": "7508", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "7509", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7510", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "7511", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7512", + "name": "nodeTypeName", + "nameInRequest": "nodeTypeName", + "doc": "The name of the node type.", + "type": { + "$id": "7513", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7514", + "name": "parameters", + "nameInRequest": "body", + "doc": "parameters describing the fault simulation.", + "type": { + "$ref": "1728" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7515", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "7516", + "kind": "constant", + "valueType": { + "$id": "7517", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7518", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "7519", + "kind": "constant", + "valueType": { + "$id": "7520", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "7521", + "type": { + "$ref": "1637" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypes.startFaultSimulation" + }, + { + "$id": "7522", + "kind": "lro", + "name": "stopFaultSimulation", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Stops a fault simulation on the node type.", + "operation": { + "$id": "7523", + "name": "stopFaultSimulation", + "resourceName": "NodeTypes", + "doc": "Stops a fault simulation on the node type.", + "accessibility": "public", + "parameters": [ + { + "$id": "7524", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "7525", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "7526", + "type": { + "$id": "7527", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7528", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "7529", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7530", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "7531", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7532", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "7533", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7534", + "name": "nodeTypeName", + "nameInRequest": "nodeTypeName", + "doc": "The name of the node type.", + "type": { + "$id": "7535", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7536", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "7537", + "kind": "constant", + "valueType": { + "$id": "7538", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7539", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "7540", + "kind": "constant", + "valueType": { + "$id": "7541", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7542", + "name": "parameters", + "nameInRequest": "parameters", + "doc": "parameter with fault simulation id.", + "type": { + "$ref": "1632" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "7543", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "7544", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "7545", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "7546", + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "7547", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/stopFaultSimulation", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "longRunning": { + "$id": "7548", + "finalStateVia": 1, + "finalResponse": { + "$id": "7549", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1637" + } + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypes.stopFaultSimulation", + "decorators": [] + }, + "parameters": [ + { + "$id": "7550", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "7551", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7552", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "7553", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7554", + "name": "nodeTypeName", + "nameInRequest": "nodeTypeName", + "doc": "The name of the node type.", + "type": { + "$id": "7555", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7556", + "name": "parameters", + "nameInRequest": "body", + "doc": "parameter with fault simulation id.", + "type": { + "$ref": "1632" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7557", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "7558", + "kind": "constant", + "valueType": { + "$id": "7559", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7560", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "7561", + "kind": "constant", + "valueType": { + "$id": "7562", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "7563", + "type": { + "$ref": "1637" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypes.stopFaultSimulation" + }, + { + "$id": "7564", + "kind": "basic", + "name": "getFaultSimulation", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Gets a fault simulation by the simulationId.", + "operation": { + "$id": "7565", + "name": "getFaultSimulation", + "resourceName": "NodeTypes", + "doc": "Gets a fault simulation by the simulationId.", + "accessibility": "public", + "parameters": [ + { + "$id": "7566", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "7567", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "7568", + "type": { + "$id": "7569", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7570", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "7571", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7572", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "7573", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7574", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "7575", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7576", + "name": "nodeTypeName", + "nameInRequest": "nodeTypeName", + "doc": "The name of the node type.", + "type": { + "$id": "7577", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7578", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "7579", + "kind": "constant", + "valueType": { + "$id": "7580", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7581", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "7582", + "kind": "constant", + "valueType": { + "$id": "7583", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7584", + "name": "parameters", + "nameInRequest": "parameters", + "doc": "parameter with fault simulation id.", + "type": { + "$ref": "1632" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "7585", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1637" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/getFaultSimulation", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypes.getFaultSimulation", + "decorators": [] + }, + "parameters": [ + { + "$id": "7586", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "7587", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7588", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "7589", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7590", + "name": "nodeTypeName", + "nameInRequest": "nodeTypeName", + "doc": "The name of the node type.", + "type": { + "$id": "7591", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7592", + "name": "parameters", + "nameInRequest": "body", + "doc": "parameter with fault simulation id.", + "type": { + "$ref": "1632" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7593", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$ref": "7579" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7594", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "7582" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "7595", + "type": { + "$ref": "1637" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypes.getFaultSimulation" + }, + { + "$id": "7596", + "kind": "paging", + "name": "listFaultSimulation", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Gets the list of recent fault simulations for the node type.", + "operation": { + "$id": "7597", + "name": "listFaultSimulation", + "resourceName": "NodeTypes", + "doc": "Gets the list of recent fault simulations for the node type.", + "accessibility": "public", + "parameters": [ + { + "$id": "7598", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "7599", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "7600", + "type": { + "$id": "7601", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7602", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "7603", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7604", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "7605", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7606", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "7607", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7608", + "name": "nodeTypeName", + "nameInRequest": "nodeTypeName", + "doc": "The name of the node type.", + "type": { + "$id": "7609", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7610", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "7611", + "kind": "constant", + "valueType": { + "$id": "7612", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "7613", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "1718" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/listFaultSimulation", + "bufferResponse": true, + "paging": { + "$id": "7614", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "7615", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypes.listFaultSimulation", + "decorators": [] + }, + "parameters": [ + { + "$id": "7616", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "7617", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7618", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "7619", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7620", + "name": "nodeTypeName", + "nameInRequest": "nodeTypeName", + "doc": "The name of the node type.", + "type": { + "$id": "7621", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7622", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "7611" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "7623", + "type": { + "$id": "7624", + "kind": "array", + "name": "ArrayFaultSimulation", + "valueType": { + "$ref": "1637" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "resultSegments": [ + "value" + ] + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypes.listFaultSimulation" + } + ], + "parameters": [ + { + "$id": "7625", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "7626", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "location": "Uri", + "isApiVersion": false, + "isContentType": false, + "isRequired": true, + "isEndpoint": true, + "skipUrlEncoding": false, + "explode": false, + "kind": "Client", + "defaultValue": { + "$id": "7627", + "type": { + "$id": "7628", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "7629", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "7630" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypes", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "parent": { + "$ref": "2378" + } + }, + { + "$id": "7631", + "kind": "client", + "name": "NodeTypeSkus", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "methods": [ + { + "$id": "7632", + "kind": "paging", + "name": "GetAvailableSkus", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Get a Service Fabric node type supported SKUs.", + "operation": { + "$id": "7633", + "name": "GetAvailableSkus", + "resourceName": "NodeTypeSkus", + "doc": "Get a Service Fabric node type supported SKUs.", + "accessibility": "public", + "parameters": [ + { + "$id": "7634", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "7635", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "7636", + "type": { + "$id": "7637", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7638", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "7639", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7640", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "7641", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7642", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "7643", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7644", + "name": "nodeTypeName", + "nameInRequest": "nodeTypeName", + "doc": "The name of the node type.", + "type": { + "$id": "7645", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7646", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "7647", + "kind": "constant", + "valueType": { + "$id": "7648", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "7649", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "2296" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/skus", + "bufferResponse": true, + "paging": { + "$id": "7650", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "7651", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeSkus.list", + "decorators": [], + "examples": [ + { + "$id": "7652", + "kind": "http", + "name": "List a node type SKUs", + "description": "List a node type SKUs", + "filePath": "2025-03-01-preview/NodeTypeSkusListOperation_example.json", + "parameters": [ + { + "$id": "7653", + "parameter": { + "$ref": "7634" + }, + "value": { + "$id": "7654", + "kind": "string", + "type": { + "$ref": "7635" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "7655", + "parameter": { + "$ref": "7642" + }, + "value": { + "$id": "7656", + "kind": "string", + "type": { + "$ref": "7643" + }, + "value": "myCluster" + } + }, + { + "$id": "7657", + "parameter": { + "$ref": "7644" + }, + "value": { + "$id": "7658", + "kind": "string", + "type": { + "$ref": "7645" + }, + "value": "BE" + } + }, + { + "$id": "7659", + "parameter": { + "$ref": "7640" + }, + "value": { + "$id": "7660", + "kind": "string", + "type": { + "$ref": "7641" + }, + "value": "resRg" + } + }, + { + "$id": "7661", + "parameter": { + "$ref": "7638" + }, + "value": { + "$id": "7662", + "kind": "string", + "type": { + "$ref": "7639" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + } + ], + "responses": [ + { + "$id": "7663", + "response": { + "$ref": "7649" + }, + "statusCode": 200, + "bodyValue": { + "$id": "7664", + "kind": "model", + "type": { + "$ref": "2296" + }, + "value": { + "$id": "7665", + "nextLink": { + "$id": "7666", + "kind": "string", + "type": { + "$ref": "2339" + }, + "value": "http://examplelink.com" + }, + "value": { + "$id": "7667", + "kind": "array", + "type": { + "$ref": "2298" + }, + "value": [ + { + "$id": "7668", + "kind": "model", + "type": { + "$ref": "2299" + }, + "value": { + "$id": "7669", + "capacity": { + "$id": "7670", + "kind": "model", + "type": { + "$ref": "2318" + }, + "value": { + "$id": "7671", + "default": { + "$id": "7672", + "kind": "number", + "type": { + "$ref": "2328" + }, + "value": 1 + }, + "maximum": { + "$id": "7673", + "kind": "number", + "type": { + "$ref": "2324" + }, + "value": 100 + }, + "minimum": { + "$id": "7674", + "kind": "number", + "type": { + "$ref": "2320" + }, + "value": 1 + }, + "scaleType": { + "$id": "7675", + "kind": "string", + "type": { + "$ref": "346" + }, + "value": "Automatic" + } + } + }, + "resourceType": { + "$id": "7676", + "kind": "string", + "type": { + "$ref": "2301" + }, + "value": "Microsoft.ServiceFabric/managedClusters/nodeTypes" + }, + "sku": { + "$id": "7677", + "kind": "model", + "type": { + "$ref": "2306" + }, + "value": { + "$id": "7678", + "name": { + "$id": "7679", + "kind": "string", + "type": { + "$ref": "2308" + }, + "value": "Standard_S0" + }, + "tier": { + "$id": "7680", + "kind": "string", + "type": { + "$ref": "2312" + }, + "value": "Standard" + } + } + } + } + }, + { + "$id": "7681", + "kind": "model", + "type": { + "$ref": "2299" + }, + "value": { + "$id": "7682", + "capacity": { + "$id": "7683", + "kind": "model", + "type": { + "$ref": "2318" + }, + "value": { + "$id": "7684", + "default": { + "$id": "7685", + "kind": "number", + "type": { + "$ref": "2328" + }, + "value": 3 + }, + "maximum": { + "$id": "7686", + "kind": "number", + "type": { + "$ref": "2324" + }, + "value": 300 + }, + "minimum": { + "$id": "7687", + "kind": "number", + "type": { + "$ref": "2320" + }, + "value": 3 + }, + "scaleType": { + "$id": "7688", + "kind": "string", + "type": { + "$ref": "346" + }, + "value": "Automatic" + } + } + }, + "resourceType": { + "$id": "7689", + "kind": "string", + "type": { + "$ref": "2301" + }, + "value": "Microsoft.ServiceFabric/managedClusters/nodeTypes" + }, + "sku": { + "$id": "7690", + "kind": "model", + "type": { + "$ref": "2306" + }, + "value": { + "$id": "7691", + "name": { + "$id": "7692", + "kind": "string", + "type": { + "$ref": "2308" + }, + "value": "Standard_S1" + }, + "tier": { + "$id": "7693", + "kind": "string", + "type": { + "$ref": "2312" + }, + "value": "Standard" + } + } + } + } + }, + { + "$id": "7694", + "kind": "model", + "type": { + "$ref": "2299" + }, + "value": { + "$id": "7695", + "capacity": { + "$id": "7696", + "kind": "model", + "type": { + "$ref": "2318" + }, + "value": { + "$id": "7697", + "default": { + "$id": "7698", + "kind": "number", + "type": { + "$ref": "2328" + }, + "value": 1 + }, + "maximum": { + "$id": "7699", + "kind": "number", + "type": { + "$ref": "2324" + }, + "value": 1000 + }, + "minimum": { + "$id": "7700", + "kind": "number", + "type": { + "$ref": "2320" + }, + "value": 1 + }, + "scaleType": { + "$id": "7701", + "kind": "string", + "type": { + "$ref": "346" + }, + "value": "Automatic" + } + } + }, + "resourceType": { + "$id": "7702", + "kind": "string", + "type": { + "$ref": "2301" + }, + "value": "Microsoft.ServiceFabric/managedClusters/nodeTypes" + }, + "sku": { + "$id": "7703", + "kind": "model", + "type": { + "$ref": "2306" + }, + "value": { + "$id": "7704", + "name": { + "$id": "7705", + "kind": "string", + "type": { + "$ref": "2308" + }, + "value": "Standard_S2" + }, + "tier": { + "$id": "7706", + "kind": "string", + "type": { + "$ref": "2312" + }, + "value": "Standard" + } + } + } + } + }, + { + "$id": "7707", + "kind": "model", + "type": { + "$ref": "2299" + }, + "value": { + "$id": "7708", + "capacity": { + "$id": "7709", + "kind": "model", + "type": { + "$ref": "2318" + }, + "value": { + "$id": "7710", + "default": { + "$id": "7711", + "kind": "number", + "type": { + "$ref": "2328" + }, + "value": 3 + }, + "maximum": { + "$id": "7712", + "kind": "number", + "type": { + "$ref": "2324" + }, + "value": 1000 + }, + "minimum": { + "$id": "7713", + "kind": "number", + "type": { + "$ref": "2320" + }, + "value": 3 + }, + "scaleType": { + "$id": "7714", + "kind": "string", + "type": { + "$ref": "346" + }, + "value": "Automatic" + } + } + }, + "resourceType": { + "$id": "7715", + "kind": "string", + "type": { + "$ref": "2301" + }, + "value": "Microsoft.ServiceFabric/managedClusters/nodeTypes" + }, + "sku": { + "$id": "7716", + "kind": "model", + "type": { + "$ref": "2306" + }, + "value": { + "$id": "7717", + "name": { + "$id": "7718", + "kind": "string", + "type": { + "$ref": "2308" + }, + "value": "Standard_S3" + }, + "tier": { + "$id": "7719", + "kind": "string", + "type": { + "$ref": "2312" + }, + "value": "Standard" + } + } + } + } + } + ] + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "7720", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "7721", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7722", + "name": "clusterName", + "nameInRequest": "clusterName", + "doc": "The name of the cluster resource.", + "type": { + "$id": "7723", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7724", + "name": "nodeTypeName", + "nameInRequest": "nodeTypeName", + "doc": "The name of the node type.", + "type": { + "$id": "7725", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7726", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "7647" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "7727", + "type": { + "$id": "7728", + "kind": "array", + "name": "ArrayNodeTypeAvailableSku", + "valueType": { + "$ref": "2299" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "resultSegments": [ + "value" + ] + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeSkus.list" + } + ], + "parameters": [ + { + "$id": "7729", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "7730", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "location": "Uri", + "isApiVersion": false, + "isContentType": false, + "isRequired": true, + "isEndpoint": true, + "skipUrlEncoding": false, + "explode": false, + "kind": "Client", + "defaultValue": { + "$id": "7731", + "type": { + "$id": "7732", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "7733", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "7734" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.NodeTypeSkus", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "parent": { + "$ref": "2378" + } + }, + { + "$id": "7735", + "kind": "client", + "name": "OperationResults", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "methods": [ + { + "$id": "7736", + "kind": "lro", + "name": "get", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Get long running operation result.", + "summary": "Get long running operation result.", + "operation": { + "$id": "7737", + "name": "get", + "resourceName": "OperationResults", + "summary": "Get long running operation result.", + "doc": "Get long running operation result.", + "accessibility": "public", + "parameters": [ + { + "$id": "7738", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "7739", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "7740", + "type": { + "$id": "7741", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7742", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "7743", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7744", + "name": "location", + "nameInRequest": "location", + "doc": "The name of the Azure region.", + "type": { + "$id": "7745", + "kind": "string", + "name": "azureLocation", + "crossLanguageDefinitionId": "Azure.Core.azureLocation", + "baseType": { + "$id": "7746", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7747", + "name": "operationId", + "nameInRequest": "operationId", + "doc": "operation identifier.", + "type": { + "$id": "7748", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7749", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "7750", + "kind": "constant", + "valueType": { + "$id": "7751", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "7752", + "statusCodes": [ + 200 + ], + "headers": [], + "isErrorResponse": false + }, + { + "$id": "7753", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "7754", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "7755", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false + }, + { + "$id": "7756", + "statusCodes": [ + 204 + ], + "headers": [], + "isErrorResponse": false + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterOperationResults/{operationId}", + "bufferResponse": true, + "longRunning": { + "$id": "7757", + "finalStateVia": 1, + "finalResponse": { + "$id": "7758", + "statusCodes": [ + 200 + ] + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.OperationResults.get", + "decorators": [], + "examples": [ + { + "$id": "7759", + "kind": "http", + "name": "Get long running operation result", + "description": "Get long running operation result", + "filePath": "2025-03-01-preview/OperationResultsGet_example.json", + "parameters": [ + { + "$id": "7760", + "parameter": { + "$ref": "7742" + }, + "value": { + "$id": "7761", + "kind": "string", + "type": { + "$ref": "7743" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + }, + { + "$id": "7762", + "parameter": { + "$ref": "7744" + }, + "value": { + "$id": "7763", + "kind": "string", + "type": { + "$ref": "7745" + }, + "value": "eastus" + } + }, + { + "$id": "7764", + "parameter": { + "$ref": "7738" + }, + "value": { + "$id": "7765", + "kind": "string", + "type": { + "$ref": "7739" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "7766", + "parameter": { + "$ref": "7747" + }, + "value": { + "$id": "7767", + "kind": "string", + "type": { + "$ref": "7748" + }, + "value": "00000000-0000-0000-0000-000000001234" + } + } + ], + "responses": [ + { + "$id": "7768", + "response": { + "$ref": "7752" + }, + "statusCode": 200 + }, + { + "$id": "7769", + "response": { + "$ref": "7753" + }, + "statusCode": 202 + }, + { + "$id": "7770", + "response": { + "$ref": "7756" + }, + "statusCode": 204 + } + ] + } + ] + }, + "parameters": [ + { + "$id": "7771", + "name": "location", + "nameInRequest": "location", + "doc": "The name of the Azure region.", + "type": { + "$id": "7772", + "kind": "string", + "name": "azureLocation", + "crossLanguageDefinitionId": "Azure.Core.azureLocation", + "baseType": { + "$id": "7773", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7774", + "name": "operationId", + "nameInRequest": "operationId", + "doc": "operation identifier.", + "type": { + "$id": "7775", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7776", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "7777", + "kind": "constant", + "valueType": { + "$id": "7778", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "7779" + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.OperationResults.get" + } + ], + "parameters": [ + { + "$id": "7780", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "7781", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "location": "Uri", + "isApiVersion": false, + "isContentType": false, + "isRequired": true, + "isEndpoint": true, + "skipUrlEncoding": false, + "explode": false, + "kind": "Client", + "defaultValue": { + "$id": "7782", + "type": { + "$id": "7783", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.OperationResults", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "parent": { + "$ref": "2378" + } + }, + { + "$id": "7784", + "kind": "client", + "name": "OperationStatus", + "namespace": "Azure.ResourceManager.ServiceFabricManagedClusters", + "methods": [ + { + "$id": "7785", + "kind": "basic", + "name": "get", + "accessibility": "public", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "doc": "Get long running operation status.", + "summary": "Get long running operation status.", + "operation": { + "$id": "7786", + "name": "get", + "resourceName": "OperationStatus", + "summary": "Get long running operation status.", + "doc": "Get long running operation status.", + "accessibility": "public", + "parameters": [ + { + "$id": "7787", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "7788", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "7789", + "type": { + "$id": "7790", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7791", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "7792", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7793", + "name": "location", + "nameInRequest": "location", + "doc": "The name of the Azure region.", + "type": { + "$id": "7794", + "kind": "string", + "name": "azureLocation", + "crossLanguageDefinitionId": "Azure.Core.azureLocation", + "baseType": { + "$id": "7795", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7796", + "name": "operationId", + "nameInRequest": "operationId", + "doc": "operation identifier.", + "type": { + "$id": "7797", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7798", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "7799", + "kind": "constant", + "valueType": { + "$id": "7800", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "7801", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "2343" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterOperations/{operationId}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.OperationStatus.get", + "decorators": [], + "examples": [ + { + "$id": "7802", + "kind": "http", + "name": "Error response describing why the operation failed.", + "description": "Error response describing why the operation failed.", + "filePath": "2025-03-01-preview/OperationStatusFailed_example.json", + "parameters": [ + { + "$id": "7803", + "parameter": { + "$ref": "7791" + }, + "value": { + "$id": "7804", + "kind": "string", + "type": { + "$ref": "7792" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + }, + { + "$id": "7805", + "parameter": { + "$ref": "7793" + }, + "value": { + "$id": "7806", + "kind": "string", + "type": { + "$ref": "7794" + }, + "value": "eastus" + } + }, + { + "$id": "7807", + "parameter": { + "$ref": "7787" + }, + "value": { + "$id": "7808", + "kind": "string", + "type": { + "$ref": "7788" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "7809", + "parameter": { + "$ref": "7796" + }, + "value": { + "$id": "7810", + "kind": "string", + "type": { + "$ref": "7797" + }, + "value": "00000000-0000-0000-0000-000000001234" + } + } + ], + "responses": [ + { + "$id": "7811", + "response": { + "$ref": "7801" + }, + "statusCode": 200, + "bodyValue": { + "$id": "7812", + "kind": "model", + "type": { + "$ref": "2343" + }, + "value": { + "$id": "7813", + "name": { + "$id": "7814", + "kind": "string", + "type": { + "$ref": "2345" + }, + "value": "00000000-0000-0000-0000-000000001234" + }, + "startTime": { + "$id": "7815", + "kind": "string", + "type": { + "$ref": "2349" + }, + "value": "2022-01-03T23:58:02.2501337Z" + }, + "endTime": { + "$id": "7816", + "kind": "string", + "type": { + "$ref": "2354" + }, + "value": "2022-01-04T00:13:03.2790951Z" + }, + "percentComplete": { + "$id": "7817", + "kind": "number", + "type": { + "$ref": "2359" + }, + "value": 100 + }, + "status": { + "$id": "7818", + "kind": "string", + "type": { + "$ref": "2363" + }, + "value": "Failed" + }, + "error": { + "$id": "7819", + "kind": "model", + "type": { + "$ref": "2367" + }, + "value": { + "$id": "7820", + "code": { + "$id": "7821", + "kind": "string", + "type": { + "$ref": "2369" + }, + "value": "-2146233029" + }, + "message": { + "$id": "7822", + "kind": "string", + "type": { + "$ref": "2373" + }, + "value": "A task was canceled." + } + } + } + } + } + } + ] + }, + { + "$id": "7823", + "kind": "http", + "name": "OK. The request has succeeded.", + "description": "OK. The request has succeeded.", + "filePath": "2025-03-01-preview/OperationStatusSucceeded_example.json", + "parameters": [ + { + "$id": "7824", + "parameter": { + "$ref": "7791" + }, + "value": { + "$id": "7825", + "kind": "string", + "type": { + "$ref": "7792" + }, + "value": "00000000-0000-0000-0000-000000000000" + } + }, + { + "$id": "7826", + "parameter": { + "$ref": "7793" + }, + "value": { + "$id": "7827", + "kind": "string", + "type": { + "$ref": "7794" + }, + "value": "eastus" + } + }, + { + "$id": "7828", + "parameter": { + "$ref": "7787" + }, + "value": { + "$id": "7829", + "kind": "string", + "type": { + "$ref": "7788" + }, + "value": "2025-03-01-preview" + } + }, + { + "$id": "7830", + "parameter": { + "$ref": "7796" + }, + "value": { + "$id": "7831", + "kind": "string", + "type": { + "$ref": "7797" + }, + "value": "00000000-0000-0000-0000-000000001234" + } + } + ], + "responses": [ + { + "$id": "7832", + "response": { + "$ref": "7801" + }, + "statusCode": 200, + "bodyValue": { + "$id": "7833", + "kind": "model", + "type": { + "$ref": "2343" + }, + "value": { + "$id": "7834", + "name": { + "$id": "7835", + "kind": "string", + "type": { + "$ref": "2345" + }, + "value": "00000000-0000-0000-0000-000000001234" + }, + "startTime": { + "$id": "7836", + "kind": "string", + "type": { + "$ref": "2349" + }, + "value": "2022-01-03T23:58:02.2501337Z" + }, + "endTime": { + "$id": "7837", + "kind": "string", + "type": { + "$ref": "2354" + }, + "value": "2022-01-04T00:13:03.2790951Z" + }, + "percentComplete": { + "$id": "7838", + "kind": "number", + "type": { + "$ref": "2359" + }, + "value": 100 + }, + "status": { + "$id": "7839", + "kind": "string", + "type": { + "$ref": "2363" + }, + "value": "Succeeded" + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "7840", + "name": "location", + "nameInRequest": "location", + "doc": "The name of the Azure region.", + "type": { + "$id": "7841", + "kind": "string", + "name": "azureLocation", + "crossLanguageDefinitionId": "Azure.Core.azureLocation", + "baseType": { + "$id": "7842", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7843", + "name": "operationId", + "nameInRequest": "operationId", + "doc": "operation identifier.", + "type": { + "$id": "7844", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "7845", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "7799" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "7846", + "type": { + "$ref": "2343" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.OperationStatus.get" + } + ], + "parameters": [ + { + "$id": "7847", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "7848", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "location": "Uri", + "isApiVersion": false, + "isContentType": false, + "isRequired": true, + "isEndpoint": true, + "skipUrlEncoding": false, + "explode": false, + "kind": "Client", + "defaultValue": { + "$id": "7849", + "type": { + "$id": "7850", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.ServiceFabric.OperationStatus", + "apiVersions": [ + "2024-11-01-preview", + "2025-03-01-preview" + ], + "parent": { + "$ref": "2378" + } + } + ] + } + ], + "auth": { + "$id": "7851", + "oAuth2": { + "$id": "7852", + "scopes": [ + "user_impersonation" + ] + } + } +} diff --git a/sdk/standbypool/Azure.ResourceManager.StandbyPool/Configuration.json b/sdk/standbypool/Azure.ResourceManager.StandbyPool/Configuration.json new file mode 100644 index 000000000000..0a2d1af62ece --- /dev/null +++ b/sdk/standbypool/Azure.ResourceManager.StandbyPool/Configuration.json @@ -0,0 +1,12 @@ +{ + "output-folder": ".", + "namespace": "Azure.ResourceManager.StandbyPool", + "library-name": "Azure.ResourceManager.StandbyPool", + "flavor": "azure", + "use-model-reader-writer": true, + "shared-source-folders": [ + "../../TempTypeSpecFiles/node_modules/@autorest/csharp/Generator.Shared", + "../../TempTypeSpecFiles/node_modules/@autorest/csharp/Azure.Core.Shared" + ], + "azure-arm": true +} diff --git a/sdk/standbypool/Azure.ResourceManager.StandbyPool/tsp-location.yaml b/sdk/standbypool/Azure.ResourceManager.StandbyPool/tsp-location.yaml index db59ec6f9183..13a448d40bb7 100644 --- a/sdk/standbypool/Azure.ResourceManager.StandbyPool/tsp-location.yaml +++ b/sdk/standbypool/Azure.ResourceManager.StandbyPool/tsp-location.yaml @@ -1,3 +1,4 @@ -directory: specification\standbypool\StandbyPool.Management -commit: dc4c1eaef16e0bc8b1e96c3d1e014deb96259b35 +directory: specification/standbypool/StandbyPool.Management +commit: 1a8dcbc31c561409f253e5f7a924ff577b583da7 repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/standbypool/Azure.ResourceManager.StandbyPool/tspCodeModel.json b/sdk/standbypool/Azure.ResourceManager.StandbyPool/tspCodeModel.json new file mode 100644 index 000000000000..a02e7aa4a266 --- /dev/null +++ b/sdk/standbypool/Azure.ResourceManager.StandbyPool/tspCodeModel.json @@ -0,0 +1,18304 @@ +{ + "$id": "1", + "name": "Microsoft.StandbyPool", + "apiVersions": [ + "2024-03-01", + "2025-03-01" + ], + "enums": [ + { + "$id": "2", + "kind": "enum", + "name": "Origin", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Origin", + "valueType": { + "$id": "3", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "4", + "kind": "enumvalue", + "name": "user", + "value": "user", + "valueType": { + "$id": "5", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "doc": "Indicates the operation is initiated by a user.", + "decorators": [] + }, + { + "$id": "6", + "kind": "enumvalue", + "name": "system", + "value": "system", + "valueType": { + "$id": "7", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "doc": "Indicates the operation is initiated by a system.", + "decorators": [] + }, + { + "$id": "8", + "kind": "enumvalue", + "name": "user,system", + "value": "user,system", + "valueType": { + "$id": "9", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "doc": "Indicates the operation is initiated by a user or system.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.StandbyPool", + "doc": "The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\"", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "10", + "kind": "enum", + "name": "ActionType", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ActionType", + "valueType": { + "$id": "11", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "12", + "kind": "enumvalue", + "name": "Internal", + "value": "Internal", + "valueType": { + "$id": "13", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "10" + }, + "doc": "Actions are for internal-only APIs.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.StandbyPool", + "doc": "Extensible enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "14", + "kind": "enum", + "name": "StandbyVirtualMachineState", + "crossLanguageDefinitionId": "Microsoft.StandbyPool.VirtualMachineState", + "valueType": { + "$id": "15", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "16", + "kind": "enumvalue", + "name": "Running", + "value": "Running", + "valueType": { + "$id": "17", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "14" + }, + "doc": "The virtual machine is up and running.", + "decorators": [] + }, + { + "$id": "18", + "kind": "enumvalue", + "name": "Deallocated", + "value": "Deallocated", + "valueType": { + "$id": "19", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "14" + }, + "doc": "The virtual machine has released the lease on the underlying hardware and is powered off.", + "decorators": [] + }, + { + "$id": "20", + "kind": "enumvalue", + "name": "Hibernated", + "value": "Hibernated", + "valueType": { + "$id": "21", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "14" + }, + "doc": "The virtual machine has released the lease on the underlying hardware and is powered off. Memory contents of the VM are stored in the OS disk. When started again, applications and processes that were previously running in your VM resume from the state prior to hibernation.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.StandbyPool", + "doc": "State of standby virtual machines", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "22", + "kind": "enum", + "name": "StandbyProvisioningState", + "crossLanguageDefinitionId": "Microsoft.StandbyPool.ProvisioningState", + "valueType": { + "$id": "23", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "24", + "kind": "enumvalue", + "name": "Succeeded", + "value": "Succeeded", + "valueType": { + "$id": "25", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "22" + }, + "doc": "Resource has been created.", + "decorators": [] + }, + { + "$id": "26", + "kind": "enumvalue", + "name": "Failed", + "value": "Failed", + "valueType": { + "$id": "27", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "22" + }, + "doc": "Resource creation failed.", + "decorators": [] + }, + { + "$id": "28", + "kind": "enumvalue", + "name": "Canceled", + "value": "Canceled", + "valueType": { + "$id": "29", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "22" + }, + "doc": "Resource creation was canceled.", + "decorators": [] + }, + { + "$id": "30", + "kind": "enumvalue", + "name": "Deleting", + "value": "Deleting", + "valueType": { + "$id": "31", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "22" + }, + "doc": "Resource is being deleted.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.StandbyPool", + "doc": "Provisioning state", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "32", + "kind": "enum", + "name": "createdByType", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.createdByType", + "valueType": { + "$id": "33", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "34", + "kind": "enumvalue", + "name": "User", + "value": "User", + "valueType": { + "$id": "35", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "32" + }, + "doc": "The entity was created by a user.", + "decorators": [] + }, + { + "$id": "36", + "kind": "enumvalue", + "name": "Application", + "value": "Application", + "valueType": { + "$id": "37", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "32" + }, + "doc": "The entity was created by an application.", + "decorators": [] + }, + { + "$id": "38", + "kind": "enumvalue", + "name": "ManagedIdentity", + "value": "ManagedIdentity", + "valueType": { + "$id": "39", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "32" + }, + "doc": "The entity was created by a managed identity.", + "decorators": [] + }, + { + "$id": "40", + "kind": "enumvalue", + "name": "Key", + "value": "Key", + "valueType": { + "$id": "41", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "32" + }, + "doc": "The entity was created by a key.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.StandbyPool", + "doc": "The kind of entity that created the resource.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "42", + "kind": "enum", + "name": "ResourceProvisioningState", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceProvisioningState", + "valueType": { + "$id": "43", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "44", + "kind": "enumvalue", + "name": "Succeeded", + "value": "Succeeded", + "valueType": { + "$id": "45", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "42" + }, + "doc": "Resource has been created.", + "decorators": [] + }, + { + "$id": "46", + "kind": "enumvalue", + "name": "Failed", + "value": "Failed", + "valueType": { + "$id": "47", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "42" + }, + "doc": "Resource creation failed.", + "decorators": [] + }, + { + "$id": "48", + "kind": "enumvalue", + "name": "Canceled", + "value": "Canceled", + "valueType": { + "$id": "49", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "42" + }, + "doc": "Resource creation was canceled.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.StandbyPool", + "doc": "The provisioning state of a resource type.", + "isFixed": false, + "isFlags": false, + "usage": "LroPolling", + "decorators": [] + }, + { + "$id": "50", + "kind": "enum", + "name": "PoolVirtualMachineState", + "crossLanguageDefinitionId": "Microsoft.StandbyPool.PoolVirtualMachineState", + "valueType": { + "$id": "51", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "52", + "kind": "enumvalue", + "name": "Running", + "value": "Running", + "valueType": { + "$id": "53", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "50" + }, + "doc": "The virtual machine is up and running.", + "decorators": [] + }, + { + "$id": "54", + "kind": "enumvalue", + "name": "Creating", + "value": "Creating", + "valueType": { + "$id": "55", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "50" + }, + "doc": "The virtual machine is creating.", + "decorators": [] + }, + { + "$id": "56", + "kind": "enumvalue", + "name": "Starting", + "value": "Starting", + "valueType": { + "$id": "57", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "50" + }, + "doc": "The virtual machine is starting.", + "decorators": [] + }, + { + "$id": "58", + "kind": "enumvalue", + "name": "Deleting", + "value": "Deleting", + "valueType": { + "$id": "59", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "50" + }, + "doc": "The virtual machine is deleting.", + "decorators": [] + }, + { + "$id": "60", + "kind": "enumvalue", + "name": "Deallocated", + "value": "Deallocated", + "valueType": { + "$id": "61", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "50" + }, + "doc": "The virtual machine has released the lease on the underlying hardware and is powered off.", + "decorators": [] + }, + { + "$id": "62", + "kind": "enumvalue", + "name": "Deallocating", + "value": "Deallocating", + "valueType": { + "$id": "63", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "50" + }, + "doc": "The virtual machine is releasing the lease on the underlying hardware and is powered off.", + "decorators": [] + }, + { + "$id": "64", + "kind": "enumvalue", + "name": "Hibernated", + "value": "Hibernated", + "valueType": { + "$id": "65", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "50" + }, + "doc": "The virtual machine has released the lease on the underlying hardware and is powered off. Memory contents of the VM are stored in the OS disk. When started again, applications and processes that were previously running in your VM resume from the state prior to hibernation.", + "decorators": [] + }, + { + "$id": "66", + "kind": "enumvalue", + "name": "Hibernating", + "value": "Hibernating", + "valueType": { + "$id": "67", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "50" + }, + "doc": "The virtual machine is hibernating.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.StandbyPool", + "doc": "The state of the pooled virtual machines.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "68", + "kind": "enum", + "name": "StandbyPoolHealthStateCode", + "crossLanguageDefinitionId": "Microsoft.StandbyPool.HealthStateCode", + "valueType": { + "$id": "69", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "70", + "kind": "enumvalue", + "name": "healthy", + "value": "HealthState/healthy", + "valueType": { + "$id": "71", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "68" + }, + "doc": "StandbyPool is in healthy state.", + "decorators": [] + }, + { + "$id": "72", + "kind": "enumvalue", + "name": "degraded", + "value": "HealthState/degraded", + "valueType": { + "$id": "73", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "68" + }, + "doc": "StandbyPool is in degraded state.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.StandbyPool", + "doc": "StandbyPool health state.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "74", + "kind": "enum", + "name": "StandbyRefillPolicy", + "crossLanguageDefinitionId": "Microsoft.StandbyPool.RefillPolicy", + "valueType": { + "$id": "75", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "76", + "kind": "enumvalue", + "name": "always", + "value": "always", + "valueType": { + "$id": "77", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "74" + }, + "doc": "A refill policy that standby pool is automatically refilled to maintain maxReadyCapacity.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.StandbyPool", + "doc": "Refill policy of standby pool", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "78", + "kind": "enum", + "name": "PoolContainerGroupState", + "crossLanguageDefinitionId": "Microsoft.StandbyPool.PoolContainerGroupState", + "valueType": { + "$id": "79", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "80", + "kind": "enumvalue", + "name": "Running", + "value": "Running", + "valueType": { + "$id": "81", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "78" + }, + "doc": "The container group is up and running.", + "decorators": [] + }, + { + "$id": "82", + "kind": "enumvalue", + "name": "Creating", + "value": "Creating", + "valueType": { + "$id": "83", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "78" + }, + "doc": "The container group is creating.", + "decorators": [] + }, + { + "$id": "84", + "kind": "enumvalue", + "name": "Deleting", + "value": "Deleting", + "valueType": { + "$id": "85", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "78" + }, + "doc": "The container group is deleting.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.StandbyPool", + "doc": "The state of the pooled container groups.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "86", + "kind": "enum", + "name": "Versions", + "crossLanguageDefinitionId": "Microsoft.StandbyPool.Versions", + "valueType": { + "$id": "87", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "88", + "kind": "enumvalue", + "name": "2024-03-01", + "value": "2024-03-01", + "valueType": { + "$id": "89", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "86" + }, + "doc": "API Version 2024-03-01.", + "decorators": [] + }, + { + "$id": "90", + "kind": "enumvalue", + "name": "2025-03-01", + "value": "2025-03-01", + "valueType": { + "$id": "91", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "86" + }, + "doc": "API Version 2025-03-01.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.StandbyPool", + "doc": "Supported API Versions for Microsoft.StandbyPool", + "isFixed": true, + "isFlags": false, + "usage": "ApiVersionEnum", + "decorators": [] + } + ], + "models": [ + { + "$id": "92", + "kind": "model", + "name": "OperationListResult", + "namespace": "Azure.ResourceManager.StandbyPool", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationListResult", + "usage": "Output,Json", + "doc": "A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.", + "decorators": [], + "properties": [ + { + "$id": "93", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The Operation items on this page", + "type": { + "$id": "94", + "kind": "array", + "name": "ArrayOperation", + "valueType": { + "$id": "95", + "kind": "model", + "name": "Operation", + "namespace": "Azure.ResourceManager.StandbyPool", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation", + "usage": "Output,Json", + "doc": "Details of a REST API operation, returned from the Resource Provider Operations API", + "decorators": [], + "properties": [ + { + "$id": "96", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the operation, as per Resource-Based Access Control (RBAC). Examples: \"Microsoft.Compute/virtualMachines/write\", \"Microsoft.Compute/virtualMachines/capture/action\"", + "type": { + "$id": "97", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.name", + "serializationOptions": { + "$id": "98", + "json": { + "$id": "99", + "name": "name" + } + } + }, + { + "$id": "100", + "kind": "property", + "name": "isDataAction", + "serializedName": "isDataAction", + "doc": "Whether the operation applies to data-plane. This is \"true\" for data-plane operations and \"false\" for Azure Resource Manager/control-plane operations.", + "type": { + "$id": "101", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.isDataAction", + "serializationOptions": { + "$id": "102", + "json": { + "$id": "103", + "name": "isDataAction" + } + } + }, + { + "$id": "104", + "kind": "property", + "name": "display", + "serializedName": "display", + "doc": "Localized display information for this particular operation.", + "type": { + "$id": "105", + "kind": "model", + "name": "OperationDisplay", + "namespace": "Azure.ResourceManager.StandbyPool", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay", + "usage": "Output,Json", + "doc": "Localized display information for and operation.", + "decorators": [], + "properties": [ + { + "$id": "106", + "kind": "property", + "name": "provider", + "serializedName": "provider", + "doc": "The localized friendly form of the resource provider name, e.g. \"Microsoft Monitoring Insights\" or \"Microsoft Compute\".", + "type": { + "$id": "107", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay.provider", + "serializationOptions": { + "$id": "108", + "json": { + "$id": "109", + "name": "provider" + } + } + }, + { + "$id": "110", + "kind": "property", + "name": "resource", + "serializedName": "resource", + "doc": "The localized friendly name of the resource type related to this operation. E.g. \"Virtual Machines\" or \"Job Schedule Collections\".", + "type": { + "$id": "111", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay.resource", + "serializationOptions": { + "$id": "112", + "json": { + "$id": "113", + "name": "resource" + } + } + }, + { + "$id": "114", + "kind": "property", + "name": "operation", + "serializedName": "operation", + "doc": "The concise, localized friendly name for the operation; suitable for dropdowns. E.g. \"Create or Update Virtual Machine\", \"Restart Virtual Machine\".", + "type": { + "$id": "115", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay.operation", + "serializationOptions": { + "$id": "116", + "json": { + "$id": "117", + "name": "operation" + } + } + }, + { + "$id": "118", + "kind": "property", + "name": "description", + "serializedName": "description", + "doc": "The short, localized friendly description of the operation; suitable for tool tips and detailed views.", + "type": { + "$id": "119", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay.description", + "serializationOptions": { + "$id": "120", + "json": { + "$id": "121", + "name": "description" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.display", + "serializationOptions": { + "$id": "122", + "json": { + "$id": "123", + "name": "display" + } + } + }, + { + "$id": "124", + "kind": "property", + "name": "origin", + "serializedName": "origin", + "doc": "The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\"", + "type": { + "$ref": "2" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.origin", + "serializationOptions": { + "$id": "125", + "json": { + "$id": "126", + "name": "origin" + } + } + }, + { + "$id": "127", + "kind": "property", + "name": "actionType", + "serializedName": "actionType", + "doc": "Extensible enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs.", + "type": { + "$ref": "10" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.actionType", + "serializationOptions": { + "$id": "128", + "json": { + "$id": "129", + "name": "actionType" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationListResult.value", + "serializationOptions": { + "$id": "130", + "json": { + "$id": "131", + "name": "value" + } + } + }, + { + "$id": "132", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "133", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "134", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationListResult.nextLink", + "serializationOptions": { + "$id": "135", + "json": { + "$id": "136", + "name": "nextLink" + } + } + } + ] + }, + { + "$ref": "95" + }, + { + "$ref": "105" + }, + { + "$id": "137", + "kind": "model", + "name": "ErrorResponse", + "namespace": "Azure.ResourceManager.StandbyPool", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorResponse", + "usage": "Json,Exception", + "doc": "Common error response for all Azure Resource Manager APIs to return error details for failed operations.", + "decorators": [], + "properties": [ + { + "$id": "138", + "kind": "property", + "name": "error", + "serializedName": "error", + "doc": "The error object.", + "type": { + "$id": "139", + "kind": "model", + "name": "ErrorDetail", + "namespace": "Azure.ResourceManager.StandbyPool", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail", + "usage": "Json,Exception,LroPolling", + "doc": "The error detail.", + "decorators": [], + "properties": [ + { + "$id": "140", + "kind": "property", + "name": "code", + "serializedName": "code", + "doc": "The error code.", + "type": { + "$id": "141", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.code", + "serializationOptions": { + "$id": "142", + "json": { + "$id": "143", + "name": "code" + } + } + }, + { + "$id": "144", + "kind": "property", + "name": "message", + "serializedName": "message", + "doc": "The error message.", + "type": { + "$id": "145", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.message", + "serializationOptions": { + "$id": "146", + "json": { + "$id": "147", + "name": "message" + } + } + }, + { + "$id": "148", + "kind": "property", + "name": "target", + "serializedName": "target", + "doc": "The error target.", + "type": { + "$id": "149", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.target", + "serializationOptions": { + "$id": "150", + "json": { + "$id": "151", + "name": "target" + } + } + }, + { + "$id": "152", + "kind": "property", + "name": "details", + "serializedName": "details", + "doc": "The error details.", + "type": { + "$id": "153", + "kind": "array", + "name": "ArrayErrorDetail", + "valueType": { + "$ref": "139" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.details", + "serializationOptions": { + "$id": "154", + "json": { + "$id": "155", + "name": "details" + } + } + }, + { + "$id": "156", + "kind": "property", + "name": "additionalInfo", + "serializedName": "additionalInfo", + "doc": "The error additional info.", + "type": { + "$id": "157", + "kind": "array", + "name": "ArrayErrorAdditionalInfo", + "valueType": { + "$id": "158", + "kind": "model", + "name": "ErrorAdditionalInfo", + "namespace": "Azure.ResourceManager.StandbyPool", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo", + "usage": "Json,Exception,LroPolling", + "doc": "The resource management error additional info.", + "decorators": [], + "properties": [ + { + "$id": "159", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The additional info type.", + "type": { + "$id": "160", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo.type", + "serializationOptions": { + "$id": "161", + "json": { + "$id": "162", + "name": "type" + } + } + }, + { + "$id": "163", + "kind": "property", + "name": "info", + "serializedName": "info", + "doc": "The additional info.", + "type": { + "$id": "164", + "kind": "model", + "name": "ErrorAdditionalInfoInfo", + "namespace": "Azure.ResourceManager.StandbyPool", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo.info.anonymous", + "usage": "Json,Exception,LroPolling", + "decorators": [], + "properties": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo.info", + "serializationOptions": { + "$id": "165", + "json": { + "$id": "166", + "name": "info" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.additionalInfo", + "serializationOptions": { + "$id": "167", + "json": { + "$id": "168", + "name": "additionalInfo" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorResponse.error", + "serializationOptions": { + "$id": "169", + "json": { + "$id": "170", + "name": "error" + } + } + } + ] + }, + { + "$ref": "139" + }, + { + "$ref": "158" + }, + { + "$ref": "164" + }, + { + "$id": "171", + "kind": "model", + "name": "StandbyVirtualMachinePool", + "namespace": "Azure.ResourceManager.StandbyPool", + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePoolResource", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "A StandbyVirtualMachinePoolResource.", + "decorators": [], + "baseModel": { + "$id": "172", + "kind": "model", + "name": "TrackedResource", + "namespace": "Azure.ResourceManager.StandbyPool", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.TrackedResource", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'", + "decorators": [], + "baseModel": { + "$id": "173", + "kind": "model", + "name": "Resource", + "namespace": "Azure.ResourceManager.StandbyPool", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Common fields that are returned in the response for all Azure Resource Manager resources", + "decorators": [], + "properties": [ + { + "$id": "174", + "kind": "property", + "name": "id", + "serializedName": "id", + "doc": "Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}", + "type": { + "$id": "175", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "176", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource.id", + "serializationOptions": { + "$id": "177", + "json": { + "$id": "178", + "name": "id" + } + } + }, + { + "$id": "179", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the resource", + "type": { + "$id": "180", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource.name", + "serializationOptions": { + "$id": "181", + "json": { + "$id": "182", + "name": "name" + } + } + }, + { + "$id": "183", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"", + "type": { + "$id": "184", + "kind": "string", + "name": "armResourceType", + "crossLanguageDefinitionId": "Azure.Core.armResourceType", + "baseType": { + "$id": "185", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource.type", + "serializationOptions": { + "$id": "186", + "json": { + "$id": "187", + "name": "type" + } + } + }, + { + "$id": "188", + "kind": "property", + "name": "systemData", + "serializedName": "systemData", + "doc": "Azure Resource Manager metadata containing createdBy and modifiedBy information.", + "type": { + "$id": "189", + "kind": "model", + "name": "SystemData", + "namespace": "Azure.ResourceManager.StandbyPool", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData", + "usage": "Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Metadata pertaining to creation and last modification of the resource.", + "decorators": [], + "properties": [ + { + "$id": "190", + "kind": "property", + "name": "createdBy", + "serializedName": "createdBy", + "doc": "The identity that created the resource.", + "type": { + "$id": "191", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.createdBy", + "serializationOptions": { + "$id": "192", + "json": { + "$id": "193", + "name": "createdBy" + } + } + }, + { + "$id": "194", + "kind": "property", + "name": "createdByType", + "serializedName": "createdByType", + "doc": "The type of identity that created the resource.", + "type": { + "$ref": "32" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.createdByType", + "serializationOptions": { + "$id": "195", + "json": { + "$id": "196", + "name": "createdByType" + } + } + }, + { + "$id": "197", + "kind": "property", + "name": "createdAt", + "serializedName": "createdAt", + "doc": "The timestamp of resource creation (UTC).", + "type": { + "$id": "198", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "199", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.createdAt", + "serializationOptions": { + "$id": "200", + "json": { + "$id": "201", + "name": "createdAt" + } + } + }, + { + "$id": "202", + "kind": "property", + "name": "lastModifiedBy", + "serializedName": "lastModifiedBy", + "doc": "The identity that last modified the resource.", + "type": { + "$id": "203", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.lastModifiedBy", + "serializationOptions": { + "$id": "204", + "json": { + "$id": "205", + "name": "lastModifiedBy" + } + } + }, + { + "$id": "206", + "kind": "property", + "name": "lastModifiedByType", + "serializedName": "lastModifiedByType", + "doc": "The type of identity that last modified the resource.", + "type": { + "$ref": "32" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.lastModifiedByType", + "serializationOptions": { + "$id": "207", + "json": { + "$id": "208", + "name": "lastModifiedByType" + } + } + }, + { + "$id": "209", + "kind": "property", + "name": "lastModifiedAt", + "serializedName": "lastModifiedAt", + "doc": "The timestamp of resource last modification (UTC)", + "type": { + "$id": "210", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "211", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.lastModifiedAt", + "serializationOptions": { + "$id": "212", + "json": { + "$id": "213", + "name": "lastModifiedAt" + } + } + } + ] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource.systemData", + "serializationOptions": { + "$id": "214", + "json": { + "$id": "215", + "name": "systemData" + } + } + } + ] + }, + "properties": [ + { + "$id": "216", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Resource tags.", + "type": { + "$id": "217", + "kind": "dict", + "keyType": { + "$id": "218", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "219", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.TrackedResource.tags", + "serializationOptions": { + "$id": "220", + "json": { + "$id": "221", + "name": "tags" + } + } + }, + { + "$id": "222", + "kind": "property", + "name": "location", + "serializedName": "location", + "doc": "The geo-location where the resource lives", + "type": { + "$id": "223", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.TrackedResource.location", + "serializationOptions": { + "$id": "224", + "json": { + "$id": "225", + "name": "location" + } + } + } + ] + }, + "properties": [ + { + "$id": "226", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "227", + "kind": "model", + "name": "StandbyVirtualMachinePoolProperties", + "namespace": "Azure.ResourceManager.StandbyPool", + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePoolResourceProperties", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Details of the StandbyVirtualMachinePool.", + "decorators": [], + "properties": [ + { + "$id": "228", + "kind": "property", + "name": "elasticityProfile", + "serializedName": "elasticityProfile", + "doc": "Specifies the elasticity profile of the standby virtual machine pools.", + "type": { + "$id": "229", + "kind": "model", + "name": "StandbyVirtualMachinePoolElasticityProfile", + "namespace": "Azure.ResourceManager.StandbyPool", + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePoolElasticityProfile", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Details of the elasticity profile.", + "decorators": [], + "properties": [ + { + "$id": "230", + "kind": "property", + "name": "maxReadyCapacity", + "serializedName": "maxReadyCapacity", + "doc": "Specifies the maximum number of virtual machines in the standby virtual machine pool.", + "type": { + "$id": "231", + "kind": "int64", + "name": "int64", + "crossLanguageDefinitionId": "TypeSpec.int64", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePoolElasticityProfile.maxReadyCapacity", + "serializationOptions": { + "$id": "232", + "json": { + "$id": "233", + "name": "maxReadyCapacity" + } + } + }, + { + "$id": "234", + "kind": "property", + "name": "minReadyCapacity", + "serializedName": "minReadyCapacity", + "doc": "Specifies the desired minimum number of virtual machines in the standby virtual machine pool. MinReadyCapacity cannot exceed MaxReadyCapacity.", + "type": { + "$id": "235", + "kind": "int64", + "name": "int64", + "crossLanguageDefinitionId": "TypeSpec.int64", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePoolElasticityProfile.minReadyCapacity", + "serializationOptions": { + "$id": "236", + "json": { + "$id": "237", + "name": "minReadyCapacity" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePoolResourceProperties.elasticityProfile", + "serializationOptions": { + "$id": "238", + "json": { + "$id": "239", + "name": "elasticityProfile" + } + } + }, + { + "$id": "240", + "kind": "property", + "name": "virtualMachineState", + "serializedName": "virtualMachineState", + "doc": "Specifies the desired state of virtual machines in the pool.", + "type": { + "$ref": "14" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePoolResourceProperties.virtualMachineState", + "serializationOptions": { + "$id": "241", + "json": { + "$id": "242", + "name": "virtualMachineState" + } + } + }, + { + "$id": "243", + "kind": "property", + "name": "attachedVirtualMachineScaleSetId", + "serializedName": "attachedVirtualMachineScaleSetId", + "doc": "Specifies the fully qualified resource ID of a virtual machine scale set the pool is attached to.", + "type": { + "$id": "244", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "245", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePoolResourceProperties.attachedVirtualMachineScaleSetId", + "serializationOptions": { + "$id": "246", + "json": { + "$id": "247", + "name": "attachedVirtualMachineScaleSetId" + } + } + }, + { + "$id": "248", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "The status of the last operation.", + "type": { + "$ref": "22" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePoolResourceProperties.provisioningState", + "serializationOptions": { + "$id": "249", + "json": { + "$id": "250", + "name": "provisioningState" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePoolResource.properties", + "serializationOptions": { + "$id": "251", + "json": { + "$id": "252", + "name": "properties" + } + } + }, + { + "$id": "253", + "kind": "path", + "name": "name", + "serializedName": "name", + "doc": "Name of the standby virtual machine pool", + "type": { + "$id": "254", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePoolResource.name", + "discriminator": false, + "flatten": false + } + ] + }, + { + "$ref": "227" + }, + { + "$ref": "229" + }, + { + "$ref": "172" + }, + { + "$ref": "173" + }, + { + "$ref": "189" + }, + { + "$id": "255", + "kind": "model", + "name": "ArmOperationStatusResourceProvisioningState", + "namespace": "Azure.ResourceManager.StandbyPool", + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus", + "usage": "LroPolling", + "doc": "Standard Azure Resource Manager operation status response", + "decorators": [], + "properties": [ + { + "$id": "256", + "kind": "property", + "name": "status", + "serializedName": "status", + "doc": "The operation status", + "type": { + "$ref": "42" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.status", + "serializationOptions": { + "$id": "257", + "json": { + "$id": "258", + "name": "status" + } + } + }, + { + "$id": "259", + "kind": "path", + "name": "id", + "serializedName": "id", + "doc": "The unique identifier for the operationStatus resource", + "type": { + "$id": "260", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.id", + "discriminator": false, + "flatten": false + }, + { + "$id": "261", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the operationStatus resource", + "type": { + "$id": "262", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.name", + "serializationOptions": { + "$id": "263", + "json": { + "$id": "264", + "name": "name" + } + } + }, + { + "$id": "265", + "kind": "property", + "name": "startTime", + "serializedName": "startTime", + "doc": "Operation start time", + "type": { + "$id": "266", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "267", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.startTime", + "serializationOptions": { + "$id": "268", + "json": { + "$id": "269", + "name": "startTime" + } + } + }, + { + "$id": "270", + "kind": "property", + "name": "endTime", + "serializedName": "endTime", + "doc": "Operation complete time", + "type": { + "$id": "271", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "272", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.endTime", + "serializationOptions": { + "$id": "273", + "json": { + "$id": "274", + "name": "endTime" + } + } + }, + { + "$id": "275", + "kind": "property", + "name": "percentComplete", + "serializedName": "percentComplete", + "doc": "The progress made toward completing the operation", + "type": { + "$id": "276", + "kind": "float64", + "name": "float64", + "crossLanguageDefinitionId": "TypeSpec.float64", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.percentComplete", + "serializationOptions": { + "$id": "277", + "json": { + "$id": "278", + "name": "percentComplete" + } + } + }, + { + "$id": "279", + "kind": "property", + "name": "error", + "serializedName": "error", + "doc": "Errors that occurred if the operation ended with Canceled or Failed status", + "type": { + "$ref": "139" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.error", + "serializationOptions": { + "$id": "280", + "json": { + "$id": "281", + "name": "error" + } + } + } + ] + }, + { + "$id": "282", + "kind": "model", + "name": "StandbyVirtualMachinePoolResourceUpdate", + "namespace": "Azure.ResourceManager.StandbyPool", + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModel", + "usage": "Input,Json", + "doc": "The type used for update operations of the StandbyVirtualMachinePoolResource.", + "decorators": [], + "properties": [ + { + "$id": "283", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Resource tags.", + "type": { + "$id": "284", + "kind": "dict", + "keyType": { + "$id": "285", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "286", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModel.tags", + "serializationOptions": { + "$id": "287", + "json": { + "$id": "288", + "name": "tags" + } + } + }, + { + "$id": "289", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "290", + "kind": "model", + "name": "StandbyVirtualMachinePoolResourceUpdateProperties", + "namespace": "Azure.ResourceManager.StandbyPool", + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties", + "usage": "Input,Json", + "doc": "The updatable properties of the StandbyVirtualMachinePoolResource.", + "decorators": [], + "properties": [ + { + "$id": "291", + "kind": "property", + "name": "elasticityProfile", + "serializedName": "elasticityProfile", + "doc": "Specifies the elasticity profile of the standby virtual machine pools.", + "type": { + "$ref": "229" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties.elasticityProfile", + "serializationOptions": { + "$id": "292", + "json": { + "$id": "293", + "name": "elasticityProfile" + } + } + }, + { + "$id": "294", + "kind": "property", + "name": "virtualMachineState", + "serializedName": "virtualMachineState", + "doc": "Specifies the desired state of virtual machines in the pool.", + "type": { + "$ref": "14" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties.virtualMachineState", + "serializationOptions": { + "$id": "295", + "json": { + "$id": "296", + "name": "virtualMachineState" + } + } + }, + { + "$id": "297", + "kind": "property", + "name": "attachedVirtualMachineScaleSetId", + "serializedName": "attachedVirtualMachineScaleSetId", + "doc": "Specifies the fully qualified resource ID of a virtual machine scale set the pool is attached to.", + "type": { + "$id": "298", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "299", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties.attachedVirtualMachineScaleSetId", + "serializationOptions": { + "$id": "300", + "json": { + "$id": "301", + "name": "attachedVirtualMachineScaleSetId" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModel.properties", + "serializationOptions": { + "$id": "302", + "json": { + "$id": "303", + "name": "properties" + } + } + } + ] + }, + { + "$ref": "290" + }, + { + "$id": "304", + "kind": "model", + "name": "StandbyVirtualMachinePoolResourceListResult", + "namespace": "Azure.ResourceManager.StandbyPool", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult", + "usage": "Output,Json", + "doc": "The response of a StandbyVirtualMachinePoolResource list operation.", + "decorators": [], + "properties": [ + { + "$id": "305", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The StandbyVirtualMachinePoolResource items on this page", + "type": { + "$id": "306", + "kind": "array", + "name": "ArrayStandbyVirtualMachinePoolResource", + "valueType": { + "$ref": "171" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", + "serializationOptions": { + "$id": "307", + "json": { + "$id": "308", + "name": "value" + } + } + }, + { + "$id": "309", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "310", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "311", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.nextLink", + "serializationOptions": { + "$id": "312", + "json": { + "$id": "313", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "314", + "kind": "model", + "name": "StandbyVirtualMachine", + "namespace": "Azure.ResourceManager.StandbyPool", + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachineResource", + "usage": "Output,Json", + "doc": "Concrete proxy resource types can be created by aliasing this type using a specific property type.", + "decorators": [], + "baseModel": { + "$id": "315", + "kind": "model", + "name": "ProxyResource", + "namespace": "Azure.ResourceManager.StandbyPool", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ProxyResource", + "usage": "Output,Json", + "doc": "The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location", + "decorators": [], + "baseModel": { + "$ref": "173" + }, + "properties": [] + }, + "properties": [ + { + "$id": "316", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "317", + "kind": "model", + "name": "StandbyVirtualMachineProperties", + "namespace": "Azure.ResourceManager.StandbyPool", + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachineResourceProperties", + "usage": "Output,Json", + "doc": "Details of the StandbyVirtualMachine.", + "decorators": [], + "properties": [ + { + "$id": "318", + "kind": "property", + "name": "virtualMachineResourceId", + "serializedName": "virtualMachineResourceId", + "doc": "Resource id of the virtual machine.", + "type": { + "$id": "319", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "320", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachineResourceProperties.virtualMachineResourceId", + "serializationOptions": { + "$id": "321", + "json": { + "$id": "322", + "name": "virtualMachineResourceId" + } + } + }, + { + "$id": "323", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "The status of the last operation.", + "type": { + "$ref": "22" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachineResourceProperties.provisioningState", + "serializationOptions": { + "$id": "324", + "json": { + "$id": "325", + "name": "provisioningState" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachineResource.properties", + "serializationOptions": { + "$id": "326", + "json": { + "$id": "327", + "name": "properties" + } + } + }, + { + "$id": "328", + "kind": "path", + "name": "name", + "serializedName": "name", + "doc": "Name of the standby virtual machine", + "type": { + "$id": "329", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachineResource.name", + "discriminator": false, + "flatten": false + } + ] + }, + { + "$ref": "317" + }, + { + "$ref": "315" + }, + { + "$id": "330", + "kind": "model", + "name": "StandbyVirtualMachineResourceListResult", + "namespace": "Azure.ResourceManager.StandbyPool", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult", + "usage": "Output,Json", + "doc": "The response of a StandbyVirtualMachineResource list operation.", + "decorators": [], + "properties": [ + { + "$id": "331", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The StandbyVirtualMachineResource items on this page", + "type": { + "$id": "332", + "kind": "array", + "name": "ArrayStandbyVirtualMachineResource", + "valueType": { + "$ref": "314" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", + "serializationOptions": { + "$id": "333", + "json": { + "$id": "334", + "name": "value" + } + } + }, + { + "$id": "335", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "336", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "337", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.nextLink", + "serializationOptions": { + "$id": "338", + "json": { + "$id": "339", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "340", + "kind": "model", + "name": "StandbyVirtualMachinePoolRuntimeView", + "namespace": "Azure.ResourceManager.StandbyPool", + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePoolRuntimeViewResource", + "usage": "Output,Json", + "doc": "Contains information about a standby virtual machine pool as last known by the StandbyPool resource provider.", + "decorators": [], + "baseModel": { + "$ref": "315" + }, + "properties": [ + { + "$id": "341", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "342", + "kind": "model", + "name": "StandbyVirtualMachinePoolRuntimeViewProperties", + "namespace": "Azure.ResourceManager.StandbyPool", + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePoolRuntimeViewResourceProperties", + "usage": "Output,Json", + "doc": "Contains information about a standby pool as last known by the StandbyPool resource provider.", + "decorators": [], + "properties": [ + { + "$id": "343", + "kind": "property", + "name": "instanceCountSummary", + "serializedName": "instanceCountSummary", + "doc": "A list containing the counts of virtual machines in each possible power state for each zone if enabled, as known by the StandbyPool resource provider. If zones are not enabled on the attached VMSS, the list will contain a single entry without zone values. Note: any resources in the Running state may still be installing extensions / not fully provisioned.", + "type": { + "$id": "344", + "kind": "array", + "name": "ArrayVirtualMachineInstanceCountSummary", + "valueType": { + "$id": "345", + "kind": "model", + "name": "StandbyVirtualMachineInstanceCountSummary", + "namespace": "Azure.ResourceManager.StandbyPool", + "crossLanguageDefinitionId": "Microsoft.StandbyPool.VirtualMachineInstanceCountSummary", + "usage": "Output,Json", + "doc": "Contains the counts of VMs in each power state in a given zone, fault domain, as known by the StandbyPool resource provider. Note: any resources in the Running state may still be installing extensions / not fully provisioned.", + "decorators": [], + "properties": [ + { + "$id": "346", + "kind": "property", + "name": "zone", + "serializedName": "zone", + "doc": "The zone that the provided counts are in. It will not have a value if zones are not enabled on the attached VMSS.", + "type": { + "$id": "347", + "kind": "int64", + "name": "int64", + "crossLanguageDefinitionId": "TypeSpec.int64", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.VirtualMachineInstanceCountSummary.zone", + "serializationOptions": { + "$id": "348", + "json": { + "$id": "349", + "name": "zone" + } + } + }, + { + "$id": "350", + "kind": "property", + "name": "StandbyVirtualMachineInstanceCountsByState", + "serializedName": "instanceCountsByState", + "doc": "The count of pooled virtual machines in each state for the given zone.", + "type": { + "$id": "351", + "kind": "array", + "name": "ArrayPoolVirtualMachineStateCount", + "valueType": { + "$id": "352", + "kind": "model", + "name": "PoolVirtualMachineStateCount", + "namespace": "Azure.ResourceManager.StandbyPool", + "crossLanguageDefinitionId": "Microsoft.StandbyPool.PoolVirtualMachineStateCount", + "usage": "Output,Json", + "doc": "Displays the counts of pooled virtual machines in each state, as known by the StandbyPool resource provider.", + "decorators": [], + "properties": [ + { + "$id": "353", + "kind": "property", + "name": "state", + "serializedName": "state", + "doc": "The state that the pooled virtual machines count is for.", + "type": { + "$ref": "50" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.PoolVirtualMachineStateCount.state", + "serializationOptions": { + "$id": "354", + "json": { + "$id": "355", + "name": "state" + } + } + }, + { + "$id": "356", + "kind": "property", + "name": "count", + "serializedName": "count", + "doc": "The count of pooled virtual machines in the given state.", + "type": { + "$id": "357", + "kind": "int64", + "name": "int64", + "crossLanguageDefinitionId": "TypeSpec.int64", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.PoolVirtualMachineStateCount.count", + "serializationOptions": { + "$id": "358", + "json": { + "$id": "359", + "name": "count" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.VirtualMachineInstanceCountSummary.instanceCountsByState", + "serializationOptions": { + "$id": "360", + "json": { + "$id": "361", + "name": "instanceCountsByState" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePoolRuntimeViewResourceProperties.instanceCountSummary", + "serializationOptions": { + "$id": "362", + "json": { + "$id": "363", + "name": "instanceCountSummary" + } + } + }, + { + "$id": "364", + "kind": "property", + "name": "status", + "serializedName": "status", + "doc": "Display status of the standby pool", + "type": { + "$id": "365", + "kind": "model", + "name": "StandbyPoolStatus", + "namespace": "Azure.ResourceManager.StandbyPool", + "crossLanguageDefinitionId": "Microsoft.StandbyPool.PoolStatus", + "usage": "Output,Json", + "doc": "Displays StandbyPool status.", + "decorators": [], + "properties": [ + { + "$id": "366", + "kind": "property", + "name": "code", + "serializedName": "code", + "doc": "Displays the healthy state of the StandbyPool.", + "type": { + "$ref": "68" + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.PoolStatus.code", + "serializationOptions": { + "$id": "367", + "json": { + "$id": "368", + "name": "code" + } + } + }, + { + "$id": "369", + "kind": "property", + "name": "message", + "serializedName": "message", + "doc": "Displays the StandbyPool health state details.", + "type": { + "$id": "370", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.PoolStatus.message", + "serializationOptions": { + "$id": "371", + "json": { + "$id": "372", + "name": "message" + } + } + } + ] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePoolRuntimeViewResourceProperties.status", + "serializationOptions": { + "$id": "373", + "json": { + "$id": "374", + "name": "status" + } + } + }, + { + "$id": "375", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "Displays the provisioning state of the standby pool", + "type": { + "$ref": "22" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePoolRuntimeViewResourceProperties.provisioningState", + "serializationOptions": { + "$id": "376", + "json": { + "$id": "377", + "name": "provisioningState" + } + } + }, + { + "$id": "378", + "kind": "property", + "name": "prediction", + "serializedName": "prediction", + "doc": "Displays prediction information of the standby pool", + "type": { + "$id": "379", + "kind": "model", + "name": "StandbyVirtualMachinePoolPrediction", + "namespace": "Azure.ResourceManager.StandbyPool", + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePoolPrediction", + "usage": "Output,Json", + "doc": "Displays prediction information of the standby pool.", + "decorators": [], + "properties": [ + { + "$id": "380", + "kind": "property", + "name": "forecastValues", + "serializedName": "forecastValues", + "doc": "Displays the forecast information of the standby pool.", + "type": { + "$id": "381", + "kind": "model", + "name": "StandbyVirtualMachinePoolForecastValues", + "namespace": "Azure.ResourceManager.StandbyPool", + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePoolForecastValues", + "usage": "Output,Json", + "doc": "Displays the forecast information of the standby pool.", + "decorators": [], + "properties": [ + { + "$id": "382", + "kind": "property", + "name": "instancesRequestedCount", + "serializedName": "instancesRequestedCount", + "doc": "Displays the predicted count of instances to be requested from the standby pool.", + "type": { + "$id": "383", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "384", + "kind": "int64", + "name": "int64", + "crossLanguageDefinitionId": "TypeSpec.int64", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePoolForecastValues.instancesRequestedCount", + "serializationOptions": { + "$id": "385", + "json": { + "$id": "386", + "name": "instancesRequestedCount" + } + } + } + ] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePoolPrediction.forecastValues", + "serializationOptions": { + "$id": "387", + "json": { + "$id": "388", + "name": "forecastValues" + } + } + }, + { + "$id": "389", + "kind": "property", + "name": "forecastStartTime", + "serializedName": "forecastStartTime", + "doc": "Displays the UTC timestamp of when the prediction was retrieved for the standby pool.", + "type": { + "$id": "390", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "391", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePoolPrediction.forecastStartTime", + "serializationOptions": { + "$id": "392", + "json": { + "$id": "393", + "name": "forecastStartTime" + } + } + }, + { + "$id": "394", + "kind": "property", + "name": "forecastInfo", + "serializedName": "forecastInfo", + "doc": "Displays additional information for the prediction of the standby pool.", + "type": { + "$id": "395", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePoolPrediction.forecastInfo", + "serializationOptions": { + "$id": "396", + "json": { + "$id": "397", + "name": "forecastInfo" + } + } + } + ] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePoolRuntimeViewResourceProperties.prediction", + "serializationOptions": { + "$id": "398", + "json": { + "$id": "399", + "name": "prediction" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePoolRuntimeViewResource.properties", + "serializationOptions": { + "$id": "400", + "json": { + "$id": "401", + "name": "properties" + } + } + }, + { + "$id": "402", + "kind": "path", + "name": "name", + "serializedName": "name", + "doc": "The unique identifier for the runtime view. The input string should be the word 'latest', which will get the latest runtime view of the pool, otherwise the request will fail with NotFound exception.", + "type": { + "$id": "403", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePoolRuntimeViewResource.name", + "discriminator": false, + "flatten": false + } + ] + }, + { + "$ref": "342" + }, + { + "$ref": "345" + }, + { + "$ref": "352" + }, + { + "$ref": "365" + }, + { + "$ref": "379" + }, + { + "$ref": "381" + }, + { + "$id": "404", + "kind": "model", + "name": "StandbyVirtualMachinePoolRuntimeViewResourceListResult", + "namespace": "Azure.ResourceManager.StandbyPool", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult", + "usage": "Output,Json", + "doc": "The response of a StandbyVirtualMachinePoolRuntimeViewResource list operation.", + "decorators": [], + "properties": [ + { + "$id": "405", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The StandbyVirtualMachinePoolRuntimeViewResource items on this page", + "type": { + "$id": "406", + "kind": "array", + "name": "ArrayStandbyVirtualMachinePoolRuntimeViewResource", + "valueType": { + "$ref": "340" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", + "serializationOptions": { + "$id": "407", + "json": { + "$id": "408", + "name": "value" + } + } + }, + { + "$id": "409", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "410", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "411", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.nextLink", + "serializationOptions": { + "$id": "412", + "json": { + "$id": "413", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "414", + "kind": "model", + "name": "StandbyContainerGroupPool", + "namespace": "Azure.ResourceManager.StandbyPool", + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPoolResource", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "A StandbyContainerGroupPoolResource.", + "decorators": [], + "baseModel": { + "$ref": "172" + }, + "properties": [ + { + "$id": "415", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "416", + "kind": "model", + "name": "StandbyContainerGroupPoolProperties", + "namespace": "Azure.ResourceManager.StandbyPool", + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPoolResourceProperties", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Details of the StandbyContainerGroupPool.", + "decorators": [], + "properties": [ + { + "$id": "417", + "kind": "property", + "name": "elasticityProfile", + "serializedName": "elasticityProfile", + "doc": "Specifies elasticity profile of standby container group pools.", + "type": { + "$id": "418", + "kind": "model", + "name": "StandbyContainerGroupPoolElasticityProfile", + "namespace": "Azure.ResourceManager.StandbyPool", + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPoolElasticityProfile", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Specifies the elasticity profile of the standby container group pools.", + "decorators": [], + "properties": [ + { + "$id": "419", + "kind": "property", + "name": "maxReadyCapacity", + "serializedName": "maxReadyCapacity", + "doc": "Specifies maximum number of standby container groups in the standby pool.", + "type": { + "$id": "420", + "kind": "int64", + "name": "int64", + "crossLanguageDefinitionId": "TypeSpec.int64", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPoolElasticityProfile.maxReadyCapacity", + "serializationOptions": { + "$id": "421", + "json": { + "$id": "422", + "name": "maxReadyCapacity" + } + } + }, + { + "$id": "423", + "kind": "property", + "name": "refillPolicy", + "serializedName": "refillPolicy", + "doc": "Specifies refill policy of the pool.", + "type": { + "$ref": "74" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPoolElasticityProfile.refillPolicy", + "serializationOptions": { + "$id": "424", + "json": { + "$id": "425", + "name": "refillPolicy" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPoolResourceProperties.elasticityProfile", + "serializationOptions": { + "$id": "426", + "json": { + "$id": "427", + "name": "elasticityProfile" + } + } + }, + { + "$id": "428", + "kind": "property", + "name": "containerGroupProperties", + "serializedName": "containerGroupProperties", + "doc": "Specifies container group properties of standby container group pools.", + "type": { + "$id": "429", + "kind": "model", + "name": "StandbyContainerGroupProperties", + "namespace": "Azure.ResourceManager.StandbyPool", + "crossLanguageDefinitionId": "Microsoft.StandbyPool.ContainerGroupProperties", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Details of the ContainerGroupProperties.", + "decorators": [], + "properties": [ + { + "$id": "430", + "kind": "property", + "name": "containerGroupProfile", + "serializedName": "containerGroupProfile", + "doc": "Specifies container group profile of standby container groups.", + "type": { + "$id": "431", + "kind": "model", + "name": "StandbyContainerGroupProfile", + "namespace": "Azure.ResourceManager.StandbyPool", + "crossLanguageDefinitionId": "Microsoft.StandbyPool.ContainerGroupProfile", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Details of the ContainerGroupProfile.", + "decorators": [], + "properties": [ + { + "$id": "432", + "kind": "property", + "name": "id", + "serializedName": "id", + "doc": "Specifies container group profile id of standby container groups.", + "type": { + "$id": "433", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "434", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.ContainerGroupProfile.id", + "serializationOptions": { + "$id": "435", + "json": { + "$id": "436", + "name": "id" + } + } + }, + { + "$id": "437", + "kind": "property", + "name": "revision", + "serializedName": "revision", + "doc": "Specifies revision of container group profile.", + "type": { + "$id": "438", + "kind": "int64", + "name": "int64", + "crossLanguageDefinitionId": "TypeSpec.int64", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.ContainerGroupProfile.revision", + "serializationOptions": { + "$id": "439", + "json": { + "$id": "440", + "name": "revision" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.ContainerGroupProperties.containerGroupProfile", + "serializationOptions": { + "$id": "441", + "json": { + "$id": "442", + "name": "containerGroupProfile" + } + } + }, + { + "$id": "443", + "kind": "property", + "name": "subnetIds", + "serializedName": "subnetIds", + "doc": "Specifies subnet Ids for container group.", + "type": { + "$id": "444", + "kind": "array", + "name": "ArraySubnet", + "valueType": { + "$id": "445", + "kind": "model", + "name": "Subnet", + "namespace": "Azure.ResourceManager.StandbyPool", + "crossLanguageDefinitionId": "Microsoft.StandbyPool.Subnet", + "usage": "Input,Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Subnet of container group", + "decorators": [], + "properties": [ + { + "$id": "446", + "kind": "property", + "name": "id", + "serializedName": "id", + "doc": "Specifies ARM resource id of the subnet.", + "type": { + "$id": "447", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "448", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.Subnet.id", + "serializationOptions": { + "$id": "449", + "json": { + "$id": "450", + "name": "id" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.ContainerGroupProperties.subnetIds", + "serializationOptions": { + "$id": "451", + "json": { + "$id": "452", + "name": "subnetIds" + } + } + } + ] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPoolResourceProperties.containerGroupProperties", + "serializationOptions": { + "$id": "453", + "json": { + "$id": "454", + "name": "containerGroupProperties" + } + } + }, + { + "$id": "455", + "kind": "property", + "name": "zones", + "serializedName": "zones", + "doc": "Specifies zones of standby container group pools.", + "type": { + "$id": "456", + "kind": "array", + "name": "Array1", + "valueType": { + "$id": "457", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPoolResourceProperties.zones", + "serializationOptions": { + "$id": "458", + "json": { + "$id": "459", + "name": "zones" + } + } + }, + { + "$id": "460", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "The status of the last operation.", + "type": { + "$ref": "22" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPoolResourceProperties.provisioningState", + "serializationOptions": { + "$id": "461", + "json": { + "$id": "462", + "name": "provisioningState" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPoolResource.properties", + "serializationOptions": { + "$id": "463", + "json": { + "$id": "464", + "name": "properties" + } + } + }, + { + "$id": "465", + "kind": "path", + "name": "name", + "serializedName": "name", + "doc": "Name of the standby container group pool", + "type": { + "$id": "466", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPoolResource.name", + "discriminator": false, + "flatten": false + } + ] + }, + { + "$ref": "416" + }, + { + "$ref": "418" + }, + { + "$ref": "429" + }, + { + "$ref": "431" + }, + { + "$ref": "445" + }, + { + "$id": "467", + "kind": "model", + "name": "StandbyContainerGroupPoolResourceUpdate", + "namespace": "Azure.ResourceManager.StandbyPool", + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModel", + "usage": "Input,Json", + "doc": "The type used for update operations of the StandbyContainerGroupPoolResource.", + "decorators": [], + "properties": [ + { + "$id": "468", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Resource tags.", + "type": { + "$id": "469", + "kind": "dict", + "keyType": { + "$id": "470", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "471", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModel.tags", + "serializationOptions": { + "$id": "472", + "json": { + "$id": "473", + "name": "tags" + } + } + }, + { + "$id": "474", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "475", + "kind": "model", + "name": "StandbyContainerGroupPoolResourceUpdateProperties", + "namespace": "Azure.ResourceManager.StandbyPool", + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties", + "usage": "Input,Json", + "doc": "The updatable properties of the StandbyContainerGroupPoolResource.", + "decorators": [], + "properties": [ + { + "$id": "476", + "kind": "property", + "name": "elasticityProfile", + "serializedName": "elasticityProfile", + "doc": "Specifies elasticity profile of standby container group pools.", + "type": { + "$ref": "418" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties.elasticityProfile", + "serializationOptions": { + "$id": "477", + "json": { + "$id": "478", + "name": "elasticityProfile" + } + } + }, + { + "$id": "479", + "kind": "property", + "name": "containerGroupProperties", + "serializedName": "containerGroupProperties", + "doc": "Specifies container group properties of standby container group pools.", + "type": { + "$ref": "429" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties.containerGroupProperties", + "serializationOptions": { + "$id": "480", + "json": { + "$id": "481", + "name": "containerGroupProperties" + } + } + }, + { + "$id": "482", + "kind": "property", + "name": "zones", + "serializedName": "zones", + "doc": "Specifies zones of standby container group pools.", + "type": { + "$id": "483", + "kind": "array", + "name": "Array1", + "valueType": { + "$id": "484", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties.zones", + "serializationOptions": { + "$id": "485", + "json": { + "$id": "486", + "name": "zones" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.Foundations.ResourceUpdateModel.properties", + "serializationOptions": { + "$id": "487", + "json": { + "$id": "488", + "name": "properties" + } + } + } + ] + }, + { + "$ref": "475" + }, + { + "$id": "489", + "kind": "model", + "name": "StandbyContainerGroupPoolResourceListResult", + "namespace": "Azure.ResourceManager.StandbyPool", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult", + "usage": "Output,Json", + "doc": "The response of a StandbyContainerGroupPoolResource list operation.", + "decorators": [], + "properties": [ + { + "$id": "490", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The StandbyContainerGroupPoolResource items on this page", + "type": { + "$id": "491", + "kind": "array", + "name": "ArrayStandbyContainerGroupPoolResource", + "valueType": { + "$ref": "414" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", + "serializationOptions": { + "$id": "492", + "json": { + "$id": "493", + "name": "value" + } + } + }, + { + "$id": "494", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "495", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "496", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.nextLink", + "serializationOptions": { + "$id": "497", + "json": { + "$id": "498", + "name": "nextLink" + } + } + } + ] + }, + { + "$id": "499", + "kind": "model", + "name": "StandbyContainerGroupPoolRuntimeView", + "namespace": "Azure.ResourceManager.StandbyPool", + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPoolRuntimeViewResource", + "usage": "Output,Json", + "doc": "Contains information about a standby container group pool as last known by the StandbyPool resource provider.", + "decorators": [], + "baseModel": { + "$ref": "315" + }, + "properties": [ + { + "$id": "500", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "The resource-specific properties for this resource.", + "type": { + "$id": "501", + "kind": "model", + "name": "StandbyContainerGroupPoolRuntimeViewProperties", + "namespace": "Azure.ResourceManager.StandbyPool", + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPoolRuntimeViewResourceProperties", + "usage": "Output,Json", + "doc": "Contains information about a standby pool as last known by the StandbyPool resource provider.", + "decorators": [], + "properties": [ + { + "$id": "502", + "kind": "property", + "name": "instanceCountSummary", + "serializedName": "instanceCountSummary", + "doc": "A list containing the counts of container groups in each possible state, as known by the StandbyPool resource provider.", + "type": { + "$id": "503", + "kind": "array", + "name": "ArrayContainerGroupInstanceCountSummary", + "valueType": { + "$id": "504", + "kind": "model", + "name": "ContainerGroupInstanceCountSummary", + "namespace": "Azure.ResourceManager.StandbyPool", + "crossLanguageDefinitionId": "Microsoft.StandbyPool.ContainerGroupInstanceCountSummary", + "usage": "Output,Json", + "doc": "Displays the counts of container groups in each state, as known by the StandbyPool resource provider.", + "decorators": [], + "properties": [ + { + "$id": "505", + "kind": "property", + "name": "zone", + "serializedName": "zone", + "doc": "The zone that the provided counts are in. It will not have a value if zones are not enabled.", + "type": { + "$id": "506", + "kind": "int64", + "name": "int64", + "crossLanguageDefinitionId": "TypeSpec.int64", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.ContainerGroupInstanceCountSummary.zone", + "serializationOptions": { + "$id": "507", + "json": { + "$id": "508", + "name": "zone" + } + } + }, + { + "$id": "509", + "kind": "property", + "name": "StandbyContainerGroupInstanceCountsByState", + "serializedName": "instanceCountsByState", + "doc": "The count of pooled container groups in each state for the given zone.", + "type": { + "$id": "510", + "kind": "array", + "name": "ArrayPoolContainerGroupStateCount", + "valueType": { + "$id": "511", + "kind": "model", + "name": "PoolContainerGroupStateCount", + "namespace": "Azure.ResourceManager.StandbyPool", + "crossLanguageDefinitionId": "Microsoft.StandbyPool.PoolContainerGroupStateCount", + "usage": "Output,Json", + "doc": "Displays the counts of pooled container groups in each state, as known by the StandbyPool resource provider.", + "decorators": [], + "properties": [ + { + "$id": "512", + "kind": "property", + "name": "state", + "serializedName": "state", + "doc": "The state that the pooled container groups count is for.", + "type": { + "$ref": "78" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.PoolContainerGroupStateCount.state", + "serializationOptions": { + "$id": "513", + "json": { + "$id": "514", + "name": "state" + } + } + }, + { + "$id": "515", + "kind": "property", + "name": "count", + "serializedName": "count", + "doc": "The count of pooled container groups in the given state.", + "type": { + "$id": "516", + "kind": "int64", + "name": "int64", + "crossLanguageDefinitionId": "TypeSpec.int64", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.PoolContainerGroupStateCount.count", + "serializationOptions": { + "$id": "517", + "json": { + "$id": "518", + "name": "count" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.ContainerGroupInstanceCountSummary.instanceCountsByState", + "serializationOptions": { + "$id": "519", + "json": { + "$id": "520", + "name": "instanceCountsByState" + } + } + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPoolRuntimeViewResourceProperties.instanceCountSummary", + "serializationOptions": { + "$id": "521", + "json": { + "$id": "522", + "name": "instanceCountSummary" + } + } + }, + { + "$id": "523", + "kind": "property", + "name": "status", + "serializedName": "status", + "doc": "Display status of the standby pool", + "type": { + "$ref": "365" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPoolRuntimeViewResourceProperties.status", + "serializationOptions": { + "$id": "524", + "json": { + "$id": "525", + "name": "status" + } + } + }, + { + "$id": "526", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "Displays the provisioning state of the standby pool", + "type": { + "$ref": "22" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPoolRuntimeViewResourceProperties.provisioningState", + "serializationOptions": { + "$id": "527", + "json": { + "$id": "528", + "name": "provisioningState" + } + } + }, + { + "$id": "529", + "kind": "property", + "name": "prediction", + "serializedName": "prediction", + "doc": "Displays prediction information of the standby pool", + "type": { + "$id": "530", + "kind": "model", + "name": "StandbyContainerGroupPoolPrediction", + "namespace": "Azure.ResourceManager.StandbyPool", + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPoolPrediction", + "usage": "Output,Json", + "doc": "Displays prediction information of the standby pool.", + "decorators": [], + "properties": [ + { + "$id": "531", + "kind": "property", + "name": "forecastValues", + "serializedName": "forecastValues", + "doc": "Displays the forecast information of the standby pool.", + "type": { + "$id": "532", + "kind": "model", + "name": "StandbyContainerGroupPoolForecastValues", + "namespace": "Azure.ResourceManager.StandbyPool", + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPoolForecastValues", + "usage": "Output,Json", + "doc": "Displays the forecast information of the standby pool.", + "decorators": [], + "properties": [ + { + "$id": "533", + "kind": "property", + "name": "instancesRequestedCount", + "serializedName": "instancesRequestedCount", + "doc": "Displays the predicted count of instances to be requested from the standby pool.", + "type": { + "$id": "534", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "535", + "kind": "int64", + "name": "int64", + "crossLanguageDefinitionId": "TypeSpec.int64", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPoolForecastValues.instancesRequestedCount", + "serializationOptions": { + "$id": "536", + "json": { + "$id": "537", + "name": "instancesRequestedCount" + } + } + } + ] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPoolPrediction.forecastValues", + "serializationOptions": { + "$id": "538", + "json": { + "$id": "539", + "name": "forecastValues" + } + } + }, + { + "$id": "540", + "kind": "property", + "name": "forecastStartTime", + "serializedName": "forecastStartTime", + "doc": "Displays the UTC timestamp of when the prediction was retrieved for the standby pool.", + "type": { + "$id": "541", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "542", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPoolPrediction.forecastStartTime", + "serializationOptions": { + "$id": "543", + "json": { + "$id": "544", + "name": "forecastStartTime" + } + } + }, + { + "$id": "545", + "kind": "property", + "name": "forecastInfo", + "serializedName": "forecastInfo", + "doc": "Displays additional information for the prediction of the standby pool.", + "type": { + "$id": "546", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPoolPrediction.forecastInfo", + "serializationOptions": { + "$id": "547", + "json": { + "$id": "548", + "name": "forecastInfo" + } + } + } + ] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPoolRuntimeViewResourceProperties.prediction", + "serializationOptions": { + "$id": "549", + "json": { + "$id": "550", + "name": "prediction" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPoolRuntimeViewResource.properties", + "serializationOptions": { + "$id": "551", + "json": { + "$id": "552", + "name": "properties" + } + } + }, + { + "$id": "553", + "kind": "path", + "name": "name", + "serializedName": "name", + "doc": "The unique identifier for the runtime view. The input string should be the word 'latest', which will get the latest runtime view of the pool, otherwise the request will fail with NotFound exception.", + "type": { + "$id": "554", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPoolRuntimeViewResource.name", + "discriminator": false, + "flatten": false + } + ] + }, + { + "$ref": "501" + }, + { + "$ref": "504" + }, + { + "$ref": "511" + }, + { + "$ref": "530" + }, + { + "$ref": "532" + }, + { + "$id": "555", + "kind": "model", + "name": "StandbyContainerGroupPoolRuntimeViewResourceListResult", + "namespace": "Azure.ResourceManager.StandbyPool", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult", + "usage": "Output,Json", + "doc": "The response of a StandbyContainerGroupPoolRuntimeViewResource list operation.", + "decorators": [], + "properties": [ + { + "$id": "556", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The StandbyContainerGroupPoolRuntimeViewResource items on this page", + "type": { + "$id": "557", + "kind": "array", + "name": "ArrayStandbyContainerGroupPoolRuntimeViewResource", + "valueType": { + "$ref": "499" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", + "serializationOptions": { + "$id": "558", + "json": { + "$id": "559", + "name": "value" + } + } + }, + { + "$id": "560", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "561", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "562", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.nextLink", + "serializationOptions": { + "$id": "563", + "json": { + "$id": "564", + "name": "nextLink" + } + } + } + ] + } + ], + "clients": [ + { + "$id": "565", + "kind": "client", + "name": "StandbyPoolClient", + "namespace": "Azure.ResourceManager.StandbyPool", + "methods": [], + "parameters": [ + { + "$id": "566", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "567", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "location": "Uri", + "isApiVersion": false, + "isContentType": false, + "isRequired": true, + "isEndpoint": true, + "skipUrlEncoding": false, + "explode": false, + "kind": "Client", + "defaultValue": { + "$id": "568", + "type": { + "$id": "569", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "570", + "name": "TypeSpec.@service", + "arguments": { + "$id": "571", + "options": { + "$id": "572", + "title": "Microsoft.StandbyPool" + } + } + } + ], + "crossLanguageDefinitionId": "Microsoft.StandbyPool", + "apiVersions": [ + "2023-12-01-preview", + "2024-03-01-preview", + "2024-03-01", + "2025-03-01" + ], + "children": [ + { + "$id": "573", + "kind": "client", + "name": "Operations", + "namespace": "Azure.ResourceManager.StandbyPool", + "methods": [ + { + "$id": "574", + "kind": "paging", + "name": "list", + "accessibility": "internal", + "apiVersions": [ + "2023-12-01-preview", + "2024-03-01-preview", + "2024-03-01", + "2025-03-01" + ], + "doc": "List the operations for the provider", + "operation": { + "$id": "575", + "name": "list", + "resourceName": "Operations", + "doc": "List the operations for the provider", + "accessibility": "internal", + "parameters": [ + { + "$id": "576", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "577", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "578", + "type": { + "$id": "579", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "580", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "581", + "kind": "constant", + "valueType": { + "$id": "582", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "583", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "92" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/providers/Microsoft.StandbyPool/operations", + "bufferResponse": true, + "paging": { + "$id": "584", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "585", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Azure.ResourceManager.Operations.list", + "decorators": [], + "examples": [ + { + "$id": "586", + "kind": "http", + "name": "Operations_List", + "description": "Operations_List", + "filePath": "2025-03-01/Operations_List.json", + "parameters": [ + { + "$id": "587", + "parameter": { + "$ref": "576" + }, + "value": { + "$id": "588", + "kind": "string", + "type": { + "$ref": "577" + }, + "value": "2025-03-01" + } + } + ], + "responses": [ + { + "$id": "589", + "response": { + "$ref": "583" + }, + "statusCode": 200, + "bodyValue": { + "$id": "590", + "kind": "model", + "type": { + "$ref": "92" + }, + "value": { + "$id": "591", + "value": { + "$id": "592", + "kind": "array", + "type": { + "$ref": "94" + }, + "value": [ + { + "$id": "593", + "kind": "model", + "type": { + "$ref": "95" + }, + "value": { + "$id": "594", + "name": { + "$id": "595", + "kind": "string", + "type": { + "$ref": "97" + }, + "value": "Microsoft.StandbyPool/standbyContainerGroupPools/write" + }, + "isDataAction": { + "$id": "596", + "kind": "boolean", + "type": { + "$ref": "101" + }, + "value": true + }, + "display": { + "$id": "597", + "kind": "model", + "type": { + "$ref": "105" + }, + "value": { + "$id": "598", + "provider": { + "$id": "599", + "kind": "string", + "type": { + "$ref": "107" + }, + "value": "Microsoft.StandbyPool" + }, + "resource": { + "$id": "600", + "kind": "string", + "type": { + "$ref": "111" + }, + "value": "standbyContainerGroupPools" + }, + "operation": { + "$id": "601", + "kind": "string", + "type": { + "$ref": "115" + }, + "value": "StandbyContainerGroupPools_Create" + }, + "description": { + "$id": "602", + "kind": "string", + "type": { + "$ref": "119" + }, + "value": "Create a StandbyContainerGroupPools Resource" + } + } + }, + "origin": { + "$id": "603", + "kind": "string", + "type": { + "$ref": "2" + }, + "value": "user" + }, + "actionType": { + "$id": "604", + "kind": "string", + "type": { + "$ref": "10" + }, + "value": "Internal" + } + } + } + ] + }, + "nextLink": { + "$id": "605", + "kind": "string", + "type": { + "$ref": "133" + }, + "value": "https://example.com/providers/Microsoft.StandbyPool/operations" + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "606", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "581" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "607", + "type": { + "$id": "608", + "kind": "array", + "name": "ArrayOperation", + "valueType": { + "$ref": "95" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "resultSegments": [ + "value" + ] + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Azure.ResourceManager.Operations.list" + } + ], + "parameters": [ + { + "$id": "609", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "610", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "location": "Uri", + "isApiVersion": false, + "isContentType": false, + "isRequired": true, + "isEndpoint": true, + "skipUrlEncoding": false, + "explode": false, + "kind": "Client", + "defaultValue": { + "$id": "611", + "type": { + "$id": "612", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.Operations", + "apiVersions": [ + "2023-12-01-preview", + "2024-03-01-preview", + "2024-03-01", + "2025-03-01" + ], + "parent": { + "$ref": "565" + } + }, + { + "$id": "613", + "kind": "client", + "name": "StandbyVirtualMachinePools", + "namespace": "Azure.ResourceManager.StandbyPool", + "methods": [ + { + "$id": "614", + "kind": "basic", + "name": "get", + "accessibility": "public", + "apiVersions": [ + "2023-12-01-preview", + "2024-03-01-preview", + "2024-03-01", + "2025-03-01" + ], + "doc": "Get a StandbyVirtualMachinePoolResource", + "operation": { + "$id": "615", + "name": "get", + "resourceName": "StandbyVirtualMachinePoolResource", + "doc": "Get a StandbyVirtualMachinePoolResource", + "accessibility": "public", + "parameters": [ + { + "$id": "616", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "617", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "618", + "type": { + "$id": "619", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "620", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "621", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "622", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "623", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "624", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "625", + "name": "standbyVirtualMachinePoolName", + "nameInRequest": "standbyVirtualMachinePoolName", + "doc": "Name of the standby virtual machine pool", + "type": { + "$id": "626", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "627", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "628", + "kind": "constant", + "valueType": { + "$id": "629", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "630", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "171" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePools.get", + "decorators": [], + "examples": [ + { + "$id": "631", + "kind": "http", + "name": "StandbyVirtualMachinePools_Get", + "description": "StandbyVirtualMachinePools_Get", + "filePath": "2025-03-01/StandbyVirtualMachinePools_Get.json", + "parameters": [ + { + "$id": "632", + "parameter": { + "$ref": "616" + }, + "value": { + "$id": "633", + "kind": "string", + "type": { + "$ref": "617" + }, + "value": "2025-03-01" + } + }, + { + "$id": "634", + "parameter": { + "$ref": "620" + }, + "value": { + "$id": "635", + "kind": "string", + "type": { + "$ref": "621" + }, + "value": "00000000-0000-0000-0000-000000000009" + } + }, + { + "$id": "636", + "parameter": { + "$ref": "623" + }, + "value": { + "$id": "637", + "kind": "string", + "type": { + "$ref": "624" + }, + "value": "rgstandbypool" + } + }, + { + "$id": "638", + "parameter": { + "$ref": "625" + }, + "value": { + "$id": "639", + "kind": "string", + "type": { + "$ref": "626" + }, + "value": "pool" + } + } + ], + "responses": [ + { + "$id": "640", + "response": { + "$ref": "630" + }, + "statusCode": 200, + "bodyValue": { + "$id": "641", + "kind": "model", + "type": { + "$ref": "171" + }, + "value": { + "$id": "642", + "properties": { + "$id": "643", + "kind": "model", + "type": { + "$ref": "227" + }, + "value": { + "$id": "644", + "elasticityProfile": { + "$id": "645", + "kind": "model", + "type": { + "$ref": "229" + }, + "value": { + "$id": "646", + "maxReadyCapacity": { + "$id": "647", + "kind": "number", + "type": { + "$ref": "231" + }, + "value": 304 + }, + "minReadyCapacity": { + "$id": "648", + "kind": "number", + "type": { + "$ref": "235" + }, + "value": 300 + } + } + }, + "virtualMachineState": { + "$id": "649", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Running" + }, + "attachedVirtualMachineScaleSetId": { + "$id": "650", + "kind": "string", + "type": { + "$ref": "244" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Compute/virtualMachineScaleSets/myVmss" + }, + "provisioningState": { + "$id": "651", + "kind": "string", + "type": { + "$ref": "22" + }, + "value": "Succeeded" + } + } + }, + "tags": { + "$id": "652", + "kind": "dict", + "type": { + "$ref": "217" + }, + "value": { + "$id": "653" + } + }, + "location": { + "$id": "654", + "kind": "string", + "type": { + "$ref": "223" + }, + "value": "West US" + }, + "id": { + "$id": "655", + "kind": "string", + "type": { + "$ref": "175" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/pool" + }, + "name": { + "$id": "656", + "kind": "string", + "type": { + "$ref": "180" + }, + "value": "pool" + }, + "type": { + "$id": "657", + "kind": "string", + "type": { + "$ref": "184" + }, + "value": "Microsoft.StandbyPool/standbyVirtualMachinePools" + }, + "systemData": { + "$id": "658", + "kind": "model", + "type": { + "$ref": "189" + }, + "value": { + "$id": "659", + "createdBy": { + "$id": "660", + "kind": "string", + "type": { + "$ref": "191" + }, + "value": "pooluser@microsoft.com" + }, + "createdByType": { + "$id": "661", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "User" + }, + "createdAt": { + "$id": "662", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "2023-09-07T16:33:22.210Z" + }, + "lastModifiedBy": { + "$id": "663", + "kind": "string", + "type": { + "$ref": "203" + }, + "value": "pooluser@microsoft.com" + }, + "lastModifiedByType": { + "$id": "664", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "665", + "kind": "string", + "type": { + "$ref": "210" + }, + "value": "2023-09-07T16:33:22.210Z" + } + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "666", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "667", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "668", + "name": "standbyVirtualMachinePoolName", + "nameInRequest": "standbyVirtualMachinePoolName", + "doc": "Name of the standby virtual machine pool", + "type": { + "$id": "669", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "670", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "628" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "671", + "type": { + "$ref": "171" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePools.get" + }, + { + "$id": "672", + "kind": "lro", + "name": "createOrUpdate", + "accessibility": "public", + "apiVersions": [ + "2023-12-01-preview", + "2024-03-01-preview", + "2024-03-01", + "2025-03-01" + ], + "doc": "Create a StandbyVirtualMachinePoolResource", + "operation": { + "$id": "673", + "name": "createOrUpdate", + "resourceName": "StandbyVirtualMachinePoolResource", + "doc": "Create a StandbyVirtualMachinePoolResource", + "accessibility": "public", + "parameters": [ + { + "$id": "674", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "675", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "676", + "type": { + "$id": "677", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "678", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "679", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "680", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "681", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "682", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "683", + "name": "standbyVirtualMachinePoolName", + "nameInRequest": "standbyVirtualMachinePoolName", + "doc": "Name of the standby virtual machine pool", + "type": { + "$id": "684", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "685", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "686", + "kind": "constant", + "valueType": { + "$id": "687", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "688", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "689", + "kind": "constant", + "valueType": { + "$id": "690", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "691", + "name": "resource", + "nameInRequest": "resource", + "doc": "Resource create parameters.", + "type": { + "$ref": "171" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "692", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "171" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + { + "$id": "693", + "statusCodes": [ + 201 + ], + "bodyType": { + "$ref": "171" + }, + "headers": [ + { + "$id": "694", + "name": "retryAfter", + "nameInResponse": "Retry-After", + "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "type": { + "$id": "695", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "PUT", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "longRunning": { + "$id": "696", + "finalStateVia": 0, + "finalResponse": { + "$id": "697", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "171" + } + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePools.createOrUpdate", + "decorators": [ + { + "$id": "698", + "name": "Azure.Core.@useFinalStateVia", + "arguments": { + "$id": "699", + "finalState": "azure-async-operation" + } + } + ], + "examples": [ + { + "$id": "700", + "kind": "http", + "name": "StandbyVirtualMachinePools_CreateOrUpdate", + "description": "StandbyVirtualMachinePools_CreateOrUpdate", + "filePath": "2025-03-01/StandbyVirtualMachinePools_CreateOrUpdate.json", + "parameters": [ + { + "$id": "701", + "parameter": { + "$ref": "674" + }, + "value": { + "$id": "702", + "kind": "string", + "type": { + "$ref": "675" + }, + "value": "2025-03-01" + } + }, + { + "$id": "703", + "parameter": { + "$ref": "678" + }, + "value": { + "$id": "704", + "kind": "string", + "type": { + "$ref": "679" + }, + "value": "00000000-0000-0000-0000-000000000009" + } + }, + { + "$id": "705", + "parameter": { + "$ref": "681" + }, + "value": { + "$id": "706", + "kind": "string", + "type": { + "$ref": "682" + }, + "value": "rgstandbypool" + } + }, + { + "$id": "707", + "parameter": { + "$ref": "683" + }, + "value": { + "$id": "708", + "kind": "string", + "type": { + "$ref": "684" + }, + "value": "pool" + } + }, + { + "$id": "709", + "parameter": { + "$ref": "691" + }, + "value": { + "$id": "710", + "kind": "model", + "type": { + "$ref": "171" + }, + "value": { + "$id": "711", + "properties": { + "$id": "712", + "kind": "model", + "type": { + "$ref": "227" + }, + "value": { + "$id": "713", + "elasticityProfile": { + "$id": "714", + "kind": "model", + "type": { + "$ref": "229" + }, + "value": { + "$id": "715", + "maxReadyCapacity": { + "$id": "716", + "kind": "number", + "type": { + "$ref": "231" + }, + "value": 304 + }, + "minReadyCapacity": { + "$id": "717", + "kind": "number", + "type": { + "$ref": "235" + }, + "value": 300 + } + } + }, + "virtualMachineState": { + "$id": "718", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Running" + }, + "attachedVirtualMachineScaleSetId": { + "$id": "719", + "kind": "string", + "type": { + "$ref": "244" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Compute/virtualMachineScaleSets/myVmss" + } + } + }, + "tags": { + "$id": "720", + "kind": "dict", + "type": { + "$ref": "217" + }, + "value": { + "$id": "721" + } + }, + "location": { + "$id": "722", + "kind": "string", + "type": { + "$ref": "223" + }, + "value": "West US" + } + } + } + } + ], + "responses": [ + { + "$id": "723", + "response": { + "$ref": "692" + }, + "statusCode": 200, + "bodyValue": { + "$id": "724", + "kind": "model", + "type": { + "$ref": "171" + }, + "value": { + "$id": "725", + "properties": { + "$id": "726", + "kind": "model", + "type": { + "$ref": "227" + }, + "value": { + "$id": "727", + "elasticityProfile": { + "$id": "728", + "kind": "model", + "type": { + "$ref": "229" + }, + "value": { + "$id": "729", + "maxReadyCapacity": { + "$id": "730", + "kind": "number", + "type": { + "$ref": "231" + }, + "value": 304 + }, + "minReadyCapacity": { + "$id": "731", + "kind": "number", + "type": { + "$ref": "235" + }, + "value": 300 + } + } + }, + "virtualMachineState": { + "$id": "732", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Running" + }, + "attachedVirtualMachineScaleSetId": { + "$id": "733", + "kind": "string", + "type": { + "$ref": "244" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Compute/virtualMachineScaleSets/myVmss" + }, + "provisioningState": { + "$id": "734", + "kind": "string", + "type": { + "$ref": "22" + }, + "value": "Succeeded" + } + } + }, + "tags": { + "$id": "735", + "kind": "dict", + "type": { + "$ref": "217" + }, + "value": { + "$id": "736" + } + }, + "location": { + "$id": "737", + "kind": "string", + "type": { + "$ref": "223" + }, + "value": "West US" + }, + "id": { + "$id": "738", + "kind": "string", + "type": { + "$ref": "175" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/pool" + }, + "name": { + "$id": "739", + "kind": "string", + "type": { + "$ref": "180" + }, + "value": "pool" + }, + "type": { + "$id": "740", + "kind": "string", + "type": { + "$ref": "184" + }, + "value": "Microsoft.StandbyPool/standbyVirtualMachinePools" + }, + "systemData": { + "$id": "741", + "kind": "model", + "type": { + "$ref": "189" + }, + "value": { + "$id": "742", + "createdBy": { + "$id": "743", + "kind": "string", + "type": { + "$ref": "191" + }, + "value": "pooluser@microsoft.com" + }, + "createdByType": { + "$id": "744", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "User" + }, + "createdAt": { + "$id": "745", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "2023-09-07T16:33:22.210Z" + }, + "lastModifiedBy": { + "$id": "746", + "kind": "string", + "type": { + "$ref": "203" + }, + "value": "pooluser@microsoft.com" + }, + "lastModifiedByType": { + "$id": "747", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "748", + "kind": "string", + "type": { + "$ref": "210" + }, + "value": "2023-09-07T16:33:22.210Z" + } + } + } + } + } + }, + { + "$id": "749", + "response": { + "$ref": "693" + }, + "statusCode": 201, + "bodyValue": { + "$id": "750", + "kind": "model", + "type": { + "$ref": "171" + }, + "value": { + "$id": "751", + "properties": { + "$id": "752", + "kind": "model", + "type": { + "$ref": "227" + }, + "value": { + "$id": "753", + "elasticityProfile": { + "$id": "754", + "kind": "model", + "type": { + "$ref": "229" + }, + "value": { + "$id": "755", + "maxReadyCapacity": { + "$id": "756", + "kind": "number", + "type": { + "$ref": "231" + }, + "value": 304 + }, + "minReadyCapacity": { + "$id": "757", + "kind": "number", + "type": { + "$ref": "235" + }, + "value": 300 + } + } + }, + "virtualMachineState": { + "$id": "758", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Running" + }, + "attachedVirtualMachineScaleSetId": { + "$id": "759", + "kind": "string", + "type": { + "$ref": "244" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Compute/virtualMachineScaleSets/myVmss" + }, + "provisioningState": { + "$id": "760", + "kind": "string", + "type": { + "$ref": "22" + }, + "value": "Succeeded" + } + } + }, + "tags": { + "$id": "761", + "kind": "dict", + "type": { + "$ref": "217" + }, + "value": { + "$id": "762" + } + }, + "location": { + "$id": "763", + "kind": "string", + "type": { + "$ref": "223" + }, + "value": "West US" + }, + "id": { + "$id": "764", + "kind": "string", + "type": { + "$ref": "175" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/pool" + }, + "name": { + "$id": "765", + "kind": "string", + "type": { + "$ref": "180" + }, + "value": "pool" + }, + "type": { + "$id": "766", + "kind": "string", + "type": { + "$ref": "184" + }, + "value": "Microsoft.StandbyPool/standbyVirtualMachinePools" + }, + "systemData": { + "$id": "767", + "kind": "model", + "type": { + "$ref": "189" + }, + "value": { + "$id": "768", + "createdBy": { + "$id": "769", + "kind": "string", + "type": { + "$ref": "191" + }, + "value": "pooluser@microsoft.com" + }, + "createdByType": { + "$id": "770", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "User" + }, + "createdAt": { + "$id": "771", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "2023-09-07T16:33:22.210Z" + }, + "lastModifiedBy": { + "$id": "772", + "kind": "string", + "type": { + "$ref": "203" + }, + "value": "pooluser@microsoft.com" + }, + "lastModifiedByType": { + "$id": "773", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "774", + "kind": "string", + "type": { + "$ref": "210" + }, + "value": "2023-09-07T16:33:22.210Z" + } + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "775", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "776", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "777", + "name": "standbyVirtualMachinePoolName", + "nameInRequest": "standbyVirtualMachinePoolName", + "doc": "Name of the standby virtual machine pool", + "type": { + "$id": "778", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "779", + "name": "resource", + "nameInRequest": "resource", + "doc": "Resource create parameters.", + "type": { + "$ref": "171" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "780", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "781", + "kind": "constant", + "valueType": { + "$id": "782", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "783", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "784", + "kind": "constant", + "valueType": { + "$id": "785", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "786", + "type": { + "$ref": "171" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePools.createOrUpdate" + }, + { + "$id": "787", + "kind": "lro", + "name": "delete", + "accessibility": "public", + "apiVersions": [ + "2023-12-01-preview", + "2024-03-01-preview", + "2024-03-01", + "2025-03-01" + ], + "doc": "Delete a StandbyVirtualMachinePoolResource", + "operation": { + "$id": "788", + "name": "delete", + "resourceName": "StandbyVirtualMachinePoolResource", + "doc": "Delete a StandbyVirtualMachinePoolResource", + "accessibility": "public", + "parameters": [ + { + "$id": "789", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "790", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "791", + "type": { + "$id": "792", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "793", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "794", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "795", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "796", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "797", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "798", + "name": "standbyVirtualMachinePoolName", + "nameInRequest": "standbyVirtualMachinePoolName", + "doc": "Name of the standby virtual machine pool", + "type": { + "$id": "799", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "800", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "801", + "kind": "constant", + "valueType": { + "$id": "802", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "803", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "804", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "805", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "806", + "name": "retryAfter", + "nameInResponse": "Retry-After", + "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "type": { + "$id": "807", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false + }, + { + "$id": "808", + "statusCodes": [ + 204 + ], + "headers": [], + "isErrorResponse": false + } + ], + "httpMethod": "DELETE", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}", + "bufferResponse": true, + "longRunning": { + "$id": "809", + "finalStateVia": 1, + "finalResponse": { + "$id": "810", + "statusCodes": [ + 204 + ] + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePools.delete", + "decorators": [], + "examples": [ + { + "$id": "811", + "kind": "http", + "name": "StandbyVirtualMachinePools_Delete", + "description": "StandbyVirtualMachinePools_Delete", + "filePath": "2025-03-01/StandbyVirtualMachinePools_Delete.json", + "parameters": [ + { + "$id": "812", + "parameter": { + "$ref": "789" + }, + "value": { + "$id": "813", + "kind": "string", + "type": { + "$ref": "790" + }, + "value": "2025-03-01" + } + }, + { + "$id": "814", + "parameter": { + "$ref": "793" + }, + "value": { + "$id": "815", + "kind": "string", + "type": { + "$ref": "794" + }, + "value": "00000000-0000-0000-0000-000000000009" + } + }, + { + "$id": "816", + "parameter": { + "$ref": "796" + }, + "value": { + "$id": "817", + "kind": "string", + "type": { + "$ref": "797" + }, + "value": "rgstandbypool" + } + }, + { + "$id": "818", + "parameter": { + "$ref": "798" + }, + "value": { + "$id": "819", + "kind": "string", + "type": { + "$ref": "799" + }, + "value": "pool" + } + } + ], + "responses": [ + { + "$id": "820", + "response": { + "$ref": "803" + }, + "statusCode": 202 + }, + { + "$id": "821", + "response": { + "$ref": "808" + }, + "statusCode": 204 + } + ] + } + ] + }, + "parameters": [ + { + "$id": "822", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "823", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "824", + "name": "standbyVirtualMachinePoolName", + "nameInRequest": "standbyVirtualMachinePoolName", + "doc": "Name of the standby virtual machine pool", + "type": { + "$id": "825", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "826", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "827", + "kind": "constant", + "valueType": { + "$id": "828", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "829" + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePools.delete" + }, + { + "$id": "830", + "kind": "basic", + "name": "update", + "accessibility": "public", + "apiVersions": [ + "2023-12-01-preview", + "2024-03-01-preview", + "2024-03-01", + "2025-03-01" + ], + "doc": "Update a StandbyVirtualMachinePoolResource", + "operation": { + "$id": "831", + "name": "update", + "resourceName": "StandbyVirtualMachinePoolResource", + "doc": "Update a StandbyVirtualMachinePoolResource", + "accessibility": "public", + "parameters": [ + { + "$id": "832", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "833", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "834", + "type": { + "$id": "835", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "836", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "837", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "838", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "839", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "840", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "841", + "name": "standbyVirtualMachinePoolName", + "nameInRequest": "standbyVirtualMachinePoolName", + "doc": "Name of the standby virtual machine pool", + "type": { + "$id": "842", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "843", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "844", + "kind": "constant", + "valueType": { + "$id": "845", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "846", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "847", + "kind": "constant", + "valueType": { + "$id": "848", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "849", + "name": "properties", + "nameInRequest": "properties", + "doc": "The resource properties to be updated.", + "type": { + "$ref": "282" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "850", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "171" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "PATCH", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": false, + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePools.update", + "decorators": [], + "examples": [ + { + "$id": "851", + "kind": "http", + "name": "StandbyVirtualMachinePools_Update", + "description": "StandbyVirtualMachinePools_Update", + "filePath": "2025-03-01/StandbyVirtualMachinePools_Update.json", + "parameters": [ + { + "$id": "852", + "parameter": { + "$ref": "832" + }, + "value": { + "$id": "853", + "kind": "string", + "type": { + "$ref": "833" + }, + "value": "2025-03-01" + } + }, + { + "$id": "854", + "parameter": { + "$ref": "836" + }, + "value": { + "$id": "855", + "kind": "string", + "type": { + "$ref": "837" + }, + "value": "00000000-0000-0000-0000-000000000009" + } + }, + { + "$id": "856", + "parameter": { + "$ref": "839" + }, + "value": { + "$id": "857", + "kind": "string", + "type": { + "$ref": "840" + }, + "value": "rgstandbypool" + } + }, + { + "$id": "858", + "parameter": { + "$ref": "841" + }, + "value": { + "$id": "859", + "kind": "string", + "type": { + "$ref": "842" + }, + "value": "pool" + } + }, + { + "$id": "860", + "parameter": { + "$ref": "849" + }, + "value": { + "$id": "861", + "kind": "model", + "type": { + "$ref": "282" + }, + "value": { + "$id": "862", + "tags": { + "$id": "863", + "kind": "dict", + "type": { + "$ref": "284" + }, + "value": { + "$id": "864" + } + }, + "properties": { + "$id": "865", + "kind": "model", + "type": { + "$ref": "290" + }, + "value": { + "$id": "866", + "elasticityProfile": { + "$id": "867", + "kind": "model", + "type": { + "$ref": "229" + }, + "value": { + "$id": "868", + "maxReadyCapacity": { + "$id": "869", + "kind": "number", + "type": { + "$ref": "231" + }, + "value": 304 + }, + "minReadyCapacity": { + "$id": "870", + "kind": "number", + "type": { + "$ref": "235" + }, + "value": 300 + } + } + }, + "virtualMachineState": { + "$id": "871", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Running" + }, + "attachedVirtualMachineScaleSetId": { + "$id": "872", + "kind": "string", + "type": { + "$ref": "298" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Compute/virtualMachineScaleSets/myVmss" + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "873", + "response": { + "$ref": "850" + }, + "statusCode": 200, + "bodyValue": { + "$id": "874", + "kind": "model", + "type": { + "$ref": "171" + }, + "value": { + "$id": "875", + "properties": { + "$id": "876", + "kind": "model", + "type": { + "$ref": "227" + }, + "value": { + "$id": "877", + "elasticityProfile": { + "$id": "878", + "kind": "model", + "type": { + "$ref": "229" + }, + "value": { + "$id": "879", + "maxReadyCapacity": { + "$id": "880", + "kind": "number", + "type": { + "$ref": "231" + }, + "value": 304 + }, + "minReadyCapacity": { + "$id": "881", + "kind": "number", + "type": { + "$ref": "235" + }, + "value": 300 + } + } + }, + "virtualMachineState": { + "$id": "882", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Running" + }, + "attachedVirtualMachineScaleSetId": { + "$id": "883", + "kind": "string", + "type": { + "$ref": "244" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Compute/virtualMachineScaleSets/myVmss" + }, + "provisioningState": { + "$id": "884", + "kind": "string", + "type": { + "$ref": "22" + }, + "value": "Succeeded" + } + } + }, + "tags": { + "$id": "885", + "kind": "dict", + "type": { + "$ref": "217" + }, + "value": { + "$id": "886" + } + }, + "location": { + "$id": "887", + "kind": "string", + "type": { + "$ref": "223" + }, + "value": "West US" + }, + "id": { + "$id": "888", + "kind": "string", + "type": { + "$ref": "175" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/pool" + }, + "name": { + "$id": "889", + "kind": "string", + "type": { + "$ref": "180" + }, + "value": "pool" + }, + "type": { + "$id": "890", + "kind": "string", + "type": { + "$ref": "184" + }, + "value": "Microsoft.StandbyPool/standbyVirtualMachinePools" + }, + "systemData": { + "$id": "891", + "kind": "model", + "type": { + "$ref": "189" + }, + "value": { + "$id": "892", + "createdBy": { + "$id": "893", + "kind": "string", + "type": { + "$ref": "191" + }, + "value": "pooluser@microsoft.com" + }, + "createdByType": { + "$id": "894", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "User" + }, + "createdAt": { + "$id": "895", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "2023-09-07T16:33:22.210Z" + }, + "lastModifiedBy": { + "$id": "896", + "kind": "string", + "type": { + "$ref": "203" + }, + "value": "pooluser@microsoft.com" + }, + "lastModifiedByType": { + "$id": "897", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "898", + "kind": "string", + "type": { + "$ref": "210" + }, + "value": "2023-09-07T16:33:22.210Z" + } + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "899", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "900", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "901", + "name": "standbyVirtualMachinePoolName", + "nameInRequest": "standbyVirtualMachinePoolName", + "doc": "Name of the standby virtual machine pool", + "type": { + "$id": "902", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "903", + "name": "properties", + "nameInRequest": "properties", + "doc": "The resource properties to be updated.", + "type": { + "$ref": "282" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "904", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$ref": "844" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "905", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "847" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "906", + "type": { + "$ref": "171" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePools.update" + }, + { + "$id": "907", + "kind": "paging", + "name": "listByResourceGroup", + "accessibility": "public", + "apiVersions": [ + "2023-12-01-preview", + "2024-03-01-preview", + "2024-03-01", + "2025-03-01" + ], + "doc": "List StandbyVirtualMachinePoolResource resources by resource group", + "operation": { + "$id": "908", + "name": "listByResourceGroup", + "resourceName": "StandbyVirtualMachinePoolResource", + "doc": "List StandbyVirtualMachinePoolResource resources by resource group", + "accessibility": "public", + "parameters": [ + { + "$id": "909", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "910", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "911", + "type": { + "$id": "912", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "913", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "914", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "915", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "916", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "917", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "918", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "919", + "kind": "constant", + "valueType": { + "$id": "920", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "921", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "304" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools", + "bufferResponse": true, + "paging": { + "$id": "922", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "923", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePools.listByResourceGroup", + "decorators": [], + "examples": [ + { + "$id": "924", + "kind": "http", + "name": "StandbyVirtualMachinePools_ListByResourceGroup", + "description": "StandbyVirtualMachinePools_ListByResourceGroup", + "filePath": "2025-03-01/StandbyVirtualMachinePools_ListByResourceGroup.json", + "parameters": [ + { + "$id": "925", + "parameter": { + "$ref": "909" + }, + "value": { + "$id": "926", + "kind": "string", + "type": { + "$ref": "910" + }, + "value": "2025-03-01" + } + }, + { + "$id": "927", + "parameter": { + "$ref": "913" + }, + "value": { + "$id": "928", + "kind": "string", + "type": { + "$ref": "914" + }, + "value": "00000000-0000-0000-0000-000000000009" + } + }, + { + "$id": "929", + "parameter": { + "$ref": "916" + }, + "value": { + "$id": "930", + "kind": "string", + "type": { + "$ref": "917" + }, + "value": "rgstandbypool" + } + } + ], + "responses": [ + { + "$id": "931", + "response": { + "$ref": "921" + }, + "statusCode": 200, + "bodyValue": { + "$id": "932", + "kind": "model", + "type": { + "$ref": "304" + }, + "value": { + "$id": "933", + "value": { + "$id": "934", + "kind": "array", + "type": { + "$ref": "306" + }, + "value": [ + { + "$id": "935", + "kind": "model", + "type": { + "$ref": "171" + }, + "value": { + "$id": "936", + "properties": { + "$id": "937", + "kind": "model", + "type": { + "$ref": "227" + }, + "value": { + "$id": "938", + "elasticityProfile": { + "$id": "939", + "kind": "model", + "type": { + "$ref": "229" + }, + "value": { + "$id": "940", + "maxReadyCapacity": { + "$id": "941", + "kind": "number", + "type": { + "$ref": "231" + }, + "value": 304 + }, + "minReadyCapacity": { + "$id": "942", + "kind": "number", + "type": { + "$ref": "235" + }, + "value": 300 + } + } + }, + "virtualMachineState": { + "$id": "943", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Running" + }, + "attachedVirtualMachineScaleSetId": { + "$id": "944", + "kind": "string", + "type": { + "$ref": "244" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Compute/virtualMachineScaleSets/myVmss" + }, + "provisioningState": { + "$id": "945", + "kind": "string", + "type": { + "$ref": "22" + }, + "value": "Succeeded" + } + } + }, + "tags": { + "$id": "946", + "kind": "dict", + "type": { + "$ref": "217" + }, + "value": { + "$id": "947" + } + }, + "location": { + "$id": "948", + "kind": "string", + "type": { + "$ref": "223" + }, + "value": "West US" + }, + "id": { + "$id": "949", + "kind": "string", + "type": { + "$ref": "175" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/pool" + }, + "name": { + "$id": "950", + "kind": "string", + "type": { + "$ref": "180" + }, + "value": "pool" + }, + "type": { + "$id": "951", + "kind": "string", + "type": { + "$ref": "184" + }, + "value": "Microsoft.StandbyPool/standbyVirtualMachinePools" + }, + "systemData": { + "$id": "952", + "kind": "model", + "type": { + "$ref": "189" + }, + "value": { + "$id": "953", + "createdBy": { + "$id": "954", + "kind": "string", + "type": { + "$ref": "191" + }, + "value": "pooluser@microsoft.com" + }, + "createdByType": { + "$id": "955", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "User" + }, + "createdAt": { + "$id": "956", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "2023-09-07T16:33:22.210Z" + }, + "lastModifiedBy": { + "$id": "957", + "kind": "string", + "type": { + "$ref": "203" + }, + "value": "pooluser@microsoft.com" + }, + "lastModifiedByType": { + "$id": "958", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "959", + "kind": "string", + "type": { + "$ref": "210" + }, + "value": "2023-09-07T16:33:22.210Z" + } + } + } + } + } + ] + }, + "nextLink": { + "$id": "960", + "kind": "string", + "type": { + "$ref": "310" + }, + "value": "https://example.com/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyVirtualMachinePools" + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "961", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "962", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "963", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "919" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "964", + "type": { + "$id": "965", + "kind": "array", + "name": "ArrayStandbyVirtualMachinePoolResource", + "valueType": { + "$ref": "171" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "resultSegments": [ + "value" + ] + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePools.listByResourceGroup" + }, + { + "$id": "966", + "kind": "paging", + "name": "listBySubscription", + "accessibility": "public", + "apiVersions": [ + "2023-12-01-preview", + "2024-03-01-preview", + "2024-03-01", + "2025-03-01" + ], + "doc": "List StandbyVirtualMachinePoolResource resources by subscription ID", + "operation": { + "$id": "967", + "name": "listBySubscription", + "resourceName": "StandbyVirtualMachinePoolResource", + "doc": "List StandbyVirtualMachinePoolResource resources by subscription ID", + "accessibility": "public", + "parameters": [ + { + "$id": "968", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "969", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "970", + "type": { + "$id": "971", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "972", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "973", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "974", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "975", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "976", + "kind": "constant", + "valueType": { + "$id": "977", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "978", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "304" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools", + "bufferResponse": true, + "paging": { + "$id": "979", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "980", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePools.listBySubscription", + "decorators": [], + "examples": [ + { + "$id": "981", + "kind": "http", + "name": "StandbyVirtualMachinePools_ListBySubscription", + "description": "StandbyVirtualMachinePools_ListBySubscription", + "filePath": "2025-03-01/StandbyVirtualMachinePools_ListBySubscription.json", + "parameters": [ + { + "$id": "982", + "parameter": { + "$ref": "968" + }, + "value": { + "$id": "983", + "kind": "string", + "type": { + "$ref": "969" + }, + "value": "2025-03-01" + } + }, + { + "$id": "984", + "parameter": { + "$ref": "972" + }, + "value": { + "$id": "985", + "kind": "string", + "type": { + "$ref": "973" + }, + "value": "00000000-0000-0000-0000-000000000009" + } + } + ], + "responses": [ + { + "$id": "986", + "response": { + "$ref": "978" + }, + "statusCode": 200, + "bodyValue": { + "$id": "987", + "kind": "model", + "type": { + "$ref": "304" + }, + "value": { + "$id": "988", + "value": { + "$id": "989", + "kind": "array", + "type": { + "$ref": "306" + }, + "value": [ + { + "$id": "990", + "kind": "model", + "type": { + "$ref": "171" + }, + "value": { + "$id": "991", + "properties": { + "$id": "992", + "kind": "model", + "type": { + "$ref": "227" + }, + "value": { + "$id": "993", + "elasticityProfile": { + "$id": "994", + "kind": "model", + "type": { + "$ref": "229" + }, + "value": { + "$id": "995", + "maxReadyCapacity": { + "$id": "996", + "kind": "number", + "type": { + "$ref": "231" + }, + "value": 304 + }, + "minReadyCapacity": { + "$id": "997", + "kind": "number", + "type": { + "$ref": "235" + }, + "value": 300 + } + } + }, + "virtualMachineState": { + "$id": "998", + "kind": "string", + "type": { + "$ref": "14" + }, + "value": "Running" + }, + "attachedVirtualMachineScaleSetId": { + "$id": "999", + "kind": "string", + "type": { + "$ref": "244" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Compute/virtualMachineScaleSets/myVmss" + }, + "provisioningState": { + "$id": "1000", + "kind": "string", + "type": { + "$ref": "22" + }, + "value": "Succeeded" + } + } + }, + "tags": { + "$id": "1001", + "kind": "dict", + "type": { + "$ref": "217" + }, + "value": { + "$id": "1002" + } + }, + "location": { + "$id": "1003", + "kind": "string", + "type": { + "$ref": "223" + }, + "value": "West US" + }, + "id": { + "$id": "1004", + "kind": "string", + "type": { + "$ref": "175" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/pool" + }, + "name": { + "$id": "1005", + "kind": "string", + "type": { + "$ref": "180" + }, + "value": "pool" + }, + "type": { + "$id": "1006", + "kind": "string", + "type": { + "$ref": "184" + }, + "value": "Microsoft.StandbyPool/standbyVirtualMachinePools" + }, + "systemData": { + "$id": "1007", + "kind": "model", + "type": { + "$ref": "189" + }, + "value": { + "$id": "1008", + "createdBy": { + "$id": "1009", + "kind": "string", + "type": { + "$ref": "191" + }, + "value": "pooluser@microsoft.com" + }, + "createdByType": { + "$id": "1010", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "User" + }, + "createdAt": { + "$id": "1011", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "2023-09-07T16:33:22.210Z" + }, + "lastModifiedBy": { + "$id": "1012", + "kind": "string", + "type": { + "$ref": "203" + }, + "value": "pooluser@microsoft.com" + }, + "lastModifiedByType": { + "$id": "1013", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "1014", + "kind": "string", + "type": { + "$ref": "210" + }, + "value": "2023-09-07T16:33:22.210Z" + } + } + } + } + } + ] + }, + "nextLink": { + "$id": "1015", + "kind": "string", + "type": { + "$ref": "310" + }, + "value": "https://example.com/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyVirtualMachinePools" + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "1016", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "976" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "1017", + "type": { + "$id": "1018", + "kind": "array", + "name": "ArrayStandbyVirtualMachinePoolResource", + "valueType": { + "$ref": "171" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "resultSegments": [ + "value" + ] + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePools.listBySubscription" + } + ], + "parameters": [ + { + "$id": "1019", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "1020", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "location": "Uri", + "isApiVersion": false, + "isContentType": false, + "isRequired": true, + "isEndpoint": true, + "skipUrlEncoding": false, + "explode": false, + "kind": "Client", + "defaultValue": { + "$id": "1021", + "type": { + "$id": "1022", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "1023", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "1024" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePools", + "apiVersions": [ + "2023-12-01-preview", + "2024-03-01-preview", + "2024-03-01", + "2025-03-01" + ], + "parent": { + "$ref": "565" + } + }, + { + "$id": "1025", + "kind": "client", + "name": "StandbyVirtualMachines", + "namespace": "Azure.ResourceManager.StandbyPool", + "methods": [ + { + "$id": "1026", + "kind": "basic", + "name": "get", + "accessibility": "public", + "apiVersions": [ + "2023-12-01-preview", + "2024-03-01-preview", + "2024-03-01", + "2025-03-01" + ], + "doc": "Get a StandbyVirtualMachineResource", + "operation": { + "$id": "1027", + "name": "get", + "resourceName": "StandbyVirtualMachineResource", + "doc": "Get a StandbyVirtualMachineResource", + "accessibility": "public", + "parameters": [ + { + "$id": "1028", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1029", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1030", + "type": { + "$id": "1031", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1032", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1033", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1034", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1035", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1036", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1037", + "name": "standbyVirtualMachinePoolName", + "nameInRequest": "standbyVirtualMachinePoolName", + "doc": "Name of the standby virtual machine pool", + "type": { + "$id": "1038", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1039", + "name": "standbyVirtualMachineName", + "nameInRequest": "standbyVirtualMachineName", + "doc": "Name of the standby virtual machine", + "type": { + "$id": "1040", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1041", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1042", + "kind": "constant", + "valueType": { + "$id": "1043", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "1044", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "314" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}/standbyVirtualMachines/{standbyVirtualMachineName}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachines.get", + "decorators": [], + "examples": [ + { + "$id": "1045", + "kind": "http", + "name": "StandbyVirtualMachines_Get", + "description": "StandbyVirtualMachines_Get", + "filePath": "2025-03-01/StandbyVirtualMachines_Get.json", + "parameters": [ + { + "$id": "1046", + "parameter": { + "$ref": "1028" + }, + "value": { + "$id": "1047", + "kind": "string", + "type": { + "$ref": "1029" + }, + "value": "2025-03-01" + } + }, + { + "$id": "1048", + "parameter": { + "$ref": "1032" + }, + "value": { + "$id": "1049", + "kind": "string", + "type": { + "$ref": "1033" + }, + "value": "00000000-0000-0000-0000-000000000009" + } + }, + { + "$id": "1050", + "parameter": { + "$ref": "1035" + }, + "value": { + "$id": "1051", + "kind": "string", + "type": { + "$ref": "1036" + }, + "value": "rgstandbypool" + } + }, + { + "$id": "1052", + "parameter": { + "$ref": "1037" + }, + "value": { + "$id": "1053", + "kind": "string", + "type": { + "$ref": "1038" + }, + "value": "pool" + } + }, + { + "$id": "1054", + "parameter": { + "$ref": "1039" + }, + "value": { + "$id": "1055", + "kind": "string", + "type": { + "$ref": "1040" + }, + "value": "virtualMachine" + } + } + ], + "responses": [ + { + "$id": "1056", + "response": { + "$ref": "1044" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1057", + "kind": "model", + "type": { + "$ref": "314" + }, + "value": { + "$id": "1058", + "properties": { + "$id": "1059", + "kind": "model", + "type": { + "$ref": "317" + }, + "value": { + "$id": "1060", + "virtualMachineResourceId": { + "$id": "1061", + "kind": "string", + "type": { + "$ref": "319" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Compute/virtualMachines/virtualMachine" + }, + "provisioningState": { + "$id": "1062", + "kind": "string", + "type": { + "$ref": "22" + }, + "value": "Succeeded" + } + } + }, + "id": { + "$id": "1063", + "kind": "string", + "type": { + "$ref": "175" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/pool/standbyVirtualMachines/virtualMachine" + }, + "name": { + "$id": "1064", + "kind": "string", + "type": { + "$ref": "180" + }, + "value": "pool" + }, + "type": { + "$id": "1065", + "kind": "string", + "type": { + "$ref": "184" + }, + "value": "Microsoft.StandbyPool/standbyVirtualMachinePools/virtualMachines" + }, + "systemData": { + "$id": "1066", + "kind": "model", + "type": { + "$ref": "189" + }, + "value": { + "$id": "1067", + "createdBy": { + "$id": "1068", + "kind": "string", + "type": { + "$ref": "191" + }, + "value": "pooluser@microsoft.com" + }, + "createdByType": { + "$id": "1069", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "User" + }, + "createdAt": { + "$id": "1070", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "2023-09-07T16:33:22.210Z" + }, + "lastModifiedBy": { + "$id": "1071", + "kind": "string", + "type": { + "$ref": "203" + }, + "value": "pooluser@microsoft.com" + }, + "lastModifiedByType": { + "$id": "1072", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "1073", + "kind": "string", + "type": { + "$ref": "210" + }, + "value": "2023-09-07T16:33:22.210Z" + } + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "1074", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1075", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1076", + "name": "standbyVirtualMachinePoolName", + "nameInRequest": "standbyVirtualMachinePoolName", + "doc": "Name of the standby virtual machine pool", + "type": { + "$id": "1077", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1078", + "name": "standbyVirtualMachineName", + "nameInRequest": "standbyVirtualMachineName", + "doc": "Name of the standby virtual machine", + "type": { + "$id": "1079", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1080", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "1042" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "1081", + "type": { + "$ref": "314" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachines.get" + }, + { + "$id": "1082", + "kind": "paging", + "name": "listByStandbyVirtualMachinePoolResource", + "accessibility": "public", + "apiVersions": [ + "2023-12-01-preview", + "2024-03-01-preview", + "2024-03-01", + "2025-03-01" + ], + "doc": "List StandbyVirtualMachineResource resources by StandbyVirtualMachinePoolResource", + "operation": { + "$id": "1083", + "name": "listByStandbyVirtualMachinePoolResource", + "resourceName": "StandbyVirtualMachineResource", + "doc": "List StandbyVirtualMachineResource resources by StandbyVirtualMachinePoolResource", + "accessibility": "public", + "parameters": [ + { + "$id": "1084", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1085", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1086", + "type": { + "$id": "1087", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1088", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1089", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1090", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1091", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1092", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1093", + "name": "standbyVirtualMachinePoolName", + "nameInRequest": "standbyVirtualMachinePoolName", + "doc": "Name of the standby virtual machine pool", + "type": { + "$id": "1094", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1095", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1096", + "kind": "constant", + "valueType": { + "$id": "1097", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "1098", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "330" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}/standbyVirtualMachines", + "bufferResponse": true, + "paging": { + "$id": "1099", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "1100", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachines.listByStandbyVirtualMachinePoolResource", + "decorators": [], + "examples": [ + { + "$id": "1101", + "kind": "http", + "name": "StandbyVirtualMachines_ListByStandbyVirtualMachinePoolResource", + "description": "StandbyVirtualMachines_ListByStandbyVirtualMachinePoolResource", + "filePath": "2025-03-01/StandbyVirtualMachines_ListByStandbyVirtualMachinePoolResource.json", + "parameters": [ + { + "$id": "1102", + "parameter": { + "$ref": "1084" + }, + "value": { + "$id": "1103", + "kind": "string", + "type": { + "$ref": "1085" + }, + "value": "2025-03-01" + } + }, + { + "$id": "1104", + "parameter": { + "$ref": "1088" + }, + "value": { + "$id": "1105", + "kind": "string", + "type": { + "$ref": "1089" + }, + "value": "00000000-0000-0000-0000-000000000009" + } + }, + { + "$id": "1106", + "parameter": { + "$ref": "1091" + }, + "value": { + "$id": "1107", + "kind": "string", + "type": { + "$ref": "1092" + }, + "value": "rgstandbypool" + } + }, + { + "$id": "1108", + "parameter": { + "$ref": "1093" + }, + "value": { + "$id": "1109", + "kind": "string", + "type": { + "$ref": "1094" + }, + "value": "pool" + } + } + ], + "responses": [ + { + "$id": "1110", + "response": { + "$ref": "1098" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1111", + "kind": "model", + "type": { + "$ref": "330" + }, + "value": { + "$id": "1112", + "value": { + "$id": "1113", + "kind": "array", + "type": { + "$ref": "332" + }, + "value": [ + { + "$id": "1114", + "kind": "model", + "type": { + "$ref": "314" + }, + "value": { + "$id": "1115", + "properties": { + "$id": "1116", + "kind": "model", + "type": { + "$ref": "317" + }, + "value": { + "$id": "1117", + "virtualMachineResourceId": { + "$id": "1118", + "kind": "string", + "type": { + "$ref": "319" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Compute/virtualMachines/virtualMachine" + }, + "provisioningState": { + "$id": "1119", + "kind": "string", + "type": { + "$ref": "22" + }, + "value": "Succeeded" + } + } + }, + "id": { + "$id": "1120", + "kind": "string", + "type": { + "$ref": "175" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/pool/standbyVirtualMachines/virtualMachine" + }, + "name": { + "$id": "1121", + "kind": "string", + "type": { + "$ref": "180" + }, + "value": "pool" + }, + "type": { + "$id": "1122", + "kind": "string", + "type": { + "$ref": "184" + }, + "value": "Microsoft.StandbyPool/standbyVirtualMachinePools/virtualMachines" + }, + "systemData": { + "$id": "1123", + "kind": "model", + "type": { + "$ref": "189" + }, + "value": { + "$id": "1124", + "createdBy": { + "$id": "1125", + "kind": "string", + "type": { + "$ref": "191" + }, + "value": "pooluser@microsoft.com" + }, + "createdByType": { + "$id": "1126", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "User" + }, + "createdAt": { + "$id": "1127", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "2023-09-07T16:33:22.210Z" + }, + "lastModifiedBy": { + "$id": "1128", + "kind": "string", + "type": { + "$ref": "203" + }, + "value": "pooluser@microsoft.com" + }, + "lastModifiedByType": { + "$id": "1129", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "1130", + "kind": "string", + "type": { + "$ref": "210" + }, + "value": "2023-09-07T16:33:22.210Z" + } + } + } + } + } + ] + }, + "nextLink": { + "$id": "1131", + "kind": "string", + "type": { + "$ref": "336" + }, + "value": "https://microsoft.com/a" + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "1132", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1133", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1134", + "name": "standbyVirtualMachinePoolName", + "nameInRequest": "standbyVirtualMachinePoolName", + "doc": "Name of the standby virtual machine pool", + "type": { + "$id": "1135", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1136", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "1096" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "1137", + "type": { + "$id": "1138", + "kind": "array", + "name": "ArrayStandbyVirtualMachineResource", + "valueType": { + "$ref": "314" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "resultSegments": [ + "value" + ] + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachines.listByStandbyVirtualMachinePoolResource" + } + ], + "parameters": [ + { + "$id": "1139", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "1140", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "location": "Uri", + "isApiVersion": false, + "isContentType": false, + "isRequired": true, + "isEndpoint": true, + "skipUrlEncoding": false, + "explode": false, + "kind": "Client", + "defaultValue": { + "$id": "1141", + "type": { + "$id": "1142", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "1143", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "1144" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachines", + "apiVersions": [ + "2023-12-01-preview", + "2024-03-01-preview", + "2024-03-01", + "2025-03-01" + ], + "parent": { + "$ref": "565" + } + }, + { + "$id": "1145", + "kind": "client", + "name": "StandbyVirtualMachinePoolRuntimeViews", + "namespace": "Azure.ResourceManager.StandbyPool", + "methods": [ + { + "$id": "1146", + "kind": "basic", + "name": "get", + "accessibility": "public", + "apiVersions": [ + "2024-03-01-preview", + "2024-03-01", + "2025-03-01" + ], + "doc": "Get a StandbyVirtualMachinePoolRuntimeViewResource", + "operation": { + "$id": "1147", + "name": "get", + "resourceName": "StandbyVirtualMachinePoolRuntimeViewResource", + "doc": "Get a StandbyVirtualMachinePoolRuntimeViewResource", + "accessibility": "public", + "parameters": [ + { + "$id": "1148", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1149", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1150", + "type": { + "$id": "1151", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1152", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1153", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1154", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1155", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1156", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1157", + "name": "standbyVirtualMachinePoolName", + "nameInRequest": "standbyVirtualMachinePoolName", + "doc": "Name of the standby virtual machine pool", + "type": { + "$id": "1158", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1159", + "name": "runtimeView", + "nameInRequest": "runtimeView", + "doc": "The unique identifier for the runtime view. The input string should be the word 'latest', which will get the latest runtime view of the pool, otherwise the request will fail with NotFound exception.", + "type": { + "$id": "1160", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1161", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1162", + "kind": "constant", + "valueType": { + "$id": "1163", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "1164", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "340" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}/runtimeViews/{runtimeView}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePoolRuntimeViews.get", + "decorators": [], + "examples": [ + { + "$id": "1165", + "kind": "http", + "name": "StandbyVirtualMachinePoolRuntimeViews_Get", + "description": "StandbyVirtualMachinePoolRuntimeViews_Get", + "filePath": "2025-03-01/StandbyVirtualMachinePoolRuntimeViews_Get.json", + "parameters": [ + { + "$id": "1166", + "parameter": { + "$ref": "1148" + }, + "value": { + "$id": "1167", + "kind": "string", + "type": { + "$ref": "1149" + }, + "value": "2025-03-01" + } + }, + { + "$id": "1168", + "parameter": { + "$ref": "1152" + }, + "value": { + "$id": "1169", + "kind": "string", + "type": { + "$ref": "1153" + }, + "value": "00000000-0000-0000-0000-000000000009" + } + }, + { + "$id": "1170", + "parameter": { + "$ref": "1155" + }, + "value": { + "$id": "1171", + "kind": "string", + "type": { + "$ref": "1156" + }, + "value": "rgstandbypool" + } + }, + { + "$id": "1172", + "parameter": { + "$ref": "1157" + }, + "value": { + "$id": "1173", + "kind": "string", + "type": { + "$ref": "1158" + }, + "value": "pool" + } + }, + { + "$id": "1174", + "parameter": { + "$ref": "1159" + }, + "value": { + "$id": "1175", + "kind": "string", + "type": { + "$ref": "1160" + }, + "value": "latest" + } + } + ], + "responses": [ + { + "$id": "1176", + "response": { + "$ref": "1164" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1177", + "kind": "model", + "type": { + "$ref": "340" + }, + "value": { + "$id": "1178", + "properties": { + "$id": "1179", + "kind": "model", + "type": { + "$ref": "342" + }, + "value": { + "$id": "1180", + "instanceCountSummary": { + "$id": "1181", + "kind": "array", + "type": { + "$ref": "344" + }, + "value": [ + { + "$id": "1182", + "kind": "model", + "type": { + "$ref": "345" + }, + "value": { + "$id": "1183", + "zone": { + "$id": "1184", + "kind": "number", + "type": { + "$ref": "347" + }, + "value": 1 + }, + "instanceCountsByState": { + "$id": "1185", + "kind": "array", + "type": { + "$ref": "351" + }, + "value": [ + { + "$id": "1186", + "kind": "model", + "type": { + "$ref": "352" + }, + "value": { + "$id": "1187", + "state": { + "$id": "1188", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Creating" + }, + "count": { + "$id": "1189", + "kind": "number", + "type": { + "$ref": "357" + }, + "value": 100 + } + } + }, + { + "$id": "1190", + "kind": "model", + "type": { + "$ref": "352" + }, + "value": { + "$id": "1191", + "state": { + "$id": "1192", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Running" + }, + "count": { + "$id": "1193", + "kind": "number", + "type": { + "$ref": "357" + }, + "value": 20 + } + } + }, + { + "$id": "1194", + "kind": "model", + "type": { + "$ref": "352" + }, + "value": { + "$id": "1195", + "state": { + "$id": "1196", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Deallocating" + }, + "count": { + "$id": "1197", + "kind": "number", + "type": { + "$ref": "357" + }, + "value": 10 + } + } + }, + { + "$id": "1198", + "kind": "model", + "type": { + "$ref": "352" + }, + "value": { + "$id": "1199", + "state": { + "$id": "1200", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Deallocated" + }, + "count": { + "$id": "1201", + "kind": "number", + "type": { + "$ref": "357" + }, + "value": 100 + } + } + }, + { + "$id": "1202", + "kind": "model", + "type": { + "$ref": "352" + }, + "value": { + "$id": "1203", + "state": { + "$id": "1204", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Starting" + }, + "count": { + "$id": "1205", + "kind": "number", + "type": { + "$ref": "357" + }, + "value": 0 + } + } + }, + { + "$id": "1206", + "kind": "model", + "type": { + "$ref": "352" + }, + "value": { + "$id": "1207", + "state": { + "$id": "1208", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Deleting" + }, + "count": { + "$id": "1209", + "kind": "number", + "type": { + "$ref": "357" + }, + "value": 0 + } + } + }, + { + "$id": "1210", + "kind": "model", + "type": { + "$ref": "352" + }, + "value": { + "$id": "1211", + "state": { + "$id": "1212", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Hibernating" + }, + "count": { + "$id": "1213", + "kind": "number", + "type": { + "$ref": "357" + }, + "value": 0 + } + } + }, + { + "$id": "1214", + "kind": "model", + "type": { + "$ref": "352" + }, + "value": { + "$id": "1215", + "state": { + "$id": "1216", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Hibernated" + }, + "count": { + "$id": "1217", + "kind": "number", + "type": { + "$ref": "357" + }, + "value": 0 + } + } + } + ] + } + } + }, + { + "$id": "1218", + "kind": "model", + "type": { + "$ref": "345" + }, + "value": { + "$id": "1219", + "zone": { + "$id": "1220", + "kind": "number", + "type": { + "$ref": "347" + }, + "value": 2 + }, + "instanceCountsByState": { + "$id": "1221", + "kind": "array", + "type": { + "$ref": "351" + }, + "value": [ + { + "$id": "1222", + "kind": "model", + "type": { + "$ref": "352" + }, + "value": { + "$id": "1223", + "state": { + "$id": "1224", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Creating" + }, + "count": { + "$id": "1225", + "kind": "number", + "type": { + "$ref": "357" + }, + "value": 100 + } + } + }, + { + "$id": "1226", + "kind": "model", + "type": { + "$ref": "352" + }, + "value": { + "$id": "1227", + "state": { + "$id": "1228", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Running" + }, + "count": { + "$id": "1229", + "kind": "number", + "type": { + "$ref": "357" + }, + "value": 20 + } + } + }, + { + "$id": "1230", + "kind": "model", + "type": { + "$ref": "352" + }, + "value": { + "$id": "1231", + "state": { + "$id": "1232", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Deallocating" + }, + "count": { + "$id": "1233", + "kind": "number", + "type": { + "$ref": "357" + }, + "value": 10 + } + } + }, + { + "$id": "1234", + "kind": "model", + "type": { + "$ref": "352" + }, + "value": { + "$id": "1235", + "state": { + "$id": "1236", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Deallocated" + }, + "count": { + "$id": "1237", + "kind": "number", + "type": { + "$ref": "357" + }, + "value": 100 + } + } + }, + { + "$id": "1238", + "kind": "model", + "type": { + "$ref": "352" + }, + "value": { + "$id": "1239", + "state": { + "$id": "1240", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Starting" + }, + "count": { + "$id": "1241", + "kind": "number", + "type": { + "$ref": "357" + }, + "value": 0 + } + } + }, + { + "$id": "1242", + "kind": "model", + "type": { + "$ref": "352" + }, + "value": { + "$id": "1243", + "state": { + "$id": "1244", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Deleting" + }, + "count": { + "$id": "1245", + "kind": "number", + "type": { + "$ref": "357" + }, + "value": 0 + } + } + }, + { + "$id": "1246", + "kind": "model", + "type": { + "$ref": "352" + }, + "value": { + "$id": "1247", + "state": { + "$id": "1248", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Hibernating" + }, + "count": { + "$id": "1249", + "kind": "number", + "type": { + "$ref": "357" + }, + "value": 0 + } + } + }, + { + "$id": "1250", + "kind": "model", + "type": { + "$ref": "352" + }, + "value": { + "$id": "1251", + "state": { + "$id": "1252", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Hibernated" + }, + "count": { + "$id": "1253", + "kind": "number", + "type": { + "$ref": "357" + }, + "value": 0 + } + } + } + ] + } + } + }, + { + "$id": "1254", + "kind": "model", + "type": { + "$ref": "345" + }, + "value": { + "$id": "1255", + "zone": { + "$id": "1256", + "kind": "number", + "type": { + "$ref": "347" + }, + "value": 3 + }, + "instanceCountsByState": { + "$id": "1257", + "kind": "array", + "type": { + "$ref": "351" + }, + "value": [ + { + "$id": "1258", + "kind": "model", + "type": { + "$ref": "352" + }, + "value": { + "$id": "1259", + "state": { + "$id": "1260", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Creating" + }, + "count": { + "$id": "1261", + "kind": "number", + "type": { + "$ref": "357" + }, + "value": 100 + } + } + }, + { + "$id": "1262", + "kind": "model", + "type": { + "$ref": "352" + }, + "value": { + "$id": "1263", + "state": { + "$id": "1264", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Running" + }, + "count": { + "$id": "1265", + "kind": "number", + "type": { + "$ref": "357" + }, + "value": 20 + } + } + }, + { + "$id": "1266", + "kind": "model", + "type": { + "$ref": "352" + }, + "value": { + "$id": "1267", + "state": { + "$id": "1268", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Deallocating" + }, + "count": { + "$id": "1269", + "kind": "number", + "type": { + "$ref": "357" + }, + "value": 10 + } + } + }, + { + "$id": "1270", + "kind": "model", + "type": { + "$ref": "352" + }, + "value": { + "$id": "1271", + "state": { + "$id": "1272", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Deallocated" + }, + "count": { + "$id": "1273", + "kind": "number", + "type": { + "$ref": "357" + }, + "value": 100 + } + } + }, + { + "$id": "1274", + "kind": "model", + "type": { + "$ref": "352" + }, + "value": { + "$id": "1275", + "state": { + "$id": "1276", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Starting" + }, + "count": { + "$id": "1277", + "kind": "number", + "type": { + "$ref": "357" + }, + "value": 0 + } + } + }, + { + "$id": "1278", + "kind": "model", + "type": { + "$ref": "352" + }, + "value": { + "$id": "1279", + "state": { + "$id": "1280", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Deleting" + }, + "count": { + "$id": "1281", + "kind": "number", + "type": { + "$ref": "357" + }, + "value": 0 + } + } + }, + { + "$id": "1282", + "kind": "model", + "type": { + "$ref": "352" + }, + "value": { + "$id": "1283", + "state": { + "$id": "1284", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Hibernating" + }, + "count": { + "$id": "1285", + "kind": "number", + "type": { + "$ref": "357" + }, + "value": 0 + } + } + }, + { + "$id": "1286", + "kind": "model", + "type": { + "$ref": "352" + }, + "value": { + "$id": "1287", + "state": { + "$id": "1288", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Hibernated" + }, + "count": { + "$id": "1289", + "kind": "number", + "type": { + "$ref": "357" + }, + "value": 0 + } + } + } + ] + } + } + } + ] + }, + "provisioningState": { + "$id": "1290", + "kind": "string", + "type": { + "$ref": "22" + }, + "value": "Succeeded" + }, + "status": { + "$id": "1291", + "kind": "model", + "type": { + "$ref": "365" + }, + "value": { + "$id": "1292", + "code": { + "$id": "1293", + "kind": "string", + "type": { + "$ref": "68" + }, + "value": "HealthState/healthy" + }, + "message": { + "$id": "1294", + "kind": "string", + "type": { + "$ref": "370" + }, + "value": "The pool is healthy." + } + } + }, + "prediction": { + "$id": "1295", + "kind": "model", + "type": { + "$ref": "379" + }, + "value": { + "$id": "1296", + "forecastValues": { + "$id": "1297", + "kind": "model", + "type": { + "$ref": "381" + }, + "value": { + "$id": "1298", + "instancesRequestedCount": { + "$id": "1299", + "kind": "array", + "type": { + "$ref": "383" + }, + "value": [ + { + "$id": "1300", + "kind": "number", + "type": { + "$ref": "384" + }, + "value": 24 + }, + { + "$id": "1301", + "kind": "number", + "type": { + "$ref": "384" + }, + "value": 10 + }, + { + "$id": "1302", + "kind": "number", + "type": { + "$ref": "384" + }, + "value": 200 + }, + { + "$id": "1303", + "kind": "number", + "type": { + "$ref": "384" + }, + "value": 12 + }, + { + "$id": "1304", + "kind": "number", + "type": { + "$ref": "384" + }, + "value": 5 + }, + { + "$id": "1305", + "kind": "number", + "type": { + "$ref": "384" + }, + "value": 10 + }, + { + "$id": "1306", + "kind": "number", + "type": { + "$ref": "384" + }, + "value": 15 + }, + { + "$id": "1307", + "kind": "number", + "type": { + "$ref": "384" + }, + "value": 23 + }, + { + "$id": "1308", + "kind": "number", + "type": { + "$ref": "384" + }, + "value": 56 + }, + { + "$id": "1309", + "kind": "number", + "type": { + "$ref": "384" + }, + "value": 38 + }, + { + "$id": "1310", + "kind": "number", + "type": { + "$ref": "384" + }, + "value": 12 + }, + { + "$id": "1311", + "kind": "number", + "type": { + "$ref": "384" + }, + "value": 19 + } + ] + } + } + }, + "forecastStartTime": { + "$id": "1312", + "kind": "string", + "type": { + "$ref": "390" + }, + "value": "2025-02-14T01:34:59.228Z" + }, + "forecastInfo": { + "$id": "1313", + "kind": "string", + "type": { + "$ref": "395" + }, + "value": "{\"forecastAccuracy\": 85, \"seriesUnitIntervalInMins\": 60, \"instancesRequestedCount_recentHistory\": \"[9, 4, 2, 8, 8, 2, 3, 6, 5, 3, 2, 6]\"}" + } + } + } + } + }, + "id": { + "$id": "1314", + "kind": "string", + "type": { + "$ref": "175" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/pool/runtimeViews/latest" + }, + "name": { + "$id": "1315", + "kind": "string", + "type": { + "$ref": "180" + }, + "value": "pool" + }, + "type": { + "$id": "1316", + "kind": "string", + "type": { + "$ref": "184" + }, + "value": "Microsoft.StandbyPool/standbyVirtualMachinePools/runtimeViews" + }, + "systemData": { + "$id": "1317", + "kind": "model", + "type": { + "$ref": "189" + }, + "value": { + "$id": "1318", + "createdBy": { + "$id": "1319", + "kind": "string", + "type": { + "$ref": "191" + }, + "value": "pooluser@microsoft.com" + }, + "createdByType": { + "$id": "1320", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "User" + }, + "createdAt": { + "$id": "1321", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "2024-02-14T23:31:59.679Z" + }, + "lastModifiedBy": { + "$id": "1322", + "kind": "string", + "type": { + "$ref": "203" + }, + "value": "pooluser@microsoft.com" + }, + "lastModifiedByType": { + "$id": "1323", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "1324", + "kind": "string", + "type": { + "$ref": "210" + }, + "value": "2024-02-14T23:31:59.679Z" + } + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "1325", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1326", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1327", + "name": "standbyVirtualMachinePoolName", + "nameInRequest": "standbyVirtualMachinePoolName", + "doc": "Name of the standby virtual machine pool", + "type": { + "$id": "1328", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1329", + "name": "runtimeView", + "nameInRequest": "runtimeView", + "doc": "The unique identifier for the runtime view. The input string should be the word 'latest', which will get the latest runtime view of the pool, otherwise the request will fail with NotFound exception.", + "type": { + "$id": "1330", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1331", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "1162" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "1332", + "type": { + "$ref": "340" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePoolRuntimeViews.get" + }, + { + "$id": "1333", + "kind": "paging", + "name": "listByStandbyPool", + "accessibility": "public", + "apiVersions": [ + "2024-03-01-preview", + "2024-03-01", + "2025-03-01" + ], + "doc": "List StandbyVirtualMachinePoolRuntimeViewResource resources by StandbyVirtualMachinePoolResource", + "operation": { + "$id": "1334", + "name": "listByStandbyPool", + "resourceName": "StandbyVirtualMachinePoolRuntimeViewResource", + "doc": "List StandbyVirtualMachinePoolRuntimeViewResource resources by StandbyVirtualMachinePoolResource", + "accessibility": "public", + "parameters": [ + { + "$id": "1335", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1336", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1337", + "type": { + "$id": "1338", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1339", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1340", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1341", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1342", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1343", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1344", + "name": "standbyVirtualMachinePoolName", + "nameInRequest": "standbyVirtualMachinePoolName", + "doc": "Name of the standby virtual machine pool", + "type": { + "$id": "1345", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1346", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1347", + "kind": "constant", + "valueType": { + "$id": "1348", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "1349", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "404" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}/runtimeViews", + "bufferResponse": true, + "paging": { + "$id": "1350", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "1351", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePoolRuntimeViews.listByStandbyPool", + "decorators": [], + "examples": [ + { + "$id": "1352", + "kind": "http", + "name": "StandbyVirtualMachinePoolRuntimeViews_ListByStandbyPool", + "description": "StandbyVirtualMachinePoolRuntimeViews_ListByStandbyPool", + "filePath": "2025-03-01/StandbyVirtualMachinePoolRuntimeViews_ListByStandbyPool.json", + "parameters": [ + { + "$id": "1353", + "parameter": { + "$ref": "1335" + }, + "value": { + "$id": "1354", + "kind": "string", + "type": { + "$ref": "1336" + }, + "value": "2025-03-01" + } + }, + { + "$id": "1355", + "parameter": { + "$ref": "1339" + }, + "value": { + "$id": "1356", + "kind": "string", + "type": { + "$ref": "1340" + }, + "value": "00000000-0000-0000-0000-000000000009" + } + }, + { + "$id": "1357", + "parameter": { + "$ref": "1342" + }, + "value": { + "$id": "1358", + "kind": "string", + "type": { + "$ref": "1343" + }, + "value": "rgstandbypool" + } + }, + { + "$id": "1359", + "parameter": { + "$ref": "1344" + }, + "value": { + "$id": "1360", + "kind": "string", + "type": { + "$ref": "1345" + }, + "value": "pool" + } + } + ], + "responses": [ + { + "$id": "1361", + "response": { + "$ref": "1349" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1362", + "kind": "model", + "type": { + "$ref": "404" + }, + "value": { + "$id": "1363", + "value": { + "$id": "1364", + "kind": "array", + "type": { + "$ref": "406" + }, + "value": [ + { + "$id": "1365", + "kind": "model", + "type": { + "$ref": "340" + }, + "value": { + "$id": "1366", + "properties": { + "$id": "1367", + "kind": "model", + "type": { + "$ref": "342" + }, + "value": { + "$id": "1368", + "instanceCountSummary": { + "$id": "1369", + "kind": "array", + "type": { + "$ref": "344" + }, + "value": [ + { + "$id": "1370", + "kind": "model", + "type": { + "$ref": "345" + }, + "value": { + "$id": "1371", + "zone": { + "$id": "1372", + "kind": "number", + "type": { + "$ref": "347" + }, + "value": 1 + }, + "instanceCountsByState": { + "$id": "1373", + "kind": "array", + "type": { + "$ref": "351" + }, + "value": [ + { + "$id": "1374", + "kind": "model", + "type": { + "$ref": "352" + }, + "value": { + "$id": "1375", + "state": { + "$id": "1376", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Creating" + }, + "count": { + "$id": "1377", + "kind": "number", + "type": { + "$ref": "357" + }, + "value": 100 + } + } + }, + { + "$id": "1378", + "kind": "model", + "type": { + "$ref": "352" + }, + "value": { + "$id": "1379", + "state": { + "$id": "1380", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Running" + }, + "count": { + "$id": "1381", + "kind": "number", + "type": { + "$ref": "357" + }, + "value": 20 + } + } + }, + { + "$id": "1382", + "kind": "model", + "type": { + "$ref": "352" + }, + "value": { + "$id": "1383", + "state": { + "$id": "1384", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Deallocating" + }, + "count": { + "$id": "1385", + "kind": "number", + "type": { + "$ref": "357" + }, + "value": 10 + } + } + }, + { + "$id": "1386", + "kind": "model", + "type": { + "$ref": "352" + }, + "value": { + "$id": "1387", + "state": { + "$id": "1388", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Deallocated" + }, + "count": { + "$id": "1389", + "kind": "number", + "type": { + "$ref": "357" + }, + "value": 100 + } + } + }, + { + "$id": "1390", + "kind": "model", + "type": { + "$ref": "352" + }, + "value": { + "$id": "1391", + "state": { + "$id": "1392", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Starting" + }, + "count": { + "$id": "1393", + "kind": "number", + "type": { + "$ref": "357" + }, + "value": 0 + } + } + }, + { + "$id": "1394", + "kind": "model", + "type": { + "$ref": "352" + }, + "value": { + "$id": "1395", + "state": { + "$id": "1396", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Deleting" + }, + "count": { + "$id": "1397", + "kind": "number", + "type": { + "$ref": "357" + }, + "value": 0 + } + } + }, + { + "$id": "1398", + "kind": "model", + "type": { + "$ref": "352" + }, + "value": { + "$id": "1399", + "state": { + "$id": "1400", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Hibernating" + }, + "count": { + "$id": "1401", + "kind": "number", + "type": { + "$ref": "357" + }, + "value": 0 + } + } + }, + { + "$id": "1402", + "kind": "model", + "type": { + "$ref": "352" + }, + "value": { + "$id": "1403", + "state": { + "$id": "1404", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Hibernated" + }, + "count": { + "$id": "1405", + "kind": "number", + "type": { + "$ref": "357" + }, + "value": 0 + } + } + } + ] + } + } + }, + { + "$id": "1406", + "kind": "model", + "type": { + "$ref": "345" + }, + "value": { + "$id": "1407", + "zone": { + "$id": "1408", + "kind": "number", + "type": { + "$ref": "347" + }, + "value": 2 + }, + "instanceCountsByState": { + "$id": "1409", + "kind": "array", + "type": { + "$ref": "351" + }, + "value": [ + { + "$id": "1410", + "kind": "model", + "type": { + "$ref": "352" + }, + "value": { + "$id": "1411", + "state": { + "$id": "1412", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Creating" + }, + "count": { + "$id": "1413", + "kind": "number", + "type": { + "$ref": "357" + }, + "value": 100 + } + } + }, + { + "$id": "1414", + "kind": "model", + "type": { + "$ref": "352" + }, + "value": { + "$id": "1415", + "state": { + "$id": "1416", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Running" + }, + "count": { + "$id": "1417", + "kind": "number", + "type": { + "$ref": "357" + }, + "value": 20 + } + } + }, + { + "$id": "1418", + "kind": "model", + "type": { + "$ref": "352" + }, + "value": { + "$id": "1419", + "state": { + "$id": "1420", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Deallocating" + }, + "count": { + "$id": "1421", + "kind": "number", + "type": { + "$ref": "357" + }, + "value": 10 + } + } + }, + { + "$id": "1422", + "kind": "model", + "type": { + "$ref": "352" + }, + "value": { + "$id": "1423", + "state": { + "$id": "1424", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Deallocated" + }, + "count": { + "$id": "1425", + "kind": "number", + "type": { + "$ref": "357" + }, + "value": 100 + } + } + }, + { + "$id": "1426", + "kind": "model", + "type": { + "$ref": "352" + }, + "value": { + "$id": "1427", + "state": { + "$id": "1428", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Starting" + }, + "count": { + "$id": "1429", + "kind": "number", + "type": { + "$ref": "357" + }, + "value": 0 + } + } + }, + { + "$id": "1430", + "kind": "model", + "type": { + "$ref": "352" + }, + "value": { + "$id": "1431", + "state": { + "$id": "1432", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Deleting" + }, + "count": { + "$id": "1433", + "kind": "number", + "type": { + "$ref": "357" + }, + "value": 0 + } + } + }, + { + "$id": "1434", + "kind": "model", + "type": { + "$ref": "352" + }, + "value": { + "$id": "1435", + "state": { + "$id": "1436", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Hibernating" + }, + "count": { + "$id": "1437", + "kind": "number", + "type": { + "$ref": "357" + }, + "value": 0 + } + } + }, + { + "$id": "1438", + "kind": "model", + "type": { + "$ref": "352" + }, + "value": { + "$id": "1439", + "state": { + "$id": "1440", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Hibernated" + }, + "count": { + "$id": "1441", + "kind": "number", + "type": { + "$ref": "357" + }, + "value": 0 + } + } + } + ] + } + } + }, + { + "$id": "1442", + "kind": "model", + "type": { + "$ref": "345" + }, + "value": { + "$id": "1443", + "zone": { + "$id": "1444", + "kind": "number", + "type": { + "$ref": "347" + }, + "value": 3 + }, + "instanceCountsByState": { + "$id": "1445", + "kind": "array", + "type": { + "$ref": "351" + }, + "value": [ + { + "$id": "1446", + "kind": "model", + "type": { + "$ref": "352" + }, + "value": { + "$id": "1447", + "state": { + "$id": "1448", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Creating" + }, + "count": { + "$id": "1449", + "kind": "number", + "type": { + "$ref": "357" + }, + "value": 100 + } + } + }, + { + "$id": "1450", + "kind": "model", + "type": { + "$ref": "352" + }, + "value": { + "$id": "1451", + "state": { + "$id": "1452", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Running" + }, + "count": { + "$id": "1453", + "kind": "number", + "type": { + "$ref": "357" + }, + "value": 20 + } + } + }, + { + "$id": "1454", + "kind": "model", + "type": { + "$ref": "352" + }, + "value": { + "$id": "1455", + "state": { + "$id": "1456", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Deallocating" + }, + "count": { + "$id": "1457", + "kind": "number", + "type": { + "$ref": "357" + }, + "value": 10 + } + } + }, + { + "$id": "1458", + "kind": "model", + "type": { + "$ref": "352" + }, + "value": { + "$id": "1459", + "state": { + "$id": "1460", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Deallocated" + }, + "count": { + "$id": "1461", + "kind": "number", + "type": { + "$ref": "357" + }, + "value": 100 + } + } + }, + { + "$id": "1462", + "kind": "model", + "type": { + "$ref": "352" + }, + "value": { + "$id": "1463", + "state": { + "$id": "1464", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Starting" + }, + "count": { + "$id": "1465", + "kind": "number", + "type": { + "$ref": "357" + }, + "value": 0 + } + } + }, + { + "$id": "1466", + "kind": "model", + "type": { + "$ref": "352" + }, + "value": { + "$id": "1467", + "state": { + "$id": "1468", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Deleting" + }, + "count": { + "$id": "1469", + "kind": "number", + "type": { + "$ref": "357" + }, + "value": 0 + } + } + }, + { + "$id": "1470", + "kind": "model", + "type": { + "$ref": "352" + }, + "value": { + "$id": "1471", + "state": { + "$id": "1472", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Hibernating" + }, + "count": { + "$id": "1473", + "kind": "number", + "type": { + "$ref": "357" + }, + "value": 0 + } + } + }, + { + "$id": "1474", + "kind": "model", + "type": { + "$ref": "352" + }, + "value": { + "$id": "1475", + "state": { + "$id": "1476", + "kind": "string", + "type": { + "$ref": "50" + }, + "value": "Hibernated" + }, + "count": { + "$id": "1477", + "kind": "number", + "type": { + "$ref": "357" + }, + "value": 0 + } + } + } + ] + } + } + } + ] + }, + "provisioningState": { + "$id": "1478", + "kind": "string", + "type": { + "$ref": "22" + }, + "value": "Succeeded" + }, + "status": { + "$id": "1479", + "kind": "model", + "type": { + "$ref": "365" + }, + "value": { + "$id": "1480", + "code": { + "$id": "1481", + "kind": "string", + "type": { + "$ref": "68" + }, + "value": "HealthState/healthy" + }, + "message": { + "$id": "1482", + "kind": "string", + "type": { + "$ref": "370" + }, + "value": "The pool is healthy." + } + } + }, + "prediction": { + "$id": "1483", + "kind": "model", + "type": { + "$ref": "379" + }, + "value": { + "$id": "1484", + "forecastValues": { + "$id": "1485", + "kind": "model", + "type": { + "$ref": "381" + }, + "value": { + "$id": "1486", + "instancesRequestedCount": { + "$id": "1487", + "kind": "array", + "type": { + "$ref": "383" + }, + "value": [ + { + "$id": "1488", + "kind": "number", + "type": { + "$ref": "384" + }, + "value": 24 + }, + { + "$id": "1489", + "kind": "number", + "type": { + "$ref": "384" + }, + "value": 10 + }, + { + "$id": "1490", + "kind": "number", + "type": { + "$ref": "384" + }, + "value": 200 + }, + { + "$id": "1491", + "kind": "number", + "type": { + "$ref": "384" + }, + "value": 12 + }, + { + "$id": "1492", + "kind": "number", + "type": { + "$ref": "384" + }, + "value": 5 + }, + { + "$id": "1493", + "kind": "number", + "type": { + "$ref": "384" + }, + "value": 10 + }, + { + "$id": "1494", + "kind": "number", + "type": { + "$ref": "384" + }, + "value": 15 + }, + { + "$id": "1495", + "kind": "number", + "type": { + "$ref": "384" + }, + "value": 23 + }, + { + "$id": "1496", + "kind": "number", + "type": { + "$ref": "384" + }, + "value": 56 + }, + { + "$id": "1497", + "kind": "number", + "type": { + "$ref": "384" + }, + "value": 38 + }, + { + "$id": "1498", + "kind": "number", + "type": { + "$ref": "384" + }, + "value": 12 + }, + { + "$id": "1499", + "kind": "number", + "type": { + "$ref": "384" + }, + "value": 19 + } + ] + } + } + }, + "forecastStartTime": { + "$id": "1500", + "kind": "string", + "type": { + "$ref": "390" + }, + "value": "2025-02-14T01:34:59.228Z" + }, + "forecastInfo": { + "$id": "1501", + "kind": "string", + "type": { + "$ref": "395" + }, + "value": "{\"forecastAccuracy\": 85, \"seriesUnitIntervalInMins\": 60, \"instancesRequestedCount_recentHistory\": \"[9, 4, 2, 8, 8, 2, 3, 6, 5, 3, 2, 6]\"}" + } + } + } + } + }, + "id": { + "$id": "1502", + "kind": "string", + "type": { + "$ref": "175" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/pool/runtimeViews/latest" + }, + "name": { + "$id": "1503", + "kind": "string", + "type": { + "$ref": "180" + }, + "value": "pool" + }, + "type": { + "$id": "1504", + "kind": "string", + "type": { + "$ref": "184" + }, + "value": "Microsoft.StandbyPool/standbyVirtualMachinePools/runtimeViews" + }, + "systemData": { + "$id": "1505", + "kind": "model", + "type": { + "$ref": "189" + }, + "value": { + "$id": "1506", + "createdBy": { + "$id": "1507", + "kind": "string", + "type": { + "$ref": "191" + }, + "value": "pooluser@microsoft.com" + }, + "createdByType": { + "$id": "1508", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "User" + }, + "createdAt": { + "$id": "1509", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "2023-09-07T16:33:22.210Z" + }, + "lastModifiedBy": { + "$id": "1510", + "kind": "string", + "type": { + "$ref": "203" + }, + "value": "pooluser@microsoft.com" + }, + "lastModifiedByType": { + "$id": "1511", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "1512", + "kind": "string", + "type": { + "$ref": "210" + }, + "value": "2023-09-07T16:33:22.210Z" + } + } + } + } + } + ] + }, + "nextLink": { + "$id": "1513", + "kind": "string", + "type": { + "$ref": "410" + }, + "value": "https://microsoft.com/a" + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "1514", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1515", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1516", + "name": "standbyVirtualMachinePoolName", + "nameInRequest": "standbyVirtualMachinePoolName", + "doc": "Name of the standby virtual machine pool", + "type": { + "$id": "1517", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1518", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "1347" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "1519", + "type": { + "$id": "1520", + "kind": "array", + "name": "ArrayStandbyVirtualMachinePoolRuntimeViewResource", + "valueType": { + "$ref": "340" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "resultSegments": [ + "value" + ] + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePoolRuntimeViews.listByStandbyPool" + } + ], + "parameters": [ + { + "$id": "1521", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "1522", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "location": "Uri", + "isApiVersion": false, + "isContentType": false, + "isRequired": true, + "isEndpoint": true, + "skipUrlEncoding": false, + "explode": false, + "kind": "Client", + "defaultValue": { + "$id": "1523", + "type": { + "$id": "1524", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "1525", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "1526" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyVirtualMachinePoolRuntimeViews", + "apiVersions": [ + "2024-03-01-preview", + "2024-03-01", + "2025-03-01" + ], + "parent": { + "$ref": "565" + } + }, + { + "$id": "1527", + "kind": "client", + "name": "StandbyContainerGroupPools", + "namespace": "Azure.ResourceManager.StandbyPool", + "methods": [ + { + "$id": "1528", + "kind": "basic", + "name": "get", + "accessibility": "public", + "apiVersions": [ + "2023-12-01-preview", + "2024-03-01-preview", + "2024-03-01", + "2025-03-01" + ], + "doc": "Get a StandbyContainerGroupPoolResource", + "operation": { + "$id": "1529", + "name": "get", + "resourceName": "StandbyContainerGroupPoolResource", + "doc": "Get a StandbyContainerGroupPoolResource", + "accessibility": "public", + "parameters": [ + { + "$id": "1530", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1531", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1532", + "type": { + "$id": "1533", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1534", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1535", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1536", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1537", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1538", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1539", + "name": "standbyContainerGroupPoolName", + "nameInRequest": "standbyContainerGroupPoolName", + "doc": "Name of the standby container group pool", + "type": { + "$id": "1540", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1541", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1542", + "kind": "constant", + "valueType": { + "$id": "1543", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "1544", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "414" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPools.get", + "decorators": [], + "examples": [ + { + "$id": "1545", + "kind": "http", + "name": "StandbyContainerGroupPools_Get", + "description": "StandbyContainerGroupPools_Get", + "filePath": "2025-03-01/StandbyContainerGroupPools_Get.json", + "parameters": [ + { + "$id": "1546", + "parameter": { + "$ref": "1530" + }, + "value": { + "$id": "1547", + "kind": "string", + "type": { + "$ref": "1531" + }, + "value": "2025-03-01" + } + }, + { + "$id": "1548", + "parameter": { + "$ref": "1534" + }, + "value": { + "$id": "1549", + "kind": "string", + "type": { + "$ref": "1535" + }, + "value": "00000000-0000-0000-0000-000000000009" + } + }, + { + "$id": "1550", + "parameter": { + "$ref": "1537" + }, + "value": { + "$id": "1551", + "kind": "string", + "type": { + "$ref": "1538" + }, + "value": "rgstandbypool" + } + }, + { + "$id": "1552", + "parameter": { + "$ref": "1539" + }, + "value": { + "$id": "1553", + "kind": "string", + "type": { + "$ref": "1540" + }, + "value": "pool" + } + } + ], + "responses": [ + { + "$id": "1554", + "response": { + "$ref": "1544" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1555", + "kind": "model", + "type": { + "$ref": "414" + }, + "value": { + "$id": "1556", + "properties": { + "$id": "1557", + "kind": "model", + "type": { + "$ref": "416" + }, + "value": { + "$id": "1558", + "elasticityProfile": { + "$id": "1559", + "kind": "model", + "type": { + "$ref": "418" + }, + "value": { + "$id": "1560", + "maxReadyCapacity": { + "$id": "1561", + "kind": "number", + "type": { + "$ref": "420" + }, + "value": 688 + }, + "refillPolicy": { + "$id": "1562", + "kind": "string", + "type": { + "$ref": "74" + }, + "value": "always" + } + } + }, + "provisioningState": { + "$id": "1563", + "kind": "string", + "type": { + "$ref": "22" + }, + "value": "Succeeded" + }, + "containerGroupProperties": { + "$id": "1564", + "kind": "model", + "type": { + "$ref": "429" + }, + "value": { + "$id": "1565", + "containerGroupProfile": { + "$id": "1566", + "kind": "model", + "type": { + "$ref": "431" + }, + "value": { + "$id": "1567", + "id": { + "$id": "1568", + "kind": "string", + "type": { + "$ref": "433" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.ContainerInstance/containerGroupProfiles/cgProfile" + }, + "revision": { + "$id": "1569", + "kind": "number", + "type": { + "$ref": "438" + }, + "value": 1 + } + } + }, + "subnetIds": { + "$id": "1570", + "kind": "array", + "type": { + "$ref": "444" + }, + "value": [ + { + "$id": "1571", + "kind": "model", + "type": { + "$ref": "445" + }, + "value": { + "$id": "1572", + "id": { + "$id": "1573", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Network/virtualNetworks/cgSubnet/subnets/cgSubnet" + } + } + } + ] + } + } + }, + "zones": { + "$id": "1574", + "kind": "array", + "type": { + "$ref": "456" + }, + "value": [ + { + "$id": "1575", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "1" + }, + { + "$id": "1576", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "2" + }, + { + "$id": "1577", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "3" + } + ] + } + } + }, + "tags": { + "$id": "1578", + "kind": "dict", + "type": { + "$ref": "217" + }, + "value": { + "$id": "1579" + } + }, + "location": { + "$id": "1580", + "kind": "string", + "type": { + "$ref": "223" + }, + "value": "West US" + }, + "id": { + "$id": "1581", + "kind": "string", + "type": { + "$ref": "175" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyContainerGroupPools/pool" + }, + "name": { + "$id": "1582", + "kind": "string", + "type": { + "$ref": "180" + }, + "value": "pool" + }, + "type": { + "$id": "1583", + "kind": "string", + "type": { + "$ref": "184" + }, + "value": "Microsoft.StandbyPool/standbyContainerGroupPools" + }, + "systemData": { + "$id": "1584", + "kind": "model", + "type": { + "$ref": "189" + }, + "value": { + "$id": "1585", + "createdBy": { + "$id": "1586", + "kind": "string", + "type": { + "$ref": "191" + }, + "value": "pooluser@microsoft.com" + }, + "createdByType": { + "$id": "1587", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "User" + }, + "createdAt": { + "$id": "1588", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "2023-09-07T16:33:22.210Z" + }, + "lastModifiedBy": { + "$id": "1589", + "kind": "string", + "type": { + "$ref": "203" + }, + "value": "pooluser@microsoft.com" + }, + "lastModifiedByType": { + "$id": "1590", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "1591", + "kind": "string", + "type": { + "$ref": "210" + }, + "value": "2023-09-07T16:33:22.210Z" + } + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "1592", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1593", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1594", + "name": "standbyContainerGroupPoolName", + "nameInRequest": "standbyContainerGroupPoolName", + "doc": "Name of the standby container group pool", + "type": { + "$id": "1595", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1596", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "1542" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "1597", + "type": { + "$ref": "414" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPools.get" + }, + { + "$id": "1598", + "kind": "lro", + "name": "createOrUpdate", + "accessibility": "public", + "apiVersions": [ + "2023-12-01-preview", + "2024-03-01-preview", + "2024-03-01", + "2025-03-01" + ], + "doc": "Create a StandbyContainerGroupPoolResource", + "operation": { + "$id": "1599", + "name": "createOrUpdate", + "resourceName": "StandbyContainerGroupPoolResource", + "doc": "Create a StandbyContainerGroupPoolResource", + "accessibility": "public", + "parameters": [ + { + "$id": "1600", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1601", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1602", + "type": { + "$id": "1603", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1604", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1605", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1606", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1607", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1608", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1609", + "name": "standbyContainerGroupPoolName", + "nameInRequest": "standbyContainerGroupPoolName", + "doc": "Name of the standby container group pool", + "type": { + "$id": "1610", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1611", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "1612", + "kind": "constant", + "valueType": { + "$id": "1613", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1614", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1615", + "kind": "constant", + "valueType": { + "$id": "1616", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1617", + "name": "resource", + "nameInRequest": "resource", + "doc": "Resource create parameters.", + "type": { + "$ref": "414" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "1618", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "414" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + { + "$id": "1619", + "statusCodes": [ + 201 + ], + "bodyType": { + "$ref": "414" + }, + "headers": [ + { + "$id": "1620", + "name": "retryAfter", + "nameInResponse": "Retry-After", + "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "type": { + "$id": "1621", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "PUT", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "longRunning": { + "$id": "1622", + "finalStateVia": 0, + "finalResponse": { + "$id": "1623", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "414" + } + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPools.createOrUpdate", + "decorators": [ + { + "$id": "1624", + "name": "Azure.Core.@useFinalStateVia", + "arguments": { + "$id": "1625", + "finalState": "azure-async-operation" + } + } + ], + "examples": [ + { + "$id": "1626", + "kind": "http", + "name": "StandbyContainerGroupPools_CreateOrUpdate", + "description": "StandbyContainerGroupPools_CreateOrUpdate", + "filePath": "2025-03-01/StandbyContainerGroupPools_CreateOrUpdate.json", + "parameters": [ + { + "$id": "1627", + "parameter": { + "$ref": "1600" + }, + "value": { + "$id": "1628", + "kind": "string", + "type": { + "$ref": "1601" + }, + "value": "2025-03-01" + } + }, + { + "$id": "1629", + "parameter": { + "$ref": "1604" + }, + "value": { + "$id": "1630", + "kind": "string", + "type": { + "$ref": "1605" + }, + "value": "00000000-0000-0000-0000-000000000009" + } + }, + { + "$id": "1631", + "parameter": { + "$ref": "1607" + }, + "value": { + "$id": "1632", + "kind": "string", + "type": { + "$ref": "1608" + }, + "value": "rgstandbypool" + } + }, + { + "$id": "1633", + "parameter": { + "$ref": "1609" + }, + "value": { + "$id": "1634", + "kind": "string", + "type": { + "$ref": "1610" + }, + "value": "pool" + } + }, + { + "$id": "1635", + "parameter": { + "$ref": "1617" + }, + "value": { + "$id": "1636", + "kind": "model", + "type": { + "$ref": "414" + }, + "value": { + "$id": "1637", + "properties": { + "$id": "1638", + "kind": "model", + "type": { + "$ref": "416" + }, + "value": { + "$id": "1639", + "elasticityProfile": { + "$id": "1640", + "kind": "model", + "type": { + "$ref": "418" + }, + "value": { + "$id": "1641", + "maxReadyCapacity": { + "$id": "1642", + "kind": "number", + "type": { + "$ref": "420" + }, + "value": 688 + }, + "refillPolicy": { + "$id": "1643", + "kind": "string", + "type": { + "$ref": "74" + }, + "value": "always" + } + } + }, + "containerGroupProperties": { + "$id": "1644", + "kind": "model", + "type": { + "$ref": "429" + }, + "value": { + "$id": "1645", + "containerGroupProfile": { + "$id": "1646", + "kind": "model", + "type": { + "$ref": "431" + }, + "value": { + "$id": "1647", + "id": { + "$id": "1648", + "kind": "string", + "type": { + "$ref": "433" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.ContainerInstance/containerGroupProfiles/cgProfile" + }, + "revision": { + "$id": "1649", + "kind": "number", + "type": { + "$ref": "438" + }, + "value": 1 + } + } + }, + "subnetIds": { + "$id": "1650", + "kind": "array", + "type": { + "$ref": "444" + }, + "value": [ + { + "$id": "1651", + "kind": "model", + "type": { + "$ref": "445" + }, + "value": { + "$id": "1652", + "id": { + "$id": "1653", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Network/virtualNetworks/cgSubnet/subnets/cgSubnet" + } + } + } + ] + } + } + }, + "zones": { + "$id": "1654", + "kind": "array", + "type": { + "$ref": "456" + }, + "value": [ + { + "$id": "1655", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "1" + }, + { + "$id": "1656", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "2" + }, + { + "$id": "1657", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "3" + } + ] + } + } + }, + "tags": { + "$id": "1658", + "kind": "dict", + "type": { + "$ref": "217" + }, + "value": { + "$id": "1659" + } + }, + "location": { + "$id": "1660", + "kind": "string", + "type": { + "$ref": "223" + }, + "value": "West US" + } + } + } + } + ], + "responses": [ + { + "$id": "1661", + "response": { + "$ref": "1618" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1662", + "kind": "model", + "type": { + "$ref": "414" + }, + "value": { + "$id": "1663", + "properties": { + "$id": "1664", + "kind": "model", + "type": { + "$ref": "416" + }, + "value": { + "$id": "1665", + "elasticityProfile": { + "$id": "1666", + "kind": "model", + "type": { + "$ref": "418" + }, + "value": { + "$id": "1667", + "maxReadyCapacity": { + "$id": "1668", + "kind": "number", + "type": { + "$ref": "420" + }, + "value": 688 + }, + "refillPolicy": { + "$id": "1669", + "kind": "string", + "type": { + "$ref": "74" + }, + "value": "always" + } + } + }, + "provisioningState": { + "$id": "1670", + "kind": "string", + "type": { + "$ref": "22" + }, + "value": "Succeeded" + }, + "containerGroupProperties": { + "$id": "1671", + "kind": "model", + "type": { + "$ref": "429" + }, + "value": { + "$id": "1672", + "containerGroupProfile": { + "$id": "1673", + "kind": "model", + "type": { + "$ref": "431" + }, + "value": { + "$id": "1674", + "id": { + "$id": "1675", + "kind": "string", + "type": { + "$ref": "433" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.ContainerInstance/containerGroupProfiles/cgProfile" + }, + "revision": { + "$id": "1676", + "kind": "number", + "type": { + "$ref": "438" + }, + "value": 1 + } + } + }, + "subnetIds": { + "$id": "1677", + "kind": "array", + "type": { + "$ref": "444" + }, + "value": [ + { + "$id": "1678", + "kind": "model", + "type": { + "$ref": "445" + }, + "value": { + "$id": "1679", + "id": { + "$id": "1680", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Network/virtualNetworks/cgSubnet/subnets/cgSubnet" + } + } + } + ] + } + } + }, + "zones": { + "$id": "1681", + "kind": "array", + "type": { + "$ref": "456" + }, + "value": [ + { + "$id": "1682", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "1" + }, + { + "$id": "1683", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "2" + }, + { + "$id": "1684", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "3" + } + ] + } + } + }, + "tags": { + "$id": "1685", + "kind": "dict", + "type": { + "$ref": "217" + }, + "value": { + "$id": "1686" + } + }, + "location": { + "$id": "1687", + "kind": "string", + "type": { + "$ref": "223" + }, + "value": "West US" + }, + "id": { + "$id": "1688", + "kind": "string", + "type": { + "$ref": "175" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyContainerGroupPools/pool" + }, + "name": { + "$id": "1689", + "kind": "string", + "type": { + "$ref": "180" + }, + "value": "pool" + }, + "type": { + "$id": "1690", + "kind": "string", + "type": { + "$ref": "184" + }, + "value": "Microsoft.StandbyPool/standbyContainerGroupPools" + }, + "systemData": { + "$id": "1691", + "kind": "model", + "type": { + "$ref": "189" + }, + "value": { + "$id": "1692", + "createdBy": { + "$id": "1693", + "kind": "string", + "type": { + "$ref": "191" + }, + "value": "pooluser@microsoft.com" + }, + "createdByType": { + "$id": "1694", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "User" + }, + "createdAt": { + "$id": "1695", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "2023-09-07T16:33:22.210Z" + }, + "lastModifiedBy": { + "$id": "1696", + "kind": "string", + "type": { + "$ref": "203" + }, + "value": "pooluser@microsoft.com" + }, + "lastModifiedByType": { + "$id": "1697", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "1698", + "kind": "string", + "type": { + "$ref": "210" + }, + "value": "2023-09-07T16:33:22.210Z" + } + } + } + } + } + }, + { + "$id": "1699", + "response": { + "$ref": "1619" + }, + "statusCode": 201, + "bodyValue": { + "$id": "1700", + "kind": "model", + "type": { + "$ref": "414" + }, + "value": { + "$id": "1701", + "properties": { + "$id": "1702", + "kind": "model", + "type": { + "$ref": "416" + }, + "value": { + "$id": "1703", + "elasticityProfile": { + "$id": "1704", + "kind": "model", + "type": { + "$ref": "418" + }, + "value": { + "$id": "1705", + "maxReadyCapacity": { + "$id": "1706", + "kind": "number", + "type": { + "$ref": "420" + }, + "value": 688 + }, + "refillPolicy": { + "$id": "1707", + "kind": "string", + "type": { + "$ref": "74" + }, + "value": "always" + } + } + }, + "provisioningState": { + "$id": "1708", + "kind": "string", + "type": { + "$ref": "22" + }, + "value": "Succeeded" + }, + "containerGroupProperties": { + "$id": "1709", + "kind": "model", + "type": { + "$ref": "429" + }, + "value": { + "$id": "1710", + "containerGroupProfile": { + "$id": "1711", + "kind": "model", + "type": { + "$ref": "431" + }, + "value": { + "$id": "1712", + "id": { + "$id": "1713", + "kind": "string", + "type": { + "$ref": "433" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.ContainerInstance/containerGroupProfiles/cgProfile" + }, + "revision": { + "$id": "1714", + "kind": "number", + "type": { + "$ref": "438" + }, + "value": 1 + } + } + }, + "subnetIds": { + "$id": "1715", + "kind": "array", + "type": { + "$ref": "444" + }, + "value": [ + { + "$id": "1716", + "kind": "model", + "type": { + "$ref": "445" + }, + "value": { + "$id": "1717", + "id": { + "$id": "1718", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Network/virtualNetworks/cgSubnet/subnets/cgSubnet" + } + } + } + ] + } + } + }, + "zones": { + "$id": "1719", + "kind": "array", + "type": { + "$ref": "456" + }, + "value": [ + { + "$id": "1720", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "1" + }, + { + "$id": "1721", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "2" + }, + { + "$id": "1722", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "3" + } + ] + } + } + }, + "tags": { + "$id": "1723", + "kind": "dict", + "type": { + "$ref": "217" + }, + "value": { + "$id": "1724" + } + }, + "location": { + "$id": "1725", + "kind": "string", + "type": { + "$ref": "223" + }, + "value": "West US" + }, + "id": { + "$id": "1726", + "kind": "string", + "type": { + "$ref": "175" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyContainerGroupPools/pool" + }, + "name": { + "$id": "1727", + "kind": "string", + "type": { + "$ref": "180" + }, + "value": "pool" + }, + "type": { + "$id": "1728", + "kind": "string", + "type": { + "$ref": "184" + }, + "value": "Microsoft.StandbyPool/standbyContainerGroupPools" + }, + "systemData": { + "$id": "1729", + "kind": "model", + "type": { + "$ref": "189" + }, + "value": { + "$id": "1730", + "createdBy": { + "$id": "1731", + "kind": "string", + "type": { + "$ref": "191" + }, + "value": "pooluser@microsoft.com" + }, + "createdByType": { + "$id": "1732", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "User" + }, + "createdAt": { + "$id": "1733", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "2023-09-07T16:33:22.210Z" + }, + "lastModifiedBy": { + "$id": "1734", + "kind": "string", + "type": { + "$ref": "203" + }, + "value": "pooluser@microsoft.com" + }, + "lastModifiedByType": { + "$id": "1735", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "1736", + "kind": "string", + "type": { + "$ref": "210" + }, + "value": "2023-09-07T16:33:22.210Z" + } + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "1737", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1738", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1739", + "name": "standbyContainerGroupPoolName", + "nameInRequest": "standbyContainerGroupPoolName", + "doc": "Name of the standby container group pool", + "type": { + "$id": "1740", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1741", + "name": "resource", + "nameInRequest": "resource", + "doc": "Resource create parameters.", + "type": { + "$ref": "414" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1742", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "1743", + "kind": "constant", + "valueType": { + "$id": "1744", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1745", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "1746", + "kind": "constant", + "valueType": { + "$id": "1747", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "1748", + "type": { + "$ref": "414" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPools.createOrUpdate" + }, + { + "$id": "1749", + "kind": "lro", + "name": "delete", + "accessibility": "public", + "apiVersions": [ + "2023-12-01-preview", + "2024-03-01-preview", + "2024-03-01", + "2025-03-01" + ], + "doc": "Delete a StandbyContainerGroupPoolResource", + "operation": { + "$id": "1750", + "name": "delete", + "resourceName": "StandbyContainerGroupPoolResource", + "doc": "Delete a StandbyContainerGroupPoolResource", + "accessibility": "public", + "parameters": [ + { + "$id": "1751", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1752", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1753", + "type": { + "$id": "1754", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1755", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1756", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1757", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1758", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1759", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1760", + "name": "standbyContainerGroupPoolName", + "nameInRequest": "standbyContainerGroupPoolName", + "doc": "Name of the standby container group pool", + "type": { + "$id": "1761", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1762", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1763", + "kind": "constant", + "valueType": { + "$id": "1764", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "1765", + "statusCodes": [ + 202 + ], + "headers": [ + { + "$id": "1766", + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "1767", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "$id": "1768", + "name": "retryAfter", + "nameInResponse": "Retry-After", + "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "type": { + "$id": "1769", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false + }, + { + "$id": "1770", + "statusCodes": [ + 204 + ], + "headers": [], + "isErrorResponse": false + } + ], + "httpMethod": "DELETE", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}", + "bufferResponse": true, + "longRunning": { + "$id": "1771", + "finalStateVia": 1, + "finalResponse": { + "$id": "1772", + "statusCodes": [ + 204 + ] + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPools.delete", + "decorators": [], + "examples": [ + { + "$id": "1773", + "kind": "http", + "name": "StandbyContainerGroupPools_Delete", + "description": "StandbyContainerGroupPools_Delete", + "filePath": "2025-03-01/StandbyContainerGroupPools_Delete.json", + "parameters": [ + { + "$id": "1774", + "parameter": { + "$ref": "1751" + }, + "value": { + "$id": "1775", + "kind": "string", + "type": { + "$ref": "1752" + }, + "value": "2025-03-01" + } + }, + { + "$id": "1776", + "parameter": { + "$ref": "1755" + }, + "value": { + "$id": "1777", + "kind": "string", + "type": { + "$ref": "1756" + }, + "value": "00000000-0000-0000-0000-000000000009" + } + }, + { + "$id": "1778", + "parameter": { + "$ref": "1758" + }, + "value": { + "$id": "1779", + "kind": "string", + "type": { + "$ref": "1759" + }, + "value": "rgstandbypool" + } + }, + { + "$id": "1780", + "parameter": { + "$ref": "1760" + }, + "value": { + "$id": "1781", + "kind": "string", + "type": { + "$ref": "1761" + }, + "value": "pool" + } + } + ], + "responses": [ + { + "$id": "1782", + "response": { + "$ref": "1765" + }, + "statusCode": 202 + }, + { + "$id": "1783", + "response": { + "$ref": "1770" + }, + "statusCode": 204 + } + ] + } + ] + }, + "parameters": [ + { + "$id": "1784", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1785", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1786", + "name": "standbyContainerGroupPoolName", + "nameInRequest": "standbyContainerGroupPoolName", + "doc": "Name of the standby container group pool", + "type": { + "$id": "1787", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1788", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$id": "1789", + "kind": "constant", + "valueType": { + "$id": "1790", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "1791" + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPools.delete" + }, + { + "$id": "1792", + "kind": "basic", + "name": "update", + "accessibility": "public", + "apiVersions": [ + "2023-12-01-preview", + "2024-03-01-preview", + "2024-03-01", + "2025-03-01" + ], + "doc": "Update a StandbyContainerGroupPoolResource", + "operation": { + "$id": "1793", + "name": "update", + "resourceName": "StandbyContainerGroupPoolResource", + "doc": "Update a StandbyContainerGroupPoolResource", + "accessibility": "public", + "parameters": [ + { + "$id": "1794", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1795", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1796", + "type": { + "$id": "1797", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1798", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1799", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1800", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1801", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1802", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1803", + "name": "standbyContainerGroupPoolName", + "nameInRequest": "standbyContainerGroupPoolName", + "doc": "Name of the standby container group pool", + "type": { + "$id": "1804", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1805", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$id": "1806", + "kind": "constant", + "valueType": { + "$id": "1807", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1808", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1809", + "kind": "constant", + "valueType": { + "$id": "1810", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1811", + "name": "properties", + "nameInRequest": "properties", + "doc": "The resource properties to be updated.", + "type": { + "$ref": "467" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "1812", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "414" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "PATCH", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": false, + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPools.update", + "decorators": [], + "examples": [ + { + "$id": "1813", + "kind": "http", + "name": "StandbyContainerGroupPools_Update", + "description": "StandbyContainerGroupPools_Update", + "filePath": "2025-03-01/StandbyContainerGroupPools_Update.json", + "parameters": [ + { + "$id": "1814", + "parameter": { + "$ref": "1794" + }, + "value": { + "$id": "1815", + "kind": "string", + "type": { + "$ref": "1795" + }, + "value": "2025-03-01" + } + }, + { + "$id": "1816", + "parameter": { + "$ref": "1798" + }, + "value": { + "$id": "1817", + "kind": "string", + "type": { + "$ref": "1799" + }, + "value": "00000000-0000-0000-0000-000000000009" + } + }, + { + "$id": "1818", + "parameter": { + "$ref": "1801" + }, + "value": { + "$id": "1819", + "kind": "string", + "type": { + "$ref": "1802" + }, + "value": "rgstandbypool" + } + }, + { + "$id": "1820", + "parameter": { + "$ref": "1803" + }, + "value": { + "$id": "1821", + "kind": "string", + "type": { + "$ref": "1804" + }, + "value": "pool" + } + }, + { + "$id": "1822", + "parameter": { + "$ref": "1811" + }, + "value": { + "$id": "1823", + "kind": "model", + "type": { + "$ref": "467" + }, + "value": { + "$id": "1824", + "tags": { + "$id": "1825", + "kind": "dict", + "type": { + "$ref": "469" + }, + "value": { + "$id": "1826" + } + }, + "properties": { + "$id": "1827", + "kind": "model", + "type": { + "$ref": "475" + }, + "value": { + "$id": "1828", + "elasticityProfile": { + "$id": "1829", + "kind": "model", + "type": { + "$ref": "418" + }, + "value": { + "$id": "1830", + "maxReadyCapacity": { + "$id": "1831", + "kind": "number", + "type": { + "$ref": "420" + }, + "value": 1743 + }, + "refillPolicy": { + "$id": "1832", + "kind": "string", + "type": { + "$ref": "74" + }, + "value": "always" + } + } + }, + "containerGroupProperties": { + "$id": "1833", + "kind": "model", + "type": { + "$ref": "429" + }, + "value": { + "$id": "1834", + "containerGroupProfile": { + "$id": "1835", + "kind": "model", + "type": { + "$ref": "431" + }, + "value": { + "$id": "1836", + "id": { + "$id": "1837", + "kind": "string", + "type": { + "$ref": "433" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.ContainerInstance/containerGroupProfiles/cgProfile" + }, + "revision": { + "$id": "1838", + "kind": "number", + "type": { + "$ref": "438" + }, + "value": 2 + } + } + }, + "subnetIds": { + "$id": "1839", + "kind": "array", + "type": { + "$ref": "444" + }, + "value": [ + { + "$id": "1840", + "kind": "model", + "type": { + "$ref": "445" + }, + "value": { + "$id": "1841", + "id": { + "$id": "1842", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Network/virtualNetworks/cgSubnet/subnets/cgSubnet" + } + } + } + ] + } + } + }, + "zones": { + "$id": "1843", + "kind": "array", + "type": { + "$ref": "483" + }, + "value": [ + { + "$id": "1844", + "kind": "string", + "type": { + "$ref": "484" + }, + "value": "1" + }, + { + "$id": "1845", + "kind": "string", + "type": { + "$ref": "484" + }, + "value": "2" + }, + { + "$id": "1846", + "kind": "string", + "type": { + "$ref": "484" + }, + "value": "3" + } + ] + } + } + } + } + } + } + ], + "responses": [ + { + "$id": "1847", + "response": { + "$ref": "1812" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1848", + "kind": "model", + "type": { + "$ref": "414" + }, + "value": { + "$id": "1849", + "properties": { + "$id": "1850", + "kind": "model", + "type": { + "$ref": "416" + }, + "value": { + "$id": "1851", + "elasticityProfile": { + "$id": "1852", + "kind": "model", + "type": { + "$ref": "418" + }, + "value": { + "$id": "1853", + "maxReadyCapacity": { + "$id": "1854", + "kind": "number", + "type": { + "$ref": "420" + }, + "value": 1743 + }, + "refillPolicy": { + "$id": "1855", + "kind": "string", + "type": { + "$ref": "74" + }, + "value": "always" + } + } + }, + "provisioningState": { + "$id": "1856", + "kind": "string", + "type": { + "$ref": "22" + }, + "value": "Succeeded" + }, + "containerGroupProperties": { + "$id": "1857", + "kind": "model", + "type": { + "$ref": "429" + }, + "value": { + "$id": "1858", + "containerGroupProfile": { + "$id": "1859", + "kind": "model", + "type": { + "$ref": "431" + }, + "value": { + "$id": "1860", + "id": { + "$id": "1861", + "kind": "string", + "type": { + "$ref": "433" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.ContainerInstance/containerGroupProfiles/cgProfile" + }, + "revision": { + "$id": "1862", + "kind": "number", + "type": { + "$ref": "438" + }, + "value": 2 + } + } + }, + "subnetIds": { + "$id": "1863", + "kind": "array", + "type": { + "$ref": "444" + }, + "value": [ + { + "$id": "1864", + "kind": "model", + "type": { + "$ref": "445" + }, + "value": { + "$id": "1865", + "id": { + "$id": "1866", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Network/virtualNetworks/cgSubnet/subnets/cgSubnet" + } + } + } + ] + } + } + }, + "zones": { + "$id": "1867", + "kind": "array", + "type": { + "$ref": "456" + }, + "value": [ + { + "$id": "1868", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "1" + }, + { + "$id": "1869", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "2" + }, + { + "$id": "1870", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "3" + } + ] + } + } + }, + "tags": { + "$id": "1871", + "kind": "dict", + "type": { + "$ref": "217" + }, + "value": { + "$id": "1872" + } + }, + "location": { + "$id": "1873", + "kind": "string", + "type": { + "$ref": "223" + }, + "value": "West US" + }, + "id": { + "$id": "1874", + "kind": "string", + "type": { + "$ref": "175" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyContainerGroupPools/pool" + }, + "name": { + "$id": "1875", + "kind": "string", + "type": { + "$ref": "180" + }, + "value": "pool" + }, + "type": { + "$id": "1876", + "kind": "string", + "type": { + "$ref": "184" + }, + "value": "Microsoft.StandbyPool/standbyContainerGroupPools" + }, + "systemData": { + "$id": "1877", + "kind": "model", + "type": { + "$ref": "189" + }, + "value": { + "$id": "1878", + "createdBy": { + "$id": "1879", + "kind": "string", + "type": { + "$ref": "191" + }, + "value": "pooluser@microsoft.com" + }, + "createdByType": { + "$id": "1880", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "User" + }, + "createdAt": { + "$id": "1881", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "2023-09-07T16:33:22.210Z" + }, + "lastModifiedBy": { + "$id": "1882", + "kind": "string", + "type": { + "$ref": "203" + }, + "value": "pooluser@microsoft.com" + }, + "lastModifiedByType": { + "$id": "1883", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "1884", + "kind": "string", + "type": { + "$ref": "210" + }, + "value": "2023-09-07T16:33:22.210Z" + } + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "1885", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1886", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1887", + "name": "standbyContainerGroupPoolName", + "nameInRequest": "standbyContainerGroupPoolName", + "doc": "Name of the standby container group pool", + "type": { + "$id": "1888", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1889", + "name": "properties", + "nameInRequest": "properties", + "doc": "The resource properties to be updated.", + "type": { + "$ref": "467" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1890", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$ref": "1806" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1891", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "1809" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "1892", + "type": { + "$ref": "414" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPools.update" + }, + { + "$id": "1893", + "kind": "paging", + "name": "listByResourceGroup", + "accessibility": "public", + "apiVersions": [ + "2023-12-01-preview", + "2024-03-01-preview", + "2024-03-01", + "2025-03-01" + ], + "doc": "List StandbyContainerGroupPoolResource resources by resource group", + "operation": { + "$id": "1894", + "name": "listByResourceGroup", + "resourceName": "StandbyContainerGroupPoolResource", + "doc": "List StandbyContainerGroupPoolResource resources by resource group", + "accessibility": "public", + "parameters": [ + { + "$id": "1895", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1896", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1897", + "type": { + "$id": "1898", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1899", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1900", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1901", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1902", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1903", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1904", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1905", + "kind": "constant", + "valueType": { + "$id": "1906", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "1907", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "489" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools", + "bufferResponse": true, + "paging": { + "$id": "1908", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "1909", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPools.listByResourceGroup", + "decorators": [], + "examples": [ + { + "$id": "1910", + "kind": "http", + "name": "StandbyContainerGroupPools_ListByResourceGroup", + "description": "StandbyContainerGroupPools_ListByResourceGroup", + "filePath": "2025-03-01/StandbyContainerGroupPools_ListByResourceGroup.json", + "parameters": [ + { + "$id": "1911", + "parameter": { + "$ref": "1895" + }, + "value": { + "$id": "1912", + "kind": "string", + "type": { + "$ref": "1896" + }, + "value": "2025-03-01" + } + }, + { + "$id": "1913", + "parameter": { + "$ref": "1899" + }, + "value": { + "$id": "1914", + "kind": "string", + "type": { + "$ref": "1900" + }, + "value": "00000000-0000-0000-0000-000000000009" + } + }, + { + "$id": "1915", + "parameter": { + "$ref": "1902" + }, + "value": { + "$id": "1916", + "kind": "string", + "type": { + "$ref": "1903" + }, + "value": "rgstandbypool" + } + } + ], + "responses": [ + { + "$id": "1917", + "response": { + "$ref": "1907" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1918", + "kind": "model", + "type": { + "$ref": "489" + }, + "value": { + "$id": "1919", + "value": { + "$id": "1920", + "kind": "array", + "type": { + "$ref": "491" + }, + "value": [ + { + "$id": "1921", + "kind": "model", + "type": { + "$ref": "414" + }, + "value": { + "$id": "1922", + "properties": { + "$id": "1923", + "kind": "model", + "type": { + "$ref": "416" + }, + "value": { + "$id": "1924", + "elasticityProfile": { + "$id": "1925", + "kind": "model", + "type": { + "$ref": "418" + }, + "value": { + "$id": "1926", + "maxReadyCapacity": { + "$id": "1927", + "kind": "number", + "type": { + "$ref": "420" + }, + "value": 688 + }, + "refillPolicy": { + "$id": "1928", + "kind": "string", + "type": { + "$ref": "74" + }, + "value": "always" + } + } + }, + "provisioningState": { + "$id": "1929", + "kind": "string", + "type": { + "$ref": "22" + }, + "value": "Succeeded" + }, + "containerGroupProperties": { + "$id": "1930", + "kind": "model", + "type": { + "$ref": "429" + }, + "value": { + "$id": "1931", + "containerGroupProfile": { + "$id": "1932", + "kind": "model", + "type": { + "$ref": "431" + }, + "value": { + "$id": "1933", + "id": { + "$id": "1934", + "kind": "string", + "type": { + "$ref": "433" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.ContainerInstance/containerGroupProfiles/cgProfile" + }, + "revision": { + "$id": "1935", + "kind": "number", + "type": { + "$ref": "438" + }, + "value": 1 + } + } + }, + "subnetIds": { + "$id": "1936", + "kind": "array", + "type": { + "$ref": "444" + }, + "value": [ + { + "$id": "1937", + "kind": "model", + "type": { + "$ref": "445" + }, + "value": { + "$id": "1938", + "id": { + "$id": "1939", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Network/virtualNetworks/cgSubnet/subnets/cgSubnet" + } + } + } + ] + } + } + }, + "zones": { + "$id": "1940", + "kind": "array", + "type": { + "$ref": "456" + }, + "value": [ + { + "$id": "1941", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "1" + }, + { + "$id": "1942", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "2" + }, + { + "$id": "1943", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "3" + } + ] + } + } + }, + "tags": { + "$id": "1944", + "kind": "dict", + "type": { + "$ref": "217" + }, + "value": { + "$id": "1945" + } + }, + "location": { + "$id": "1946", + "kind": "string", + "type": { + "$ref": "223" + }, + "value": "West US" + }, + "id": { + "$id": "1947", + "kind": "string", + "type": { + "$ref": "175" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyContainerGroupPools/pool" + }, + "name": { + "$id": "1948", + "kind": "string", + "type": { + "$ref": "180" + }, + "value": "pool" + }, + "type": { + "$id": "1949", + "kind": "string", + "type": { + "$ref": "184" + }, + "value": "Microsoft.StandbyPool/standbyContainerGroupPools" + }, + "systemData": { + "$id": "1950", + "kind": "model", + "type": { + "$ref": "189" + }, + "value": { + "$id": "1951", + "createdBy": { + "$id": "1952", + "kind": "string", + "type": { + "$ref": "191" + }, + "value": "pooluser@microsoft.com" + }, + "createdByType": { + "$id": "1953", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "User" + }, + "createdAt": { + "$id": "1954", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "2023-09-07T16:33:22.210Z" + }, + "lastModifiedBy": { + "$id": "1955", + "kind": "string", + "type": { + "$ref": "203" + }, + "value": "pooluser@microsoft.com" + }, + "lastModifiedByType": { + "$id": "1956", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "1957", + "kind": "string", + "type": { + "$ref": "210" + }, + "value": "2023-09-07T16:33:22.210Z" + } + } + } + } + } + ] + }, + "nextLink": { + "$id": "1958", + "kind": "string", + "type": { + "$ref": "495" + }, + "value": "https://microsoft.com/a" + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "1959", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1960", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1961", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "1905" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "1962", + "type": { + "$id": "1963", + "kind": "array", + "name": "ArrayStandbyContainerGroupPoolResource", + "valueType": { + "$ref": "414" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "resultSegments": [ + "value" + ] + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPools.listByResourceGroup" + }, + { + "$id": "1964", + "kind": "paging", + "name": "listBySubscription", + "accessibility": "public", + "apiVersions": [ + "2023-12-01-preview", + "2024-03-01-preview", + "2024-03-01", + "2025-03-01" + ], + "doc": "List StandbyContainerGroupPoolResource resources by subscription ID", + "operation": { + "$id": "1965", + "name": "listBySubscription", + "resourceName": "StandbyContainerGroupPoolResource", + "doc": "List StandbyContainerGroupPoolResource resources by subscription ID", + "accessibility": "public", + "parameters": [ + { + "$id": "1966", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1967", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "1968", + "type": { + "$id": "1969", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1970", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1971", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "1972", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "1973", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "1974", + "kind": "constant", + "valueType": { + "$id": "1975", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "1976", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "489" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/providers/Microsoft.StandbyPool/standbyContainerGroupPools", + "bufferResponse": true, + "paging": { + "$id": "1977", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "1978", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPools.listBySubscription", + "decorators": [], + "examples": [ + { + "$id": "1979", + "kind": "http", + "name": "StandbyContainerGroupPools_ListBySubscription", + "description": "StandbyContainerGroupPools_ListBySubscription", + "filePath": "2025-03-01/StandbyContainerGroupPools_ListBySubscription.json", + "parameters": [ + { + "$id": "1980", + "parameter": { + "$ref": "1966" + }, + "value": { + "$id": "1981", + "kind": "string", + "type": { + "$ref": "1967" + }, + "value": "2025-03-01" + } + }, + { + "$id": "1982", + "parameter": { + "$ref": "1970" + }, + "value": { + "$id": "1983", + "kind": "string", + "type": { + "$ref": "1971" + }, + "value": "00000000-0000-0000-0000-000000000009" + } + } + ], + "responses": [ + { + "$id": "1984", + "response": { + "$ref": "1976" + }, + "statusCode": 200, + "bodyValue": { + "$id": "1985", + "kind": "model", + "type": { + "$ref": "489" + }, + "value": { + "$id": "1986", + "value": { + "$id": "1987", + "kind": "array", + "type": { + "$ref": "491" + }, + "value": [ + { + "$id": "1988", + "kind": "model", + "type": { + "$ref": "414" + }, + "value": { + "$id": "1989", + "properties": { + "$id": "1990", + "kind": "model", + "type": { + "$ref": "416" + }, + "value": { + "$id": "1991", + "elasticityProfile": { + "$id": "1992", + "kind": "model", + "type": { + "$ref": "418" + }, + "value": { + "$id": "1993", + "maxReadyCapacity": { + "$id": "1994", + "kind": "number", + "type": { + "$ref": "420" + }, + "value": 688 + }, + "refillPolicy": { + "$id": "1995", + "kind": "string", + "type": { + "$ref": "74" + }, + "value": "always" + } + } + }, + "provisioningState": { + "$id": "1996", + "kind": "string", + "type": { + "$ref": "22" + }, + "value": "Succeeded" + }, + "containerGroupProperties": { + "$id": "1997", + "kind": "model", + "type": { + "$ref": "429" + }, + "value": { + "$id": "1998", + "containerGroupProfile": { + "$id": "1999", + "kind": "model", + "type": { + "$ref": "431" + }, + "value": { + "$id": "2000", + "id": { + "$id": "2001", + "kind": "string", + "type": { + "$ref": "433" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.ContainerInstance/containerGroupProfiles/cgProfile" + }, + "revision": { + "$id": "2002", + "kind": "number", + "type": { + "$ref": "438" + }, + "value": 1 + } + } + }, + "subnetIds": { + "$id": "2003", + "kind": "array", + "type": { + "$ref": "444" + }, + "value": [ + { + "$id": "2004", + "kind": "model", + "type": { + "$ref": "445" + }, + "value": { + "$id": "2005", + "id": { + "$id": "2006", + "kind": "string", + "type": { + "$ref": "447" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Network/virtualNetworks/cgSubnet/subnets/cgSubnet" + } + } + } + ] + } + } + }, + "zones": { + "$id": "2007", + "kind": "array", + "type": { + "$ref": "456" + }, + "value": [ + { + "$id": "2008", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "1" + }, + { + "$id": "2009", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "2" + }, + { + "$id": "2010", + "kind": "string", + "type": { + "$ref": "457" + }, + "value": "3" + } + ] + } + } + }, + "tags": { + "$id": "2011", + "kind": "dict", + "type": { + "$ref": "217" + }, + "value": { + "$id": "2012" + } + }, + "location": { + "$id": "2013", + "kind": "string", + "type": { + "$ref": "223" + }, + "value": "West US" + }, + "id": { + "$id": "2014", + "kind": "string", + "type": { + "$ref": "175" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyContainerGroupPools/pool" + }, + "name": { + "$id": "2015", + "kind": "string", + "type": { + "$ref": "180" + }, + "value": "pool" + }, + "type": { + "$id": "2016", + "kind": "string", + "type": { + "$ref": "184" + }, + "value": "Microsoft.StandbyPool/standbyContainerGroupPools" + }, + "systemData": { + "$id": "2017", + "kind": "model", + "type": { + "$ref": "189" + }, + "value": { + "$id": "2018", + "createdBy": { + "$id": "2019", + "kind": "string", + "type": { + "$ref": "191" + }, + "value": "pooluser@microsoft.com" + }, + "createdByType": { + "$id": "2020", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "User" + }, + "createdAt": { + "$id": "2021", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "2023-09-07T16:33:22.210Z" + }, + "lastModifiedBy": { + "$id": "2022", + "kind": "string", + "type": { + "$ref": "203" + }, + "value": "pooluser@microsoft.com" + }, + "lastModifiedByType": { + "$id": "2023", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "2024", + "kind": "string", + "type": { + "$ref": "210" + }, + "value": "2023-09-07T16:33:22.210Z" + } + } + } + } + } + ] + }, + "nextLink": { + "$id": "2025", + "kind": "string", + "type": { + "$ref": "495" + }, + "value": "https://microsoft.com/a" + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "2026", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "1974" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "2027", + "type": { + "$id": "2028", + "kind": "array", + "name": "ArrayStandbyContainerGroupPoolResource", + "valueType": { + "$ref": "414" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "resultSegments": [ + "value" + ] + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPools.listBySubscription" + } + ], + "parameters": [ + { + "$id": "2029", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "2030", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "location": "Uri", + "isApiVersion": false, + "isContentType": false, + "isRequired": true, + "isEndpoint": true, + "skipUrlEncoding": false, + "explode": false, + "kind": "Client", + "defaultValue": { + "$id": "2031", + "type": { + "$id": "2032", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "2033", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "2034" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPools", + "apiVersions": [ + "2023-12-01-preview", + "2024-03-01-preview", + "2024-03-01", + "2025-03-01" + ], + "parent": { + "$ref": "565" + } + }, + { + "$id": "2035", + "kind": "client", + "name": "StandbyContainerGroupPoolRuntimeViews", + "namespace": "Azure.ResourceManager.StandbyPool", + "methods": [ + { + "$id": "2036", + "kind": "basic", + "name": "get", + "accessibility": "public", + "apiVersions": [ + "2024-03-01-preview", + "2024-03-01", + "2025-03-01" + ], + "doc": "Get a StandbyContainerGroupPoolRuntimeViewResource", + "operation": { + "$id": "2037", + "name": "get", + "resourceName": "StandbyContainerGroupPoolRuntimeViewResource", + "doc": "Get a StandbyContainerGroupPoolRuntimeViewResource", + "accessibility": "public", + "parameters": [ + { + "$id": "2038", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "2039", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "2040", + "type": { + "$id": "2041", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2042", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "2043", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "2044", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2045", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2046", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2047", + "name": "standbyContainerGroupPoolName", + "nameInRequest": "standbyContainerGroupPoolName", + "doc": "Name of the standby container group pool", + "type": { + "$id": "2048", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2049", + "name": "runtimeView", + "nameInRequest": "runtimeView", + "doc": "The unique identifier for the runtime view. The input string should be the word 'latest', which will get the latest runtime view of the pool, otherwise the request will fail with NotFound exception.", + "type": { + "$id": "2050", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2051", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "2052", + "kind": "constant", + "valueType": { + "$id": "2053", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "2054", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "499" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}/runtimeViews/{runtimeView}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPoolRuntimeViews.get", + "decorators": [], + "examples": [ + { + "$id": "2055", + "kind": "http", + "name": "StandbyContainerGroupPoolRuntimeViews_Get", + "description": "StandbyContainerGroupPoolRuntimeViews_Get", + "filePath": "2025-03-01/StandbyContainerGroupPoolRuntimeViews_Get.json", + "parameters": [ + { + "$id": "2056", + "parameter": { + "$ref": "2038" + }, + "value": { + "$id": "2057", + "kind": "string", + "type": { + "$ref": "2039" + }, + "value": "2025-03-01" + } + }, + { + "$id": "2058", + "parameter": { + "$ref": "2042" + }, + "value": { + "$id": "2059", + "kind": "string", + "type": { + "$ref": "2043" + }, + "value": "00000000-0000-0000-0000-000000000009" + } + }, + { + "$id": "2060", + "parameter": { + "$ref": "2045" + }, + "value": { + "$id": "2061", + "kind": "string", + "type": { + "$ref": "2046" + }, + "value": "rgstandbypool" + } + }, + { + "$id": "2062", + "parameter": { + "$ref": "2047" + }, + "value": { + "$id": "2063", + "kind": "string", + "type": { + "$ref": "2048" + }, + "value": "pool" + } + }, + { + "$id": "2064", + "parameter": { + "$ref": "2049" + }, + "value": { + "$id": "2065", + "kind": "string", + "type": { + "$ref": "2050" + }, + "value": "latest" + } + } + ], + "responses": [ + { + "$id": "2066", + "response": { + "$ref": "2054" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2067", + "kind": "model", + "type": { + "$ref": "499" + }, + "value": { + "$id": "2068", + "properties": { + "$id": "2069", + "kind": "model", + "type": { + "$ref": "501" + }, + "value": { + "$id": "2070", + "instanceCountSummary": { + "$id": "2071", + "kind": "array", + "type": { + "$ref": "503" + }, + "value": [ + { + "$id": "2072", + "kind": "model", + "type": { + "$ref": "504" + }, + "value": { + "$id": "2073", + "zone": { + "$id": "2074", + "kind": "number", + "type": { + "$ref": "506" + }, + "value": 1 + }, + "instanceCountsByState": { + "$id": "2075", + "kind": "array", + "type": { + "$ref": "510" + }, + "value": [ + { + "$id": "2076", + "kind": "model", + "type": { + "$ref": "511" + }, + "value": { + "$id": "2077", + "state": { + "$id": "2078", + "kind": "string", + "type": { + "$ref": "78" + }, + "value": "Creating" + }, + "count": { + "$id": "2079", + "kind": "number", + "type": { + "$ref": "516" + }, + "value": 100 + } + } + }, + { + "$id": "2080", + "kind": "model", + "type": { + "$ref": "511" + }, + "value": { + "$id": "2081", + "state": { + "$id": "2082", + "kind": "string", + "type": { + "$ref": "78" + }, + "value": "Running" + }, + "count": { + "$id": "2083", + "kind": "number", + "type": { + "$ref": "516" + }, + "value": 20 + } + } + }, + { + "$id": "2084", + "kind": "model", + "type": { + "$ref": "511" + }, + "value": { + "$id": "2085", + "state": { + "$id": "2086", + "kind": "string", + "type": { + "$ref": "78" + }, + "value": "Deleting" + }, + "count": { + "$id": "2087", + "kind": "number", + "type": { + "$ref": "516" + }, + "value": 21 + } + } + } + ] + } + } + }, + { + "$id": "2088", + "kind": "model", + "type": { + "$ref": "504" + }, + "value": { + "$id": "2089", + "zone": { + "$id": "2090", + "kind": "number", + "type": { + "$ref": "506" + }, + "value": 2 + }, + "instanceCountsByState": { + "$id": "2091", + "kind": "array", + "type": { + "$ref": "510" + }, + "value": [ + { + "$id": "2092", + "kind": "model", + "type": { + "$ref": "511" + }, + "value": { + "$id": "2093", + "state": { + "$id": "2094", + "kind": "string", + "type": { + "$ref": "78" + }, + "value": "Creating" + }, + "count": { + "$id": "2095", + "kind": "number", + "type": { + "$ref": "516" + }, + "value": 100 + } + } + }, + { + "$id": "2096", + "kind": "model", + "type": { + "$ref": "511" + }, + "value": { + "$id": "2097", + "state": { + "$id": "2098", + "kind": "string", + "type": { + "$ref": "78" + }, + "value": "Running" + }, + "count": { + "$id": "2099", + "kind": "number", + "type": { + "$ref": "516" + }, + "value": 500 + } + } + }, + { + "$id": "2100", + "kind": "model", + "type": { + "$ref": "511" + }, + "value": { + "$id": "2101", + "state": { + "$id": "2102", + "kind": "string", + "type": { + "$ref": "78" + }, + "value": "Deleting" + }, + "count": { + "$id": "2103", + "kind": "number", + "type": { + "$ref": "516" + }, + "value": 20 + } + } + } + ] + } + } + }, + { + "$id": "2104", + "kind": "model", + "type": { + "$ref": "504" + }, + "value": { + "$id": "2105", + "zone": { + "$id": "2106", + "kind": "number", + "type": { + "$ref": "506" + }, + "value": 3 + }, + "instanceCountsByState": { + "$id": "2107", + "kind": "array", + "type": { + "$ref": "510" + }, + "value": [ + { + "$id": "2108", + "kind": "model", + "type": { + "$ref": "511" + }, + "value": { + "$id": "2109", + "state": { + "$id": "2110", + "kind": "string", + "type": { + "$ref": "78" + }, + "value": "Creating" + }, + "count": { + "$id": "2111", + "kind": "number", + "type": { + "$ref": "516" + }, + "value": 100 + } + } + }, + { + "$id": "2112", + "kind": "model", + "type": { + "$ref": "511" + }, + "value": { + "$id": "2113", + "state": { + "$id": "2114", + "kind": "string", + "type": { + "$ref": "78" + }, + "value": "Running" + }, + "count": { + "$id": "2115", + "kind": "number", + "type": { + "$ref": "516" + }, + "value": 20 + } + } + }, + { + "$id": "2116", + "kind": "model", + "type": { + "$ref": "511" + }, + "value": { + "$id": "2117", + "state": { + "$id": "2118", + "kind": "string", + "type": { + "$ref": "78" + }, + "value": "Deleting" + }, + "count": { + "$id": "2119", + "kind": "number", + "type": { + "$ref": "516" + }, + "value": 7 + } + } + } + ] + } + } + } + ] + }, + "provisioningState": { + "$id": "2120", + "kind": "string", + "type": { + "$ref": "22" + }, + "value": "Succeeded" + }, + "status": { + "$id": "2121", + "kind": "model", + "type": { + "$ref": "365" + }, + "value": { + "$id": "2122", + "code": { + "$id": "2123", + "kind": "string", + "type": { + "$ref": "68" + }, + "value": "HealthState/healthy" + }, + "message": { + "$id": "2124", + "kind": "string", + "type": { + "$ref": "370" + }, + "value": "The pool is healthy." + } + } + }, + "prediction": { + "$id": "2125", + "kind": "model", + "type": { + "$ref": "530" + }, + "value": { + "$id": "2126", + "forecastValues": { + "$id": "2127", + "kind": "model", + "type": { + "$ref": "532" + }, + "value": { + "$id": "2128", + "instancesRequestedCount": { + "$id": "2129", + "kind": "array", + "type": { + "$ref": "534" + }, + "value": [ + { + "$id": "2130", + "kind": "number", + "type": { + "$ref": "535" + }, + "value": 24 + }, + { + "$id": "2131", + "kind": "number", + "type": { + "$ref": "535" + }, + "value": 10 + }, + { + "$id": "2132", + "kind": "number", + "type": { + "$ref": "535" + }, + "value": 200 + }, + { + "$id": "2133", + "kind": "number", + "type": { + "$ref": "535" + }, + "value": 12 + }, + { + "$id": "2134", + "kind": "number", + "type": { + "$ref": "535" + }, + "value": 5 + }, + { + "$id": "2135", + "kind": "number", + "type": { + "$ref": "535" + }, + "value": 10 + }, + { + "$id": "2136", + "kind": "number", + "type": { + "$ref": "535" + }, + "value": 15 + }, + { + "$id": "2137", + "kind": "number", + "type": { + "$ref": "535" + }, + "value": 23 + }, + { + "$id": "2138", + "kind": "number", + "type": { + "$ref": "535" + }, + "value": 56 + }, + { + "$id": "2139", + "kind": "number", + "type": { + "$ref": "535" + }, + "value": 38 + }, + { + "$id": "2140", + "kind": "number", + "type": { + "$ref": "535" + }, + "value": 12 + }, + { + "$id": "2141", + "kind": "number", + "type": { + "$ref": "535" + }, + "value": 19 + } + ] + } + } + }, + "forecastStartTime": { + "$id": "2142", + "kind": "string", + "type": { + "$ref": "541" + }, + "value": "2025-02-14T01:34:59.228Z" + }, + "forecastInfo": { + "$id": "2143", + "kind": "string", + "type": { + "$ref": "546" + }, + "value": "{\"forecastAccuracy\": 85, \"seriesUnitIntervalInMins\": 60, \"instancesRequestedCount_recentHistory\": \"[9, 4, 2, 8, 8, 2, 3, 6, 5, 3, 2, 6]\"}" + } + } + } + } + }, + "id": { + "$id": "2144", + "kind": "string", + "type": { + "$ref": "175" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyContainerGroupPools/pool/runtimeViews/latest" + }, + "name": { + "$id": "2145", + "kind": "string", + "type": { + "$ref": "180" + }, + "value": "pool" + }, + "type": { + "$id": "2146", + "kind": "string", + "type": { + "$ref": "184" + }, + "value": "Microsoft.StandbyPool/standbyContainerGroupPools/runtimeViews" + }, + "systemData": { + "$id": "2147", + "kind": "model", + "type": { + "$ref": "189" + }, + "value": { + "$id": "2148", + "createdBy": { + "$id": "2149", + "kind": "string", + "type": { + "$ref": "191" + }, + "value": "pooluser@microsoft.com" + }, + "createdByType": { + "$id": "2150", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "User" + }, + "createdAt": { + "$id": "2151", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "2023-09-07T16:33:22.210Z" + }, + "lastModifiedBy": { + "$id": "2152", + "kind": "string", + "type": { + "$ref": "203" + }, + "value": "pooluser@microsoft.com" + }, + "lastModifiedByType": { + "$id": "2153", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "2154", + "kind": "string", + "type": { + "$ref": "210" + }, + "value": "2023-09-07T16:33:22.210Z" + } + } + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "2155", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2156", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2157", + "name": "standbyContainerGroupPoolName", + "nameInRequest": "standbyContainerGroupPoolName", + "doc": "Name of the standby container group pool", + "type": { + "$id": "2158", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2159", + "name": "runtimeView", + "nameInRequest": "runtimeView", + "doc": "The unique identifier for the runtime view. The input string should be the word 'latest', which will get the latest runtime view of the pool, otherwise the request will fail with NotFound exception.", + "type": { + "$id": "2160", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2161", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "2052" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "2162", + "type": { + "$ref": "499" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPoolRuntimeViews.get" + }, + { + "$id": "2163", + "kind": "paging", + "name": "listByStandbyPool", + "accessibility": "public", + "apiVersions": [ + "2024-03-01-preview", + "2024-03-01", + "2025-03-01" + ], + "doc": "List StandbyContainerGroupPoolRuntimeViewResource resources by StandbyContainerGroupPoolResource", + "operation": { + "$id": "2164", + "name": "listByStandbyPool", + "resourceName": "StandbyContainerGroupPoolRuntimeViewResource", + "doc": "List StandbyContainerGroupPoolRuntimeViewResource resources by StandbyContainerGroupPoolResource", + "accessibility": "public", + "parameters": [ + { + "$id": "2165", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "2166", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "2167", + "type": { + "$id": "2168", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2025-03-01" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2169", + "name": "subscriptionId", + "nameInRequest": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "2170", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "2171", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2172", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2173", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2174", + "name": "standbyContainerGroupPoolName", + "nameInRequest": "standbyContainerGroupPoolName", + "doc": "Name of the standby container group pool", + "type": { + "$id": "2175", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2176", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$id": "2177", + "kind": "constant", + "valueType": { + "$id": "2178", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "2179", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "555" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}/runtimeViews", + "bufferResponse": true, + "paging": { + "$id": "2180", + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "$id": "2181", + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + } + }, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPoolRuntimeViews.listByStandbyPool", + "decorators": [], + "examples": [ + { + "$id": "2182", + "kind": "http", + "name": "StandbyContainerGroupPoolRuntimeViews_ListByStandbyPool", + "description": "StandbyContainerGroupPoolRuntimeViews_ListByStandbyPool", + "filePath": "2025-03-01/StandbyContainerGroupPoolRuntimeViews_ListByStandbyPool.json", + "parameters": [ + { + "$id": "2183", + "parameter": { + "$ref": "2165" + }, + "value": { + "$id": "2184", + "kind": "string", + "type": { + "$ref": "2166" + }, + "value": "2025-03-01" + } + }, + { + "$id": "2185", + "parameter": { + "$ref": "2169" + }, + "value": { + "$id": "2186", + "kind": "string", + "type": { + "$ref": "2170" + }, + "value": "00000000-0000-0000-0000-000000000009" + } + }, + { + "$id": "2187", + "parameter": { + "$ref": "2172" + }, + "value": { + "$id": "2188", + "kind": "string", + "type": { + "$ref": "2173" + }, + "value": "rgstandbypool" + } + }, + { + "$id": "2189", + "parameter": { + "$ref": "2174" + }, + "value": { + "$id": "2190", + "kind": "string", + "type": { + "$ref": "2175" + }, + "value": "pool" + } + } + ], + "responses": [ + { + "$id": "2191", + "response": { + "$ref": "2179" + }, + "statusCode": 200, + "bodyValue": { + "$id": "2192", + "kind": "model", + "type": { + "$ref": "555" + }, + "value": { + "$id": "2193", + "value": { + "$id": "2194", + "kind": "array", + "type": { + "$ref": "557" + }, + "value": [ + { + "$id": "2195", + "kind": "model", + "type": { + "$ref": "499" + }, + "value": { + "$id": "2196", + "properties": { + "$id": "2197", + "kind": "model", + "type": { + "$ref": "501" + }, + "value": { + "$id": "2198", + "instanceCountSummary": { + "$id": "2199", + "kind": "array", + "type": { + "$ref": "503" + }, + "value": [ + { + "$id": "2200", + "kind": "model", + "type": { + "$ref": "504" + }, + "value": { + "$id": "2201", + "zone": { + "$id": "2202", + "kind": "number", + "type": { + "$ref": "506" + }, + "value": 1 + }, + "instanceCountsByState": { + "$id": "2203", + "kind": "array", + "type": { + "$ref": "510" + }, + "value": [ + { + "$id": "2204", + "kind": "model", + "type": { + "$ref": "511" + }, + "value": { + "$id": "2205", + "state": { + "$id": "2206", + "kind": "string", + "type": { + "$ref": "78" + }, + "value": "Creating" + }, + "count": { + "$id": "2207", + "kind": "number", + "type": { + "$ref": "516" + }, + "value": 100 + } + } + }, + { + "$id": "2208", + "kind": "model", + "type": { + "$ref": "511" + }, + "value": { + "$id": "2209", + "state": { + "$id": "2210", + "kind": "string", + "type": { + "$ref": "78" + }, + "value": "Running" + }, + "count": { + "$id": "2211", + "kind": "number", + "type": { + "$ref": "516" + }, + "value": 20 + } + } + }, + { + "$id": "2212", + "kind": "model", + "type": { + "$ref": "511" + }, + "value": { + "$id": "2213", + "state": { + "$id": "2214", + "kind": "string", + "type": { + "$ref": "78" + }, + "value": "Deleting" + }, + "count": { + "$id": "2215", + "kind": "number", + "type": { + "$ref": "516" + }, + "value": 21 + } + } + } + ] + } + } + }, + { + "$id": "2216", + "kind": "model", + "type": { + "$ref": "504" + }, + "value": { + "$id": "2217", + "zone": { + "$id": "2218", + "kind": "number", + "type": { + "$ref": "506" + }, + "value": 2 + }, + "instanceCountsByState": { + "$id": "2219", + "kind": "array", + "type": { + "$ref": "510" + }, + "value": [ + { + "$id": "2220", + "kind": "model", + "type": { + "$ref": "511" + }, + "value": { + "$id": "2221", + "state": { + "$id": "2222", + "kind": "string", + "type": { + "$ref": "78" + }, + "value": "Creating" + }, + "count": { + "$id": "2223", + "kind": "number", + "type": { + "$ref": "516" + }, + "value": 100 + } + } + }, + { + "$id": "2224", + "kind": "model", + "type": { + "$ref": "511" + }, + "value": { + "$id": "2225", + "state": { + "$id": "2226", + "kind": "string", + "type": { + "$ref": "78" + }, + "value": "Running" + }, + "count": { + "$id": "2227", + "kind": "number", + "type": { + "$ref": "516" + }, + "value": 500 + } + } + }, + { + "$id": "2228", + "kind": "model", + "type": { + "$ref": "511" + }, + "value": { + "$id": "2229", + "state": { + "$id": "2230", + "kind": "string", + "type": { + "$ref": "78" + }, + "value": "Deleting" + }, + "count": { + "$id": "2231", + "kind": "number", + "type": { + "$ref": "516" + }, + "value": 20 + } + } + } + ] + } + } + }, + { + "$id": "2232", + "kind": "model", + "type": { + "$ref": "504" + }, + "value": { + "$id": "2233", + "zone": { + "$id": "2234", + "kind": "number", + "type": { + "$ref": "506" + }, + "value": 3 + }, + "instanceCountsByState": { + "$id": "2235", + "kind": "array", + "type": { + "$ref": "510" + }, + "value": [ + { + "$id": "2236", + "kind": "model", + "type": { + "$ref": "511" + }, + "value": { + "$id": "2237", + "state": { + "$id": "2238", + "kind": "string", + "type": { + "$ref": "78" + }, + "value": "Creating" + }, + "count": { + "$id": "2239", + "kind": "number", + "type": { + "$ref": "516" + }, + "value": 100 + } + } + }, + { + "$id": "2240", + "kind": "model", + "type": { + "$ref": "511" + }, + "value": { + "$id": "2241", + "state": { + "$id": "2242", + "kind": "string", + "type": { + "$ref": "78" + }, + "value": "Running" + }, + "count": { + "$id": "2243", + "kind": "number", + "type": { + "$ref": "516" + }, + "value": 20 + } + } + }, + { + "$id": "2244", + "kind": "model", + "type": { + "$ref": "511" + }, + "value": { + "$id": "2245", + "state": { + "$id": "2246", + "kind": "string", + "type": { + "$ref": "78" + }, + "value": "Deleting" + }, + "count": { + "$id": "2247", + "kind": "number", + "type": { + "$ref": "516" + }, + "value": 7 + } + } + } + ] + } + } + } + ] + }, + "provisioningState": { + "$id": "2248", + "kind": "string", + "type": { + "$ref": "22" + }, + "value": "Succeeded" + }, + "status": { + "$id": "2249", + "kind": "model", + "type": { + "$ref": "365" + }, + "value": { + "$id": "2250", + "code": { + "$id": "2251", + "kind": "string", + "type": { + "$ref": "68" + }, + "value": "HealthState/healthy" + }, + "message": { + "$id": "2252", + "kind": "string", + "type": { + "$ref": "370" + }, + "value": "The pool is healthy." + } + } + }, + "prediction": { + "$id": "2253", + "kind": "model", + "type": { + "$ref": "530" + }, + "value": { + "$id": "2254", + "forecastValues": { + "$id": "2255", + "kind": "model", + "type": { + "$ref": "532" + }, + "value": { + "$id": "2256", + "instancesRequestedCount": { + "$id": "2257", + "kind": "array", + "type": { + "$ref": "534" + }, + "value": [ + { + "$id": "2258", + "kind": "number", + "type": { + "$ref": "535" + }, + "value": 24 + }, + { + "$id": "2259", + "kind": "number", + "type": { + "$ref": "535" + }, + "value": 10 + }, + { + "$id": "2260", + "kind": "number", + "type": { + "$ref": "535" + }, + "value": 200 + }, + { + "$id": "2261", + "kind": "number", + "type": { + "$ref": "535" + }, + "value": 12 + }, + { + "$id": "2262", + "kind": "number", + "type": { + "$ref": "535" + }, + "value": 5 + }, + { + "$id": "2263", + "kind": "number", + "type": { + "$ref": "535" + }, + "value": 10 + }, + { + "$id": "2264", + "kind": "number", + "type": { + "$ref": "535" + }, + "value": 15 + }, + { + "$id": "2265", + "kind": "number", + "type": { + "$ref": "535" + }, + "value": 23 + }, + { + "$id": "2266", + "kind": "number", + "type": { + "$ref": "535" + }, + "value": 56 + }, + { + "$id": "2267", + "kind": "number", + "type": { + "$ref": "535" + }, + "value": 38 + }, + { + "$id": "2268", + "kind": "number", + "type": { + "$ref": "535" + }, + "value": 12 + }, + { + "$id": "2269", + "kind": "number", + "type": { + "$ref": "535" + }, + "value": 19 + } + ] + } + } + }, + "forecastStartTime": { + "$id": "2270", + "kind": "string", + "type": { + "$ref": "541" + }, + "value": "2025-02-14T01:34:59.228Z" + }, + "forecastInfo": { + "$id": "2271", + "kind": "string", + "type": { + "$ref": "546" + }, + "value": "{\"forecastAccuracy\": 85, \"seriesUnitIntervalInMins\": 60, \"instancesRequestedCount_recentHistory\": \"[9, 4, 2, 8, 8, 2, 3, 6, 5, 3, 2, 6]\"}" + } + } + } + } + }, + "id": { + "$id": "2272", + "kind": "string", + "type": { + "$ref": "175" + }, + "value": "/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyContainerGroupPools/pool/runtimeViews/latest" + }, + "name": { + "$id": "2273", + "kind": "string", + "type": { + "$ref": "180" + }, + "value": "pool" + }, + "type": { + "$id": "2274", + "kind": "string", + "type": { + "$ref": "184" + }, + "value": "Microsoft.StandbyPool/standbyContainerGroupPools/runtimeViews" + }, + "systemData": { + "$id": "2275", + "kind": "model", + "type": { + "$ref": "189" + }, + "value": { + "$id": "2276", + "createdBy": { + "$id": "2277", + "kind": "string", + "type": { + "$ref": "191" + }, + "value": "pooluser@microsoft.com" + }, + "createdByType": { + "$id": "2278", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "User" + }, + "createdAt": { + "$id": "2279", + "kind": "string", + "type": { + "$ref": "198" + }, + "value": "2023-09-07T16:33:22.210Z" + }, + "lastModifiedBy": { + "$id": "2280", + "kind": "string", + "type": { + "$ref": "203" + }, + "value": "pooluser@microsoft.com" + }, + "lastModifiedByType": { + "$id": "2281", + "kind": "string", + "type": { + "$ref": "32" + }, + "value": "User" + }, + "lastModifiedAt": { + "$id": "2282", + "kind": "string", + "type": { + "$ref": "210" + }, + "value": "2023-09-07T16:33:22.210Z" + } + } + } + } + } + ] + }, + "nextLink": { + "$id": "2283", + "kind": "string", + "type": { + "$ref": "561" + }, + "value": "https://microsoft.com/a" + } + } + } + } + ] + } + ] + }, + "parameters": [ + { + "$id": "2284", + "name": "resourceGroupName", + "nameInRequest": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2285", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2286", + "name": "standbyContainerGroupPoolName", + "nameInRequest": "standbyContainerGroupPoolName", + "doc": "Name of the standby container group pool", + "type": { + "$id": "2287", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "2288", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "2177" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "2289", + "type": { + "$id": "2290", + "kind": "array", + "name": "ArrayStandbyContainerGroupPoolRuntimeViewResource", + "valueType": { + "$ref": "499" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "resultSegments": [ + "value" + ] + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPoolRuntimeViews.listByStandbyPool" + } + ], + "parameters": [ + { + "$id": "2291", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "2292", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "location": "Uri", + "isApiVersion": false, + "isContentType": false, + "isRequired": true, + "isEndpoint": true, + "skipUrlEncoding": false, + "explode": false, + "kind": "Client", + "defaultValue": { + "$id": "2293", + "type": { + "$id": "2294", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + } + } + ], + "decorators": [ + { + "$id": "2295", + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": { + "$id": "2296" + } + } + ], + "crossLanguageDefinitionId": "Microsoft.StandbyPool.StandbyContainerGroupPoolRuntimeViews", + "apiVersions": [ + "2024-03-01-preview", + "2024-03-01", + "2025-03-01" + ], + "parent": { + "$ref": "565" + } + } + ] + } + ], + "auth": { + "$id": "2297", + "oAuth2": { + "$id": "2298", + "scopes": [ + "user_impersonation" + ] + } + } +} diff --git a/sdk/storage/ci.yml b/sdk/storage/ci.yml index 2ca0501b60bd..6d83bf7eebb6 100644 --- a/sdk/storage/ci.yml +++ b/sdk/storage/ci.yml @@ -9,9 +9,17 @@ trigger: paths: include: - sdk/storage/ + exclude: + - sdk/storage/Azure.ResourceManager.Storage/ - sdk/storage/Azure.Storage.DataMovement/ + exclude: + - sdk/storage/Azure.ResourceManager.Storage/ - sdk/storage/Azure.Storage.DataMovement.Blobs/ + exclude: + - sdk/storage/Azure.ResourceManager.Storage/ - sdk/storage/Azure.Storage.DataMovement.Files/ + exclude: + - sdk/storage/Azure.ResourceManager.Storage/ - sdk/storage/Azure.Storage.DataMovement.Blobs.Files.Shares/ exclude: - sdk/storage/Azure.ResourceManager.Storage/ diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/Azure.ResourceManager.SapVirtualInstances.sln b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/Azure.ResourceManager.SapVirtualInstances.sln new file mode 100644 index 000000000000..fa67d228e160 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/Azure.ResourceManager.SapVirtualInstances.sln @@ -0,0 +1,56 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29709.97 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.ResourceManager.SapVirtualInstances.Samples", "samples\Azure.ResourceManager.SapVirtualInstances.Samples.csproj", "{7A2DFF15-5746-49F4-BD0F-C6C35337088A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.ResourceManager.SapVirtualInstances", "src\Azure.ResourceManager.SapVirtualInstances.csproj", "{28FF4005-4467-4E36-92E7-DEA27DEB1519}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.ResourceManager.SapVirtualInstances.Tests", "tests\Azure.ResourceManager.SapVirtualInstances.Tests.csproj", "{1F1CD1D4-9932-4B73-99D8-C252A67D4B46}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.Build.0 = Release|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.Build.0 = Release|Any CPU + {7A2DFF15-5746-49F4-BD0F-C6C35337088A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7A2DFF15-5746-49F4-BD0F-C6C35337088A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7A2DFF15-5746-49F4-BD0F-C6C35337088A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7A2DFF15-5746-49F4-BD0F-C6C35337088A}.Release|Any CPU.Build.0 = Release|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A4241C1F-A53D-474C-9E4E-075054407E74}.Release|Any CPU.Build.0 = Release|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Release|Any CPU.Build.0 = Release|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Release|Any CPU.Build.0 = Release|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Debug|Any CPU.Build.0 = Debug|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Release|Any CPU.ActiveCfg = Release|Any CPU + {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Release|Any CPU.Build.0 = Release|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {A97F4B90-2591-4689-B1F8-5F21FE6D6CAE} + EndGlobalSection +EndGlobal diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/CHANGELOG.md b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/CHANGELOG.md new file mode 100644 index 000000000000..8b33f0fedccc --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/CHANGELOG.md @@ -0,0 +1,11 @@ +# Release History + +## 1.0.0-beta.1 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes \ No newline at end of file diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/Directory.Build.props b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/Directory.Build.props new file mode 100644 index 000000000000..63bd836ad44b --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/Directory.Build.props @@ -0,0 +1,6 @@ + + + + diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/README.md b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/README.md new file mode 100644 index 000000000000..bcc48b7af026 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/README.md @@ -0,0 +1,80 @@ +# Microsoft Azure SapVirtualInstances management client library for .NET + +**[Describe the service briefly first.]** + +This library follows the [new Azure SDK guidelines](https://azure.github.io/azure-sdk/general_introduction.html), and provides many core capabilities: + + - Support MSAL.NET, Azure.Identity is out of box for supporting MSAL.NET. + - Support [OpenTelemetry](https://opentelemetry.io/) for distributed tracing. + - HTTP pipeline with custom policies. + - Better error-handling. + - Support uniform telemetry across all languages. + +## Getting started + +### Install the package + +Install the Microsoft Azure SapVirtualInstances management library for .NET with [NuGet](https://www.nuget.org/): + +```dotnetcli +dotnet add package Azure.ResourceManager.SapVirtualInstances --prerelease +``` + +### Prerequisites + +* You must have an [Microsoft Azure subscription](https://azure.microsoft.com/free/dotnet/). + +### Authenticate the Client + +To create an authenticated client and start interacting with Microsoft Azure resources, see the [quickstart guide here](https://github.com/Azure/azure-sdk-for-net/blob/main/doc/dev/mgmt_quickstart.md). + +## Key concepts + +Key concepts of the Microsoft Azure SDK for .NET can be found [here](https://azure.github.io/azure-sdk/dotnet_introduction.html) + +## Documentation + +Documentation is available to help you learn how to use this package: + +- [Quickstart](https://github.com/Azure/azure-sdk-for-net/blob/main/doc/dev/mgmt_quickstart.md). +- [API References](https://learn.microsoft.com/dotnet/api/?view=azure-dotnet). +- [Authentication](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/README.md). + +## Examples + +Code samples for using the management library for .NET can be found in the following locations +- [.NET Management Library Code Samples](https://aka.ms/azuresdk-net-mgmt-samples) + +## Troubleshooting + +- File an issue via [GitHub Issues](https://github.com/Azure/azure-sdk-for-net/issues). +- Check [previous questions](https://stackoverflow.com/questions/tagged/azure+.net) or ask new ones on Stack Overflow using Azure and .NET tags. + +## Next steps + +For more information about Microsoft Azure SDK, see [this website](https://azure.github.io/azure-sdk/). + +## Contributing + +For details on contributing to this repository, see the [contributing +guide][cg]. + +This project welcomes contributions and suggestions. Most contributions +require you to agree to a Contributor License Agreement (CLA) declaring +that you have the right to, and actually do, grant us the rights to use +your contribution. For details, visit . + +When you submit a pull request, a CLA-bot will automatically determine +whether you need to provide a CLA and decorate the PR appropriately +(for example, label, comment). Follow the instructions provided by the +bot. You'll only need to do this action once across all repositories +using our CLA. + +This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For +more information, see the [Code of Conduct FAQ][coc_faq] or contact + with any other questions or comments. + + +[cg]: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/resourcemanager/Azure.ResourceManager/docs/CONTRIBUTING.md +[coc]: https://opensource.microsoft.com/codeofconduct/ +[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ \ No newline at end of file diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/assets.json b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/assets.json new file mode 100644 index 000000000000..e269976e380b --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/assets.json @@ -0,0 +1,7 @@ + +{ + "AssetsRepo": "Azure/azure-sdk-assets", + "AssetsRepoPrefixPath": "net", + "TagPrefix": "net/sapvirtualinstances/Azure.ResourceManager.SapVirtualInstances", + "Tag": "" +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Azure.ResourceManager.SapVirtualInstances.Samples.csproj b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Azure.ResourceManager.SapVirtualInstances.Samples.csproj new file mode 100644 index 000000000000..5507e60845be --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Azure.ResourceManager.SapVirtualInstances.Samples.csproj @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapApplicationServerInstanceCollection.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapApplicationServerInstanceCollection.cs new file mode 100644 index 000000000000..70a19c898099 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapApplicationServerInstanceCollection.cs @@ -0,0 +1,241 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.SapVirtualInstances.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.SapVirtualInstances.Samples +{ + public partial class Sample_SapApplicationServerInstanceCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_SAPApplicationServerInstancesCreate() + { + // Generated from example definition: 2024-09-01/SapApplicationServerInstances_Create.json + // this example is just showing the usage of "SAPApplicationServerInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // get the collection of this SapApplicationServerInstanceResource + SapApplicationServerInstanceCollection collection = sapVirtualInstance.GetSapApplicationServerInstances(); + + // invoke the operation + string applicationInstanceName = "app01"; + SapApplicationServerInstanceData data = new SapApplicationServerInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapApplicationServerProperties(), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, applicationInstanceName, data); + SapApplicationServerInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapApplicationServerInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateSAPApplicationServerInstancesForHASystemWithAvailabilitySet() + { + // Generated from example definition: 2024-09-01/SapApplicationServerInstances_CreateForHaWithAvailabilitySet.json + // this example is just showing the usage of "SAPApplicationServerInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // get the collection of this SapApplicationServerInstanceResource + SapApplicationServerInstanceCollection collection = sapVirtualInstance.GetSapApplicationServerInstances(); + + // invoke the operation + string applicationInstanceName = "app01"; + SapApplicationServerInstanceData data = new SapApplicationServerInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapApplicationServerProperties(), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, applicationInstanceName, data); + SapApplicationServerInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapApplicationServerInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_SAPApplicationServerInstancesGet() + { + // Generated from example definition: 2024-09-01/SapApplicationServerInstances_Get.json + // this example is just showing the usage of "SAPApplicationServerInstance_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // get the collection of this SapApplicationServerInstanceResource + SapApplicationServerInstanceCollection collection = sapVirtualInstance.GetSapApplicationServerInstances(); + + // invoke the operation + string applicationInstanceName = "app01"; + SapApplicationServerInstanceResource result = await collection.GetAsync(applicationInstanceName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapApplicationServerInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_SapApplicationServerInstancesListBySAPVirtualInstance() + { + // Generated from example definition: 2024-09-01/SapApplicationServerInstances_ListBySapVirtualInstance.json + // this example is just showing the usage of "SAPApplicationServerInstance_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // get the collection of this SapApplicationServerInstanceResource + SapApplicationServerInstanceCollection collection = sapVirtualInstance.GetSapApplicationServerInstances(); + + // invoke the operation and iterate over the result + await foreach (SapApplicationServerInstanceResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapApplicationServerInstanceData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_SAPApplicationServerInstancesGet() + { + // Generated from example definition: 2024-09-01/SapApplicationServerInstances_Get.json + // this example is just showing the usage of "SAPApplicationServerInstance_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // get the collection of this SapApplicationServerInstanceResource + SapApplicationServerInstanceCollection collection = sapVirtualInstance.GetSapApplicationServerInstances(); + + // invoke the operation + string applicationInstanceName = "app01"; + bool result = await collection.ExistsAsync(applicationInstanceName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_SAPApplicationServerInstancesGet() + { + // Generated from example definition: 2024-09-01/SapApplicationServerInstances_Get.json + // this example is just showing the usage of "SAPApplicationServerInstance_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // get the collection of this SapApplicationServerInstanceResource + SapApplicationServerInstanceCollection collection = sapVirtualInstance.GetSapApplicationServerInstances(); + + // invoke the operation + string applicationInstanceName = "app01"; + NullableResponse response = await collection.GetIfExistsAsync(applicationInstanceName); + SapApplicationServerInstanceResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapApplicationServerInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapApplicationServerInstanceResource.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapApplicationServerInstanceResource.cs new file mode 100644 index 000000000000..a754e7233cd3 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapApplicationServerInstanceResource.cs @@ -0,0 +1,306 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.SapVirtualInstances.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.SapVirtualInstances.Samples +{ + public partial class Sample_SapApplicationServerInstanceResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_SAPApplicationServerInstancesGet() + { + // Generated from example definition: 2024-09-01/SapApplicationServerInstances_Get.json + // this example is just showing the usage of "SAPApplicationServerInstance_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapApplicationServerInstanceResource created on azure + // for more information of creating SapApplicationServerInstanceResource, please refer to the document of SapApplicationServerInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + string applicationInstanceName = "app01"; + ResourceIdentifier sapApplicationServerInstanceResourceId = SapApplicationServerInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, applicationInstanceName); + SapApplicationServerInstanceResource sapApplicationServerInstance = client.GetSapApplicationServerInstanceResource(sapApplicationServerInstanceResourceId); + + // invoke the operation + SapApplicationServerInstanceResource result = await sapApplicationServerInstance.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapApplicationServerInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_SAPApplicationServerInstancesDelete() + { + // Generated from example definition: 2024-09-01/SapApplicationServerInstances_Delete.json + // this example is just showing the usage of "SAPApplicationServerInstance_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapApplicationServerInstanceResource created on azure + // for more information of creating SapApplicationServerInstanceResource, please refer to the document of SapApplicationServerInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + string applicationInstanceName = "app01"; + ResourceIdentifier sapApplicationServerInstanceResourceId = SapApplicationServerInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, applicationInstanceName); + SapApplicationServerInstanceResource sapApplicationServerInstance = client.GetSapApplicationServerInstanceResource(sapApplicationServerInstanceResourceId); + + // invoke the operation + await sapApplicationServerInstance.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_SAPApplicationServerInstancesUpdate() + { + // Generated from example definition: 2024-09-01/SapApplicationServerInstances_Update.json + // this example is just showing the usage of "SAPApplicationServerInstance_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapApplicationServerInstanceResource created on azure + // for more information of creating SapApplicationServerInstanceResource, please refer to the document of SapApplicationServerInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + string applicationInstanceName = "app01"; + ResourceIdentifier sapApplicationServerInstanceResourceId = SapApplicationServerInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, applicationInstanceName); + SapApplicationServerInstanceResource sapApplicationServerInstance = client.GetSapApplicationServerInstanceResource(sapApplicationServerInstanceResourceId); + + // invoke the operation + SapApplicationServerInstancePatch patch = new SapApplicationServerInstancePatch + { + Tags = +{ +["tag1"] = "value1" +}, + }; + SapApplicationServerInstanceResource result = await sapApplicationServerInstance.UpdateAsync(patch); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapApplicationServerInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Start_StartTheSAPApplicationServerInstance() + { + // Generated from example definition: 2024-09-01/SapApplicationServerInstances_StartInstance.json + // this example is just showing the usage of "SAPApplicationServerInstances_Start" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapApplicationServerInstanceResource created on azure + // for more information of creating SapApplicationServerInstanceResource, please refer to the document of SapApplicationServerInstanceResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + string applicationInstanceName = "app01"; + ResourceIdentifier sapApplicationServerInstanceResourceId = SapApplicationServerInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, applicationInstanceName); + SapApplicationServerInstanceResource sapApplicationServerInstance = client.GetSapApplicationServerInstanceResource(sapApplicationServerInstanceResourceId); + + // invoke the operation + StartContent content = new StartContent(); + ArmOperation lro = await sapApplicationServerInstance.StartAsync(WaitUntil.Completed, content: content); + OperationStatusResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Start_StartVirtualMachineAndTheSAPApplicationServerInstanceOnIt() + { + // Generated from example definition: 2024-09-01/SapApplicationServerInstances_StartInstanceVM.json + // this example is just showing the usage of "SAPApplicationServerInstances_Start" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapApplicationServerInstanceResource created on azure + // for more information of creating SapApplicationServerInstanceResource, please refer to the document of SapApplicationServerInstanceResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + string applicationInstanceName = "app01"; + ResourceIdentifier sapApplicationServerInstanceResourceId = SapApplicationServerInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, applicationInstanceName); + SapApplicationServerInstanceResource sapApplicationServerInstance = client.GetSapApplicationServerInstanceResource(sapApplicationServerInstanceResourceId); + + // invoke the operation + StartContent content = new StartContent + { + StartVm = true, + }; + ArmOperation lro = await sapApplicationServerInstance.StartAsync(WaitUntil.Completed, content: content); + OperationStatusResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Stop_StopTheSAPApplicationServerInstance() + { + // Generated from example definition: 2024-09-01/SapApplicationServerInstances_StopInstance.json + // this example is just showing the usage of "SAPApplicationServerInstances_Stop" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapApplicationServerInstanceResource created on azure + // for more information of creating SapApplicationServerInstanceResource, please refer to the document of SapApplicationServerInstanceResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + string applicationInstanceName = "app01"; + ResourceIdentifier sapApplicationServerInstanceResourceId = SapApplicationServerInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, applicationInstanceName); + SapApplicationServerInstanceResource sapApplicationServerInstance = client.GetSapApplicationServerInstanceResource(sapApplicationServerInstanceResourceId); + + // invoke the operation + StopContent content = new StopContent + { + SoftStopTimeoutSeconds = 0L, + }; + ArmOperation lro = await sapApplicationServerInstance.StopAsync(WaitUntil.Completed, content: content); + OperationStatusResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Stop_StopTheSAPApplicationServerInstanceAndItSInfrastructure() + { + // Generated from example definition: 2024-09-01/SapApplicationServerInstances_StopInstanceInfrastructure.json + // this example is just showing the usage of "SAPApplicationServerInstances_Stop" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapApplicationServerInstanceResource created on azure + // for more information of creating SapApplicationServerInstanceResource, please refer to the document of SapApplicationServerInstanceResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + string applicationInstanceName = "app01"; + ResourceIdentifier sapApplicationServerInstanceResourceId = SapApplicationServerInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, applicationInstanceName); + SapApplicationServerInstanceResource sapApplicationServerInstance = client.GetSapApplicationServerInstanceResource(sapApplicationServerInstanceResourceId); + + // invoke the operation + StopContent content = new StopContent + { + SoftStopTimeoutSeconds = 0L, + DeallocateVm = true, + }; + ArmOperation lro = await sapApplicationServerInstance.StopAsync(WaitUntil.Completed, content: content); + OperationStatusResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Stop_SoftStopTheSAPApplicationServerInstance() + { + // Generated from example definition: 2024-09-01/SapApplicationServerInstances_StopInstanceSoft.json + // this example is just showing the usage of "SAPApplicationServerInstances_Stop" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapApplicationServerInstanceResource created on azure + // for more information of creating SapApplicationServerInstanceResource, please refer to the document of SapApplicationServerInstanceResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + string applicationInstanceName = "app01"; + ResourceIdentifier sapApplicationServerInstanceResourceId = SapApplicationServerInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, applicationInstanceName); + SapApplicationServerInstanceResource sapApplicationServerInstance = client.GetSapApplicationServerInstanceResource(sapApplicationServerInstanceResourceId); + + // invoke the operation + StopContent content = new StopContent + { + SoftStopTimeoutSeconds = 300L, + }; + ArmOperation lro = await sapApplicationServerInstance.StopAsync(WaitUntil.Completed, content: content); + OperationStatusResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Stop_SoftStopTheSAPApplicationServerInstanceAndItSInfrastructure() + { + // Generated from example definition: 2024-09-01/SapApplicationServerInstances_StopInstanceSoftInfrastructure.json + // this example is just showing the usage of "SAPApplicationServerInstances_Stop" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapApplicationServerInstanceResource created on azure + // for more information of creating SapApplicationServerInstanceResource, please refer to the document of SapApplicationServerInstanceResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + string applicationInstanceName = "app01"; + ResourceIdentifier sapApplicationServerInstanceResourceId = SapApplicationServerInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, applicationInstanceName); + SapApplicationServerInstanceResource sapApplicationServerInstance = client.GetSapApplicationServerInstanceResource(sapApplicationServerInstanceResourceId); + + // invoke the operation + StopContent content = new StopContent + { + SoftStopTimeoutSeconds = 300L, + DeallocateVm = true, + }; + ArmOperation lro = await sapApplicationServerInstance.StopAsync(WaitUntil.Completed, content: content); + OperationStatusResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapCentralServerInstanceCollection.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapCentralServerInstanceCollection.cs new file mode 100644 index 000000000000..6984bc34d5d5 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapCentralServerInstanceCollection.cs @@ -0,0 +1,241 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.SapVirtualInstances.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.SapVirtualInstances.Samples +{ + public partial class Sample_SapCentralServerInstanceCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_SapCentralServerInstancesCreate() + { + // Generated from example definition: 2024-09-01/SapCentralInstances_Create.json + // this example is just showing the usage of "SAPCentralServerInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // get the collection of this SapCentralServerInstanceResource + SapCentralServerInstanceCollection collection = sapVirtualInstance.GetSapCentralServerInstances(); + + // invoke the operation + string centralInstanceName = "centralServer"; + SapCentralServerInstanceData data = new SapCentralServerInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapCentralServerProperties(), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, centralInstanceName, data); + SapCentralServerInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapCentralServerInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateSAPCentralInstancesForHASystemWithAvailabilitySet() + { + // Generated from example definition: 2024-09-01/SapCentralInstances_CreateForHaWithAvailabilitySet.json + // this example is just showing the usage of "SAPCentralServerInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // get the collection of this SapCentralServerInstanceResource + SapCentralServerInstanceCollection collection = sapVirtualInstance.GetSapCentralServerInstances(); + + // invoke the operation + string centralInstanceName = "centralServer"; + SapCentralServerInstanceData data = new SapCentralServerInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapCentralServerProperties(), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, centralInstanceName, data); + SapCentralServerInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapCentralServerInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_SapCentralServerInstancesGet() + { + // Generated from example definition: 2024-09-01/SapCentralInstances_Get.json + // this example is just showing the usage of "SAPCentralServerInstance_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // get the collection of this SapCentralServerInstanceResource + SapCentralServerInstanceCollection collection = sapVirtualInstance.GetSapCentralServerInstances(); + + // invoke the operation + string centralInstanceName = "centralServer"; + SapCentralServerInstanceResource result = await collection.GetAsync(centralInstanceName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapCentralServerInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_SAPCentralInstancesListBySAPVirtualInstance() + { + // Generated from example definition: 2024-09-01/SapCentralServerInstances_ListBySapVirtualInstance.json + // this example is just showing the usage of "SAPCentralServerInstance_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // get the collection of this SapCentralServerInstanceResource + SapCentralServerInstanceCollection collection = sapVirtualInstance.GetSapCentralServerInstances(); + + // invoke the operation and iterate over the result + await foreach (SapCentralServerInstanceResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapCentralServerInstanceData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_SapCentralServerInstancesGet() + { + // Generated from example definition: 2024-09-01/SapCentralInstances_Get.json + // this example is just showing the usage of "SAPCentralServerInstance_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // get the collection of this SapCentralServerInstanceResource + SapCentralServerInstanceCollection collection = sapVirtualInstance.GetSapCentralServerInstances(); + + // invoke the operation + string centralInstanceName = "centralServer"; + bool result = await collection.ExistsAsync(centralInstanceName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_SapCentralServerInstancesGet() + { + // Generated from example definition: 2024-09-01/SapCentralInstances_Get.json + // this example is just showing the usage of "SAPCentralServerInstance_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // get the collection of this SapCentralServerInstanceResource + SapCentralServerInstanceCollection collection = sapVirtualInstance.GetSapCentralServerInstances(); + + // invoke the operation + string centralInstanceName = "centralServer"; + NullableResponse response = await collection.GetIfExistsAsync(centralInstanceName); + SapCentralServerInstanceResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapCentralServerInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapCentralServerInstanceResource.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapCentralServerInstanceResource.cs new file mode 100644 index 000000000000..c51a9b913e79 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapCentralServerInstanceResource.cs @@ -0,0 +1,240 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.SapVirtualInstances.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.SapVirtualInstances.Samples +{ + public partial class Sample_SapCentralServerInstanceResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_SapCentralServerInstancesGet() + { + // Generated from example definition: 2024-09-01/SapCentralInstances_Get.json + // this example is just showing the usage of "SAPCentralServerInstance_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapCentralServerInstanceResource created on azure + // for more information of creating SapCentralServerInstanceResource, please refer to the document of SapCentralServerInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + string centralInstanceName = "centralServer"; + ResourceIdentifier sapCentralServerInstanceResourceId = SapCentralServerInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, centralInstanceName); + SapCentralServerInstanceResource sapCentralServerInstance = client.GetSapCentralServerInstanceResource(sapCentralServerInstanceResourceId); + + // invoke the operation + SapCentralServerInstanceResource result = await sapCentralServerInstance.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapCentralServerInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_SapCentralServerInstancesDelete() + { + // Generated from example definition: 2024-09-01/SapCentralInstances_Delete.json + // this example is just showing the usage of "SAPCentralServerInstance_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapCentralServerInstanceResource created on azure + // for more information of creating SapCentralServerInstanceResource, please refer to the document of SapCentralServerInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + string centralInstanceName = "centralServer"; + ResourceIdentifier sapCentralServerInstanceResourceId = SapCentralServerInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, centralInstanceName); + SapCentralServerInstanceResource sapCentralServerInstance = client.GetSapCentralServerInstanceResource(sapCentralServerInstanceResourceId); + + // invoke the operation + await sapCentralServerInstance.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_SapCentralServerInstancesUpdate() + { + // Generated from example definition: 2024-09-01/SapCentralInstances_Update.json + // this example is just showing the usage of "SAPCentralServerInstance_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapCentralServerInstanceResource created on azure + // for more information of creating SapCentralServerInstanceResource, please refer to the document of SapCentralServerInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + string centralInstanceName = "centralServer"; + ResourceIdentifier sapCentralServerInstanceResourceId = SapCentralServerInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, centralInstanceName); + SapCentralServerInstanceResource sapCentralServerInstance = client.GetSapCentralServerInstanceResource(sapCentralServerInstanceResourceId); + + // invoke the operation + SapCentralServerInstancePatch patch = new SapCentralServerInstancePatch + { + Tags = +{ +["tag1"] = "value1" +}, + }; + SapCentralServerInstanceResource result = await sapCentralServerInstance.UpdateAsync(patch); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapCentralServerInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Start_StartTheSAPCentralServicesInstance() + { + // Generated from example definition: 2024-09-01/SapCentralInstances_StartInstance.json + // this example is just showing the usage of "SAPCentralServerInstances_Start" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapCentralServerInstanceResource created on azure + // for more information of creating SapCentralServerInstanceResource, please refer to the document of SapCentralServerInstanceResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + string centralInstanceName = "centralServer"; + ResourceIdentifier sapCentralServerInstanceResourceId = SapCentralServerInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, centralInstanceName); + SapCentralServerInstanceResource sapCentralServerInstance = client.GetSapCentralServerInstanceResource(sapCentralServerInstanceResourceId); + + // invoke the operation + StartContent content = new StartContent(); + ArmOperation lro = await sapCentralServerInstance.StartAsync(WaitUntil.Completed, content: content); + OperationStatusResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Start_StartTheVirtualMachineSAndTheSAPCentralServicesInstanceOnIt() + { + // Generated from example definition: 2024-09-01/SapCentralInstances_StartInstanceVM.json + // this example is just showing the usage of "SAPCentralServerInstances_Start" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapCentralServerInstanceResource created on azure + // for more information of creating SapCentralServerInstanceResource, please refer to the document of SapCentralServerInstanceResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + string centralInstanceName = "centralServer"; + ResourceIdentifier sapCentralServerInstanceResourceId = SapCentralServerInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, centralInstanceName); + SapCentralServerInstanceResource sapCentralServerInstance = client.GetSapCentralServerInstanceResource(sapCentralServerInstanceResourceId); + + // invoke the operation + StartContent content = new StartContent + { + StartVm = true, + }; + ArmOperation lro = await sapCentralServerInstance.StartAsync(WaitUntil.Completed, content: content); + OperationStatusResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Stop_StopTheSAPCentralServicesInstance() + { + // Generated from example definition: 2024-09-01/SapCentralInstances_StopInstance.json + // this example is just showing the usage of "SAPCentralServerInstances_Stop" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapCentralServerInstanceResource created on azure + // for more information of creating SapCentralServerInstanceResource, please refer to the document of SapCentralServerInstanceResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + string centralInstanceName = "centralServer"; + ResourceIdentifier sapCentralServerInstanceResourceId = SapCentralServerInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, centralInstanceName); + SapCentralServerInstanceResource sapCentralServerInstance = client.GetSapCentralServerInstanceResource(sapCentralServerInstanceResourceId); + + // invoke the operation + StopContent content = new StopContent + { + SoftStopTimeoutSeconds = 1200L, + }; + ArmOperation lro = await sapCentralServerInstance.StopAsync(WaitUntil.Completed, content: content); + OperationStatusResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Stop_StopTheSAPCentralServicesInstanceAndItsUnderlyingVirtualMachineS() + { + // Generated from example definition: 2024-09-01/SapCentralInstances_StopInstanceVM.json + // this example is just showing the usage of "SAPCentralServerInstances_Stop" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapCentralServerInstanceResource created on azure + // for more information of creating SapCentralServerInstanceResource, please refer to the document of SapCentralServerInstanceResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + string centralInstanceName = "centralServer"; + ResourceIdentifier sapCentralServerInstanceResourceId = SapCentralServerInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, centralInstanceName); + SapCentralServerInstanceResource sapCentralServerInstance = client.GetSapCentralServerInstanceResource(sapCentralServerInstanceResourceId); + + // invoke the operation + StopContent content = new StopContent + { + DeallocateVm = true, + }; + ArmOperation lro = await sapCentralServerInstance.StopAsync(WaitUntil.Completed, content: content); + OperationStatusResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapDatabaseInstanceCollection.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapDatabaseInstanceCollection.cs new file mode 100644 index 000000000000..57e19fd4683b --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapDatabaseInstanceCollection.cs @@ -0,0 +1,241 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.SapVirtualInstances.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.SapVirtualInstances.Samples +{ + public partial class Sample_SapDatabaseInstanceCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_SAPDatabaseInstancesCreate() + { + // Generated from example definition: 2024-09-01/SapDatabaseInstances_Create.json + // this example is just showing the usage of "SAPDatabaseInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // get the collection of this SapDatabaseInstanceResource + SapDatabaseInstanceCollection collection = sapVirtualInstance.GetSapDatabaseInstances(); + + // invoke the operation + string databaseInstanceName = "databaseServer"; + SapDatabaseInstanceData data = new SapDatabaseInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapDatabaseProperties(), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, databaseInstanceName, data); + SapDatabaseInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapDatabaseInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateSAPDatabaseInstancesForHASystemWithAvailabilitySet() + { + // Generated from example definition: 2024-09-01/SapDatabaseInstances_CreateForHaWithAvailabilitySet.json + // this example is just showing the usage of "SAPDatabaseInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // get the collection of this SapDatabaseInstanceResource + SapDatabaseInstanceCollection collection = sapVirtualInstance.GetSapDatabaseInstances(); + + // invoke the operation + string databaseInstanceName = "databaseServer"; + SapDatabaseInstanceData data = new SapDatabaseInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapDatabaseProperties(), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, databaseInstanceName, data); + SapDatabaseInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapDatabaseInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_SAPDatabaseInstancesGet() + { + // Generated from example definition: 2024-09-01/SapDatabaseInstances_Get.json + // this example is just showing the usage of "SAPDatabaseInstance_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // get the collection of this SapDatabaseInstanceResource + SapDatabaseInstanceCollection collection = sapVirtualInstance.GetSapDatabaseInstances(); + + // invoke the operation + string databaseInstanceName = "databaseServer"; + SapDatabaseInstanceResource result = await collection.GetAsync(databaseInstanceName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapDatabaseInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_SAPDatabaseInstancesListBySAPVirtualInstance() + { + // Generated from example definition: 2024-09-01/SapDatabaseInstances_List.json + // this example is just showing the usage of "SAPDatabaseInstance_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // get the collection of this SapDatabaseInstanceResource + SapDatabaseInstanceCollection collection = sapVirtualInstance.GetSapDatabaseInstances(); + + // invoke the operation and iterate over the result + await foreach (SapDatabaseInstanceResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapDatabaseInstanceData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_SAPDatabaseInstancesGet() + { + // Generated from example definition: 2024-09-01/SapDatabaseInstances_Get.json + // this example is just showing the usage of "SAPDatabaseInstance_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // get the collection of this SapDatabaseInstanceResource + SapDatabaseInstanceCollection collection = sapVirtualInstance.GetSapDatabaseInstances(); + + // invoke the operation + string databaseInstanceName = "databaseServer"; + bool result = await collection.ExistsAsync(databaseInstanceName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_SAPDatabaseInstancesGet() + { + // Generated from example definition: 2024-09-01/SapDatabaseInstances_Get.json + // this example is just showing the usage of "SAPDatabaseInstance_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // get the collection of this SapDatabaseInstanceResource + SapDatabaseInstanceCollection collection = sapVirtualInstance.GetSapDatabaseInstances(); + + // invoke the operation + string databaseInstanceName = "databaseServer"; + NullableResponse response = await collection.GetIfExistsAsync(databaseInstanceName); + SapDatabaseInstanceResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapDatabaseInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapDatabaseInstanceResource.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapDatabaseInstanceResource.cs new file mode 100644 index 000000000000..de8c748921e3 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapDatabaseInstanceResource.cs @@ -0,0 +1,306 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.SapVirtualInstances.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.SapVirtualInstances.Samples +{ + public partial class Sample_SapDatabaseInstanceResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_SAPDatabaseInstancesGet() + { + // Generated from example definition: 2024-09-01/SapDatabaseInstances_Get.json + // this example is just showing the usage of "SAPDatabaseInstance_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapDatabaseInstanceResource created on azure + // for more information of creating SapDatabaseInstanceResource, please refer to the document of SapDatabaseInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + string databaseInstanceName = "databaseServer"; + ResourceIdentifier sapDatabaseInstanceResourceId = SapDatabaseInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, databaseInstanceName); + SapDatabaseInstanceResource sapDatabaseInstance = client.GetSapDatabaseInstanceResource(sapDatabaseInstanceResourceId); + + // invoke the operation + SapDatabaseInstanceResource result = await sapDatabaseInstance.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapDatabaseInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_SAPDatabaseInstancesDelete() + { + // Generated from example definition: 2024-09-01/SapDatabaseInstances_Delete.json + // this example is just showing the usage of "SAPDatabaseInstance_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapDatabaseInstanceResource created on azure + // for more information of creating SapDatabaseInstanceResource, please refer to the document of SapDatabaseInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + string databaseInstanceName = "databaseServer"; + ResourceIdentifier sapDatabaseInstanceResourceId = SapDatabaseInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, databaseInstanceName); + SapDatabaseInstanceResource sapDatabaseInstance = client.GetSapDatabaseInstanceResource(sapDatabaseInstanceResourceId); + + // invoke the operation + await sapDatabaseInstance.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_SAPDatabaseInstancesUpdate() + { + // Generated from example definition: 2024-09-01/SapDatabaseInstances_Update.json + // this example is just showing the usage of "SAPDatabaseInstance_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapDatabaseInstanceResource created on azure + // for more information of creating SapDatabaseInstanceResource, please refer to the document of SapDatabaseInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + string databaseInstanceName = "databaseServer"; + ResourceIdentifier sapDatabaseInstanceResourceId = SapDatabaseInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, databaseInstanceName); + SapDatabaseInstanceResource sapDatabaseInstance = client.GetSapDatabaseInstanceResource(sapDatabaseInstanceResourceId); + + // invoke the operation + SapDatabaseInstancePatch patch = new SapDatabaseInstancePatch + { + Tags = +{ +["key1"] = "value1" +}, + }; + SapDatabaseInstanceResource result = await sapDatabaseInstance.UpdateAsync(patch); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapDatabaseInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Start_StartTheDatabaseInstanceOfTheSAPSystem() + { + // Generated from example definition: 2024-09-01/SapDatabaseInstances_StartInstance.json + // this example is just showing the usage of "SAPDatabaseInstances_Start" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapDatabaseInstanceResource created on azure + // for more information of creating SapDatabaseInstanceResource, please refer to the document of SapDatabaseInstanceResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + string databaseInstanceName = "db0"; + ResourceIdentifier sapDatabaseInstanceResourceId = SapDatabaseInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, databaseInstanceName); + SapDatabaseInstanceResource sapDatabaseInstance = client.GetSapDatabaseInstanceResource(sapDatabaseInstanceResourceId); + + // invoke the operation + StartContent content = new StartContent(); + ArmOperation lro = await sapDatabaseInstance.StartAsync(WaitUntil.Completed, content: content); + OperationStatusResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Start_StartVirtualMachineAndTheDatabaseInstanceOfTheSAPSystemOnIt() + { + // Generated from example definition: 2024-09-01/SapDatabaseInstances_StartInstanceVM.json + // this example is just showing the usage of "SAPDatabaseInstances_Start" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapDatabaseInstanceResource created on azure + // for more information of creating SapDatabaseInstanceResource, please refer to the document of SapDatabaseInstanceResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + string databaseInstanceName = "db0"; + ResourceIdentifier sapDatabaseInstanceResourceId = SapDatabaseInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, databaseInstanceName); + SapDatabaseInstanceResource sapDatabaseInstance = client.GetSapDatabaseInstanceResource(sapDatabaseInstanceResourceId); + + // invoke the operation + StartContent content = new StartContent + { + StartVm = true, + }; + ArmOperation lro = await sapDatabaseInstance.StartAsync(WaitUntil.Completed, content: content); + OperationStatusResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Stop_StopTheDatabaseInstanceOfTheSAPSystem() + { + // Generated from example definition: 2024-09-01/SapDatabaseInstances_StopInstance.json + // this example is just showing the usage of "SAPDatabaseInstances_Stop" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapDatabaseInstanceResource created on azure + // for more information of creating SapDatabaseInstanceResource, please refer to the document of SapDatabaseInstanceResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + string databaseInstanceName = "db0"; + ResourceIdentifier sapDatabaseInstanceResourceId = SapDatabaseInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, databaseInstanceName); + SapDatabaseInstanceResource sapDatabaseInstance = client.GetSapDatabaseInstanceResource(sapDatabaseInstanceResourceId); + + // invoke the operation + StopContent content = new StopContent + { + SoftStopTimeoutSeconds = 0L, + }; + ArmOperation lro = await sapDatabaseInstance.StopAsync(WaitUntil.Completed, content: content); + OperationStatusResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Stop_SoftStopTheDatabaseInstanceOfTheSAPSystem() + { + // Generated from example definition: 2024-09-01/SapDatabaseInstances_StopInstanceSoft.json + // this example is just showing the usage of "SAPDatabaseInstances_Stop" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapDatabaseInstanceResource created on azure + // for more information of creating SapDatabaseInstanceResource, please refer to the document of SapDatabaseInstanceResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + string databaseInstanceName = "db0"; + ResourceIdentifier sapDatabaseInstanceResourceId = SapDatabaseInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, databaseInstanceName); + SapDatabaseInstanceResource sapDatabaseInstance = client.GetSapDatabaseInstanceResource(sapDatabaseInstanceResourceId); + + // invoke the operation + StopContent content = new StopContent + { + SoftStopTimeoutSeconds = 300L, + }; + ArmOperation lro = await sapDatabaseInstance.StopAsync(WaitUntil.Completed, content: content); + OperationStatusResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Stop_SoftStopTheDatabaseInstanceOfTheSAPSystemAndTheUnderlyingVirtualMachineS() + { + // Generated from example definition: 2024-09-01/SapDatabaseInstances_StopInstanceSoftVM.json + // this example is just showing the usage of "SAPDatabaseInstances_Stop" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapDatabaseInstanceResource created on azure + // for more information of creating SapDatabaseInstanceResource, please refer to the document of SapDatabaseInstanceResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + string databaseInstanceName = "db0"; + ResourceIdentifier sapDatabaseInstanceResourceId = SapDatabaseInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, databaseInstanceName); + SapDatabaseInstanceResource sapDatabaseInstance = client.GetSapDatabaseInstanceResource(sapDatabaseInstanceResourceId); + + // invoke the operation + StopContent content = new StopContent + { + SoftStopTimeoutSeconds = 300L, + DeallocateVm = true, + }; + ArmOperation lro = await sapDatabaseInstance.StopAsync(WaitUntil.Completed, content: content); + OperationStatusResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Stop_StopTheDatabaseInstanceOfTheSAPSystemAndTheUnderlyingVirtualMachineS() + { + // Generated from example definition: 2024-09-01/SapDatabaseInstances_StopInstanceVM.json + // this example is just showing the usage of "SAPDatabaseInstances_Stop" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapDatabaseInstanceResource created on azure + // for more information of creating SapDatabaseInstanceResource, please refer to the document of SapDatabaseInstanceResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + string databaseInstanceName = "db0"; + ResourceIdentifier sapDatabaseInstanceResourceId = SapDatabaseInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, databaseInstanceName); + SapDatabaseInstanceResource sapDatabaseInstance = client.GetSapDatabaseInstanceResource(sapDatabaseInstanceResourceId); + + // invoke the operation + StopContent content = new StopContent + { + SoftStopTimeoutSeconds = 0L, + DeallocateVm = true, + }; + ArmOperation lro = await sapDatabaseInstance.StopAsync(WaitUntil.Completed, content: content); + OperationStatusResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapVirtualInstanceCollection.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapVirtualInstanceCollection.cs new file mode 100644 index 000000000000..9bfc4d5ca023 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapVirtualInstanceCollection.cs @@ -0,0 +1,3485 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.Resources; +using Azure.ResourceManager.SapVirtualInstances.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.SapVirtualInstances.Samples +{ + public partial class Sample_SapVirtualInstanceCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_DetectSAPSoftwareInstallationOnADistributedSystem() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateDetectDS.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("eastus2")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.Prod, SapProductType.S4HANA, new DeploymentWithOSConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new ThreeTierConfiguration("{{resourcegrp}}", new CentralServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/app", new VirtualMachineConfiguration("Standard_E4ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP-HA", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "azureuser", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "{{sshkey}}", + PrivateKey = "{{privateKey}}", + }, + }, + }), 1L), new ApplicationServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/app", new VirtualMachineConfiguration("Standard_E4ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP-HA", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "azureuser", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "{{sshkey}}", + PrivateKey = "{{privateKey}}", + }, + }, + }), 2L), new DatabaseConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/app", new VirtualMachineConfiguration("Standard_M32ts", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP-HA", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "azureuser", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "{{sshkey}}", + PrivateKey = "{{privateKey}}", + }, + }, + }), 1L)) + { + IsSecondaryIPEnabled = true, + }, + SoftwareConfiguration = new ExternalInstallationSoftwareConfiguration + { + CentralServerVmId = "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0", + }, + OSSapConfiguration = new OSSapConfiguration + { + SapFqdn = "sap.bpaas.com", + }, + }), + Tags = +{ +["created by"] = "azureuser" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_DetectSAPSoftwareInstallationOnAnHASystemWithAvailabilitySet() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateDetectHaAvailabilitySet.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.Prod, SapProductType.S4HANA, new DeploymentWithOSConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new ThreeTierConfiguration("X00-RG", new CentralServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E16ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP-HA", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 2L), new ApplicationServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E32ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP-HA", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 6L), new DatabaseConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", new VirtualMachineConfiguration("Standard_M32ts", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP-HA", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 2L) + { + DatabaseType = SapDatabaseType.HANA, + }) + { + HighAvailabilityType = SapHighAvailabilityType.AvailabilitySet, + }, + SoftwareConfiguration = new ExternalInstallationSoftwareConfiguration + { + CentralServerVmId = "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0", + }, + OSSapConfiguration = new OSSapConfiguration + { + SapFqdn = "xyz.test.com", + }, + }), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_DetectSAPSoftwareInstallationOnAnHASystemWithAvailabilityZone() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateDetectHaAvailabilityZone.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.Prod, SapProductType.S4HANA, new DeploymentWithOSConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new ThreeTierConfiguration("X00-RG", new CentralServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E16ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP-HA", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 2L), new ApplicationServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E32ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP-HA", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 6L), new DatabaseConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", new VirtualMachineConfiguration("Standard_M32ts", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP-HA", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 2L) + { + DatabaseType = SapDatabaseType.HANA, + }) + { + HighAvailabilityType = SapHighAvailabilityType.AvailabilityZone, + }, + SoftwareConfiguration = new ExternalInstallationSoftwareConfiguration + { + CentralServerVmId = "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0", + }, + OSSapConfiguration = new OSSapConfiguration + { + SapFqdn = "xyz.test.com", + }, + }), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_DetectSAPSoftwareInstallationOnASingleServerSystem() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateDetectSingleServer.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.NonProd, SapProductType.S4HANA, new DeploymentWithOSConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new SingleServerConfiguration("X00-RG", "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E32ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP-HA", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + })) + { + IsSecondaryIPEnabled = true, + DatabaseType = SapDatabaseType.HANA, + }, + SoftwareConfiguration = new ExternalInstallationSoftwareConfiguration + { + CentralServerVmId = "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0", + }, + OSSapConfiguration = new OSSapConfiguration + { + SapFqdn = "xyz.test.com", + }, + }), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateInfrastructureOnlyForDistributedSystem() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraDS.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.Prod, SapProductType.S4HANA, new DeploymentConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new ThreeTierConfiguration("X00-RG", new CentralServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E16ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshPublicKeys = {new SshPublicKey +{ +KeyData = "ssh-rsa public key", +}}, + }, + }), 1L), new ApplicationServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E32ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshPublicKeys = {new SshPublicKey +{ +KeyData = "ssh-rsa public key", +}}, + }, + }), 6L), new DatabaseConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", new VirtualMachineConfiguration("Standard_M32ts", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshPublicKeys = {new SshPublicKey +{ +KeyData = "ssh-rsa public key", +}}, + }, + }), 1L) + { + DatabaseType = SapDatabaseType.HANA, + }), + }), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateInfrastructureWithDiskAndOSConfigurationForDistributedSystemRecommended() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraDiskOsDSRecommended.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.Prod, SapProductType.S4HANA, new DeploymentWithOSConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new ThreeTierConfiguration("X00-RG", new CentralServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E16ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 1L), new ApplicationServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E32ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 6L), new DatabaseConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", new VirtualMachineConfiguration("Standard_M32ts", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 1L) + { + DatabaseType = SapDatabaseType.HANA, + DiskVolumeConfigurations = +{ +["backup"] = new DiskVolumeConfiguration +{ +Count = 2L, +SizeGB = 256L, +SkuName = DiskSkuName.StandardSSDLRS, +}, +["hana/data"] = new DiskVolumeConfiguration +{ +Count = 4L, +SizeGB = 128L, +SkuName = DiskSkuName.PremiumLRS, +}, +["hana/log"] = new DiskVolumeConfiguration +{ +Count = 3L, +SizeGB = 128L, +SkuName = DiskSkuName.PremiumLRS, +}, +["hana/shared"] = new DiskVolumeConfiguration +{ +Count = 1L, +SizeGB = 256L, +SkuName = DiskSkuName.StandardSSDLRS, +}, +["os"] = new DiskVolumeConfiguration +{ +Count = 1L, +SizeGB = 64L, +SkuName = DiskSkuName.StandardSSDLRS, +}, +["usr/sap"] = new DiskVolumeConfiguration +{ +Count = 1L, +SizeGB = 128L, +SkuName = DiskSkuName.PremiumLRS, +} +}, + }), + OSSapConfiguration = new OSSapConfiguration + { + SapFqdn = "xyz.test.com", + }, + }), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateInfrastructureWithDiskAndOSConfigurationForHASystemWithAvailabilitySetRecommended() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraDiskOsHaAvailabilitySetRecommended.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.Prod, SapProductType.S4HANA, new DeploymentWithOSConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new ThreeTierConfiguration("X00-RG", new CentralServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E16ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 2L), new ApplicationServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E32ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 6L), new DatabaseConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", new VirtualMachineConfiguration("Standard_M32ts", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 2L) + { + DatabaseType = SapDatabaseType.HANA, + DiskVolumeConfigurations = +{ +["backup"] = new DiskVolumeConfiguration +{ +Count = 2L, +SizeGB = 256L, +SkuName = DiskSkuName.StandardSSDLRS, +}, +["hana/data"] = new DiskVolumeConfiguration +{ +Count = 4L, +SizeGB = 128L, +SkuName = DiskSkuName.PremiumLRS, +}, +["hana/log"] = new DiskVolumeConfiguration +{ +Count = 3L, +SizeGB = 128L, +SkuName = DiskSkuName.PremiumLRS, +}, +["hana/shared"] = new DiskVolumeConfiguration +{ +Count = 1L, +SizeGB = 256L, +SkuName = DiskSkuName.StandardSSDLRS, +}, +["os"] = new DiskVolumeConfiguration +{ +Count = 1L, +SizeGB = 64L, +SkuName = DiskSkuName.StandardSSDLRS, +}, +["usr/sap"] = new DiskVolumeConfiguration +{ +Count = 1L, +SizeGB = 128L, +SkuName = DiskSkuName.PremiumLRS, +} +}, + }) + { + HighAvailabilityType = SapHighAvailabilityType.AvailabilitySet, + }, + OSSapConfiguration = new OSSapConfiguration + { + SapFqdn = "xyz.test.com", + }, + }), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateInfrastructureWithDiskAndOSConfigurationForHASystemWithAvailabilityZoneRecommended() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraDiskOsHaAvailabilityZoneRecommended.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.Prod, SapProductType.S4HANA, new DeploymentWithOSConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new ThreeTierConfiguration("X00-RG", new CentralServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E16ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 2L), new ApplicationServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E32ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 6L), new DatabaseConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", new VirtualMachineConfiguration("Standard_M32ts", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 2L) + { + DatabaseType = SapDatabaseType.HANA, + DiskVolumeConfigurations = +{ +["backup"] = new DiskVolumeConfiguration +{ +Count = 2L, +SizeGB = 256L, +SkuName = DiskSkuName.StandardSSDLRS, +}, +["hana/data"] = new DiskVolumeConfiguration +{ +Count = 4L, +SizeGB = 128L, +SkuName = DiskSkuName.PremiumLRS, +}, +["hana/log"] = new DiskVolumeConfiguration +{ +Count = 3L, +SizeGB = 128L, +SkuName = DiskSkuName.PremiumLRS, +}, +["hana/shared"] = new DiskVolumeConfiguration +{ +Count = 1L, +SizeGB = 256L, +SkuName = DiskSkuName.StandardSSDLRS, +}, +["os"] = new DiskVolumeConfiguration +{ +Count = 1L, +SizeGB = 64L, +SkuName = DiskSkuName.StandardSSDLRS, +}, +["usr/sap"] = new DiskVolumeConfiguration +{ +Count = 1L, +SizeGB = 128L, +SkuName = DiskSkuName.PremiumLRS, +} +}, + }) + { + HighAvailabilityType = SapHighAvailabilityType.AvailabilityZone, + }, + OSSapConfiguration = new OSSapConfiguration + { + SapFqdn = "xyz.test.com", + }, + }), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateInfrastructureWithDiskAndOSConfigurationsForSingleServerSystemRecommended() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraDiskOsSingleServerRecommended.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.NonProd, SapProductType.S4HANA, new DeploymentWithOSConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new SingleServerConfiguration("X00-RG", "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/dindurkhya-e2etesting/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E32ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + })) + { + IsSecondaryIPEnabled = true, + DatabaseType = SapDatabaseType.HANA, + DiskVolumeConfigurations = +{ +["backup"] = new DiskVolumeConfiguration +{ +Count = 2L, +SizeGB = 256L, +SkuName = DiskSkuName.StandardSSDLRS, +}, +["hana/data"] = new DiskVolumeConfiguration +{ +Count = 4L, +SizeGB = 128L, +SkuName = DiskSkuName.PremiumLRS, +}, +["hana/log"] = new DiskVolumeConfiguration +{ +Count = 3L, +SizeGB = 128L, +SkuName = DiskSkuName.PremiumLRS, +}, +["hana/shared"] = new DiskVolumeConfiguration +{ +Count = 1L, +SizeGB = 256L, +SkuName = DiskSkuName.StandardSSDLRS, +}, +["os"] = new DiskVolumeConfiguration +{ +Count = 1L, +SizeGB = 64L, +SkuName = DiskSkuName.StandardSSDLRS, +}, +["usr/sap"] = new DiskVolumeConfiguration +{ +Count = 1L, +SizeGB = 128L, +SkuName = DiskSkuName.PremiumLRS, +} +}, + }, + OSSapConfiguration = new OSSapConfiguration + { + SapFqdn = "xyz.test.com", + }, + }), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateInfrastructureOnlyForHASystemWithAvailabilitySet() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraHaAvailabilitySet.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.Prod, SapProductType.S4HANA, new DeploymentConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new ThreeTierConfiguration("X00-RG", new CentralServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E16ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshPublicKeys = {new SshPublicKey +{ +KeyData = "ssh-rsa public key", +}}, + }, + }), 2L), new ApplicationServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E32ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshPublicKeys = {new SshPublicKey +{ +KeyData = "ssh-rsa public key", +}}, + }, + }), 5L), new DatabaseConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", new VirtualMachineConfiguration("Standard_M32ts", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshPublicKeys = {new SshPublicKey +{ +KeyData = "ssh-rsa public key", +}}, + }, + }), 2L) + { + DatabaseType = SapDatabaseType.HANA, + }) + { + HighAvailabilityType = SapHighAvailabilityType.AvailabilitySet, + }, + }), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateInfrastructureOnlyForHASystemWithAvailabilityZone() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraHaAvailabilityZone.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.Prod, SapProductType.S4HANA, new DeploymentConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new ThreeTierConfiguration("X00-RG", new CentralServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E16ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshPublicKeys = {new SshPublicKey +{ +KeyData = "ssh-rsa public key", +}}, + }, + }), 2L), new ApplicationServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E32ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshPublicKeys = {new SshPublicKey +{ +KeyData = "ssh-rsa public key", +}}, + }, + }), 6L), new DatabaseConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", new VirtualMachineConfiguration("Standard_M32ts", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshPublicKeys = {new SshPublicKey +{ +KeyData = "ssh-rsa public key", +}}, + }, + }), 2L) + { + DatabaseType = SapDatabaseType.HANA, + }) + { + HighAvailabilityType = SapHighAvailabilityType.AvailabilityZone, + }, + }), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateInfrastructureWithOSConfigurationWithAzureComputeGalleryImage() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraOsComputeGalleryImage.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.Prod, SapProductType.S4HANA, new DeploymentConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new ThreeTierConfiguration("X00-RG", new CentralServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E16ds_v4", new ImageReference + { + Id = new ResourceIdentifier("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/galleries/testgallery/images/rhelimagetest/versions/0.0.1"), + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshPublicKeys = {new SshPublicKey +{ +KeyData = "ssh-rsa public key", +}}, + }, + }), 2L), new ApplicationServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E32ds_v4", new ImageReference + { + Id = new ResourceIdentifier("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/galleries/testgallery/images/rhelimagetest/versions/0.0.1"), + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshPublicKeys = {new SshPublicKey +{ +KeyData = "ssh-rsa public key", +}}, + }, + }), 6L), new DatabaseConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", new VirtualMachineConfiguration("Standard_M32ts", new ImageReference + { + Id = new ResourceIdentifier("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Compute/galleries/testgallery/images/rhelimagetest/versions/0.0.1"), + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshPublicKeys = {new SshPublicKey +{ +KeyData = "ssh-rsa public key", +}}, + }, + }), 2L) + { + DatabaseType = SapDatabaseType.HANA, + }) + { + HighAvailabilityType = SapHighAvailabilityType.AvailabilityZone, + }, + }), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateInfrastructureWithOSConfigurationWithCustomResourceNamesForDistributedSystem() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraOsCustomResourceNamesDS.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.Prod, SapProductType.S4HANA, new DeploymentWithOSConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new ThreeTierConfiguration("X00-RG", new CentralServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E16ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 1L), new ApplicationServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E32ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 6L), new DatabaseConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", new VirtualMachineConfiguration("Standard_M32ts", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 1L) + { + DatabaseType = SapDatabaseType.HANA, + }) + { + CustomResourceNames = new ThreeTierFullResourceNames + { + CentralServer = new CentralServerFullResourceNames + { + VirtualMachines = {new VirtualMachineResourceNames +{ +VmName = "ascsvm", +HostName = "ascshostName", +NetworkInterfaces = {new NetworkInterfaceResourceNames +{ +NetworkInterfaceName = "ascsnic", +}}, +OSDiskName = "ascsosdisk", +DataDiskNames = +{ +["default"] = new string[]{"ascsdisk0"} +}, +}}, + }, + ApplicationServer = new ApplicationServerFullResourceNames + { + VirtualMachines = {new VirtualMachineResourceNames +{ +VmName = "appvm0", +HostName = "apphostName0", +NetworkInterfaces = {new NetworkInterfaceResourceNames +{ +NetworkInterfaceName = "appnic0", +}}, +OSDiskName = "app0osdisk", +DataDiskNames = +{ +["default"] = new string[]{"app0disk0"} +}, +}, new VirtualMachineResourceNames +{ +VmName = "appvm1", +HostName = "apphostName1", +NetworkInterfaces = {new NetworkInterfaceResourceNames +{ +NetworkInterfaceName = "appnic1", +}}, +OSDiskName = "app1osdisk", +DataDiskNames = +{ +["default"] = new string[]{"app1disk0"} +}, +}}, + AvailabilitySetName = "appAvSet", + }, + DatabaseServer = new DatabaseServerFullResourceNames + { + VirtualMachines = {new VirtualMachineResourceNames +{ +VmName = "dbvm", +HostName = "dbhostName", +NetworkInterfaces = {new NetworkInterfaceResourceNames +{ +NetworkInterfaceName = "dbnic", +}}, +OSDiskName = "dbosdisk", +DataDiskNames = +{ +["hanaData"] = new string[]{"hanadata0", "hanadata1"}, +["hanaLog"] = new string[]{"hanalog0", "hanalog1", "hanalog2"}, +["hanaShared"] = new string[]{"hanashared0", "hanashared1"}, +["usrSap"] = new string[]{"usrsap0"} +}, +}}, + }, + SharedStorage = new SharedStorageResourceNames + { + SharedStorageAccountName = "storageacc", + SharedStorageAccountPrivateEndPointName = "peForxNFS", + }, + }, + }, + OSSapConfiguration = new OSSapConfiguration + { + SapFqdn = "xyz.test.com", + }, + }), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateInfrastructureWithOSConfigurationWithCustomResourceNamesForHASystemWithAvailabilitySet() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraOsCustomResourceNamesHaAvailabilitySet.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.Prod, SapProductType.S4HANA, new DeploymentWithOSConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new ThreeTierConfiguration("X00-RG", new CentralServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E16ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 2L), new ApplicationServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E32ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 6L), new DatabaseConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", new VirtualMachineConfiguration("Standard_M32ts", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 2L) + { + DatabaseType = SapDatabaseType.HANA, + }) + { + HighAvailabilityType = SapHighAvailabilityType.AvailabilitySet, + CustomResourceNames = new ThreeTierFullResourceNames + { + CentralServer = new CentralServerFullResourceNames + { + VirtualMachines = {new VirtualMachineResourceNames +{ +VmName = "ascsvm", +HostName = "ascshostName", +NetworkInterfaces = {new NetworkInterfaceResourceNames +{ +NetworkInterfaceName = "ascsnic", +}}, +OSDiskName = "ascsosdisk", +}, new VirtualMachineResourceNames +{ +VmName = "ersvm", +HostName = "ershostName", +NetworkInterfaces = {new NetworkInterfaceResourceNames +{ +NetworkInterfaceName = "ersnic", +}}, +OSDiskName = "ersosdisk", +}}, + AvailabilitySetName = "csAvSet", + LoadBalancer = new LoadBalancerResourceNames + { + LoadBalancerName = "ascslb", + FrontendIPConfigurationNames = { "ascsip0", "ersip0" }, + BackendPoolNames = { "ascsBackendPool" }, + HealthProbeNames = { "ascsHealthProbe", "ersHealthProbe" }, + }, + }, + ApplicationServer = new ApplicationServerFullResourceNames + { + VirtualMachines = {new VirtualMachineResourceNames +{ +VmName = "appvm0", +HostName = "apphostName0", +NetworkInterfaces = {new NetworkInterfaceResourceNames +{ +NetworkInterfaceName = "appnic0", +}}, +OSDiskName = "app0osdisk", +DataDiskNames = +{ +["default"] = new string[]{"app0disk0"} +}, +}, new VirtualMachineResourceNames +{ +VmName = "appvm1", +HostName = "apphostName1", +NetworkInterfaces = {new NetworkInterfaceResourceNames +{ +NetworkInterfaceName = "appnic1", +}}, +OSDiskName = "app1osdisk", +DataDiskNames = +{ +["default"] = new string[]{"app1disk0"} +}, +}}, + AvailabilitySetName = "appAvSet", + }, + DatabaseServer = new DatabaseServerFullResourceNames + { + VirtualMachines = {new VirtualMachineResourceNames +{ +VmName = "dbvmpr", +HostName = "dbprhostName", +NetworkInterfaces = {new NetworkInterfaceResourceNames +{ +NetworkInterfaceName = "dbprnic", +}}, +OSDiskName = "dbprosdisk", +DataDiskNames = +{ +["hanaData"] = new string[]{"hanadatapr0", "hanadatapr1"}, +["hanaLog"] = new string[]{"hanalogpr0", "hanalogpr1", "hanalogpr2"}, +["hanaShared"] = new string[]{"hanasharedpr0", "hanasharedpr1"}, +["usrSap"] = new string[]{"usrsappr0"} +}, +}, new VirtualMachineResourceNames +{ +VmName = "dbvmsr", +HostName = "dbsrhostName", +NetworkInterfaces = {new NetworkInterfaceResourceNames +{ +NetworkInterfaceName = "dbsrnic", +}}, +OSDiskName = "dbsrosdisk", +DataDiskNames = +{ +["hanaData"] = new string[]{"hanadatasr0", "hanadatasr1"}, +["hanaLog"] = new string[]{"hanalogsr0", "hanalogsr1", "hanalogsr2"}, +["hanaShared"] = new string[]{"hanasharedsr0", "hanasharedsr1"}, +["usrSap"] = new string[]{"usrsapsr0"} +}, +}}, + AvailabilitySetName = "dbAvSet", + LoadBalancer = new LoadBalancerResourceNames + { + LoadBalancerName = "dblb", + FrontendIPConfigurationNames = { "dbip" }, + BackendPoolNames = { "dbBackendPool" }, + HealthProbeNames = { "dbHealthProbe" }, + }, + }, + SharedStorage = new SharedStorageResourceNames + { + SharedStorageAccountName = "storageacc", + SharedStorageAccountPrivateEndPointName = "peForxNFS", + }, + }, + }, + OSSapConfiguration = new OSSapConfiguration + { + SapFqdn = "xyz.test.com", + }, + }), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateInfrastructureWithOSConfigurationWithCustomResourceNamesForHASystemWithAvailabilityZone() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraOsCustomResourceNamesHaAvailabilityZone.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.Prod, SapProductType.S4HANA, new DeploymentWithOSConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new ThreeTierConfiguration("X00-RG", new CentralServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E16ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 2L), new ApplicationServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E32ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 6L), new DatabaseConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", new VirtualMachineConfiguration("Standard_M32ts", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 2L) + { + DatabaseType = SapDatabaseType.HANA, + }) + { + HighAvailabilityType = SapHighAvailabilityType.AvailabilityZone, + CustomResourceNames = new ThreeTierFullResourceNames + { + CentralServer = new CentralServerFullResourceNames + { + VirtualMachines = {new VirtualMachineResourceNames +{ +VmName = "ascsvm", +HostName = "ascshostName", +NetworkInterfaces = {new NetworkInterfaceResourceNames +{ +NetworkInterfaceName = "ascsnic", +}}, +OSDiskName = "ascsosdisk", +}, new VirtualMachineResourceNames +{ +VmName = "ersvm", +HostName = "ershostName", +NetworkInterfaces = {new NetworkInterfaceResourceNames +{ +NetworkInterfaceName = "ersnic", +}}, +OSDiskName = "ersosdisk", +}}, + LoadBalancer = new LoadBalancerResourceNames + { + LoadBalancerName = "ascslb", + FrontendIPConfigurationNames = { "ascsip0", "ersip0" }, + BackendPoolNames = { "ascsBackendPool" }, + HealthProbeNames = { "ascsHealthProbe", "ersHealthProbe" }, + }, + }, + ApplicationServer = new ApplicationServerFullResourceNames + { + VirtualMachines = {new VirtualMachineResourceNames +{ +VmName = "appvm0", +HostName = "apphostName0", +NetworkInterfaces = {new NetworkInterfaceResourceNames +{ +NetworkInterfaceName = "appnic0", +}}, +OSDiskName = "app0osdisk", +DataDiskNames = +{ +["default"] = new string[]{"app0disk0"} +}, +}, new VirtualMachineResourceNames +{ +VmName = "appvm1", +HostName = "apphostName1", +NetworkInterfaces = {new NetworkInterfaceResourceNames +{ +NetworkInterfaceName = "appnic1", +}}, +OSDiskName = "app1osdisk", +DataDiskNames = +{ +["default"] = new string[]{"app1disk0"} +}, +}}, + }, + DatabaseServer = new DatabaseServerFullResourceNames + { + VirtualMachines = {new VirtualMachineResourceNames +{ +VmName = "dbvmpr", +HostName = "dbprhostName", +NetworkInterfaces = {new NetworkInterfaceResourceNames +{ +NetworkInterfaceName = "dbprnic", +}}, +OSDiskName = "dbprosdisk", +DataDiskNames = +{ +["hanaData"] = new string[]{"hanadatapr0", "hanadatapr1"}, +["hanaLog"] = new string[]{"hanalogpr0", "hanalogpr1", "hanalogpr2"}, +["hanaShared"] = new string[]{"hanasharedpr0", "hanasharedpr1"}, +["usrSap"] = new string[]{"usrsappr0"} +}, +}, new VirtualMachineResourceNames +{ +VmName = "dbvmsr", +HostName = "dbsrhostName", +NetworkInterfaces = {new NetworkInterfaceResourceNames +{ +NetworkInterfaceName = "dbsrnic", +}}, +OSDiskName = "dbsrosdisk", +DataDiskNames = +{ +["hanaData"] = new string[]{"hanadatasr0", "hanadatasr1"}, +["hanaLog"] = new string[]{"hanalogsr0", "hanalogsr1", "hanalogsr2"}, +["hanaShared"] = new string[]{"hanasharedsr0", "hanasharedsr1"}, +["usrSap"] = new string[]{"usrsapsr0"} +}, +}}, + LoadBalancer = new LoadBalancerResourceNames + { + LoadBalancerName = "dblb", + FrontendIPConfigurationNames = { "dbip" }, + BackendPoolNames = { "dbBackendPool" }, + HealthProbeNames = { "dbHealthProbe" }, + }, + }, + SharedStorage = new SharedStorageResourceNames + { + SharedStorageAccountName = "storageacc", + SharedStorageAccountPrivateEndPointName = "peForxNFS", + }, + }, + }, + OSSapConfiguration = new OSSapConfiguration + { + SapFqdn = "xyz.test.com", + }, + }), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateInfrastructureWithOSConfigurationWithCustomResourceNamesForSingleServerSystem() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraOsCustomResourceNamesSingleServer.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.NonProd, SapProductType.S4HANA, new DeploymentWithOSConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new SingleServerConfiguration("X00-RG", "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E32ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + })) + { + IsSecondaryIPEnabled = true, + DatabaseType = SapDatabaseType.HANA, + }, + OSSapConfiguration = new OSSapConfiguration + { + SapFqdn = "xyz.test.com", + }, + }), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateInfrastructureWithOSConfigurationForDistributedSystemRecommended() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraOsDSRecommended.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.Prod, SapProductType.S4HANA, new DeploymentWithOSConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new ThreeTierConfiguration("X00-RG", new CentralServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E16ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 1L), new ApplicationServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E32ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 6L), new DatabaseConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", new VirtualMachineConfiguration("Standard_M32ts", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 1L) + { + DatabaseType = SapDatabaseType.HANA, + }), + OSSapConfiguration = new OSSapConfiguration + { + SapFqdn = "xyz.test.com", + }, + }), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateInfrastructureWithOSConfigurationForHASystemWithAvailabilitySetRecommended() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraOsHaAvailabilitySetRecommended.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.Prod, SapProductType.S4HANA, new DeploymentWithOSConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new ThreeTierConfiguration("X00-RG", new CentralServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E16ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 2L), new ApplicationServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E32ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 6L), new DatabaseConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", new VirtualMachineConfiguration("Standard_M32ts", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 2L) + { + DatabaseType = SapDatabaseType.HANA, + }) + { + HighAvailabilityType = SapHighAvailabilityType.AvailabilitySet, + }, + OSSapConfiguration = new OSSapConfiguration + { + SapFqdn = "xyz.test.com", + }, + }), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateInfrastructureWithOSConfigurationForHASystemWithAvailabilityZoneRecommended() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraOsHaAvailabilityZoneRecommended.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.Prod, SapProductType.S4HANA, new DeploymentWithOSConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new ThreeTierConfiguration("X00-RG", new CentralServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E16ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 2L), new ApplicationServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E32ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 6L), new DatabaseConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", new VirtualMachineConfiguration("Standard_M32ts", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 2L) + { + DatabaseType = SapDatabaseType.HANA, + }) + { + HighAvailabilityType = SapHighAvailabilityType.AvailabilityZone, + }, + OSSapConfiguration = new OSSapConfiguration + { + SapFqdn = "xyz.test.com", + }, + }), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateInfrastructureWithOSConfigurationForSingleServerSystemRecommended() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraOsSIngleServerRecommended.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.NonProd, SapProductType.S4HANA, new DeploymentWithOSConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new SingleServerConfiguration("X00-RG", "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E32ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + })) + { + IsSecondaryIPEnabled = true, + DatabaseType = SapDatabaseType.HANA, + }, + OSSapConfiguration = new OSSapConfiguration + { + SapFqdn = "xyz.test.com", + }, + }), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateInfrastructureOnlyForSingleServerSystem() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraSingleServer.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.NonProd, SapProductType.S4HANA, new DeploymentConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new SingleServerConfiguration("X00-RG", "/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E32ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshPublicKeys = {new SshPublicKey +{ +KeyData = "ssh-rsa public key", +}}, + }, + })) + { + IsSecondaryIPEnabled = true, + DatabaseType = SapDatabaseType.HANA, + }, + }), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateInfrastructureWithAnExistingSAPTransportDirectoryFileshare() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraWithExistingFileshare.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.Prod, SapProductType.S4HANA, new DeploymentWithOSConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new ThreeTierConfiguration("X00-RG", new CentralServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E16ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 1L), new ApplicationServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E32ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 6L), new DatabaseConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", new VirtualMachineConfiguration("Standard_M32ts", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 1L) + { + DatabaseType = SapDatabaseType.HANA, + }) + { + StorageTransportFileShareConfiguration = new MountFileShareConfiguration("/subscriptions/49d64d54-e888-4c46-a868-1936802b762c/resourceGroups/testrg/providers/Microsoft.Network/privateEndpoints/endpoint", "/subscriptions/49d64d54-e888-4c46-a868-1936802b762c/resourceGroups/testrg/providers/Microsoft.Network/privateEndpoints/endpoint"), + }, + OSSapConfiguration = new OSSapConfiguration + { + SapFqdn = "xyz.test.com", + }, + }), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateInfrastructureWithANewSAPTransportDirectoryFileshare() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraWithNewFileshare.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.Prod, SapProductType.S4HANA, new DeploymentWithOSConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new ThreeTierConfiguration("X00-RG", new CentralServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E16ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 1L), new ApplicationServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E32ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 6L), new DatabaseConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", new VirtualMachineConfiguration("Standard_M32ts", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 1L) + { + DatabaseType = SapDatabaseType.HANA, + }) + { + StorageTransportFileShareConfiguration = new CreateAndMountFileShareConfiguration + { + ResourceGroup = "rgName", + StorageAccountName = "storageName", + }, + }, + OSSapConfiguration = new OSSapConfiguration + { + SapFqdn = "xyz.test.com", + }, + }), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateInfrastructureWithOSConfigurationWithTrustedAccessEnabled() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraWithOsTrustedAccess.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.Prod, SapProductType.S4HANA, new DeploymentWithOSConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new ThreeTierConfiguration("X00-RG", new CentralServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E16ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 1L), new ApplicationServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E32ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 6L), new DatabaseConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", new VirtualMachineConfiguration("Standard_M32ts", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 1L) + { + DatabaseType = SapDatabaseType.HANA, + }), + OSSapConfiguration = new OSSapConfiguration + { + SapFqdn = "xyz.test.com", + }, + }) + { + ManagedResourcesNetworkAccessType = ManagedResourcesNetworkAccessType.Private, + }, + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreateInfrastructureWithoutASAPTransportDirectoryFileshare() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraWithoutFileshare.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.Prod, SapProductType.S4HANA, new DeploymentWithOSConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new ThreeTierConfiguration("X00-RG", new CentralServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E16ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 1L), new ApplicationServerConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/appsubnet", new VirtualMachineConfiguration("Standard_E32ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 6L), new DatabaseConfiguration("/subscriptions/49d64d54-e966-4c46-a868-1999802b762c/resourceGroups/test-rg/providers/Microsoft.Networks/virtualNetworks/test-vnet/subnets/dbsubnet", new VirtualMachineConfiguration("Standard_M32ts", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP", + Sku = "84sapha-gen2", + Version = "latest", + }, new OSProfile + { + AdminUsername = "{your-username}", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "abc", + PrivateKey = "xyz", + }, + }, + }), 1L) + { + DatabaseType = SapDatabaseType.HANA, + }) + { + StorageTransportFileShareConfiguration = new SkipFileShareConfiguration(), + }, + OSSapConfiguration = new OSSapConfiguration + { + SapFqdn = "xyz.test.com", + }, + }), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_InstallSAPSoftwareOnDistributedSystem() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInstallDS.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("eastus2")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.Prod, SapProductType.S4HANA, new DeploymentWithOSConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new ThreeTierConfiguration("{{resourcegrp}}", new CentralServerConfiguration("/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/app", new VirtualMachineConfiguration("Standard_E4ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP-HA", + Sku = "8.2", + Version = "8.2.2021091201", + }, new OSProfile + { + AdminUsername = "azureuser", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "{{sshkey}}", + PrivateKey = "{{privateKey}}", + }, + }, + }), 1L), new ApplicationServerConfiguration("/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/app", new VirtualMachineConfiguration("Standard_E4ds_v4", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP-HA", + Sku = "8.2", + Version = "8.2.2021091201", + }, new OSProfile + { + AdminUsername = "azureuser", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "{{sshkey}}", + PrivateKey = "{{privateKey}}", + }, + }, + }), 2L), new DatabaseConfiguration("/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/app", new VirtualMachineConfiguration("Standard_M32ts", new ImageReference + { + Publisher = "RedHat", + Offer = "RHEL-SAP-HA", + Sku = "8.2", + Version = "8.2.2021091201", + }, new OSProfile + { + AdminUsername = "azureuser", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "{{sshkey}}", + PrivateKey = "{{privateKey}}", + }, + }, + }), 1L)) + { + IsSecondaryIPEnabled = true, + }, + SoftwareConfiguration = new SapInstallWithoutOSConfigSoftwareConfiguration("https://teststorageaccount.blob.core.windows.net/sapbits/sapfiles/boms/S41909SPS03_v0011ms/S41909SPS03_v0011ms.yaml", "/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Storage/storageAccounts/teststorageaccount", "SAP S/4HANA 1909 SPS 03"), + OSSapConfiguration = new OSSapConfiguration + { + SapFqdn = "sap.bpaas.com", + }, + }), + Tags = +{ +["created by"] = "azureuser" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_InstallSAPSoftwareOnSingleServerSystem() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInstallSingleServer.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("eastus2")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.NonProd, SapProductType.S4HANA, new DeploymentWithOSConfiguration + { + AppLocation = "eastus", + InfrastructureConfiguration = new SingleServerConfiguration("test-rg", "/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/testsubnet", new VirtualMachineConfiguration("Standard_E32ds_v4", new ImageReference + { + Publisher = "SUSE", + Offer = "SLES-SAP", + Sku = "12-sp4-gen2", + Version = "2022.02.01", + }, new OSProfile + { + AdminUsername = "azureappadmin", + OSConfiguration = new LinuxConfiguration + { + DisablePasswordAuthentication = true, + SshKeyPair = new SshKeyPair + { + PublicKey = "{{sshkey}}", + PrivateKey = "{{privateKey}}", + }, + }, + })), + SoftwareConfiguration = new SapInstallWithoutOSConfigSoftwareConfiguration("https://teststorageaccount.blob.core.windows.net/sapbits/sapfiles/boms/S41909SPS03_v0011ms/S41909SPS03_v0011ms.yaml", "/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Storage/storageAccounts/teststorageaccount", "SAP S/4HANA 1909 SPS 03"), + OSSapConfiguration = new OSSapConfiguration + { + SapFqdn = "sap.bpaas.com", + }, + }), + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_RegisterExistingSAPSystemAsVirtualInstanceForSAPSolutions() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateRegisterSapSolutions.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("northeurope")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.NonProd, SapProductType.S4HANA, new DiscoveryConfiguration + { + CentralServerVmId = "/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0", + }), + Tags = +{ +["createdby"] = "abc@microsoft.com", +["test"] = "abc" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_RegisterExistingSAPSystemAsVirtualInstanceForSAPSolutionsWithOptionalCustomizations() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateRegisterSapSolutionsCustom.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("northeurope")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.NonProd, SapProductType.S4HANA, new DiscoveryConfiguration + { + CentralServerVmId = "/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0", + ManagedRgStorageAccountName = "q20saacssgrs", + }), + Tags = +{ +["createdby"] = "abc@microsoft.com", +["test"] = "abc" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_RegisterWithTrustedAccessEnabled() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateRegisterWithTrustedAccess.json + // this example is just showing the usage of "SAPVirtualInstance_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("northeurope")) + { + Properties = new SapVirtualInstanceProperties(SapEnvironmentType.NonProd, SapProductType.S4HANA, new DiscoveryConfiguration + { + CentralServerVmId = "/subscriptions/8e17e36c-42e9-4cd5-a078-7b44883414e0/resourceGroups/test-rg/providers/Microsoft.Compute/virtualMachines/sapq20scsvm0", + }) + { + ManagedResourcesNetworkAccessType = ManagedResourcesNetworkAccessType.Private, + }, + Tags = +{ +["createdby"] = "abc@microsoft.com", +["test"] = "abc" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_SAPVirtualInstancesGet() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_Get.json + // this example is just showing the usage of "SAPVirtualInstance_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceResource result = await collection.GetAsync(sapVirtualInstanceName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_SAPVirtualInstancesGetWithACSSInstallationBlocked() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_GetAcssInstallationBlocked.json + // this example is just showing the usage of "SAPVirtualInstance_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + SapVirtualInstanceResource result = await collection.GetAsync(sapVirtualInstanceName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_SAPVirtualInstancesListByResourceGroup() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_ListByResourceGroup.json + // this example is just showing the usage of "SAPVirtualInstance_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation and iterate over the result + await foreach (SapVirtualInstanceResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_SAPVirtualInstancesGet() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_Get.json + // this example is just showing the usage of "SAPVirtualInstance_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + bool result = await collection.ExistsAsync(sapVirtualInstanceName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_SAPVirtualInstancesGetWithACSSInstallationBlocked() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_GetAcssInstallationBlocked.json + // this example is just showing the usage of "SAPVirtualInstance_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + bool result = await collection.ExistsAsync(sapVirtualInstanceName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_SAPVirtualInstancesGet() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_Get.json + // this example is just showing the usage of "SAPVirtualInstance_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + NullableResponse response = await collection.GetIfExistsAsync(sapVirtualInstanceName); + SapVirtualInstanceResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_SAPVirtualInstancesGetWithACSSInstallationBlocked() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_GetAcssInstallationBlocked.json + // this example is just showing the usage of "SAPVirtualInstance_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SapVirtualInstanceResource + SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances(); + + // invoke the operation + string sapVirtualInstanceName = "X00"; + NullableResponse response = await collection.GetIfExistsAsync(sapVirtualInstanceName); + SapVirtualInstanceResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapVirtualInstanceResource.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapVirtualInstanceResource.cs new file mode 100644 index 000000000000..e9b0f6980c31 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SapVirtualInstanceResource.cs @@ -0,0 +1,372 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.SapVirtualInstances.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.SapVirtualInstances.Samples +{ + public partial class Sample_SapVirtualInstanceResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_SAPVirtualInstancesGet() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_Get.json + // this example is just showing the usage of "SAPVirtualInstance_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // invoke the operation + SapVirtualInstanceResource result = await sapVirtualInstance.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_SAPVirtualInstancesGetWithACSSInstallationBlocked() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_GetAcssInstallationBlocked.json + // this example is just showing the usage of "SAPVirtualInstance_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // invoke the operation + SapVirtualInstanceResource result = await sapVirtualInstance.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_SAPVirtualInstancesDelete() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_Delete.json + // this example is just showing the usage of "SAPVirtualInstance_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // invoke the operation + await sapVirtualInstance.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_SAPVirtualInstancesUpdate() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_Update.json + // this example is just showing the usage of "SAPVirtualInstance_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // invoke the operation + SapVirtualInstancePatch patch = new SapVirtualInstancePatch + { + Tags = +{ +["key1"] = "svi1" +}, + Identity = new SAPVirtualInstanceIdentity(SAPVirtualInstanceIdentityType.None), + }; + ArmOperation lro = await sapVirtualInstance.UpdateAsync(WaitUntil.Completed, patch); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_SAPVirtualInstancesTrustedAccessEnableUpdate() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_UpdateTrustedAccess.json + // this example is just showing the usage of "SAPVirtualInstance_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // invoke the operation + SapVirtualInstancePatch patch = new SapVirtualInstancePatch + { + Tags = +{ +["key1"] = "svi1" +}, + Identity = new SAPVirtualInstanceIdentity(SAPVirtualInstanceIdentityType.None), + UpdateSapVirtualInstanceManagedResourcesNetworkAccessType = ManagedResourcesNetworkAccessType.Private, + }; + ArmOperation lro = await sapVirtualInstance.UpdateAsync(WaitUntil.Completed, patch); + SapVirtualInstanceResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Start_SAPVirtualInstancesStart() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_Start.json + // this example is just showing the usage of "SAPVirtualInstances_Start" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // invoke the operation + StartContent content = new StartContent + { + StartVm = true, + }; + ArmOperation lro = await sapVirtualInstance.StartAsync(WaitUntil.Completed, content: content); + OperationStatusResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Start_SAPVirtualInstancesStartWithInfraOperations() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_StartWithInfraOperations.json + // this example is just showing the usage of "SAPVirtualInstances_Start" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // invoke the operation + StartContent content = new StartContent + { + StartVm = true, + }; + ArmOperation lro = await sapVirtualInstance.StartAsync(WaitUntil.Completed, content: content); + OperationStatusResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Stop_SoftStopOfSapVirtualInstancesStop() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_SoftStop.json + // this example is just showing the usage of "SAPVirtualInstances_Stop" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // invoke the operation + StopContent content = new StopContent + { + SoftStopTimeoutSeconds = 300L, + }; + ArmOperation lro = await sapVirtualInstance.StopAsync(WaitUntil.Completed, content: content); + OperationStatusResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Stop_SoftStopTheVirtualMachineSAndTheSAPSystemOnIt() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_SoftStopVMAndSystem.json + // this example is just showing the usage of "SAPVirtualInstances_Stop" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // invoke the operation + StopContent content = new StopContent + { + SoftStopTimeoutSeconds = 300L, + DeallocateVm = true, + }; + ArmOperation lro = await sapVirtualInstance.StopAsync(WaitUntil.Completed, content: content); + OperationStatusResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Stop_SAPVirtualInstancesStop() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_Stop.json + // this example is just showing the usage of "SAPVirtualInstances_Stop" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // invoke the operation + StopContent content = new StopContent + { + SoftStopTimeoutSeconds = 0L, + }; + ArmOperation lro = await sapVirtualInstance.StopAsync(WaitUntil.Completed, content: content); + OperationStatusResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Stop_StopTheVirtualMachineSAndTheSAPSystemOnIt() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_StopVMAndSystem.json + // this example is just showing the usage of "SAPVirtualInstances_Stop" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SapVirtualInstanceResource created on azure + // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + string resourceGroupName = "test-rg"; + string sapVirtualInstanceName = "X00"; + ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName); + SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId); + + // invoke the operation + StopContent content = new StopContent + { + SoftStopTimeoutSeconds = 0L, + DeallocateVm = true, + }; + ArmOperation lro = await sapVirtualInstance.StopAsync(WaitUntil.Completed, content: content); + OperationStatusResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs new file mode 100644 index 000000000000..69c4c67630cd --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -0,0 +1,423 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.Resources; +using Azure.ResourceManager.SapVirtualInstances.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.SapVirtualInstances.Samples +{ + public partial class Sample_SubscriptionResourceExtensions + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetSapVirtualInstances_SAPVirtualInstancesListBySubscription() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_ListBySubscription.json + // this example is just showing the usage of "SAPVirtualInstance_ListBySubscription" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + await foreach (SapVirtualInstanceResource item in subscriptionResource.GetSapVirtualInstancesAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SapVirtualInstanceData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetSizingRecommendationsSapVirtualInstance_SAPSizingRecommendationsForNonHADistributedSystem() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_InvokeSizingRecommendations_S4HANA_Distributed.json + // this example is just showing the usage of "SAPVirtualInstances_GetSizingRecommendations" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation + AzureLocation location = new AzureLocation("centralus"); + SapSizingRecommendationContent content = new SapSizingRecommendationContent( + "eastus", + SapEnvironmentType.Prod, + SapProductType.S4HANA, + SapDeploymentType.ThreeTier, + 20000L, + 1024L, + SapDatabaseType.HANA) + { + DbScaleMethod = SapDatabaseScaleMethod.ScaleUp, + }; + SapSizingRecommendationResult result = await subscriptionResource.GetSizingRecommendationsSapVirtualInstanceAsync(location, content); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetSizingRecommendationsSapVirtualInstance_SAPSizingRecommendationsForHAWithAvailabilitySet() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_InvokeSizingRecommendations_S4HANA_HA_AvSet.json + // this example is just showing the usage of "SAPVirtualInstances_GetSizingRecommendations" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation + AzureLocation location = new AzureLocation("centralus"); + SapSizingRecommendationContent content = new SapSizingRecommendationContent( + "eastus", + SapEnvironmentType.Prod, + SapProductType.S4HANA, + SapDeploymentType.ThreeTier, + 75000L, + 1024L, + SapDatabaseType.HANA) + { + DbScaleMethod = SapDatabaseScaleMethod.ScaleUp, + HighAvailabilityType = SapHighAvailabilityType.AvailabilitySet, + }; + SapSizingRecommendationResult result = await subscriptionResource.GetSizingRecommendationsSapVirtualInstanceAsync(location, content); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetSizingRecommendationsSapVirtualInstance_SAPSizingRecommendationsForHAWithAvailabilityZone() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_InvokeSizingRecommendations_S4HANA_HA_AvZone.json + // this example is just showing the usage of "SAPVirtualInstances_GetSizingRecommendations" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation + AzureLocation location = new AzureLocation("centralus"); + SapSizingRecommendationContent content = new SapSizingRecommendationContent( + "eastus", + SapEnvironmentType.Prod, + SapProductType.S4HANA, + SapDeploymentType.ThreeTier, + 75000L, + 1024L, + SapDatabaseType.HANA) + { + DbScaleMethod = SapDatabaseScaleMethod.ScaleUp, + HighAvailabilityType = SapHighAvailabilityType.AvailabilityZone, + }; + SapSizingRecommendationResult result = await subscriptionResource.GetSizingRecommendationsSapVirtualInstanceAsync(location, content); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetSizingRecommendationsSapVirtualInstance_SAPSizingRecommendationsForSingleServer() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_InvokeSizingRecommendations_S4HANA_SingleServer.json + // this example is just showing the usage of "SAPVirtualInstances_GetSizingRecommendations" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation + AzureLocation location = new AzureLocation("centralus"); + SapSizingRecommendationContent content = new SapSizingRecommendationContent( + "eastus", + SapEnvironmentType.NonProd, + SapProductType.S4HANA, + SapDeploymentType.SingleServer, + 60000L, + 2000L, + SapDatabaseType.HANA) + { + DbScaleMethod = SapDatabaseScaleMethod.ScaleUp, + }; + SapSizingRecommendationResult result = await subscriptionResource.GetSizingRecommendationsSapVirtualInstanceAsync(location, content); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetSapSupportedSkuSapVirtualInstance_SAPSupportedSKUsForDistributedNonHAEnvironment() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_InvokeSapSupportedSku_Distributed.json + // this example is just showing the usage of "SAPVirtualInstances_GetSapSupportedSku" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation + AzureLocation location = new AzureLocation("centralus"); + SapSupportedSkusContent content = new SapSupportedSkusContent("eastus", SapEnvironmentType.Prod, SapProductType.S4HANA, SapDeploymentType.ThreeTier, SapDatabaseType.HANA); + SapSupportedResourceSkusResult result = await subscriptionResource.GetSapSupportedSkuSapVirtualInstanceAsync(location, content); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetSapSupportedSkuSapVirtualInstance_SAPSupportedSKUsForDistributedHAEnvironmentWithAvailabilitySet() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_InvokeSapSupportedSku_DistributedHA_AvSet.json + // this example is just showing the usage of "SAPVirtualInstances_GetSapSupportedSku" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation + AzureLocation location = new AzureLocation("centralus"); + SapSupportedSkusContent content = new SapSupportedSkusContent("eastus", SapEnvironmentType.Prod, SapProductType.S4HANA, SapDeploymentType.ThreeTier, SapDatabaseType.HANA) + { + HighAvailabilityType = SapHighAvailabilityType.AvailabilitySet, + }; + SapSupportedResourceSkusResult result = await subscriptionResource.GetSapSupportedSkuSapVirtualInstanceAsync(location, content); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetSapSupportedSkuSapVirtualInstance_SAPSupportedSkusForHAWithAvailabilityZone() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_InvokeSapSupportedSku_DistributedHA_AvZone.json + // this example is just showing the usage of "SAPVirtualInstances_GetSapSupportedSku" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation + AzureLocation location = new AzureLocation("centralus"); + SapSupportedSkusContent content = new SapSupportedSkusContent("eastus", SapEnvironmentType.Prod, SapProductType.S4HANA, SapDeploymentType.ThreeTier, SapDatabaseType.HANA) + { + HighAvailabilityType = SapHighAvailabilityType.AvailabilityZone, + }; + SapSupportedResourceSkusResult result = await subscriptionResource.GetSapSupportedSkuSapVirtualInstanceAsync(location, content); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetSapSupportedSkuSapVirtualInstance_SAPSupportedSKUsForSingleServer() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_InvokeSapSupportedSku_SingleServer.json + // this example is just showing the usage of "SAPVirtualInstances_GetSapSupportedSku" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation + AzureLocation location = new AzureLocation("centralus"); + SapSupportedSkusContent content = new SapSupportedSkusContent("eastus", SapEnvironmentType.NonProd, SapProductType.S4HANA, SapDeploymentType.SingleServer, SapDatabaseType.HANA); + SapSupportedResourceSkusResult result = await subscriptionResource.GetSapSupportedSkuSapVirtualInstanceAsync(location, content); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetDiskConfigurationsSapVirtualInstance_SAPDiskConfigurationsForInputEnvironmentNonProd() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_InvokeDiskConfigurations_NonProd.json + // this example is just showing the usage of "SAPVirtualInstances_GetDiskConfigurations" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation + AzureLocation location = new AzureLocation("centralus"); + SapDiskConfigurationsContent content = new SapDiskConfigurationsContent( + "eastus", + SapEnvironmentType.NonProd, + SapProductType.S4HANA, + SapDatabaseType.HANA, + SapDeploymentType.ThreeTier, + "Standard_M32ts"); + SapDiskConfigurationsResult result = await subscriptionResource.GetDiskConfigurationsSapVirtualInstanceAsync(location, content); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetDiskConfigurationsSapVirtualInstance_SAPDiskConfigurationsForInputEnvironmentProd() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_InvokeDiskConfigurations_Prod.json + // this example is just showing the usage of "SAPVirtualInstances_GetDiskConfigurations" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation + AzureLocation location = new AzureLocation("centralus"); + SapDiskConfigurationsContent content = new SapDiskConfigurationsContent( + "eastus", + SapEnvironmentType.Prod, + SapProductType.S4HANA, + SapDatabaseType.HANA, + SapDeploymentType.ThreeTier, + "Standard_M32ts"); + SapDiskConfigurationsResult result = await subscriptionResource.GetDiskConfigurationsSapVirtualInstanceAsync(location, content); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAvailabilityZoneDetailsSapVirtualInstance_SAPAvailabilityZoneDetailsInEastUs() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_InvokeAvailabilityZoneDetails_eastus.json + // this example is just showing the usage of "SAPVirtualInstances_GetAvailabilityZoneDetails" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation + AzureLocation location = new AzureLocation("eastus"); + SapAvailabilityZoneDetailsContent content = new SapAvailabilityZoneDetailsContent("eastus", SapProductType.S4HANA, SapDatabaseType.HANA); + SapAvailabilityZoneDetailsResult result = await subscriptionResource.GetAvailabilityZoneDetailsSapVirtualInstanceAsync(location, content); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAvailabilityZoneDetailsSapVirtualInstance_SAPAvailabilityZoneDetailsInNorthEurope() + { + // Generated from example definition: 2024-09-01/SapVirtualInstances_InvokeAvailabilityZoneDetails_northeurope.json + // this example is just showing the usage of "SAPVirtualInstances_GetAvailabilityZoneDetails" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation + AzureLocation location = new AzureLocation("northeurope"); + SapAvailabilityZoneDetailsContent content = new SapAvailabilityZoneDetailsContent("northeurope", SapProductType.S4HANA, SapDatabaseType.HANA); + SapAvailabilityZoneDetailsResult result = await subscriptionResource.GetAvailabilityZoneDetailsSapVirtualInstanceAsync(location, content); + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Azure.ResourceManager.SapVirtualInstances.csproj b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Azure.ResourceManager.SapVirtualInstances.csproj new file mode 100644 index 000000000000..03db45f9d8cf --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Azure.ResourceManager.SapVirtualInstances.csproj @@ -0,0 +1,8 @@ + + + Azure Resource Manager client SDK for Azure resource provider SapVirtualInstances. + 1.0.0-beta.1 + azure;management;arm;resource manager;sapvirtualinstances + Azure.ResourceManager.SapVirtualInstances + + diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/ArmSapVirtualInstancesModelFactory.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/ArmSapVirtualInstancesModelFactory.cs new file mode 100644 index 000000000000..8a0b50590953 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/ArmSapVirtualInstancesModelFactory.cs @@ -0,0 +1,565 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Model factory for models. + public static partial class ArmSapVirtualInstancesModelFactory + { + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The resource-specific properties for this resource. + /// The managed service identities assigned to this resource. + /// A new instance for mocking. + public static SapVirtualInstanceData SapVirtualInstanceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, SapVirtualInstanceProperties properties = null, SAPVirtualInstanceIdentity identity = null) + { + tags ??= new Dictionary(); + + return new SapVirtualInstanceData( + id, + name, + resourceType, + systemData, + tags, + location, + properties, + identity, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Defines the environment type - Production/Non Production. + /// Defines the SAP Product type. + /// Specifies the network access configuration for the resources that will be deployed in the Managed Resource Group. The options to choose from are Public and Private. If 'Private' is chosen, the Storage Account service tag should be enabled on the subnets in which the SAP VMs exist. This is required for establishing connectivity between VM extensions and the managed resource group storage account. This setting is currently applicable only to Storage Account. Learn more here https://go.microsoft.com/fwlink/?linkid=2247228. + /// + /// Defines if the SAP system is being created using Azure Center for SAP solutions (ACSS) or if an existing SAP system is being registered with ACSS + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// Managed resource group configuration. + /// Defines the SAP Instance status. + /// Defines the health of SAP Instances. + /// Defines the Virtual Instance for SAP state. + /// Defines the provisioning states. + /// Indicates any errors on the Virtual Instance for SAP solutions resource. + /// A new instance for mocking. + public static SapVirtualInstanceProperties SapVirtualInstanceProperties(SapEnvironmentType environment = default, SapProductType sapProduct = default, ManagedResourcesNetworkAccessType? managedResourcesNetworkAccessType = null, SapConfiguration configuration = null, string managedResourceGroupName = null, SapVirtualInstanceStatus? status = null, SapHealthState? health = null, SapVirtualInstanceState? state = null, SapVirtualInstanceProvisioningState? provisioningState = null, ErrorInformation errorsProperties = null) + { + return new SapVirtualInstanceProperties( + environment, + sapProduct, + managedResourcesNetworkAccessType, + configuration, + managedResourceGroupName != null ? new ManagedRGConfiguration(managedResourceGroupName, serializedAdditionalRawData: null) : null, + status, + health, + state, + provisioningState, + errorsProperties != null ? new SapVirtualInstanceError(errorsProperties, serializedAdditionalRawData: null) : null, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The virtual machine ID of the Central Server. + /// The custom storage account name for the storage account created by the service in the managed resource group created as part of VIS deployment.<br><br>Refer to the storage account naming rules [here](https://learn.microsoft.com/azure/azure-resource-manager/management/resource-name-rules#microsoftstorage).<br><br>If not provided, the service will create the storage account with a random name. + /// The geo-location where the SAP system exists. + /// A new instance for mocking. + public static DiscoveryConfiguration DiscoveryConfiguration(string centralServerVmId = null, string managedRgStorageAccountName = null, string appLocation = null) + { + return new DiscoveryConfiguration(SapConfigurationType.Discovery, serializedAdditionalRawData: null, centralServerVmId, managedRgStorageAccountName, appLocation); + } + + /// Initializes a new instance of . + /// Service specific error code which serves as the substatus for the HTTP error code. + /// Description of the error. + /// Internal error details. + /// A new instance for mocking. + public static ErrorInformation ErrorInformation(string code = null, string message = null, IEnumerable details = null) + { + details ??= new List(); + + return new ErrorInformation(code, message, details?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Fully qualified ID for the async operation. + /// Name of the async operation. + /// Operation status. + /// Percent of the operation that is complete. + /// The start time of the operation. + /// The end time of the operation. + /// The operations list. + /// If present, details of the operation error. + /// Fully qualified ID of the resource against which the original async operation was started. + /// A new instance for mocking. + public static OperationStatusResult OperationStatusResult(ResourceIdentifier id = null, string name = null, string status = null, double? percentComplete = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, IEnumerable operations = null, ResponseError error = null, string resourceId = null) + { + operations ??= new List(); + + return new OperationStatusResult( + id, + name, + status, + percentComplete, + startOn, + endOn, + operations?.ToList(), + error, + resourceId, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The geo-location where the resource is to be created. + /// Defines the environment type - Production/Non Production. + /// Defines the SAP Product type. + /// The deployment type. Eg: SingleServer/ThreeTier. + /// The SAP Application Performance Standard measurement. + /// The database memory configuration. + /// The database type. + /// The DB scale method. + /// The high availability type. + /// A new instance for mocking. + public static SapSizingRecommendationContent SapSizingRecommendationContent(string appLocation = null, SapEnvironmentType environment = default, SapProductType sapProduct = default, SapDeploymentType deploymentType = default, long saps = default, long dbMemory = default, SapDatabaseType databaseType = default, SapDatabaseScaleMethod? dbScaleMethod = null, SapHighAvailabilityType? highAvailabilityType = null) + { + return new SapSizingRecommendationContent( + appLocation, + environment, + sapProduct, + deploymentType, + saps, + dbMemory, + databaseType, + dbScaleMethod, + highAvailabilityType, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The recommended VM SKU for single server. + /// A new instance for mocking. + public static SingleServerRecommendationResult SingleServerRecommendationResult(string vmSku = null) + { + return new SingleServerRecommendationResult(SapDeploymentType.SingleServer, serializedAdditionalRawData: null, vmSku); + } + + /// Initializes a new instance of . + /// The database VM SKU. + /// The database server instance count. + /// The central server VM SKU. + /// The central server instance count. + /// The application server VM SKU. + /// The application server instance count. + /// A new instance for mocking. + public static ThreeTierRecommendationResult ThreeTierRecommendationResult(string dbVmSku = null, long? databaseInstanceCount = null, string centralServerVmSku = null, long? centralServerInstanceCount = null, string applicationServerVmSku = null, long? applicationServerInstanceCount = null) + { + return new ThreeTierRecommendationResult( + SapDeploymentType.ThreeTier, + serializedAdditionalRawData: null, + dbVmSku, + databaseInstanceCount, + centralServerVmSku, + centralServerInstanceCount, + applicationServerVmSku, + applicationServerInstanceCount); + } + + /// Initializes a new instance of . + /// The geo-location where the resource is to be created. + /// Defines the environment type - Production/Non Production. + /// Defines the SAP Product type. + /// The deployment type. Eg: SingleServer/ThreeTier. + /// The database type. Eg: HANA, DB2, etc. + /// The high availability type. + /// A new instance for mocking. + public static SapSupportedSkusContent SapSupportedSkusContent(string appLocation = null, SapEnvironmentType environment = default, SapProductType sapProduct = default, SapDeploymentType deploymentType = default, SapDatabaseType databaseType = default, SapHighAvailabilityType? highAvailabilityType = null) + { + return new SapSupportedSkusContent( + appLocation, + environment, + sapProduct, + deploymentType, + databaseType, + highAvailabilityType, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Gets the list of SAP supported SKUs. + /// A new instance for mocking. + public static SapSupportedResourceSkusResult SapSupportedResourceSkusResult(IEnumerable supportedSkus = null) + { + supportedSkus ??= new List(); + + return new SapSupportedResourceSkusResult(supportedSkus?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The VM Sku. + /// True if the Sku is certified for App server in the SAP system. + /// True if the Sku is certified for Database server in the SAP system. + /// A new instance for mocking. + public static SapSupportedSku SapSupportedSku(string vmSku = null, bool? isAppServerCertified = null, bool? isDatabaseCertified = null) + { + return new SapSupportedSku(vmSku, isAppServerCertified, isDatabaseCertified, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The disk configuration for the db volume. For HANA, Required volumes are: ['hana/data', 'hana/log', hana/shared', 'usr/sap', 'os'], Optional volume : ['backup']. + /// A new instance for mocking. + public static SapDiskConfigurationsResult SapDiskConfigurationsResult(IReadOnlyDictionary volumeConfigurations = null) + { + volumeConfigurations ??= new Dictionary(); + + return new SapDiskConfigurationsResult(volumeConfigurations, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The recommended disk details for a given VM Sku. + /// The list of supported disks for a given VM Sku. + /// A new instance for mocking. + public static SapDiskConfiguration SapDiskConfiguration(DiskVolumeConfiguration recommendedConfiguration = null, IEnumerable supportedConfigurations = null) + { + supportedConfigurations ??= new List(); + + return new SapDiskConfiguration(recommendedConfiguration, supportedConfigurations?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The type of disk sku. For example, Standard_LRS, Standard_ZRS, Premium_LRS, Premium_ZRS. + /// The disk size in GB. + /// The minimum supported disk count. + /// The maximum supported disk count. + /// The disk Iops. + /// The disk provisioned throughput in MBps. + /// The disk tier, e.g. P10, E10. + /// A new instance for mocking. + public static DiskDetails DiskDetails(DiskSkuName? skuName = null, long? sizeGB = null, long? minimumSupportedDiskCount = null, long? maximumSupportedDiskCount = null, long? iopsReadWrite = null, long? mbpsReadWrite = null, string diskTier = null) + { + return new DiskDetails( + skuName != null ? new DiskSku(skuName, serializedAdditionalRawData: null) : null, + sizeGB, + minimumSupportedDiskCount, + maximumSupportedDiskCount, + iopsReadWrite, + mbpsReadWrite, + diskTier, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Gets the list of availability zone pairs. + /// A new instance for mocking. + public static SapAvailabilityZoneDetailsResult SapAvailabilityZoneDetailsResult(IEnumerable availabilityZonePairs = null) + { + availabilityZonePairs ??= new List(); + + return new SapAvailabilityZoneDetailsResult(availabilityZonePairs?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The zone A. + /// The zone B. + /// A new instance for mocking. + public static SapAvailabilityZonePair SapAvailabilityZonePair(long? zoneA = null, long? zoneB = null) + { + return new SapAvailabilityZonePair(zoneA, zoneB, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static SapCentralServerInstanceData SapCentralServerInstanceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, SapCentralServerProperties properties = null) + { + tags ??= new Dictionary(); + + return new SapCentralServerInstanceData( + id, + name, + resourceType, + systemData, + tags, + location, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The central services instance number. + /// The central services instance subnet. + /// Defines the SAP message server properties. + /// Defines the SAP Enqueue Server properties. + /// Defines the SAP Gateway Server properties. + /// Defines the SAP Enqueue Replication Server (ERS) properties. + /// The central services instance Kernel Version. + /// The central services instance Kernel Patch level. + /// The Load Balancer details such as LoadBalancer ID attached to ASCS Virtual Machines. + /// The list of virtual machines corresponding to the Central Services instance. + /// Defines the SAP Instance status. + /// Defines the health of SAP Instances. + /// Defines the provisioning states. + /// Defines the errors related to SAP Central Services Instance resource. + /// A new instance for mocking. + public static SapCentralServerProperties SapCentralServerProperties(string instanceNo = null, string subnet = null, MessageServerProperties messageServerProperties = null, EnqueueServerProperties enqueueServerProperties = null, GatewayServerProperties gatewayServerProperties = null, EnqueueReplicationServerProperties enqueueReplicationServerProperties = null, string kernelVersion = null, string kernelPatch = null, ResourceIdentifier loadBalancerDetailsId = null, IEnumerable vmDetails = null, SapVirtualInstanceStatus? status = null, SapHealthState? health = null, SapVirtualInstanceProvisioningState? provisioningState = null, ErrorInformation errorsProperties = null) + { + vmDetails ??= new List(); + + return new SapCentralServerProperties( + instanceNo, + subnet, + messageServerProperties, + enqueueServerProperties, + gatewayServerProperties, + enqueueReplicationServerProperties, + kernelVersion, + kernelPatch, + loadBalancerDetailsId != null ? ResourceManagerModelFactory.SubResource(loadBalancerDetailsId) : null, + vmDetails?.ToList(), + status, + health, + provisioningState, + errorsProperties != null ? new SapVirtualInstanceError(errorsProperties, serializedAdditionalRawData: null) : null, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// message server port. + /// message server internal MS port. + /// message server HTTP Port. + /// message server HTTPS Port. + /// message server SAP Hostname. + /// message server IP Address. + /// Defines the health of SAP Instances. + /// A new instance for mocking. + public static MessageServerProperties MessageServerProperties(long? msPort = null, long? internalMsPort = null, long? httpPort = null, long? httpsPort = null, string hostname = null, string ipAddress = null, SapHealthState? health = null) + { + return new MessageServerProperties( + msPort, + internalMsPort, + httpPort, + httpsPort, + hostname, + ipAddress, + health, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Enqueue Server SAP Hostname. + /// Enqueue Server SAP IP Address. + /// Enqueue Server Port. + /// Defines the health of SAP Instances. + /// A new instance for mocking. + public static EnqueueServerProperties EnqueueServerProperties(string hostname = null, string ipAddress = null, long? port = null, SapHealthState? health = null) + { + return new EnqueueServerProperties(hostname, ipAddress, port, health, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Gateway Port. + /// Defines the health of SAP Instances. + /// A new instance for mocking. + public static GatewayServerProperties GatewayServerProperties(long? port = null, SapHealthState? health = null) + { + return new GatewayServerProperties(port, health, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Defines the type of Enqueue Replication Server. + /// ERS Instance Number. + /// ERS SAP Hostname. + /// ERS SAP Kernel Version. + /// ERS SAP Kernel Patch level. + /// ERS SAP IP Address. + /// Defines the health of SAP Instances. + /// A new instance for mocking. + public static EnqueueReplicationServerProperties EnqueueReplicationServerProperties(EnqueueReplicationServerType? ersVersion = null, string instanceNo = null, string hostname = null, string kernelVersion = null, string kernelPatch = null, string ipAddress = null, SapHealthState? health = null) + { + return new EnqueueReplicationServerProperties( + ersVersion, + instanceNo, + hostname, + kernelVersion, + kernelPatch, + ipAddress, + health, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Defines the type of central server VM. + /// The virtual machine id. + /// Storage details of all the Storage Accounts attached to the ASCS Virtual Machine. For e.g. NFS on AFS Shared Storage. + /// A new instance for mocking. + public static CentralServerVmDetails CentralServerVmDetails(CentralServerVirtualMachineType? type = null, string virtualMachineId = null, IEnumerable storageDetails = null) + { + storageDetails ??= new List(); + + return new CentralServerVmDetails(type, virtualMachineId, storageDetails?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static SapDatabaseInstanceData SapDatabaseInstanceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, SapDatabaseProperties properties = null) + { + tags ??= new Dictionary(); + + return new SapDatabaseInstanceData( + id, + name, + resourceType, + systemData, + tags, + location, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Database subnet. + /// Database SID name. + /// Database type, that is if the DB is HANA, DB2, Oracle, SAP ASE, Max DB or MS SQL Server. + /// Database IP Address. + /// The Load Balancer details such as LoadBalancer ID attached to Database Virtual Machines. + /// The list of virtual machines corresponding to the Database resource. + /// Defines the SAP Instance status. + /// Defines the provisioning states. + /// Defines the errors related to Database resource. + /// A new instance for mocking. + public static SapDatabaseProperties SapDatabaseProperties(string subnet = null, string databaseSid = null, string databaseType = null, string ipAddress = null, ResourceIdentifier loadBalancerDetailsId = null, IEnumerable vmDetails = null, SapVirtualInstanceStatus? status = null, SapVirtualInstanceProvisioningState? provisioningState = null, ErrorInformation errorsProperties = null) + { + vmDetails ??= new List(); + + return new SapDatabaseProperties( + subnet, + databaseSid, + databaseType, + ipAddress, + loadBalancerDetailsId != null ? ResourceManagerModelFactory.SubResource(loadBalancerDetailsId) : null, + vmDetails?.ToList(), + status, + provisioningState, + errorsProperties != null ? new SapVirtualInstanceError(errorsProperties, serializedAdditionalRawData: null) : null, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The virtual machine id. + /// Defines the SAP Instance status. + /// Storage details of all the Storage Accounts attached to the Database Virtual Machine. For e.g. NFS on AFS Shared Storage. + /// A new instance for mocking. + public static DatabaseVmDetails DatabaseVmDetails(string virtualMachineId = null, SapVirtualInstanceStatus? status = null, IEnumerable storageDetails = null) + { + storageDetails ??= new List(); + + return new DatabaseVmDetails(virtualMachineId, status, storageDetails?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static SapApplicationServerInstanceData SapApplicationServerInstanceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, SapApplicationServerProperties properties = null) + { + tags ??= new Dictionary(); + + return new SapApplicationServerInstanceData( + id, + name, + resourceType, + systemData, + tags, + location, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Application server Instance Number. + /// Application server Subnet. + /// Application server instance SAP hostname. + /// Application server instance SAP Kernel Version. + /// Application server instance SAP Kernel Patch level. + /// Application server instance SAP IP Address. + /// Application server instance gateway Port. + /// Application server instance ICM HTTP Port. + /// Application server instance ICM HTTPS Port. + /// Application server instance dispatcher status. + /// The Load Balancer details such as LoadBalancer ID attached to Application Server Virtual Machines. + /// The list of virtual machines. + /// Defines the SAP Instance status. + /// Defines the health of SAP Instances. + /// Defines the provisioning states. + /// Defines the Application Instance errors. + /// A new instance for mocking. + public static SapApplicationServerProperties SapApplicationServerProperties(string instanceNo = null, string subnet = null, string hostname = null, string kernelVersion = null, string kernelPatch = null, string ipAddress = null, long? gatewayPort = null, long? icmHttpPort = null, long? icmHttpsPort = null, string dispatcherStatus = null, ResourceIdentifier loadBalancerDetailsId = null, IEnumerable vmDetails = null, SapVirtualInstanceStatus? status = null, SapHealthState? health = null, SapVirtualInstanceProvisioningState? provisioningState = null, ErrorInformation errorsProperties = null) + { + vmDetails ??= new List(); + + return new SapApplicationServerProperties( + instanceNo, + subnet, + hostname, + kernelVersion, + kernelPatch, + ipAddress, + gatewayPort, + icmHttpPort, + icmHttpsPort, + dispatcherStatus, + loadBalancerDetailsId != null ? ResourceManagerModelFactory.SubResource(loadBalancerDetailsId) : null, + vmDetails?.ToList(), + status, + health, + provisioningState, + errorsProperties != null ? new SapVirtualInstanceError(errorsProperties, serializedAdditionalRawData: null) : null, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Defines the type of application server VM. + /// The virtual machine id. + /// Storage details of all the Storage Accounts attached to the App Virtual Machine. For e.g. NFS on AFS Shared Storage. + /// A new instance for mocking. + public static ApplicationServerVmDetails ApplicationServerVmDetails(ApplicationServerVirtualMachineType? type = null, string virtualMachineId = null, IEnumerable storageDetails = null) + { + storageDetails ??= new List(); + + return new ApplicationServerVmDetails(type, virtualMachineId, storageDetails?.ToList(), serializedAdditionalRawData: null); + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Extensions/MockableSapVirtualInstancesArmClient.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Extensions/MockableSapVirtualInstancesArmClient.cs new file mode 100644 index 000000000000..aad5abbcbc9e --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Extensions/MockableSapVirtualInstancesArmClient.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Mocking +{ + /// A class to add extension methods to ArmClient. + public partial class MockableSapVirtualInstancesArmClient : ArmResource + { + /// Initializes a new instance of the class for mocking. + protected MockableSapVirtualInstancesArmClient() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal MockableSapVirtualInstancesArmClient(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + internal MockableSapVirtualInstancesArmClient(ArmClient client) : this(client, ResourceIdentifier.Root) + { + } + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual SapVirtualInstanceResource GetSapVirtualInstanceResource(ResourceIdentifier id) + { + SapVirtualInstanceResource.ValidateResourceId(id); + return new SapVirtualInstanceResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual SapCentralServerInstanceResource GetSapCentralServerInstanceResource(ResourceIdentifier id) + { + SapCentralServerInstanceResource.ValidateResourceId(id); + return new SapCentralServerInstanceResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual SapDatabaseInstanceResource GetSapDatabaseInstanceResource(ResourceIdentifier id) + { + SapDatabaseInstanceResource.ValidateResourceId(id); + return new SapDatabaseInstanceResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual SapApplicationServerInstanceResource GetSapApplicationServerInstanceResource(ResourceIdentifier id) + { + SapApplicationServerInstanceResource.ValidateResourceId(id); + return new SapApplicationServerInstanceResource(Client, id); + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Extensions/MockableSapVirtualInstancesResourceGroupResource.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Extensions/MockableSapVirtualInstancesResourceGroupResource.cs new file mode 100644 index 000000000000..ca026e2cf97d --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Extensions/MockableSapVirtualInstancesResourceGroupResource.cs @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Mocking +{ + /// A class to add extension methods to ResourceGroupResource. + public partial class MockableSapVirtualInstancesResourceGroupResource : ArmResource + { + /// Initializes a new instance of the class for mocking. + protected MockableSapVirtualInstancesResourceGroupResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal MockableSapVirtualInstancesResourceGroupResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// Gets a collection of SapVirtualInstanceResources in the ResourceGroupResource. + /// An object representing collection of SapVirtualInstanceResources and their operations over a SapVirtualInstanceResource. + public virtual SapVirtualInstanceCollection GetSapVirtualInstances() + { + return GetCachedClient(client => new SapVirtualInstanceCollection(client, Id)); + } + + /// + /// Gets a Virtual Instance for SAP solutions resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName} + /// + /// + /// Operation Id + /// SAPVirtualInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Virtual Instances for SAP solutions resource. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetSapVirtualInstanceAsync(string sapVirtualInstanceName, CancellationToken cancellationToken = default) + { + return await GetSapVirtualInstances().GetAsync(sapVirtualInstanceName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets a Virtual Instance for SAP solutions resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName} + /// + /// + /// Operation Id + /// SAPVirtualInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Virtual Instances for SAP solutions resource. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetSapVirtualInstance(string sapVirtualInstanceName, CancellationToken cancellationToken = default) + { + return GetSapVirtualInstances().Get(sapVirtualInstanceName, cancellationToken); + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Extensions/MockableSapVirtualInstancesSubscriptionResource.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Extensions/MockableSapVirtualInstancesSubscriptionResource.cs new file mode 100644 index 000000000000..e11cf5279920 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Extensions/MockableSapVirtualInstancesSubscriptionResource.cs @@ -0,0 +1,449 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.SapVirtualInstances.Models; + +namespace Azure.ResourceManager.SapVirtualInstances.Mocking +{ + /// A class to add extension methods to SubscriptionResource. + public partial class MockableSapVirtualInstancesSubscriptionResource : ArmResource + { + private ClientDiagnostics _sapVirtualInstanceClientDiagnostics; + private SapVirtualInstancesRestOperations _sapVirtualInstanceRestClient; + + /// Initializes a new instance of the class for mocking. + protected MockableSapVirtualInstancesSubscriptionResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal MockableSapVirtualInstancesSubscriptionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + private ClientDiagnostics SapVirtualInstanceClientDiagnostics => _sapVirtualInstanceClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.SapVirtualInstances", SapVirtualInstanceResource.ResourceType.Namespace, Diagnostics); + private SapVirtualInstancesRestOperations SapVirtualInstanceRestClient => _sapVirtualInstanceRestClient ??= new SapVirtualInstancesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(SapVirtualInstanceResource.ResourceType)); + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// + /// Gets all Virtual Instances for SAP solutions resources in a Subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/sapVirtualInstances + /// + /// + /// Operation Id + /// SAPVirtualInstance_ListBySubscription + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetSapVirtualInstancesAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => SapVirtualInstanceRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => SapVirtualInstanceRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new SapVirtualInstanceResource(Client, SapVirtualInstanceData.DeserializeSapVirtualInstanceData(e)), SapVirtualInstanceClientDiagnostics, Pipeline, "MockableSapVirtualInstancesSubscriptionResource.GetSapVirtualInstances", "value", "nextLink", cancellationToken); + } + + /// + /// Gets all Virtual Instances for SAP solutions resources in a Subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/sapVirtualInstances + /// + /// + /// Operation Id + /// SAPVirtualInstance_ListBySubscription + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetSapVirtualInstances(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => SapVirtualInstanceRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => SapVirtualInstanceRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new SapVirtualInstanceResource(Client, SapVirtualInstanceData.DeserializeSapVirtualInstanceData(e)), SapVirtualInstanceClientDiagnostics, Pipeline, "MockableSapVirtualInstancesSubscriptionResource.GetSapVirtualInstances", "value", "nextLink", cancellationToken); + } + + /// + /// Gets the sizing recommendations. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getSizingRecommendations + /// + /// + /// Operation Id + /// SAPVirtualInstances_GetSizingRecommendations + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Azure region. + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual async Task> GetSizingRecommendationsSapVirtualInstanceAsync(AzureLocation location, SapSizingRecommendationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = SapVirtualInstanceClientDiagnostics.CreateScope("MockableSapVirtualInstancesSubscriptionResource.GetSizingRecommendationsSapVirtualInstance"); + scope.Start(); + try + { + var response = await SapVirtualInstanceRestClient.GetSizingRecommendationsAsync(Id.SubscriptionId, location, content, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the sizing recommendations. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getSizingRecommendations + /// + /// + /// Operation Id + /// SAPVirtualInstances_GetSizingRecommendations + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Azure region. + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual Response GetSizingRecommendationsSapVirtualInstance(AzureLocation location, SapSizingRecommendationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = SapVirtualInstanceClientDiagnostics.CreateScope("MockableSapVirtualInstancesSubscriptionResource.GetSizingRecommendationsSapVirtualInstance"); + scope.Start(); + try + { + var response = SapVirtualInstanceRestClient.GetSizingRecommendations(Id.SubscriptionId, location, content, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a list of SAP supported SKUs for ASCS, Application and Database tier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getSapSupportedSku + /// + /// + /// Operation Id + /// SAPVirtualInstances_GetSapSupportedSku + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Azure region. + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual async Task> GetSapSupportedSkuSapVirtualInstanceAsync(AzureLocation location, SapSupportedSkusContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = SapVirtualInstanceClientDiagnostics.CreateScope("MockableSapVirtualInstancesSubscriptionResource.GetSapSupportedSkuSapVirtualInstance"); + scope.Start(); + try + { + var response = await SapVirtualInstanceRestClient.GetSapSupportedSkuAsync(Id.SubscriptionId, location, content, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a list of SAP supported SKUs for ASCS, Application and Database tier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getSapSupportedSku + /// + /// + /// Operation Id + /// SAPVirtualInstances_GetSapSupportedSku + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Azure region. + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual Response GetSapSupportedSkuSapVirtualInstance(AzureLocation location, SapSupportedSkusContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = SapVirtualInstanceClientDiagnostics.CreateScope("MockableSapVirtualInstancesSubscriptionResource.GetSapSupportedSkuSapVirtualInstance"); + scope.Start(); + try + { + var response = SapVirtualInstanceRestClient.GetSapSupportedSku(Id.SubscriptionId, location, content, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the SAP Disk Configuration Layout prod/non-prod SAP System. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getDiskConfigurations + /// + /// + /// Operation Id + /// SAPVirtualInstances_GetDiskConfigurations + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Azure region. + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual async Task> GetDiskConfigurationsSapVirtualInstanceAsync(AzureLocation location, SapDiskConfigurationsContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = SapVirtualInstanceClientDiagnostics.CreateScope("MockableSapVirtualInstancesSubscriptionResource.GetDiskConfigurationsSapVirtualInstance"); + scope.Start(); + try + { + var response = await SapVirtualInstanceRestClient.GetDiskConfigurationsAsync(Id.SubscriptionId, location, content, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the SAP Disk Configuration Layout prod/non-prod SAP System. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getDiskConfigurations + /// + /// + /// Operation Id + /// SAPVirtualInstances_GetDiskConfigurations + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Azure region. + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual Response GetDiskConfigurationsSapVirtualInstance(AzureLocation location, SapDiskConfigurationsContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = SapVirtualInstanceClientDiagnostics.CreateScope("MockableSapVirtualInstancesSubscriptionResource.GetDiskConfigurationsSapVirtualInstance"); + scope.Start(); + try + { + var response = SapVirtualInstanceRestClient.GetDiskConfigurations(Id.SubscriptionId, location, content, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the recommended SAP Availability Zone Pair Details for your region. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getAvailabilityZoneDetails + /// + /// + /// Operation Id + /// SAPVirtualInstances_GetAvailabilityZoneDetails + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Azure region. + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual async Task> GetAvailabilityZoneDetailsSapVirtualInstanceAsync(AzureLocation location, SapAvailabilityZoneDetailsContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = SapVirtualInstanceClientDiagnostics.CreateScope("MockableSapVirtualInstancesSubscriptionResource.GetAvailabilityZoneDetailsSapVirtualInstance"); + scope.Start(); + try + { + var response = await SapVirtualInstanceRestClient.GetAvailabilityZoneDetailsAsync(Id.SubscriptionId, location, content, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the recommended SAP Availability Zone Pair Details for your region. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getAvailabilityZoneDetails + /// + /// + /// Operation Id + /// SAPVirtualInstances_GetAvailabilityZoneDetails + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Azure region. + /// The content of the action request. + /// The cancellation token to use. + /// is null. + public virtual Response GetAvailabilityZoneDetailsSapVirtualInstance(AzureLocation location, SapAvailabilityZoneDetailsContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = SapVirtualInstanceClientDiagnostics.CreateScope("MockableSapVirtualInstancesSubscriptionResource.GetAvailabilityZoneDetailsSapVirtualInstance"); + scope.Start(); + try + { + var response = SapVirtualInstanceRestClient.GetAvailabilityZoneDetails(Id.SubscriptionId, location, content, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Extensions/SapVirtualInstancesExtensions.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Extensions/SapVirtualInstancesExtensions.cs new file mode 100644 index 000000000000..4ec5c61ddb30 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Extensions/SapVirtualInstancesExtensions.cs @@ -0,0 +1,573 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.ResourceManager.Resources; +using Azure.ResourceManager.SapVirtualInstances.Mocking; +using Azure.ResourceManager.SapVirtualInstances.Models; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + /// A class to add extension methods to Azure.ResourceManager.SapVirtualInstances. + public static partial class SapVirtualInstancesExtensions + { + private static MockableSapVirtualInstancesArmClient GetMockableSapVirtualInstancesArmClient(ArmClient client) + { + return client.GetCachedClient(client0 => new MockableSapVirtualInstancesArmClient(client0)); + } + + private static MockableSapVirtualInstancesResourceGroupResource GetMockableSapVirtualInstancesResourceGroupResource(ArmResource resource) + { + return resource.GetCachedClient(client => new MockableSapVirtualInstancesResourceGroupResource(client, resource.Id)); + } + + private static MockableSapVirtualInstancesSubscriptionResource GetMockableSapVirtualInstancesSubscriptionResource(ArmResource resource) + { + return resource.GetCachedClient(client => new MockableSapVirtualInstancesSubscriptionResource(client, resource.Id)); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static SapVirtualInstanceResource GetSapVirtualInstanceResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableSapVirtualInstancesArmClient(client).GetSapVirtualInstanceResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static SapCentralServerInstanceResource GetSapCentralServerInstanceResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableSapVirtualInstancesArmClient(client).GetSapCentralServerInstanceResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static SapDatabaseInstanceResource GetSapDatabaseInstanceResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableSapVirtualInstancesArmClient(client).GetSapDatabaseInstanceResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static SapApplicationServerInstanceResource GetSapApplicationServerInstanceResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableSapVirtualInstancesArmClient(client).GetSapApplicationServerInstanceResource(id); + } + + /// + /// Gets a collection of SapVirtualInstanceResources in the ResourceGroupResource. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// is null. + /// An object representing collection of SapVirtualInstanceResources and their operations over a SapVirtualInstanceResource. + public static SapVirtualInstanceCollection GetSapVirtualInstances(this ResourceGroupResource resourceGroupResource) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableSapVirtualInstancesResourceGroupResource(resourceGroupResource).GetSapVirtualInstances(); + } + + /// + /// Gets a Virtual Instance for SAP solutions resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName} + /// + /// + /// Operation Id + /// SAPVirtualInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Virtual Instances for SAP solutions resource. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static async Task> GetSapVirtualInstanceAsync(this ResourceGroupResource resourceGroupResource, string sapVirtualInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return await GetMockableSapVirtualInstancesResourceGroupResource(resourceGroupResource).GetSapVirtualInstanceAsync(sapVirtualInstanceName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets a Virtual Instance for SAP solutions resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName} + /// + /// + /// Operation Id + /// SAPVirtualInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Virtual Instances for SAP solutions resource. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static Response GetSapVirtualInstance(this ResourceGroupResource resourceGroupResource, string sapVirtualInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableSapVirtualInstancesResourceGroupResource(resourceGroupResource).GetSapVirtualInstance(sapVirtualInstanceName, cancellationToken); + } + + /// + /// Gets all Virtual Instances for SAP solutions resources in a Subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/sapVirtualInstances + /// + /// + /// Operation Id + /// SAPVirtualInstance_ListBySubscription + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// is null. + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetSapVirtualInstancesAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableSapVirtualInstancesSubscriptionResource(subscriptionResource).GetSapVirtualInstancesAsync(cancellationToken); + } + + /// + /// Gets all Virtual Instances for SAP solutions resources in a Subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/sapVirtualInstances + /// + /// + /// Operation Id + /// SAPVirtualInstance_ListBySubscription + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// is null. + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetSapVirtualInstances(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableSapVirtualInstancesSubscriptionResource(subscriptionResource).GetSapVirtualInstances(cancellationToken); + } + + /// + /// Gets the sizing recommendations. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getSizingRecommendations + /// + /// + /// Operation Id + /// SAPVirtualInstances_GetSizingRecommendations + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Azure region. + /// The content of the action request. + /// The cancellation token to use. + /// or is null. + public static async Task> GetSizingRecommendationsSapVirtualInstanceAsync(this SubscriptionResource subscriptionResource, AzureLocation location, SapSizingRecommendationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return await GetMockableSapVirtualInstancesSubscriptionResource(subscriptionResource).GetSizingRecommendationsSapVirtualInstanceAsync(location, content, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the sizing recommendations. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getSizingRecommendations + /// + /// + /// Operation Id + /// SAPVirtualInstances_GetSizingRecommendations + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Azure region. + /// The content of the action request. + /// The cancellation token to use. + /// or is null. + public static Response GetSizingRecommendationsSapVirtualInstance(this SubscriptionResource subscriptionResource, AzureLocation location, SapSizingRecommendationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableSapVirtualInstancesSubscriptionResource(subscriptionResource).GetSizingRecommendationsSapVirtualInstance(location, content, cancellationToken); + } + + /// + /// Get a list of SAP supported SKUs for ASCS, Application and Database tier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getSapSupportedSku + /// + /// + /// Operation Id + /// SAPVirtualInstances_GetSapSupportedSku + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Azure region. + /// The content of the action request. + /// The cancellation token to use. + /// or is null. + public static async Task> GetSapSupportedSkuSapVirtualInstanceAsync(this SubscriptionResource subscriptionResource, AzureLocation location, SapSupportedSkusContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return await GetMockableSapVirtualInstancesSubscriptionResource(subscriptionResource).GetSapSupportedSkuSapVirtualInstanceAsync(location, content, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a list of SAP supported SKUs for ASCS, Application and Database tier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getSapSupportedSku + /// + /// + /// Operation Id + /// SAPVirtualInstances_GetSapSupportedSku + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Azure region. + /// The content of the action request. + /// The cancellation token to use. + /// or is null. + public static Response GetSapSupportedSkuSapVirtualInstance(this SubscriptionResource subscriptionResource, AzureLocation location, SapSupportedSkusContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableSapVirtualInstancesSubscriptionResource(subscriptionResource).GetSapSupportedSkuSapVirtualInstance(location, content, cancellationToken); + } + + /// + /// Get the SAP Disk Configuration Layout prod/non-prod SAP System. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getDiskConfigurations + /// + /// + /// Operation Id + /// SAPVirtualInstances_GetDiskConfigurations + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Azure region. + /// The content of the action request. + /// The cancellation token to use. + /// or is null. + public static async Task> GetDiskConfigurationsSapVirtualInstanceAsync(this SubscriptionResource subscriptionResource, AzureLocation location, SapDiskConfigurationsContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return await GetMockableSapVirtualInstancesSubscriptionResource(subscriptionResource).GetDiskConfigurationsSapVirtualInstanceAsync(location, content, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get the SAP Disk Configuration Layout prod/non-prod SAP System. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getDiskConfigurations + /// + /// + /// Operation Id + /// SAPVirtualInstances_GetDiskConfigurations + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Azure region. + /// The content of the action request. + /// The cancellation token to use. + /// or is null. + public static Response GetDiskConfigurationsSapVirtualInstance(this SubscriptionResource subscriptionResource, AzureLocation location, SapDiskConfigurationsContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableSapVirtualInstancesSubscriptionResource(subscriptionResource).GetDiskConfigurationsSapVirtualInstance(location, content, cancellationToken); + } + + /// + /// Get the recommended SAP Availability Zone Pair Details for your region. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getAvailabilityZoneDetails + /// + /// + /// Operation Id + /// SAPVirtualInstances_GetAvailabilityZoneDetails + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Azure region. + /// The content of the action request. + /// The cancellation token to use. + /// or is null. + public static async Task> GetAvailabilityZoneDetailsSapVirtualInstanceAsync(this SubscriptionResource subscriptionResource, AzureLocation location, SapAvailabilityZoneDetailsContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return await GetMockableSapVirtualInstancesSubscriptionResource(subscriptionResource).GetAvailabilityZoneDetailsSapVirtualInstanceAsync(location, content, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get the recommended SAP Availability Zone Pair Details for your region. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getAvailabilityZoneDetails + /// + /// + /// Operation Id + /// SAPVirtualInstances_GetAvailabilityZoneDetails + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Azure region. + /// The content of the action request. + /// The cancellation token to use. + /// or is null. + public static Response GetAvailabilityZoneDetailsSapVirtualInstance(this SubscriptionResource subscriptionResource, AzureLocation location, SapAvailabilityZoneDetailsContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableSapVirtualInstancesSubscriptionResource(subscriptionResource).GetAvailabilityZoneDetailsSapVirtualInstance(location, content, cancellationToken); + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Internal/Argument.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Internal/Argument.cs new file mode 100644 index 000000000000..058a05ba4c78 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Internal/Argument.cs @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + internal static class Argument + { + public static void AssertNotNull(T value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + } + + public static void AssertNotNull(T? value, string name) + where T : struct + { + if (!value.HasValue) + { + throw new ArgumentNullException(name); + } + } + + public static void AssertNotNullOrEmpty(IEnumerable value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + if (value is ICollection collectionOfT && collectionOfT.Count == 0) + { + throw new ArgumentException("Value cannot be an empty collection.", name); + } + if (value is ICollection collection && collection.Count == 0) + { + throw new ArgumentException("Value cannot be an empty collection.", name); + } + using IEnumerator e = value.GetEnumerator(); + if (!e.MoveNext()) + { + throw new ArgumentException("Value cannot be an empty collection.", name); + } + } + + public static void AssertNotNullOrEmpty(string value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + if (value.Length == 0) + { + throw new ArgumentException("Value cannot be an empty string.", name); + } + } + + public static void AssertNotNullOrWhiteSpace(string value, string name) + { + if (value is null) + { + throw new ArgumentNullException(name); + } + if (string.IsNullOrWhiteSpace(value)) + { + throw new ArgumentException("Value cannot be empty or contain only white-space characters.", name); + } + } + + public static void AssertNotDefault(ref T value, string name) + where T : struct, IEquatable + { + if (value.Equals(default)) + { + throw new ArgumentException("Value cannot be empty.", name); + } + } + + public static void AssertInRange(T value, T minimum, T maximum, string name) + where T : notnull, IComparable + { + if (minimum.CompareTo(value) > 0) + { + throw new ArgumentOutOfRangeException(name, "Value is less than the minimum allowed."); + } + if (maximum.CompareTo(value) < 0) + { + throw new ArgumentOutOfRangeException(name, "Value is greater than the maximum allowed."); + } + } + + public static void AssertEnumDefined(Type enumType, object value, string name) + { + if (!Enum.IsDefined(enumType, value)) + { + throw new ArgumentException($"Value not defined for {enumType.FullName}.", name); + } + } + + public static T CheckNotNull(T value, string name) + where T : class + { + AssertNotNull(value, name); + return value; + } + + public static string CheckNotNullOrEmpty(string value, string name) + { + AssertNotNullOrEmpty(value, name); + return value; + } + + public static void AssertNull(T value, string name, string message = null) + { + if (value != null) + { + throw new ArgumentException(message ?? "Value must be null.", name); + } + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Internal/ChangeTrackingDictionary.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Internal/ChangeTrackingDictionary.cs new file mode 100644 index 000000000000..dd179878f74f --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Internal/ChangeTrackingDictionary.cs @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + internal class ChangeTrackingDictionary : IDictionary, IReadOnlyDictionary where TKey : notnull + { + private IDictionary _innerDictionary; + + public ChangeTrackingDictionary() + { + } + + public ChangeTrackingDictionary(IDictionary dictionary) + { + if (dictionary == null) + { + return; + } + _innerDictionary = new Dictionary(dictionary); + } + + public ChangeTrackingDictionary(IReadOnlyDictionary dictionary) + { + if (dictionary == null) + { + return; + } + _innerDictionary = new Dictionary(); + foreach (var pair in dictionary) + { + _innerDictionary.Add(pair); + } + } + + public bool IsUndefined => _innerDictionary == null; + + public int Count => IsUndefined ? 0 : EnsureDictionary().Count; + + public bool IsReadOnly => IsUndefined ? false : EnsureDictionary().IsReadOnly; + + public ICollection Keys => IsUndefined ? Array.Empty() : EnsureDictionary().Keys; + + public ICollection Values => IsUndefined ? Array.Empty() : EnsureDictionary().Values; + + public TValue this[TKey key] + { + get + { + if (IsUndefined) + { + throw new KeyNotFoundException(nameof(key)); + } + return EnsureDictionary()[key]; + } + set + { + EnsureDictionary()[key] = value; + } + } + + IEnumerable IReadOnlyDictionary.Keys => Keys; + + IEnumerable IReadOnlyDictionary.Values => Values; + + public IEnumerator> GetEnumerator() + { + if (IsUndefined) + { + IEnumerator> enumerateEmpty() + { + yield break; + } + return enumerateEmpty(); + } + return EnsureDictionary().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + public void Add(KeyValuePair item) + { + EnsureDictionary().Add(item); + } + + public void Clear() + { + EnsureDictionary().Clear(); + } + + public bool Contains(KeyValuePair item) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().Contains(item); + } + + public void CopyTo(KeyValuePair[] array, int index) + { + if (IsUndefined) + { + return; + } + EnsureDictionary().CopyTo(array, index); + } + + public bool Remove(KeyValuePair item) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().Remove(item); + } + + public void Add(TKey key, TValue value) + { + EnsureDictionary().Add(key, value); + } + + public bool ContainsKey(TKey key) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().ContainsKey(key); + } + + public bool Remove(TKey key) + { + if (IsUndefined) + { + return false; + } + return EnsureDictionary().Remove(key); + } + + public bool TryGetValue(TKey key, out TValue value) + { + if (IsUndefined) + { + value = default; + return false; + } + return EnsureDictionary().TryGetValue(key, out value); + } + + public IDictionary EnsureDictionary() + { + return _innerDictionary ??= new Dictionary(); + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Internal/ChangeTrackingList.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Internal/ChangeTrackingList.cs new file mode 100644 index 000000000000..7579b8ecf8b4 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Internal/ChangeTrackingList.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + internal class ChangeTrackingList : IList, IReadOnlyList + { + private IList _innerList; + + public ChangeTrackingList() + { + } + + public ChangeTrackingList(IList innerList) + { + if (innerList != null) + { + _innerList = innerList; + } + } + + public ChangeTrackingList(IReadOnlyList innerList) + { + if (innerList != null) + { + _innerList = innerList.ToList(); + } + } + + public bool IsUndefined => _innerList == null; + + public int Count => IsUndefined ? 0 : EnsureList().Count; + + public bool IsReadOnly => IsUndefined ? false : EnsureList().IsReadOnly; + + public T this[int index] + { + get + { + if (IsUndefined) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + return EnsureList()[index]; + } + set + { + if (IsUndefined) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + EnsureList()[index] = value; + } + } + + public void Reset() + { + _innerList = null; + } + + public IEnumerator GetEnumerator() + { + if (IsUndefined) + { + IEnumerator enumerateEmpty() + { + yield break; + } + return enumerateEmpty(); + } + return EnsureList().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + public void Add(T item) + { + EnsureList().Add(item); + } + + public void Clear() + { + EnsureList().Clear(); + } + + public bool Contains(T item) + { + if (IsUndefined) + { + return false; + } + return EnsureList().Contains(item); + } + + public void CopyTo(T[] array, int arrayIndex) + { + if (IsUndefined) + { + return; + } + EnsureList().CopyTo(array, arrayIndex); + } + + public bool Remove(T item) + { + if (IsUndefined) + { + return false; + } + return EnsureList().Remove(item); + } + + public int IndexOf(T item) + { + if (IsUndefined) + { + return -1; + } + return EnsureList().IndexOf(item); + } + + public void Insert(int index, T item) + { + EnsureList().Insert(index, item); + } + + public void RemoveAt(int index) + { + if (IsUndefined) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + EnsureList().RemoveAt(index); + } + + public IList EnsureList() + { + return _innerList ??= new List(); + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Internal/ModelSerializationExtensions.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Internal/ModelSerializationExtensions.cs new file mode 100644 index 000000000000..06b96bb6c04f --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Internal/ModelSerializationExtensions.cs @@ -0,0 +1,399 @@ +// 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.Diagnostics; +using System.Globalization; +using System.Text.Json; +using System.Xml; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + internal static class ModelSerializationExtensions + { + internal static readonly JsonDocumentOptions JsonDocumentOptions = new JsonDocumentOptions { MaxDepth = 256 }; + internal static readonly ModelReaderWriterOptions WireOptions = new ModelReaderWriterOptions("W"); + + public static object GetObject(this JsonElement element) + { + switch (element.ValueKind) + { + case JsonValueKind.String: + return element.GetString(); + case JsonValueKind.Number: + if (element.TryGetInt32(out int intValue)) + { + return intValue; + } + if (element.TryGetInt64(out long longValue)) + { + return longValue; + } + return element.GetDouble(); + case JsonValueKind.True: + return true; + case JsonValueKind.False: + return false; + case JsonValueKind.Undefined: + case JsonValueKind.Null: + return null; + case JsonValueKind.Object: + var dictionary = new Dictionary(); + foreach (var jsonProperty in element.EnumerateObject()) + { + dictionary.Add(jsonProperty.Name, jsonProperty.Value.GetObject()); + } + return dictionary; + case JsonValueKind.Array: + var list = new List(); + foreach (var item in element.EnumerateArray()) + { + list.Add(item.GetObject()); + } + return list.ToArray(); + default: + throw new NotSupportedException($"Not supported value kind {element.ValueKind}"); + } + } + + public static byte[] GetBytesFromBase64(this JsonElement element, string format) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + + return format switch + { + "U" => TypeFormatters.FromBase64UrlString(element.GetRequiredString()), + "D" => element.GetBytesFromBase64(), + _ => throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)) + }; + } + + public static DateTimeOffset GetDateTimeOffset(this JsonElement element, string format) => format switch + { + "U" when element.ValueKind == JsonValueKind.Number => DateTimeOffset.FromUnixTimeSeconds(element.GetInt64()), + _ => TypeFormatters.ParseDateTimeOffset(element.GetString(), format) + }; + + public static TimeSpan GetTimeSpan(this JsonElement element, string format) => TypeFormatters.ParseTimeSpan(element.GetString(), format); + + public static char GetChar(this JsonElement element) + { + if (element.ValueKind == JsonValueKind.String) + { + var text = element.GetString(); + if (text == null || text.Length != 1) + { + throw new NotSupportedException($"Cannot convert \"{text}\" to a char"); + } + return text[0]; + } + else + { + throw new NotSupportedException($"Cannot convert {element.ValueKind} to a char"); + } + } + + [Conditional("DEBUG")] + public static void ThrowNonNullablePropertyIsNull(this JsonProperty property) + { + throw new JsonException($"A property '{property.Name}' defined as non-nullable but received as null from the service. This exception only happens in DEBUG builds of the library and would be ignored in the release build"); + } + + public static string GetRequiredString(this JsonElement element) + { + var value = element.GetString(); + if (value == null) + { + throw new InvalidOperationException($"The requested operation requires an element of type 'String', but the target element has type '{element.ValueKind}'."); + } + return value; + } + + public static void WriteStringValue(this Utf8JsonWriter writer, DateTimeOffset value, string format) + { + writer.WriteStringValue(TypeFormatters.ToString(value, format)); + } + + public static void WriteStringValue(this Utf8JsonWriter writer, DateTime value, string format) + { + writer.WriteStringValue(TypeFormatters.ToString(value, format)); + } + + public static void WriteStringValue(this Utf8JsonWriter writer, TimeSpan value, string format) + { + writer.WriteStringValue(TypeFormatters.ToString(value, format)); + } + + public static void WriteStringValue(this Utf8JsonWriter writer, char value) + { + writer.WriteStringValue(value.ToString(CultureInfo.InvariantCulture)); + } + + public static void WriteBase64StringValue(this Utf8JsonWriter writer, byte[] value, string format) + { + if (value == null) + { + writer.WriteNullValue(); + return; + } + switch (format) + { + case "U": + writer.WriteStringValue(TypeFormatters.ToBase64UrlString(value)); + break; + case "D": + writer.WriteBase64StringValue(value); + break; + default: + throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)); + } + } + + public static void WriteNumberValue(this Utf8JsonWriter writer, DateTimeOffset value, string format) + { + if (format != "U") + { + throw new ArgumentOutOfRangeException(nameof(format), "Only 'U' format is supported when writing a DateTimeOffset as a Number."); + } + writer.WriteNumberValue(value.ToUnixTimeSeconds()); + } + + public static void WriteObjectValue(this Utf8JsonWriter writer, T value, ModelReaderWriterOptions options = null) + { + switch (value) + { + case null: + writer.WriteNullValue(); + break; + case IJsonModel jsonModel: + jsonModel.Write(writer, options ?? WireOptions); + break; + case IUtf8JsonSerializable serializable: + serializable.Write(writer); + break; + case byte[] bytes: + writer.WriteBase64StringValue(bytes); + break; + case BinaryData bytes0: + writer.WriteBase64StringValue(bytes0); + break; + case JsonElement json: + json.WriteTo(writer); + break; + case int i: + writer.WriteNumberValue(i); + break; + case decimal d: + writer.WriteNumberValue(d); + break; + case double d0: + if (double.IsNaN(d0)) + { + writer.WriteStringValue("NaN"); + } + else + { + writer.WriteNumberValue(d0); + } + break; + case float f: + writer.WriteNumberValue(f); + break; + case long l: + writer.WriteNumberValue(l); + break; + case string s: + writer.WriteStringValue(s); + break; + case bool b: + writer.WriteBooleanValue(b); + break; + case Guid g: + writer.WriteStringValue(g); + break; + case DateTimeOffset dateTimeOffset: + writer.WriteStringValue(dateTimeOffset, "O"); + break; + case DateTime dateTime: + writer.WriteStringValue(dateTime, "O"); + break; + case IEnumerable> enumerable: + writer.WriteStartObject(); + foreach (var pair in enumerable) + { + writer.WritePropertyName(pair.Key); + writer.WriteObjectValue(pair.Value, options); + } + writer.WriteEndObject(); + break; + case IEnumerable objectEnumerable: + writer.WriteStartArray(); + foreach (var item in objectEnumerable) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + break; + case TimeSpan timeSpan: + writer.WriteStringValue(timeSpan, "P"); + break; + default: + throw new NotSupportedException($"Not supported type {value.GetType()}"); + } + } + + public static void WriteObjectValue(this Utf8JsonWriter writer, object value, ModelReaderWriterOptions options = null) + { + writer.WriteObjectValue(value, options); + } + + internal static class TypeFormatters + { + private const string RoundtripZFormat = "yyyy-MM-ddTHH:mm:ss.fffffffZ"; + public const string DefaultNumberFormat = "G"; + + public static string ToString(bool value) => value ? "true" : "false"; + + public static string ToString(DateTime value, string format) => value.Kind switch + { + DateTimeKind.Utc => ToString((DateTimeOffset)value, format), + _ => throw new NotSupportedException($"DateTime {value} has a Kind of {value.Kind}. Azure SDK requires it to be UTC. You can call DateTime.SpecifyKind to change Kind property value to DateTimeKind.Utc.") + }; + + public static string ToString(DateTimeOffset value, string format) => format switch + { + "D" => value.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture), + "U" => value.ToUnixTimeSeconds().ToString(CultureInfo.InvariantCulture), + "O" => value.ToUniversalTime().ToString(RoundtripZFormat, CultureInfo.InvariantCulture), + "o" => value.ToUniversalTime().ToString(RoundtripZFormat, CultureInfo.InvariantCulture), + "R" => value.ToString("r", CultureInfo.InvariantCulture), + _ => value.ToString(format, CultureInfo.InvariantCulture) + }; + + public static string ToString(TimeSpan value, string format) => format switch + { + "P" => XmlConvert.ToString(value), + _ => value.ToString(format, CultureInfo.InvariantCulture) + }; + + public static string ToString(byte[] value, string format) => format switch + { + "U" => ToBase64UrlString(value), + "D" => Convert.ToBase64String(value), + _ => throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)) + }; + + public static string ToBase64UrlString(byte[] value) + { + int numWholeOrPartialInputBlocks = checked(value.Length + 2) / 3; + int size = checked(numWholeOrPartialInputBlocks * 4); + char[] output = new char[size]; + + int numBase64Chars = Convert.ToBase64CharArray(value, 0, value.Length, output, 0); + + int i = 0; + for (; i < numBase64Chars; i++) + { + char ch = output[i]; + if (ch == '+') + { + output[i] = '-'; + } + else + { + if (ch == '/') + { + output[i] = '_'; + } + else + { + if (ch == '=') + { + break; + } + } + } + } + + return new string(output, 0, i); + } + + public static byte[] FromBase64UrlString(string value) + { + int paddingCharsToAdd = (value.Length % 4) switch + { + 0 => 0, + 2 => 2, + 3 => 1, + _ => throw new InvalidOperationException("Malformed input") + }; + char[] output = new char[(value.Length + paddingCharsToAdd)]; + int i = 0; + for (; i < value.Length; i++) + { + char ch = value[i]; + if (ch == '-') + { + output[i] = '+'; + } + else + { + if (ch == '_') + { + output[i] = '/'; + } + else + { + output[i] = ch; + } + } + } + + for (; i < output.Length; i++) + { + output[i] = '='; + } + + return Convert.FromBase64CharArray(output, 0, output.Length); + } + + public static DateTimeOffset ParseDateTimeOffset(string value, string format) => format switch + { + "U" => DateTimeOffset.FromUnixTimeSeconds(long.Parse(value, CultureInfo.InvariantCulture)), + _ => DateTimeOffset.Parse(value, CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal) + }; + + public static TimeSpan ParseTimeSpan(string value, string format) => format switch + { + "P" => XmlConvert.ToTimeSpan(value), + _ => TimeSpan.ParseExact(value, format, CultureInfo.InvariantCulture) + }; + + public static string ConvertToString(object value, string format = null) => value switch + { + null => "null", + string s => s, + bool b => ToString(b), + int or float or double or long or decimal => ((IFormattable)value).ToString(DefaultNumberFormat, CultureInfo.InvariantCulture), + byte[] b0 when format != null => ToString(b0, format), + IEnumerable s0 => string.Join(",", s0), + DateTimeOffset dateTime when format != null => ToString(dateTime, format), + TimeSpan timeSpan when format != null => ToString(timeSpan, format), + TimeSpan timeSpan0 => XmlConvert.ToString(timeSpan0), + Guid guid => guid.ToString(), + BinaryData binaryData => ConvertToString(binaryData.ToArray(), format), + _ => value.ToString() + }; + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Internal/Optional.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Internal/Optional.cs new file mode 100644 index 000000000000..6e81f2408f30 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Internal/Optional.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + internal static class Optional + { + public static bool IsCollectionDefined(IEnumerable collection) + { + return !(collection is ChangeTrackingList changeTrackingList && changeTrackingList.IsUndefined); + } + + public static bool IsCollectionDefined(IDictionary collection) + { + return !(collection is ChangeTrackingDictionary changeTrackingDictionary && changeTrackingDictionary.IsUndefined); + } + + public static bool IsCollectionDefined(IReadOnlyDictionary collection) + { + return !(collection is ChangeTrackingDictionary changeTrackingDictionary && changeTrackingDictionary.IsUndefined); + } + + public static bool IsDefined(T? value) + where T : struct + { + return value.HasValue; + } + + public static bool IsDefined(object value) + { + return value != null; + } + + public static bool IsDefined(JsonElement value) + { + return value.ValueKind != JsonValueKind.Undefined; + } + + public static bool IsDefined(string value) + { + return value != null; + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Internal/Utf8JsonRequestContent.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Internal/Utf8JsonRequestContent.cs new file mode 100644 index 000000000000..041d71542846 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Internal/Utf8JsonRequestContent.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.IO; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + internal class Utf8JsonRequestContent : RequestContent + { + private readonly MemoryStream _stream; + private readonly RequestContent _content; + + public Utf8JsonRequestContent() + { + _stream = new MemoryStream(); + _content = Create(_stream); + JsonWriter = new Utf8JsonWriter(_stream); + } + + public Utf8JsonWriter JsonWriter { get; } + + public override async Task WriteToAsync(Stream stream, CancellationToken cancellationToken = default) + { + await JsonWriter.FlushAsync().ConfigureAwait(false); + await _content.WriteToAsync(stream, cancellationToken).ConfigureAwait(false); + } + + public override void WriteTo(Stream stream, CancellationToken cancellationToken = default) + { + JsonWriter.Flush(); + _content.WriteTo(stream, cancellationToken); + } + + public override bool TryComputeLength(out long length) + { + length = JsonWriter.BytesCommitted + JsonWriter.BytesPending; + return true; + } + + public override void Dispose() + { + JsonWriter.Dispose(); + _content.Dispose(); + _stream.Dispose(); + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/LongRunningOperation/OperationStatusResultOperationSource.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/LongRunningOperation/OperationStatusResultOperationSource.cs new file mode 100644 index 000000000000..80727235dfe5 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/LongRunningOperation/OperationStatusResultOperationSource.cs @@ -0,0 +1,30 @@ +// 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.Core; +using Azure.ResourceManager.SapVirtualInstances.Models; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + internal class OperationStatusResultOperationSource : IOperationSource + { + OperationStatusResult IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + return OperationStatusResult.DeserializeOperationStatusResult(document.RootElement); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + return OperationStatusResult.DeserializeOperationStatusResult(document.RootElement); + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/LongRunningOperation/SapApplicationServerInstanceOperationSource.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/LongRunningOperation/SapApplicationServerInstanceOperationSource.cs new file mode 100644 index 000000000000..ef9b8e3e6b87 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/LongRunningOperation/SapApplicationServerInstanceOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + internal class SapApplicationServerInstanceOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal SapApplicationServerInstanceOperationSource(ArmClient client) + { + _client = client; + } + + SapApplicationServerInstanceResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return new SapApplicationServerInstanceResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return await Task.FromResult(new SapApplicationServerInstanceResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/LongRunningOperation/SapCentralServerInstanceOperationSource.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/LongRunningOperation/SapCentralServerInstanceOperationSource.cs new file mode 100644 index 000000000000..6ba94563a78d --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/LongRunningOperation/SapCentralServerInstanceOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + internal class SapCentralServerInstanceOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal SapCentralServerInstanceOperationSource(ArmClient client) + { + _client = client; + } + + SapCentralServerInstanceResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return new SapCentralServerInstanceResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return await Task.FromResult(new SapCentralServerInstanceResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/LongRunningOperation/SapDatabaseInstanceOperationSource.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/LongRunningOperation/SapDatabaseInstanceOperationSource.cs new file mode 100644 index 000000000000..f0279d2ad390 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/LongRunningOperation/SapDatabaseInstanceOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + internal class SapDatabaseInstanceOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal SapDatabaseInstanceOperationSource(ArmClient client) + { + _client = client; + } + + SapDatabaseInstanceResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return new SapDatabaseInstanceResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return await Task.FromResult(new SapDatabaseInstanceResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/LongRunningOperation/SapVirtualInstanceOperationSource.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/LongRunningOperation/SapVirtualInstanceOperationSource.cs new file mode 100644 index 000000000000..412f26aaf925 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/LongRunningOperation/SapVirtualInstanceOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + internal class SapVirtualInstanceOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal SapVirtualInstanceOperationSource(ArmClient client) + { + _client = client; + } + + SapVirtualInstanceResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return new SapVirtualInstanceResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content); + return await Task.FromResult(new SapVirtualInstanceResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/LongRunningOperation/SapVirtualInstancesArmOperation.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/LongRunningOperation/SapVirtualInstancesArmOperation.cs new file mode 100644 index 000000000000..36f0f8397130 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/LongRunningOperation/SapVirtualInstancesArmOperation.cs @@ -0,0 +1,94 @@ +// 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.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.SapVirtualInstances +{ +#pragma warning disable SA1649 // File name should match first type name + internal class SapVirtualInstancesArmOperation : ArmOperation +#pragma warning restore SA1649 // File name should match first type name + { + private readonly OperationInternal _operation; + private readonly RehydrationToken? _completeRehydrationToken; + private readonly NextLinkOperationImplementation _nextLinkOperation; + private readonly string _operationId; + + /// Initializes a new instance of SapVirtualInstancesArmOperation for mocking. + protected SapVirtualInstancesArmOperation() + { + } + + internal SapVirtualInstancesArmOperation(Response response, RehydrationToken? rehydrationToken = null) + { + _operation = OperationInternal.Succeeded(response); + _completeRehydrationToken = rehydrationToken; + _operationId = GetOperationId(rehydrationToken); + } + + internal SapVirtualInstancesArmOperation(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response, OperationFinalStateVia finalStateVia, bool skipApiVersionOverride = false, string apiVersionOverrideValue = null) + { + var nextLinkOperation = NextLinkOperationImplementation.Create(pipeline, request.Method, request.Uri.ToUri(), response, finalStateVia, skipApiVersionOverride, apiVersionOverrideValue); + if (nextLinkOperation is NextLinkOperationImplementation nextLinkOperationValue) + { + _nextLinkOperation = nextLinkOperationValue; + _operationId = _nextLinkOperation.OperationId; + } + else + { + _completeRehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(request.Method, request.Uri.ToUri(), response, finalStateVia); + _operationId = GetOperationId(_completeRehydrationToken); + } + _operation = new OperationInternal(nextLinkOperation, clientDiagnostics, response, "SapVirtualInstancesArmOperation", fallbackStrategy: new SequentialDelayStrategy()); + } + + private string GetOperationId(RehydrationToken? rehydrationToken) + { + if (rehydrationToken is null) + { + return null; + } + var lroDetails = ModelReaderWriter.Write(rehydrationToken, ModelReaderWriterOptions.Json).ToObjectFromJson>(); + return lroDetails["id"]; + } + /// + public override string Id => _operationId ?? NextLinkOperationImplementation.NotSet; + + /// + public override RehydrationToken? GetRehydrationToken() => _nextLinkOperation?.GetRehydrationToken() ?? _completeRehydrationToken; + + /// + public override bool HasCompleted => _operation.HasCompleted; + + /// + public override Response GetRawResponse() => _operation.RawResponse; + + /// + public override Response UpdateStatus(CancellationToken cancellationToken = default) => _operation.UpdateStatus(cancellationToken); + + /// + public override ValueTask UpdateStatusAsync(CancellationToken cancellationToken = default) => _operation.UpdateStatusAsync(cancellationToken); + + /// + public override Response WaitForCompletionResponse(CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponse(cancellationToken); + + /// + public override Response WaitForCompletionResponse(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponse(pollingInterval, cancellationToken); + + /// + public override ValueTask WaitForCompletionResponseAsync(CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponseAsync(cancellationToken); + + /// + public override ValueTask WaitForCompletionResponseAsync(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponseAsync(pollingInterval, cancellationToken); + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/LongRunningOperation/SapVirtualInstancesArmOperationOfT.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/LongRunningOperation/SapVirtualInstancesArmOperationOfT.cs new file mode 100644 index 000000000000..ca203c47d1af --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/LongRunningOperation/SapVirtualInstancesArmOperationOfT.cs @@ -0,0 +1,100 @@ +// 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.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.SapVirtualInstances +{ +#pragma warning disable SA1649 // File name should match first type name + internal class SapVirtualInstancesArmOperation : ArmOperation +#pragma warning restore SA1649 // File name should match first type name + { + private readonly OperationInternal _operation; + private readonly RehydrationToken? _completeRehydrationToken; + private readonly NextLinkOperationImplementation _nextLinkOperation; + private readonly string _operationId; + + /// Initializes a new instance of SapVirtualInstancesArmOperation for mocking. + protected SapVirtualInstancesArmOperation() + { + } + + internal SapVirtualInstancesArmOperation(Response response, RehydrationToken? rehydrationToken = null) + { + _operation = OperationInternal.Succeeded(response.GetRawResponse(), response.Value); + _completeRehydrationToken = rehydrationToken; + _operationId = GetOperationId(rehydrationToken); + } + + internal SapVirtualInstancesArmOperation(IOperationSource source, ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response, OperationFinalStateVia finalStateVia, bool skipApiVersionOverride = false, string apiVersionOverrideValue = null) + { + var nextLinkOperation = NextLinkOperationImplementation.Create(pipeline, request.Method, request.Uri.ToUri(), response, finalStateVia, skipApiVersionOverride, apiVersionOverrideValue); + if (nextLinkOperation is NextLinkOperationImplementation nextLinkOperationValue) + { + _nextLinkOperation = nextLinkOperationValue; + _operationId = _nextLinkOperation.OperationId; + } + else + { + _completeRehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(request.Method, request.Uri.ToUri(), response, finalStateVia); + _operationId = GetOperationId(_completeRehydrationToken); + } + _operation = new OperationInternal(NextLinkOperationImplementation.Create(source, nextLinkOperation), clientDiagnostics, response, "SapVirtualInstancesArmOperation", fallbackStrategy: new SequentialDelayStrategy()); + } + + private string GetOperationId(RehydrationToken? rehydrationToken) + { + if (rehydrationToken is null) + { + return null; + } + var lroDetails = ModelReaderWriter.Write(rehydrationToken, ModelReaderWriterOptions.Json).ToObjectFromJson>(); + return lroDetails["id"]; + } + /// + public override string Id => _operationId ?? NextLinkOperationImplementation.NotSet; + + /// + public override RehydrationToken? GetRehydrationToken() => _nextLinkOperation?.GetRehydrationToken() ?? _completeRehydrationToken; + + /// + public override T Value => _operation.Value; + + /// + public override bool HasValue => _operation.HasValue; + + /// + public override bool HasCompleted => _operation.HasCompleted; + + /// + public override Response GetRawResponse() => _operation.RawResponse; + + /// + public override Response UpdateStatus(CancellationToken cancellationToken = default) => _operation.UpdateStatus(cancellationToken); + + /// + public override ValueTask UpdateStatusAsync(CancellationToken cancellationToken = default) => _operation.UpdateStatusAsync(cancellationToken); + + /// + public override Response WaitForCompletion(CancellationToken cancellationToken = default) => _operation.WaitForCompletion(cancellationToken); + + /// + public override Response WaitForCompletion(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletion(pollingInterval, cancellationToken); + + /// + public override ValueTask> WaitForCompletionAsync(CancellationToken cancellationToken = default) => _operation.WaitForCompletionAsync(cancellationToken); + + /// + public override ValueTask> WaitForCompletionAsync(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionAsync(pollingInterval, cancellationToken); + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ApplicationServerConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ApplicationServerConfiguration.Serialization.cs new file mode 100644 index 000000000000..230c9e837cba --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ApplicationServerConfiguration.Serialization.cs @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class ApplicationServerConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ApplicationServerConfiguration)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("subnetId"u8); + writer.WriteStringValue(SubnetId); + writer.WritePropertyName("virtualMachineConfiguration"u8); + writer.WriteObjectValue(VirtualMachineConfiguration, options); + writer.WritePropertyName("instanceCount"u8); + writer.WriteNumberValue(InstanceCount); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ApplicationServerConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ApplicationServerConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeApplicationServerConfiguration(document.RootElement, options); + } + + internal static ApplicationServerConfiguration DeserializeApplicationServerConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string subnetId = default; + VirtualMachineConfiguration virtualMachineConfiguration = default; + long instanceCount = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("subnetId"u8)) + { + subnetId = property.Value.GetString(); + continue; + } + if (property.NameEquals("virtualMachineConfiguration"u8)) + { + virtualMachineConfiguration = VirtualMachineConfiguration.DeserializeVirtualMachineConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("instanceCount"u8)) + { + instanceCount = property.Value.GetInt64(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ApplicationServerConfiguration(subnetId, virtualMachineConfiguration, instanceCount, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ApplicationServerConfiguration)} does not support writing '{options.Format}' format."); + } + } + + ApplicationServerConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApplicationServerConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ApplicationServerConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ApplicationServerConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ApplicationServerConfiguration.cs new file mode 100644 index 000000000000..f21ab55ca189 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ApplicationServerConfiguration.cs @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Gets or sets the application server configuration. + public partial class ApplicationServerConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The subnet id. + /// Gets or sets the virtual machine configuration. + /// The number of app server instances. + /// or is null. + public ApplicationServerConfiguration(string subnetId, VirtualMachineConfiguration virtualMachineConfiguration, long instanceCount) + { + Argument.AssertNotNull(subnetId, nameof(subnetId)); + Argument.AssertNotNull(virtualMachineConfiguration, nameof(virtualMachineConfiguration)); + + SubnetId = subnetId; + VirtualMachineConfiguration = virtualMachineConfiguration; + InstanceCount = instanceCount; + } + + /// Initializes a new instance of . + /// The subnet id. + /// Gets or sets the virtual machine configuration. + /// The number of app server instances. + /// Keeps track of any properties unknown to the library. + internal ApplicationServerConfiguration(string subnetId, VirtualMachineConfiguration virtualMachineConfiguration, long instanceCount, IDictionary serializedAdditionalRawData) + { + SubnetId = subnetId; + VirtualMachineConfiguration = virtualMachineConfiguration; + InstanceCount = instanceCount; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ApplicationServerConfiguration() + { + } + + /// The subnet id. + public string SubnetId { get; set; } + /// Gets or sets the virtual machine configuration. + public VirtualMachineConfiguration VirtualMachineConfiguration { get; set; } + /// The number of app server instances. + public long InstanceCount { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ApplicationServerFullResourceNames.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ApplicationServerFullResourceNames.Serialization.cs new file mode 100644 index 000000000000..962eccd45a18 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ApplicationServerFullResourceNames.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; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class ApplicationServerFullResourceNames : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ApplicationServerFullResourceNames)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(VirtualMachines)) + { + writer.WritePropertyName("virtualMachines"u8); + writer.WriteStartArray(); + foreach (var item in VirtualMachines) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(AvailabilitySetName)) + { + writer.WritePropertyName("availabilitySetName"u8); + writer.WriteStringValue(AvailabilitySetName); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ApplicationServerFullResourceNames IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ApplicationServerFullResourceNames)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeApplicationServerFullResourceNames(document.RootElement, options); + } + + internal static ApplicationServerFullResourceNames DeserializeApplicationServerFullResourceNames(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList virtualMachines = default; + string availabilitySetName = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("virtualMachines"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(VirtualMachineResourceNames.DeserializeVirtualMachineResourceNames(item, options)); + } + virtualMachines = array; + continue; + } + if (property.NameEquals("availabilitySetName"u8)) + { + availabilitySetName = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ApplicationServerFullResourceNames(virtualMachines ?? new ChangeTrackingList(), availabilitySetName, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ApplicationServerFullResourceNames)} does not support writing '{options.Format}' format."); + } + } + + ApplicationServerFullResourceNames IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApplicationServerFullResourceNames(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ApplicationServerFullResourceNames)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ApplicationServerFullResourceNames.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ApplicationServerFullResourceNames.cs new file mode 100644 index 000000000000..2684ded71ef5 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ApplicationServerFullResourceNames.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The full resource names object for application layer resources. The number of entries in this list should be equal to the number VMs to be created for application layer. + public partial class ApplicationServerFullResourceNames + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ApplicationServerFullResourceNames() + { + VirtualMachines = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The list of virtual machine naming details. + /// The full name for availability set. In case name is not provided, it will be defaulted to {SID}-App-AvSet. + /// Keeps track of any properties unknown to the library. + internal ApplicationServerFullResourceNames(IList virtualMachines, string availabilitySetName, IDictionary serializedAdditionalRawData) + { + VirtualMachines = virtualMachines; + AvailabilitySetName = availabilitySetName; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The list of virtual machine naming details. + public IList VirtualMachines { get; } + /// The full name for availability set. In case name is not provided, it will be defaulted to {SID}-App-AvSet. + public string AvailabilitySetName { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ApplicationServerVirtualMachineType.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ApplicationServerVirtualMachineType.cs new file mode 100644 index 000000000000..67767c76873c --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ApplicationServerVirtualMachineType.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the type of application server VM. + public readonly partial struct ApplicationServerVirtualMachineType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ApplicationServerVirtualMachineType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ActiveValue = "Active"; + private const string StandbyValue = "Standby"; + private const string UnknownValue = "Unknown"; + + /// Active Application server vm type. + public static ApplicationServerVirtualMachineType Active { get; } = new ApplicationServerVirtualMachineType(ActiveValue); + /// Standby Application server vm type. + public static ApplicationServerVirtualMachineType Standby { get; } = new ApplicationServerVirtualMachineType(StandbyValue); + /// Unknown Application server vm type. + public static ApplicationServerVirtualMachineType Unknown { get; } = new ApplicationServerVirtualMachineType(UnknownValue); + /// Determines if two values are the same. + public static bool operator ==(ApplicationServerVirtualMachineType left, ApplicationServerVirtualMachineType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ApplicationServerVirtualMachineType left, ApplicationServerVirtualMachineType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ApplicationServerVirtualMachineType(string value) => new ApplicationServerVirtualMachineType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ApplicationServerVirtualMachineType other && Equals(other); + /// + public bool Equals(ApplicationServerVirtualMachineType 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/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ApplicationServerVmDetails.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ApplicationServerVmDetails.Serialization.cs new file mode 100644 index 000000000000..70852bf29f4f --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ApplicationServerVmDetails.Serialization.cs @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class ApplicationServerVmDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ApplicationServerVmDetails)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(Type)) + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(VirtualMachineId)) + { + writer.WritePropertyName("virtualMachineId"u8); + writer.WriteStringValue(VirtualMachineId); + } + if (options.Format != "W" && Optional.IsCollectionDefined(StorageDetails)) + { + writer.WritePropertyName("storageDetails"u8); + writer.WriteStartArray(); + foreach (var item in StorageDetails) + { + JsonSerializer.Serialize(writer, item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ApplicationServerVmDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ApplicationServerVmDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeApplicationServerVmDetails(document.RootElement, options); + } + + internal static ApplicationServerVmDetails DeserializeApplicationServerVmDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ApplicationServerVirtualMachineType? type = default; + string virtualMachineId = default; + IReadOnlyList storageDetails = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + type = new ApplicationServerVirtualMachineType(property.Value.GetString()); + continue; + } + if (property.NameEquals("virtualMachineId"u8)) + { + virtualMachineId = property.Value.GetString(); + continue; + } + if (property.NameEquals("storageDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(JsonSerializer.Deserialize(item.GetRawText())); + } + storageDetails = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ApplicationServerVmDetails(type, virtualMachineId, storageDetails ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ApplicationServerVmDetails)} does not support writing '{options.Format}' format."); + } + } + + ApplicationServerVmDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApplicationServerVmDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ApplicationServerVmDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ApplicationServerVmDetails.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ApplicationServerVmDetails.cs new file mode 100644 index 000000000000..e6ca6f6ac72e --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ApplicationServerVmDetails.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The Application Server VM Details. + public partial class ApplicationServerVmDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal ApplicationServerVmDetails() + { + StorageDetails = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Defines the type of application server VM. + /// The virtual machine id. + /// Storage details of all the Storage Accounts attached to the App Virtual Machine. For e.g. NFS on AFS Shared Storage. + /// Keeps track of any properties unknown to the library. + internal ApplicationServerVmDetails(ApplicationServerVirtualMachineType? type, string virtualMachineId, IReadOnlyList storageDetails, IDictionary serializedAdditionalRawData) + { + Type = type; + VirtualMachineId = virtualMachineId; + StorageDetails = storageDetails; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Defines the type of application server VM. + public ApplicationServerVirtualMachineType? Type { get; } + /// The virtual machine id. + public string VirtualMachineId { get; } + /// Storage details of all the Storage Accounts attached to the App Virtual Machine. For e.g. NFS on AFS Shared Storage. + public IReadOnlyList StorageDetails { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CentralServerConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CentralServerConfiguration.Serialization.cs new file mode 100644 index 000000000000..adac74407796 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CentralServerConfiguration.Serialization.cs @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class CentralServerConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CentralServerConfiguration)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("subnetId"u8); + writer.WriteStringValue(SubnetId); + writer.WritePropertyName("virtualMachineConfiguration"u8); + writer.WriteObjectValue(VirtualMachineConfiguration, options); + writer.WritePropertyName("instanceCount"u8); + writer.WriteNumberValue(InstanceCount); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + CentralServerConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CentralServerConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCentralServerConfiguration(document.RootElement, options); + } + + internal static CentralServerConfiguration DeserializeCentralServerConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string subnetId = default; + VirtualMachineConfiguration virtualMachineConfiguration = default; + long instanceCount = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("subnetId"u8)) + { + subnetId = property.Value.GetString(); + continue; + } + if (property.NameEquals("virtualMachineConfiguration"u8)) + { + virtualMachineConfiguration = VirtualMachineConfiguration.DeserializeVirtualMachineConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("instanceCount"u8)) + { + instanceCount = property.Value.GetInt64(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CentralServerConfiguration(subnetId, virtualMachineConfiguration, instanceCount, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(CentralServerConfiguration)} does not support writing '{options.Format}' format."); + } + } + + CentralServerConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeCentralServerConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CentralServerConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CentralServerConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CentralServerConfiguration.cs new file mode 100644 index 000000000000..53b7f9ec28b2 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CentralServerConfiguration.cs @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Gets or sets the central server configuration. + public partial class CentralServerConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The subnet id. + /// Gets or sets the virtual machine configuration. + /// The number of central server VMs. + /// or is null. + public CentralServerConfiguration(string subnetId, VirtualMachineConfiguration virtualMachineConfiguration, long instanceCount) + { + Argument.AssertNotNull(subnetId, nameof(subnetId)); + Argument.AssertNotNull(virtualMachineConfiguration, nameof(virtualMachineConfiguration)); + + SubnetId = subnetId; + VirtualMachineConfiguration = virtualMachineConfiguration; + InstanceCount = instanceCount; + } + + /// Initializes a new instance of . + /// The subnet id. + /// Gets or sets the virtual machine configuration. + /// The number of central server VMs. + /// Keeps track of any properties unknown to the library. + internal CentralServerConfiguration(string subnetId, VirtualMachineConfiguration virtualMachineConfiguration, long instanceCount, IDictionary serializedAdditionalRawData) + { + SubnetId = subnetId; + VirtualMachineConfiguration = virtualMachineConfiguration; + InstanceCount = instanceCount; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal CentralServerConfiguration() + { + } + + /// The subnet id. + public string SubnetId { get; set; } + /// Gets or sets the virtual machine configuration. + public VirtualMachineConfiguration VirtualMachineConfiguration { get; set; } + /// The number of central server VMs. + public long InstanceCount { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CentralServerFullResourceNames.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CentralServerFullResourceNames.Serialization.cs new file mode 100644 index 000000000000..1cbfd492a1ca --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CentralServerFullResourceNames.Serialization.cs @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class CentralServerFullResourceNames : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CentralServerFullResourceNames)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(VirtualMachines)) + { + writer.WritePropertyName("virtualMachines"u8); + writer.WriteStartArray(); + foreach (var item in VirtualMachines) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(AvailabilitySetName)) + { + writer.WritePropertyName("availabilitySetName"u8); + writer.WriteStringValue(AvailabilitySetName); + } + if (Optional.IsDefined(LoadBalancer)) + { + writer.WritePropertyName("loadBalancer"u8); + writer.WriteObjectValue(LoadBalancer, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + CentralServerFullResourceNames IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CentralServerFullResourceNames)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCentralServerFullResourceNames(document.RootElement, options); + } + + internal static CentralServerFullResourceNames DeserializeCentralServerFullResourceNames(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList virtualMachines = default; + string availabilitySetName = default; + LoadBalancerResourceNames loadBalancer = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("virtualMachines"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(VirtualMachineResourceNames.DeserializeVirtualMachineResourceNames(item, options)); + } + virtualMachines = array; + continue; + } + if (property.NameEquals("availabilitySetName"u8)) + { + availabilitySetName = property.Value.GetString(); + continue; + } + if (property.NameEquals("loadBalancer"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + loadBalancer = LoadBalancerResourceNames.DeserializeLoadBalancerResourceNames(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CentralServerFullResourceNames(virtualMachines ?? new ChangeTrackingList(), availabilitySetName, loadBalancer, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(CentralServerFullResourceNames)} does not support writing '{options.Format}' format."); + } + } + + CentralServerFullResourceNames IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeCentralServerFullResourceNames(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CentralServerFullResourceNames)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CentralServerFullResourceNames.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CentralServerFullResourceNames.cs new file mode 100644 index 000000000000..dbfcd78a10e8 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CentralServerFullResourceNames.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The full resource names object for central server layer resources. + public partial class CentralServerFullResourceNames + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public CentralServerFullResourceNames() + { + VirtualMachines = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The list of names for all ASCS virtual machines to be deployed. The number of entries in this list should be equal to the number VMs to be created for ASCS layer. At maximum, there can be two virtual machines at this layer: ASCS and ERS. + /// The full name for availability set. In case name is not provided, it will be defaulted to {SID}-ASCS-AvSet. + /// The resource names object for load balancer and related resources. + /// Keeps track of any properties unknown to the library. + internal CentralServerFullResourceNames(IList virtualMachines, string availabilitySetName, LoadBalancerResourceNames loadBalancer, IDictionary serializedAdditionalRawData) + { + VirtualMachines = virtualMachines; + AvailabilitySetName = availabilitySetName; + LoadBalancer = loadBalancer; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The list of names for all ASCS virtual machines to be deployed. The number of entries in this list should be equal to the number VMs to be created for ASCS layer. At maximum, there can be two virtual machines at this layer: ASCS and ERS. + public IList VirtualMachines { get; } + /// The full name for availability set. In case name is not provided, it will be defaulted to {SID}-ASCS-AvSet. + public string AvailabilitySetName { get; set; } + /// The resource names object for load balancer and related resources. + public LoadBalancerResourceNames LoadBalancer { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CentralServerVirtualMachineType.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CentralServerVirtualMachineType.cs new file mode 100644 index 000000000000..49877dfa61b0 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CentralServerVirtualMachineType.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the type of central server VM. + public readonly partial struct CentralServerVirtualMachineType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public CentralServerVirtualMachineType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PrimaryValue = "Primary"; + private const string SecondaryValue = "Secondary"; + private const string UnknownValue = "Unknown"; + private const string ASCSValue = "ASCS"; + private const string ERSInactiveValue = "ERSInactive"; + private const string ERSValue = "ERS"; + private const string StandbyValue = "Standby"; + + /// Primary central server vm. + public static CentralServerVirtualMachineType Primary { get; } = new CentralServerVirtualMachineType(PrimaryValue); + /// Secondary central server vm. + public static CentralServerVirtualMachineType Secondary { get; } = new CentralServerVirtualMachineType(SecondaryValue); + /// Central server vm type unknown. + public static CentralServerVirtualMachineType Unknown { get; } = new CentralServerVirtualMachineType(UnknownValue); + /// ASCS Central server vm type. + public static CentralServerVirtualMachineType ASCS { get; } = new CentralServerVirtualMachineType(ASCSValue); + /// ERSInactive Central server vm type. + public static CentralServerVirtualMachineType ERSInactive { get; } = new CentralServerVirtualMachineType(ERSInactiveValue); + /// ERS Central server vm type. + public static CentralServerVirtualMachineType ERS { get; } = new CentralServerVirtualMachineType(ERSValue); + /// Standby Central server vm type. + public static CentralServerVirtualMachineType Standby { get; } = new CentralServerVirtualMachineType(StandbyValue); + /// Determines if two values are the same. + public static bool operator ==(CentralServerVirtualMachineType left, CentralServerVirtualMachineType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(CentralServerVirtualMachineType left, CentralServerVirtualMachineType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator CentralServerVirtualMachineType(string value) => new CentralServerVirtualMachineType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is CentralServerVirtualMachineType other && Equals(other); + /// + public bool Equals(CentralServerVirtualMachineType 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/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CentralServerVmDetails.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CentralServerVmDetails.Serialization.cs new file mode 100644 index 000000000000..9849391422cd --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CentralServerVmDetails.Serialization.cs @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class CentralServerVmDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CentralServerVmDetails)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(Type)) + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(VirtualMachineId)) + { + writer.WritePropertyName("virtualMachineId"u8); + writer.WriteStringValue(VirtualMachineId); + } + if (options.Format != "W" && Optional.IsCollectionDefined(StorageDetails)) + { + writer.WritePropertyName("storageDetails"u8); + writer.WriteStartArray(); + foreach (var item in StorageDetails) + { + JsonSerializer.Serialize(writer, item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + CentralServerVmDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CentralServerVmDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCentralServerVmDetails(document.RootElement, options); + } + + internal static CentralServerVmDetails DeserializeCentralServerVmDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + CentralServerVirtualMachineType? type = default; + string virtualMachineId = default; + IReadOnlyList storageDetails = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + type = new CentralServerVirtualMachineType(property.Value.GetString()); + continue; + } + if (property.NameEquals("virtualMachineId"u8)) + { + virtualMachineId = property.Value.GetString(); + continue; + } + if (property.NameEquals("storageDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(JsonSerializer.Deserialize(item.GetRawText())); + } + storageDetails = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CentralServerVmDetails(type, virtualMachineId, storageDetails ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(CentralServerVmDetails)} does not support writing '{options.Format}' format."); + } + } + + CentralServerVmDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeCentralServerVmDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CentralServerVmDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CentralServerVmDetails.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CentralServerVmDetails.cs new file mode 100644 index 000000000000..626e32d3317b --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CentralServerVmDetails.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The SAP Central Services Instance VM details. + public partial class CentralServerVmDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal CentralServerVmDetails() + { + StorageDetails = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Defines the type of central server VM. + /// The virtual machine id. + /// Storage details of all the Storage Accounts attached to the ASCS Virtual Machine. For e.g. NFS on AFS Shared Storage. + /// Keeps track of any properties unknown to the library. + internal CentralServerVmDetails(CentralServerVirtualMachineType? type, string virtualMachineId, IReadOnlyList storageDetails, IDictionary serializedAdditionalRawData) + { + Type = type; + VirtualMachineId = virtualMachineId; + StorageDetails = storageDetails; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Defines the type of central server VM. + public CentralServerVirtualMachineType? Type { get; } + /// The virtual machine id. + public string VirtualMachineId { get; } + /// Storage details of all the Storage Accounts attached to the ASCS Virtual Machine. For e.g. NFS on AFS Shared Storage. + public IReadOnlyList StorageDetails { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CreateAndMountFileShareConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CreateAndMountFileShareConfiguration.Serialization.cs new file mode 100644 index 000000000000..4c540a2ff405 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CreateAndMountFileShareConfiguration.Serialization.cs @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class CreateAndMountFileShareConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CreateAndMountFileShareConfiguration)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(ResourceGroup)) + { + writer.WritePropertyName("resourceGroup"u8); + writer.WriteStringValue(ResourceGroup); + } + if (Optional.IsDefined(StorageAccountName)) + { + writer.WritePropertyName("storageAccountName"u8); + writer.WriteStringValue(StorageAccountName); + } + } + + CreateAndMountFileShareConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CreateAndMountFileShareConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCreateAndMountFileShareConfiguration(document.RootElement, options); + } + + internal static CreateAndMountFileShareConfiguration DeserializeCreateAndMountFileShareConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string resourceGroup = default; + string storageAccountName = default; + FileShareConfigurationType configurationType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("resourceGroup"u8)) + { + resourceGroup = property.Value.GetString(); + continue; + } + if (property.NameEquals("storageAccountName"u8)) + { + storageAccountName = property.Value.GetString(); + continue; + } + if (property.NameEquals("configurationType"u8)) + { + configurationType = new FileShareConfigurationType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CreateAndMountFileShareConfiguration(configurationType, serializedAdditionalRawData, resourceGroup, storageAccountName); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(CreateAndMountFileShareConfiguration)} does not support writing '{options.Format}' format."); + } + } + + CreateAndMountFileShareConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeCreateAndMountFileShareConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CreateAndMountFileShareConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CreateAndMountFileShareConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CreateAndMountFileShareConfiguration.cs new file mode 100644 index 000000000000..fc2dbbd2fecb --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/CreateAndMountFileShareConfiguration.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Gets or sets the file share configuration where the transport directory fileshare is created and mounted as a part of the create infra flow. Please pre-create the resource group you intend to place the transport directory in. The storage account and fileshare will be auto-created by the ACSS and doesn't need to be pre-created. + public partial class CreateAndMountFileShareConfiguration : FileShareConfiguration + { + /// Initializes a new instance of . + public CreateAndMountFileShareConfiguration() + { + ConfigurationType = FileShareConfigurationType.CreateAndMount; + } + + /// Initializes a new instance of . + /// The type of file share config, eg: Mount/CreateAndMount/Skip. + /// Keeps track of any properties unknown to the library. + /// The name of transport file share resource group. This should be pre created by the customer. The app rg is used in case of missing input. + /// The name of file share storage account name . A custom name is used in case of missing input. + internal CreateAndMountFileShareConfiguration(FileShareConfigurationType configurationType, IDictionary serializedAdditionalRawData, string resourceGroup, string storageAccountName) : base(configurationType, serializedAdditionalRawData) + { + ResourceGroup = resourceGroup; + StorageAccountName = storageAccountName; + ConfigurationType = configurationType; + } + + /// The name of transport file share resource group. This should be pre created by the customer. The app rg is used in case of missing input. + public string ResourceGroup { get; set; } + /// The name of file share storage account name . A custom name is used in case of missing input. + public string StorageAccountName { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DatabaseConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DatabaseConfiguration.Serialization.cs new file mode 100644 index 000000000000..edb305cd8ea4 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DatabaseConfiguration.Serialization.cs @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class DatabaseConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DatabaseConfiguration)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(DatabaseType)) + { + writer.WritePropertyName("databaseType"u8); + writer.WriteStringValue(DatabaseType.Value.ToString()); + } + writer.WritePropertyName("subnetId"u8); + writer.WriteStringValue(SubnetId); + writer.WritePropertyName("virtualMachineConfiguration"u8); + writer.WriteObjectValue(VirtualMachineConfiguration, options); + writer.WritePropertyName("instanceCount"u8); + writer.WriteNumberValue(InstanceCount); + if (Optional.IsDefined(DiskConfiguration)) + { + writer.WritePropertyName("diskConfiguration"u8); + writer.WriteObjectValue(DiskConfiguration, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DatabaseConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DatabaseConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDatabaseConfiguration(document.RootElement, options); + } + + internal static DatabaseConfiguration DeserializeDatabaseConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + SapDatabaseType? databaseType = default; + string subnetId = default; + VirtualMachineConfiguration virtualMachineConfiguration = default; + long instanceCount = default; + DiskConfiguration diskConfiguration = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("databaseType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + databaseType = new SapDatabaseType(property.Value.GetString()); + continue; + } + if (property.NameEquals("subnetId"u8)) + { + subnetId = property.Value.GetString(); + continue; + } + if (property.NameEquals("virtualMachineConfiguration"u8)) + { + virtualMachineConfiguration = VirtualMachineConfiguration.DeserializeVirtualMachineConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("instanceCount"u8)) + { + instanceCount = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("diskConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + diskConfiguration = DiskConfiguration.DeserializeDiskConfiguration(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DatabaseConfiguration( + databaseType, + subnetId, + virtualMachineConfiguration, + instanceCount, + diskConfiguration, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DatabaseConfiguration)} does not support writing '{options.Format}' format."); + } + } + + DatabaseConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDatabaseConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DatabaseConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DatabaseConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DatabaseConfiguration.cs new file mode 100644 index 000000000000..69aee508d675 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DatabaseConfiguration.cs @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Gets or sets the database configuration. + public partial class DatabaseConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The subnet id. + /// Gets or sets the virtual machine configuration. + /// The number of database VMs. + /// or is null. + public DatabaseConfiguration(string subnetId, VirtualMachineConfiguration virtualMachineConfiguration, long instanceCount) + { + Argument.AssertNotNull(subnetId, nameof(subnetId)); + Argument.AssertNotNull(virtualMachineConfiguration, nameof(virtualMachineConfiguration)); + + SubnetId = subnetId; + VirtualMachineConfiguration = virtualMachineConfiguration; + InstanceCount = instanceCount; + } + + /// Initializes a new instance of . + /// The database type. + /// The subnet id. + /// Gets or sets the virtual machine configuration. + /// The number of database VMs. + /// Gets or sets the disk configuration. + /// Keeps track of any properties unknown to the library. + internal DatabaseConfiguration(SapDatabaseType? databaseType, string subnetId, VirtualMachineConfiguration virtualMachineConfiguration, long instanceCount, DiskConfiguration diskConfiguration, IDictionary serializedAdditionalRawData) + { + DatabaseType = databaseType; + SubnetId = subnetId; + VirtualMachineConfiguration = virtualMachineConfiguration; + InstanceCount = instanceCount; + DiskConfiguration = diskConfiguration; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DatabaseConfiguration() + { + } + + /// The database type. + public SapDatabaseType? DatabaseType { get; set; } + /// The subnet id. + public string SubnetId { get; set; } + /// Gets or sets the virtual machine configuration. + public VirtualMachineConfiguration VirtualMachineConfiguration { get; set; } + /// The number of database VMs. + public long InstanceCount { get; set; } + /// Gets or sets the disk configuration. + internal DiskConfiguration DiskConfiguration { get; set; } + /// The disk configuration for the db volume. For HANA, Required volumes are: ['hana/data', 'hana/log', hana/shared', 'usr/sap', 'os'], Optional volume : ['backup']. + public IDictionary DiskVolumeConfigurations + { + get + { + if (DiskConfiguration is null) + DiskConfiguration = new DiskConfiguration(); + return DiskConfiguration.DiskVolumeConfigurations; + } + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DatabaseServerFullResourceNames.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DatabaseServerFullResourceNames.Serialization.cs new file mode 100644 index 000000000000..26fcacc0da32 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DatabaseServerFullResourceNames.Serialization.cs @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class DatabaseServerFullResourceNames : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DatabaseServerFullResourceNames)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(VirtualMachines)) + { + writer.WritePropertyName("virtualMachines"u8); + writer.WriteStartArray(); + foreach (var item in VirtualMachines) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(AvailabilitySetName)) + { + writer.WritePropertyName("availabilitySetName"u8); + writer.WriteStringValue(AvailabilitySetName); + } + if (Optional.IsDefined(LoadBalancer)) + { + writer.WritePropertyName("loadBalancer"u8); + writer.WriteObjectValue(LoadBalancer, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DatabaseServerFullResourceNames IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DatabaseServerFullResourceNames)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDatabaseServerFullResourceNames(document.RootElement, options); + } + + internal static DatabaseServerFullResourceNames DeserializeDatabaseServerFullResourceNames(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList virtualMachines = default; + string availabilitySetName = default; + LoadBalancerResourceNames loadBalancer = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("virtualMachines"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(VirtualMachineResourceNames.DeserializeVirtualMachineResourceNames(item, options)); + } + virtualMachines = array; + continue; + } + if (property.NameEquals("availabilitySetName"u8)) + { + availabilitySetName = property.Value.GetString(); + continue; + } + if (property.NameEquals("loadBalancer"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + loadBalancer = LoadBalancerResourceNames.DeserializeLoadBalancerResourceNames(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DatabaseServerFullResourceNames(virtualMachines ?? new ChangeTrackingList(), availabilitySetName, loadBalancer, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DatabaseServerFullResourceNames)} does not support writing '{options.Format}' format."); + } + } + + DatabaseServerFullResourceNames IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDatabaseServerFullResourceNames(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DatabaseServerFullResourceNames)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DatabaseServerFullResourceNames.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DatabaseServerFullResourceNames.cs new file mode 100644 index 000000000000..b2b72f89a779 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DatabaseServerFullResourceNames.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The full resource names object for database layer resources. The number of entries in this list should be equal to the number VMs to be created for database layer. + public partial class DatabaseServerFullResourceNames + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DatabaseServerFullResourceNames() + { + VirtualMachines = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The list of virtual machine naming details. + /// The full name for availability set. In case name is not provided, it will be defaulted to {SID}-DB-AvSet. + /// The resource names object for load balancer and related resources. + /// Keeps track of any properties unknown to the library. + internal DatabaseServerFullResourceNames(IList virtualMachines, string availabilitySetName, LoadBalancerResourceNames loadBalancer, IDictionary serializedAdditionalRawData) + { + VirtualMachines = virtualMachines; + AvailabilitySetName = availabilitySetName; + LoadBalancer = loadBalancer; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The list of virtual machine naming details. + public IList VirtualMachines { get; } + /// The full name for availability set. In case name is not provided, it will be defaulted to {SID}-DB-AvSet. + public string AvailabilitySetName { get; set; } + /// The resource names object for load balancer and related resources. + public LoadBalancerResourceNames LoadBalancer { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DatabaseVmDetails.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DatabaseVmDetails.Serialization.cs new file mode 100644 index 000000000000..94cf23382ef0 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DatabaseVmDetails.Serialization.cs @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class DatabaseVmDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DatabaseVmDetails)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(VirtualMachineId)) + { + writer.WritePropertyName("virtualMachineId"u8); + writer.WriteStringValue(VirtualMachineId); + } + if (options.Format != "W" && Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + if (options.Format != "W" && Optional.IsCollectionDefined(StorageDetails)) + { + writer.WritePropertyName("storageDetails"u8); + writer.WriteStartArray(); + foreach (var item in StorageDetails) + { + JsonSerializer.Serialize(writer, item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DatabaseVmDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DatabaseVmDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDatabaseVmDetails(document.RootElement, options); + } + + internal static DatabaseVmDetails DeserializeDatabaseVmDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string virtualMachineId = default; + SapVirtualInstanceStatus? status = default; + IReadOnlyList storageDetails = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("virtualMachineId"u8)) + { + virtualMachineId = property.Value.GetString(); + continue; + } + if (property.NameEquals("status"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new SapVirtualInstanceStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("storageDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(JsonSerializer.Deserialize(item.GetRawText())); + } + storageDetails = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DatabaseVmDetails(virtualMachineId, status, storageDetails ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DatabaseVmDetails)} does not support writing '{options.Format}' format."); + } + } + + DatabaseVmDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDatabaseVmDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DatabaseVmDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DatabaseVmDetails.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DatabaseVmDetails.cs new file mode 100644 index 000000000000..374863a609ff --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DatabaseVmDetails.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Database VM details. + public partial class DatabaseVmDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal DatabaseVmDetails() + { + StorageDetails = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The virtual machine id. + /// Defines the SAP Instance status. + /// Storage details of all the Storage Accounts attached to the Database Virtual Machine. For e.g. NFS on AFS Shared Storage. + /// Keeps track of any properties unknown to the library. + internal DatabaseVmDetails(string virtualMachineId, SapVirtualInstanceStatus? status, IReadOnlyList storageDetails, IDictionary serializedAdditionalRawData) + { + VirtualMachineId = virtualMachineId; + Status = status; + StorageDetails = storageDetails; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The virtual machine id. + public string VirtualMachineId { get; } + /// Defines the SAP Instance status. + public SapVirtualInstanceStatus? Status { get; } + /// Storage details of all the Storage Accounts attached to the Database Virtual Machine. For e.g. NFS on AFS Shared Storage. + public IReadOnlyList StorageDetails { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DeployerVmPackages.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DeployerVmPackages.Serialization.cs new file mode 100644 index 000000000000..2beacb9bc19c --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DeployerVmPackages.Serialization.cs @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class DeployerVmPackages : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeployerVmPackages)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Uri)) + { + writer.WritePropertyName("url"u8); + writer.WriteStringValue(Uri); + } + if (Optional.IsDefined(StorageAccountId)) + { + writer.WritePropertyName("storageAccountId"u8); + writer.WriteStringValue(StorageAccountId); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DeployerVmPackages IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeployerVmPackages)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDeployerVmPackages(document.RootElement, options); + } + + internal static DeployerVmPackages DeserializeDeployerVmPackages(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string url = default; + string storageAccountId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("url"u8)) + { + url = property.Value.GetString(); + continue; + } + if (property.NameEquals("storageAccountId"u8)) + { + storageAccountId = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DeployerVmPackages(url, storageAccountId, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DeployerVmPackages)} does not support writing '{options.Format}' format."); + } + } + + DeployerVmPackages IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDeployerVmPackages(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DeployerVmPackages)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DeployerVmPackages.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DeployerVmPackages.cs new file mode 100644 index 000000000000..37d42b92156b --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DeployerVmPackages.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the url and storage account ID where deployer VM packages are uploaded. + public partial class DeployerVmPackages + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DeployerVmPackages() + { + } + + /// Initializes a new instance of . + /// The URL to the deployer VM packages file. + /// The deployer VM packages storage account id. + /// Keeps track of any properties unknown to the library. + internal DeployerVmPackages(string uri, string storageAccountId, IDictionary serializedAdditionalRawData) + { + Uri = uri; + StorageAccountId = storageAccountId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The URL to the deployer VM packages file. + public string Uri { get; set; } + /// The deployer VM packages storage account id. + public string StorageAccountId { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DeploymentConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DeploymentConfiguration.Serialization.cs new file mode 100644 index 000000000000..37264519b712 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DeploymentConfiguration.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class DeploymentConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeploymentConfiguration)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(AppLocation)) + { + writer.WritePropertyName("appLocation"u8); + writer.WriteStringValue(AppLocation); + } + if (Optional.IsDefined(InfrastructureConfiguration)) + { + writer.WritePropertyName("infrastructureConfiguration"u8); + writer.WriteObjectValue(InfrastructureConfiguration, options); + } + if (Optional.IsDefined(SoftwareConfiguration)) + { + writer.WritePropertyName("softwareConfiguration"u8); + writer.WriteObjectValue(SoftwareConfiguration, options); + } + } + + DeploymentConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeploymentConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDeploymentConfiguration(document.RootElement, options); + } + + internal static DeploymentConfiguration DeserializeDeploymentConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string appLocation = default; + InfrastructureConfiguration infrastructureConfiguration = default; + SoftwareConfiguration softwareConfiguration = default; + SapConfigurationType configurationType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("appLocation"u8)) + { + appLocation = property.Value.GetString(); + continue; + } + if (property.NameEquals("infrastructureConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + infrastructureConfiguration = InfrastructureConfiguration.DeserializeInfrastructureConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("softwareConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + softwareConfiguration = SoftwareConfiguration.DeserializeSoftwareConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("configurationType"u8)) + { + configurationType = new SapConfigurationType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DeploymentConfiguration(configurationType, serializedAdditionalRawData, appLocation, infrastructureConfiguration, softwareConfiguration); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DeploymentConfiguration)} does not support writing '{options.Format}' format."); + } + } + + DeploymentConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDeploymentConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DeploymentConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DeploymentConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DeploymentConfiguration.cs new file mode 100644 index 000000000000..0721863185e0 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DeploymentConfiguration.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Deployment Configuration. + public partial class DeploymentConfiguration : SapConfiguration + { + /// Initializes a new instance of . + public DeploymentConfiguration() + { + ConfigurationType = SapConfigurationType.Deployment; + } + + /// Initializes a new instance of . + /// The configuration type. Eg: Deployment/Discovery. + /// Keeps track of any properties unknown to the library. + /// The geo-location where the SAP system is to be created. + /// + /// The infrastructure configuration. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// + /// The software configuration. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + internal DeploymentConfiguration(SapConfigurationType configurationType, IDictionary serializedAdditionalRawData, string appLocation, InfrastructureConfiguration infrastructureConfiguration, SoftwareConfiguration softwareConfiguration) : base(configurationType, serializedAdditionalRawData) + { + AppLocation = appLocation; + InfrastructureConfiguration = infrastructureConfiguration; + SoftwareConfiguration = softwareConfiguration; + ConfigurationType = configurationType; + } + + /// The geo-location where the SAP system is to be created. + public string AppLocation { get; set; } + /// + /// The infrastructure configuration. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public InfrastructureConfiguration InfrastructureConfiguration { get; set; } + /// + /// The software configuration. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public SoftwareConfiguration SoftwareConfiguration { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DeploymentWithOSConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DeploymentWithOSConfiguration.Serialization.cs new file mode 100644 index 000000000000..e59c4d9fd475 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DeploymentWithOSConfiguration.Serialization.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class DeploymentWithOSConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeploymentWithOSConfiguration)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(AppLocation)) + { + writer.WritePropertyName("appLocation"u8); + writer.WriteStringValue(AppLocation); + } + if (Optional.IsDefined(InfrastructureConfiguration)) + { + writer.WritePropertyName("infrastructureConfiguration"u8); + writer.WriteObjectValue(InfrastructureConfiguration, options); + } + if (Optional.IsDefined(SoftwareConfiguration)) + { + writer.WritePropertyName("softwareConfiguration"u8); + writer.WriteObjectValue(SoftwareConfiguration, options); + } + if (Optional.IsDefined(OSSapConfiguration)) + { + writer.WritePropertyName("osSapConfiguration"u8); + writer.WriteObjectValue(OSSapConfiguration, options); + } + } + + DeploymentWithOSConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DeploymentWithOSConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDeploymentWithOSConfiguration(document.RootElement, options); + } + + internal static DeploymentWithOSConfiguration DeserializeDeploymentWithOSConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string appLocation = default; + InfrastructureConfiguration infrastructureConfiguration = default; + SoftwareConfiguration softwareConfiguration = default; + OSSapConfiguration osSapConfiguration = default; + SapConfigurationType configurationType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("appLocation"u8)) + { + appLocation = property.Value.GetString(); + continue; + } + if (property.NameEquals("infrastructureConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + infrastructureConfiguration = InfrastructureConfiguration.DeserializeInfrastructureConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("softwareConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + softwareConfiguration = SoftwareConfiguration.DeserializeSoftwareConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("osSapConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + osSapConfiguration = OSSapConfiguration.DeserializeOSSapConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("configurationType"u8)) + { + configurationType = new SapConfigurationType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DeploymentWithOSConfiguration( + configurationType, + serializedAdditionalRawData, + appLocation, + infrastructureConfiguration, + softwareConfiguration, + osSapConfiguration); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DeploymentWithOSConfiguration)} does not support writing '{options.Format}' format."); + } + } + + DeploymentWithOSConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDeploymentWithOSConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DeploymentWithOSConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DeploymentWithOSConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DeploymentWithOSConfiguration.cs new file mode 100644 index 000000000000..224d0e3f3b25 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DeploymentWithOSConfiguration.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Deployment along with OS Configuration. + public partial class DeploymentWithOSConfiguration : SapConfiguration + { + /// Initializes a new instance of . + public DeploymentWithOSConfiguration() + { + ConfigurationType = SapConfigurationType.DeploymentWithOSConfig; + } + + /// Initializes a new instance of . + /// The configuration type. Eg: Deployment/Discovery. + /// Keeps track of any properties unknown to the library. + /// The geo-location where the SAP system is to be created. + /// + /// The infrastructure configuration. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// + /// The software configuration. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// The OS and SAP configuration. + internal DeploymentWithOSConfiguration(SapConfigurationType configurationType, IDictionary serializedAdditionalRawData, string appLocation, InfrastructureConfiguration infrastructureConfiguration, SoftwareConfiguration softwareConfiguration, OSSapConfiguration osSapConfiguration) : base(configurationType, serializedAdditionalRawData) + { + AppLocation = appLocation; + InfrastructureConfiguration = infrastructureConfiguration; + SoftwareConfiguration = softwareConfiguration; + OSSapConfiguration = osSapConfiguration; + ConfigurationType = configurationType; + } + + /// The geo-location where the SAP system is to be created. + public string AppLocation { get; set; } + /// + /// The infrastructure configuration. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public InfrastructureConfiguration InfrastructureConfiguration { get; set; } + /// + /// The software configuration. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public SoftwareConfiguration SoftwareConfiguration { get; set; } + /// The OS and SAP configuration. + public OSSapConfiguration OSSapConfiguration { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiscoveryConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiscoveryConfiguration.Serialization.cs new file mode 100644 index 000000000000..82c77d50c00d --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiscoveryConfiguration.Serialization.cs @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class DiscoveryConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DiscoveryConfiguration)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(CentralServerVmId)) + { + writer.WritePropertyName("centralServerVmId"u8); + writer.WriteStringValue(CentralServerVmId); + } + if (Optional.IsDefined(ManagedRgStorageAccountName)) + { + writer.WritePropertyName("managedRgStorageAccountName"u8); + writer.WriteStringValue(ManagedRgStorageAccountName); + } + if (options.Format != "W" && Optional.IsDefined(AppLocation)) + { + writer.WritePropertyName("appLocation"u8); + writer.WriteStringValue(AppLocation); + } + } + + DiscoveryConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DiscoveryConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDiscoveryConfiguration(document.RootElement, options); + } + + internal static DiscoveryConfiguration DeserializeDiscoveryConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string centralServerVmId = default; + string managedRgStorageAccountName = default; + string appLocation = default; + SapConfigurationType configurationType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("centralServerVmId"u8)) + { + centralServerVmId = property.Value.GetString(); + continue; + } + if (property.NameEquals("managedRgStorageAccountName"u8)) + { + managedRgStorageAccountName = property.Value.GetString(); + continue; + } + if (property.NameEquals("appLocation"u8)) + { + appLocation = property.Value.GetString(); + continue; + } + if (property.NameEquals("configurationType"u8)) + { + configurationType = new SapConfigurationType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DiscoveryConfiguration(configurationType, serializedAdditionalRawData, centralServerVmId, managedRgStorageAccountName, appLocation); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DiscoveryConfiguration)} does not support writing '{options.Format}' format."); + } + } + + DiscoveryConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDiscoveryConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DiscoveryConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiscoveryConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiscoveryConfiguration.cs new file mode 100644 index 000000000000..84ebbd127936 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiscoveryConfiguration.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Discovery Details. + public partial class DiscoveryConfiguration : SapConfiguration + { + /// Initializes a new instance of . + public DiscoveryConfiguration() + { + ConfigurationType = SapConfigurationType.Discovery; + } + + /// Initializes a new instance of . + /// The configuration type. Eg: Deployment/Discovery. + /// Keeps track of any properties unknown to the library. + /// The virtual machine ID of the Central Server. + /// The custom storage account name for the storage account created by the service in the managed resource group created as part of VIS deployment.<br><br>Refer to the storage account naming rules [here](https://learn.microsoft.com/azure/azure-resource-manager/management/resource-name-rules#microsoftstorage).<br><br>If not provided, the service will create the storage account with a random name. + /// The geo-location where the SAP system exists. + internal DiscoveryConfiguration(SapConfigurationType configurationType, IDictionary serializedAdditionalRawData, string centralServerVmId, string managedRgStorageAccountName, string appLocation) : base(configurationType, serializedAdditionalRawData) + { + CentralServerVmId = centralServerVmId; + ManagedRgStorageAccountName = managedRgStorageAccountName; + AppLocation = appLocation; + ConfigurationType = configurationType; + } + + /// The virtual machine ID of the Central Server. + public string CentralServerVmId { get; set; } + /// The custom storage account name for the storage account created by the service in the managed resource group created as part of VIS deployment.<br><br>Refer to the storage account naming rules [here](https://learn.microsoft.com/azure/azure-resource-manager/management/resource-name-rules#microsoftstorage).<br><br>If not provided, the service will create the storage account with a random name. + public string ManagedRgStorageAccountName { get; set; } + /// The geo-location where the SAP system exists. + public string AppLocation { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskConfiguration.Serialization.cs new file mode 100644 index 000000000000..384420975b65 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskConfiguration.Serialization.cs @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + internal partial class DiskConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DiskConfiguration)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(DiskVolumeConfigurations)) + { + writer.WritePropertyName("diskVolumeConfigurations"u8); + writer.WriteStartObject(); + foreach (var item in DiskVolumeConfigurations) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DiskConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DiskConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDiskConfiguration(document.RootElement, options); + } + + internal static DiskConfiguration DeserializeDiskConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary diskVolumeConfigurations = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("diskVolumeConfigurations"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, DiskVolumeConfiguration.DeserializeDiskVolumeConfiguration(property0.Value, options)); + } + diskVolumeConfigurations = dictionary; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DiskConfiguration(diskVolumeConfigurations ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DiskConfiguration)} does not support writing '{options.Format}' format."); + } + } + + DiskConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDiskConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DiskConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskConfiguration.cs new file mode 100644 index 000000000000..acbc18a0e4fc --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskConfiguration.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The Disk Configuration Details. + internal partial class DiskConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DiskConfiguration() + { + DiskVolumeConfigurations = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// The disk configuration for the db volume. For HANA, Required volumes are: ['hana/data', 'hana/log', hana/shared', 'usr/sap', 'os'], Optional volume : ['backup']. + /// Keeps track of any properties unknown to the library. + internal DiskConfiguration(IDictionary diskVolumeConfigurations, IDictionary serializedAdditionalRawData) + { + DiskVolumeConfigurations = diskVolumeConfigurations; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The disk configuration for the db volume. For HANA, Required volumes are: ['hana/data', 'hana/log', hana/shared', 'usr/sap', 'os'], Optional volume : ['backup']. + public IDictionary DiskVolumeConfigurations { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskDetails.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskDetails.Serialization.cs new file mode 100644 index 000000000000..b225d9dc6abe --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskDetails.Serialization.cs @@ -0,0 +1,227 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class DiskDetails : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DiskDetails)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Sku)) + { + writer.WritePropertyName("sku"u8); + writer.WriteObjectValue(Sku, options); + } + if (Optional.IsDefined(SizeGB)) + { + writer.WritePropertyName("sizeGB"u8); + writer.WriteNumberValue(SizeGB.Value); + } + if (Optional.IsDefined(MinimumSupportedDiskCount)) + { + writer.WritePropertyName("minimumSupportedDiskCount"u8); + writer.WriteNumberValue(MinimumSupportedDiskCount.Value); + } + if (Optional.IsDefined(MaximumSupportedDiskCount)) + { + writer.WritePropertyName("maximumSupportedDiskCount"u8); + writer.WriteNumberValue(MaximumSupportedDiskCount.Value); + } + if (Optional.IsDefined(IopsReadWrite)) + { + writer.WritePropertyName("iopsReadWrite"u8); + writer.WriteNumberValue(IopsReadWrite.Value); + } + if (Optional.IsDefined(MbpsReadWrite)) + { + writer.WritePropertyName("mbpsReadWrite"u8); + writer.WriteNumberValue(MbpsReadWrite.Value); + } + if (Optional.IsDefined(DiskTier)) + { + writer.WritePropertyName("diskTier"u8); + writer.WriteStringValue(DiskTier); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DiskDetails IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DiskDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDiskDetails(document.RootElement, options); + } + + internal static DiskDetails DeserializeDiskDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DiskSku sku = default; + long? sizeGB = default; + long? minimumSupportedDiskCount = default; + long? maximumSupportedDiskCount = default; + long? iopsReadWrite = default; + long? mbpsReadWrite = default; + string diskTier = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("sku"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sku = DiskSku.DeserializeDiskSku(property.Value, options); + continue; + } + if (property.NameEquals("sizeGB"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sizeGB = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("minimumSupportedDiskCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + minimumSupportedDiskCount = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("maximumSupportedDiskCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + maximumSupportedDiskCount = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("iopsReadWrite"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + iopsReadWrite = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("mbpsReadWrite"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + mbpsReadWrite = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("diskTier"u8)) + { + diskTier = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DiskDetails( + sku, + sizeGB, + minimumSupportedDiskCount, + maximumSupportedDiskCount, + iopsReadWrite, + mbpsReadWrite, + diskTier, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DiskDetails)} does not support writing '{options.Format}' format."); + } + } + + DiskDetails IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDiskDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DiskDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskDetails.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskDetails.cs new file mode 100644 index 000000000000..287917b944e9 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskDetails.cs @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The supported disk size details for a disk type. + public partial class DiskDetails + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal DiskDetails() + { + } + + /// Initializes a new instance of . + /// The type of disk sku. For example, Standard_LRS, Standard_ZRS, Premium_LRS, Premium_ZRS. + /// The disk size in GB. + /// The minimum supported disk count. + /// The maximum supported disk count. + /// The disk Iops. + /// The disk provisioned throughput in MBps. + /// The disk tier, e.g. P10, E10. + /// Keeps track of any properties unknown to the library. + internal DiskDetails(DiskSku sku, long? sizeGB, long? minimumSupportedDiskCount, long? maximumSupportedDiskCount, long? iopsReadWrite, long? mbpsReadWrite, string diskTier, IDictionary serializedAdditionalRawData) + { + Sku = sku; + SizeGB = sizeGB; + MinimumSupportedDiskCount = minimumSupportedDiskCount; + MaximumSupportedDiskCount = maximumSupportedDiskCount; + IopsReadWrite = iopsReadWrite; + MbpsReadWrite = mbpsReadWrite; + DiskTier = diskTier; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The type of disk sku. For example, Standard_LRS, Standard_ZRS, Premium_LRS, Premium_ZRS. + internal DiskSku Sku { get; } + /// Defines the disk sku name. + public DiskSkuName? SkuName + { + get => Sku?.Name; + } + + /// The disk size in GB. + public long? SizeGB { get; } + /// The minimum supported disk count. + public long? MinimumSupportedDiskCount { get; } + /// The maximum supported disk count. + public long? MaximumSupportedDiskCount { get; } + /// The disk Iops. + public long? IopsReadWrite { get; } + /// The disk provisioned throughput in MBps. + public long? MbpsReadWrite { get; } + /// The disk tier, e.g. P10, E10. + public string DiskTier { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskSku.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskSku.Serialization.cs new file mode 100644 index 000000000000..7f7547af8623 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskSku.Serialization.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + internal partial class DiskSku : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DiskSku)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DiskSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DiskSku)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDiskSku(document.RootElement, options); + } + + internal static DiskSku DeserializeDiskSku(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DiskSkuName? name = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + name = new DiskSkuName(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DiskSku(name, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DiskSku)} does not support writing '{options.Format}' format."); + } + } + + DiskSku IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDiskSku(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DiskSku)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskSku.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskSku.cs new file mode 100644 index 000000000000..60a805bbce3b --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskSku.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The type of disk sku. For example, Standard_LRS, Standard_ZRS, Premium_LRS, Premium_ZRS. + internal partial class DiskSku + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DiskSku() + { + } + + /// Initializes a new instance of . + /// Defines the disk sku name. + /// Keeps track of any properties unknown to the library. + internal DiskSku(DiskSkuName? name, IDictionary serializedAdditionalRawData) + { + Name = name; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Defines the disk sku name. + public DiskSkuName? Name { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskSkuName.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskSkuName.cs new file mode 100644 index 000000000000..63def1a37360 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskSkuName.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the disk sku name. + public readonly partial struct DiskSkuName : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DiskSkuName(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string StandardLRSValue = "Standard_LRS"; + private const string PremiumLRSValue = "Premium_LRS"; + private const string StandardSSDLRSValue = "StandardSSD_LRS"; + private const string UltraSSDLRSValue = "UltraSSD_LRS"; + private const string PremiumZRSValue = "Premium_ZRS"; + private const string StandardSSDZRSValue = "StandardSSD_ZRS"; + private const string PremiumV2LRSValue = "PremiumV2_LRS"; + + /// Standard LRS Disk SKU. + public static DiskSkuName StandardLRS { get; } = new DiskSkuName(StandardLRSValue); + /// Premium_LRS Disk SKU. + public static DiskSkuName PremiumLRS { get; } = new DiskSkuName(PremiumLRSValue); + /// StandardSSD_LRS Disk SKU. + public static DiskSkuName StandardSSDLRS { get; } = new DiskSkuName(StandardSSDLRSValue); + /// UltraSSD_LRS Disk SKU. + public static DiskSkuName UltraSSDLRS { get; } = new DiskSkuName(UltraSSDLRSValue); + /// Premium_ZRS Disk SKU. + public static DiskSkuName PremiumZRS { get; } = new DiskSkuName(PremiumZRSValue); + /// StandardSSD_ZRS Disk SKU. + public static DiskSkuName StandardSSDZRS { get; } = new DiskSkuName(StandardSSDZRSValue); + /// PremiumV2_LRS Disk SKU. + public static DiskSkuName PremiumV2LRS { get; } = new DiskSkuName(PremiumV2LRSValue); + /// Determines if two values are the same. + public static bool operator ==(DiskSkuName left, DiskSkuName right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DiskSkuName left, DiskSkuName right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DiskSkuName(string value) => new DiskSkuName(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DiskSkuName other && Equals(other); + /// + public bool Equals(DiskSkuName 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/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskVolumeConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskVolumeConfiguration.Serialization.cs new file mode 100644 index 000000000000..579a252f5168 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskVolumeConfiguration.Serialization.cs @@ -0,0 +1,163 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class DiskVolumeConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DiskVolumeConfiguration)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Count)) + { + writer.WritePropertyName("count"u8); + writer.WriteNumberValue(Count.Value); + } + if (Optional.IsDefined(SizeGB)) + { + writer.WritePropertyName("sizeGB"u8); + writer.WriteNumberValue(SizeGB.Value); + } + if (Optional.IsDefined(Sku)) + { + writer.WritePropertyName("sku"u8); + writer.WriteObjectValue(Sku, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DiskVolumeConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DiskVolumeConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDiskVolumeConfiguration(document.RootElement, options); + } + + internal static DiskVolumeConfiguration DeserializeDiskVolumeConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + long? count = default; + long? sizeGB = default; + DiskSku sku = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("count"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + count = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("sizeGB"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sizeGB = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("sku"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sku = DiskSku.DeserializeDiskSku(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DiskVolumeConfiguration(count, sizeGB, sku, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DiskVolumeConfiguration)} does not support writing '{options.Format}' format."); + } + } + + DiskVolumeConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDiskVolumeConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DiskVolumeConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskVolumeConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskVolumeConfiguration.cs new file mode 100644 index 000000000000..2c23bc66fa35 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/DiskVolumeConfiguration.cs @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The disk configuration required for the selected volume. + public partial class DiskVolumeConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DiskVolumeConfiguration() + { + } + + /// Initializes a new instance of . + /// The total number of disks required for the concerned volume. + /// The disk size in GB. + /// The disk SKU details. + /// Keeps track of any properties unknown to the library. + internal DiskVolumeConfiguration(long? count, long? sizeGB, DiskSku sku, IDictionary serializedAdditionalRawData) + { + Count = count; + SizeGB = sizeGB; + Sku = sku; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The total number of disks required for the concerned volume. + public long? Count { get; set; } + /// The disk size in GB. + public long? SizeGB { get; set; } + /// The disk SKU details. + internal DiskSku Sku { get; set; } + /// Defines the disk sku name. + public DiskSkuName? SkuName + { + get => Sku is null ? default : Sku.Name; + set + { + if (Sku is null) + Sku = new DiskSku(); + Sku.Name = value; + } + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/EnqueueReplicationServerProperties.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/EnqueueReplicationServerProperties.Serialization.cs new file mode 100644 index 000000000000..7fc1bbb99777 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/EnqueueReplicationServerProperties.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.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class EnqueueReplicationServerProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EnqueueReplicationServerProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(ErsVersion)) + { + writer.WritePropertyName("ersVersion"u8); + writer.WriteStringValue(ErsVersion.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(InstanceNo)) + { + writer.WritePropertyName("instanceNo"u8); + writer.WriteStringValue(InstanceNo); + } + if (options.Format != "W" && Optional.IsDefined(Hostname)) + { + writer.WritePropertyName("hostname"u8); + writer.WriteStringValue(Hostname); + } + if (options.Format != "W" && Optional.IsDefined(KernelVersion)) + { + writer.WritePropertyName("kernelVersion"u8); + writer.WriteStringValue(KernelVersion); + } + if (options.Format != "W" && Optional.IsDefined(KernelPatch)) + { + writer.WritePropertyName("kernelPatch"u8); + writer.WriteStringValue(KernelPatch); + } + if (options.Format != "W" && Optional.IsDefined(IPAddress)) + { + writer.WritePropertyName("ipAddress"u8); + writer.WriteStringValue(IPAddress); + } + if (options.Format != "W" && Optional.IsDefined(Health)) + { + writer.WritePropertyName("health"u8); + writer.WriteStringValue(Health.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + EnqueueReplicationServerProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EnqueueReplicationServerProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEnqueueReplicationServerProperties(document.RootElement, options); + } + + internal static EnqueueReplicationServerProperties DeserializeEnqueueReplicationServerProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + EnqueueReplicationServerType? ersVersion = default; + string instanceNo = default; + string hostname = default; + string kernelVersion = default; + string kernelPatch = default; + string ipAddress = default; + SapHealthState? health = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("ersVersion"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + ersVersion = new EnqueueReplicationServerType(property.Value.GetString()); + continue; + } + if (property.NameEquals("instanceNo"u8)) + { + instanceNo = property.Value.GetString(); + continue; + } + if (property.NameEquals("hostname"u8)) + { + hostname = property.Value.GetString(); + continue; + } + if (property.NameEquals("kernelVersion"u8)) + { + kernelVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("kernelPatch"u8)) + { + kernelPatch = property.Value.GetString(); + continue; + } + if (property.NameEquals("ipAddress"u8)) + { + ipAddress = property.Value.GetString(); + continue; + } + if (property.NameEquals("health"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + health = new SapHealthState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EnqueueReplicationServerProperties( + ersVersion, + instanceNo, + hostname, + kernelVersion, + kernelPatch, + ipAddress, + health, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(EnqueueReplicationServerProperties)} does not support writing '{options.Format}' format."); + } + } + + EnqueueReplicationServerProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeEnqueueReplicationServerProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EnqueueReplicationServerProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/EnqueueReplicationServerProperties.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/EnqueueReplicationServerProperties.cs new file mode 100644 index 000000000000..2a2556a09feb --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/EnqueueReplicationServerProperties.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; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the SAP Enqueue Replication Server (ERS) properties. + public partial class EnqueueReplicationServerProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public EnqueueReplicationServerProperties() + { + } + + /// Initializes a new instance of . + /// Defines the type of Enqueue Replication Server. + /// ERS Instance Number. + /// ERS SAP Hostname. + /// ERS SAP Kernel Version. + /// ERS SAP Kernel Patch level. + /// ERS SAP IP Address. + /// Defines the health of SAP Instances. + /// Keeps track of any properties unknown to the library. + internal EnqueueReplicationServerProperties(EnqueueReplicationServerType? ersVersion, string instanceNo, string hostname, string kernelVersion, string kernelPatch, string ipAddress, SapHealthState? health, IDictionary serializedAdditionalRawData) + { + ErsVersion = ersVersion; + InstanceNo = instanceNo; + Hostname = hostname; + KernelVersion = kernelVersion; + KernelPatch = kernelPatch; + IPAddress = ipAddress; + Health = health; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Defines the type of Enqueue Replication Server. + public EnqueueReplicationServerType? ErsVersion { get; } + /// ERS Instance Number. + public string InstanceNo { get; } + /// ERS SAP Hostname. + public string Hostname { get; } + /// ERS SAP Kernel Version. + public string KernelVersion { get; } + /// ERS SAP Kernel Patch level. + public string KernelPatch { get; } + /// ERS SAP IP Address. + public string IPAddress { get; } + /// Defines the health of SAP Instances. + public SapHealthState? Health { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/EnqueueReplicationServerType.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/EnqueueReplicationServerType.cs new file mode 100644 index 000000000000..7ca6390ea71e --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/EnqueueReplicationServerType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the type of Enqueue Replication Server. + public readonly partial struct EnqueueReplicationServerType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public EnqueueReplicationServerType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnqueueReplicator1Value = "EnqueueReplicator1"; + private const string EnqueueReplicator2Value = "EnqueueReplicator2"; + + /// Enqueue Replication server type 1. + public static EnqueueReplicationServerType EnqueueReplicator1 { get; } = new EnqueueReplicationServerType(EnqueueReplicator1Value); + /// Enqueue Replication server type 2. + public static EnqueueReplicationServerType EnqueueReplicator2 { get; } = new EnqueueReplicationServerType(EnqueueReplicator2Value); + /// Determines if two values are the same. + public static bool operator ==(EnqueueReplicationServerType left, EnqueueReplicationServerType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(EnqueueReplicationServerType left, EnqueueReplicationServerType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator EnqueueReplicationServerType(string value) => new EnqueueReplicationServerType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is EnqueueReplicationServerType other && Equals(other); + /// + public bool Equals(EnqueueReplicationServerType 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/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/EnqueueServerProperties.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/EnqueueServerProperties.Serialization.cs new file mode 100644 index 000000000000..358882714454 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/EnqueueServerProperties.Serialization.cs @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class EnqueueServerProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EnqueueServerProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(Hostname)) + { + writer.WritePropertyName("hostname"u8); + writer.WriteStringValue(Hostname); + } + if (options.Format != "W" && Optional.IsDefined(IPAddress)) + { + writer.WritePropertyName("ipAddress"u8); + writer.WriteStringValue(IPAddress); + } + if (options.Format != "W" && Optional.IsDefined(Port)) + { + writer.WritePropertyName("port"u8); + writer.WriteNumberValue(Port.Value); + } + if (options.Format != "W" && Optional.IsDefined(Health)) + { + writer.WritePropertyName("health"u8); + writer.WriteStringValue(Health.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + EnqueueServerProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EnqueueServerProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEnqueueServerProperties(document.RootElement, options); + } + + internal static EnqueueServerProperties DeserializeEnqueueServerProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string hostname = default; + string ipAddress = default; + long? port = default; + SapHealthState? health = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("hostname"u8)) + { + hostname = property.Value.GetString(); + continue; + } + if (property.NameEquals("ipAddress"u8)) + { + ipAddress = property.Value.GetString(); + continue; + } + if (property.NameEquals("port"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + port = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("health"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + health = new SapHealthState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EnqueueServerProperties(hostname, ipAddress, port, health, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(EnqueueServerProperties)} does not support writing '{options.Format}' format."); + } + } + + EnqueueServerProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeEnqueueServerProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EnqueueServerProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/EnqueueServerProperties.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/EnqueueServerProperties.cs new file mode 100644 index 000000000000..b93b8f3fa2fc --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/EnqueueServerProperties.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the SAP Enqueue Server properties. + public partial class EnqueueServerProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public EnqueueServerProperties() + { + } + + /// Initializes a new instance of . + /// Enqueue Server SAP Hostname. + /// Enqueue Server SAP IP Address. + /// Enqueue Server Port. + /// Defines the health of SAP Instances. + /// Keeps track of any properties unknown to the library. + internal EnqueueServerProperties(string hostname, string ipAddress, long? port, SapHealthState? health, IDictionary serializedAdditionalRawData) + { + Hostname = hostname; + IPAddress = ipAddress; + Port = port; + Health = health; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Enqueue Server SAP Hostname. + public string Hostname { get; } + /// Enqueue Server SAP IP Address. + public string IPAddress { get; } + /// Enqueue Server Port. + public long? Port { get; } + /// Defines the health of SAP Instances. + public SapHealthState? Health { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ErrorInformation.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ErrorInformation.Serialization.cs new file mode 100644 index 000000000000..5eb391b27768 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ErrorInformation.Serialization.cs @@ -0,0 +1,165 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class ErrorInformation : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ErrorInformation)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(Code)) + { + writer.WritePropertyName("code"u8); + writer.WriteStringValue(Code); + } + if (options.Format != "W" && Optional.IsDefined(Message)) + { + writer.WritePropertyName("message"u8); + writer.WriteStringValue(Message); + } + if (options.Format != "W" && Optional.IsCollectionDefined(Details)) + { + writer.WritePropertyName("details"u8); + writer.WriteStartArray(); + foreach (var item in Details) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ErrorInformation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ErrorInformation)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeErrorInformation(document.RootElement, options); + } + + internal static ErrorInformation DeserializeErrorInformation(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string code = default; + string message = default; + IReadOnlyList details = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("code"u8)) + { + code = property.Value.GetString(); + continue; + } + if (property.NameEquals("message"u8)) + { + message = property.Value.GetString(); + continue; + } + if (property.NameEquals("details"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DeserializeErrorInformation(item, options)); + } + details = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ErrorInformation(code, message, details ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ErrorInformation)} does not support writing '{options.Format}' format."); + } + } + + ErrorInformation IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeErrorInformation(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ErrorInformation)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ErrorInformation.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ErrorInformation.cs new file mode 100644 index 000000000000..bd6490030f9c --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ErrorInformation.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Error definition. + public partial class ErrorInformation + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal ErrorInformation() + { + Details = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Service specific error code which serves as the substatus for the HTTP error code. + /// Description of the error. + /// Internal error details. + /// Keeps track of any properties unknown to the library. + internal ErrorInformation(string code, string message, IReadOnlyList details, IDictionary serializedAdditionalRawData) + { + Code = code; + Message = message; + Details = details; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Service specific error code which serves as the substatus for the HTTP error code. + public string Code { get; } + /// Description of the error. + public string Message { get; } + /// Internal error details. + public IReadOnlyList Details { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ExternalInstallationSoftwareConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ExternalInstallationSoftwareConfiguration.Serialization.cs new file mode 100644 index 000000000000..d09c024cc0ea --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ExternalInstallationSoftwareConfiguration.Serialization.cs @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class ExternalInstallationSoftwareConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExternalInstallationSoftwareConfiguration)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(CentralServerVmId)) + { + writer.WritePropertyName("centralServerVmId"u8); + writer.WriteStringValue(CentralServerVmId); + } + } + + ExternalInstallationSoftwareConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExternalInstallationSoftwareConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExternalInstallationSoftwareConfiguration(document.RootElement, options); + } + + internal static ExternalInstallationSoftwareConfiguration DeserializeExternalInstallationSoftwareConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string centralServerVmId = default; + SapSoftwareInstallationType softwareInstallationType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("centralServerVmId"u8)) + { + centralServerVmId = property.Value.GetString(); + continue; + } + if (property.NameEquals("softwareInstallationType"u8)) + { + softwareInstallationType = new SapSoftwareInstallationType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExternalInstallationSoftwareConfiguration(softwareInstallationType, serializedAdditionalRawData, centralServerVmId); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ExternalInstallationSoftwareConfiguration)} does not support writing '{options.Format}' format."); + } + } + + ExternalInstallationSoftwareConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeExternalInstallationSoftwareConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExternalInstallationSoftwareConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ExternalInstallationSoftwareConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ExternalInstallationSoftwareConfiguration.cs new file mode 100644 index 000000000000..c3b397f6d40e --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ExternalInstallationSoftwareConfiguration.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The SAP Software configuration Input when the software is installed externally outside the service. + public partial class ExternalInstallationSoftwareConfiguration : SoftwareConfiguration + { + /// Initializes a new instance of . + public ExternalInstallationSoftwareConfiguration() + { + SoftwareInstallationType = SapSoftwareInstallationType.External; + } + + /// Initializes a new instance of . + /// The SAP software installation type. + /// Keeps track of any properties unknown to the library. + /// The resource ID of the virtual machine containing the central server instance. + internal ExternalInstallationSoftwareConfiguration(SapSoftwareInstallationType softwareInstallationType, IDictionary serializedAdditionalRawData, string centralServerVmId) : base(softwareInstallationType, serializedAdditionalRawData) + { + CentralServerVmId = centralServerVmId; + SoftwareInstallationType = softwareInstallationType; + } + + /// The resource ID of the virtual machine containing the central server instance. + public string CentralServerVmId { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/FileShareConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/FileShareConfiguration.Serialization.cs new file mode 100644 index 000000000000..b451de1705ab --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/FileShareConfiguration.Serialization.cs @@ -0,0 +1,119 @@ +// 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.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + [PersistableModelProxy(typeof(UnknownFileShareConfiguration))] + public partial class FileShareConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FileShareConfiguration)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("configurationType"u8); + writer.WriteStringValue(ConfigurationType.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + FileShareConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FileShareConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFileShareConfiguration(document.RootElement, options); + } + + internal static FileShareConfiguration DeserializeFileShareConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("configurationType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "CreateAndMount": return CreateAndMountFileShareConfiguration.DeserializeCreateAndMountFileShareConfiguration(element, options); + case "Mount": return MountFileShareConfiguration.DeserializeMountFileShareConfiguration(element, options); + case "Skip": return SkipFileShareConfiguration.DeserializeSkipFileShareConfiguration(element, options); + } + } + return UnknownFileShareConfiguration.DeserializeUnknownFileShareConfiguration(element, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(FileShareConfiguration)} does not support writing '{options.Format}' format."); + } + } + + FileShareConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeFileShareConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FileShareConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/FileShareConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/FileShareConfiguration.cs new file mode 100644 index 000000000000..72ea38306a60 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/FileShareConfiguration.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// + /// File Share configuration details, populated with information on storage configuration mounted on the VIS. The createAndMount option is selected in case of missing input. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public abstract partial class FileShareConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + protected FileShareConfiguration() + { + } + + /// Initializes a new instance of . + /// The type of file share config, eg: Mount/CreateAndMount/Skip. + /// Keeps track of any properties unknown to the library. + internal FileShareConfiguration(FileShareConfigurationType configurationType, IDictionary serializedAdditionalRawData) + { + ConfigurationType = configurationType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The type of file share config, eg: Mount/CreateAndMount/Skip. + internal FileShareConfigurationType ConfigurationType { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/FileShareConfigurationType.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/FileShareConfigurationType.cs new file mode 100644 index 000000000000..8230c74a73e0 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/FileShareConfigurationType.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The type of file share config. + internal readonly partial struct FileShareConfigurationType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public FileShareConfigurationType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SkipValue = "Skip"; + private const string CreateAndMountValue = "CreateAndMount"; + private const string MountValue = "Mount"; + + /// Skip creating the file share. + public static FileShareConfigurationType Skip { get; } = new FileShareConfigurationType(SkipValue); + /// Fileshare will be created and mounted by service. + public static FileShareConfigurationType CreateAndMount { get; } = new FileShareConfigurationType(CreateAndMountValue); + /// Existing fileshare provided will be mounted by service. + public static FileShareConfigurationType Mount { get; } = new FileShareConfigurationType(MountValue); + /// Determines if two values are the same. + public static bool operator ==(FileShareConfigurationType left, FileShareConfigurationType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(FileShareConfigurationType left, FileShareConfigurationType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator FileShareConfigurationType(string value) => new FileShareConfigurationType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is FileShareConfigurationType other && Equals(other); + /// + public bool Equals(FileShareConfigurationType 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/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/GatewayServerProperties.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/GatewayServerProperties.Serialization.cs new file mode 100644 index 000000000000..7f2379f0e39b --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/GatewayServerProperties.Serialization.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class GatewayServerProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(GatewayServerProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(Port)) + { + writer.WritePropertyName("port"u8); + writer.WriteNumberValue(Port.Value); + } + if (options.Format != "W" && Optional.IsDefined(Health)) + { + writer.WritePropertyName("health"u8); + writer.WriteStringValue(Health.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + GatewayServerProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(GatewayServerProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeGatewayServerProperties(document.RootElement, options); + } + + internal static GatewayServerProperties DeserializeGatewayServerProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + long? port = default; + SapHealthState? health = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("port"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + port = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("health"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + health = new SapHealthState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new GatewayServerProperties(port, health, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(GatewayServerProperties)} does not support writing '{options.Format}' format."); + } + } + + GatewayServerProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeGatewayServerProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(GatewayServerProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/GatewayServerProperties.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/GatewayServerProperties.cs new file mode 100644 index 000000000000..0127fde8ef92 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/GatewayServerProperties.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the SAP Gateway Server properties. + public partial class GatewayServerProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public GatewayServerProperties() + { + } + + /// Initializes a new instance of . + /// Gateway Port. + /// Defines the health of SAP Instances. + /// Keeps track of any properties unknown to the library. + internal GatewayServerProperties(long? port, SapHealthState? health, IDictionary serializedAdditionalRawData) + { + Port = port; + Health = health; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gateway Port. + public long? Port { get; } + /// Defines the health of SAP Instances. + public SapHealthState? Health { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/HighAvailabilityConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/HighAvailabilityConfiguration.Serialization.cs new file mode 100644 index 000000000000..e6a14d24a8ac --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/HighAvailabilityConfiguration.Serialization.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + internal partial class HighAvailabilityConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(HighAvailabilityConfiguration)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("highAvailabilityType"u8); + writer.WriteStringValue(HighAvailabilityType.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + HighAvailabilityConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(HighAvailabilityConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeHighAvailabilityConfiguration(document.RootElement, options); + } + + internal static HighAvailabilityConfiguration DeserializeHighAvailabilityConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + SapHighAvailabilityType highAvailabilityType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("highAvailabilityType"u8)) + { + highAvailabilityType = new SapHighAvailabilityType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new HighAvailabilityConfiguration(highAvailabilityType, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(HighAvailabilityConfiguration)} does not support writing '{options.Format}' format."); + } + } + + HighAvailabilityConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeHighAvailabilityConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(HighAvailabilityConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/HighAvailabilityConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/HighAvailabilityConfiguration.cs new file mode 100644 index 000000000000..a7d32d1ab84e --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/HighAvailabilityConfiguration.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Gets or sets the high availability configuration. + internal partial class HighAvailabilityConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The high availability type. + public HighAvailabilityConfiguration(SapHighAvailabilityType highAvailabilityType) + { + HighAvailabilityType = highAvailabilityType; + } + + /// Initializes a new instance of . + /// The high availability type. + /// Keeps track of any properties unknown to the library. + internal HighAvailabilityConfiguration(SapHighAvailabilityType highAvailabilityType, IDictionary serializedAdditionalRawData) + { + HighAvailabilityType = highAvailabilityType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal HighAvailabilityConfiguration() + { + } + + /// The high availability type. + public SapHighAvailabilityType HighAvailabilityType { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/HighAvailabilitySoftwareConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/HighAvailabilitySoftwareConfiguration.Serialization.cs new file mode 100644 index 000000000000..5417082d3e9e --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/HighAvailabilitySoftwareConfiguration.Serialization.cs @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class HighAvailabilitySoftwareConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(HighAvailabilitySoftwareConfiguration)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("fencingClientId"u8); + writer.WriteStringValue(FencingClientId); + writer.WritePropertyName("fencingClientPassword"u8); + writer.WriteStringValue(FencingClientPassword); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + HighAvailabilitySoftwareConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(HighAvailabilitySoftwareConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeHighAvailabilitySoftwareConfiguration(document.RootElement, options); + } + + internal static HighAvailabilitySoftwareConfiguration DeserializeHighAvailabilitySoftwareConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string fencingClientId = default; + string fencingClientPassword = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("fencingClientId"u8)) + { + fencingClientId = property.Value.GetString(); + continue; + } + if (property.NameEquals("fencingClientPassword"u8)) + { + fencingClientPassword = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new HighAvailabilitySoftwareConfiguration(fencingClientId, fencingClientPassword, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(HighAvailabilitySoftwareConfiguration)} does not support writing '{options.Format}' format."); + } + } + + HighAvailabilitySoftwareConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeHighAvailabilitySoftwareConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(HighAvailabilitySoftwareConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/HighAvailabilitySoftwareConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/HighAvailabilitySoftwareConfiguration.cs new file mode 100644 index 000000000000..14c9a64c0718 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/HighAvailabilitySoftwareConfiguration.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Gets or sets the HA software configuration. + public partial class HighAvailabilitySoftwareConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The fencing client id. + /// The fencing client id secret/password. The secret should never expire. This will be used pacemaker to start/stop the cluster VMs. + /// or is null. + public HighAvailabilitySoftwareConfiguration(string fencingClientId, string fencingClientPassword) + { + Argument.AssertNotNull(fencingClientId, nameof(fencingClientId)); + Argument.AssertNotNull(fencingClientPassword, nameof(fencingClientPassword)); + + FencingClientId = fencingClientId; + FencingClientPassword = fencingClientPassword; + } + + /// Initializes a new instance of . + /// The fencing client id. + /// The fencing client id secret/password. The secret should never expire. This will be used pacemaker to start/stop the cluster VMs. + /// Keeps track of any properties unknown to the library. + internal HighAvailabilitySoftwareConfiguration(string fencingClientId, string fencingClientPassword, IDictionary serializedAdditionalRawData) + { + FencingClientId = fencingClientId; + FencingClientPassword = fencingClientPassword; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal HighAvailabilitySoftwareConfiguration() + { + } + + /// The fencing client id. + public string FencingClientId { get; set; } + /// The fencing client id secret/password. The secret should never expire. This will be used pacemaker to start/stop the cluster VMs. + public string FencingClientPassword { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ImageReference.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ImageReference.Serialization.cs new file mode 100644 index 000000000000..e2b498fb1160 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ImageReference.Serialization.cs @@ -0,0 +1,183 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class ImageReference : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ImageReference)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Publisher)) + { + writer.WritePropertyName("publisher"u8); + writer.WriteStringValue(Publisher); + } + if (Optional.IsDefined(Offer)) + { + writer.WritePropertyName("offer"u8); + writer.WriteStringValue(Offer); + } + if (Optional.IsDefined(Sku)) + { + writer.WritePropertyName("sku"u8); + writer.WriteStringValue(Sku); + } + if (Optional.IsDefined(Version)) + { + writer.WritePropertyName("version"u8); + writer.WriteStringValue(Version); + } + if (Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ImageReference IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ImageReference)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeImageReference(document.RootElement, options); + } + + internal static ImageReference DeserializeImageReference(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string publisher = default; + string offer = default; + string sku = default; + string version = default; + ResourceIdentifier id = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("publisher"u8)) + { + publisher = property.Value.GetString(); + continue; + } + if (property.NameEquals("offer"u8)) + { + offer = property.Value.GetString(); + continue; + } + if (property.NameEquals("sku"u8)) + { + sku = property.Value.GetString(); + continue; + } + if (property.NameEquals("version"u8)) + { + version = property.Value.GetString(); + continue; + } + if (property.NameEquals("id"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ImageReference( + publisher, + offer, + sku, + version, + id, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ImageReference)} does not support writing '{options.Format}' format."); + } + } + + ImageReference IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeImageReference(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ImageReference)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ImageReference.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ImageReference.cs new file mode 100644 index 000000000000..a55799521852 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ImageReference.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual machine image, but is not used in other creation operations. NOTE: Image reference publisher and offer can only be set when you create the scale set. + public partial class ImageReference + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ImageReference() + { + } + + /// Initializes a new instance of . + /// The image publisher. + /// Specifies the offer of the platform image or marketplace image used to create the virtual machine. + /// The image SKU. + /// Specifies the version of the platform image or marketplace image used to create the virtual machine. The allowed formats are Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal numbers. Specify 'latest' to use the latest version of an image available at deploy time. Even if you use 'latest', the VM image will not automatically update after deploy time even if a new version becomes available. + /// Specifies the ARM resource ID of the Azure Compute Gallery image version used for creating ACSS VMs. You will need to provide this input when you choose to deploy virtual machines in ACSS with OS image from the Azure Compute gallery. + /// Keeps track of any properties unknown to the library. + internal ImageReference(string publisher, string offer, string sku, string version, ResourceIdentifier id, IDictionary serializedAdditionalRawData) + { + Publisher = publisher; + Offer = offer; + Sku = sku; + Version = version; + Id = id; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The image publisher. + public string Publisher { get; set; } + /// Specifies the offer of the platform image or marketplace image used to create the virtual machine. + public string Offer { get; set; } + /// The image SKU. + public string Sku { get; set; } + /// Specifies the version of the platform image or marketplace image used to create the virtual machine. The allowed formats are Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal numbers. Specify 'latest' to use the latest version of an image available at deploy time. Even if you use 'latest', the VM image will not automatically update after deploy time even if a new version becomes available. + public string Version { get; set; } + /// Specifies the ARM resource ID of the Azure Compute Gallery image version used for creating ACSS VMs. You will need to provide this input when you choose to deploy virtual machines in ACSS with OS image from the Azure Compute gallery. + public ResourceIdentifier Id { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/InfrastructureConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/InfrastructureConfiguration.Serialization.cs new file mode 100644 index 000000000000..41b3b4514aad --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/InfrastructureConfiguration.Serialization.cs @@ -0,0 +1,120 @@ +// 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.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + [PersistableModelProxy(typeof(UnknownInfrastructureConfiguration))] + public partial class InfrastructureConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InfrastructureConfiguration)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("appResourceGroup"u8); + writer.WriteStringValue(AppResourceGroup); + writer.WritePropertyName("deploymentType"u8); + writer.WriteStringValue(DeploymentType.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + InfrastructureConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InfrastructureConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeInfrastructureConfiguration(document.RootElement, options); + } + + internal static InfrastructureConfiguration DeserializeInfrastructureConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("deploymentType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "SingleServer": return SingleServerConfiguration.DeserializeSingleServerConfiguration(element, options); + case "ThreeTier": return ThreeTierConfiguration.DeserializeThreeTierConfiguration(element, options); + } + } + return UnknownInfrastructureConfiguration.DeserializeUnknownInfrastructureConfiguration(element, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(InfrastructureConfiguration)} does not support writing '{options.Format}' format."); + } + } + + InfrastructureConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeInfrastructureConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(InfrastructureConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/InfrastructureConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/InfrastructureConfiguration.cs new file mode 100644 index 000000000000..5b41b47e9932 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/InfrastructureConfiguration.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// + /// Deploy SAP Infrastructure Details. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public abstract partial class InfrastructureConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The application resource group where SAP system resources will be deployed. + /// is null. + protected InfrastructureConfiguration(string appResourceGroup) + { + Argument.AssertNotNull(appResourceGroup, nameof(appResourceGroup)); + + AppResourceGroup = appResourceGroup; + } + + /// Initializes a new instance of . + /// The application resource group where SAP system resources will be deployed. + /// The SAP deployment type. Eg: SingleServer/ThreeTier. + /// Keeps track of any properties unknown to the library. + internal InfrastructureConfiguration(string appResourceGroup, SapDeploymentType deploymentType, IDictionary serializedAdditionalRawData) + { + AppResourceGroup = appResourceGroup; + DeploymentType = deploymentType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal InfrastructureConfiguration() + { + } + + /// The application resource group where SAP system resources will be deployed. + public string AppResourceGroup { get; set; } + /// The SAP deployment type. Eg: SingleServer/ThreeTier. + internal SapDeploymentType DeploymentType { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/LinuxConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/LinuxConfiguration.Serialization.cs new file mode 100644 index 000000000000..da0c2ddef445 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/LinuxConfiguration.Serialization.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class LinuxConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(LinuxConfiguration)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(DisablePasswordAuthentication)) + { + writer.WritePropertyName("disablePasswordAuthentication"u8); + writer.WriteBooleanValue(DisablePasswordAuthentication.Value); + } + if (Optional.IsDefined(Ssh)) + { + writer.WritePropertyName("ssh"u8); + writer.WriteObjectValue(Ssh, options); + } + if (Optional.IsDefined(SshKeyPair)) + { + writer.WritePropertyName("sshKeyPair"u8); + writer.WriteObjectValue(SshKeyPair, options); + } + } + + LinuxConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(LinuxConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeLinuxConfiguration(document.RootElement, options); + } + + internal static LinuxConfiguration DeserializeLinuxConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool? disablePasswordAuthentication = default; + SshConfiguration ssh = default; + SshKeyPair sshKeyPair = default; + OSType osType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("disablePasswordAuthentication"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + disablePasswordAuthentication = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("ssh"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + ssh = SshConfiguration.DeserializeSshConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("sshKeyPair"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sshKeyPair = SshKeyPair.DeserializeSshKeyPair(property.Value, options); + continue; + } + if (property.NameEquals("osType"u8)) + { + osType = new OSType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new LinuxConfiguration(osType, serializedAdditionalRawData, disablePasswordAuthentication, ssh, sshKeyPair); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(LinuxConfiguration)} does not support writing '{options.Format}' format."); + } + } + + LinuxConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeLinuxConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(LinuxConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/LinuxConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/LinuxConfiguration.cs new file mode 100644 index 000000000000..cbab30ff0f28 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/LinuxConfiguration.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Specifies the Linux operating system settings on the virtual machine. For a list of supported Linux distributions, see [Linux on Azure-Endorsed Distributions](https://learn.microsoft.com/azure/virtual-machines/linux/endorsed-distros). + public partial class LinuxConfiguration : OSConfiguration + { + /// Initializes a new instance of . + public LinuxConfiguration() + { + OSType = OSType.Linux; + } + + /// Initializes a new instance of . + /// The OS Type. + /// Keeps track of any properties unknown to the library. + /// Specifies whether password authentication should be disabled. + /// Specifies the ssh key configuration for a Linux OS. (This property is deprecated, please use 'sshKeyPair' instead). + /// The SSH Key-pair used to authenticate with the VM's. + internal LinuxConfiguration(OSType osType, IDictionary serializedAdditionalRawData, bool? disablePasswordAuthentication, SshConfiguration ssh, SshKeyPair sshKeyPair) : base(osType, serializedAdditionalRawData) + { + DisablePasswordAuthentication = disablePasswordAuthentication; + Ssh = ssh; + SshKeyPair = sshKeyPair; + OSType = osType; + } + + /// Specifies whether password authentication should be disabled. + public bool? DisablePasswordAuthentication { get; set; } + /// Specifies the ssh key configuration for a Linux OS. (This property is deprecated, please use 'sshKeyPair' instead). + internal SshConfiguration Ssh { get; set; } + /// The list of SSH public keys used to authenticate with linux based VMs. + public IList SshPublicKeys + { + get + { + if (Ssh is null) + Ssh = new SshConfiguration(); + return Ssh.PublicKeys; + } + } + + /// The SSH Key-pair used to authenticate with the VM's. + public SshKeyPair SshKeyPair { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/LoadBalancerResourceNames.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/LoadBalancerResourceNames.Serialization.cs new file mode 100644 index 000000000000..24ce555c987a --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/LoadBalancerResourceNames.Serialization.cs @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class LoadBalancerResourceNames : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(LoadBalancerResourceNames)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(LoadBalancerName)) + { + writer.WritePropertyName("loadBalancerName"u8); + writer.WriteStringValue(LoadBalancerName); + } + if (Optional.IsCollectionDefined(FrontendIPConfigurationNames)) + { + writer.WritePropertyName("frontendIpConfigurationNames"u8); + writer.WriteStartArray(); + foreach (var item in FrontendIPConfigurationNames) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(BackendPoolNames)) + { + writer.WritePropertyName("backendPoolNames"u8); + writer.WriteStartArray(); + foreach (var item in BackendPoolNames) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(HealthProbeNames)) + { + writer.WritePropertyName("healthProbeNames"u8); + writer.WriteStartArray(); + foreach (var item in HealthProbeNames) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + LoadBalancerResourceNames IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(LoadBalancerResourceNames)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeLoadBalancerResourceNames(document.RootElement, options); + } + + internal static LoadBalancerResourceNames DeserializeLoadBalancerResourceNames(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string loadBalancerName = default; + IList frontendIPConfigurationNames = default; + IList backendPoolNames = default; + IList healthProbeNames = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("loadBalancerName"u8)) + { + loadBalancerName = property.Value.GetString(); + continue; + } + if (property.NameEquals("frontendIpConfigurationNames"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + frontendIPConfigurationNames = array; + continue; + } + if (property.NameEquals("backendPoolNames"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + backendPoolNames = array; + continue; + } + if (property.NameEquals("healthProbeNames"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + healthProbeNames = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new LoadBalancerResourceNames(loadBalancerName, frontendIPConfigurationNames ?? new ChangeTrackingList(), backendPoolNames ?? new ChangeTrackingList(), healthProbeNames ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(LoadBalancerResourceNames)} does not support writing '{options.Format}' format."); + } + } + + LoadBalancerResourceNames IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeLoadBalancerResourceNames(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(LoadBalancerResourceNames)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/LoadBalancerResourceNames.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/LoadBalancerResourceNames.cs new file mode 100644 index 000000000000..e3bf1c626759 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/LoadBalancerResourceNames.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The resource names object for load balancer and related resources. + public partial class LoadBalancerResourceNames + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public LoadBalancerResourceNames() + { + FrontendIPConfigurationNames = new ChangeTrackingList(); + BackendPoolNames = new ChangeTrackingList(); + HealthProbeNames = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The full resource name for load balancer. If this value is not provided, load balancer will be name as {ASCS/DB}-loadBalancer. + /// The list of frontend IP configuration names. If provided as input, size of this list should be 2 for cs layer and should be 1 for database layer. + /// The list of backend pool names. Currently, ACSS deploys only one backend pool and hence, size of this list should be 1. + /// The list of health probe names. If provided as input, size of this list should be 2 for cs layer and should be 1 for database layer. + /// Keeps track of any properties unknown to the library. + internal LoadBalancerResourceNames(string loadBalancerName, IList frontendIPConfigurationNames, IList backendPoolNames, IList healthProbeNames, IDictionary serializedAdditionalRawData) + { + LoadBalancerName = loadBalancerName; + FrontendIPConfigurationNames = frontendIPConfigurationNames; + BackendPoolNames = backendPoolNames; + HealthProbeNames = healthProbeNames; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The full resource name for load balancer. If this value is not provided, load balancer will be name as {ASCS/DB}-loadBalancer. + public string LoadBalancerName { get; set; } + /// The list of frontend IP configuration names. If provided as input, size of this list should be 2 for cs layer and should be 1 for database layer. + public IList FrontendIPConfigurationNames { get; } + /// The list of backend pool names. Currently, ACSS deploys only one backend pool and hence, size of this list should be 1. + public IList BackendPoolNames { get; } + /// The list of health probe names. If provided as input, size of this list should be 2 for cs layer and should be 1 for database layer. + public IList HealthProbeNames { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ManagedRGConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ManagedRGConfiguration.Serialization.cs new file mode 100644 index 000000000000..5d8103694c58 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ManagedRGConfiguration.Serialization.cs @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + internal partial class ManagedRGConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ManagedRGConfiguration)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ManagedRGConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ManagedRGConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeManagedRGConfiguration(document.RootElement, options); + } + + internal static ManagedRGConfiguration DeserializeManagedRGConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ManagedRGConfiguration(name, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ManagedRGConfiguration)} does not support writing '{options.Format}' format."); + } + } + + ManagedRGConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeManagedRGConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ManagedRGConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ManagedRGConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ManagedRGConfiguration.cs new file mode 100644 index 000000000000..97925c7a1239 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ManagedRGConfiguration.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Managed resource group configuration. + internal partial class ManagedRGConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ManagedRGConfiguration() + { + } + + /// Initializes a new instance of . + /// Managed resource group name. + /// Keeps track of any properties unknown to the library. + internal ManagedRGConfiguration(string name, IDictionary serializedAdditionalRawData) + { + Name = name; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Managed resource group name. + public string Name { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ManagedResourcesNetworkAccessType.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ManagedResourcesNetworkAccessType.cs new file mode 100644 index 000000000000..77453b9854c6 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ManagedResourcesNetworkAccessType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the network access type for managed resources. + public readonly partial struct ManagedResourcesNetworkAccessType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ManagedResourcesNetworkAccessType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PublicValue = "Public"; + private const string PrivateValue = "Private"; + + /// Managed resources will be deployed with public network access enabled. + public static ManagedResourcesNetworkAccessType Public { get; } = new ManagedResourcesNetworkAccessType(PublicValue); + /// Managed resources will be deployed with public network access disabled. + public static ManagedResourcesNetworkAccessType Private { get; } = new ManagedResourcesNetworkAccessType(PrivateValue); + /// Determines if two values are the same. + public static bool operator ==(ManagedResourcesNetworkAccessType left, ManagedResourcesNetworkAccessType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ManagedResourcesNetworkAccessType left, ManagedResourcesNetworkAccessType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ManagedResourcesNetworkAccessType(string value) => new ManagedResourcesNetworkAccessType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ManagedResourcesNetworkAccessType other && Equals(other); + /// + public bool Equals(ManagedResourcesNetworkAccessType 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/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/MessageServerProperties.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/MessageServerProperties.Serialization.cs new file mode 100644 index 000000000000..b18144e38439 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/MessageServerProperties.Serialization.cs @@ -0,0 +1,223 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class MessageServerProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(MessageServerProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(MsPort)) + { + writer.WritePropertyName("msPort"u8); + writer.WriteNumberValue(MsPort.Value); + } + if (options.Format != "W" && Optional.IsDefined(InternalMsPort)) + { + writer.WritePropertyName("internalMsPort"u8); + writer.WriteNumberValue(InternalMsPort.Value); + } + if (options.Format != "W" && Optional.IsDefined(HttpPort)) + { + writer.WritePropertyName("httpPort"u8); + writer.WriteNumberValue(HttpPort.Value); + } + if (options.Format != "W" && Optional.IsDefined(HttpsPort)) + { + writer.WritePropertyName("httpsPort"u8); + writer.WriteNumberValue(HttpsPort.Value); + } + if (options.Format != "W" && Optional.IsDefined(Hostname)) + { + writer.WritePropertyName("hostname"u8); + writer.WriteStringValue(Hostname); + } + if (options.Format != "W" && Optional.IsDefined(IPAddress)) + { + writer.WritePropertyName("ipAddress"u8); + writer.WriteStringValue(IPAddress); + } + if (options.Format != "W" && Optional.IsDefined(Health)) + { + writer.WritePropertyName("health"u8); + writer.WriteStringValue(Health.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + MessageServerProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(MessageServerProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeMessageServerProperties(document.RootElement, options); + } + + internal static MessageServerProperties DeserializeMessageServerProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + long? msPort = default; + long? internalMsPort = default; + long? httpPort = default; + long? httpsPort = default; + string hostname = default; + string ipAddress = default; + SapHealthState? health = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("msPort"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + msPort = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("internalMsPort"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + internalMsPort = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("httpPort"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + httpPort = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("httpsPort"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + httpsPort = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("hostname"u8)) + { + hostname = property.Value.GetString(); + continue; + } + if (property.NameEquals("ipAddress"u8)) + { + ipAddress = property.Value.GetString(); + continue; + } + if (property.NameEquals("health"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + health = new SapHealthState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new MessageServerProperties( + msPort, + internalMsPort, + httpPort, + httpsPort, + hostname, + ipAddress, + health, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(MessageServerProperties)} does not support writing '{options.Format}' format."); + } + } + + MessageServerProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeMessageServerProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(MessageServerProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/MessageServerProperties.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/MessageServerProperties.cs new file mode 100644 index 000000000000..d1c6765d55c6 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/MessageServerProperties.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; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the SAP message server properties. + public partial class MessageServerProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public MessageServerProperties() + { + } + + /// Initializes a new instance of . + /// message server port. + /// message server internal MS port. + /// message server HTTP Port. + /// message server HTTPS Port. + /// message server SAP Hostname. + /// message server IP Address. + /// Defines the health of SAP Instances. + /// Keeps track of any properties unknown to the library. + internal MessageServerProperties(long? msPort, long? internalMsPort, long? httpPort, long? httpsPort, string hostname, string ipAddress, SapHealthState? health, IDictionary serializedAdditionalRawData) + { + MsPort = msPort; + InternalMsPort = internalMsPort; + HttpPort = httpPort; + HttpsPort = httpsPort; + Hostname = hostname; + IPAddress = ipAddress; + Health = health; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// message server port. + public long? MsPort { get; } + /// message server internal MS port. + public long? InternalMsPort { get; } + /// message server HTTP Port. + public long? HttpPort { get; } + /// message server HTTPS Port. + public long? HttpsPort { get; } + /// message server SAP Hostname. + public string Hostname { get; } + /// message server IP Address. + public string IPAddress { get; } + /// Defines the health of SAP Instances. + public SapHealthState? Health { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/MountFileShareConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/MountFileShareConfiguration.Serialization.cs new file mode 100644 index 000000000000..ab44964515d8 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/MountFileShareConfiguration.Serialization.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class MountFileShareConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(MountFileShareConfiguration)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + writer.WritePropertyName("privateEndpointId"u8); + writer.WriteStringValue(PrivateEndpointId); + } + + MountFileShareConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(MountFileShareConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeMountFileShareConfiguration(document.RootElement, options); + } + + internal static MountFileShareConfiguration DeserializeMountFileShareConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string id = default; + string privateEndpointId = default; + FileShareConfigurationType configurationType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("privateEndpointId"u8)) + { + privateEndpointId = property.Value.GetString(); + continue; + } + if (property.NameEquals("configurationType"u8)) + { + configurationType = new FileShareConfigurationType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new MountFileShareConfiguration(configurationType, serializedAdditionalRawData, id, privateEndpointId); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(MountFileShareConfiguration)} does not support writing '{options.Format}' format."); + } + } + + MountFileShareConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeMountFileShareConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(MountFileShareConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/MountFileShareConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/MountFileShareConfiguration.cs new file mode 100644 index 000000000000..97b436cc473b --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/MountFileShareConfiguration.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Gets or sets the file share configuration where the transport directory fileshare already exists, and user wishes to mount the fileshare as a part of the create infra flow. + public partial class MountFileShareConfiguration : FileShareConfiguration + { + /// Initializes a new instance of . + /// The fileshare resource ID. + /// The private endpoint resource ID. + /// or is null. + public MountFileShareConfiguration(string id, string privateEndpointId) + { + Argument.AssertNotNull(id, nameof(id)); + Argument.AssertNotNull(privateEndpointId, nameof(privateEndpointId)); + + Id = id; + PrivateEndpointId = privateEndpointId; + ConfigurationType = FileShareConfigurationType.Mount; + } + + /// Initializes a new instance of . + /// The type of file share config, eg: Mount/CreateAndMount/Skip. + /// Keeps track of any properties unknown to the library. + /// The fileshare resource ID. + /// The private endpoint resource ID. + internal MountFileShareConfiguration(FileShareConfigurationType configurationType, IDictionary serializedAdditionalRawData, string id, string privateEndpointId) : base(configurationType, serializedAdditionalRawData) + { + Id = id; + PrivateEndpointId = privateEndpointId; + ConfigurationType = configurationType; + } + + /// Initializes a new instance of for deserialization. + internal MountFileShareConfiguration() + { + } + + /// The fileshare resource ID. + public string Id { get; set; } + /// The private endpoint resource ID. + public string PrivateEndpointId { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/NamingPatternType.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/NamingPatternType.cs new file mode 100644 index 000000000000..f80495efa1ed --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/NamingPatternType.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The pattern type to be used for resource naming. + internal readonly partial struct NamingPatternType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public NamingPatternType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string FullResourceNameValue = "FullResourceName"; + + /// Full resource names that will be created by service. + public static NamingPatternType FullResourceName { get; } = new NamingPatternType(FullResourceNameValue); + /// Determines if two values are the same. + public static bool operator ==(NamingPatternType left, NamingPatternType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(NamingPatternType left, NamingPatternType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator NamingPatternType(string value) => new NamingPatternType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is NamingPatternType other && Equals(other); + /// + public bool Equals(NamingPatternType 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/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/NetworkConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/NetworkConfiguration.Serialization.cs new file mode 100644 index 000000000000..ed3086cbac72 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/NetworkConfiguration.Serialization.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + internal partial class NetworkConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NetworkConfiguration)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(IsSecondaryIPEnabled)) + { + writer.WritePropertyName("isSecondaryIpEnabled"u8); + writer.WriteBooleanValue(IsSecondaryIPEnabled.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + NetworkConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NetworkConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNetworkConfiguration(document.RootElement, options); + } + + internal static NetworkConfiguration DeserializeNetworkConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool? isSecondaryIPEnabled = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("isSecondaryIpEnabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isSecondaryIPEnabled = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NetworkConfiguration(isSecondaryIPEnabled, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(NetworkConfiguration)} does not support writing '{options.Format}' format."); + } + } + + NetworkConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeNetworkConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NetworkConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/NetworkConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/NetworkConfiguration.cs new file mode 100644 index 000000000000..ef284cd37b59 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/NetworkConfiguration.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the network configuration type for SAP system infrastructure that is being deployed. + internal partial class NetworkConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public NetworkConfiguration() + { + } + + /// Initializes a new instance of . + /// Specifies whether a secondary IP address should be added to the network interface on all VMs of the SAP system being deployed. + /// Keeps track of any properties unknown to the library. + internal NetworkConfiguration(bool? isSecondaryIPEnabled, IDictionary serializedAdditionalRawData) + { + IsSecondaryIPEnabled = isSecondaryIPEnabled; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Specifies whether a secondary IP address should be added to the network interface on all VMs of the SAP system being deployed. + public bool? IsSecondaryIPEnabled { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/NetworkInterfaceResourceNames.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/NetworkInterfaceResourceNames.Serialization.cs new file mode 100644 index 000000000000..d5b41159d43b --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/NetworkInterfaceResourceNames.Serialization.cs @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class NetworkInterfaceResourceNames : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NetworkInterfaceResourceNames)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(NetworkInterfaceName)) + { + writer.WritePropertyName("networkInterfaceName"u8); + writer.WriteStringValue(NetworkInterfaceName); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + NetworkInterfaceResourceNames IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NetworkInterfaceResourceNames)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNetworkInterfaceResourceNames(document.RootElement, options); + } + + internal static NetworkInterfaceResourceNames DeserializeNetworkInterfaceResourceNames(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string networkInterfaceName = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("networkInterfaceName"u8)) + { + networkInterfaceName = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NetworkInterfaceResourceNames(networkInterfaceName, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(NetworkInterfaceResourceNames)} does not support writing '{options.Format}' format."); + } + } + + NetworkInterfaceResourceNames IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeNetworkInterfaceResourceNames(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NetworkInterfaceResourceNames)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/NetworkInterfaceResourceNames.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/NetworkInterfaceResourceNames.cs new file mode 100644 index 000000000000..44b73d795b66 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/NetworkInterfaceResourceNames.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The resource names object for network interface and related resources. + public partial class NetworkInterfaceResourceNames + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public NetworkInterfaceResourceNames() + { + } + + /// Initializes a new instance of . + /// The full name for network interface. If name is not provided, service uses a default name based on the deployment type. For SingleServer, default name is {SID}-Nic. In case of HA-AvZone systems, default name will be {SID}-{App/ASCS/DB}-Zone{A/B}-Nic with an incrementor at the end in case of more than 1 instance per layer. For distributed and HA-AvSet systems, default name will be {SID}-{App/ASCS/DB}-Nic with an incrementor at the end in case of more than 1 instance per layer. + /// Keeps track of any properties unknown to the library. + internal NetworkInterfaceResourceNames(string networkInterfaceName, IDictionary serializedAdditionalRawData) + { + NetworkInterfaceName = networkInterfaceName; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The full name for network interface. If name is not provided, service uses a default name based on the deployment type. For SingleServer, default name is {SID}-Nic. In case of HA-AvZone systems, default name will be {SID}-{App/ASCS/DB}-Zone{A/B}-Nic with an incrementor at the end in case of more than 1 instance per layer. For distributed and HA-AvSet systems, default name will be {SID}-{App/ASCS/DB}-Nic with an incrementor at the end in case of more than 1 instance per layer. + public string NetworkInterfaceName { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OSConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OSConfiguration.Serialization.cs new file mode 100644 index 000000000000..3a58ecaea8ba --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OSConfiguration.Serialization.cs @@ -0,0 +1,118 @@ +// 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.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + [PersistableModelProxy(typeof(UnknownOSConfiguration))] + public partial class OSConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OSConfiguration)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("osType"u8); + writer.WriteStringValue(OSType.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + OSConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OSConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeOSConfiguration(document.RootElement, options); + } + + internal static OSConfiguration DeserializeOSConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("osType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "Linux": return LinuxConfiguration.DeserializeLinuxConfiguration(element, options); + case "Windows": return WindowsConfiguration.DeserializeWindowsConfiguration(element, options); + } + } + return UnknownOSConfiguration.DeserializeUnknownOSConfiguration(element, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(OSConfiguration)} does not support writing '{options.Format}' format."); + } + } + + OSConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeOSConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(OSConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OSConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OSConfiguration.cs new file mode 100644 index 000000000000..f5348cf70e97 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OSConfiguration.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// + /// Defines the OS configuration. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public abstract partial class OSConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + protected OSConfiguration() + { + } + + /// Initializes a new instance of . + /// The OS Type. + /// Keeps track of any properties unknown to the library. + internal OSConfiguration(OSType osType, IDictionary serializedAdditionalRawData) + { + OSType = osType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The OS Type. + internal OSType OSType { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OSProfile.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OSProfile.Serialization.cs new file mode 100644 index 000000000000..9c8146d08f74 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OSProfile.Serialization.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class OSProfile : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OSProfile)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(AdminUsername)) + { + writer.WritePropertyName("adminUsername"u8); + writer.WriteStringValue(AdminUsername); + } + if (Optional.IsDefined(AdminPassword)) + { + writer.WritePropertyName("adminPassword"u8); + writer.WriteStringValue(AdminPassword); + } + if (Optional.IsDefined(OSConfiguration)) + { + writer.WritePropertyName("osConfiguration"u8); + writer.WriteObjectValue(OSConfiguration, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + OSProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OSProfile)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeOSProfile(document.RootElement, options); + } + + internal static OSProfile DeserializeOSProfile(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string adminUsername = default; + string adminPassword = default; + OSConfiguration osConfiguration = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("adminUsername"u8)) + { + adminUsername = property.Value.GetString(); + continue; + } + if (property.NameEquals("adminPassword"u8)) + { + adminPassword = property.Value.GetString(); + continue; + } + if (property.NameEquals("osConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + osConfiguration = OSConfiguration.DeserializeOSConfiguration(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new OSProfile(adminUsername, adminPassword, osConfiguration, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(OSProfile)} does not support writing '{options.Format}' format."); + } + } + + OSProfile IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeOSProfile(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(OSProfile)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OSProfile.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OSProfile.cs new file mode 100644 index 000000000000..b90bef9c789e --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OSProfile.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Specifies the operating system settings for the virtual machine. Some of the settings cannot be changed once VM is provisioned. + public partial class OSProfile + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public OSProfile() + { + } + + /// Initializes a new instance of . + /// Specifies the name of the administrator account. <br><br> This property cannot be updated after the VM is created. <br><br> **Windows-only restriction:** Cannot end in "." <br><br> **Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5". <br><br> **Minimum-length (Linux):** 1 character <br><br> **Max-length (Linux):** 64 characters <br><br> **Max-length (Windows):** 20 characters. + /// Specifies the password of the administrator account. <br><br> **Minimum-length (Windows):** 8 characters <br><br> **Minimum-length (Linux):** 6 characters <br><br> **Max-length (Windows):** 123 characters <br><br> **Max-length (Linux):** 72 characters <br><br> **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled <br> Has lower characters <br>Has upper characters <br> Has a digit <br> Has a special character (Regex match [\W_]) <br><br> **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" <br><br> For resetting the password, see [How to reset the Remote Desktop service or its login password in a Windows VM](https://learn.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp) <br><br> For resetting root password, see [Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension](https://learn.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection). + /// + /// Specifies Windows operating system settings on the virtual machine. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// Keeps track of any properties unknown to the library. + internal OSProfile(string adminUsername, string adminPassword, OSConfiguration osConfiguration, IDictionary serializedAdditionalRawData) + { + AdminUsername = adminUsername; + AdminPassword = adminPassword; + OSConfiguration = osConfiguration; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Specifies the name of the administrator account. <br><br> This property cannot be updated after the VM is created. <br><br> **Windows-only restriction:** Cannot end in "." <br><br> **Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5". <br><br> **Minimum-length (Linux):** 1 character <br><br> **Max-length (Linux):** 64 characters <br><br> **Max-length (Windows):** 20 characters. + public string AdminUsername { get; set; } + /// Specifies the password of the administrator account. <br><br> **Minimum-length (Windows):** 8 characters <br><br> **Minimum-length (Linux):** 6 characters <br><br> **Max-length (Windows):** 123 characters <br><br> **Max-length (Linux):** 72 characters <br><br> **Complexity requirements:** 3 out of 4 conditions below need to be fulfilled <br> Has lower characters <br>Has upper characters <br> Has a digit <br> Has a special character (Regex match [\W_]) <br><br> **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" <br><br> For resetting the password, see [How to reset the Remote Desktop service or its login password in a Windows VM](https://learn.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp) <br><br> For resetting root password, see [Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension](https://learn.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection). + public string AdminPassword { get; set; } + /// + /// Specifies Windows operating system settings on the virtual machine. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public OSConfiguration OSConfiguration { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OSSapConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OSSapConfiguration.Serialization.cs new file mode 100644 index 000000000000..0c26d26478e7 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OSSapConfiguration.Serialization.cs @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class OSSapConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OSSapConfiguration)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(DeployerVmPackages)) + { + writer.WritePropertyName("deployerVmPackages"u8); + writer.WriteObjectValue(DeployerVmPackages, options); + } + if (Optional.IsDefined(SapFqdn)) + { + writer.WritePropertyName("sapFqdn"u8); + writer.WriteStringValue(SapFqdn); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + OSSapConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OSSapConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeOSSapConfiguration(document.RootElement, options); + } + + internal static OSSapConfiguration DeserializeOSSapConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DeployerVmPackages deployerVmPackages = default; + string sapFqdn = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("deployerVmPackages"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + deployerVmPackages = DeployerVmPackages.DeserializeDeployerVmPackages(property.Value, options); + continue; + } + if (property.NameEquals("sapFqdn"u8)) + { + sapFqdn = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new OSSapConfiguration(deployerVmPackages, sapFqdn, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(OSSapConfiguration)} does not support writing '{options.Format}' format."); + } + } + + OSSapConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeOSSapConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(OSSapConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OSSapConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OSSapConfiguration.cs new file mode 100644 index 000000000000..c1435f2ce3f4 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OSSapConfiguration.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the OS and SAP Configurations for Deployment. + public partial class OSSapConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public OSSapConfiguration() + { + } + + /// Initializes a new instance of . + /// The url and storage account ID where deployer VM packages are uploaded. + /// The FQDN to set for the SAP system. + /// Keeps track of any properties unknown to the library. + internal OSSapConfiguration(DeployerVmPackages deployerVmPackages, string sapFqdn, IDictionary serializedAdditionalRawData) + { + DeployerVmPackages = deployerVmPackages; + SapFqdn = sapFqdn; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The url and storage account ID where deployer VM packages are uploaded. + public DeployerVmPackages DeployerVmPackages { get; set; } + /// The FQDN to set for the SAP system. + public string SapFqdn { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OSType.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OSType.cs new file mode 100644 index 000000000000..c7ee614b79b8 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OSType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The OS Type. + internal readonly partial struct OSType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public OSType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string LinuxValue = "Linux"; + private const string WindowsValue = "Windows"; + + /// Linux OS Type. + public static OSType Linux { get; } = new OSType(LinuxValue); + /// Windows OS Type. + public static OSType Windows { get; } = new OSType(WindowsValue); + /// Determines if two values are the same. + public static bool operator ==(OSType left, OSType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(OSType left, OSType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator OSType(string value) => new OSType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is OSType other && Equals(other); + /// + public bool Equals(OSType 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/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OperationStatusResult.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OperationStatusResult.Serialization.cs new file mode 100644 index 000000000000..45b057114b3f --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OperationStatusResult.Serialization.cs @@ -0,0 +1,258 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class OperationStatusResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OperationStatusResult)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status); + if (Optional.IsDefined(PercentComplete)) + { + writer.WritePropertyName("percentComplete"u8); + writer.WriteNumberValue(PercentComplete.Value); + } + 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.IsCollectionDefined(Operations)) + { + writer.WritePropertyName("operations"u8); + writer.WriteStartArray(); + foreach (var item in Operations) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Error)) + { + writer.WritePropertyName("error"u8); + JsonSerializer.Serialize(writer, Error); + } + if (options.Format != "W" && Optional.IsDefined(ResourceId)) + { + writer.WritePropertyName("resourceId"u8); + writer.WriteStringValue(ResourceId); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + OperationStatusResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OperationStatusResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeOperationStatusResult(document.RootElement, options); + } + + internal static OperationStatusResult DeserializeOperationStatusResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier id = default; + string name = default; + string status = default; + double? percentComplete = default; + DateTimeOffset? startTime = default; + DateTimeOffset? endTime = default; + IReadOnlyList operations = default; + ResponseError error = default; + string resourceId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("status"u8)) + { + status = property.Value.GetString(); + continue; + } + if (property.NameEquals("percentComplete"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + percentComplete = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("startTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + startTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("endTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("operations"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DeserializeOperationStatusResult(item, options)); + } + operations = array; + continue; + } + if (property.NameEquals("error"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + error = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("resourceId"u8)) + { + resourceId = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new OperationStatusResult( + id, + name, + status, + percentComplete, + startTime, + endTime, + operations ?? new ChangeTrackingList(), + error, + resourceId, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(OperationStatusResult)} does not support writing '{options.Format}' format."); + } + } + + OperationStatusResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeOperationStatusResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(OperationStatusResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OperationStatusResult.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OperationStatusResult.cs new file mode 100644 index 000000000000..37b47a98223c --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/OperationStatusResult.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The current status of an async operation. + public partial class OperationStatusResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Operation status. + /// is null. + internal OperationStatusResult(string status) + { + Argument.AssertNotNull(status, nameof(status)); + + Status = status; + Operations = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Fully qualified ID for the async operation. + /// Name of the async operation. + /// Operation status. + /// Percent of the operation that is complete. + /// The start time of the operation. + /// The end time of the operation. + /// The operations list. + /// If present, details of the operation error. + /// Fully qualified ID of the resource against which the original async operation was started. + /// Keeps track of any properties unknown to the library. + internal OperationStatusResult(ResourceIdentifier id, string name, string status, double? percentComplete, DateTimeOffset? startOn, DateTimeOffset? endOn, IReadOnlyList operations, ResponseError error, string resourceId, IDictionary serializedAdditionalRawData) + { + Id = id; + Name = name; + Status = status; + PercentComplete = percentComplete; + StartOn = startOn; + EndOn = endOn; + Operations = operations; + Error = error; + ResourceId = resourceId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal OperationStatusResult() + { + } + + /// Fully qualified ID for the async operation. + public ResourceIdentifier Id { get; } + /// Name of the async operation. + public string Name { get; } + /// Operation status. + public string Status { get; } + /// Percent of the operation that is complete. + public double? PercentComplete { get; } + /// The start time of the operation. + public DateTimeOffset? StartOn { get; } + /// The end time of the operation. + public DateTimeOffset? EndOn { get; } + /// The operations list. + public IReadOnlyList Operations { get; } + /// If present, details of the operation error. + public ResponseError Error { get; } + /// Fully qualified ID of the resource against which the original async operation was started. + public string ResourceId { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPApplicationServerInstanceListResult.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPApplicationServerInstanceListResult.Serialization.cs new file mode 100644 index 000000000000..8f88985f2845 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPApplicationServerInstanceListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + internal partial class SAPApplicationServerInstanceListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SAPApplicationServerInstanceListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SAPApplicationServerInstanceListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SAPApplicationServerInstanceListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSAPApplicationServerInstanceListResult(document.RootElement, options); + } + + internal static SAPApplicationServerInstanceListResult DeserializeSAPApplicationServerInstanceListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SapApplicationServerInstanceData.DeserializeSapApplicationServerInstanceData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SAPApplicationServerInstanceListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SAPApplicationServerInstanceListResult)} does not support writing '{options.Format}' format."); + } + } + + SAPApplicationServerInstanceListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSAPApplicationServerInstanceListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SAPApplicationServerInstanceListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPApplicationServerInstanceListResult.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPApplicationServerInstanceListResult.cs new file mode 100644 index 000000000000..489d532757e6 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPApplicationServerInstanceListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The response of a SAPApplicationServerInstance list operation. + internal partial class SAPApplicationServerInstanceListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The SAPApplicationServerInstance items on this page. + /// is null. + internal SAPApplicationServerInstanceListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The SAPApplicationServerInstance items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal SAPApplicationServerInstanceListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SAPApplicationServerInstanceListResult() + { + } + + /// The SAPApplicationServerInstance items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPCentralServerInstanceListResult.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPCentralServerInstanceListResult.Serialization.cs new file mode 100644 index 000000000000..0cdf65d9239c --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPCentralServerInstanceListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + internal partial class SAPCentralServerInstanceListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SAPCentralServerInstanceListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SAPCentralServerInstanceListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SAPCentralServerInstanceListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSAPCentralServerInstanceListResult(document.RootElement, options); + } + + internal static SAPCentralServerInstanceListResult DeserializeSAPCentralServerInstanceListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SapCentralServerInstanceData.DeserializeSapCentralServerInstanceData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SAPCentralServerInstanceListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SAPCentralServerInstanceListResult)} does not support writing '{options.Format}' format."); + } + } + + SAPCentralServerInstanceListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSAPCentralServerInstanceListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SAPCentralServerInstanceListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPCentralServerInstanceListResult.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPCentralServerInstanceListResult.cs new file mode 100644 index 000000000000..e96dcd7dc003 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPCentralServerInstanceListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The response of a SAPCentralServerInstance list operation. + internal partial class SAPCentralServerInstanceListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The SAPCentralServerInstance items on this page. + /// is null. + internal SAPCentralServerInstanceListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The SAPCentralServerInstance items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal SAPCentralServerInstanceListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SAPCentralServerInstanceListResult() + { + } + + /// The SAPCentralServerInstance items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPDatabaseInstanceListResult.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPDatabaseInstanceListResult.Serialization.cs new file mode 100644 index 000000000000..736ad4e1a067 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPDatabaseInstanceListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + internal partial class SAPDatabaseInstanceListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SAPDatabaseInstanceListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SAPDatabaseInstanceListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SAPDatabaseInstanceListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSAPDatabaseInstanceListResult(document.RootElement, options); + } + + internal static SAPDatabaseInstanceListResult DeserializeSAPDatabaseInstanceListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SapDatabaseInstanceData.DeserializeSapDatabaseInstanceData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SAPDatabaseInstanceListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SAPDatabaseInstanceListResult)} does not support writing '{options.Format}' format."); + } + } + + SAPDatabaseInstanceListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSAPDatabaseInstanceListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SAPDatabaseInstanceListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPDatabaseInstanceListResult.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPDatabaseInstanceListResult.cs new file mode 100644 index 000000000000..e1105767d0dc --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPDatabaseInstanceListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The response of a SAPDatabaseInstance list operation. + internal partial class SAPDatabaseInstanceListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The SAPDatabaseInstance items on this page. + /// is null. + internal SAPDatabaseInstanceListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The SAPDatabaseInstance items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal SAPDatabaseInstanceListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SAPDatabaseInstanceListResult() + { + } + + /// The SAPDatabaseInstance items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPVirtualInstanceIdentity.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPVirtualInstanceIdentity.Serialization.cs new file mode 100644 index 000000000000..c50410d992b3 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPVirtualInstanceIdentity.Serialization.cs @@ -0,0 +1,153 @@ +// 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.Models; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SAPVirtualInstanceIdentity : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SAPVirtualInstanceIdentity)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToString()); + if (Optional.IsCollectionDefined(UserAssignedIdentities)) + { + writer.WritePropertyName("userAssignedIdentities"u8); + writer.WriteStartObject(); + foreach (var item in UserAssignedIdentities) + { + writer.WritePropertyName(item.Key); + JsonSerializer.Serialize(writer, item.Value); + } + writer.WriteEndObject(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SAPVirtualInstanceIdentity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SAPVirtualInstanceIdentity)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSAPVirtualInstanceIdentity(document.RootElement, options); + } + + internal static SAPVirtualInstanceIdentity DeserializeSAPVirtualInstanceIdentity(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + SAPVirtualInstanceIdentityType type = default; + IDictionary userAssignedIdentities = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type"u8)) + { + type = new SAPVirtualInstanceIdentityType(property.Value.GetString()); + continue; + } + if (property.NameEquals("userAssignedIdentities"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, JsonSerializer.Deserialize(property0.Value.GetRawText())); + } + userAssignedIdentities = dictionary; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SAPVirtualInstanceIdentity(type, userAssignedIdentities ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SAPVirtualInstanceIdentity)} does not support writing '{options.Format}' format."); + } + } + + SAPVirtualInstanceIdentity IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSAPVirtualInstanceIdentity(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SAPVirtualInstanceIdentity)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPVirtualInstanceIdentity.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPVirtualInstanceIdentity.cs new file mode 100644 index 000000000000..8067eca50865 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPVirtualInstanceIdentity.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Managed service identity (user assigned identities). + public partial class SAPVirtualInstanceIdentity + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The type of managed identity assigned to this resource. + public SAPVirtualInstanceIdentity(SAPVirtualInstanceIdentityType type) + { + Type = type; + UserAssignedIdentities = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// The type of managed identity assigned to this resource. + /// The identities assigned to this resource by the user. + /// Keeps track of any properties unknown to the library. + internal SAPVirtualInstanceIdentity(SAPVirtualInstanceIdentityType type, IDictionary userAssignedIdentities, IDictionary serializedAdditionalRawData) + { + Type = type; + UserAssignedIdentities = userAssignedIdentities; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SAPVirtualInstanceIdentity() + { + } + + /// The type of managed identity assigned to this resource. + public SAPVirtualInstanceIdentityType Type { get; set; } + /// The identities assigned to this resource by the user. + public IDictionary UserAssignedIdentities { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPVirtualInstanceIdentityType.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPVirtualInstanceIdentityType.cs new file mode 100644 index 000000000000..8d542c8db648 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPVirtualInstanceIdentityType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Type of managed service identity (where only None and UserAssigned types are allowed). + public readonly partial struct SAPVirtualInstanceIdentityType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SAPVirtualInstanceIdentityType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoneValue = "None"; + private const string UserAssignedValue = "UserAssigned"; + + /// No managed identity. + public static SAPVirtualInstanceIdentityType None { get; } = new SAPVirtualInstanceIdentityType(NoneValue); + /// User assigned managed identity. + public static SAPVirtualInstanceIdentityType UserAssigned { get; } = new SAPVirtualInstanceIdentityType(UserAssignedValue); + /// Determines if two values are the same. + public static bool operator ==(SAPVirtualInstanceIdentityType left, SAPVirtualInstanceIdentityType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SAPVirtualInstanceIdentityType left, SAPVirtualInstanceIdentityType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator SAPVirtualInstanceIdentityType(string value) => new SAPVirtualInstanceIdentityType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SAPVirtualInstanceIdentityType other && Equals(other); + /// + public bool Equals(SAPVirtualInstanceIdentityType 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/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPVirtualInstanceListResult.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPVirtualInstanceListResult.Serialization.cs new file mode 100644 index 000000000000..9323baf845fa --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPVirtualInstanceListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + internal partial class SAPVirtualInstanceListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SAPVirtualInstanceListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SAPVirtualInstanceListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SAPVirtualInstanceListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSAPVirtualInstanceListResult(document.RootElement, options); + } + + internal static SAPVirtualInstanceListResult DeserializeSAPVirtualInstanceListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SapVirtualInstanceData.DeserializeSapVirtualInstanceData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SAPVirtualInstanceListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SAPVirtualInstanceListResult)} does not support writing '{options.Format}' format."); + } + } + + SAPVirtualInstanceListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSAPVirtualInstanceListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SAPVirtualInstanceListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPVirtualInstanceListResult.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPVirtualInstanceListResult.cs new file mode 100644 index 000000000000..5b521df7e308 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SAPVirtualInstanceListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The response of a SAPVirtualInstance list operation. + internal partial class SAPVirtualInstanceListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The SAPVirtualInstance items on this page. + /// is null. + internal SAPVirtualInstanceListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The SAPVirtualInstance items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal SAPVirtualInstanceListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SAPVirtualInstanceListResult() + { + } + + /// The SAPVirtualInstance items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapApplicationServerInstancePatch.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapApplicationServerInstancePatch.Serialization.cs new file mode 100644 index 000000000000..8d5b49002b4f --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapApplicationServerInstancePatch.Serialization.cs @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SapApplicationServerInstancePatch : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapApplicationServerInstancePatch)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SapApplicationServerInstancePatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapApplicationServerInstancePatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapApplicationServerInstancePatch(document.RootElement, options); + } + + internal static SapApplicationServerInstancePatch DeserializeSapApplicationServerInstancePatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary tags = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SapApplicationServerInstancePatch(tags ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapApplicationServerInstancePatch)} does not support writing '{options.Format}' format."); + } + } + + SapApplicationServerInstancePatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSapApplicationServerInstancePatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapApplicationServerInstancePatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapApplicationServerInstancePatch.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapApplicationServerInstancePatch.cs new file mode 100644 index 000000000000..15de09ef1995 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapApplicationServerInstancePatch.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the request body for updating SAP Application Instance. + public partial class SapApplicationServerInstancePatch + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public SapApplicationServerInstancePatch() + { + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// Gets or sets the Resource tags. + /// Keeps track of any properties unknown to the library. + internal SapApplicationServerInstancePatch(IDictionary tags, IDictionary serializedAdditionalRawData) + { + Tags = tags; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets or sets the Resource tags. + public IDictionary Tags { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapApplicationServerProperties.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapApplicationServerProperties.Serialization.cs new file mode 100644 index 000000000000..b80b8c544d77 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapApplicationServerProperties.Serialization.cs @@ -0,0 +1,358 @@ +// 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.Resources.Models; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SapApplicationServerProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapApplicationServerProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(InstanceNo)) + { + writer.WritePropertyName("instanceNo"u8); + writer.WriteStringValue(InstanceNo); + } + if (options.Format != "W" && Optional.IsDefined(Subnet)) + { + writer.WritePropertyName("subnet"u8); + writer.WriteStringValue(Subnet); + } + if (options.Format != "W" && Optional.IsDefined(Hostname)) + { + writer.WritePropertyName("hostname"u8); + writer.WriteStringValue(Hostname); + } + if (options.Format != "W" && Optional.IsDefined(KernelVersion)) + { + writer.WritePropertyName("kernelVersion"u8); + writer.WriteStringValue(KernelVersion); + } + if (options.Format != "W" && Optional.IsDefined(KernelPatch)) + { + writer.WritePropertyName("kernelPatch"u8); + writer.WriteStringValue(KernelPatch); + } + if (options.Format != "W" && Optional.IsDefined(IPAddress)) + { + writer.WritePropertyName("ipAddress"u8); + writer.WriteStringValue(IPAddress); + } + if (options.Format != "W" && Optional.IsDefined(GatewayPort)) + { + writer.WritePropertyName("gatewayPort"u8); + writer.WriteNumberValue(GatewayPort.Value); + } + if (options.Format != "W" && Optional.IsDefined(IcmHttpPort)) + { + writer.WritePropertyName("icmHttpPort"u8); + writer.WriteNumberValue(IcmHttpPort.Value); + } + if (options.Format != "W" && Optional.IsDefined(IcmHttpsPort)) + { + writer.WritePropertyName("icmHttpsPort"u8); + writer.WriteNumberValue(IcmHttpsPort.Value); + } + if (options.Format != "W" && Optional.IsDefined(DispatcherStatus)) + { + writer.WritePropertyName("dispatcherStatus"u8); + writer.WriteStringValue(DispatcherStatus); + } + if (options.Format != "W" && Optional.IsDefined(LoadBalancerDetails)) + { + writer.WritePropertyName("loadBalancerDetails"u8); + JsonSerializer.Serialize(writer, LoadBalancerDetails); + } + if (options.Format != "W" && Optional.IsCollectionDefined(VmDetails)) + { + writer.WritePropertyName("vmDetails"u8); + writer.WriteStartArray(); + foreach (var item in VmDetails) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(Health)) + { + writer.WritePropertyName("health"u8); + writer.WriteStringValue(Health.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(Errors)) + { + writer.WritePropertyName("errors"u8); + writer.WriteObjectValue(Errors, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SapApplicationServerProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapApplicationServerProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapApplicationServerProperties(document.RootElement, options); + } + + internal static SapApplicationServerProperties DeserializeSapApplicationServerProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string instanceNo = default; + string subnet = default; + string hostname = default; + string kernelVersion = default; + string kernelPatch = default; + string ipAddress = default; + long? gatewayPort = default; + long? icmHttpPort = default; + long? icmHttpsPort = default; + string dispatcherStatus = default; + SubResource loadBalancerDetails = default; + IReadOnlyList vmDetails = default; + SapVirtualInstanceStatus? status = default; + SapHealthState? health = default; + SapVirtualInstanceProvisioningState? provisioningState = default; + SapVirtualInstanceError errors = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("instanceNo"u8)) + { + instanceNo = property.Value.GetString(); + continue; + } + if (property.NameEquals("subnet"u8)) + { + subnet = property.Value.GetString(); + continue; + } + if (property.NameEquals("hostname"u8)) + { + hostname = property.Value.GetString(); + continue; + } + if (property.NameEquals("kernelVersion"u8)) + { + kernelVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("kernelPatch"u8)) + { + kernelPatch = property.Value.GetString(); + continue; + } + if (property.NameEquals("ipAddress"u8)) + { + ipAddress = property.Value.GetString(); + continue; + } + if (property.NameEquals("gatewayPort"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + gatewayPort = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("icmHttpPort"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + icmHttpPort = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("icmHttpsPort"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + icmHttpsPort = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("dispatcherStatus"u8)) + { + dispatcherStatus = property.Value.GetString(); + continue; + } + if (property.NameEquals("loadBalancerDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + loadBalancerDetails = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("vmDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ApplicationServerVmDetails.DeserializeApplicationServerVmDetails(item, options)); + } + vmDetails = array; + continue; + } + if (property.NameEquals("status"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new SapVirtualInstanceStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("health"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + health = new SapHealthState(property.Value.GetString()); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new SapVirtualInstanceProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("errors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + errors = SapVirtualInstanceError.DeserializeSapVirtualInstanceError(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SapApplicationServerProperties( + instanceNo, + subnet, + hostname, + kernelVersion, + kernelPatch, + ipAddress, + gatewayPort, + icmHttpPort, + icmHttpsPort, + dispatcherStatus, + loadBalancerDetails, + vmDetails ?? new ChangeTrackingList(), + status, + health, + provisioningState, + errors, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapApplicationServerProperties)} does not support writing '{options.Format}' format."); + } + } + + SapApplicationServerProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSapApplicationServerProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapApplicationServerProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapApplicationServerProperties.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapApplicationServerProperties.cs new file mode 100644 index 000000000000..d3d6af0f324d --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapApplicationServerProperties.cs @@ -0,0 +1,139 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the SAP Application Server instance properties. + public partial class SapApplicationServerProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public SapApplicationServerProperties() + { + VmDetails = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Application server Instance Number. + /// Application server Subnet. + /// Application server instance SAP hostname. + /// Application server instance SAP Kernel Version. + /// Application server instance SAP Kernel Patch level. + /// Application server instance SAP IP Address. + /// Application server instance gateway Port. + /// Application server instance ICM HTTP Port. + /// Application server instance ICM HTTPS Port. + /// Application server instance dispatcher status. + /// The Load Balancer details such as LoadBalancer ID attached to Application Server Virtual Machines. + /// The list of virtual machines. + /// Defines the SAP Instance status. + /// Defines the health of SAP Instances. + /// Defines the provisioning states. + /// Defines the Application Instance errors. + /// Keeps track of any properties unknown to the library. + internal SapApplicationServerProperties(string instanceNo, string subnet, string hostname, string kernelVersion, string kernelPatch, string ipAddress, long? gatewayPort, long? icmHttpPort, long? icmHttpsPort, string dispatcherStatus, SubResource loadBalancerDetails, IReadOnlyList vmDetails, SapVirtualInstanceStatus? status, SapHealthState? health, SapVirtualInstanceProvisioningState? provisioningState, SapVirtualInstanceError errors, IDictionary serializedAdditionalRawData) + { + InstanceNo = instanceNo; + Subnet = subnet; + Hostname = hostname; + KernelVersion = kernelVersion; + KernelPatch = kernelPatch; + IPAddress = ipAddress; + GatewayPort = gatewayPort; + IcmHttpPort = icmHttpPort; + IcmHttpsPort = icmHttpsPort; + DispatcherStatus = dispatcherStatus; + LoadBalancerDetails = loadBalancerDetails; + VmDetails = vmDetails; + Status = status; + Health = health; + ProvisioningState = provisioningState; + Errors = errors; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Application server Instance Number. + public string InstanceNo { get; } + /// Application server Subnet. + public string Subnet { get; } + /// Application server instance SAP hostname. + public string Hostname { get; } + /// Application server instance SAP Kernel Version. + public string KernelVersion { get; } + /// Application server instance SAP Kernel Patch level. + public string KernelPatch { get; } + /// Application server instance SAP IP Address. + public string IPAddress { get; } + /// Application server instance gateway Port. + public long? GatewayPort { get; } + /// Application server instance ICM HTTP Port. + public long? IcmHttpPort { get; } + /// Application server instance ICM HTTPS Port. + public long? IcmHttpsPort { get; } + /// Application server instance dispatcher status. + public string DispatcherStatus { get; } + /// The Load Balancer details such as LoadBalancer ID attached to Application Server Virtual Machines. + internal SubResource LoadBalancerDetails { get; } + /// Gets Id. + public ResourceIdentifier LoadBalancerDetailsId + { + get => LoadBalancerDetails?.Id; + } + + /// The list of virtual machines. + public IReadOnlyList VmDetails { get; } + /// Defines the SAP Instance status. + public SapVirtualInstanceStatus? Status { get; } + /// Defines the health of SAP Instances. + public SapHealthState? Health { get; } + /// Defines the provisioning states. + public SapVirtualInstanceProvisioningState? ProvisioningState { get; } + /// Defines the Application Instance errors. + internal SapVirtualInstanceError Errors { get; } + /// The Virtual Instance for SAP error body. + public ErrorInformation ErrorsProperties + { + get => Errors?.Properties; + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapAvailabilityZoneDetailsContent.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapAvailabilityZoneDetailsContent.Serialization.cs new file mode 100644 index 000000000000..84ae745e1857 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapAvailabilityZoneDetailsContent.Serialization.cs @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SapAvailabilityZoneDetailsContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapAvailabilityZoneDetailsContent)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("appLocation"u8); + writer.WriteStringValue(AppLocation); + writer.WritePropertyName("sapProduct"u8); + writer.WriteStringValue(SapProduct.ToString()); + writer.WritePropertyName("databaseType"u8); + writer.WriteStringValue(DatabaseType.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SapAvailabilityZoneDetailsContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapAvailabilityZoneDetailsContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapAvailabilityZoneDetailsContent(document.RootElement, options); + } + + internal static SapAvailabilityZoneDetailsContent DeserializeSapAvailabilityZoneDetailsContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string appLocation = default; + SapProductType sapProduct = default; + SapDatabaseType databaseType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("appLocation"u8)) + { + appLocation = property.Value.GetString(); + continue; + } + if (property.NameEquals("sapProduct"u8)) + { + sapProduct = new SapProductType(property.Value.GetString()); + continue; + } + if (property.NameEquals("databaseType"u8)) + { + databaseType = new SapDatabaseType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SapAvailabilityZoneDetailsContent(appLocation, sapProduct, databaseType, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapAvailabilityZoneDetailsContent)} does not support writing '{options.Format}' format."); + } + } + + SapAvailabilityZoneDetailsContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSapAvailabilityZoneDetailsContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapAvailabilityZoneDetailsContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapAvailabilityZoneDetailsContent.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapAvailabilityZoneDetailsContent.cs new file mode 100644 index 000000000000..1e7a1d088400 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapAvailabilityZoneDetailsContent.cs @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The SAP request to get list of availability zones. + public partial class SapAvailabilityZoneDetailsContent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The geo-location where the SAP resources will be created. + /// Defines the SAP Product type. + /// The database type. Eg: HANA, DB2, etc. + /// is null. + public SapAvailabilityZoneDetailsContent(string appLocation, SapProductType sapProduct, SapDatabaseType databaseType) + { + Argument.AssertNotNull(appLocation, nameof(appLocation)); + + AppLocation = appLocation; + SapProduct = sapProduct; + DatabaseType = databaseType; + } + + /// Initializes a new instance of . + /// The geo-location where the SAP resources will be created. + /// Defines the SAP Product type. + /// The database type. Eg: HANA, DB2, etc. + /// Keeps track of any properties unknown to the library. + internal SapAvailabilityZoneDetailsContent(string appLocation, SapProductType sapProduct, SapDatabaseType databaseType, IDictionary serializedAdditionalRawData) + { + AppLocation = appLocation; + SapProduct = sapProduct; + DatabaseType = databaseType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SapAvailabilityZoneDetailsContent() + { + } + + /// The geo-location where the SAP resources will be created. + public string AppLocation { get; } + /// Defines the SAP Product type. + public SapProductType SapProduct { get; } + /// The database type. Eg: HANA, DB2, etc. + public SapDatabaseType DatabaseType { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapAvailabilityZoneDetailsResult.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapAvailabilityZoneDetailsResult.Serialization.cs new file mode 100644 index 000000000000..937db7ab100a --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapAvailabilityZoneDetailsResult.Serialization.cs @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SapAvailabilityZoneDetailsResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapAvailabilityZoneDetailsResult)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(AvailabilityZonePairs)) + { + writer.WritePropertyName("availabilityZonePairs"u8); + writer.WriteStartArray(); + foreach (var item in AvailabilityZonePairs) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SapAvailabilityZoneDetailsResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapAvailabilityZoneDetailsResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapAvailabilityZoneDetailsResult(document.RootElement, options); + } + + internal static SapAvailabilityZoneDetailsResult DeserializeSapAvailabilityZoneDetailsResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList availabilityZonePairs = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("availabilityZonePairs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SapAvailabilityZonePair.DeserializeSapAvailabilityZonePair(item, options)); + } + availabilityZonePairs = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SapAvailabilityZoneDetailsResult(availabilityZonePairs ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapAvailabilityZoneDetailsResult)} does not support writing '{options.Format}' format."); + } + } + + SapAvailabilityZoneDetailsResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSapAvailabilityZoneDetailsResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapAvailabilityZoneDetailsResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapAvailabilityZoneDetailsResult.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapAvailabilityZoneDetailsResult.cs new file mode 100644 index 000000000000..d0f35ceb0bb2 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapAvailabilityZoneDetailsResult.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The list of supported availability zone pairs which are part of SAP HA deployment. + public partial class SapAvailabilityZoneDetailsResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal SapAvailabilityZoneDetailsResult() + { + AvailabilityZonePairs = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Gets the list of availability zone pairs. + /// Keeps track of any properties unknown to the library. + internal SapAvailabilityZoneDetailsResult(IReadOnlyList availabilityZonePairs, IDictionary serializedAdditionalRawData) + { + AvailabilityZonePairs = availabilityZonePairs; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets the list of availability zone pairs. + public IReadOnlyList AvailabilityZonePairs { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapAvailabilityZonePair.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapAvailabilityZonePair.Serialization.cs new file mode 100644 index 000000000000..e40898672dfe --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapAvailabilityZonePair.Serialization.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SapAvailabilityZonePair : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapAvailabilityZonePair)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(ZoneA)) + { + writer.WritePropertyName("zoneA"u8); + writer.WriteNumberValue(ZoneA.Value); + } + if (Optional.IsDefined(ZoneB)) + { + writer.WritePropertyName("zoneB"u8); + writer.WriteNumberValue(ZoneB.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SapAvailabilityZonePair IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapAvailabilityZonePair)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapAvailabilityZonePair(document.RootElement, options); + } + + internal static SapAvailabilityZonePair DeserializeSapAvailabilityZonePair(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + long? zoneA = default; + long? zoneB = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("zoneA"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + zoneA = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("zoneB"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + zoneB = property.Value.GetInt64(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SapAvailabilityZonePair(zoneA, zoneB, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapAvailabilityZonePair)} does not support writing '{options.Format}' format."); + } + } + + SapAvailabilityZonePair IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSapAvailabilityZonePair(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapAvailabilityZonePair)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapAvailabilityZonePair.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapAvailabilityZonePair.cs new file mode 100644 index 000000000000..81233b446ae0 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapAvailabilityZonePair.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The SAP Availability Zone Pair. + public partial class SapAvailabilityZonePair + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal SapAvailabilityZonePair() + { + } + + /// Initializes a new instance of . + /// The zone A. + /// The zone B. + /// Keeps track of any properties unknown to the library. + internal SapAvailabilityZonePair(long? zoneA, long? zoneB, IDictionary serializedAdditionalRawData) + { + ZoneA = zoneA; + ZoneB = zoneB; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The zone A. + public long? ZoneA { get; } + /// The zone B. + public long? ZoneB { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapCentralServerInstancePatch.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapCentralServerInstancePatch.Serialization.cs new file mode 100644 index 000000000000..edebc5826924 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapCentralServerInstancePatch.Serialization.cs @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SapCentralServerInstancePatch : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapCentralServerInstancePatch)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SapCentralServerInstancePatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapCentralServerInstancePatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapCentralServerInstancePatch(document.RootElement, options); + } + + internal static SapCentralServerInstancePatch DeserializeSapCentralServerInstancePatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary tags = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SapCentralServerInstancePatch(tags ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapCentralServerInstancePatch)} does not support writing '{options.Format}' format."); + } + } + + SapCentralServerInstancePatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSapCentralServerInstancePatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapCentralServerInstancePatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapCentralServerInstancePatch.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapCentralServerInstancePatch.cs new file mode 100644 index 000000000000..9b4349b1b46b --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapCentralServerInstancePatch.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the request body for updating SAP Central Instance. + public partial class SapCentralServerInstancePatch + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public SapCentralServerInstancePatch() + { + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// Gets or sets the Resource tags. + /// Keeps track of any properties unknown to the library. + internal SapCentralServerInstancePatch(IDictionary tags, IDictionary serializedAdditionalRawData) + { + Tags = tags; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets or sets the Resource tags. + public IDictionary Tags { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapCentralServerProperties.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapCentralServerProperties.Serialization.cs new file mode 100644 index 000000000000..99fac271dd87 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapCentralServerProperties.Serialization.cs @@ -0,0 +1,338 @@ +// 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.Resources.Models; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SapCentralServerProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapCentralServerProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(InstanceNo)) + { + writer.WritePropertyName("instanceNo"u8); + writer.WriteStringValue(InstanceNo); + } + if (options.Format != "W" && Optional.IsDefined(Subnet)) + { + writer.WritePropertyName("subnet"u8); + writer.WriteStringValue(Subnet); + } + if (Optional.IsDefined(MessageServerProperties)) + { + writer.WritePropertyName("messageServerProperties"u8); + writer.WriteObjectValue(MessageServerProperties, options); + } + if (Optional.IsDefined(EnqueueServerProperties)) + { + writer.WritePropertyName("enqueueServerProperties"u8); + writer.WriteObjectValue(EnqueueServerProperties, options); + } + if (Optional.IsDefined(GatewayServerProperties)) + { + writer.WritePropertyName("gatewayServerProperties"u8); + writer.WriteObjectValue(GatewayServerProperties, options); + } + if (Optional.IsDefined(EnqueueReplicationServerProperties)) + { + writer.WritePropertyName("enqueueReplicationServerProperties"u8); + writer.WriteObjectValue(EnqueueReplicationServerProperties, options); + } + if (options.Format != "W" && Optional.IsDefined(KernelVersion)) + { + writer.WritePropertyName("kernelVersion"u8); + writer.WriteStringValue(KernelVersion); + } + if (options.Format != "W" && Optional.IsDefined(KernelPatch)) + { + writer.WritePropertyName("kernelPatch"u8); + writer.WriteStringValue(KernelPatch); + } + if (options.Format != "W" && Optional.IsDefined(LoadBalancerDetails)) + { + writer.WritePropertyName("loadBalancerDetails"u8); + JsonSerializer.Serialize(writer, LoadBalancerDetails); + } + if (options.Format != "W" && Optional.IsCollectionDefined(VmDetails)) + { + writer.WritePropertyName("vmDetails"u8); + writer.WriteStartArray(); + foreach (var item in VmDetails) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(Health)) + { + writer.WritePropertyName("health"u8); + writer.WriteStringValue(Health.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(Errors)) + { + writer.WritePropertyName("errors"u8); + writer.WriteObjectValue(Errors, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SapCentralServerProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapCentralServerProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapCentralServerProperties(document.RootElement, options); + } + + internal static SapCentralServerProperties DeserializeSapCentralServerProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string instanceNo = default; + string subnet = default; + MessageServerProperties messageServerProperties = default; + EnqueueServerProperties enqueueServerProperties = default; + GatewayServerProperties gatewayServerProperties = default; + EnqueueReplicationServerProperties enqueueReplicationServerProperties = default; + string kernelVersion = default; + string kernelPatch = default; + SubResource loadBalancerDetails = default; + IReadOnlyList vmDetails = default; + SapVirtualInstanceStatus? status = default; + SapHealthState? health = default; + SapVirtualInstanceProvisioningState? provisioningState = default; + SapVirtualInstanceError errors = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("instanceNo"u8)) + { + instanceNo = property.Value.GetString(); + continue; + } + if (property.NameEquals("subnet"u8)) + { + subnet = property.Value.GetString(); + continue; + } + if (property.NameEquals("messageServerProperties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + messageServerProperties = MessageServerProperties.DeserializeMessageServerProperties(property.Value, options); + continue; + } + if (property.NameEquals("enqueueServerProperties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enqueueServerProperties = EnqueueServerProperties.DeserializeEnqueueServerProperties(property.Value, options); + continue; + } + if (property.NameEquals("gatewayServerProperties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + gatewayServerProperties = GatewayServerProperties.DeserializeGatewayServerProperties(property.Value, options); + continue; + } + if (property.NameEquals("enqueueReplicationServerProperties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enqueueReplicationServerProperties = EnqueueReplicationServerProperties.DeserializeEnqueueReplicationServerProperties(property.Value, options); + continue; + } + if (property.NameEquals("kernelVersion"u8)) + { + kernelVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("kernelPatch"u8)) + { + kernelPatch = property.Value.GetString(); + continue; + } + if (property.NameEquals("loadBalancerDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + loadBalancerDetails = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("vmDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(CentralServerVmDetails.DeserializeCentralServerVmDetails(item, options)); + } + vmDetails = array; + continue; + } + if (property.NameEquals("status"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new SapVirtualInstanceStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("health"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + health = new SapHealthState(property.Value.GetString()); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new SapVirtualInstanceProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("errors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + errors = SapVirtualInstanceError.DeserializeSapVirtualInstanceError(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SapCentralServerProperties( + instanceNo, + subnet, + messageServerProperties, + enqueueServerProperties, + gatewayServerProperties, + enqueueReplicationServerProperties, + kernelVersion, + kernelPatch, + loadBalancerDetails, + vmDetails ?? new ChangeTrackingList(), + status, + health, + provisioningState, + errors, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapCentralServerProperties)} does not support writing '{options.Format}' format."); + } + } + + SapCentralServerProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSapCentralServerProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapCentralServerProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapCentralServerProperties.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapCentralServerProperties.cs new file mode 100644 index 000000000000..2c46c90b32bd --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapCentralServerProperties.cs @@ -0,0 +1,131 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the SAP Central Services Instance properties. + public partial class SapCentralServerProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public SapCentralServerProperties() + { + VmDetails = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The central services instance number. + /// The central services instance subnet. + /// Defines the SAP message server properties. + /// Defines the SAP Enqueue Server properties. + /// Defines the SAP Gateway Server properties. + /// Defines the SAP Enqueue Replication Server (ERS) properties. + /// The central services instance Kernel Version. + /// The central services instance Kernel Patch level. + /// The Load Balancer details such as LoadBalancer ID attached to ASCS Virtual Machines. + /// The list of virtual machines corresponding to the Central Services instance. + /// Defines the SAP Instance status. + /// Defines the health of SAP Instances. + /// Defines the provisioning states. + /// Defines the errors related to SAP Central Services Instance resource. + /// Keeps track of any properties unknown to the library. + internal SapCentralServerProperties(string instanceNo, string subnet, MessageServerProperties messageServerProperties, EnqueueServerProperties enqueueServerProperties, GatewayServerProperties gatewayServerProperties, EnqueueReplicationServerProperties enqueueReplicationServerProperties, string kernelVersion, string kernelPatch, SubResource loadBalancerDetails, IReadOnlyList vmDetails, SapVirtualInstanceStatus? status, SapHealthState? health, SapVirtualInstanceProvisioningState? provisioningState, SapVirtualInstanceError errors, IDictionary serializedAdditionalRawData) + { + InstanceNo = instanceNo; + Subnet = subnet; + MessageServerProperties = messageServerProperties; + EnqueueServerProperties = enqueueServerProperties; + GatewayServerProperties = gatewayServerProperties; + EnqueueReplicationServerProperties = enqueueReplicationServerProperties; + KernelVersion = kernelVersion; + KernelPatch = kernelPatch; + LoadBalancerDetails = loadBalancerDetails; + VmDetails = vmDetails; + Status = status; + Health = health; + ProvisioningState = provisioningState; + Errors = errors; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The central services instance number. + public string InstanceNo { get; } + /// The central services instance subnet. + public string Subnet { get; } + /// Defines the SAP message server properties. + public MessageServerProperties MessageServerProperties { get; set; } + /// Defines the SAP Enqueue Server properties. + public EnqueueServerProperties EnqueueServerProperties { get; set; } + /// Defines the SAP Gateway Server properties. + public GatewayServerProperties GatewayServerProperties { get; set; } + /// Defines the SAP Enqueue Replication Server (ERS) properties. + public EnqueueReplicationServerProperties EnqueueReplicationServerProperties { get; set; } + /// The central services instance Kernel Version. + public string KernelVersion { get; } + /// The central services instance Kernel Patch level. + public string KernelPatch { get; } + /// The Load Balancer details such as LoadBalancer ID attached to ASCS Virtual Machines. + internal SubResource LoadBalancerDetails { get; } + /// Gets Id. + public ResourceIdentifier LoadBalancerDetailsId + { + get => LoadBalancerDetails?.Id; + } + + /// The list of virtual machines corresponding to the Central Services instance. + public IReadOnlyList VmDetails { get; } + /// Defines the SAP Instance status. + public SapVirtualInstanceStatus? Status { get; } + /// Defines the health of SAP Instances. + public SapHealthState? Health { get; } + /// Defines the provisioning states. + public SapVirtualInstanceProvisioningState? ProvisioningState { get; } + /// Defines the errors related to SAP Central Services Instance resource. + internal SapVirtualInstanceError Errors { get; } + /// The Virtual Instance for SAP error body. + public ErrorInformation ErrorsProperties + { + get => Errors?.Properties; + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapConfiguration.Serialization.cs new file mode 100644 index 000000000000..981164c59aad --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapConfiguration.Serialization.cs @@ -0,0 +1,119 @@ +// 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.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + [PersistableModelProxy(typeof(UnknownSapConfiguration))] + public partial class SapConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapConfiguration)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("configurationType"u8); + writer.WriteStringValue(ConfigurationType.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SapConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapConfiguration(document.RootElement, options); + } + + internal static SapConfiguration DeserializeSapConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("configurationType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "Deployment": return DeploymentConfiguration.DeserializeDeploymentConfiguration(element, options); + case "DeploymentWithOSConfig": return DeploymentWithOSConfiguration.DeserializeDeploymentWithOSConfiguration(element, options); + case "Discovery": return DiscoveryConfiguration.DeserializeDiscoveryConfiguration(element, options); + } + } + return UnknownSapConfiguration.DeserializeUnknownSapConfiguration(element, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapConfiguration)} does not support writing '{options.Format}' format."); + } + } + + SapConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSapConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapConfiguration.cs new file mode 100644 index 000000000000..1c62e1446f1c --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapConfiguration.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// + /// The SAP Configuration. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public abstract partial class SapConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + protected SapConfiguration() + { + } + + /// Initializes a new instance of . + /// The configuration type. Eg: Deployment/Discovery. + /// Keeps track of any properties unknown to the library. + internal SapConfiguration(SapConfigurationType configurationType, IDictionary serializedAdditionalRawData) + { + ConfigurationType = configurationType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The configuration type. Eg: Deployment/Discovery. + internal SapConfigurationType ConfigurationType { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapConfigurationType.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapConfigurationType.cs new file mode 100644 index 000000000000..967f3a80c04e --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapConfigurationType.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The configuration Type. + internal readonly partial struct SapConfigurationType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SapConfigurationType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DeploymentValue = "Deployment"; + private const string DiscoveryValue = "Discovery"; + private const string DeploymentWithOSConfigValue = "DeploymentWithOSConfig"; + + /// SAP system will be deployed by service. No OS configurations will be done. + public static SapConfigurationType Deployment { get; } = new SapConfigurationType(DeploymentValue); + /// Existing SAP system will be registered. + public static SapConfigurationType Discovery { get; } = new SapConfigurationType(DiscoveryValue); + /// SAP system will be deployed by service. OS configurations will be done. + public static SapConfigurationType DeploymentWithOSConfig { get; } = new SapConfigurationType(DeploymentWithOSConfigValue); + /// Determines if two values are the same. + public static bool operator ==(SapConfigurationType left, SapConfigurationType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SapConfigurationType left, SapConfigurationType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator SapConfigurationType(string value) => new SapConfigurationType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SapConfigurationType other && Equals(other); + /// + public bool Equals(SapConfigurationType 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/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDatabaseInstancePatch.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDatabaseInstancePatch.Serialization.cs new file mode 100644 index 000000000000..20de1862597d --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDatabaseInstancePatch.Serialization.cs @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SapDatabaseInstancePatch : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapDatabaseInstancePatch)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SapDatabaseInstancePatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapDatabaseInstancePatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapDatabaseInstancePatch(document.RootElement, options); + } + + internal static SapDatabaseInstancePatch DeserializeSapDatabaseInstancePatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary tags = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SapDatabaseInstancePatch(tags ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapDatabaseInstancePatch)} does not support writing '{options.Format}' format."); + } + } + + SapDatabaseInstancePatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSapDatabaseInstancePatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapDatabaseInstancePatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDatabaseInstancePatch.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDatabaseInstancePatch.cs new file mode 100644 index 000000000000..69919b2cb4dc --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDatabaseInstancePatch.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the request body for updating SAP Database Instance. + public partial class SapDatabaseInstancePatch + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public SapDatabaseInstancePatch() + { + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// Gets or sets the Resource tags. + /// Keeps track of any properties unknown to the library. + internal SapDatabaseInstancePatch(IDictionary tags, IDictionary serializedAdditionalRawData) + { + Tags = tags; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets or sets the Resource tags. + public IDictionary Tags { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDatabaseProperties.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDatabaseProperties.Serialization.cs new file mode 100644 index 000000000000..38323e7cb353 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDatabaseProperties.Serialization.cs @@ -0,0 +1,258 @@ +// 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.Resources.Models; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SapDatabaseProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapDatabaseProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(Subnet)) + { + writer.WritePropertyName("subnet"u8); + writer.WriteStringValue(Subnet); + } + if (options.Format != "W" && Optional.IsDefined(DatabaseSid)) + { + writer.WritePropertyName("databaseSid"u8); + writer.WriteStringValue(DatabaseSid); + } + if (options.Format != "W" && Optional.IsDefined(DatabaseType)) + { + writer.WritePropertyName("databaseType"u8); + writer.WriteStringValue(DatabaseType); + } + if (options.Format != "W" && Optional.IsDefined(IPAddress)) + { + writer.WritePropertyName("ipAddress"u8); + writer.WriteStringValue(IPAddress); + } + if (options.Format != "W" && Optional.IsDefined(LoadBalancerDetails)) + { + writer.WritePropertyName("loadBalancerDetails"u8); + JsonSerializer.Serialize(writer, LoadBalancerDetails); + } + if (options.Format != "W" && Optional.IsCollectionDefined(VmDetails)) + { + writer.WritePropertyName("vmDetails"u8); + writer.WriteStartArray(); + foreach (var item in VmDetails) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(Errors)) + { + writer.WritePropertyName("errors"u8); + writer.WriteObjectValue(Errors, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SapDatabaseProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapDatabaseProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapDatabaseProperties(document.RootElement, options); + } + + internal static SapDatabaseProperties DeserializeSapDatabaseProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string subnet = default; + string databaseSid = default; + string databaseType = default; + string ipAddress = default; + SubResource loadBalancerDetails = default; + IReadOnlyList vmDetails = default; + SapVirtualInstanceStatus? status = default; + SapVirtualInstanceProvisioningState? provisioningState = default; + SapVirtualInstanceError errors = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("subnet"u8)) + { + subnet = property.Value.GetString(); + continue; + } + if (property.NameEquals("databaseSid"u8)) + { + databaseSid = property.Value.GetString(); + continue; + } + if (property.NameEquals("databaseType"u8)) + { + databaseType = property.Value.GetString(); + continue; + } + if (property.NameEquals("ipAddress"u8)) + { + ipAddress = property.Value.GetString(); + continue; + } + if (property.NameEquals("loadBalancerDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + loadBalancerDetails = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("vmDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DatabaseVmDetails.DeserializeDatabaseVmDetails(item, options)); + } + vmDetails = array; + continue; + } + if (property.NameEquals("status"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new SapVirtualInstanceStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new SapVirtualInstanceProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("errors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + errors = SapVirtualInstanceError.DeserializeSapVirtualInstanceError(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SapDatabaseProperties( + subnet, + databaseSid, + databaseType, + ipAddress, + loadBalancerDetails, + vmDetails ?? new ChangeTrackingList(), + status, + provisioningState, + errors, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapDatabaseProperties)} does not support writing '{options.Format}' format."); + } + } + + SapDatabaseProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSapDatabaseProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapDatabaseProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDatabaseProperties.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDatabaseProperties.cs new file mode 100644 index 000000000000..e5c3d9feaeae --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDatabaseProperties.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the Database properties. + public partial class SapDatabaseProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public SapDatabaseProperties() + { + VmDetails = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Database subnet. + /// Database SID name. + /// Database type, that is if the DB is HANA, DB2, Oracle, SAP ASE, Max DB or MS SQL Server. + /// Database IP Address. + /// The Load Balancer details such as LoadBalancer ID attached to Database Virtual Machines. + /// The list of virtual machines corresponding to the Database resource. + /// Defines the SAP Instance status. + /// Defines the provisioning states. + /// Defines the errors related to Database resource. + /// Keeps track of any properties unknown to the library. + internal SapDatabaseProperties(string subnet, string databaseSid, string databaseType, string ipAddress, SubResource loadBalancerDetails, IReadOnlyList vmDetails, SapVirtualInstanceStatus? status, SapVirtualInstanceProvisioningState? provisioningState, SapVirtualInstanceError errors, IDictionary serializedAdditionalRawData) + { + Subnet = subnet; + DatabaseSid = databaseSid; + DatabaseType = databaseType; + IPAddress = ipAddress; + LoadBalancerDetails = loadBalancerDetails; + VmDetails = vmDetails; + Status = status; + ProvisioningState = provisioningState; + Errors = errors; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Database subnet. + public string Subnet { get; } + /// Database SID name. + public string DatabaseSid { get; } + /// Database type, that is if the DB is HANA, DB2, Oracle, SAP ASE, Max DB or MS SQL Server. + public string DatabaseType { get; } + /// Database IP Address. + public string IPAddress { get; } + /// The Load Balancer details such as LoadBalancer ID attached to Database Virtual Machines. + internal SubResource LoadBalancerDetails { get; } + /// Gets Id. + public ResourceIdentifier LoadBalancerDetailsId + { + get => LoadBalancerDetails?.Id; + } + + /// The list of virtual machines corresponding to the Database resource. + public IReadOnlyList VmDetails { get; } + /// Defines the SAP Instance status. + public SapVirtualInstanceStatus? Status { get; } + /// Defines the provisioning states. + public SapVirtualInstanceProvisioningState? ProvisioningState { get; } + /// Defines the errors related to Database resource. + internal SapVirtualInstanceError Errors { get; } + /// The Virtual Instance for SAP error body. + public ErrorInformation ErrorsProperties + { + get => Errors?.Properties; + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDatabaseScaleMethod.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDatabaseScaleMethod.cs new file mode 100644 index 000000000000..32f8ad626a75 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDatabaseScaleMethod.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The database scale method. + public readonly partial struct SapDatabaseScaleMethod : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SapDatabaseScaleMethod(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ScaleUpValue = "ScaleUp"; + + /// ScaleUp Hana Database deployment type. + public static SapDatabaseScaleMethod ScaleUp { get; } = new SapDatabaseScaleMethod(ScaleUpValue); + /// Determines if two values are the same. + public static bool operator ==(SapDatabaseScaleMethod left, SapDatabaseScaleMethod right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SapDatabaseScaleMethod left, SapDatabaseScaleMethod right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator SapDatabaseScaleMethod(string value) => new SapDatabaseScaleMethod(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SapDatabaseScaleMethod other && Equals(other); + /// + public bool Equals(SapDatabaseScaleMethod 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/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDatabaseType.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDatabaseType.cs new file mode 100644 index 000000000000..d258a1c8ed0a --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDatabaseType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the supported SAP Database types. + public readonly partial struct SapDatabaseType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SapDatabaseType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string HANAValue = "HANA"; + private const string DB2Value = "DB2"; + + /// HANA Database type of SAP system. + public static SapDatabaseType HANA { get; } = new SapDatabaseType(HANAValue); + /// DB2 database type of the SAP system. + public static SapDatabaseType DB2 { get; } = new SapDatabaseType(DB2Value); + /// Determines if two values are the same. + public static bool operator ==(SapDatabaseType left, SapDatabaseType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SapDatabaseType left, SapDatabaseType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator SapDatabaseType(string value) => new SapDatabaseType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SapDatabaseType other && Equals(other); + /// + public bool Equals(SapDatabaseType 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/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDeploymentType.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDeploymentType.cs new file mode 100644 index 000000000000..26f7a80b134f --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDeploymentType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The type of SAP deployment, single server or Three tier. + public readonly partial struct SapDeploymentType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SapDeploymentType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SingleServerValue = "SingleServer"; + private const string ThreeTierValue = "ThreeTier"; + + /// SAP Single server deployment type. + public static SapDeploymentType SingleServer { get; } = new SapDeploymentType(SingleServerValue); + /// SAP Distributed deployment type. + public static SapDeploymentType ThreeTier { get; } = new SapDeploymentType(ThreeTierValue); + /// Determines if two values are the same. + public static bool operator ==(SapDeploymentType left, SapDeploymentType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SapDeploymentType left, SapDeploymentType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator SapDeploymentType(string value) => new SapDeploymentType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SapDeploymentType other && Equals(other); + /// + public bool Equals(SapDeploymentType 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/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDiskConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDiskConfiguration.Serialization.cs new file mode 100644 index 000000000000..46e066017a08 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDiskConfiguration.Serialization.cs @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SapDiskConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapDiskConfiguration)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(RecommendedConfiguration)) + { + writer.WritePropertyName("recommendedConfiguration"u8); + writer.WriteObjectValue(RecommendedConfiguration, options); + } + if (Optional.IsCollectionDefined(SupportedConfigurations)) + { + writer.WritePropertyName("supportedConfigurations"u8); + writer.WriteStartArray(); + foreach (var item in SupportedConfigurations) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SapDiskConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapDiskConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapDiskConfiguration(document.RootElement, options); + } + + internal static SapDiskConfiguration DeserializeSapDiskConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DiskVolumeConfiguration recommendedConfiguration = default; + IReadOnlyList supportedConfigurations = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("recommendedConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + recommendedConfiguration = DiskVolumeConfiguration.DeserializeDiskVolumeConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("supportedConfigurations"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DiskDetails.DeserializeDiskDetails(item, options)); + } + supportedConfigurations = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SapDiskConfiguration(recommendedConfiguration, supportedConfigurations ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapDiskConfiguration)} does not support writing '{options.Format}' format."); + } + } + + SapDiskConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSapDiskConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapDiskConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDiskConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDiskConfiguration.cs new file mode 100644 index 000000000000..4518983516d1 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDiskConfiguration.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The SAP Disk Configuration contains 'recommended disk' details and list of supported disks detail for a volume type. + public partial class SapDiskConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal SapDiskConfiguration() + { + SupportedConfigurations = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The recommended disk details for a given VM Sku. + /// The list of supported disks for a given VM Sku. + /// Keeps track of any properties unknown to the library. + internal SapDiskConfiguration(DiskVolumeConfiguration recommendedConfiguration, IReadOnlyList supportedConfigurations, IDictionary serializedAdditionalRawData) + { + RecommendedConfiguration = recommendedConfiguration; + SupportedConfigurations = supportedConfigurations; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The recommended disk details for a given VM Sku. + public DiskVolumeConfiguration RecommendedConfiguration { get; } + /// The list of supported disks for a given VM Sku. + public IReadOnlyList SupportedConfigurations { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDiskConfigurationsContent.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDiskConfigurationsContent.Serialization.cs new file mode 100644 index 000000000000..313a54cda54d --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDiskConfigurationsContent.Serialization.cs @@ -0,0 +1,173 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SapDiskConfigurationsContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapDiskConfigurationsContent)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("appLocation"u8); + writer.WriteStringValue(AppLocation); + writer.WritePropertyName("environment"u8); + writer.WriteStringValue(Environment.ToString()); + writer.WritePropertyName("sapProduct"u8); + writer.WriteStringValue(SapProduct.ToString()); + writer.WritePropertyName("databaseType"u8); + writer.WriteStringValue(DatabaseType.ToString()); + writer.WritePropertyName("deploymentType"u8); + writer.WriteStringValue(DeploymentType.ToString()); + writer.WritePropertyName("dbVmSku"u8); + writer.WriteStringValue(DbVmSku); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SapDiskConfigurationsContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapDiskConfigurationsContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapDiskConfigurationsContent(document.RootElement, options); + } + + internal static SapDiskConfigurationsContent DeserializeSapDiskConfigurationsContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string appLocation = default; + SapEnvironmentType environment = default; + SapProductType sapProduct = default; + SapDatabaseType databaseType = default; + SapDeploymentType deploymentType = default; + string dbVmSku = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("appLocation"u8)) + { + appLocation = property.Value.GetString(); + continue; + } + if (property.NameEquals("environment"u8)) + { + environment = new SapEnvironmentType(property.Value.GetString()); + continue; + } + if (property.NameEquals("sapProduct"u8)) + { + sapProduct = new SapProductType(property.Value.GetString()); + continue; + } + if (property.NameEquals("databaseType"u8)) + { + databaseType = new SapDatabaseType(property.Value.GetString()); + continue; + } + if (property.NameEquals("deploymentType"u8)) + { + deploymentType = new SapDeploymentType(property.Value.GetString()); + continue; + } + if (property.NameEquals("dbVmSku"u8)) + { + dbVmSku = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SapDiskConfigurationsContent( + appLocation, + environment, + sapProduct, + databaseType, + deploymentType, + dbVmSku, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapDiskConfigurationsContent)} does not support writing '{options.Format}' format."); + } + } + + SapDiskConfigurationsContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSapDiskConfigurationsContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapDiskConfigurationsContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDiskConfigurationsContent.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDiskConfigurationsContent.cs new file mode 100644 index 000000000000..50cb9596e7d2 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDiskConfigurationsContent.cs @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The SAP request to get list of disk configurations. + public partial class SapDiskConfigurationsContent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The geo-location where the SAP resources will be created. + /// Defines the environment type - Production/Non Production. + /// Defines the SAP Product type. + /// The database type. Eg: HANA, DB2, etc. + /// The deployment type. Eg: SingleServer/ThreeTier. + /// The VM SKU for database instance. + /// or is null. + public SapDiskConfigurationsContent(string appLocation, SapEnvironmentType environment, SapProductType sapProduct, SapDatabaseType databaseType, SapDeploymentType deploymentType, string dbVmSku) + { + Argument.AssertNotNull(appLocation, nameof(appLocation)); + Argument.AssertNotNull(dbVmSku, nameof(dbVmSku)); + + AppLocation = appLocation; + Environment = environment; + SapProduct = sapProduct; + DatabaseType = databaseType; + DeploymentType = deploymentType; + DbVmSku = dbVmSku; + } + + /// Initializes a new instance of . + /// The geo-location where the SAP resources will be created. + /// Defines the environment type - Production/Non Production. + /// Defines the SAP Product type. + /// The database type. Eg: HANA, DB2, etc. + /// The deployment type. Eg: SingleServer/ThreeTier. + /// The VM SKU for database instance. + /// Keeps track of any properties unknown to the library. + internal SapDiskConfigurationsContent(string appLocation, SapEnvironmentType environment, SapProductType sapProduct, SapDatabaseType databaseType, SapDeploymentType deploymentType, string dbVmSku, IDictionary serializedAdditionalRawData) + { + AppLocation = appLocation; + Environment = environment; + SapProduct = sapProduct; + DatabaseType = databaseType; + DeploymentType = deploymentType; + DbVmSku = dbVmSku; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SapDiskConfigurationsContent() + { + } + + /// The geo-location where the SAP resources will be created. + public string AppLocation { get; } + /// Defines the environment type - Production/Non Production. + public SapEnvironmentType Environment { get; } + /// Defines the SAP Product type. + public SapProductType SapProduct { get; } + /// The database type. Eg: HANA, DB2, etc. + public SapDatabaseType DatabaseType { get; } + /// The deployment type. Eg: SingleServer/ThreeTier. + public SapDeploymentType DeploymentType { get; } + /// The VM SKU for database instance. + public string DbVmSku { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDiskConfigurationsResult.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDiskConfigurationsResult.Serialization.cs new file mode 100644 index 000000000000..f26bb0affdf6 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDiskConfigurationsResult.Serialization.cs @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SapDiskConfigurationsResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapDiskConfigurationsResult)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(VolumeConfigurations)) + { + writer.WritePropertyName("volumeConfigurations"u8); + writer.WriteStartObject(); + foreach (var item in VolumeConfigurations) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SapDiskConfigurationsResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapDiskConfigurationsResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapDiskConfigurationsResult(document.RootElement, options); + } + + internal static SapDiskConfigurationsResult DeserializeSapDiskConfigurationsResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyDictionary volumeConfigurations = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("volumeConfigurations"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, SapDiskConfiguration.DeserializeSapDiskConfiguration(property0.Value, options)); + } + volumeConfigurations = dictionary; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SapDiskConfigurationsResult(volumeConfigurations ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapDiskConfigurationsResult)} does not support writing '{options.Format}' format."); + } + } + + SapDiskConfigurationsResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSapDiskConfigurationsResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapDiskConfigurationsResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDiskConfigurationsResult.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDiskConfigurationsResult.cs new file mode 100644 index 000000000000..68b5bc63cbab --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapDiskConfigurationsResult.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The list of disk configuration for vmSku which are part of SAP deployment. + public partial class SapDiskConfigurationsResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal SapDiskConfigurationsResult() + { + VolumeConfigurations = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// The disk configuration for the db volume. For HANA, Required volumes are: ['hana/data', 'hana/log', hana/shared', 'usr/sap', 'os'], Optional volume : ['backup']. + /// Keeps track of any properties unknown to the library. + internal SapDiskConfigurationsResult(IReadOnlyDictionary volumeConfigurations, IDictionary serializedAdditionalRawData) + { + VolumeConfigurations = volumeConfigurations; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The disk configuration for the db volume. For HANA, Required volumes are: ['hana/data', 'hana/log', hana/shared', 'usr/sap', 'os'], Optional volume : ['backup']. + public IReadOnlyDictionary VolumeConfigurations { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapEnvironmentType.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapEnvironmentType.cs new file mode 100644 index 000000000000..bfe16bc5eba5 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapEnvironmentType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the environment type - Production/Non Production. + public readonly partial struct SapEnvironmentType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SapEnvironmentType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NonProdValue = "NonProd"; + private const string ProdValue = "Prod"; + + /// Non Production SAP system. + public static SapEnvironmentType NonProd { get; } = new SapEnvironmentType(NonProdValue); + /// Production SAP system. + public static SapEnvironmentType Prod { get; } = new SapEnvironmentType(ProdValue); + /// Determines if two values are the same. + public static bool operator ==(SapEnvironmentType left, SapEnvironmentType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SapEnvironmentType left, SapEnvironmentType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator SapEnvironmentType(string value) => new SapEnvironmentType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SapEnvironmentType other && Equals(other); + /// + public bool Equals(SapEnvironmentType 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/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapHealthState.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapHealthState.cs new file mode 100644 index 000000000000..b3db96529756 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapHealthState.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the health of SAP Instances. + public readonly partial struct SapHealthState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SapHealthState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string UnknownValue = "Unknown"; + private const string HealthyValue = "Healthy"; + private const string UnhealthyValue = "Unhealthy"; + private const string DegradedValue = "Degraded"; + + /// SAP System health is unknown. + public static SapHealthState Unknown { get; } = new SapHealthState(UnknownValue); + /// SAP System health is healthy. + public static SapHealthState Healthy { get; } = new SapHealthState(HealthyValue); + /// SAP System is unhealthy. + public static SapHealthState Unhealthy { get; } = new SapHealthState(UnhealthyValue); + /// SAP System health is degraded. + public static SapHealthState Degraded { get; } = new SapHealthState(DegradedValue); + /// Determines if two values are the same. + public static bool operator ==(SapHealthState left, SapHealthState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SapHealthState left, SapHealthState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator SapHealthState(string value) => new SapHealthState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SapHealthState other && Equals(other); + /// + public bool Equals(SapHealthState 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/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapHighAvailabilityType.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapHighAvailabilityType.cs new file mode 100644 index 000000000000..3e6a832aeff1 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapHighAvailabilityType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The high availability type (AvailabilitySet or AvailabilityZone). + public readonly partial struct SapHighAvailabilityType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SapHighAvailabilityType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AvailabilitySetValue = "AvailabilitySet"; + private const string AvailabilityZoneValue = "AvailabilityZone"; + + /// HA deployment with availability sets. + public static SapHighAvailabilityType AvailabilitySet { get; } = new SapHighAvailabilityType(AvailabilitySetValue); + /// HA deployment with availability zones. + public static SapHighAvailabilityType AvailabilityZone { get; } = new SapHighAvailabilityType(AvailabilityZoneValue); + /// Determines if two values are the same. + public static bool operator ==(SapHighAvailabilityType left, SapHighAvailabilityType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SapHighAvailabilityType left, SapHighAvailabilityType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator SapHighAvailabilityType(string value) => new SapHighAvailabilityType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SapHighAvailabilityType other && Equals(other); + /// + public bool Equals(SapHighAvailabilityType 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/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapInstallWithoutOSConfigSoftwareConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapInstallWithoutOSConfigSoftwareConfiguration.Serialization.cs new file mode 100644 index 000000000000..32610dc0fc6c --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapInstallWithoutOSConfigSoftwareConfiguration.Serialization.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SapInstallWithoutOSConfigSoftwareConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapInstallWithoutOSConfigSoftwareConfiguration)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("bomUrl"u8); + writer.WriteStringValue(BomUri); + writer.WritePropertyName("sapBitsStorageAccountId"u8); + writer.WriteStringValue(SapBitsStorageAccountId); + writer.WritePropertyName("softwareVersion"u8); + writer.WriteStringValue(SoftwareVersion); + if (Optional.IsDefined(HighAvailabilitySoftwareConfiguration)) + { + writer.WritePropertyName("highAvailabilitySoftwareConfiguration"u8); + writer.WriteObjectValue(HighAvailabilitySoftwareConfiguration, options); + } + } + + SapInstallWithoutOSConfigSoftwareConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapInstallWithoutOSConfigSoftwareConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapInstallWithoutOSConfigSoftwareConfiguration(document.RootElement, options); + } + + internal static SapInstallWithoutOSConfigSoftwareConfiguration DeserializeSapInstallWithoutOSConfigSoftwareConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string bomUrl = default; + string sapBitsStorageAccountId = default; + string softwareVersion = default; + HighAvailabilitySoftwareConfiguration highAvailabilitySoftwareConfiguration = default; + SapSoftwareInstallationType softwareInstallationType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("bomUrl"u8)) + { + bomUrl = property.Value.GetString(); + continue; + } + if (property.NameEquals("sapBitsStorageAccountId"u8)) + { + sapBitsStorageAccountId = property.Value.GetString(); + continue; + } + if (property.NameEquals("softwareVersion"u8)) + { + softwareVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("highAvailabilitySoftwareConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + highAvailabilitySoftwareConfiguration = HighAvailabilitySoftwareConfiguration.DeserializeHighAvailabilitySoftwareConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("softwareInstallationType"u8)) + { + softwareInstallationType = new SapSoftwareInstallationType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SapInstallWithoutOSConfigSoftwareConfiguration( + softwareInstallationType, + serializedAdditionalRawData, + bomUrl, + sapBitsStorageAccountId, + softwareVersion, + highAvailabilitySoftwareConfiguration); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapInstallWithoutOSConfigSoftwareConfiguration)} does not support writing '{options.Format}' format."); + } + } + + SapInstallWithoutOSConfigSoftwareConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSapInstallWithoutOSConfigSoftwareConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapInstallWithoutOSConfigSoftwareConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapInstallWithoutOSConfigSoftwareConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapInstallWithoutOSConfigSoftwareConfiguration.cs new file mode 100644 index 000000000000..feb3c7735081 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapInstallWithoutOSConfigSoftwareConfiguration.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The SAP Software configuration Input when the software is to be installed by service without OS Configurations. + public partial class SapInstallWithoutOSConfigSoftwareConfiguration : SoftwareConfiguration + { + /// Initializes a new instance of . + /// The URL to the SAP Build of Materials(BOM) file. + /// The SAP bits storage account id. + /// The software version to install. + /// , or is null. + public SapInstallWithoutOSConfigSoftwareConfiguration(string bomUri, string sapBitsStorageAccountId, string softwareVersion) + { + Argument.AssertNotNull(bomUri, nameof(bomUri)); + Argument.AssertNotNull(sapBitsStorageAccountId, nameof(sapBitsStorageAccountId)); + Argument.AssertNotNull(softwareVersion, nameof(softwareVersion)); + + BomUri = bomUri; + SapBitsStorageAccountId = sapBitsStorageAccountId; + SoftwareVersion = softwareVersion; + SoftwareInstallationType = SapSoftwareInstallationType.SAPInstallWithoutOSConfig; + } + + /// Initializes a new instance of . + /// The SAP software installation type. + /// Keeps track of any properties unknown to the library. + /// The URL to the SAP Build of Materials(BOM) file. + /// The SAP bits storage account id. + /// The software version to install. + /// Gets or sets the HA software configuration. + internal SapInstallWithoutOSConfigSoftwareConfiguration(SapSoftwareInstallationType softwareInstallationType, IDictionary serializedAdditionalRawData, string bomUri, string sapBitsStorageAccountId, string softwareVersion, HighAvailabilitySoftwareConfiguration highAvailabilitySoftwareConfiguration) : base(softwareInstallationType, serializedAdditionalRawData) + { + BomUri = bomUri; + SapBitsStorageAccountId = sapBitsStorageAccountId; + SoftwareVersion = softwareVersion; + HighAvailabilitySoftwareConfiguration = highAvailabilitySoftwareConfiguration; + SoftwareInstallationType = softwareInstallationType; + } + + /// Initializes a new instance of for deserialization. + internal SapInstallWithoutOSConfigSoftwareConfiguration() + { + } + + /// The URL to the SAP Build of Materials(BOM) file. + public string BomUri { get; set; } + /// The SAP bits storage account id. + public string SapBitsStorageAccountId { get; set; } + /// The software version to install. + public string SoftwareVersion { get; set; } + /// Gets or sets the HA software configuration. + public HighAvailabilitySoftwareConfiguration HighAvailabilitySoftwareConfiguration { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapProductType.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapProductType.cs new file mode 100644 index 000000000000..4f7c447c7964 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapProductType.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the SAP Product type. + public readonly partial struct SapProductType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SapProductType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ECCValue = "ECC"; + private const string S4HANAValue = "S4HANA"; + private const string OtherValue = "Other"; + + /// SAP Product ECC. + public static SapProductType ECC { get; } = new SapProductType(ECCValue); + /// SAP Product S4HANA. + public static SapProductType S4HANA { get; } = new SapProductType(S4HANAValue); + /// SAP Products other than the ones listed. + public static SapProductType Other { get; } = new SapProductType(OtherValue); + /// Determines if two values are the same. + public static bool operator ==(SapProductType left, SapProductType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SapProductType left, SapProductType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator SapProductType(string value) => new SapProductType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SapProductType other && Equals(other); + /// + public bool Equals(SapProductType 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/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSizingRecommendationContent.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSizingRecommendationContent.Serialization.cs new file mode 100644 index 000000000000..27e4f6de2e5a --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSizingRecommendationContent.Serialization.cs @@ -0,0 +1,214 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SapSizingRecommendationContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapSizingRecommendationContent)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("appLocation"u8); + writer.WriteStringValue(AppLocation); + writer.WritePropertyName("environment"u8); + writer.WriteStringValue(Environment.ToString()); + writer.WritePropertyName("sapProduct"u8); + writer.WriteStringValue(SapProduct.ToString()); + writer.WritePropertyName("deploymentType"u8); + writer.WriteStringValue(DeploymentType.ToString()); + writer.WritePropertyName("saps"u8); + writer.WriteNumberValue(Saps); + writer.WritePropertyName("dbMemory"u8); + writer.WriteNumberValue(DbMemory); + writer.WritePropertyName("databaseType"u8); + writer.WriteStringValue(DatabaseType.ToString()); + if (Optional.IsDefined(DbScaleMethod)) + { + writer.WritePropertyName("dbScaleMethod"u8); + writer.WriteStringValue(DbScaleMethod.Value.ToString()); + } + if (Optional.IsDefined(HighAvailabilityType)) + { + writer.WritePropertyName("highAvailabilityType"u8); + writer.WriteStringValue(HighAvailabilityType.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SapSizingRecommendationContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapSizingRecommendationContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapSizingRecommendationContent(document.RootElement, options); + } + + internal static SapSizingRecommendationContent DeserializeSapSizingRecommendationContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string appLocation = default; + SapEnvironmentType environment = default; + SapProductType sapProduct = default; + SapDeploymentType deploymentType = default; + long saps = default; + long dbMemory = default; + SapDatabaseType databaseType = default; + SapDatabaseScaleMethod? dbScaleMethod = default; + SapHighAvailabilityType? highAvailabilityType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("appLocation"u8)) + { + appLocation = property.Value.GetString(); + continue; + } + if (property.NameEquals("environment"u8)) + { + environment = new SapEnvironmentType(property.Value.GetString()); + continue; + } + if (property.NameEquals("sapProduct"u8)) + { + sapProduct = new SapProductType(property.Value.GetString()); + continue; + } + if (property.NameEquals("deploymentType"u8)) + { + deploymentType = new SapDeploymentType(property.Value.GetString()); + continue; + } + if (property.NameEquals("saps"u8)) + { + saps = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("dbMemory"u8)) + { + dbMemory = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("databaseType"u8)) + { + databaseType = new SapDatabaseType(property.Value.GetString()); + continue; + } + if (property.NameEquals("dbScaleMethod"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dbScaleMethod = new SapDatabaseScaleMethod(property.Value.GetString()); + continue; + } + if (property.NameEquals("highAvailabilityType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + highAvailabilityType = new SapHighAvailabilityType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SapSizingRecommendationContent( + appLocation, + environment, + sapProduct, + deploymentType, + saps, + dbMemory, + databaseType, + dbScaleMethod, + highAvailabilityType, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapSizingRecommendationContent)} does not support writing '{options.Format}' format."); + } + } + + SapSizingRecommendationContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSapSizingRecommendationContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapSizingRecommendationContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSizingRecommendationContent.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSizingRecommendationContent.cs new file mode 100644 index 000000000000..a0dd7fb0d49f --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSizingRecommendationContent.cs @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The SAP Sizing Recommendation request. + public partial class SapSizingRecommendationContent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The geo-location where the resource is to be created. + /// Defines the environment type - Production/Non Production. + /// Defines the SAP Product type. + /// The deployment type. Eg: SingleServer/ThreeTier. + /// The SAP Application Performance Standard measurement. + /// The database memory configuration. + /// The database type. + /// is null. + public SapSizingRecommendationContent(string appLocation, SapEnvironmentType environment, SapProductType sapProduct, SapDeploymentType deploymentType, long saps, long dbMemory, SapDatabaseType databaseType) + { + Argument.AssertNotNull(appLocation, nameof(appLocation)); + + AppLocation = appLocation; + Environment = environment; + SapProduct = sapProduct; + DeploymentType = deploymentType; + Saps = saps; + DbMemory = dbMemory; + DatabaseType = databaseType; + } + + /// Initializes a new instance of . + /// The geo-location where the resource is to be created. + /// Defines the environment type - Production/Non Production. + /// Defines the SAP Product type. + /// The deployment type. Eg: SingleServer/ThreeTier. + /// The SAP Application Performance Standard measurement. + /// The database memory configuration. + /// The database type. + /// The DB scale method. + /// The high availability type. + /// Keeps track of any properties unknown to the library. + internal SapSizingRecommendationContent(string appLocation, SapEnvironmentType environment, SapProductType sapProduct, SapDeploymentType deploymentType, long saps, long dbMemory, SapDatabaseType databaseType, SapDatabaseScaleMethod? dbScaleMethod, SapHighAvailabilityType? highAvailabilityType, IDictionary serializedAdditionalRawData) + { + AppLocation = appLocation; + Environment = environment; + SapProduct = sapProduct; + DeploymentType = deploymentType; + Saps = saps; + DbMemory = dbMemory; + DatabaseType = databaseType; + DbScaleMethod = dbScaleMethod; + HighAvailabilityType = highAvailabilityType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SapSizingRecommendationContent() + { + } + + /// The geo-location where the resource is to be created. + public string AppLocation { get; } + /// Defines the environment type - Production/Non Production. + public SapEnvironmentType Environment { get; } + /// Defines the SAP Product type. + public SapProductType SapProduct { get; } + /// The deployment type. Eg: SingleServer/ThreeTier. + public SapDeploymentType DeploymentType { get; } + /// The SAP Application Performance Standard measurement. + public long Saps { get; } + /// The database memory configuration. + public long DbMemory { get; } + /// The database type. + public SapDatabaseType DatabaseType { get; } + /// The DB scale method. + public SapDatabaseScaleMethod? DbScaleMethod { get; set; } + /// The high availability type. + public SapHighAvailabilityType? HighAvailabilityType { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSizingRecommendationResult.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSizingRecommendationResult.Serialization.cs new file mode 100644 index 000000000000..9a8ce8372fad --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSizingRecommendationResult.Serialization.cs @@ -0,0 +1,118 @@ +// 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.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + [PersistableModelProxy(typeof(UnknownSapSizingRecommendationResult))] + public partial class SapSizingRecommendationResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapSizingRecommendationResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("deploymentType"u8); + writer.WriteStringValue(DeploymentType.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SapSizingRecommendationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapSizingRecommendationResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapSizingRecommendationResult(document.RootElement, options); + } + + internal static SapSizingRecommendationResult DeserializeSapSizingRecommendationResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("deploymentType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "SingleServer": return SingleServerRecommendationResult.DeserializeSingleServerRecommendationResult(element, options); + case "ThreeTier": return ThreeTierRecommendationResult.DeserializeThreeTierRecommendationResult(element, options); + } + } + return UnknownSapSizingRecommendationResult.DeserializeUnknownSapSizingRecommendationResult(element, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapSizingRecommendationResult)} does not support writing '{options.Format}' format."); + } + } + + SapSizingRecommendationResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSapSizingRecommendationResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapSizingRecommendationResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSizingRecommendationResult.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSizingRecommendationResult.cs new file mode 100644 index 000000000000..82bef0761e1c --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSizingRecommendationResult.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// + /// The SAP sizing recommendation result. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public abstract partial class SapSizingRecommendationResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + protected SapSizingRecommendationResult() + { + } + + /// Initializes a new instance of . + /// The deployment type. Eg: SingleServer/ThreeTier. + /// Keeps track of any properties unknown to the library. + internal SapSizingRecommendationResult(SapDeploymentType deploymentType, IDictionary serializedAdditionalRawData) + { + DeploymentType = deploymentType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The deployment type. Eg: SingleServer/ThreeTier. + internal SapDeploymentType DeploymentType { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSoftwareInstallationType.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSoftwareInstallationType.cs new file mode 100644 index 000000000000..e6f61a20b863 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSoftwareInstallationType.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The SAP software installation Type. + internal readonly partial struct SapSoftwareInstallationType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SapSoftwareInstallationType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ServiceInitiatedValue = "ServiceInitiated"; + private const string SAPInstallWithoutOSConfigValue = "SAPInstallWithoutOSConfig"; + private const string ExternalValue = "External"; + + /// SAP Install managed by service. + public static SapSoftwareInstallationType ServiceInitiated { get; } = new SapSoftwareInstallationType(ServiceInitiatedValue); + /// SAP Install without OS Config. + public static SapSoftwareInstallationType SAPInstallWithoutOSConfig { get; } = new SapSoftwareInstallationType(SAPInstallWithoutOSConfigValue); + /// External software installation type. + public static SapSoftwareInstallationType External { get; } = new SapSoftwareInstallationType(ExternalValue); + /// Determines if two values are the same. + public static bool operator ==(SapSoftwareInstallationType left, SapSoftwareInstallationType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SapSoftwareInstallationType left, SapSoftwareInstallationType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator SapSoftwareInstallationType(string value) => new SapSoftwareInstallationType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SapSoftwareInstallationType other && Equals(other); + /// + public bool Equals(SapSoftwareInstallationType 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/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSupportedResourceSkusResult.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSupportedResourceSkusResult.Serialization.cs new file mode 100644 index 000000000000..2088cafa10dc --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSupportedResourceSkusResult.Serialization.cs @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SapSupportedResourceSkusResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapSupportedResourceSkusResult)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(SupportedSkus)) + { + writer.WritePropertyName("supportedSkus"u8); + writer.WriteStartArray(); + foreach (var item in SupportedSkus) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SapSupportedResourceSkusResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapSupportedResourceSkusResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapSupportedResourceSkusResult(document.RootElement, options); + } + + internal static SapSupportedResourceSkusResult DeserializeSapSupportedResourceSkusResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList supportedSkus = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("supportedSkus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SapSupportedSku.DeserializeSapSupportedSku(item, options)); + } + supportedSkus = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SapSupportedResourceSkusResult(supportedSkus ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapSupportedResourceSkusResult)} does not support writing '{options.Format}' format."); + } + } + + SapSupportedResourceSkusResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSapSupportedResourceSkusResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapSupportedResourceSkusResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSupportedResourceSkusResult.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSupportedResourceSkusResult.cs new file mode 100644 index 000000000000..6eafd832c894 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSupportedResourceSkusResult.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The list of supported SKUs for different resources which are part of SAP deployment. + public partial class SapSupportedResourceSkusResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal SapSupportedResourceSkusResult() + { + SupportedSkus = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Gets the list of SAP supported SKUs. + /// Keeps track of any properties unknown to the library. + internal SapSupportedResourceSkusResult(IReadOnlyList supportedSkus, IDictionary serializedAdditionalRawData) + { + SupportedSkus = supportedSkus; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets the list of SAP supported SKUs. + public IReadOnlyList SupportedSkus { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSupportedSku.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSupportedSku.Serialization.cs new file mode 100644 index 000000000000..aa304c84d4ba --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSupportedSku.Serialization.cs @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SapSupportedSku : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapSupportedSku)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(VmSku)) + { + writer.WritePropertyName("vmSku"u8); + writer.WriteStringValue(VmSku); + } + if (Optional.IsDefined(IsAppServerCertified)) + { + writer.WritePropertyName("isAppServerCertified"u8); + writer.WriteBooleanValue(IsAppServerCertified.Value); + } + if (Optional.IsDefined(IsDatabaseCertified)) + { + writer.WritePropertyName("isDatabaseCertified"u8); + writer.WriteBooleanValue(IsDatabaseCertified.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SapSupportedSku IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapSupportedSku)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapSupportedSku(document.RootElement, options); + } + + internal static SapSupportedSku DeserializeSapSupportedSku(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string vmSku = default; + bool? isAppServerCertified = default; + bool? isDatabaseCertified = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("vmSku"u8)) + { + vmSku = property.Value.GetString(); + continue; + } + if (property.NameEquals("isAppServerCertified"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isAppServerCertified = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("isDatabaseCertified"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isDatabaseCertified = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SapSupportedSku(vmSku, isAppServerCertified, isDatabaseCertified, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapSupportedSku)} does not support writing '{options.Format}' format."); + } + } + + SapSupportedSku IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSapSupportedSku(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapSupportedSku)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSupportedSku.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSupportedSku.cs new file mode 100644 index 000000000000..ab4e16fd5ea2 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSupportedSku.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The SAP supported SKU. + public partial class SapSupportedSku + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal SapSupportedSku() + { + } + + /// Initializes a new instance of . + /// The VM Sku. + /// True if the Sku is certified for App server in the SAP system. + /// True if the Sku is certified for Database server in the SAP system. + /// Keeps track of any properties unknown to the library. + internal SapSupportedSku(string vmSku, bool? isAppServerCertified, bool? isDatabaseCertified, IDictionary serializedAdditionalRawData) + { + VmSku = vmSku; + IsAppServerCertified = isAppServerCertified; + IsDatabaseCertified = isDatabaseCertified; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The VM Sku. + public string VmSku { get; } + /// True if the Sku is certified for App server in the SAP system. + public bool? IsAppServerCertified { get; } + /// True if the Sku is certified for Database server in the SAP system. + public bool? IsDatabaseCertified { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSupportedSkusContent.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSupportedSkusContent.Serialization.cs new file mode 100644 index 000000000000..11a19d79b0ea --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSupportedSkusContent.Serialization.cs @@ -0,0 +1,180 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SapSupportedSkusContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapSupportedSkusContent)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("appLocation"u8); + writer.WriteStringValue(AppLocation); + writer.WritePropertyName("environment"u8); + writer.WriteStringValue(Environment.ToString()); + writer.WritePropertyName("sapProduct"u8); + writer.WriteStringValue(SapProduct.ToString()); + writer.WritePropertyName("deploymentType"u8); + writer.WriteStringValue(DeploymentType.ToString()); + writer.WritePropertyName("databaseType"u8); + writer.WriteStringValue(DatabaseType.ToString()); + if (Optional.IsDefined(HighAvailabilityType)) + { + writer.WritePropertyName("highAvailabilityType"u8); + writer.WriteStringValue(HighAvailabilityType.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SapSupportedSkusContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapSupportedSkusContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapSupportedSkusContent(document.RootElement, options); + } + + internal static SapSupportedSkusContent DeserializeSapSupportedSkusContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string appLocation = default; + SapEnvironmentType environment = default; + SapProductType sapProduct = default; + SapDeploymentType deploymentType = default; + SapDatabaseType databaseType = default; + SapHighAvailabilityType? highAvailabilityType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("appLocation"u8)) + { + appLocation = property.Value.GetString(); + continue; + } + if (property.NameEquals("environment"u8)) + { + environment = new SapEnvironmentType(property.Value.GetString()); + continue; + } + if (property.NameEquals("sapProduct"u8)) + { + sapProduct = new SapProductType(property.Value.GetString()); + continue; + } + if (property.NameEquals("deploymentType"u8)) + { + deploymentType = new SapDeploymentType(property.Value.GetString()); + continue; + } + if (property.NameEquals("databaseType"u8)) + { + databaseType = new SapDatabaseType(property.Value.GetString()); + continue; + } + if (property.NameEquals("highAvailabilityType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + highAvailabilityType = new SapHighAvailabilityType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SapSupportedSkusContent( + appLocation, + environment, + sapProduct, + deploymentType, + databaseType, + highAvailabilityType, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapSupportedSkusContent)} does not support writing '{options.Format}' format."); + } + } + + SapSupportedSkusContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSapSupportedSkusContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapSupportedSkusContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSupportedSkusContent.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSupportedSkusContent.cs new file mode 100644 index 000000000000..9ff9a4a9fe75 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapSupportedSkusContent.cs @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The SAP request to get list of supported SKUs. + public partial class SapSupportedSkusContent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The geo-location where the resource is to be created. + /// Defines the environment type - Production/Non Production. + /// Defines the SAP Product type. + /// The deployment type. Eg: SingleServer/ThreeTier. + /// The database type. Eg: HANA, DB2, etc. + /// is null. + public SapSupportedSkusContent(string appLocation, SapEnvironmentType environment, SapProductType sapProduct, SapDeploymentType deploymentType, SapDatabaseType databaseType) + { + Argument.AssertNotNull(appLocation, nameof(appLocation)); + + AppLocation = appLocation; + Environment = environment; + SapProduct = sapProduct; + DeploymentType = deploymentType; + DatabaseType = databaseType; + } + + /// Initializes a new instance of . + /// The geo-location where the resource is to be created. + /// Defines the environment type - Production/Non Production. + /// Defines the SAP Product type. + /// The deployment type. Eg: SingleServer/ThreeTier. + /// The database type. Eg: HANA, DB2, etc. + /// The high availability type. + /// Keeps track of any properties unknown to the library. + internal SapSupportedSkusContent(string appLocation, SapEnvironmentType environment, SapProductType sapProduct, SapDeploymentType deploymentType, SapDatabaseType databaseType, SapHighAvailabilityType? highAvailabilityType, IDictionary serializedAdditionalRawData) + { + AppLocation = appLocation; + Environment = environment; + SapProduct = sapProduct; + DeploymentType = deploymentType; + DatabaseType = databaseType; + HighAvailabilityType = highAvailabilityType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SapSupportedSkusContent() + { + } + + /// The geo-location where the resource is to be created. + public string AppLocation { get; } + /// Defines the environment type - Production/Non Production. + public SapEnvironmentType Environment { get; } + /// Defines the SAP Product type. + public SapProductType SapProduct { get; } + /// The deployment type. Eg: SingleServer/ThreeTier. + public SapDeploymentType DeploymentType { get; } + /// The database type. Eg: HANA, DB2, etc. + public SapDatabaseType DatabaseType { get; } + /// The high availability type. + public SapHighAvailabilityType? HighAvailabilityType { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstanceError.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstanceError.Serialization.cs new file mode 100644 index 000000000000..ace37698b770 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstanceError.Serialization.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + internal partial class SapVirtualInstanceError : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapVirtualInstanceError)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SapVirtualInstanceError IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapVirtualInstanceError)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapVirtualInstanceError(document.RootElement, options); + } + + internal static SapVirtualInstanceError DeserializeSapVirtualInstanceError(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ErrorInformation properties = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = ErrorInformation.DeserializeErrorInformation(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SapVirtualInstanceError(properties, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapVirtualInstanceError)} does not support writing '{options.Format}' format."); + } + } + + SapVirtualInstanceError IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSapVirtualInstanceError(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapVirtualInstanceError)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstanceError.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstanceError.cs new file mode 100644 index 000000000000..7ee793a33452 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstanceError.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// An error response from the Virtual Instance for SAP Workload service. + internal partial class SapVirtualInstanceError + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal SapVirtualInstanceError() + { + } + + /// Initializes a new instance of . + /// The Virtual Instance for SAP error body. + /// Keeps track of any properties unknown to the library. + internal SapVirtualInstanceError(ErrorInformation properties, IDictionary serializedAdditionalRawData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The Virtual Instance for SAP error body. + public ErrorInformation Properties { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstancePatch.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstancePatch.Serialization.cs new file mode 100644 index 000000000000..79e0755875aa --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstancePatch.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; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SapVirtualInstancePatch : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapVirtualInstancePatch)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"u8); + writer.WriteObjectValue(Identity, options); + } + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SapVirtualInstancePatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapVirtualInstancePatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapVirtualInstancePatch(document.RootElement, options); + } + + internal static SapVirtualInstancePatch DeserializeSapVirtualInstancePatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary tags = default; + SAPVirtualInstanceIdentity identity = default; + UpdateSapVirtualInstanceProperties properties = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("identity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + identity = SAPVirtualInstanceIdentity.DeserializeSAPVirtualInstanceIdentity(property.Value, options); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = UpdateSapVirtualInstanceProperties.DeserializeUpdateSapVirtualInstanceProperties(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SapVirtualInstancePatch(tags ?? new ChangeTrackingDictionary(), identity, properties, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapVirtualInstancePatch)} does not support writing '{options.Format}' format."); + } + } + + SapVirtualInstancePatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSapVirtualInstancePatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapVirtualInstancePatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstancePatch.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstancePatch.cs new file mode 100644 index 000000000000..d38c79714ba2 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstancePatch.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the request body for updating Virtual Instance for SAP. + public partial class SapVirtualInstancePatch + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public SapVirtualInstancePatch() + { + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// Gets or sets the Resource tags. + /// Managed service identity (user assigned identities). + /// The update properties. + /// Keeps track of any properties unknown to the library. + internal SapVirtualInstancePatch(IDictionary tags, SAPVirtualInstanceIdentity identity, UpdateSapVirtualInstanceProperties properties, IDictionary serializedAdditionalRawData) + { + Tags = tags; + Identity = identity; + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets or sets the Resource tags. + public IDictionary Tags { get; } + /// Managed service identity (user assigned identities). + public SAPVirtualInstanceIdentity Identity { get; set; } + /// The update properties. + internal UpdateSapVirtualInstanceProperties Properties { get; set; } + /// Specifies the network access configuration for the resources that will be deployed in the Managed Resource Group. The options to choose from are Public and Private. If 'Private' is chosen, the Storage Account service tag should be enabled on the subnets in which the SAP VMs exist. This is required for establishing connectivity between VM extensions and the managed resource group storage account. This setting is currently applicable only to Storage Account. Learn more here https://go.microsoft.com/fwlink/?linkid=2247228. + public ManagedResourcesNetworkAccessType? UpdateSapVirtualInstanceManagedResourcesNetworkAccessType + { + get => Properties is null ? default : Properties.ManagedResourcesNetworkAccessType; + set + { + if (Properties is null) + Properties = new UpdateSapVirtualInstanceProperties(); + Properties.ManagedResourcesNetworkAccessType = value; + } + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstanceProperties.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstanceProperties.Serialization.cs new file mode 100644 index 000000000000..d1d18507916f --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstanceProperties.Serialization.cs @@ -0,0 +1,258 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SapVirtualInstanceProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapVirtualInstanceProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("environment"u8); + writer.WriteStringValue(Environment.ToString()); + writer.WritePropertyName("sapProduct"u8); + writer.WriteStringValue(SapProduct.ToString()); + if (Optional.IsDefined(ManagedResourcesNetworkAccessType)) + { + writer.WritePropertyName("managedResourcesNetworkAccessType"u8); + writer.WriteStringValue(ManagedResourcesNetworkAccessType.Value.ToString()); + } + writer.WritePropertyName("configuration"u8); + writer.WriteObjectValue(Configuration, options); + if (Optional.IsDefined(ManagedResourceGroupConfiguration)) + { + writer.WritePropertyName("managedResourceGroupConfiguration"u8); + writer.WriteObjectValue(ManagedResourceGroupConfiguration, options); + } + if (options.Format != "W" && Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(Health)) + { + writer.WritePropertyName("health"u8); + writer.WriteStringValue(Health.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(Errors)) + { + writer.WritePropertyName("errors"u8); + writer.WriteObjectValue(Errors, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SapVirtualInstanceProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapVirtualInstanceProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapVirtualInstanceProperties(document.RootElement, options); + } + + internal static SapVirtualInstanceProperties DeserializeSapVirtualInstanceProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + SapEnvironmentType environment = default; + SapProductType sapProduct = default; + ManagedResourcesNetworkAccessType? managedResourcesNetworkAccessType = default; + SapConfiguration configuration = default; + ManagedRGConfiguration managedResourceGroupConfiguration = default; + SapVirtualInstanceStatus? status = default; + SapHealthState? health = default; + SapVirtualInstanceState? state = default; + SapVirtualInstanceProvisioningState? provisioningState = default; + SapVirtualInstanceError errors = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("environment"u8)) + { + environment = new SapEnvironmentType(property.Value.GetString()); + continue; + } + if (property.NameEquals("sapProduct"u8)) + { + sapProduct = new SapProductType(property.Value.GetString()); + continue; + } + if (property.NameEquals("managedResourcesNetworkAccessType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + managedResourcesNetworkAccessType = new ManagedResourcesNetworkAccessType(property.Value.GetString()); + continue; + } + if (property.NameEquals("configuration"u8)) + { + configuration = SapConfiguration.DeserializeSapConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("managedResourceGroupConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + managedResourceGroupConfiguration = ManagedRGConfiguration.DeserializeManagedRGConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("status"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new SapVirtualInstanceStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("health"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + health = new SapHealthState(property.Value.GetString()); + continue; + } + if (property.NameEquals("state"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = new SapVirtualInstanceState(property.Value.GetString()); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new SapVirtualInstanceProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("errors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + errors = SapVirtualInstanceError.DeserializeSapVirtualInstanceError(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SapVirtualInstanceProperties( + environment, + sapProduct, + managedResourcesNetworkAccessType, + configuration, + managedResourceGroupConfiguration, + status, + health, + state, + provisioningState, + errors, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapVirtualInstanceProperties)} does not support writing '{options.Format}' format."); + } + } + + SapVirtualInstanceProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSapVirtualInstanceProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapVirtualInstanceProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstanceProperties.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstanceProperties.cs new file mode 100644 index 000000000000..cd9723a6f3a6 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstanceProperties.cs @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the Virtual Instance for SAP solutions resource properties. + public partial class SapVirtualInstanceProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Defines the environment type - Production/Non Production. + /// Defines the SAP Product type. + /// + /// Defines if the SAP system is being created using Azure Center for SAP solutions (ACSS) or if an existing SAP system is being registered with ACSS + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// is null. + public SapVirtualInstanceProperties(SapEnvironmentType environment, SapProductType sapProduct, SapConfiguration configuration) + { + Argument.AssertNotNull(configuration, nameof(configuration)); + + Environment = environment; + SapProduct = sapProduct; + Configuration = configuration; + } + + /// Initializes a new instance of . + /// Defines the environment type - Production/Non Production. + /// Defines the SAP Product type. + /// Specifies the network access configuration for the resources that will be deployed in the Managed Resource Group. The options to choose from are Public and Private. If 'Private' is chosen, the Storage Account service tag should be enabled on the subnets in which the SAP VMs exist. This is required for establishing connectivity between VM extensions and the managed resource group storage account. This setting is currently applicable only to Storage Account. Learn more here https://go.microsoft.com/fwlink/?linkid=2247228. + /// + /// Defines if the SAP system is being created using Azure Center for SAP solutions (ACSS) or if an existing SAP system is being registered with ACSS + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// Managed resource group configuration. + /// Defines the SAP Instance status. + /// Defines the health of SAP Instances. + /// Defines the Virtual Instance for SAP state. + /// Defines the provisioning states. + /// Indicates any errors on the Virtual Instance for SAP solutions resource. + /// Keeps track of any properties unknown to the library. + internal SapVirtualInstanceProperties(SapEnvironmentType environment, SapProductType sapProduct, ManagedResourcesNetworkAccessType? managedResourcesNetworkAccessType, SapConfiguration configuration, ManagedRGConfiguration managedResourceGroupConfiguration, SapVirtualInstanceStatus? status, SapHealthState? health, SapVirtualInstanceState? state, SapVirtualInstanceProvisioningState? provisioningState, SapVirtualInstanceError errors, IDictionary serializedAdditionalRawData) + { + Environment = environment; + SapProduct = sapProduct; + ManagedResourcesNetworkAccessType = managedResourcesNetworkAccessType; + Configuration = configuration; + ManagedResourceGroupConfiguration = managedResourceGroupConfiguration; + Status = status; + Health = health; + State = state; + ProvisioningState = provisioningState; + Errors = errors; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SapVirtualInstanceProperties() + { + } + + /// Defines the environment type - Production/Non Production. + public SapEnvironmentType Environment { get; set; } + /// Defines the SAP Product type. + public SapProductType SapProduct { get; set; } + /// Specifies the network access configuration for the resources that will be deployed in the Managed Resource Group. The options to choose from are Public and Private. If 'Private' is chosen, the Storage Account service tag should be enabled on the subnets in which the SAP VMs exist. This is required for establishing connectivity between VM extensions and the managed resource group storage account. This setting is currently applicable only to Storage Account. Learn more here https://go.microsoft.com/fwlink/?linkid=2247228. + public ManagedResourcesNetworkAccessType? ManagedResourcesNetworkAccessType { get; set; } + /// + /// Defines if the SAP system is being created using Azure Center for SAP solutions (ACSS) or if an existing SAP system is being registered with ACSS + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public SapConfiguration Configuration { get; set; } + /// Managed resource group configuration. + internal ManagedRGConfiguration ManagedResourceGroupConfiguration { get; set; } + /// Managed resource group name. + public string ManagedResourceGroupName + { + get => ManagedResourceGroupConfiguration is null ? default : ManagedResourceGroupConfiguration.Name; + set + { + if (ManagedResourceGroupConfiguration is null) + ManagedResourceGroupConfiguration = new ManagedRGConfiguration(); + ManagedResourceGroupConfiguration.Name = value; + } + } + + /// Defines the SAP Instance status. + public SapVirtualInstanceStatus? Status { get; } + /// Defines the health of SAP Instances. + public SapHealthState? Health { get; } + /// Defines the Virtual Instance for SAP state. + public SapVirtualInstanceState? State { get; } + /// Defines the provisioning states. + public SapVirtualInstanceProvisioningState? ProvisioningState { get; } + /// Indicates any errors on the Virtual Instance for SAP solutions resource. + internal SapVirtualInstanceError Errors { get; } + /// The Virtual Instance for SAP error body. + public ErrorInformation ErrorsProperties + { + get => Errors?.Properties; + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstanceProvisioningState.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstanceProvisioningState.cs new file mode 100644 index 000000000000..2c1b19b21645 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstanceProvisioningState.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the provisioning states. + public readonly partial struct SapVirtualInstanceProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SapVirtualInstanceProvisioningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SucceededValue = "Succeeded"; + private const string UpdatingValue = "Updating"; + private const string CreatingValue = "Creating"; + private const string FailedValue = "Failed"; + private const string DeletingValue = "Deleting"; + private const string CanceledValue = "Canceled"; + + /// ACSS succeeded provisioning state. + public static SapVirtualInstanceProvisioningState Succeeded { get; } = new SapVirtualInstanceProvisioningState(SucceededValue); + /// ACSS updating provisioning state. + public static SapVirtualInstanceProvisioningState Updating { get; } = new SapVirtualInstanceProvisioningState(UpdatingValue); + /// ACSS Creating provisioning state. + public static SapVirtualInstanceProvisioningState Creating { get; } = new SapVirtualInstanceProvisioningState(CreatingValue); + /// ACSS Failed provisioning state. + public static SapVirtualInstanceProvisioningState Failed { get; } = new SapVirtualInstanceProvisioningState(FailedValue); + /// ACSS Deleting provisioning state. + public static SapVirtualInstanceProvisioningState Deleting { get; } = new SapVirtualInstanceProvisioningState(DeletingValue); + /// ACSS Canceled provisioning state. + public static SapVirtualInstanceProvisioningState Canceled { get; } = new SapVirtualInstanceProvisioningState(CanceledValue); + /// Determines if two values are the same. + public static bool operator ==(SapVirtualInstanceProvisioningState left, SapVirtualInstanceProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SapVirtualInstanceProvisioningState left, SapVirtualInstanceProvisioningState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator SapVirtualInstanceProvisioningState(string value) => new SapVirtualInstanceProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SapVirtualInstanceProvisioningState other && Equals(other); + /// + public bool Equals(SapVirtualInstanceProvisioningState 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/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstanceState.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstanceState.cs new file mode 100644 index 000000000000..b2aa043b9ae6 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstanceState.cs @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the Virtual Instance for SAP state. + public readonly partial struct SapVirtualInstanceState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SapVirtualInstanceState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string InfrastructureDeploymentPendingValue = "InfrastructureDeploymentPending"; + private const string InfrastructureDeploymentInProgressValue = "InfrastructureDeploymentInProgress"; + private const string InfrastructureDeploymentFailedValue = "InfrastructureDeploymentFailed"; + private const string SoftwareInstallationPendingValue = "SoftwareInstallationPending"; + private const string SoftwareInstallationInProgressValue = "SoftwareInstallationInProgress"; + private const string SoftwareInstallationFailedValue = "SoftwareInstallationFailed"; + private const string SoftwareDetectionInProgressValue = "SoftwareDetectionInProgress"; + private const string SoftwareDetectionFailedValue = "SoftwareDetectionFailed"; + private const string DiscoveryPendingValue = "DiscoveryPending"; + private const string DiscoveryInProgressValue = "DiscoveryInProgress"; + private const string DiscoveryFailedValue = "DiscoveryFailed"; + private const string RegistrationCompleteValue = "RegistrationComplete"; + private const string ACSSInstallationBlockedValue = "ACSSInstallationBlocked"; + + /// Infrastructure is not yet deployed. + public static SapVirtualInstanceState InfrastructureDeploymentPending { get; } = new SapVirtualInstanceState(InfrastructureDeploymentPendingValue); + /// Infrastructure deployment is in progress. + public static SapVirtualInstanceState InfrastructureDeploymentInProgress { get; } = new SapVirtualInstanceState(InfrastructureDeploymentInProgressValue); + /// Infrastructure deployment has failed. + public static SapVirtualInstanceState InfrastructureDeploymentFailed { get; } = new SapVirtualInstanceState(InfrastructureDeploymentFailedValue); + /// Infrastructure deployment is successful. Software installation is pending. + public static SapVirtualInstanceState SoftwareInstallationPending { get; } = new SapVirtualInstanceState(SoftwareInstallationPendingValue); + /// Software installation is in progress. + public static SapVirtualInstanceState SoftwareInstallationInProgress { get; } = new SapVirtualInstanceState(SoftwareInstallationInProgressValue); + /// Software installation failed. + public static SapVirtualInstanceState SoftwareInstallationFailed { get; } = new SapVirtualInstanceState(SoftwareInstallationFailedValue); + /// Software detection is in progress. + public static SapVirtualInstanceState SoftwareDetectionInProgress { get; } = new SapVirtualInstanceState(SoftwareDetectionInProgressValue); + /// Software detection failed. + public static SapVirtualInstanceState SoftwareDetectionFailed { get; } = new SapVirtualInstanceState(SoftwareDetectionFailedValue); + /// Registration has not started. + public static SapVirtualInstanceState DiscoveryPending { get; } = new SapVirtualInstanceState(DiscoveryPendingValue); + /// Registration is in progress. + public static SapVirtualInstanceState DiscoveryInProgress { get; } = new SapVirtualInstanceState(DiscoveryInProgressValue); + /// Registration has failed. + public static SapVirtualInstanceState DiscoveryFailed { get; } = new SapVirtualInstanceState(DiscoveryFailedValue); + /// Registration is complete. + public static SapVirtualInstanceState RegistrationComplete { get; } = new SapVirtualInstanceState(RegistrationCompleteValue); + /// ACSS installation cannot proceed. + public static SapVirtualInstanceState ACSSInstallationBlocked { get; } = new SapVirtualInstanceState(ACSSInstallationBlockedValue); + /// Determines if two values are the same. + public static bool operator ==(SapVirtualInstanceState left, SapVirtualInstanceState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SapVirtualInstanceState left, SapVirtualInstanceState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator SapVirtualInstanceState(string value) => new SapVirtualInstanceState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SapVirtualInstanceState other && Equals(other); + /// + public bool Equals(SapVirtualInstanceState 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/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstanceStatus.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstanceStatus.cs new file mode 100644 index 000000000000..4ac8e7edc524 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SapVirtualInstanceStatus.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the SAP Instance status. + public readonly partial struct SapVirtualInstanceStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SapVirtualInstanceStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string StartingValue = "Starting"; + private const string RunningValue = "Running"; + private const string StoppingValue = "Stopping"; + private const string OfflineValue = "Offline"; + private const string PartiallyRunningValue = "PartiallyRunning"; + private const string UnavailableValue = "Unavailable"; + private const string SoftShutdownValue = "SoftShutdown"; + + /// SAP system is getting started. + public static SapVirtualInstanceStatus Starting { get; } = new SapVirtualInstanceStatus(StartingValue); + /// SAP system is running. + public static SapVirtualInstanceStatus Running { get; } = new SapVirtualInstanceStatus(RunningValue); + /// SAP system is being stopped. + public static SapVirtualInstanceStatus Stopping { get; } = new SapVirtualInstanceStatus(StoppingValue); + /// SAP system is offline. + public static SapVirtualInstanceStatus Offline { get; } = new SapVirtualInstanceStatus(OfflineValue); + /// SAP system is partially running. + public static SapVirtualInstanceStatus PartiallyRunning { get; } = new SapVirtualInstanceStatus(PartiallyRunningValue); + /// SAP system status is unavailable. + public static SapVirtualInstanceStatus Unavailable { get; } = new SapVirtualInstanceStatus(UnavailableValue); + /// Soft shutdown of SAP system is initiated. + public static SapVirtualInstanceStatus SoftShutdown { get; } = new SapVirtualInstanceStatus(SoftShutdownValue); + /// Determines if two values are the same. + public static bool operator ==(SapVirtualInstanceStatus left, SapVirtualInstanceStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SapVirtualInstanceStatus left, SapVirtualInstanceStatus right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator SapVirtualInstanceStatus(string value) => new SapVirtualInstanceStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SapVirtualInstanceStatus other && Equals(other); + /// + public bool Equals(SapVirtualInstanceStatus 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/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ServiceInitiatedSoftwareConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ServiceInitiatedSoftwareConfiguration.Serialization.cs new file mode 100644 index 000000000000..5602fc145334 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ServiceInitiatedSoftwareConfiguration.Serialization.cs @@ -0,0 +1,173 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class ServiceInitiatedSoftwareConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ServiceInitiatedSoftwareConfiguration)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("bomUrl"u8); + writer.WriteStringValue(BomUri); + writer.WritePropertyName("softwareVersion"u8); + writer.WriteStringValue(SoftwareVersion); + writer.WritePropertyName("sapBitsStorageAccountId"u8); + writer.WriteStringValue(SapBitsStorageAccountId); + writer.WritePropertyName("sapFqdn"u8); + writer.WriteStringValue(SapFqdn); + writer.WritePropertyName("sshPrivateKey"u8); + writer.WriteStringValue(SshPrivateKey); + if (Optional.IsDefined(HighAvailabilitySoftwareConfiguration)) + { + writer.WritePropertyName("highAvailabilitySoftwareConfiguration"u8); + writer.WriteObjectValue(HighAvailabilitySoftwareConfiguration, options); + } + } + + ServiceInitiatedSoftwareConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ServiceInitiatedSoftwareConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeServiceInitiatedSoftwareConfiguration(document.RootElement, options); + } + + internal static ServiceInitiatedSoftwareConfiguration DeserializeServiceInitiatedSoftwareConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string bomUrl = default; + string softwareVersion = default; + string sapBitsStorageAccountId = default; + string sapFqdn = default; + string sshPrivateKey = default; + HighAvailabilitySoftwareConfiguration highAvailabilitySoftwareConfiguration = default; + SapSoftwareInstallationType softwareInstallationType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("bomUrl"u8)) + { + bomUrl = property.Value.GetString(); + continue; + } + if (property.NameEquals("softwareVersion"u8)) + { + softwareVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("sapBitsStorageAccountId"u8)) + { + sapBitsStorageAccountId = property.Value.GetString(); + continue; + } + if (property.NameEquals("sapFqdn"u8)) + { + sapFqdn = property.Value.GetString(); + continue; + } + if (property.NameEquals("sshPrivateKey"u8)) + { + sshPrivateKey = property.Value.GetString(); + continue; + } + if (property.NameEquals("highAvailabilitySoftwareConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + highAvailabilitySoftwareConfiguration = HighAvailabilitySoftwareConfiguration.DeserializeHighAvailabilitySoftwareConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("softwareInstallationType"u8)) + { + softwareInstallationType = new SapSoftwareInstallationType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ServiceInitiatedSoftwareConfiguration( + softwareInstallationType, + serializedAdditionalRawData, + bomUrl, + softwareVersion, + sapBitsStorageAccountId, + sapFqdn, + sshPrivateKey, + highAvailabilitySoftwareConfiguration); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ServiceInitiatedSoftwareConfiguration)} does not support writing '{options.Format}' format."); + } + } + + ServiceInitiatedSoftwareConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeServiceInitiatedSoftwareConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ServiceInitiatedSoftwareConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ServiceInitiatedSoftwareConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ServiceInitiatedSoftwareConfiguration.cs new file mode 100644 index 000000000000..74baf107de2a --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ServiceInitiatedSoftwareConfiguration.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The SAP Software configuration Input when the software is to be installed by service. + public partial class ServiceInitiatedSoftwareConfiguration : SoftwareConfiguration + { + /// Initializes a new instance of . + /// The URL to the SAP Build of Materials(BOM) file. + /// The software version to install. + /// The SAP bits storage account id. + /// The FQDN to set for the SAP system during install. + /// The SSH private key. + /// , , , or is null. + public ServiceInitiatedSoftwareConfiguration(string bomUri, string softwareVersion, string sapBitsStorageAccountId, string sapFqdn, string sshPrivateKey) + { + Argument.AssertNotNull(bomUri, nameof(bomUri)); + Argument.AssertNotNull(softwareVersion, nameof(softwareVersion)); + Argument.AssertNotNull(sapBitsStorageAccountId, nameof(sapBitsStorageAccountId)); + Argument.AssertNotNull(sapFqdn, nameof(sapFqdn)); + Argument.AssertNotNull(sshPrivateKey, nameof(sshPrivateKey)); + + BomUri = bomUri; + SoftwareVersion = softwareVersion; + SapBitsStorageAccountId = sapBitsStorageAccountId; + SapFqdn = sapFqdn; + SshPrivateKey = sshPrivateKey; + SoftwareInstallationType = SapSoftwareInstallationType.ServiceInitiated; + } + + /// Initializes a new instance of . + /// The SAP software installation type. + /// Keeps track of any properties unknown to the library. + /// The URL to the SAP Build of Materials(BOM) file. + /// The software version to install. + /// The SAP bits storage account id. + /// The FQDN to set for the SAP system during install. + /// The SSH private key. + /// Gets or sets the HA software configuration. + internal ServiceInitiatedSoftwareConfiguration(SapSoftwareInstallationType softwareInstallationType, IDictionary serializedAdditionalRawData, string bomUri, string softwareVersion, string sapBitsStorageAccountId, string sapFqdn, string sshPrivateKey, HighAvailabilitySoftwareConfiguration highAvailabilitySoftwareConfiguration) : base(softwareInstallationType, serializedAdditionalRawData) + { + BomUri = bomUri; + SoftwareVersion = softwareVersion; + SapBitsStorageAccountId = sapBitsStorageAccountId; + SapFqdn = sapFqdn; + SshPrivateKey = sshPrivateKey; + HighAvailabilitySoftwareConfiguration = highAvailabilitySoftwareConfiguration; + SoftwareInstallationType = softwareInstallationType; + } + + /// Initializes a new instance of for deserialization. + internal ServiceInitiatedSoftwareConfiguration() + { + } + + /// The URL to the SAP Build of Materials(BOM) file. + public string BomUri { get; set; } + /// The software version to install. + public string SoftwareVersion { get; set; } + /// The SAP bits storage account id. + public string SapBitsStorageAccountId { get; set; } + /// The FQDN to set for the SAP system during install. + public string SapFqdn { get; set; } + /// The SSH private key. + public string SshPrivateKey { get; set; } + /// Gets or sets the HA software configuration. + public HighAvailabilitySoftwareConfiguration HighAvailabilitySoftwareConfiguration { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SharedStorageResourceNames.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SharedStorageResourceNames.Serialization.cs new file mode 100644 index 000000000000..9fe70e7ccbde --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SharedStorageResourceNames.Serialization.cs @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SharedStorageResourceNames : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SharedStorageResourceNames)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(SharedStorageAccountName)) + { + writer.WritePropertyName("sharedStorageAccountName"u8); + writer.WriteStringValue(SharedStorageAccountName); + } + if (Optional.IsDefined(SharedStorageAccountPrivateEndPointName)) + { + writer.WritePropertyName("sharedStorageAccountPrivateEndPointName"u8); + writer.WriteStringValue(SharedStorageAccountPrivateEndPointName); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SharedStorageResourceNames IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SharedStorageResourceNames)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSharedStorageResourceNames(document.RootElement, options); + } + + internal static SharedStorageResourceNames DeserializeSharedStorageResourceNames(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string sharedStorageAccountName = default; + string sharedStorageAccountPrivateEndPointName = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("sharedStorageAccountName"u8)) + { + sharedStorageAccountName = property.Value.GetString(); + continue; + } + if (property.NameEquals("sharedStorageAccountPrivateEndPointName"u8)) + { + sharedStorageAccountPrivateEndPointName = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SharedStorageResourceNames(sharedStorageAccountName, sharedStorageAccountPrivateEndPointName, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SharedStorageResourceNames)} does not support writing '{options.Format}' format."); + } + } + + SharedStorageResourceNames IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSharedStorageResourceNames(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SharedStorageResourceNames)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SharedStorageResourceNames.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SharedStorageResourceNames.cs new file mode 100644 index 000000000000..a63616969347 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SharedStorageResourceNames.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The resource names object for shared storage. + public partial class SharedStorageResourceNames + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public SharedStorageResourceNames() + { + } + + /// Initializes a new instance of . + /// The full name of the shared storage account. If it is not provided, it will be defaulted to {SID}nfs{guid of 15 chars}. + /// The full name of private end point for the shared storage account. If it is not provided, it will be defaulted to {storageAccountName}_pe. + /// Keeps track of any properties unknown to the library. + internal SharedStorageResourceNames(string sharedStorageAccountName, string sharedStorageAccountPrivateEndPointName, IDictionary serializedAdditionalRawData) + { + SharedStorageAccountName = sharedStorageAccountName; + SharedStorageAccountPrivateEndPointName = sharedStorageAccountPrivateEndPointName; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The full name of the shared storage account. If it is not provided, it will be defaulted to {SID}nfs{guid of 15 chars}. + public string SharedStorageAccountName { get; set; } + /// The full name of private end point for the shared storage account. If it is not provided, it will be defaulted to {storageAccountName}_pe. + public string SharedStorageAccountPrivateEndPointName { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerConfiguration.Serialization.cs new file mode 100644 index 000000000000..85822bd9ffe8 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerConfiguration.Serialization.cs @@ -0,0 +1,201 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SingleServerConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SingleServerConfiguration)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(NetworkConfiguration)) + { + writer.WritePropertyName("networkConfiguration"u8); + writer.WriteObjectValue(NetworkConfiguration, options); + } + if (Optional.IsDefined(DatabaseType)) + { + writer.WritePropertyName("databaseType"u8); + writer.WriteStringValue(DatabaseType.Value.ToString()); + } + writer.WritePropertyName("subnetId"u8); + writer.WriteStringValue(SubnetId); + writer.WritePropertyName("virtualMachineConfiguration"u8); + writer.WriteObjectValue(VirtualMachineConfiguration, options); + if (Optional.IsDefined(DbDiskConfiguration)) + { + writer.WritePropertyName("dbDiskConfiguration"u8); + writer.WriteObjectValue(DbDiskConfiguration, options); + } + if (Optional.IsDefined(CustomResourceNames)) + { + writer.WritePropertyName("customResourceNames"u8); + writer.WriteObjectValue(CustomResourceNames, options); + } + } + + SingleServerConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SingleServerConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSingleServerConfiguration(document.RootElement, options); + } + + internal static SingleServerConfiguration DeserializeSingleServerConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + NetworkConfiguration networkConfiguration = default; + SapDatabaseType? databaseType = default; + string subnetId = default; + VirtualMachineConfiguration virtualMachineConfiguration = default; + DiskConfiguration dbDiskConfiguration = default; + SingleServerCustomResourceNames customResourceNames = default; + string appResourceGroup = default; + SapDeploymentType deploymentType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("networkConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + networkConfiguration = NetworkConfiguration.DeserializeNetworkConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("databaseType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + databaseType = new SapDatabaseType(property.Value.GetString()); + continue; + } + if (property.NameEquals("subnetId"u8)) + { + subnetId = property.Value.GetString(); + continue; + } + if (property.NameEquals("virtualMachineConfiguration"u8)) + { + virtualMachineConfiguration = VirtualMachineConfiguration.DeserializeVirtualMachineConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("dbDiskConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dbDiskConfiguration = DiskConfiguration.DeserializeDiskConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("customResourceNames"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + customResourceNames = SingleServerCustomResourceNames.DeserializeSingleServerCustomResourceNames(property.Value, options); + continue; + } + if (property.NameEquals("appResourceGroup"u8)) + { + appResourceGroup = property.Value.GetString(); + continue; + } + if (property.NameEquals("deploymentType"u8)) + { + deploymentType = new SapDeploymentType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SingleServerConfiguration( + appResourceGroup, + deploymentType, + serializedAdditionalRawData, + networkConfiguration, + databaseType, + subnetId, + virtualMachineConfiguration, + dbDiskConfiguration, + customResourceNames); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SingleServerConfiguration)} does not support writing '{options.Format}' format."); + } + } + + SingleServerConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSingleServerConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SingleServerConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerConfiguration.cs new file mode 100644 index 000000000000..0c9786b43b71 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerConfiguration.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Gets or sets the single server configuration. For prerequisites for creating the infrastructure, please see [here](https://go.microsoft.com/fwlink/?linkid=2212611&clcid=0x409). + public partial class SingleServerConfiguration : InfrastructureConfiguration + { + /// Initializes a new instance of . + /// The application resource group where SAP system resources will be deployed. + /// The subnet id. + /// Gets or sets the virtual machine configuration. + /// , or is null. + public SingleServerConfiguration(string appResourceGroup, string subnetId, VirtualMachineConfiguration virtualMachineConfiguration) : base(appResourceGroup) + { + Argument.AssertNotNull(appResourceGroup, nameof(appResourceGroup)); + Argument.AssertNotNull(subnetId, nameof(subnetId)); + Argument.AssertNotNull(virtualMachineConfiguration, nameof(virtualMachineConfiguration)); + + SubnetId = subnetId; + VirtualMachineConfiguration = virtualMachineConfiguration; + DeploymentType = SapDeploymentType.SingleServer; + } + + /// Initializes a new instance of . + /// The application resource group where SAP system resources will be deployed. + /// The SAP deployment type. Eg: SingleServer/ThreeTier. + /// Keeps track of any properties unknown to the library. + /// Network configuration for the server. + /// The database type. + /// The subnet id. + /// Gets or sets the virtual machine configuration. + /// Gets or sets the disk configuration. + /// + /// The set of custom names to be used for underlying azure resources that are part of the SAP system. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + internal SingleServerConfiguration(string appResourceGroup, SapDeploymentType deploymentType, IDictionary serializedAdditionalRawData, NetworkConfiguration networkConfiguration, SapDatabaseType? databaseType, string subnetId, VirtualMachineConfiguration virtualMachineConfiguration, DiskConfiguration dbDiskConfiguration, SingleServerCustomResourceNames customResourceNames) : base(appResourceGroup, deploymentType, serializedAdditionalRawData) + { + NetworkConfiguration = networkConfiguration; + DatabaseType = databaseType; + SubnetId = subnetId; + VirtualMachineConfiguration = virtualMachineConfiguration; + DbDiskConfiguration = dbDiskConfiguration; + CustomResourceNames = customResourceNames; + DeploymentType = deploymentType; + } + + /// Initializes a new instance of for deserialization. + internal SingleServerConfiguration() + { + } + + /// Network configuration for the server. + internal NetworkConfiguration NetworkConfiguration { get; set; } + /// Specifies whether a secondary IP address should be added to the network interface on all VMs of the SAP system being deployed. + public bool? IsSecondaryIPEnabled + { + get => NetworkConfiguration is null ? default : NetworkConfiguration.IsSecondaryIPEnabled; + set + { + if (NetworkConfiguration is null) + NetworkConfiguration = new NetworkConfiguration(); + NetworkConfiguration.IsSecondaryIPEnabled = value; + } + } + + /// The database type. + public SapDatabaseType? DatabaseType { get; set; } + /// The subnet id. + public string SubnetId { get; set; } + /// Gets or sets the virtual machine configuration. + public VirtualMachineConfiguration VirtualMachineConfiguration { get; set; } + /// Gets or sets the disk configuration. + internal DiskConfiguration DbDiskConfiguration { get; set; } + /// The disk configuration for the db volume. For HANA, Required volumes are: ['hana/data', 'hana/log', hana/shared', 'usr/sap', 'os'], Optional volume : ['backup']. + public IDictionary DiskVolumeConfigurations + { + get + { + if (DbDiskConfiguration is null) + DbDiskConfiguration = new DiskConfiguration(); + return DbDiskConfiguration.DiskVolumeConfigurations; + } + } + + /// + /// The set of custom names to be used for underlying azure resources that are part of the SAP system. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + public SingleServerCustomResourceNames CustomResourceNames { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerCustomResourceNames.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerCustomResourceNames.Serialization.cs new file mode 100644 index 000000000000..e7f92e3d834a --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerCustomResourceNames.Serialization.cs @@ -0,0 +1,117 @@ +// 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.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + [PersistableModelProxy(typeof(UnknownSingleServerCustomResourceNames))] + public partial class SingleServerCustomResourceNames : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SingleServerCustomResourceNames)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("namingPatternType"u8); + writer.WriteStringValue(NamingPatternType.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SingleServerCustomResourceNames IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SingleServerCustomResourceNames)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSingleServerCustomResourceNames(document.RootElement, options); + } + + internal static SingleServerCustomResourceNames DeserializeSingleServerCustomResourceNames(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("namingPatternType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "FullResourceName": return SingleServerFullResourceNames.DeserializeSingleServerFullResourceNames(element, options); + } + } + return UnknownSingleServerCustomResourceNames.DeserializeUnknownSingleServerCustomResourceNames(element, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SingleServerCustomResourceNames)} does not support writing '{options.Format}' format."); + } + } + + SingleServerCustomResourceNames IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSingleServerCustomResourceNames(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SingleServerCustomResourceNames)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerCustomResourceNames.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerCustomResourceNames.cs new file mode 100644 index 000000000000..707269bbfa9c --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerCustomResourceNames.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// + /// The resource-names input to specify custom names for underlying azure resources that are part of a single server SAP system. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + public abstract partial class SingleServerCustomResourceNames + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + protected SingleServerCustomResourceNames() + { + } + + /// Initializes a new instance of . + /// The naming pattern type. + /// Keeps track of any properties unknown to the library. + internal SingleServerCustomResourceNames(NamingPatternType namingPatternType, IDictionary serializedAdditionalRawData) + { + NamingPatternType = namingPatternType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The naming pattern type. + internal NamingPatternType NamingPatternType { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerFullResourceNames.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerFullResourceNames.Serialization.cs new file mode 100644 index 000000000000..35815e7c5de2 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerFullResourceNames.Serialization.cs @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SingleServerFullResourceNames : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SingleServerFullResourceNames)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(VirtualMachine)) + { + writer.WritePropertyName("virtualMachine"u8); + writer.WriteObjectValue(VirtualMachine, options); + } + } + + SingleServerFullResourceNames IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SingleServerFullResourceNames)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSingleServerFullResourceNames(document.RootElement, options); + } + + internal static SingleServerFullResourceNames DeserializeSingleServerFullResourceNames(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + VirtualMachineResourceNames virtualMachine = default; + NamingPatternType namingPatternType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("virtualMachine"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + virtualMachine = VirtualMachineResourceNames.DeserializeVirtualMachineResourceNames(property.Value, options); + continue; + } + if (property.NameEquals("namingPatternType"u8)) + { + namingPatternType = new NamingPatternType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SingleServerFullResourceNames(namingPatternType, serializedAdditionalRawData, virtualMachine); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SingleServerFullResourceNames)} does not support writing '{options.Format}' format."); + } + } + + SingleServerFullResourceNames IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSingleServerFullResourceNames(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SingleServerFullResourceNames)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerFullResourceNames.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerFullResourceNames.cs new file mode 100644 index 000000000000..5d2c0d9d3cec --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerFullResourceNames.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The resource name object where the specified values will be full resource names of the corresponding resources in a single server SAP system. + public partial class SingleServerFullResourceNames : SingleServerCustomResourceNames + { + /// Initializes a new instance of . + public SingleServerFullResourceNames() + { + NamingPatternType = NamingPatternType.FullResourceName; + } + + /// Initializes a new instance of . + /// The naming pattern type. + /// Keeps track of any properties unknown to the library. + /// The resource names object for virtual machine and related resources. + internal SingleServerFullResourceNames(NamingPatternType namingPatternType, IDictionary serializedAdditionalRawData, VirtualMachineResourceNames virtualMachine) : base(namingPatternType, serializedAdditionalRawData) + { + VirtualMachine = virtualMachine; + NamingPatternType = namingPatternType; + } + + /// The resource names object for virtual machine and related resources. + public VirtualMachineResourceNames VirtualMachine { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerRecommendationResult.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerRecommendationResult.Serialization.cs new file mode 100644 index 000000000000..ade592cc8c65 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerRecommendationResult.Serialization.cs @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SingleServerRecommendationResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SingleServerRecommendationResult)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(VmSku)) + { + writer.WritePropertyName("vmSku"u8); + writer.WriteStringValue(VmSku); + } + } + + SingleServerRecommendationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SingleServerRecommendationResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSingleServerRecommendationResult(document.RootElement, options); + } + + internal static SingleServerRecommendationResult DeserializeSingleServerRecommendationResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string vmSku = default; + SapDeploymentType deploymentType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("vmSku"u8)) + { + vmSku = property.Value.GetString(); + continue; + } + if (property.NameEquals("deploymentType"u8)) + { + deploymentType = new SapDeploymentType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SingleServerRecommendationResult(deploymentType, serializedAdditionalRawData, vmSku); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SingleServerRecommendationResult)} does not support writing '{options.Format}' format."); + } + } + + SingleServerRecommendationResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSingleServerRecommendationResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SingleServerRecommendationResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerRecommendationResult.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerRecommendationResult.cs new file mode 100644 index 000000000000..8da9f7ba1dba --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SingleServerRecommendationResult.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The recommended configuration for a single server SAP system. + public partial class SingleServerRecommendationResult : SapSizingRecommendationResult + { + /// Initializes a new instance of . + internal SingleServerRecommendationResult() + { + DeploymentType = SapDeploymentType.SingleServer; + } + + /// Initializes a new instance of . + /// The deployment type. Eg: SingleServer/ThreeTier. + /// Keeps track of any properties unknown to the library. + /// The recommended VM SKU for single server. + internal SingleServerRecommendationResult(SapDeploymentType deploymentType, IDictionary serializedAdditionalRawData, string vmSku) : base(deploymentType, serializedAdditionalRawData) + { + VmSku = vmSku; + DeploymentType = deploymentType; + } + + /// The recommended VM SKU for single server. + public string VmSku { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SkipFileShareConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SkipFileShareConfiguration.Serialization.cs new file mode 100644 index 000000000000..94e0443f4816 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SkipFileShareConfiguration.Serialization.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SkipFileShareConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SkipFileShareConfiguration)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + SkipFileShareConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SkipFileShareConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSkipFileShareConfiguration(document.RootElement, options); + } + + internal static SkipFileShareConfiguration DeserializeSkipFileShareConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + FileShareConfigurationType configurationType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("configurationType"u8)) + { + configurationType = new FileShareConfigurationType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SkipFileShareConfiguration(configurationType, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SkipFileShareConfiguration)} does not support writing '{options.Format}' format."); + } + } + + SkipFileShareConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSkipFileShareConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SkipFileShareConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SkipFileShareConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SkipFileShareConfiguration.cs new file mode 100644 index 000000000000..0c117b45e74e --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SkipFileShareConfiguration.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Gets or sets the file share configuration for scenarios where transport directory fileshare is not created or required. + public partial class SkipFileShareConfiguration : FileShareConfiguration + { + /// Initializes a new instance of . + public SkipFileShareConfiguration() + { + ConfigurationType = FileShareConfigurationType.Skip; + } + + /// Initializes a new instance of . + /// The type of file share config, eg: Mount/CreateAndMount/Skip. + /// Keeps track of any properties unknown to the library. + internal SkipFileShareConfiguration(FileShareConfigurationType configurationType, IDictionary serializedAdditionalRawData) : base(configurationType, serializedAdditionalRawData) + { + ConfigurationType = configurationType; + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SoftwareConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SoftwareConfiguration.Serialization.cs new file mode 100644 index 000000000000..359d709161df --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SoftwareConfiguration.Serialization.cs @@ -0,0 +1,119 @@ +// 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.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + [PersistableModelProxy(typeof(UnknownSoftwareConfiguration))] + public partial class SoftwareConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SoftwareConfiguration)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("softwareInstallationType"u8); + writer.WriteStringValue(SoftwareInstallationType.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SoftwareConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SoftwareConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSoftwareConfiguration(document.RootElement, options); + } + + internal static SoftwareConfiguration DeserializeSoftwareConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("softwareInstallationType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "External": return ExternalInstallationSoftwareConfiguration.DeserializeExternalInstallationSoftwareConfiguration(element, options); + case "SAPInstallWithoutOSConfig": return SapInstallWithoutOSConfigSoftwareConfiguration.DeserializeSapInstallWithoutOSConfigSoftwareConfiguration(element, options); + case "ServiceInitiated": return ServiceInitiatedSoftwareConfiguration.DeserializeServiceInitiatedSoftwareConfiguration(element, options); + } + } + return UnknownSoftwareConfiguration.DeserializeUnknownSoftwareConfiguration(element, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SoftwareConfiguration)} does not support writing '{options.Format}' format."); + } + } + + SoftwareConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSoftwareConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SoftwareConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SoftwareConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SoftwareConfiguration.cs new file mode 100644 index 000000000000..571c580ec4b4 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SoftwareConfiguration.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// + /// The SAP Software configuration Input. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public abstract partial class SoftwareConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + protected SoftwareConfiguration() + { + } + + /// Initializes a new instance of . + /// The SAP software installation type. + /// Keeps track of any properties unknown to the library. + internal SoftwareConfiguration(SapSoftwareInstallationType softwareInstallationType, IDictionary serializedAdditionalRawData) + { + SoftwareInstallationType = softwareInstallationType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The SAP software installation type. + internal SapSoftwareInstallationType SoftwareInstallationType { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SshConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SshConfiguration.Serialization.cs new file mode 100644 index 000000000000..a2a85ee227c7 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SshConfiguration.Serialization.cs @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + internal partial class SshConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SshConfiguration)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(PublicKeys)) + { + writer.WritePropertyName("publicKeys"u8); + writer.WriteStartArray(); + foreach (var item in PublicKeys) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SshConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SshConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSshConfiguration(document.RootElement, options); + } + + internal static SshConfiguration DeserializeSshConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList publicKeys = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("publicKeys"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SshPublicKey.DeserializeSshPublicKey(item, options)); + } + publicKeys = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SshConfiguration(publicKeys ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SshConfiguration)} does not support writing '{options.Format}' format."); + } + } + + SshConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSshConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SshConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SshConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SshConfiguration.cs new file mode 100644 index 000000000000..316b88634fcc --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SshConfiguration.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// SSH configuration for Linux based VMs running on Azure. + internal partial class SshConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public SshConfiguration() + { + PublicKeys = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The list of SSH public keys used to authenticate with linux based VMs. + /// Keeps track of any properties unknown to the library. + internal SshConfiguration(IList publicKeys, IDictionary serializedAdditionalRawData) + { + PublicKeys = publicKeys; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The list of SSH public keys used to authenticate with linux based VMs. + public IList PublicKeys { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SshKeyPair.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SshKeyPair.Serialization.cs new file mode 100644 index 000000000000..07a1e61003a1 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SshKeyPair.Serialization.cs @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SshKeyPair : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SshKeyPair)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(PublicKey)) + { + writer.WritePropertyName("publicKey"u8); + writer.WriteStringValue(PublicKey); + } + if (Optional.IsDefined(PrivateKey)) + { + writer.WritePropertyName("privateKey"u8); + writer.WriteStringValue(PrivateKey); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SshKeyPair IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SshKeyPair)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSshKeyPair(document.RootElement, options); + } + + internal static SshKeyPair DeserializeSshKeyPair(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string publicKey = default; + string privateKey = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("publicKey"u8)) + { + publicKey = property.Value.GetString(); + continue; + } + if (property.NameEquals("privateKey"u8)) + { + privateKey = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SshKeyPair(publicKey, privateKey, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SshKeyPair)} does not support writing '{options.Format}' format."); + } + } + + SshKeyPair IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSshKeyPair(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SshKeyPair)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SshKeyPair.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SshKeyPair.cs new file mode 100644 index 000000000000..f9d170196f73 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SshKeyPair.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The SSH Key-pair used to authenticate with the VM. The key needs to be at least 2048-bit and in ssh-rsa format. For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure](https://learn.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed). + public partial class SshKeyPair + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public SshKeyPair() + { + } + + /// Initializes a new instance of . + /// SSH public key. + /// SSH private key. + /// Keeps track of any properties unknown to the library. + internal SshKeyPair(string publicKey, string privateKey, IDictionary serializedAdditionalRawData) + { + PublicKey = publicKey; + PrivateKey = privateKey; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// SSH public key. + public string PublicKey { get; set; } + /// SSH private key. + public string PrivateKey { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SshPublicKey.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SshPublicKey.Serialization.cs new file mode 100644 index 000000000000..a2c47d6036c0 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SshPublicKey.Serialization.cs @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class SshPublicKey : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SshPublicKey)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(KeyData)) + { + writer.WritePropertyName("keyData"u8); + writer.WriteStringValue(KeyData); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SshPublicKey IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SshPublicKey)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSshPublicKey(document.RootElement, options); + } + + internal static SshPublicKey DeserializeSshPublicKey(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string keyData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("keyData"u8)) + { + keyData = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SshPublicKey(keyData, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SshPublicKey)} does not support writing '{options.Format}' format."); + } + } + + SshPublicKey IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSshPublicKey(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SshPublicKey)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SshPublicKey.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SshPublicKey.cs new file mode 100644 index 000000000000..f5eab58038c4 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/SshPublicKey.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Contains information about SSH certificate public key and the path on the Linux VM where the public key is placed. + public partial class SshPublicKey + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public SshPublicKey() + { + } + + /// Initializes a new instance of . + /// SSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa format. <br><br> For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure](https://learn.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed). + /// Keeps track of any properties unknown to the library. + internal SshPublicKey(string keyData, IDictionary serializedAdditionalRawData) + { + KeyData = keyData; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// SSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa format. <br><br> For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure](https://learn.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed). + public string KeyData { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/StartContent.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/StartContent.Serialization.cs new file mode 100644 index 000000000000..ebd9ea27d193 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/StartContent.Serialization.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class StartContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(StartContent)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(StartVm)) + { + writer.WritePropertyName("startVm"u8); + writer.WriteBooleanValue(StartVm.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + StartContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(StartContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeStartContent(document.RootElement, options); + } + + internal static StartContent DeserializeStartContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool? startVm = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("startVm"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + startVm = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new StartContent(startVm, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(StartContent)} does not support writing '{options.Format}' format."); + } + } + + StartContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeStartContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(StartContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/StartContent.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/StartContent.cs new file mode 100644 index 000000000000..c9b715489611 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/StartContent.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Start SAP instance(s) request body. + public partial class StartContent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public StartContent() + { + } + + /// Initializes a new instance of . + /// The boolean value indicates whether to start the virtual machines before starting the SAP instances. + /// Keeps track of any properties unknown to the library. + internal StartContent(bool? startVm, IDictionary serializedAdditionalRawData) + { + StartVm = startVm; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The boolean value indicates whether to start the virtual machines before starting the SAP instances. + public bool? StartVm { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/StopContent.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/StopContent.Serialization.cs new file mode 100644 index 000000000000..b64cd3e2ee3c --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/StopContent.Serialization.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class StopContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(StopContent)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(SoftStopTimeoutSeconds)) + { + writer.WritePropertyName("softStopTimeoutSeconds"u8); + writer.WriteNumberValue(SoftStopTimeoutSeconds.Value); + } + if (Optional.IsDefined(DeallocateVm)) + { + writer.WritePropertyName("deallocateVm"u8); + writer.WriteBooleanValue(DeallocateVm.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + StopContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(StopContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeStopContent(document.RootElement, options); + } + + internal static StopContent DeserializeStopContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + long? softStopTimeoutSeconds = default; + bool? deallocateVm = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("softStopTimeoutSeconds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + softStopTimeoutSeconds = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("deallocateVm"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + deallocateVm = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new StopContent(softStopTimeoutSeconds, deallocateVm, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(StopContent)} does not support writing '{options.Format}' format."); + } + } + + StopContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeStopContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(StopContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/StopContent.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/StopContent.cs new file mode 100644 index 000000000000..19f256f99e5c --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/StopContent.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Stop SAP instance(s) request body. + public partial class StopContent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public StopContent() + { + } + + /// Initializes a new instance of . + /// This parameter defines how long (in seconds) the soft shutdown waits until the RFC/HTTP clients no longer consider the server for calls with load balancing. Value 0 means that the kernel does not wait, but goes directly into the next shutdown state, i.e. hard stop. + /// The boolean value indicates whether to Stop and deallocate the virtual machines along with the SAP instances. + /// Keeps track of any properties unknown to the library. + internal StopContent(long? softStopTimeoutSeconds, bool? deallocateVm, IDictionary serializedAdditionalRawData) + { + SoftStopTimeoutSeconds = softStopTimeoutSeconds; + DeallocateVm = deallocateVm; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// This parameter defines how long (in seconds) the soft shutdown waits until the RFC/HTTP clients no longer consider the server for calls with load balancing. Value 0 means that the kernel does not wait, but goes directly into the next shutdown state, i.e. hard stop. + public long? SoftStopTimeoutSeconds { get; set; } + /// The boolean value indicates whether to Stop and deallocate the virtual machines along with the SAP instances. + public bool? DeallocateVm { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/StorageConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/StorageConfiguration.Serialization.cs new file mode 100644 index 000000000000..abf6b7f87a9d --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/StorageConfiguration.Serialization.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + internal partial class StorageConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(StorageConfiguration)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(TransportFileShareConfiguration)) + { + writer.WritePropertyName("transportFileShareConfiguration"u8); + writer.WriteObjectValue(TransportFileShareConfiguration, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + StorageConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(StorageConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeStorageConfiguration(document.RootElement, options); + } + + internal static StorageConfiguration DeserializeStorageConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + FileShareConfiguration transportFileShareConfiguration = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("transportFileShareConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + transportFileShareConfiguration = FileShareConfiguration.DeserializeFileShareConfiguration(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new StorageConfiguration(transportFileShareConfiguration, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(StorageConfiguration)} does not support writing '{options.Format}' format."); + } + } + + StorageConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeStorageConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(StorageConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/StorageConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/StorageConfiguration.cs new file mode 100644 index 000000000000..faaba7453055 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/StorageConfiguration.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Gets or sets the storage configuration. + internal partial class StorageConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public StorageConfiguration() + { + } + + /// Initializes a new instance of . + /// + /// The properties of the transport directory attached to the VIS. The default for transportFileShareConfiguration is the createAndMount flow if storage configuration is missing. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// Keeps track of any properties unknown to the library. + internal StorageConfiguration(FileShareConfiguration transportFileShareConfiguration, IDictionary serializedAdditionalRawData) + { + TransportFileShareConfiguration = transportFileShareConfiguration; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// + /// The properties of the transport directory attached to the VIS. The default for transportFileShareConfiguration is the createAndMount flow if storage configuration is missing. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public FileShareConfiguration TransportFileShareConfiguration { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierConfiguration.Serialization.cs new file mode 100644 index 000000000000..21e761756ca3 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierConfiguration.Serialization.cs @@ -0,0 +1,210 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class ThreeTierConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ThreeTierConfiguration)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(NetworkConfiguration)) + { + writer.WritePropertyName("networkConfiguration"u8); + writer.WriteObjectValue(NetworkConfiguration, options); + } + writer.WritePropertyName("centralServer"u8); + writer.WriteObjectValue(CentralServer, options); + writer.WritePropertyName("applicationServer"u8); + writer.WriteObjectValue(ApplicationServer, options); + writer.WritePropertyName("databaseServer"u8); + writer.WriteObjectValue(DatabaseServer, options); + if (Optional.IsDefined(HighAvailabilityConfig)) + { + writer.WritePropertyName("highAvailabilityConfig"u8); + writer.WriteObjectValue(HighAvailabilityConfig, options); + } + if (Optional.IsDefined(StorageConfiguration)) + { + writer.WritePropertyName("storageConfiguration"u8); + writer.WriteObjectValue(StorageConfiguration, options); + } + if (Optional.IsDefined(CustomResourceNames)) + { + writer.WritePropertyName("customResourceNames"u8); + writer.WriteObjectValue(CustomResourceNames, options); + } + } + + ThreeTierConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ThreeTierConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeThreeTierConfiguration(document.RootElement, options); + } + + internal static ThreeTierConfiguration DeserializeThreeTierConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + NetworkConfiguration networkConfiguration = default; + CentralServerConfiguration centralServer = default; + ApplicationServerConfiguration applicationServer = default; + DatabaseConfiguration databaseServer = default; + HighAvailabilityConfiguration highAvailabilityConfig = default; + StorageConfiguration storageConfiguration = default; + ThreeTierCustomResourceNames customResourceNames = default; + string appResourceGroup = default; + SapDeploymentType deploymentType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("networkConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + networkConfiguration = NetworkConfiguration.DeserializeNetworkConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("centralServer"u8)) + { + centralServer = CentralServerConfiguration.DeserializeCentralServerConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("applicationServer"u8)) + { + applicationServer = ApplicationServerConfiguration.DeserializeApplicationServerConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("databaseServer"u8)) + { + databaseServer = DatabaseConfiguration.DeserializeDatabaseConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("highAvailabilityConfig"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + highAvailabilityConfig = HighAvailabilityConfiguration.DeserializeHighAvailabilityConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("storageConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + storageConfiguration = StorageConfiguration.DeserializeStorageConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("customResourceNames"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + customResourceNames = ThreeTierCustomResourceNames.DeserializeThreeTierCustomResourceNames(property.Value, options); + continue; + } + if (property.NameEquals("appResourceGroup"u8)) + { + appResourceGroup = property.Value.GetString(); + continue; + } + if (property.NameEquals("deploymentType"u8)) + { + deploymentType = new SapDeploymentType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ThreeTierConfiguration( + appResourceGroup, + deploymentType, + serializedAdditionalRawData, + networkConfiguration, + centralServer, + applicationServer, + databaseServer, + highAvailabilityConfig, + storageConfiguration, + customResourceNames); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ThreeTierConfiguration)} does not support writing '{options.Format}' format."); + } + } + + ThreeTierConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeThreeTierConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ThreeTierConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierConfiguration.cs new file mode 100644 index 000000000000..dd9e9cc5eff0 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierConfiguration.cs @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Gets or sets the three tier SAP configuration. For prerequisites for creating the infrastructure, please see [here](https://go.microsoft.com/fwlink/?linkid=2212611&clcid=0x409). + public partial class ThreeTierConfiguration : InfrastructureConfiguration + { + /// Initializes a new instance of . + /// The application resource group where SAP system resources will be deployed. + /// The central server configuration. + /// The application server configuration. + /// The database configuration. + /// , , or is null. + public ThreeTierConfiguration(string appResourceGroup, CentralServerConfiguration centralServer, ApplicationServerConfiguration applicationServer, DatabaseConfiguration databaseServer) : base(appResourceGroup) + { + Argument.AssertNotNull(appResourceGroup, nameof(appResourceGroup)); + Argument.AssertNotNull(centralServer, nameof(centralServer)); + Argument.AssertNotNull(applicationServer, nameof(applicationServer)); + Argument.AssertNotNull(databaseServer, nameof(databaseServer)); + + CentralServer = centralServer; + ApplicationServer = applicationServer; + DatabaseServer = databaseServer; + DeploymentType = SapDeploymentType.ThreeTier; + } + + /// Initializes a new instance of . + /// The application resource group where SAP system resources will be deployed. + /// The SAP deployment type. Eg: SingleServer/ThreeTier. + /// Keeps track of any properties unknown to the library. + /// Network configuration common to all servers. + /// The central server configuration. + /// The application server configuration. + /// The database configuration. + /// The high availability configuration. + /// The storage configuration. + /// + /// The set of custom names to be used for underlying azure resources that are part of the SAP system. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + internal ThreeTierConfiguration(string appResourceGroup, SapDeploymentType deploymentType, IDictionary serializedAdditionalRawData, NetworkConfiguration networkConfiguration, CentralServerConfiguration centralServer, ApplicationServerConfiguration applicationServer, DatabaseConfiguration databaseServer, HighAvailabilityConfiguration highAvailabilityConfig, StorageConfiguration storageConfiguration, ThreeTierCustomResourceNames customResourceNames) : base(appResourceGroup, deploymentType, serializedAdditionalRawData) + { + NetworkConfiguration = networkConfiguration; + CentralServer = centralServer; + ApplicationServer = applicationServer; + DatabaseServer = databaseServer; + HighAvailabilityConfig = highAvailabilityConfig; + StorageConfiguration = storageConfiguration; + CustomResourceNames = customResourceNames; + DeploymentType = deploymentType; + } + + /// Initializes a new instance of for deserialization. + internal ThreeTierConfiguration() + { + } + + /// Network configuration common to all servers. + internal NetworkConfiguration NetworkConfiguration { get; set; } + /// Specifies whether a secondary IP address should be added to the network interface on all VMs of the SAP system being deployed. + public bool? IsSecondaryIPEnabled + { + get => NetworkConfiguration is null ? default : NetworkConfiguration.IsSecondaryIPEnabled; + set + { + if (NetworkConfiguration is null) + NetworkConfiguration = new NetworkConfiguration(); + NetworkConfiguration.IsSecondaryIPEnabled = value; + } + } + + /// The central server configuration. + public CentralServerConfiguration CentralServer { get; set; } + /// The application server configuration. + public ApplicationServerConfiguration ApplicationServer { get; set; } + /// The database configuration. + public DatabaseConfiguration DatabaseServer { get; set; } + /// The high availability configuration. + internal HighAvailabilityConfiguration HighAvailabilityConfig { get; set; } + /// The high availability type. + public SapHighAvailabilityType? HighAvailabilityType + { + get => HighAvailabilityConfig is null ? default(SapHighAvailabilityType?) : HighAvailabilityConfig.HighAvailabilityType; + set + { + HighAvailabilityConfig = value.HasValue ? new HighAvailabilityConfiguration(value.Value) : null; + } + } + + /// The storage configuration. + internal StorageConfiguration StorageConfiguration { get; set; } + /// + /// The properties of the transport directory attached to the VIS. The default for transportFileShareConfiguration is the createAndMount flow if storage configuration is missing. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public FileShareConfiguration StorageTransportFileShareConfiguration + { + get => StorageConfiguration is null ? default : StorageConfiguration.TransportFileShareConfiguration; + set + { + if (StorageConfiguration is null) + StorageConfiguration = new StorageConfiguration(); + StorageConfiguration.TransportFileShareConfiguration = value; + } + } + + /// + /// The set of custom names to be used for underlying azure resources that are part of the SAP system. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + public ThreeTierCustomResourceNames CustomResourceNames { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierCustomResourceNames.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierCustomResourceNames.Serialization.cs new file mode 100644 index 000000000000..a3151071903d --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierCustomResourceNames.Serialization.cs @@ -0,0 +1,117 @@ +// 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.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + [PersistableModelProxy(typeof(UnknownThreeTierCustomResourceNames))] + public partial class ThreeTierCustomResourceNames : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ThreeTierCustomResourceNames)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("namingPatternType"u8); + writer.WriteStringValue(NamingPatternType.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ThreeTierCustomResourceNames IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ThreeTierCustomResourceNames)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeThreeTierCustomResourceNames(document.RootElement, options); + } + + internal static ThreeTierCustomResourceNames DeserializeThreeTierCustomResourceNames(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("namingPatternType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "FullResourceName": return ThreeTierFullResourceNames.DeserializeThreeTierFullResourceNames(element, options); + } + } + return UnknownThreeTierCustomResourceNames.DeserializeUnknownThreeTierCustomResourceNames(element, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ThreeTierCustomResourceNames)} does not support writing '{options.Format}' format."); + } + } + + ThreeTierCustomResourceNames IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeThreeTierCustomResourceNames(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ThreeTierCustomResourceNames)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierCustomResourceNames.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierCustomResourceNames.cs new file mode 100644 index 000000000000..1da2eab3183d --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierCustomResourceNames.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// + /// The resource-names input to specify custom names for underlying azure resources that are part of a three tier SAP system. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + public abstract partial class ThreeTierCustomResourceNames + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + protected ThreeTierCustomResourceNames() + { + } + + /// Initializes a new instance of . + /// The pattern type to be used for resource naming. + /// Keeps track of any properties unknown to the library. + internal ThreeTierCustomResourceNames(NamingPatternType namingPatternType, IDictionary serializedAdditionalRawData) + { + NamingPatternType = namingPatternType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The pattern type to be used for resource naming. + internal NamingPatternType NamingPatternType { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierFullResourceNames.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierFullResourceNames.Serialization.cs new file mode 100644 index 000000000000..4689c06ed5b0 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierFullResourceNames.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.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class ThreeTierFullResourceNames : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ThreeTierFullResourceNames)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(CentralServer)) + { + writer.WritePropertyName("centralServer"u8); + writer.WriteObjectValue(CentralServer, options); + } + if (Optional.IsDefined(ApplicationServer)) + { + writer.WritePropertyName("applicationServer"u8); + writer.WriteObjectValue(ApplicationServer, options); + } + if (Optional.IsDefined(DatabaseServer)) + { + writer.WritePropertyName("databaseServer"u8); + writer.WriteObjectValue(DatabaseServer, options); + } + if (Optional.IsDefined(SharedStorage)) + { + writer.WritePropertyName("sharedStorage"u8); + writer.WriteObjectValue(SharedStorage, options); + } + } + + ThreeTierFullResourceNames IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ThreeTierFullResourceNames)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeThreeTierFullResourceNames(document.RootElement, options); + } + + internal static ThreeTierFullResourceNames DeserializeThreeTierFullResourceNames(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + CentralServerFullResourceNames centralServer = default; + ApplicationServerFullResourceNames applicationServer = default; + DatabaseServerFullResourceNames databaseServer = default; + SharedStorageResourceNames sharedStorage = default; + NamingPatternType namingPatternType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("centralServer"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + centralServer = CentralServerFullResourceNames.DeserializeCentralServerFullResourceNames(property.Value, options); + continue; + } + if (property.NameEquals("applicationServer"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + applicationServer = ApplicationServerFullResourceNames.DeserializeApplicationServerFullResourceNames(property.Value, options); + continue; + } + if (property.NameEquals("databaseServer"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + databaseServer = DatabaseServerFullResourceNames.DeserializeDatabaseServerFullResourceNames(property.Value, options); + continue; + } + if (property.NameEquals("sharedStorage"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sharedStorage = SharedStorageResourceNames.DeserializeSharedStorageResourceNames(property.Value, options); + continue; + } + if (property.NameEquals("namingPatternType"u8)) + { + namingPatternType = new NamingPatternType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ThreeTierFullResourceNames( + namingPatternType, + serializedAdditionalRawData, + centralServer, + applicationServer, + databaseServer, + sharedStorage); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ThreeTierFullResourceNames)} does not support writing '{options.Format}' format."); + } + } + + ThreeTierFullResourceNames IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeThreeTierFullResourceNames(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ThreeTierFullResourceNames)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierFullResourceNames.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierFullResourceNames.cs new file mode 100644 index 000000000000..30dac04bfc8d --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierFullResourceNames.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The resource name object where the specified values will be full resource names of the corresponding resources in a three tier SAP system. + public partial class ThreeTierFullResourceNames : ThreeTierCustomResourceNames + { + /// Initializes a new instance of . + public ThreeTierFullResourceNames() + { + NamingPatternType = NamingPatternType.FullResourceName; + } + + /// Initializes a new instance of . + /// The pattern type to be used for resource naming. + /// Keeps track of any properties unknown to the library. + /// The full resource names object for central server layer resources. + /// The full resource names object for application layer resources. The number of entries in this list should be equal to the number VMs to be created for application layer. + /// The full resource names object for database layer resources. The number of entries in this list should be equal to the number VMs to be created for database layer. + /// The resource names object for shared storage. + internal ThreeTierFullResourceNames(NamingPatternType namingPatternType, IDictionary serializedAdditionalRawData, CentralServerFullResourceNames centralServer, ApplicationServerFullResourceNames applicationServer, DatabaseServerFullResourceNames databaseServer, SharedStorageResourceNames sharedStorage) : base(namingPatternType, serializedAdditionalRawData) + { + CentralServer = centralServer; + ApplicationServer = applicationServer; + DatabaseServer = databaseServer; + SharedStorage = sharedStorage; + NamingPatternType = namingPatternType; + } + + /// The full resource names object for central server layer resources. + public CentralServerFullResourceNames CentralServer { get; set; } + /// The full resource names object for application layer resources. The number of entries in this list should be equal to the number VMs to be created for application layer. + public ApplicationServerFullResourceNames ApplicationServer { get; set; } + /// The full resource names object for database layer resources. The number of entries in this list should be equal to the number VMs to be created for database layer. + public DatabaseServerFullResourceNames DatabaseServer { get; set; } + /// The resource names object for shared storage. + public SharedStorageResourceNames SharedStorage { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierRecommendationResult.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierRecommendationResult.Serialization.cs new file mode 100644 index 000000000000..18c506f2f1a6 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierRecommendationResult.Serialization.cs @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class ThreeTierRecommendationResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ThreeTierRecommendationResult)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(DbVmSku)) + { + writer.WritePropertyName("dbVmSku"u8); + writer.WriteStringValue(DbVmSku); + } + if (Optional.IsDefined(DatabaseInstanceCount)) + { + writer.WritePropertyName("databaseInstanceCount"u8); + writer.WriteNumberValue(DatabaseInstanceCount.Value); + } + if (Optional.IsDefined(CentralServerVmSku)) + { + writer.WritePropertyName("centralServerVmSku"u8); + writer.WriteStringValue(CentralServerVmSku); + } + if (Optional.IsDefined(CentralServerInstanceCount)) + { + writer.WritePropertyName("centralServerInstanceCount"u8); + writer.WriteNumberValue(CentralServerInstanceCount.Value); + } + if (Optional.IsDefined(ApplicationServerVmSku)) + { + writer.WritePropertyName("applicationServerVmSku"u8); + writer.WriteStringValue(ApplicationServerVmSku); + } + if (Optional.IsDefined(ApplicationServerInstanceCount)) + { + writer.WritePropertyName("applicationServerInstanceCount"u8); + writer.WriteNumberValue(ApplicationServerInstanceCount.Value); + } + } + + ThreeTierRecommendationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ThreeTierRecommendationResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeThreeTierRecommendationResult(document.RootElement, options); + } + + internal static ThreeTierRecommendationResult DeserializeThreeTierRecommendationResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string dbVmSku = default; + long? databaseInstanceCount = default; + string centralServerVmSku = default; + long? centralServerInstanceCount = default; + string applicationServerVmSku = default; + long? applicationServerInstanceCount = default; + SapDeploymentType deploymentType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("dbVmSku"u8)) + { + dbVmSku = property.Value.GetString(); + continue; + } + if (property.NameEquals("databaseInstanceCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + databaseInstanceCount = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("centralServerVmSku"u8)) + { + centralServerVmSku = property.Value.GetString(); + continue; + } + if (property.NameEquals("centralServerInstanceCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + centralServerInstanceCount = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("applicationServerVmSku"u8)) + { + applicationServerVmSku = property.Value.GetString(); + continue; + } + if (property.NameEquals("applicationServerInstanceCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + applicationServerInstanceCount = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("deploymentType"u8)) + { + deploymentType = new SapDeploymentType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ThreeTierRecommendationResult( + deploymentType, + serializedAdditionalRawData, + dbVmSku, + databaseInstanceCount, + centralServerVmSku, + centralServerInstanceCount, + applicationServerVmSku, + applicationServerInstanceCount); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ThreeTierRecommendationResult)} does not support writing '{options.Format}' format."); + } + } + + ThreeTierRecommendationResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeThreeTierRecommendationResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ThreeTierRecommendationResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierRecommendationResult.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierRecommendationResult.cs new file mode 100644 index 000000000000..cf68c754d75d --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/ThreeTierRecommendationResult.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The recommended configuration for a three tier SAP system. + public partial class ThreeTierRecommendationResult : SapSizingRecommendationResult + { + /// Initializes a new instance of . + internal ThreeTierRecommendationResult() + { + DeploymentType = SapDeploymentType.ThreeTier; + } + + /// Initializes a new instance of . + /// The deployment type. Eg: SingleServer/ThreeTier. + /// Keeps track of any properties unknown to the library. + /// The database VM SKU. + /// The database server instance count. + /// The central server VM SKU. + /// The central server instance count. + /// The application server VM SKU. + /// The application server instance count. + internal ThreeTierRecommendationResult(SapDeploymentType deploymentType, IDictionary serializedAdditionalRawData, string dbVmSku, long? databaseInstanceCount, string centralServerVmSku, long? centralServerInstanceCount, string applicationServerVmSku, long? applicationServerInstanceCount) : base(deploymentType, serializedAdditionalRawData) + { + DbVmSku = dbVmSku; + DatabaseInstanceCount = databaseInstanceCount; + CentralServerVmSku = centralServerVmSku; + CentralServerInstanceCount = centralServerInstanceCount; + ApplicationServerVmSku = applicationServerVmSku; + ApplicationServerInstanceCount = applicationServerInstanceCount; + DeploymentType = deploymentType; + } + + /// The database VM SKU. + public string DbVmSku { get; } + /// The database server instance count. + public long? DatabaseInstanceCount { get; } + /// The central server VM SKU. + public string CentralServerVmSku { get; } + /// The central server instance count. + public long? CentralServerInstanceCount { get; } + /// The application server VM SKU. + public string ApplicationServerVmSku { get; } + /// The application server instance count. + public long? ApplicationServerInstanceCount { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownFileShareConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownFileShareConfiguration.Serialization.cs new file mode 100644 index 000000000000..306a68165137 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownFileShareConfiguration.Serialization.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + internal partial class UnknownFileShareConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FileShareConfiguration)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + FileShareConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FileShareConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFileShareConfiguration(document.RootElement, options); + } + + internal static UnknownFileShareConfiguration DeserializeUnknownFileShareConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + FileShareConfigurationType configurationType = "Unknown"; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("configurationType"u8)) + { + configurationType = new FileShareConfigurationType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownFileShareConfiguration(configurationType, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(FileShareConfiguration)} does not support writing '{options.Format}' format."); + } + } + + FileShareConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeFileShareConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FileShareConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownFileShareConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownFileShareConfiguration.cs new file mode 100644 index 000000000000..d3588642b83c --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownFileShareConfiguration.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Unknown version of FileShareConfiguration. + internal partial class UnknownFileShareConfiguration : FileShareConfiguration + { + /// Initializes a new instance of . + /// The type of file share config, eg: Mount/CreateAndMount/Skip. + /// Keeps track of any properties unknown to the library. + internal UnknownFileShareConfiguration(FileShareConfigurationType configurationType, IDictionary serializedAdditionalRawData) : base(configurationType, serializedAdditionalRawData) + { + ConfigurationType = configurationType; + } + + /// Initializes a new instance of for deserialization. + internal UnknownFileShareConfiguration() + { + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownInfrastructureConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownInfrastructureConfiguration.Serialization.cs new file mode 100644 index 000000000000..fee96cbfcace --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownInfrastructureConfiguration.Serialization.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + internal partial class UnknownInfrastructureConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InfrastructureConfiguration)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + InfrastructureConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InfrastructureConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeInfrastructureConfiguration(document.RootElement, options); + } + + internal static UnknownInfrastructureConfiguration DeserializeUnknownInfrastructureConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string appResourceGroup = default; + SapDeploymentType deploymentType = "Unknown"; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("appResourceGroup"u8)) + { + appResourceGroup = property.Value.GetString(); + continue; + } + if (property.NameEquals("deploymentType"u8)) + { + deploymentType = new SapDeploymentType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownInfrastructureConfiguration(appResourceGroup, deploymentType, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(InfrastructureConfiguration)} does not support writing '{options.Format}' format."); + } + } + + InfrastructureConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeInfrastructureConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(InfrastructureConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownInfrastructureConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownInfrastructureConfiguration.cs new file mode 100644 index 000000000000..8cd6afc1beef --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownInfrastructureConfiguration.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Unknown version of InfrastructureConfiguration. + internal partial class UnknownInfrastructureConfiguration : InfrastructureConfiguration + { + /// Initializes a new instance of . + /// The application resource group where SAP system resources will be deployed. + /// The SAP deployment type. Eg: SingleServer/ThreeTier. + /// Keeps track of any properties unknown to the library. + internal UnknownInfrastructureConfiguration(string appResourceGroup, SapDeploymentType deploymentType, IDictionary serializedAdditionalRawData) : base(appResourceGroup, deploymentType, serializedAdditionalRawData) + { + DeploymentType = deploymentType; + } + + /// Initializes a new instance of for deserialization. + internal UnknownInfrastructureConfiguration() + { + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownOSConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownOSConfiguration.Serialization.cs new file mode 100644 index 000000000000..2d665f78c8f2 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownOSConfiguration.Serialization.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + internal partial class UnknownOSConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OSConfiguration)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + OSConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OSConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeOSConfiguration(document.RootElement, options); + } + + internal static UnknownOSConfiguration DeserializeUnknownOSConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + OSType osType = "Unknown"; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("osType"u8)) + { + osType = new OSType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownOSConfiguration(osType, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(OSConfiguration)} does not support writing '{options.Format}' format."); + } + } + + OSConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeOSConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(OSConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownOSConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownOSConfiguration.cs new file mode 100644 index 000000000000..266b67037b5b --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownOSConfiguration.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Unknown version of OSConfiguration. + internal partial class UnknownOSConfiguration : OSConfiguration + { + /// Initializes a new instance of . + /// The OS Type. + /// Keeps track of any properties unknown to the library. + internal UnknownOSConfiguration(OSType osType, IDictionary serializedAdditionalRawData) : base(osType, serializedAdditionalRawData) + { + OSType = osType; + } + + /// Initializes a new instance of for deserialization. + internal UnknownOSConfiguration() + { + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSapConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSapConfiguration.Serialization.cs new file mode 100644 index 000000000000..7ffcecffdf21 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSapConfiguration.Serialization.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + internal partial class UnknownSapConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapConfiguration)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + SapConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapConfiguration(document.RootElement, options); + } + + internal static UnknownSapConfiguration DeserializeUnknownSapConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + SapConfigurationType configurationType = "Unknown"; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("configurationType"u8)) + { + configurationType = new SapConfigurationType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownSapConfiguration(configurationType, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapConfiguration)} does not support writing '{options.Format}' format."); + } + } + + SapConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSapConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSapConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSapConfiguration.cs new file mode 100644 index 000000000000..43650e6a5ae5 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSapConfiguration.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Unknown version of SapConfiguration. + internal partial class UnknownSapConfiguration : SapConfiguration + { + /// Initializes a new instance of . + /// The configuration type. Eg: Deployment/Discovery. + /// Keeps track of any properties unknown to the library. + internal UnknownSapConfiguration(SapConfigurationType configurationType, IDictionary serializedAdditionalRawData) : base(configurationType, serializedAdditionalRawData) + { + ConfigurationType = configurationType; + } + + /// Initializes a new instance of for deserialization. + internal UnknownSapConfiguration() + { + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSapSizingRecommendationResult.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSapSizingRecommendationResult.Serialization.cs new file mode 100644 index 000000000000..a6188e419bf1 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSapSizingRecommendationResult.Serialization.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + internal partial class UnknownSapSizingRecommendationResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapSizingRecommendationResult)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + SapSizingRecommendationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapSizingRecommendationResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapSizingRecommendationResult(document.RootElement, options); + } + + internal static UnknownSapSizingRecommendationResult DeserializeUnknownSapSizingRecommendationResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + SapDeploymentType deploymentType = "Unknown"; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("deploymentType"u8)) + { + deploymentType = new SapDeploymentType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownSapSizingRecommendationResult(deploymentType, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapSizingRecommendationResult)} does not support writing '{options.Format}' format."); + } + } + + SapSizingRecommendationResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSapSizingRecommendationResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapSizingRecommendationResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSapSizingRecommendationResult.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSapSizingRecommendationResult.cs new file mode 100644 index 000000000000..aed574f9819d --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSapSizingRecommendationResult.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Unknown version of SapSizingRecommendationResult. + internal partial class UnknownSapSizingRecommendationResult : SapSizingRecommendationResult + { + /// Initializes a new instance of . + /// The deployment type. Eg: SingleServer/ThreeTier. + /// Keeps track of any properties unknown to the library. + internal UnknownSapSizingRecommendationResult(SapDeploymentType deploymentType, IDictionary serializedAdditionalRawData) : base(deploymentType, serializedAdditionalRawData) + { + DeploymentType = deploymentType; + } + + /// Initializes a new instance of for deserialization. + internal UnknownSapSizingRecommendationResult() + { + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSingleServerCustomResourceNames.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSingleServerCustomResourceNames.Serialization.cs new file mode 100644 index 000000000000..22477a6d0324 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSingleServerCustomResourceNames.Serialization.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + internal partial class UnknownSingleServerCustomResourceNames : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SingleServerCustomResourceNames)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + SingleServerCustomResourceNames IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SingleServerCustomResourceNames)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSingleServerCustomResourceNames(document.RootElement, options); + } + + internal static UnknownSingleServerCustomResourceNames DeserializeUnknownSingleServerCustomResourceNames(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + NamingPatternType namingPatternType = "Unknown"; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("namingPatternType"u8)) + { + namingPatternType = new NamingPatternType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownSingleServerCustomResourceNames(namingPatternType, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SingleServerCustomResourceNames)} does not support writing '{options.Format}' format."); + } + } + + SingleServerCustomResourceNames IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSingleServerCustomResourceNames(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SingleServerCustomResourceNames)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSingleServerCustomResourceNames.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSingleServerCustomResourceNames.cs new file mode 100644 index 000000000000..ca9167a891c3 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSingleServerCustomResourceNames.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Unknown version of SingleServerCustomResourceNames. + internal partial class UnknownSingleServerCustomResourceNames : SingleServerCustomResourceNames + { + /// Initializes a new instance of . + /// The naming pattern type. + /// Keeps track of any properties unknown to the library. + internal UnknownSingleServerCustomResourceNames(NamingPatternType namingPatternType, IDictionary serializedAdditionalRawData) : base(namingPatternType, serializedAdditionalRawData) + { + NamingPatternType = namingPatternType; + } + + /// Initializes a new instance of for deserialization. + internal UnknownSingleServerCustomResourceNames() + { + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSoftwareConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSoftwareConfiguration.Serialization.cs new file mode 100644 index 000000000000..16070b96acfe --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSoftwareConfiguration.Serialization.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + internal partial class UnknownSoftwareConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SoftwareConfiguration)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + SoftwareConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SoftwareConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSoftwareConfiguration(document.RootElement, options); + } + + internal static UnknownSoftwareConfiguration DeserializeUnknownSoftwareConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + SapSoftwareInstallationType softwareInstallationType = "Unknown"; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("softwareInstallationType"u8)) + { + softwareInstallationType = new SapSoftwareInstallationType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownSoftwareConfiguration(softwareInstallationType, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SoftwareConfiguration)} does not support writing '{options.Format}' format."); + } + } + + SoftwareConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSoftwareConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SoftwareConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSoftwareConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSoftwareConfiguration.cs new file mode 100644 index 000000000000..469cfda732f1 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownSoftwareConfiguration.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Unknown version of SoftwareConfiguration. + internal partial class UnknownSoftwareConfiguration : SoftwareConfiguration + { + /// Initializes a new instance of . + /// The SAP software installation type. + /// Keeps track of any properties unknown to the library. + internal UnknownSoftwareConfiguration(SapSoftwareInstallationType softwareInstallationType, IDictionary serializedAdditionalRawData) : base(softwareInstallationType, serializedAdditionalRawData) + { + SoftwareInstallationType = softwareInstallationType; + } + + /// Initializes a new instance of for deserialization. + internal UnknownSoftwareConfiguration() + { + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownThreeTierCustomResourceNames.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownThreeTierCustomResourceNames.Serialization.cs new file mode 100644 index 000000000000..b1c34a687545 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownThreeTierCustomResourceNames.Serialization.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + internal partial class UnknownThreeTierCustomResourceNames : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ThreeTierCustomResourceNames)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + ThreeTierCustomResourceNames IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ThreeTierCustomResourceNames)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeThreeTierCustomResourceNames(document.RootElement, options); + } + + internal static UnknownThreeTierCustomResourceNames DeserializeUnknownThreeTierCustomResourceNames(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + NamingPatternType namingPatternType = "Unknown"; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("namingPatternType"u8)) + { + namingPatternType = new NamingPatternType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownThreeTierCustomResourceNames(namingPatternType, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ThreeTierCustomResourceNames)} does not support writing '{options.Format}' format."); + } + } + + ThreeTierCustomResourceNames IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeThreeTierCustomResourceNames(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ThreeTierCustomResourceNames)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownThreeTierCustomResourceNames.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownThreeTierCustomResourceNames.cs new file mode 100644 index 000000000000..35ac6ef0a5f0 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UnknownThreeTierCustomResourceNames.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Unknown version of ThreeTierCustomResourceNames. + internal partial class UnknownThreeTierCustomResourceNames : ThreeTierCustomResourceNames + { + /// Initializes a new instance of . + /// The pattern type to be used for resource naming. + /// Keeps track of any properties unknown to the library. + internal UnknownThreeTierCustomResourceNames(NamingPatternType namingPatternType, IDictionary serializedAdditionalRawData) : base(namingPatternType, serializedAdditionalRawData) + { + NamingPatternType = namingPatternType; + } + + /// Initializes a new instance of for deserialization. + internal UnknownThreeTierCustomResourceNames() + { + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UpdateSapVirtualInstanceProperties.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UpdateSapVirtualInstanceProperties.Serialization.cs new file mode 100644 index 000000000000..6bfe5e1690a0 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UpdateSapVirtualInstanceProperties.Serialization.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + internal partial class UpdateSapVirtualInstanceProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(UpdateSapVirtualInstanceProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(ManagedResourcesNetworkAccessType)) + { + writer.WritePropertyName("managedResourcesNetworkAccessType"u8); + writer.WriteStringValue(ManagedResourcesNetworkAccessType.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + UpdateSapVirtualInstanceProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(UpdateSapVirtualInstanceProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeUpdateSapVirtualInstanceProperties(document.RootElement, options); + } + + internal static UpdateSapVirtualInstanceProperties DeserializeUpdateSapVirtualInstanceProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ManagedResourcesNetworkAccessType? managedResourcesNetworkAccessType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("managedResourcesNetworkAccessType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + managedResourcesNetworkAccessType = new ManagedResourcesNetworkAccessType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UpdateSapVirtualInstanceProperties(managedResourcesNetworkAccessType, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(UpdateSapVirtualInstanceProperties)} does not support writing '{options.Format}' format."); + } + } + + UpdateSapVirtualInstanceProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeUpdateSapVirtualInstanceProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(UpdateSapVirtualInstanceProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UpdateSapVirtualInstanceProperties.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UpdateSapVirtualInstanceProperties.cs new file mode 100644 index 000000000000..5a311122d9de --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/UpdateSapVirtualInstanceProperties.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the update request body properties for updating Virtual Instance for SAP. + internal partial class UpdateSapVirtualInstanceProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public UpdateSapVirtualInstanceProperties() + { + } + + /// Initializes a new instance of . + /// Specifies the network access configuration for the resources that will be deployed in the Managed Resource Group. The options to choose from are Public and Private. If 'Private' is chosen, the Storage Account service tag should be enabled on the subnets in which the SAP VMs exist. This is required for establishing connectivity between VM extensions and the managed resource group storage account. This setting is currently applicable only to Storage Account. Learn more here https://go.microsoft.com/fwlink/?linkid=2247228. + /// Keeps track of any properties unknown to the library. + internal UpdateSapVirtualInstanceProperties(ManagedResourcesNetworkAccessType? managedResourcesNetworkAccessType, IDictionary serializedAdditionalRawData) + { + ManagedResourcesNetworkAccessType = managedResourcesNetworkAccessType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Specifies the network access configuration for the resources that will be deployed in the Managed Resource Group. The options to choose from are Public and Private. If 'Private' is chosen, the Storage Account service tag should be enabled on the subnets in which the SAP VMs exist. This is required for establishing connectivity between VM extensions and the managed resource group storage account. This setting is currently applicable only to Storage Account. Learn more here https://go.microsoft.com/fwlink/?linkid=2247228. + public ManagedResourcesNetworkAccessType? ManagedResourcesNetworkAccessType { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/VirtualMachineConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/VirtualMachineConfiguration.Serialization.cs new file mode 100644 index 000000000000..7b2554bf1403 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/VirtualMachineConfiguration.Serialization.cs @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class VirtualMachineConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(VirtualMachineConfiguration)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("vmSize"u8); + writer.WriteStringValue(VmSize); + writer.WritePropertyName("imageReference"u8); + writer.WriteObjectValue(ImageReference, options); + writer.WritePropertyName("osProfile"u8); + writer.WriteObjectValue(OSProfile, options); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + VirtualMachineConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(VirtualMachineConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeVirtualMachineConfiguration(document.RootElement, options); + } + + internal static VirtualMachineConfiguration DeserializeVirtualMachineConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string vmSize = default; + ImageReference imageReference = default; + OSProfile osProfile = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("vmSize"u8)) + { + vmSize = property.Value.GetString(); + continue; + } + if (property.NameEquals("imageReference"u8)) + { + imageReference = ImageReference.DeserializeImageReference(property.Value, options); + continue; + } + if (property.NameEquals("osProfile"u8)) + { + osProfile = OSProfile.DeserializeOSProfile(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new VirtualMachineConfiguration(vmSize, imageReference, osProfile, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(VirtualMachineConfiguration)} does not support writing '{options.Format}' format."); + } + } + + VirtualMachineConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeVirtualMachineConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(VirtualMachineConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/VirtualMachineConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/VirtualMachineConfiguration.cs new file mode 100644 index 000000000000..7292e4ec577f --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/VirtualMachineConfiguration.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; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Defines the virtual machine configuration. + public partial class VirtualMachineConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The virtual machine size. + /// The image reference. + /// The OS profile. + /// , or is null. + public VirtualMachineConfiguration(string vmSize, ImageReference imageReference, OSProfile osProfile) + { + Argument.AssertNotNull(vmSize, nameof(vmSize)); + Argument.AssertNotNull(imageReference, nameof(imageReference)); + Argument.AssertNotNull(osProfile, nameof(osProfile)); + + VmSize = vmSize; + ImageReference = imageReference; + OSProfile = osProfile; + } + + /// Initializes a new instance of . + /// The virtual machine size. + /// The image reference. + /// The OS profile. + /// Keeps track of any properties unknown to the library. + internal VirtualMachineConfiguration(string vmSize, ImageReference imageReference, OSProfile osProfile, IDictionary serializedAdditionalRawData) + { + VmSize = vmSize; + ImageReference = imageReference; + OSProfile = osProfile; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal VirtualMachineConfiguration() + { + } + + /// The virtual machine size. + public string VmSize { get; set; } + /// The image reference. + public ImageReference ImageReference { get; set; } + /// The OS profile. + public OSProfile OSProfile { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/VirtualMachineResourceNames.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/VirtualMachineResourceNames.Serialization.cs new file mode 100644 index 000000000000..7b9bf7a0a2b2 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/VirtualMachineResourceNames.Serialization.cs @@ -0,0 +1,230 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class VirtualMachineResourceNames : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(VirtualMachineResourceNames)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(VmName)) + { + writer.WritePropertyName("vmName"u8); + writer.WriteStringValue(VmName); + } + if (Optional.IsDefined(HostName)) + { + writer.WritePropertyName("hostName"u8); + writer.WriteStringValue(HostName); + } + if (Optional.IsCollectionDefined(NetworkInterfaces)) + { + writer.WritePropertyName("networkInterfaces"u8); + writer.WriteStartArray(); + foreach (var item in NetworkInterfaces) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(OSDiskName)) + { + writer.WritePropertyName("osDiskName"u8); + writer.WriteStringValue(OSDiskName); + } + if (Optional.IsCollectionDefined(DataDiskNames)) + { + writer.WritePropertyName("dataDiskNames"u8); + writer.WriteStartObject(); + foreach (var item in DataDiskNames) + { + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } + writer.WriteStartArray(); + foreach (var item0 in item.Value) + { + writer.WriteStringValue(item0); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + VirtualMachineResourceNames IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(VirtualMachineResourceNames)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeVirtualMachineResourceNames(document.RootElement, options); + } + + internal static VirtualMachineResourceNames DeserializeVirtualMachineResourceNames(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string vmName = default; + string hostName = default; + IList networkInterfaces = default; + string osDiskName = default; + IDictionary> dataDiskNames = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("vmName"u8)) + { + vmName = property.Value.GetString(); + continue; + } + if (property.NameEquals("hostName"u8)) + { + hostName = property.Value.GetString(); + continue; + } + if (property.NameEquals("networkInterfaces"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(NetworkInterfaceResourceNames.DeserializeNetworkInterfaceResourceNames(item, options)); + } + networkInterfaces = array; + continue; + } + if (property.NameEquals("osDiskName"u8)) + { + osDiskName = property.Value.GetString(); + continue; + } + if (property.NameEquals("dataDiskNames"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary> dictionary = new Dictionary>(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + dictionary.Add(property0.Name, array); + } + } + dataDiskNames = dictionary; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new VirtualMachineResourceNames( + vmName, + hostName, + networkInterfaces ?? new ChangeTrackingList(), + osDiskName, + dataDiskNames ?? new ChangeTrackingDictionary>(), + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(VirtualMachineResourceNames)} does not support writing '{options.Format}' format."); + } + } + + VirtualMachineResourceNames IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeVirtualMachineResourceNames(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(VirtualMachineResourceNames)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/VirtualMachineResourceNames.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/VirtualMachineResourceNames.cs new file mode 100644 index 000000000000..f1e4d4439a2a --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/VirtualMachineResourceNames.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// The resource names object for virtual machine and related resources. + public partial class VirtualMachineResourceNames + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public VirtualMachineResourceNames() + { + NetworkInterfaces = new ChangeTrackingList(); + DataDiskNames = new ChangeTrackingDictionary>(); + } + + /// Initializes a new instance of . + /// The full name for virtual machine. The length of this field can be upto 64 characters. If name is not provided, service uses a default name based on the deployment type. For SingleServer, default name is {SID}vm. In case of HA-AvZone systems, default name will be {SID}{app/ascs/db}z{a/b}vm with an incrementor at the end in case of more than 1 vm per layer. For distributed and HA-AvSet systems, default name will be {SID}{app/ascs/db}vm with an incrementor at the end in case of more than 1 vm per layer. + /// The full name for virtual-machine's host (computer name). Currently, ACSS only supports host names which are less than or equal to 13 characters long. If this value is not provided, vmName will be used as host name. + /// The list of network interface name objects for the selected virtual machine. Currently, only one network interface is supported per virtual machine. + /// The full name for OS disk attached to the VM. If this value is not provided, it will be named by ARM as per its default naming standards (prefixed with vm name). There is only one OS disk attached per Virtual Machine. + /// The full resource names for virtual machine data disks. This is a dictionary containing list of names of data disks per volume. Currently supported volumes for database layer are ['hana/data', 'hana/log', hana/shared', 'usr/sap', 'os', 'backup']. For application and cs layers, only 'default' volume is supported. + /// Keeps track of any properties unknown to the library. + internal VirtualMachineResourceNames(string vmName, string hostName, IList networkInterfaces, string osDiskName, IDictionary> dataDiskNames, IDictionary serializedAdditionalRawData) + { + VmName = vmName; + HostName = hostName; + NetworkInterfaces = networkInterfaces; + OSDiskName = osDiskName; + DataDiskNames = dataDiskNames; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The full name for virtual machine. The length of this field can be upto 64 characters. If name is not provided, service uses a default name based on the deployment type. For SingleServer, default name is {SID}vm. In case of HA-AvZone systems, default name will be {SID}{app/ascs/db}z{a/b}vm with an incrementor at the end in case of more than 1 vm per layer. For distributed and HA-AvSet systems, default name will be {SID}{app/ascs/db}vm with an incrementor at the end in case of more than 1 vm per layer. + public string VmName { get; set; } + /// The full name for virtual-machine's host (computer name). Currently, ACSS only supports host names which are less than or equal to 13 characters long. If this value is not provided, vmName will be used as host name. + public string HostName { get; set; } + /// The list of network interface name objects for the selected virtual machine. Currently, only one network interface is supported per virtual machine. + public IList NetworkInterfaces { get; } + /// The full name for OS disk attached to the VM. If this value is not provided, it will be named by ARM as per its default naming standards (prefixed with vm name). There is only one OS disk attached per Virtual Machine. + public string OSDiskName { get; set; } + /// The full resource names for virtual machine data disks. This is a dictionary containing list of names of data disks per volume. Currently supported volumes for database layer are ['hana/data', 'hana/log', hana/shared', 'usr/sap', 'os', 'backup']. For application and cs layers, only 'default' volume is supported. + public IDictionary> DataDiskNames { get; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/WindowsConfiguration.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/WindowsConfiguration.Serialization.cs new file mode 100644 index 000000000000..9561d76734d4 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/WindowsConfiguration.Serialization.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + public partial class WindowsConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WindowsConfiguration)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + WindowsConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(WindowsConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeWindowsConfiguration(document.RootElement, options); + } + + internal static WindowsConfiguration DeserializeWindowsConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + OSType osType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("osType"u8)) + { + osType = new OSType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new WindowsConfiguration(osType, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(WindowsConfiguration)} does not support writing '{options.Format}' format."); + } + } + + WindowsConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeWindowsConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(WindowsConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/WindowsConfiguration.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/WindowsConfiguration.cs new file mode 100644 index 000000000000..55729d7198eb --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/Models/WindowsConfiguration.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SapVirtualInstances.Models +{ + /// Specifies Windows operating system settings on the virtual machine. + public partial class WindowsConfiguration : OSConfiguration + { + /// Initializes a new instance of . + public WindowsConfiguration() + { + OSType = OSType.Windows; + } + + /// Initializes a new instance of . + /// The OS Type. + /// Keeps track of any properties unknown to the library. + internal WindowsConfiguration(OSType osType, IDictionary serializedAdditionalRawData) : base(osType, serializedAdditionalRawData) + { + OSType = osType; + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/ProviderConstants.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/ProviderConstants.cs new file mode 100644 index 000000000000..c33e111ebe5c --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/ProviderConstants.cs @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + internal static class ProviderConstants + { + public static string DefaultProviderNamespace { get; } = ClientDiagnostics.GetResourceProviderNamespace(typeof(ProviderConstants).Assembly); + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/RestOperations/SapApplicationServerInstancesRestOperations.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/RestOperations/SapApplicationServerInstancesRestOperations.cs new file mode 100644 index 000000000000..20334b33da48 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/RestOperations/SapApplicationServerInstancesRestOperations.cs @@ -0,0 +1,827 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.SapVirtualInstances.Models; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + internal partial class SapApplicationServerInstancesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of SapApplicationServerInstancesRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public SapApplicationServerInstancesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2024-09-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string applicationInstanceName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/applicationInstances/", false); + uri.AppendPath(applicationInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string applicationInstanceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/applicationInstances/", false); + uri.AppendPath(applicationInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the SAP Application Server Instance corresponding to the Virtual Instance for SAP solutions resource. + /// 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 Virtual Instances for SAP solutions resource. + /// The name of SAP Application Server instance resource. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string applicationInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(applicationInstanceName, nameof(applicationInstanceName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, applicationInstanceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SapApplicationServerInstanceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SapApplicationServerInstanceData.DeserializeSapApplicationServerInstanceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((SapApplicationServerInstanceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the SAP Application Server Instance corresponding to the Virtual Instance for SAP solutions resource. + /// 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 Virtual Instances for SAP solutions resource. + /// The name of SAP Application Server instance resource. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string applicationInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(applicationInstanceName, nameof(applicationInstanceName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, applicationInstanceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SapApplicationServerInstanceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SapApplicationServerInstanceData.DeserializeSapApplicationServerInstanceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((SapApplicationServerInstanceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string applicationInstanceName, SapApplicationServerInstanceData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/applicationInstances/", false); + uri.AppendPath(applicationInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string applicationInstanceName, SapApplicationServerInstanceData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/applicationInstances/", false); + uri.AppendPath(applicationInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Puts the SAP Application Server Instance resource. <br><br>This will be used by service only. PUT by end user will return a Bad Request error. + /// 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 Virtual Instances for SAP solutions resource. + /// The name of SAP Application Server instance resource. + /// The SAP Application Server Instance resource request body. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateAsync(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string applicationInstanceName, SapApplicationServerInstanceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(applicationInstanceName, nameof(applicationInstanceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, applicationInstanceName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Puts the SAP Application Server Instance resource. <br><br>This will be used by service only. PUT by end user will return a Bad Request error. + /// 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 Virtual Instances for SAP solutions resource. + /// The name of SAP Application Server instance resource. + /// The SAP Application Server Instance resource request body. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Create(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string applicationInstanceName, SapApplicationServerInstanceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(applicationInstanceName, nameof(applicationInstanceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, applicationInstanceName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string applicationInstanceName, SapApplicationServerInstancePatch patch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/applicationInstances/", false); + uri.AppendPath(applicationInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string applicationInstanceName, SapApplicationServerInstancePatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/applicationInstances/", false); + uri.AppendPath(applicationInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Puts the SAP Application Server Instance resource. + /// 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 Virtual Instances for SAP solutions resource. + /// The name of SAP Application Server instance resource. + /// The SAP Application Server Instance resource request body. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> UpdateAsync(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string applicationInstanceName, SapApplicationServerInstancePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(applicationInstanceName, nameof(applicationInstanceName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, applicationInstanceName, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SapApplicationServerInstanceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SapApplicationServerInstanceData.DeserializeSapApplicationServerInstanceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Puts the SAP Application Server Instance resource. + /// 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 Virtual Instances for SAP solutions resource. + /// The name of SAP Application Server instance resource. + /// The SAP Application Server Instance resource request body. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string applicationInstanceName, SapApplicationServerInstancePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(applicationInstanceName, nameof(applicationInstanceName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, applicationInstanceName, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SapApplicationServerInstanceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SapApplicationServerInstanceData.DeserializeSapApplicationServerInstanceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string applicationInstanceName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/applicationInstances/", false); + uri.AppendPath(applicationInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string applicationInstanceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/applicationInstances/", false); + uri.AppendPath(applicationInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes the SAP Application Server Instance resource. <br><br>This operation will be used by service only. Delete by end user will return a Bad Request error. + /// 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 Virtual Instances for SAP solutions resource. + /// The name of SAP Application Server instance resource. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string applicationInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(applicationInstanceName, nameof(applicationInstanceName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, applicationInstanceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Deletes the SAP Application Server Instance resource. <br><br>This operation will be used by service only. Delete by end user will return a Bad Request error. + /// 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 Virtual Instances for SAP solutions resource. + /// The name of SAP Application Server instance resource. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string applicationInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(applicationInstanceName, nameof(applicationInstanceName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, applicationInstanceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/applicationInstances", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/applicationInstances", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists the SAP Application Server Instance resources for a given Virtual Instance for SAP solutions resource. + /// 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 Virtual Instances for SAP solutions resource. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SAPApplicationServerInstanceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SAPApplicationServerInstanceListResult.DeserializeSAPApplicationServerInstanceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists the SAP Application Server Instance resources for a given Virtual Instance for SAP solutions resource. + /// 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 Virtual Instances for SAP solutions resource. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SAPApplicationServerInstanceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SAPApplicationServerInstanceListResult.DeserializeSAPApplicationServerInstanceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateStartRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string applicationInstanceName, StartContent content) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/applicationInstances/", false); + uri.AppendPath(applicationInstanceName, true); + uri.AppendPath("/start", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateStartRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string applicationInstanceName, StartContent content) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/applicationInstances/", false); + uri.AppendPath(applicationInstanceName, true); + uri.AppendPath("/start", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + if (content != null) + { + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; + } + _userAgent.Apply(message); + return message; + } + + /// Starts the SAP Application Server Instance. + /// 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 Virtual Instances for SAP solutions resource. + /// The name of SAP Application Server instance resource. + /// SAP Application server instance start request body. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task StartAsync(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string applicationInstanceName, StartContent content = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(applicationInstanceName, nameof(applicationInstanceName)); + + using var message = CreateStartRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, applicationInstanceName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Starts the SAP Application Server Instance. + /// 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 Virtual Instances for SAP solutions resource. + /// The name of SAP Application Server instance resource. + /// SAP Application server instance start request body. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Start(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string applicationInstanceName, StartContent content = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(applicationInstanceName, nameof(applicationInstanceName)); + + using var message = CreateStartRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, applicationInstanceName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateStopRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string applicationInstanceName, StopContent content) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/applicationInstances/", false); + uri.AppendPath(applicationInstanceName, true); + uri.AppendPath("/stop", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateStopRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string applicationInstanceName, StopContent content) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/applicationInstances/", false); + uri.AppendPath(applicationInstanceName, true); + uri.AppendPath("/stop", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + if (content != null) + { + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; + } + _userAgent.Apply(message); + return message; + } + + /// Stops the SAP Application Server Instance. + /// 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 Virtual Instances for SAP solutions resource. + /// The name of SAP Application Server instance resource. + /// SAP Application server instance stop request body. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task StopAsync(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string applicationInstanceName, StopContent content = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(applicationInstanceName, nameof(applicationInstanceName)); + + using var message = CreateStopRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, applicationInstanceName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Stops the SAP Application Server Instance. + /// 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 Virtual Instances for SAP solutions resource. + /// The name of SAP Application Server instance resource. + /// SAP Application server instance stop request body. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Stop(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string applicationInstanceName, StopContent content = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(applicationInstanceName, nameof(applicationInstanceName)); + + using var message = CreateStopRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, applicationInstanceName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string sapVirtualInstanceName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string sapVirtualInstanceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists the SAP Application Server Instance resources for a given Virtual Instance for SAP solutions resource. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, sapVirtualInstanceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SAPApplicationServerInstanceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SAPApplicationServerInstanceListResult.DeserializeSAPApplicationServerInstanceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists the SAP Application Server Instance resources for a given Virtual Instance for SAP solutions resource. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, sapVirtualInstanceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SAPApplicationServerInstanceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SAPApplicationServerInstanceListResult.DeserializeSAPApplicationServerInstanceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/RestOperations/SapCentralServerInstancesRestOperations.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/RestOperations/SapCentralServerInstancesRestOperations.cs new file mode 100644 index 000000000000..bb6d957e0fde --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/RestOperations/SapCentralServerInstancesRestOperations.cs @@ -0,0 +1,827 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.SapVirtualInstances.Models; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + internal partial class SapCentralServerInstancesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of SapCentralServerInstancesRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public SapCentralServerInstancesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2024-09-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string centralInstanceName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/centralInstances/", false); + uri.AppendPath(centralInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string centralInstanceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/centralInstances/", false); + uri.AppendPath(centralInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the SAP Central Services Instance resource. + /// 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 Virtual Instances for SAP solutions resource. + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string centralInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(centralInstanceName, nameof(centralInstanceName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, centralInstanceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SapCentralServerInstanceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SapCentralServerInstanceData.DeserializeSapCentralServerInstanceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((SapCentralServerInstanceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the SAP Central Services Instance resource. + /// 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 Virtual Instances for SAP solutions resource. + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string centralInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(centralInstanceName, nameof(centralInstanceName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, centralInstanceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SapCentralServerInstanceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SapCentralServerInstanceData.DeserializeSapCentralServerInstanceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((SapCentralServerInstanceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string centralInstanceName, SapCentralServerInstanceData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/centralInstances/", false); + uri.AppendPath(centralInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string centralInstanceName, SapCentralServerInstanceData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/centralInstances/", false); + uri.AppendPath(centralInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates the SAP Central Services Instance resource. <br><br>This will be used by service only. PUT operation on this resource by end user will return a Bad Request error. + /// 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 Virtual Instances for SAP solutions resource. + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. + /// The SAP Central Services Instance request body. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateAsync(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string centralInstanceName, SapCentralServerInstanceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(centralInstanceName, nameof(centralInstanceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, centralInstanceName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates the SAP Central Services Instance resource. <br><br>This will be used by service only. PUT operation on this resource by end user will return a Bad Request error. + /// 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 Virtual Instances for SAP solutions resource. + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. + /// The SAP Central Services Instance request body. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Create(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string centralInstanceName, SapCentralServerInstanceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(centralInstanceName, nameof(centralInstanceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, centralInstanceName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string centralInstanceName, SapCentralServerInstancePatch patch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/centralInstances/", false); + uri.AppendPath(centralInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string centralInstanceName, SapCentralServerInstancePatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/centralInstances/", false); + uri.AppendPath(centralInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Updates the SAP Central Services Instance resource. <br><br>This can be used to update tags on the resource. + /// 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 Virtual Instances for SAP solutions resource. + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. + /// The SAP Central Services Instance resource request body. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> UpdateAsync(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string centralInstanceName, SapCentralServerInstancePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(centralInstanceName, nameof(centralInstanceName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, centralInstanceName, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SapCentralServerInstanceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SapCentralServerInstanceData.DeserializeSapCentralServerInstanceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Updates the SAP Central Services Instance resource. <br><br>This can be used to update tags on the resource. + /// 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 Virtual Instances for SAP solutions resource. + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. + /// The SAP Central Services Instance resource request body. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string centralInstanceName, SapCentralServerInstancePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(centralInstanceName, nameof(centralInstanceName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, centralInstanceName, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SapCentralServerInstanceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SapCentralServerInstanceData.DeserializeSapCentralServerInstanceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string centralInstanceName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/centralInstances/", false); + uri.AppendPath(centralInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string centralInstanceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/centralInstances/", false); + uri.AppendPath(centralInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes the SAP Central Services Instance resource. <br><br>This will be used by service only. Delete operation on this resource by end user will return a Bad Request error. You can delete the parent resource, which is the Virtual Instance for SAP solutions resource, using the delete operation on it. + /// 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 Virtual Instances for SAP solutions resource. + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string centralInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(centralInstanceName, nameof(centralInstanceName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, centralInstanceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Deletes the SAP Central Services Instance resource. <br><br>This will be used by service only. Delete operation on this resource by end user will return a Bad Request error. You can delete the parent resource, which is the Virtual Instance for SAP solutions resource, using the delete operation on it. + /// 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 Virtual Instances for SAP solutions resource. + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string centralInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(centralInstanceName, nameof(centralInstanceName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, centralInstanceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/centralInstances", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/centralInstances", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists the SAP Central Services Instance resource for the given Virtual Instance for SAP solutions resource. + /// 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 Virtual Instances for SAP solutions resource. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SAPCentralServerInstanceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SAPCentralServerInstanceListResult.DeserializeSAPCentralServerInstanceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists the SAP Central Services Instance resource for the given Virtual Instance for SAP solutions resource. + /// 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 Virtual Instances for SAP solutions resource. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SAPCentralServerInstanceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SAPCentralServerInstanceListResult.DeserializeSAPCentralServerInstanceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateStartRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string centralInstanceName, StartContent content) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/centralInstances/", false); + uri.AppendPath(centralInstanceName, true); + uri.AppendPath("/start", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateStartRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string centralInstanceName, StartContent content) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/centralInstances/", false); + uri.AppendPath(centralInstanceName, true); + uri.AppendPath("/start", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + if (content != null) + { + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; + } + _userAgent.Apply(message); + return message; + } + + /// Starts the SAP Central Services Instance. + /// 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 Virtual Instances for SAP solutions resource. + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. + /// SAP Central Services instance start request body. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task StartAsync(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string centralInstanceName, StartContent content = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(centralInstanceName, nameof(centralInstanceName)); + + using var message = CreateStartRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, centralInstanceName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Starts the SAP Central Services Instance. + /// 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 Virtual Instances for SAP solutions resource. + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. + /// SAP Central Services instance start request body. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Start(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string centralInstanceName, StartContent content = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(centralInstanceName, nameof(centralInstanceName)); + + using var message = CreateStartRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, centralInstanceName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateStopRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string centralInstanceName, StopContent content) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/centralInstances/", false); + uri.AppendPath(centralInstanceName, true); + uri.AppendPath("/stop", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateStopRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string centralInstanceName, StopContent content) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/centralInstances/", false); + uri.AppendPath(centralInstanceName, true); + uri.AppendPath("/stop", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + if (content != null) + { + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; + } + _userAgent.Apply(message); + return message; + } + + /// Stops the SAP Central Services Instance. + /// 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 Virtual Instances for SAP solutions resource. + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. + /// SAP Central Services instance stop request body. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task StopAsync(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string centralInstanceName, StopContent content = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(centralInstanceName, nameof(centralInstanceName)); + + using var message = CreateStopRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, centralInstanceName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Stops the SAP Central Services Instance. + /// 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 Virtual Instances for SAP solutions resource. + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. + /// SAP Central Services instance stop request body. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Stop(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string centralInstanceName, StopContent content = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(centralInstanceName, nameof(centralInstanceName)); + + using var message = CreateStopRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, centralInstanceName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string sapVirtualInstanceName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string sapVirtualInstanceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists the SAP Central Services Instance resource for the given Virtual Instance for SAP solutions resource. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, sapVirtualInstanceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SAPCentralServerInstanceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SAPCentralServerInstanceListResult.DeserializeSAPCentralServerInstanceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists the SAP Central Services Instance resource for the given Virtual Instance for SAP solutions resource. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, sapVirtualInstanceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SAPCentralServerInstanceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SAPCentralServerInstanceListResult.DeserializeSAPCentralServerInstanceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/RestOperations/SapDatabaseInstancesRestOperations.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/RestOperations/SapDatabaseInstancesRestOperations.cs new file mode 100644 index 000000000000..d0049a10de25 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/RestOperations/SapDatabaseInstancesRestOperations.cs @@ -0,0 +1,827 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.SapVirtualInstances.Models; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + internal partial class SapDatabaseInstancesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of SapDatabaseInstancesRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public SapDatabaseInstancesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2024-09-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string databaseInstanceName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/databaseInstances/", false); + uri.AppendPath(databaseInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string databaseInstanceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/databaseInstances/", false); + uri.AppendPath(databaseInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the SAP Database Instance resource. + /// 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 Virtual Instances for SAP solutions resource. + /// Database resource name string modeled as parameter for auto generation to work correctly. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string databaseInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(databaseInstanceName, nameof(databaseInstanceName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, databaseInstanceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SapDatabaseInstanceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SapDatabaseInstanceData.DeserializeSapDatabaseInstanceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((SapDatabaseInstanceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the SAP Database Instance resource. + /// 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 Virtual Instances for SAP solutions resource. + /// Database resource name string modeled as parameter for auto generation to work correctly. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string databaseInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(databaseInstanceName, nameof(databaseInstanceName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, databaseInstanceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SapDatabaseInstanceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SapDatabaseInstanceData.DeserializeSapDatabaseInstanceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((SapDatabaseInstanceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string databaseInstanceName, SapDatabaseInstanceData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/databaseInstances/", false); + uri.AppendPath(databaseInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string databaseInstanceName, SapDatabaseInstanceData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/databaseInstances/", false); + uri.AppendPath(databaseInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates the Database resource corresponding to the Virtual Instance for SAP solutions resource. <br><br>This will be used by service only. PUT by end user will return a Bad Request error. + /// 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 Virtual Instances for SAP solutions resource. + /// Database resource name string modeled as parameter for auto generation to work correctly. + /// Request body of Database resource of a SAP system. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateAsync(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string databaseInstanceName, SapDatabaseInstanceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(databaseInstanceName, nameof(databaseInstanceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, databaseInstanceName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates the Database resource corresponding to the Virtual Instance for SAP solutions resource. <br><br>This will be used by service only. PUT by end user will return a Bad Request error. + /// 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 Virtual Instances for SAP solutions resource. + /// Database resource name string modeled as parameter for auto generation to work correctly. + /// Request body of Database resource of a SAP system. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Create(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string databaseInstanceName, SapDatabaseInstanceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(databaseInstanceName, nameof(databaseInstanceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, databaseInstanceName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string databaseInstanceName, SapDatabaseInstancePatch patch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/databaseInstances/", false); + uri.AppendPath(databaseInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string databaseInstanceName, SapDatabaseInstancePatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/databaseInstances/", false); + uri.AppendPath(databaseInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Updates the Database resource. + /// 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 Virtual Instances for SAP solutions resource. + /// Database resource name string modeled as parameter for auto generation to work correctly. + /// Database resource update request body. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> UpdateAsync(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string databaseInstanceName, SapDatabaseInstancePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(databaseInstanceName, nameof(databaseInstanceName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, databaseInstanceName, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SapDatabaseInstanceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SapDatabaseInstanceData.DeserializeSapDatabaseInstanceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Updates the Database resource. + /// 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 Virtual Instances for SAP solutions resource. + /// Database resource name string modeled as parameter for auto generation to work correctly. + /// Database resource update request body. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string databaseInstanceName, SapDatabaseInstancePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(databaseInstanceName, nameof(databaseInstanceName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, databaseInstanceName, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SapDatabaseInstanceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SapDatabaseInstanceData.DeserializeSapDatabaseInstanceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string databaseInstanceName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/databaseInstances/", false); + uri.AppendPath(databaseInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string databaseInstanceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/databaseInstances/", false); + uri.AppendPath(databaseInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes the Database resource corresponding to a Virtual Instance for SAP solutions resource. <br><br>This will be used by service only. Delete by end user will return a Bad Request error. + /// 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 Virtual Instances for SAP solutions resource. + /// Database resource name string modeled as parameter for auto generation to work correctly. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string databaseInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(databaseInstanceName, nameof(databaseInstanceName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, databaseInstanceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Deletes the Database resource corresponding to a Virtual Instance for SAP solutions resource. <br><br>This will be used by service only. Delete by end user will return a Bad Request error. + /// 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 Virtual Instances for SAP solutions resource. + /// Database resource name string modeled as parameter for auto generation to work correctly. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string databaseInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(databaseInstanceName, nameof(databaseInstanceName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, databaseInstanceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/databaseInstances", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/databaseInstances", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists the Database resources associated with a Virtual Instance for SAP solutions resource. + /// 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 Virtual Instances for SAP solutions resource. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SAPDatabaseInstanceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SAPDatabaseInstanceListResult.DeserializeSAPDatabaseInstanceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists the Database resources associated with a Virtual Instance for SAP solutions resource. + /// 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 Virtual Instances for SAP solutions resource. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SAPDatabaseInstanceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SAPDatabaseInstanceListResult.DeserializeSAPDatabaseInstanceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateStartRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string databaseInstanceName, StartContent content) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/databaseInstances/", false); + uri.AppendPath(databaseInstanceName, true); + uri.AppendPath("/start", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateStartRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string databaseInstanceName, StartContent content) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/databaseInstances/", false); + uri.AppendPath(databaseInstanceName, true); + uri.AppendPath("/start", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + if (content != null) + { + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; + } + _userAgent.Apply(message); + return message; + } + + /// Starts the database instance of the SAP system. + /// 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 Virtual Instances for SAP solutions resource. + /// Database resource name string modeled as parameter for auto generation to work correctly. + /// SAP Database server instance start request body. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task StartAsync(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string databaseInstanceName, StartContent content = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(databaseInstanceName, nameof(databaseInstanceName)); + + using var message = CreateStartRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, databaseInstanceName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Starts the database instance of the SAP system. + /// 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 Virtual Instances for SAP solutions resource. + /// Database resource name string modeled as parameter for auto generation to work correctly. + /// SAP Database server instance start request body. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Start(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string databaseInstanceName, StartContent content = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(databaseInstanceName, nameof(databaseInstanceName)); + + using var message = CreateStartRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, databaseInstanceName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateStopRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string databaseInstanceName, StopContent content) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/databaseInstances/", false); + uri.AppendPath(databaseInstanceName, true); + uri.AppendPath("/stop", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateStopRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string databaseInstanceName, StopContent content) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/databaseInstances/", false); + uri.AppendPath(databaseInstanceName, true); + uri.AppendPath("/stop", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + if (content != null) + { + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; + } + _userAgent.Apply(message); + return message; + } + + /// Stops the database instance of the SAP system. + /// 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 Virtual Instances for SAP solutions resource. + /// Database resource name string modeled as parameter for auto generation to work correctly. + /// Stop request for the database instance of the SAP system. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task StopAsync(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string databaseInstanceName, StopContent content = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(databaseInstanceName, nameof(databaseInstanceName)); + + using var message = CreateStopRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, databaseInstanceName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Stops the database instance of the SAP system. + /// 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 Virtual Instances for SAP solutions resource. + /// Database resource name string modeled as parameter for auto generation to work correctly. + /// Stop request for the database instance of the SAP system. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Stop(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string databaseInstanceName, StopContent content = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(databaseInstanceName, nameof(databaseInstanceName)); + + using var message = CreateStopRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, databaseInstanceName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string sapVirtualInstanceName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string sapVirtualInstanceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists the Database resources associated with a Virtual Instance for SAP solutions resource. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, sapVirtualInstanceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SAPDatabaseInstanceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SAPDatabaseInstanceListResult.DeserializeSAPDatabaseInstanceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists the Database resources associated with a Virtual Instance for SAP solutions resource. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, sapVirtualInstanceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SAPDatabaseInstanceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SAPDatabaseInstanceListResult.DeserializeSAPDatabaseInstanceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/RestOperations/SapVirtualInstancesRestOperations.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/RestOperations/SapVirtualInstancesRestOperations.cs new file mode 100644 index 000000000000..7de7877e90aa --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/RestOperations/SapVirtualInstancesRestOperations.cs @@ -0,0 +1,1281 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.SapVirtualInstances.Models; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + internal partial class SapVirtualInstancesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of SapVirtualInstancesRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public SapVirtualInstancesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2024-09-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets a Virtual Instance for SAP solutions resource. + /// 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 Virtual Instances for SAP solutions resource. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SapVirtualInstanceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SapVirtualInstanceData.DeserializeSapVirtualInstanceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((SapVirtualInstanceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets a Virtual Instance for SAP solutions resource. + /// 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 Virtual Instances for SAP solutions resource. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SapVirtualInstanceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SapVirtualInstanceData.DeserializeSapVirtualInstanceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((SapVirtualInstanceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, SapVirtualInstanceData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, SapVirtualInstanceData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates a Virtual Instance for SAP solutions (VIS) resource. + /// 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 Virtual Instances for SAP solutions resource. + /// Virtual Instance for SAP solutions resource request body. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task CreateAsync(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, SapVirtualInstanceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates a Virtual Instance for SAP solutions (VIS) resource. + /// 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 Virtual Instances for SAP solutions resource. + /// Virtual Instance for SAP solutions resource request body. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Create(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, SapVirtualInstanceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, SapVirtualInstancePatch patch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, SapVirtualInstancePatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Updates a Virtual Instance for SAP solutions resource. + /// 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 Virtual Instances for SAP solutions resource. + /// Request body to update a Virtual Instance for SAP solutions resource. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, SapVirtualInstancePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Updates a Virtual Instance for SAP solutions resource. + /// 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 Virtual Instances for SAP solutions resource. + /// Request body to update a Virtual Instance for SAP solutions resource. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, SapVirtualInstancePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes a Virtual Instance for SAP solutions resource and its child resources, that is the associated Central Services Instance, Application Server Instances and Database Instance. + /// 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 Virtual Instances for SAP solutions resource. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Deletes a Virtual Instance for SAP solutions resource and its child resources, that is the associated Central Services Instance, Application Server Instances and Database Instance. + /// 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 Virtual Instances for SAP solutions resource. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByResourceGroupRequestUri(string subscriptionId, string resourceGroupName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, string resourceGroupName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets all Virtual Instances for SAP solutions resources in a Resource Group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupAsync(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SAPVirtualInstanceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SAPVirtualInstanceListResult.DeserializeSAPVirtualInstanceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets all Virtual Instances for SAP solutions resources in a Resource Group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroup(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SAPVirtualInstanceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SAPVirtualInstanceListResult.DeserializeSAPVirtualInstanceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListBySubscriptionRequestUri(string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets all Virtual Instances for SAP solutions resources in a Subscription. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionAsync(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SAPVirtualInstanceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SAPVirtualInstanceListResult.DeserializeSAPVirtualInstanceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets all Virtual Instances for SAP solutions resources in a Subscription. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscription(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SAPVirtualInstanceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SAPVirtualInstanceListResult.DeserializeSAPVirtualInstanceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateStartRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, StartContent content) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/start", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateStartRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, StartContent content) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/start", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + if (content != null) + { + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; + } + _userAgent.Apply(message); + return message; + } + + /// Starts the SAP application, that is the Central Services instance and Application server instances. + /// 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 Virtual Instances for SAP solutions resource. + /// The Virtual Instance for SAP solutions resource start request body. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task StartAsync(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, StartContent content = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + + using var message = CreateStartRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Starts the SAP application, that is the Central Services instance and Application server instances. + /// 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 Virtual Instances for SAP solutions resource. + /// The Virtual Instance for SAP solutions resource start request body. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Start(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, StartContent content = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + + using var message = CreateStartRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateStopRequestUri(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, StopContent content) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/stop", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateStopRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, StopContent content) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/stop", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + if (content != null) + { + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; + } + _userAgent.Apply(message); + return message; + } + + /// Stops the SAP Application, that is the Application server instances and Central Services instance. + /// 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 Virtual Instances for SAP solutions resource. + /// The Virtual Instance for SAP solutions resource stop request body. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task StopAsync(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, StopContent content = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + + using var message = CreateStopRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Stops the SAP Application, that is the Application server instances and Central Services instance. + /// 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 Virtual Instances for SAP solutions resource. + /// The Virtual Instance for SAP solutions resource stop request body. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Stop(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, StopContent content = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + + using var message = CreateStopRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 200: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetSizingRecommendationsRequestUri(string subscriptionId, AzureLocation location, SapSizingRecommendationContent content) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Workloads/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/sapVirtualInstanceMetadata/default/getSizingRecommendations", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetSizingRecommendationsRequest(string subscriptionId, AzureLocation location, SapSizingRecommendationContent content) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Workloads/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/sapVirtualInstanceMetadata/default/getSizingRecommendations", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; + _userAgent.Apply(message); + return message; + } + + /// Gets the sizing recommendations. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// The content of the action request. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> GetSizingRecommendationsAsync(string subscriptionId, AzureLocation location, SapSizingRecommendationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateGetSizingRecommendationsRequest(subscriptionId, location, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SapSizingRecommendationResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SapSizingRecommendationResult.DeserializeSapSizingRecommendationResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the sizing recommendations. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// The content of the action request. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response GetSizingRecommendations(string subscriptionId, AzureLocation location, SapSizingRecommendationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateGetSizingRecommendationsRequest(subscriptionId, location, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SapSizingRecommendationResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SapSizingRecommendationResult.DeserializeSapSizingRecommendationResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetSapSupportedSkuRequestUri(string subscriptionId, AzureLocation location, SapSupportedSkusContent content) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Workloads/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/sapVirtualInstanceMetadata/default/getSapSupportedSku", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetSapSupportedSkuRequest(string subscriptionId, AzureLocation location, SapSupportedSkusContent content) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Workloads/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/sapVirtualInstanceMetadata/default/getSapSupportedSku", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; + _userAgent.Apply(message); + return message; + } + + /// Get a list of SAP supported SKUs for ASCS, Application and Database tier. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// The content of the action request. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> GetSapSupportedSkuAsync(string subscriptionId, AzureLocation location, SapSupportedSkusContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateGetSapSupportedSkuRequest(subscriptionId, location, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SapSupportedResourceSkusResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SapSupportedResourceSkusResult.DeserializeSapSupportedResourceSkusResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a list of SAP supported SKUs for ASCS, Application and Database tier. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// The content of the action request. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response GetSapSupportedSku(string subscriptionId, AzureLocation location, SapSupportedSkusContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateGetSapSupportedSkuRequest(subscriptionId, location, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SapSupportedResourceSkusResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SapSupportedResourceSkusResult.DeserializeSapSupportedResourceSkusResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetDiskConfigurationsRequestUri(string subscriptionId, AzureLocation location, SapDiskConfigurationsContent content) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Workloads/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/sapVirtualInstanceMetadata/default/getDiskConfigurations", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetDiskConfigurationsRequest(string subscriptionId, AzureLocation location, SapDiskConfigurationsContent content) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Workloads/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/sapVirtualInstanceMetadata/default/getDiskConfigurations", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; + _userAgent.Apply(message); + return message; + } + + /// Get the SAP Disk Configuration Layout prod/non-prod SAP System. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// The content of the action request. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> GetDiskConfigurationsAsync(string subscriptionId, AzureLocation location, SapDiskConfigurationsContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateGetDiskConfigurationsRequest(subscriptionId, location, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SapDiskConfigurationsResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SapDiskConfigurationsResult.DeserializeSapDiskConfigurationsResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the SAP Disk Configuration Layout prod/non-prod SAP System. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// The content of the action request. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response GetDiskConfigurations(string subscriptionId, AzureLocation location, SapDiskConfigurationsContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateGetDiskConfigurationsRequest(subscriptionId, location, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SapDiskConfigurationsResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SapDiskConfigurationsResult.DeserializeSapDiskConfigurationsResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetAvailabilityZoneDetailsRequestUri(string subscriptionId, AzureLocation location, SapAvailabilityZoneDetailsContent content) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Workloads/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/sapVirtualInstanceMetadata/default/getAvailabilityZoneDetails", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetAvailabilityZoneDetailsRequest(string subscriptionId, AzureLocation location, SapAvailabilityZoneDetailsContent content) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Workloads/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/sapVirtualInstanceMetadata/default/getAvailabilityZoneDetails", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; + _userAgent.Apply(message); + return message; + } + + /// Get the recommended SAP Availability Zone Pair Details for your region. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// The content of the action request. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> GetAvailabilityZoneDetailsAsync(string subscriptionId, AzureLocation location, SapAvailabilityZoneDetailsContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateGetAvailabilityZoneDetailsRequest(subscriptionId, location, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SapAvailabilityZoneDetailsResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SapAvailabilityZoneDetailsResult.DeserializeSapAvailabilityZoneDetailsResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the recommended SAP Availability Zone Pair Details for your region. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// The content of the action request. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response GetAvailabilityZoneDetails(string subscriptionId, AzureLocation location, SapAvailabilityZoneDetailsContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateGetAvailabilityZoneDetailsRequest(subscriptionId, location, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SapAvailabilityZoneDetailsResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SapAvailabilityZoneDetailsResult.DeserializeSapAvailabilityZoneDetailsResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByResourceGroupNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets all Virtual Instances for SAP solutions resources in a Resource Group. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SAPVirtualInstanceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SAPVirtualInstanceListResult.DeserializeSAPVirtualInstanceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets all Virtual Instances for SAP solutions resources in a Resource Group. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroupNextPage(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SAPVirtualInstanceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SAPVirtualInstanceListResult.DeserializeSAPVirtualInstanceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListBySubscriptionNextPageRequestUri(string nextLink, string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, string subscriptionId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets all Virtual Instances for SAP solutions resources in a Subscription. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionNextPageAsync(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SAPVirtualInstanceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SAPVirtualInstanceListResult.DeserializeSAPVirtualInstanceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets all Virtual Instances for SAP solutions resources in a Subscription. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscriptionNextPage(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SAPVirtualInstanceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SAPVirtualInstanceListResult.DeserializeSAPVirtualInstanceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapApplicationServerInstanceCollection.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapApplicationServerInstanceCollection.cs new file mode 100644 index 000000000000..ce15a8b6e1d0 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapApplicationServerInstanceCollection.cs @@ -0,0 +1,493 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetSapApplicationServerInstances method from an instance of . + /// + public partial class SapApplicationServerInstanceCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _sapApplicationServerInstanceClientDiagnostics; + private readonly SapApplicationServerInstancesRestOperations _sapApplicationServerInstanceRestClient; + + /// Initializes a new instance of the class for mocking. + protected SapApplicationServerInstanceCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal SapApplicationServerInstanceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _sapApplicationServerInstanceClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.SapVirtualInstances", SapApplicationServerInstanceResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(SapApplicationServerInstanceResource.ResourceType, out string sapApplicationServerInstanceApiVersion); + _sapApplicationServerInstanceRestClient = new SapApplicationServerInstancesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, sapApplicationServerInstanceApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != SapVirtualInstanceResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, SapVirtualInstanceResource.ResourceType), nameof(id)); + } + + /// + /// Puts the SAP Application Server Instance resource. <br><br>This will be used by service only. PUT by end user will return a Bad Request error. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName} + /// + /// + /// Operation Id + /// SAPApplicationServerInstance_Create + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of SAP Application Server instance resource. + /// The SAP Application Server Instance resource request body. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string applicationInstanceName, SapApplicationServerInstanceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(applicationInstanceName, nameof(applicationInstanceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _sapApplicationServerInstanceClientDiagnostics.CreateScope("SapApplicationServerInstanceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _sapApplicationServerInstanceRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, applicationInstanceName, data, cancellationToken).ConfigureAwait(false); + var operation = new SapVirtualInstancesArmOperation(new SapApplicationServerInstanceOperationSource(Client), _sapApplicationServerInstanceClientDiagnostics, Pipeline, _sapApplicationServerInstanceRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, applicationInstanceName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Puts the SAP Application Server Instance resource. <br><br>This will be used by service only. PUT by end user will return a Bad Request error. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName} + /// + /// + /// Operation Id + /// SAPApplicationServerInstance_Create + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of SAP Application Server instance resource. + /// The SAP Application Server Instance resource request body. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string applicationInstanceName, SapApplicationServerInstanceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(applicationInstanceName, nameof(applicationInstanceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _sapApplicationServerInstanceClientDiagnostics.CreateScope("SapApplicationServerInstanceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _sapApplicationServerInstanceRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, applicationInstanceName, data, cancellationToken); + var operation = new SapVirtualInstancesArmOperation(new SapApplicationServerInstanceOperationSource(Client), _sapApplicationServerInstanceClientDiagnostics, Pipeline, _sapApplicationServerInstanceRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, applicationInstanceName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the SAP Application Server Instance corresponding to the Virtual Instance for SAP solutions resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName} + /// + /// + /// Operation Id + /// SAPApplicationServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of SAP Application Server instance resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string applicationInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(applicationInstanceName, nameof(applicationInstanceName)); + + using var scope = _sapApplicationServerInstanceClientDiagnostics.CreateScope("SapApplicationServerInstanceCollection.Get"); + scope.Start(); + try + { + var response = await _sapApplicationServerInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, applicationInstanceName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SapApplicationServerInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the SAP Application Server Instance corresponding to the Virtual Instance for SAP solutions resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName} + /// + /// + /// Operation Id + /// SAPApplicationServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of SAP Application Server instance resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string applicationInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(applicationInstanceName, nameof(applicationInstanceName)); + + using var scope = _sapApplicationServerInstanceClientDiagnostics.CreateScope("SapApplicationServerInstanceCollection.Get"); + scope.Start(); + try + { + var response = _sapApplicationServerInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, applicationInstanceName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SapApplicationServerInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists the SAP Application Server Instance resources for a given Virtual Instance for SAP solutions resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances + /// + /// + /// Operation Id + /// SAPApplicationServerInstance_List + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _sapApplicationServerInstanceRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _sapApplicationServerInstanceRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new SapApplicationServerInstanceResource(Client, SapApplicationServerInstanceData.DeserializeSapApplicationServerInstanceData(e)), _sapApplicationServerInstanceClientDiagnostics, Pipeline, "SapApplicationServerInstanceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Lists the SAP Application Server Instance resources for a given Virtual Instance for SAP solutions resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances + /// + /// + /// Operation Id + /// SAPApplicationServerInstance_List + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _sapApplicationServerInstanceRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _sapApplicationServerInstanceRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new SapApplicationServerInstanceResource(Client, SapApplicationServerInstanceData.DeserializeSapApplicationServerInstanceData(e)), _sapApplicationServerInstanceClientDiagnostics, Pipeline, "SapApplicationServerInstanceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName} + /// + /// + /// Operation Id + /// SAPApplicationServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of SAP Application Server instance resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string applicationInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(applicationInstanceName, nameof(applicationInstanceName)); + + using var scope = _sapApplicationServerInstanceClientDiagnostics.CreateScope("SapApplicationServerInstanceCollection.Exists"); + scope.Start(); + try + { + var response = await _sapApplicationServerInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, applicationInstanceName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName} + /// + /// + /// Operation Id + /// SAPApplicationServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of SAP Application Server instance resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string applicationInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(applicationInstanceName, nameof(applicationInstanceName)); + + using var scope = _sapApplicationServerInstanceClientDiagnostics.CreateScope("SapApplicationServerInstanceCollection.Exists"); + scope.Start(); + try + { + var response = _sapApplicationServerInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, applicationInstanceName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName} + /// + /// + /// Operation Id + /// SAPApplicationServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of SAP Application Server instance resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string applicationInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(applicationInstanceName, nameof(applicationInstanceName)); + + using var scope = _sapApplicationServerInstanceClientDiagnostics.CreateScope("SapApplicationServerInstanceCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _sapApplicationServerInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, applicationInstanceName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new SapApplicationServerInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName} + /// + /// + /// Operation Id + /// SAPApplicationServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of SAP Application Server instance resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string applicationInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(applicationInstanceName, nameof(applicationInstanceName)); + + using var scope = _sapApplicationServerInstanceClientDiagnostics.CreateScope("SapApplicationServerInstanceCollection.GetIfExists"); + scope.Start(); + try + { + var response = _sapApplicationServerInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, applicationInstanceName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new SapApplicationServerInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapApplicationServerInstanceData.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapApplicationServerInstanceData.Serialization.cs new file mode 100644 index 000000000000..d542f27c894e --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapApplicationServerInstanceData.Serialization.cs @@ -0,0 +1,178 @@ +// 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.Models; +using Azure.ResourceManager.SapVirtualInstances.Models; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + public partial class SapApplicationServerInstanceData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapApplicationServerInstanceData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + SapApplicationServerInstanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapApplicationServerInstanceData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapApplicationServerInstanceData(document.RootElement, options); + } + + internal static SapApplicationServerInstanceData DeserializeSapApplicationServerInstanceData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + SapApplicationServerProperties properties = default; + IDictionary tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = SapApplicationServerProperties.DeserializeSapApplicationServerProperties(property.Value, options); + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("location"u8)) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SapApplicationServerInstanceData( + id, + name, + type, + systemData, + tags ?? new ChangeTrackingDictionary(), + location, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapApplicationServerInstanceData)} does not support writing '{options.Format}' format."); + } + } + + SapApplicationServerInstanceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSapApplicationServerInstanceData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapApplicationServerInstanceData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapApplicationServerInstanceData.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapApplicationServerInstanceData.cs new file mode 100644 index 000000000000..cbf2c3802f58 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapApplicationServerInstanceData.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.SapVirtualInstances.Models; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + /// + /// A class representing the SapApplicationServerInstance data model. + /// Define the SAP Application Server Instance resource. + /// + public partial class SapApplicationServerInstanceData : TrackedResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The location. + public SapApplicationServerInstanceData(AzureLocation location) : base(location) + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal SapApplicationServerInstanceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, SapApplicationServerProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SapApplicationServerInstanceData() + { + } + + /// The resource-specific properties for this resource. + public SapApplicationServerProperties Properties { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapApplicationServerInstanceResource.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapApplicationServerInstanceResource.Serialization.cs new file mode 100644 index 000000000000..8949a7b78c7b --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapApplicationServerInstanceResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + public partial class SapApplicationServerInstanceResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + SapApplicationServerInstanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + SapApplicationServerInstanceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapApplicationServerInstanceResource.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapApplicationServerInstanceResource.cs new file mode 100644 index 000000000000..09a7cb6fbf68 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapApplicationServerInstanceResource.cs @@ -0,0 +1,871 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.SapVirtualInstances.Models; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + /// + /// A Class representing a SapApplicationServerInstance along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetSapApplicationServerInstanceResource method. + /// Otherwise you can get one from its parent resource using the GetSapApplicationServerInstance method. + /// + public partial class SapApplicationServerInstanceResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The sapVirtualInstanceName. + /// The applicationInstanceName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string applicationInstanceName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _sapApplicationServerInstanceClientDiagnostics; + private readonly SapApplicationServerInstancesRestOperations _sapApplicationServerInstanceRestClient; + private readonly SapApplicationServerInstanceData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Workloads/sapVirtualInstances/applicationInstances"; + + /// Initializes a new instance of the class for mocking. + protected SapApplicationServerInstanceResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal SapApplicationServerInstanceResource(ArmClient client, SapApplicationServerInstanceData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal SapApplicationServerInstanceResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _sapApplicationServerInstanceClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.SapVirtualInstances", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string sapApplicationServerInstanceApiVersion); + _sapApplicationServerInstanceRestClient = new SapApplicationServerInstancesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, sapApplicationServerInstanceApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual SapApplicationServerInstanceData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Gets the SAP Application Server Instance corresponding to the Virtual Instance for SAP solutions resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName} + /// + /// + /// Operation Id + /// SAPApplicationServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _sapApplicationServerInstanceClientDiagnostics.CreateScope("SapApplicationServerInstanceResource.Get"); + scope.Start(); + try + { + var response = await _sapApplicationServerInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SapApplicationServerInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the SAP Application Server Instance corresponding to the Virtual Instance for SAP solutions resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName} + /// + /// + /// Operation Id + /// SAPApplicationServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _sapApplicationServerInstanceClientDiagnostics.CreateScope("SapApplicationServerInstanceResource.Get"); + scope.Start(); + try + { + var response = _sapApplicationServerInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SapApplicationServerInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes the SAP Application Server Instance resource. <br><br>This operation will be used by service only. Delete by end user will return a Bad Request error. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName} + /// + /// + /// Operation Id + /// SAPApplicationServerInstance_Delete + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _sapApplicationServerInstanceClientDiagnostics.CreateScope("SapApplicationServerInstanceResource.Delete"); + scope.Start(); + try + { + var response = await _sapApplicationServerInstanceRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new SapVirtualInstancesArmOperation(_sapApplicationServerInstanceClientDiagnostics, Pipeline, _sapApplicationServerInstanceRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes the SAP Application Server Instance resource. <br><br>This operation will be used by service only. Delete by end user will return a Bad Request error. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName} + /// + /// + /// Operation Id + /// SAPApplicationServerInstance_Delete + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _sapApplicationServerInstanceClientDiagnostics.CreateScope("SapApplicationServerInstanceResource.Delete"); + scope.Start(); + try + { + var response = _sapApplicationServerInstanceRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new SapVirtualInstancesArmOperation(_sapApplicationServerInstanceClientDiagnostics, Pipeline, _sapApplicationServerInstanceRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Puts the SAP Application Server Instance resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName} + /// + /// + /// Operation Id + /// SAPApplicationServerInstance_Update + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The SAP Application Server Instance resource request body. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(SapApplicationServerInstancePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _sapApplicationServerInstanceClientDiagnostics.CreateScope("SapApplicationServerInstanceResource.Update"); + scope.Start(); + try + { + var response = await _sapApplicationServerInstanceRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new SapApplicationServerInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Puts the SAP Application Server Instance resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName} + /// + /// + /// Operation Id + /// SAPApplicationServerInstance_Update + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The SAP Application Server Instance resource request body. + /// The cancellation token to use. + /// is null. + public virtual Response Update(SapApplicationServerInstancePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _sapApplicationServerInstanceClientDiagnostics.CreateScope("SapApplicationServerInstanceResource.Update"); + scope.Start(); + try + { + var response = _sapApplicationServerInstanceRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken); + return Response.FromValue(new SapApplicationServerInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Starts the SAP Application Server Instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName}/start + /// + /// + /// Operation Id + /// SAPApplicationServerInstances_Start + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// 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. + /// SAP Application server instance start request body. + /// The cancellation token to use. + public virtual async Task> StartAsync(WaitUntil waitUntil, StartContent content = null, CancellationToken cancellationToken = default) + { + using var scope = _sapApplicationServerInstanceClientDiagnostics.CreateScope("SapApplicationServerInstanceResource.Start"); + scope.Start(); + try + { + var response = await _sapApplicationServerInstanceRestClient.StartAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new SapVirtualInstancesArmOperation(new OperationStatusResultOperationSource(), _sapApplicationServerInstanceClientDiagnostics, Pipeline, _sapApplicationServerInstanceRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Starts the SAP Application Server Instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName}/start + /// + /// + /// Operation Id + /// SAPApplicationServerInstances_Start + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// 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. + /// SAP Application server instance start request body. + /// The cancellation token to use. + public virtual ArmOperation Start(WaitUntil waitUntil, StartContent content = null, CancellationToken cancellationToken = default) + { + using var scope = _sapApplicationServerInstanceClientDiagnostics.CreateScope("SapApplicationServerInstanceResource.Start"); + scope.Start(); + try + { + var response = _sapApplicationServerInstanceRestClient.Start(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); + var operation = new SapVirtualInstancesArmOperation(new OperationStatusResultOperationSource(), _sapApplicationServerInstanceClientDiagnostics, Pipeline, _sapApplicationServerInstanceRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Stops the SAP Application Server Instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName}/stop + /// + /// + /// Operation Id + /// SAPApplicationServerInstances_Stop + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// 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. + /// SAP Application server instance stop request body. + /// The cancellation token to use. + public virtual async Task> StopAsync(WaitUntil waitUntil, StopContent content = null, CancellationToken cancellationToken = default) + { + using var scope = _sapApplicationServerInstanceClientDiagnostics.CreateScope("SapApplicationServerInstanceResource.Stop"); + scope.Start(); + try + { + var response = await _sapApplicationServerInstanceRestClient.StopAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new SapVirtualInstancesArmOperation(new OperationStatusResultOperationSource(), _sapApplicationServerInstanceClientDiagnostics, Pipeline, _sapApplicationServerInstanceRestClient.CreateStopRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Stops the SAP Application Server Instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName}/stop + /// + /// + /// Operation Id + /// SAPApplicationServerInstances_Stop + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// 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. + /// SAP Application server instance stop request body. + /// The cancellation token to use. + public virtual ArmOperation Stop(WaitUntil waitUntil, StopContent content = null, CancellationToken cancellationToken = default) + { + using var scope = _sapApplicationServerInstanceClientDiagnostics.CreateScope("SapApplicationServerInstanceResource.Stop"); + scope.Start(); + try + { + var response = _sapApplicationServerInstanceRestClient.Stop(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); + var operation = new SapVirtualInstancesArmOperation(new OperationStatusResultOperationSource(), _sapApplicationServerInstanceClientDiagnostics, Pipeline, _sapApplicationServerInstanceRestClient.CreateStopRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName} + /// + /// + /// Operation Id + /// SAPApplicationServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _sapApplicationServerInstanceClientDiagnostics.CreateScope("SapApplicationServerInstanceResource.AddTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues[key] = value; + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _sapApplicationServerInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new SapApplicationServerInstanceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new SapApplicationServerInstancePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName} + /// + /// + /// Operation Id + /// SAPApplicationServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _sapApplicationServerInstanceClientDiagnostics.CreateScope("SapApplicationServerInstanceResource.AddTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues[key] = value; + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _sapApplicationServerInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new SapApplicationServerInstanceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new SapApplicationServerInstancePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = Update(patch, cancellationToken: cancellationToken); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName} + /// + /// + /// Operation Id + /// SAPApplicationServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _sapApplicationServerInstanceClientDiagnostics.CreateScope("SapApplicationServerInstanceResource.SetTags"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _sapApplicationServerInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new SapApplicationServerInstanceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new SapApplicationServerInstancePatch(); + patch.Tags.ReplaceWith(tags); + var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName} + /// + /// + /// Operation Id + /// SAPApplicationServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _sapApplicationServerInstanceClientDiagnostics.CreateScope("SapApplicationServerInstanceResource.SetTags"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _sapApplicationServerInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new SapApplicationServerInstanceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new SapApplicationServerInstancePatch(); + patch.Tags.ReplaceWith(tags); + var result = Update(patch, cancellationToken: cancellationToken); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName} + /// + /// + /// Operation Id + /// SAPApplicationServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _sapApplicationServerInstanceClientDiagnostics.CreateScope("SapApplicationServerInstanceResource.RemoveTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.Remove(key); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _sapApplicationServerInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new SapApplicationServerInstanceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new SapApplicationServerInstancePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName} + /// + /// + /// Operation Id + /// SAPApplicationServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _sapApplicationServerInstanceClientDiagnostics.CreateScope("SapApplicationServerInstanceResource.RemoveTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.Remove(key); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _sapApplicationServerInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new SapApplicationServerInstanceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new SapApplicationServerInstancePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = Update(patch, cancellationToken: cancellationToken); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapCentralServerInstanceCollection.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapCentralServerInstanceCollection.cs new file mode 100644 index 000000000000..f4720665bca6 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapCentralServerInstanceCollection.cs @@ -0,0 +1,493 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetSapCentralServerInstances method from an instance of . + /// + public partial class SapCentralServerInstanceCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _sapCentralServerInstanceClientDiagnostics; + private readonly SapCentralServerInstancesRestOperations _sapCentralServerInstanceRestClient; + + /// Initializes a new instance of the class for mocking. + protected SapCentralServerInstanceCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal SapCentralServerInstanceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _sapCentralServerInstanceClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.SapVirtualInstances", SapCentralServerInstanceResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(SapCentralServerInstanceResource.ResourceType, out string sapCentralServerInstanceApiVersion); + _sapCentralServerInstanceRestClient = new SapCentralServerInstancesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, sapCentralServerInstanceApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != SapVirtualInstanceResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, SapVirtualInstanceResource.ResourceType), nameof(id)); + } + + /// + /// Creates the SAP Central Services Instance resource. <br><br>This will be used by service only. PUT operation on this resource by end user will return a Bad Request error. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName} + /// + /// + /// Operation Id + /// SAPCentralServerInstance_Create + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// 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. + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. + /// The SAP Central Services Instance request body. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string centralInstanceName, SapCentralServerInstanceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(centralInstanceName, nameof(centralInstanceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _sapCentralServerInstanceClientDiagnostics.CreateScope("SapCentralServerInstanceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _sapCentralServerInstanceRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, centralInstanceName, data, cancellationToken).ConfigureAwait(false); + var operation = new SapVirtualInstancesArmOperation(new SapCentralServerInstanceOperationSource(Client), _sapCentralServerInstanceClientDiagnostics, Pipeline, _sapCentralServerInstanceRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, centralInstanceName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates the SAP Central Services Instance resource. <br><br>This will be used by service only. PUT operation on this resource by end user will return a Bad Request error. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName} + /// + /// + /// Operation Id + /// SAPCentralServerInstance_Create + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// 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. + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. + /// The SAP Central Services Instance request body. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string centralInstanceName, SapCentralServerInstanceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(centralInstanceName, nameof(centralInstanceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _sapCentralServerInstanceClientDiagnostics.CreateScope("SapCentralServerInstanceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _sapCentralServerInstanceRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, centralInstanceName, data, cancellationToken); + var operation = new SapVirtualInstancesArmOperation(new SapCentralServerInstanceOperationSource(Client), _sapCentralServerInstanceClientDiagnostics, Pipeline, _sapCentralServerInstanceRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, centralInstanceName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the SAP Central Services Instance resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName} + /// + /// + /// Operation Id + /// SAPCentralServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string centralInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(centralInstanceName, nameof(centralInstanceName)); + + using var scope = _sapCentralServerInstanceClientDiagnostics.CreateScope("SapCentralServerInstanceCollection.Get"); + scope.Start(); + try + { + var response = await _sapCentralServerInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, centralInstanceName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SapCentralServerInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the SAP Central Services Instance resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName} + /// + /// + /// Operation Id + /// SAPCentralServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string centralInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(centralInstanceName, nameof(centralInstanceName)); + + using var scope = _sapCentralServerInstanceClientDiagnostics.CreateScope("SapCentralServerInstanceCollection.Get"); + scope.Start(); + try + { + var response = _sapCentralServerInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, centralInstanceName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SapCentralServerInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists the SAP Central Services Instance resource for the given Virtual Instance for SAP solutions resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances + /// + /// + /// Operation Id + /// SAPCentralServerInstance_List + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _sapCentralServerInstanceRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _sapCentralServerInstanceRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new SapCentralServerInstanceResource(Client, SapCentralServerInstanceData.DeserializeSapCentralServerInstanceData(e)), _sapCentralServerInstanceClientDiagnostics, Pipeline, "SapCentralServerInstanceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Lists the SAP Central Services Instance resource for the given Virtual Instance for SAP solutions resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances + /// + /// + /// Operation Id + /// SAPCentralServerInstance_List + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _sapCentralServerInstanceRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _sapCentralServerInstanceRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new SapCentralServerInstanceResource(Client, SapCentralServerInstanceData.DeserializeSapCentralServerInstanceData(e)), _sapCentralServerInstanceClientDiagnostics, Pipeline, "SapCentralServerInstanceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName} + /// + /// + /// Operation Id + /// SAPCentralServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string centralInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(centralInstanceName, nameof(centralInstanceName)); + + using var scope = _sapCentralServerInstanceClientDiagnostics.CreateScope("SapCentralServerInstanceCollection.Exists"); + scope.Start(); + try + { + var response = await _sapCentralServerInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, centralInstanceName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName} + /// + /// + /// Operation Id + /// SAPCentralServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string centralInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(centralInstanceName, nameof(centralInstanceName)); + + using var scope = _sapCentralServerInstanceClientDiagnostics.CreateScope("SapCentralServerInstanceCollection.Exists"); + scope.Start(); + try + { + var response = _sapCentralServerInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, centralInstanceName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName} + /// + /// + /// Operation Id + /// SAPCentralServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string centralInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(centralInstanceName, nameof(centralInstanceName)); + + using var scope = _sapCentralServerInstanceClientDiagnostics.CreateScope("SapCentralServerInstanceCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _sapCentralServerInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, centralInstanceName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new SapCentralServerInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName} + /// + /// + /// Operation Id + /// SAPCentralServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string centralInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(centralInstanceName, nameof(centralInstanceName)); + + using var scope = _sapCentralServerInstanceClientDiagnostics.CreateScope("SapCentralServerInstanceCollection.GetIfExists"); + scope.Start(); + try + { + var response = _sapCentralServerInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, centralInstanceName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new SapCentralServerInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapCentralServerInstanceData.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapCentralServerInstanceData.Serialization.cs new file mode 100644 index 000000000000..05a4d380f634 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapCentralServerInstanceData.Serialization.cs @@ -0,0 +1,178 @@ +// 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.Models; +using Azure.ResourceManager.SapVirtualInstances.Models; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + public partial class SapCentralServerInstanceData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapCentralServerInstanceData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + SapCentralServerInstanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapCentralServerInstanceData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapCentralServerInstanceData(document.RootElement, options); + } + + internal static SapCentralServerInstanceData DeserializeSapCentralServerInstanceData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + SapCentralServerProperties properties = default; + IDictionary tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = SapCentralServerProperties.DeserializeSapCentralServerProperties(property.Value, options); + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("location"u8)) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SapCentralServerInstanceData( + id, + name, + type, + systemData, + tags ?? new ChangeTrackingDictionary(), + location, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapCentralServerInstanceData)} does not support writing '{options.Format}' format."); + } + } + + SapCentralServerInstanceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSapCentralServerInstanceData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapCentralServerInstanceData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapCentralServerInstanceData.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapCentralServerInstanceData.cs new file mode 100644 index 000000000000..e2b64daf7eee --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapCentralServerInstanceData.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.SapVirtualInstances.Models; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + /// + /// A class representing the SapCentralServerInstance data model. + /// Define the SAP Central Services Instance resource. + /// + public partial class SapCentralServerInstanceData : TrackedResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The location. + public SapCentralServerInstanceData(AzureLocation location) : base(location) + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal SapCentralServerInstanceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, SapCentralServerProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SapCentralServerInstanceData() + { + } + + /// The resource-specific properties for this resource. + public SapCentralServerProperties Properties { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapCentralServerInstanceResource.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapCentralServerInstanceResource.Serialization.cs new file mode 100644 index 000000000000..b133bd8eceef --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapCentralServerInstanceResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + public partial class SapCentralServerInstanceResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + SapCentralServerInstanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + SapCentralServerInstanceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapCentralServerInstanceResource.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapCentralServerInstanceResource.cs new file mode 100644 index 000000000000..80e3337f1da6 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapCentralServerInstanceResource.cs @@ -0,0 +1,871 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.SapVirtualInstances.Models; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + /// + /// A Class representing a SapCentralServerInstance along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetSapCentralServerInstanceResource method. + /// Otherwise you can get one from its parent resource using the GetSapCentralServerInstance method. + /// + public partial class SapCentralServerInstanceResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The sapVirtualInstanceName. + /// The centralInstanceName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string centralInstanceName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _sapCentralServerInstanceClientDiagnostics; + private readonly SapCentralServerInstancesRestOperations _sapCentralServerInstanceRestClient; + private readonly SapCentralServerInstanceData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Workloads/sapVirtualInstances/centralInstances"; + + /// Initializes a new instance of the class for mocking. + protected SapCentralServerInstanceResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal SapCentralServerInstanceResource(ArmClient client, SapCentralServerInstanceData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal SapCentralServerInstanceResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _sapCentralServerInstanceClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.SapVirtualInstances", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string sapCentralServerInstanceApiVersion); + _sapCentralServerInstanceRestClient = new SapCentralServerInstancesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, sapCentralServerInstanceApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual SapCentralServerInstanceData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Gets the SAP Central Services Instance resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName} + /// + /// + /// Operation Id + /// SAPCentralServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _sapCentralServerInstanceClientDiagnostics.CreateScope("SapCentralServerInstanceResource.Get"); + scope.Start(); + try + { + var response = await _sapCentralServerInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SapCentralServerInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the SAP Central Services Instance resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName} + /// + /// + /// Operation Id + /// SAPCentralServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _sapCentralServerInstanceClientDiagnostics.CreateScope("SapCentralServerInstanceResource.Get"); + scope.Start(); + try + { + var response = _sapCentralServerInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SapCentralServerInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes the SAP Central Services Instance resource. <br><br>This will be used by service only. Delete operation on this resource by end user will return a Bad Request error. You can delete the parent resource, which is the Virtual Instance for SAP solutions resource, using the delete operation on it. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName} + /// + /// + /// Operation Id + /// SAPCentralServerInstance_Delete + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _sapCentralServerInstanceClientDiagnostics.CreateScope("SapCentralServerInstanceResource.Delete"); + scope.Start(); + try + { + var response = await _sapCentralServerInstanceRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new SapVirtualInstancesArmOperation(_sapCentralServerInstanceClientDiagnostics, Pipeline, _sapCentralServerInstanceRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes the SAP Central Services Instance resource. <br><br>This will be used by service only. Delete operation on this resource by end user will return a Bad Request error. You can delete the parent resource, which is the Virtual Instance for SAP solutions resource, using the delete operation on it. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName} + /// + /// + /// Operation Id + /// SAPCentralServerInstance_Delete + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _sapCentralServerInstanceClientDiagnostics.CreateScope("SapCentralServerInstanceResource.Delete"); + scope.Start(); + try + { + var response = _sapCentralServerInstanceRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new SapVirtualInstancesArmOperation(_sapCentralServerInstanceClientDiagnostics, Pipeline, _sapCentralServerInstanceRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates the SAP Central Services Instance resource. <br><br>This can be used to update tags on the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName} + /// + /// + /// Operation Id + /// SAPCentralServerInstance_Update + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The SAP Central Services Instance resource request body. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(SapCentralServerInstancePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _sapCentralServerInstanceClientDiagnostics.CreateScope("SapCentralServerInstanceResource.Update"); + scope.Start(); + try + { + var response = await _sapCentralServerInstanceRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new SapCentralServerInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates the SAP Central Services Instance resource. <br><br>This can be used to update tags on the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName} + /// + /// + /// Operation Id + /// SAPCentralServerInstance_Update + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The SAP Central Services Instance resource request body. + /// The cancellation token to use. + /// is null. + public virtual Response Update(SapCentralServerInstancePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _sapCentralServerInstanceClientDiagnostics.CreateScope("SapCentralServerInstanceResource.Update"); + scope.Start(); + try + { + var response = _sapCentralServerInstanceRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken); + return Response.FromValue(new SapCentralServerInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Starts the SAP Central Services Instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName}/start + /// + /// + /// Operation Id + /// SAPCentralServerInstances_Start + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// 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. + /// SAP Central Services instance start request body. + /// The cancellation token to use. + public virtual async Task> StartAsync(WaitUntil waitUntil, StartContent content = null, CancellationToken cancellationToken = default) + { + using var scope = _sapCentralServerInstanceClientDiagnostics.CreateScope("SapCentralServerInstanceResource.Start"); + scope.Start(); + try + { + var response = await _sapCentralServerInstanceRestClient.StartAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new SapVirtualInstancesArmOperation(new OperationStatusResultOperationSource(), _sapCentralServerInstanceClientDiagnostics, Pipeline, _sapCentralServerInstanceRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Starts the SAP Central Services Instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName}/start + /// + /// + /// Operation Id + /// SAPCentralServerInstances_Start + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// 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. + /// SAP Central Services instance start request body. + /// The cancellation token to use. + public virtual ArmOperation Start(WaitUntil waitUntil, StartContent content = null, CancellationToken cancellationToken = default) + { + using var scope = _sapCentralServerInstanceClientDiagnostics.CreateScope("SapCentralServerInstanceResource.Start"); + scope.Start(); + try + { + var response = _sapCentralServerInstanceRestClient.Start(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); + var operation = new SapVirtualInstancesArmOperation(new OperationStatusResultOperationSource(), _sapCentralServerInstanceClientDiagnostics, Pipeline, _sapCentralServerInstanceRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Stops the SAP Central Services Instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName}/stop + /// + /// + /// Operation Id + /// SAPCentralServerInstances_Stop + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// 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. + /// SAP Central Services instance stop request body. + /// The cancellation token to use. + public virtual async Task> StopAsync(WaitUntil waitUntil, StopContent content = null, CancellationToken cancellationToken = default) + { + using var scope = _sapCentralServerInstanceClientDiagnostics.CreateScope("SapCentralServerInstanceResource.Stop"); + scope.Start(); + try + { + var response = await _sapCentralServerInstanceRestClient.StopAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new SapVirtualInstancesArmOperation(new OperationStatusResultOperationSource(), _sapCentralServerInstanceClientDiagnostics, Pipeline, _sapCentralServerInstanceRestClient.CreateStopRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Stops the SAP Central Services Instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName}/stop + /// + /// + /// Operation Id + /// SAPCentralServerInstances_Stop + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// 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. + /// SAP Central Services instance stop request body. + /// The cancellation token to use. + public virtual ArmOperation Stop(WaitUntil waitUntil, StopContent content = null, CancellationToken cancellationToken = default) + { + using var scope = _sapCentralServerInstanceClientDiagnostics.CreateScope("SapCentralServerInstanceResource.Stop"); + scope.Start(); + try + { + var response = _sapCentralServerInstanceRestClient.Stop(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); + var operation = new SapVirtualInstancesArmOperation(new OperationStatusResultOperationSource(), _sapCentralServerInstanceClientDiagnostics, Pipeline, _sapCentralServerInstanceRestClient.CreateStopRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName} + /// + /// + /// Operation Id + /// SAPCentralServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _sapCentralServerInstanceClientDiagnostics.CreateScope("SapCentralServerInstanceResource.AddTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues[key] = value; + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _sapCentralServerInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new SapCentralServerInstanceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new SapCentralServerInstancePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName} + /// + /// + /// Operation Id + /// SAPCentralServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _sapCentralServerInstanceClientDiagnostics.CreateScope("SapCentralServerInstanceResource.AddTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues[key] = value; + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _sapCentralServerInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new SapCentralServerInstanceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new SapCentralServerInstancePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = Update(patch, cancellationToken: cancellationToken); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName} + /// + /// + /// Operation Id + /// SAPCentralServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _sapCentralServerInstanceClientDiagnostics.CreateScope("SapCentralServerInstanceResource.SetTags"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _sapCentralServerInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new SapCentralServerInstanceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new SapCentralServerInstancePatch(); + patch.Tags.ReplaceWith(tags); + var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName} + /// + /// + /// Operation Id + /// SAPCentralServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _sapCentralServerInstanceClientDiagnostics.CreateScope("SapCentralServerInstanceResource.SetTags"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _sapCentralServerInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new SapCentralServerInstanceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new SapCentralServerInstancePatch(); + patch.Tags.ReplaceWith(tags); + var result = Update(patch, cancellationToken: cancellationToken); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName} + /// + /// + /// Operation Id + /// SAPCentralServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _sapCentralServerInstanceClientDiagnostics.CreateScope("SapCentralServerInstanceResource.RemoveTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.Remove(key); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _sapCentralServerInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new SapCentralServerInstanceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new SapCentralServerInstancePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName} + /// + /// + /// Operation Id + /// SAPCentralServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _sapCentralServerInstanceClientDiagnostics.CreateScope("SapCentralServerInstanceResource.RemoveTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.Remove(key); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _sapCentralServerInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new SapCentralServerInstanceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new SapCentralServerInstancePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = Update(patch, cancellationToken: cancellationToken); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapDatabaseInstanceCollection.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapDatabaseInstanceCollection.cs new file mode 100644 index 000000000000..838f24961510 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapDatabaseInstanceCollection.cs @@ -0,0 +1,493 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetSapDatabaseInstances method from an instance of . + /// + public partial class SapDatabaseInstanceCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _sapDatabaseInstanceClientDiagnostics; + private readonly SapDatabaseInstancesRestOperations _sapDatabaseInstanceRestClient; + + /// Initializes a new instance of the class for mocking. + protected SapDatabaseInstanceCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal SapDatabaseInstanceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _sapDatabaseInstanceClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.SapVirtualInstances", SapDatabaseInstanceResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(SapDatabaseInstanceResource.ResourceType, out string sapDatabaseInstanceApiVersion); + _sapDatabaseInstanceRestClient = new SapDatabaseInstancesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, sapDatabaseInstanceApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != SapVirtualInstanceResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, SapVirtualInstanceResource.ResourceType), nameof(id)); + } + + /// + /// Creates the Database resource corresponding to the Virtual Instance for SAP solutions resource. <br><br>This will be used by service only. PUT by end user will return a Bad Request error. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName} + /// + /// + /// Operation Id + /// SAPDatabaseInstance_Create + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// 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. + /// Database resource name string modeled as parameter for auto generation to work correctly. + /// Request body of Database resource of a SAP system. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string databaseInstanceName, SapDatabaseInstanceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(databaseInstanceName, nameof(databaseInstanceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _sapDatabaseInstanceClientDiagnostics.CreateScope("SapDatabaseInstanceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _sapDatabaseInstanceRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, databaseInstanceName, data, cancellationToken).ConfigureAwait(false); + var operation = new SapVirtualInstancesArmOperation(new SapDatabaseInstanceOperationSource(Client), _sapDatabaseInstanceClientDiagnostics, Pipeline, _sapDatabaseInstanceRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, databaseInstanceName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates the Database resource corresponding to the Virtual Instance for SAP solutions resource. <br><br>This will be used by service only. PUT by end user will return a Bad Request error. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName} + /// + /// + /// Operation Id + /// SAPDatabaseInstance_Create + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// 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. + /// Database resource name string modeled as parameter for auto generation to work correctly. + /// Request body of Database resource of a SAP system. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string databaseInstanceName, SapDatabaseInstanceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(databaseInstanceName, nameof(databaseInstanceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _sapDatabaseInstanceClientDiagnostics.CreateScope("SapDatabaseInstanceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _sapDatabaseInstanceRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, databaseInstanceName, data, cancellationToken); + var operation = new SapVirtualInstancesArmOperation(new SapDatabaseInstanceOperationSource(Client), _sapDatabaseInstanceClientDiagnostics, Pipeline, _sapDatabaseInstanceRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, databaseInstanceName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the SAP Database Instance resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName} + /// + /// + /// Operation Id + /// SAPDatabaseInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Database resource name string modeled as parameter for auto generation to work correctly. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string databaseInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(databaseInstanceName, nameof(databaseInstanceName)); + + using var scope = _sapDatabaseInstanceClientDiagnostics.CreateScope("SapDatabaseInstanceCollection.Get"); + scope.Start(); + try + { + var response = await _sapDatabaseInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, databaseInstanceName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SapDatabaseInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the SAP Database Instance resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName} + /// + /// + /// Operation Id + /// SAPDatabaseInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Database resource name string modeled as parameter for auto generation to work correctly. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string databaseInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(databaseInstanceName, nameof(databaseInstanceName)); + + using var scope = _sapDatabaseInstanceClientDiagnostics.CreateScope("SapDatabaseInstanceCollection.Get"); + scope.Start(); + try + { + var response = _sapDatabaseInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, databaseInstanceName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SapDatabaseInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists the Database resources associated with a Virtual Instance for SAP solutions resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances + /// + /// + /// Operation Id + /// SAPDatabaseInstance_List + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _sapDatabaseInstanceRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _sapDatabaseInstanceRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new SapDatabaseInstanceResource(Client, SapDatabaseInstanceData.DeserializeSapDatabaseInstanceData(e)), _sapDatabaseInstanceClientDiagnostics, Pipeline, "SapDatabaseInstanceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Lists the Database resources associated with a Virtual Instance for SAP solutions resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances + /// + /// + /// Operation Id + /// SAPDatabaseInstance_List + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _sapDatabaseInstanceRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _sapDatabaseInstanceRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new SapDatabaseInstanceResource(Client, SapDatabaseInstanceData.DeserializeSapDatabaseInstanceData(e)), _sapDatabaseInstanceClientDiagnostics, Pipeline, "SapDatabaseInstanceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName} + /// + /// + /// Operation Id + /// SAPDatabaseInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Database resource name string modeled as parameter for auto generation to work correctly. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string databaseInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(databaseInstanceName, nameof(databaseInstanceName)); + + using var scope = _sapDatabaseInstanceClientDiagnostics.CreateScope("SapDatabaseInstanceCollection.Exists"); + scope.Start(); + try + { + var response = await _sapDatabaseInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, databaseInstanceName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName} + /// + /// + /// Operation Id + /// SAPDatabaseInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Database resource name string modeled as parameter for auto generation to work correctly. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string databaseInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(databaseInstanceName, nameof(databaseInstanceName)); + + using var scope = _sapDatabaseInstanceClientDiagnostics.CreateScope("SapDatabaseInstanceCollection.Exists"); + scope.Start(); + try + { + var response = _sapDatabaseInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, databaseInstanceName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName} + /// + /// + /// Operation Id + /// SAPDatabaseInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Database resource name string modeled as parameter for auto generation to work correctly. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string databaseInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(databaseInstanceName, nameof(databaseInstanceName)); + + using var scope = _sapDatabaseInstanceClientDiagnostics.CreateScope("SapDatabaseInstanceCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _sapDatabaseInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, databaseInstanceName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new SapDatabaseInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName} + /// + /// + /// Operation Id + /// SAPDatabaseInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Database resource name string modeled as parameter for auto generation to work correctly. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string databaseInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(databaseInstanceName, nameof(databaseInstanceName)); + + using var scope = _sapDatabaseInstanceClientDiagnostics.CreateScope("SapDatabaseInstanceCollection.GetIfExists"); + scope.Start(); + try + { + var response = _sapDatabaseInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, databaseInstanceName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new SapDatabaseInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapDatabaseInstanceData.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapDatabaseInstanceData.Serialization.cs new file mode 100644 index 000000000000..aabec700b433 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapDatabaseInstanceData.Serialization.cs @@ -0,0 +1,178 @@ +// 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.Models; +using Azure.ResourceManager.SapVirtualInstances.Models; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + public partial class SapDatabaseInstanceData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapDatabaseInstanceData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + SapDatabaseInstanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapDatabaseInstanceData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapDatabaseInstanceData(document.RootElement, options); + } + + internal static SapDatabaseInstanceData DeserializeSapDatabaseInstanceData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + SapDatabaseProperties properties = default; + IDictionary tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = SapDatabaseProperties.DeserializeSapDatabaseProperties(property.Value, options); + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("location"u8)) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SapDatabaseInstanceData( + id, + name, + type, + systemData, + tags ?? new ChangeTrackingDictionary(), + location, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapDatabaseInstanceData)} does not support writing '{options.Format}' format."); + } + } + + SapDatabaseInstanceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSapDatabaseInstanceData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapDatabaseInstanceData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapDatabaseInstanceData.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapDatabaseInstanceData.cs new file mode 100644 index 000000000000..2a7a52a0a861 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapDatabaseInstanceData.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.SapVirtualInstances.Models; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + /// + /// A class representing the SapDatabaseInstance data model. + /// Define the Database resource. + /// + public partial class SapDatabaseInstanceData : TrackedResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The location. + public SapDatabaseInstanceData(AzureLocation location) : base(location) + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal SapDatabaseInstanceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, SapDatabaseProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SapDatabaseInstanceData() + { + } + + /// The resource-specific properties for this resource. + public SapDatabaseProperties Properties { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapDatabaseInstanceResource.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapDatabaseInstanceResource.Serialization.cs new file mode 100644 index 000000000000..7dea59643721 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapDatabaseInstanceResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + public partial class SapDatabaseInstanceResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + SapDatabaseInstanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + SapDatabaseInstanceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapDatabaseInstanceResource.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapDatabaseInstanceResource.cs new file mode 100644 index 000000000000..7143c285d63a --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapDatabaseInstanceResource.cs @@ -0,0 +1,871 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.SapVirtualInstances.Models; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + /// + /// A Class representing a SapDatabaseInstance along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetSapDatabaseInstanceResource method. + /// Otherwise you can get one from its parent resource using the GetSapDatabaseInstance method. + /// + public partial class SapDatabaseInstanceResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The sapVirtualInstanceName. + /// The databaseInstanceName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string databaseInstanceName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _sapDatabaseInstanceClientDiagnostics; + private readonly SapDatabaseInstancesRestOperations _sapDatabaseInstanceRestClient; + private readonly SapDatabaseInstanceData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Workloads/sapVirtualInstances/databaseInstances"; + + /// Initializes a new instance of the class for mocking. + protected SapDatabaseInstanceResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal SapDatabaseInstanceResource(ArmClient client, SapDatabaseInstanceData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal SapDatabaseInstanceResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _sapDatabaseInstanceClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.SapVirtualInstances", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string sapDatabaseInstanceApiVersion); + _sapDatabaseInstanceRestClient = new SapDatabaseInstancesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, sapDatabaseInstanceApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual SapDatabaseInstanceData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Gets the SAP Database Instance resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName} + /// + /// + /// Operation Id + /// SAPDatabaseInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _sapDatabaseInstanceClientDiagnostics.CreateScope("SapDatabaseInstanceResource.Get"); + scope.Start(); + try + { + var response = await _sapDatabaseInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SapDatabaseInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the SAP Database Instance resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName} + /// + /// + /// Operation Id + /// SAPDatabaseInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _sapDatabaseInstanceClientDiagnostics.CreateScope("SapDatabaseInstanceResource.Get"); + scope.Start(); + try + { + var response = _sapDatabaseInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SapDatabaseInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes the Database resource corresponding to a Virtual Instance for SAP solutions resource. <br><br>This will be used by service only. Delete by end user will return a Bad Request error. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName} + /// + /// + /// Operation Id + /// SAPDatabaseInstance_Delete + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _sapDatabaseInstanceClientDiagnostics.CreateScope("SapDatabaseInstanceResource.Delete"); + scope.Start(); + try + { + var response = await _sapDatabaseInstanceRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new SapVirtualInstancesArmOperation(_sapDatabaseInstanceClientDiagnostics, Pipeline, _sapDatabaseInstanceRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes the Database resource corresponding to a Virtual Instance for SAP solutions resource. <br><br>This will be used by service only. Delete by end user will return a Bad Request error. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName} + /// + /// + /// Operation Id + /// SAPDatabaseInstance_Delete + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _sapDatabaseInstanceClientDiagnostics.CreateScope("SapDatabaseInstanceResource.Delete"); + scope.Start(); + try + { + var response = _sapDatabaseInstanceRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new SapVirtualInstancesArmOperation(_sapDatabaseInstanceClientDiagnostics, Pipeline, _sapDatabaseInstanceRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates the Database resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName} + /// + /// + /// Operation Id + /// SAPDatabaseInstance_Update + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Database resource update request body. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(SapDatabaseInstancePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _sapDatabaseInstanceClientDiagnostics.CreateScope("SapDatabaseInstanceResource.Update"); + scope.Start(); + try + { + var response = await _sapDatabaseInstanceRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new SapDatabaseInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates the Database resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName} + /// + /// + /// Operation Id + /// SAPDatabaseInstance_Update + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Database resource update request body. + /// The cancellation token to use. + /// is null. + public virtual Response Update(SapDatabaseInstancePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _sapDatabaseInstanceClientDiagnostics.CreateScope("SapDatabaseInstanceResource.Update"); + scope.Start(); + try + { + var response = _sapDatabaseInstanceRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken); + return Response.FromValue(new SapDatabaseInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Starts the database instance of the SAP system. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName}/start + /// + /// + /// Operation Id + /// SAPDatabaseInstances_Start + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// 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. + /// SAP Database server instance start request body. + /// The cancellation token to use. + public virtual async Task> StartAsync(WaitUntil waitUntil, StartContent content = null, CancellationToken cancellationToken = default) + { + using var scope = _sapDatabaseInstanceClientDiagnostics.CreateScope("SapDatabaseInstanceResource.Start"); + scope.Start(); + try + { + var response = await _sapDatabaseInstanceRestClient.StartAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new SapVirtualInstancesArmOperation(new OperationStatusResultOperationSource(), _sapDatabaseInstanceClientDiagnostics, Pipeline, _sapDatabaseInstanceRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Starts the database instance of the SAP system. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName}/start + /// + /// + /// Operation Id + /// SAPDatabaseInstances_Start + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// 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. + /// SAP Database server instance start request body. + /// The cancellation token to use. + public virtual ArmOperation Start(WaitUntil waitUntil, StartContent content = null, CancellationToken cancellationToken = default) + { + using var scope = _sapDatabaseInstanceClientDiagnostics.CreateScope("SapDatabaseInstanceResource.Start"); + scope.Start(); + try + { + var response = _sapDatabaseInstanceRestClient.Start(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); + var operation = new SapVirtualInstancesArmOperation(new OperationStatusResultOperationSource(), _sapDatabaseInstanceClientDiagnostics, Pipeline, _sapDatabaseInstanceRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Stops the database instance of the SAP system. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName}/stop + /// + /// + /// Operation Id + /// SAPDatabaseInstances_Stop + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// 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. + /// Stop request for the database instance of the SAP system. + /// The cancellation token to use. + public virtual async Task> StopAsync(WaitUntil waitUntil, StopContent content = null, CancellationToken cancellationToken = default) + { + using var scope = _sapDatabaseInstanceClientDiagnostics.CreateScope("SapDatabaseInstanceResource.Stop"); + scope.Start(); + try + { + var response = await _sapDatabaseInstanceRestClient.StopAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new SapVirtualInstancesArmOperation(new OperationStatusResultOperationSource(), _sapDatabaseInstanceClientDiagnostics, Pipeline, _sapDatabaseInstanceRestClient.CreateStopRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Stops the database instance of the SAP system. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName}/stop + /// + /// + /// Operation Id + /// SAPDatabaseInstances_Stop + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// 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. + /// Stop request for the database instance of the SAP system. + /// The cancellation token to use. + public virtual ArmOperation Stop(WaitUntil waitUntil, StopContent content = null, CancellationToken cancellationToken = default) + { + using var scope = _sapDatabaseInstanceClientDiagnostics.CreateScope("SapDatabaseInstanceResource.Stop"); + scope.Start(); + try + { + var response = _sapDatabaseInstanceRestClient.Stop(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); + var operation = new SapVirtualInstancesArmOperation(new OperationStatusResultOperationSource(), _sapDatabaseInstanceClientDiagnostics, Pipeline, _sapDatabaseInstanceRestClient.CreateStopRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName} + /// + /// + /// Operation Id + /// SAPDatabaseInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _sapDatabaseInstanceClientDiagnostics.CreateScope("SapDatabaseInstanceResource.AddTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues[key] = value; + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _sapDatabaseInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new SapDatabaseInstanceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new SapDatabaseInstancePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName} + /// + /// + /// Operation Id + /// SAPDatabaseInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _sapDatabaseInstanceClientDiagnostics.CreateScope("SapDatabaseInstanceResource.AddTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues[key] = value; + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _sapDatabaseInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new SapDatabaseInstanceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new SapDatabaseInstancePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = Update(patch, cancellationToken: cancellationToken); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName} + /// + /// + /// Operation Id + /// SAPDatabaseInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _sapDatabaseInstanceClientDiagnostics.CreateScope("SapDatabaseInstanceResource.SetTags"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _sapDatabaseInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new SapDatabaseInstanceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new SapDatabaseInstancePatch(); + patch.Tags.ReplaceWith(tags); + var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName} + /// + /// + /// Operation Id + /// SAPDatabaseInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _sapDatabaseInstanceClientDiagnostics.CreateScope("SapDatabaseInstanceResource.SetTags"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _sapDatabaseInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new SapDatabaseInstanceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new SapDatabaseInstancePatch(); + patch.Tags.ReplaceWith(tags); + var result = Update(patch, cancellationToken: cancellationToken); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName} + /// + /// + /// Operation Id + /// SAPDatabaseInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _sapDatabaseInstanceClientDiagnostics.CreateScope("SapDatabaseInstanceResource.RemoveTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.Remove(key); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _sapDatabaseInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new SapDatabaseInstanceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new SapDatabaseInstancePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName} + /// + /// + /// Operation Id + /// SAPDatabaseInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _sapDatabaseInstanceClientDiagnostics.CreateScope("SapDatabaseInstanceResource.RemoveTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.Remove(key); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _sapDatabaseInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new SapDatabaseInstanceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new SapDatabaseInstancePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = Update(patch, cancellationToken: cancellationToken); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapVirtualInstanceCollection.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapVirtualInstanceCollection.cs new file mode 100644 index 000000000000..5544653d0006 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapVirtualInstanceCollection.cs @@ -0,0 +1,494 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetSapVirtualInstances method from an instance of . + /// + public partial class SapVirtualInstanceCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _sapVirtualInstanceClientDiagnostics; + private readonly SapVirtualInstancesRestOperations _sapVirtualInstanceRestClient; + + /// Initializes a new instance of the class for mocking. + protected SapVirtualInstanceCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal SapVirtualInstanceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _sapVirtualInstanceClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.SapVirtualInstances", SapVirtualInstanceResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(SapVirtualInstanceResource.ResourceType, out string sapVirtualInstanceApiVersion); + _sapVirtualInstanceRestClient = new SapVirtualInstancesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, sapVirtualInstanceApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceGroupResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceGroupResource.ResourceType), nameof(id)); + } + + /// + /// Creates a Virtual Instance for SAP solutions (VIS) resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName} + /// + /// + /// Operation Id + /// SAPVirtualInstance_Create + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the Virtual Instances for SAP solutions resource. + /// Virtual Instance for SAP solutions resource request body. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string sapVirtualInstanceName, SapVirtualInstanceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _sapVirtualInstanceClientDiagnostics.CreateScope("SapVirtualInstanceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _sapVirtualInstanceRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, sapVirtualInstanceName, data, cancellationToken).ConfigureAwait(false); + var operation = new SapVirtualInstancesArmOperation(new SapVirtualInstanceOperationSource(Client), _sapVirtualInstanceClientDiagnostics, Pipeline, _sapVirtualInstanceRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, sapVirtualInstanceName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates a Virtual Instance for SAP solutions (VIS) resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName} + /// + /// + /// Operation Id + /// SAPVirtualInstance_Create + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the Virtual Instances for SAP solutions resource. + /// Virtual Instance for SAP solutions resource request body. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string sapVirtualInstanceName, SapVirtualInstanceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _sapVirtualInstanceClientDiagnostics.CreateScope("SapVirtualInstanceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _sapVirtualInstanceRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, sapVirtualInstanceName, data, cancellationToken); + var operation = new SapVirtualInstancesArmOperation(new SapVirtualInstanceOperationSource(Client), _sapVirtualInstanceClientDiagnostics, Pipeline, _sapVirtualInstanceRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, sapVirtualInstanceName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a Virtual Instance for SAP solutions resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName} + /// + /// + /// Operation Id + /// SAPVirtualInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Virtual Instances for SAP solutions resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string sapVirtualInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + + using var scope = _sapVirtualInstanceClientDiagnostics.CreateScope("SapVirtualInstanceCollection.Get"); + scope.Start(); + try + { + var response = await _sapVirtualInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, sapVirtualInstanceName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SapVirtualInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a Virtual Instance for SAP solutions resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName} + /// + /// + /// Operation Id + /// SAPVirtualInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Virtual Instances for SAP solutions resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string sapVirtualInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + + using var scope = _sapVirtualInstanceClientDiagnostics.CreateScope("SapVirtualInstanceCollection.Get"); + scope.Start(); + try + { + var response = _sapVirtualInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, sapVirtualInstanceName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SapVirtualInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets all Virtual Instances for SAP solutions resources in a Resource Group. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances + /// + /// + /// Operation Id + /// SAPVirtualInstance_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _sapVirtualInstanceRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _sapVirtualInstanceRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new SapVirtualInstanceResource(Client, SapVirtualInstanceData.DeserializeSapVirtualInstanceData(e)), _sapVirtualInstanceClientDiagnostics, Pipeline, "SapVirtualInstanceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Gets all Virtual Instances for SAP solutions resources in a Resource Group. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances + /// + /// + /// Operation Id + /// SAPVirtualInstance_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _sapVirtualInstanceRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _sapVirtualInstanceRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new SapVirtualInstanceResource(Client, SapVirtualInstanceData.DeserializeSapVirtualInstanceData(e)), _sapVirtualInstanceClientDiagnostics, Pipeline, "SapVirtualInstanceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName} + /// + /// + /// Operation Id + /// SAPVirtualInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Virtual Instances for SAP solutions resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string sapVirtualInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + + using var scope = _sapVirtualInstanceClientDiagnostics.CreateScope("SapVirtualInstanceCollection.Exists"); + scope.Start(); + try + { + var response = await _sapVirtualInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, sapVirtualInstanceName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName} + /// + /// + /// Operation Id + /// SAPVirtualInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Virtual Instances for SAP solutions resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string sapVirtualInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + + using var scope = _sapVirtualInstanceClientDiagnostics.CreateScope("SapVirtualInstanceCollection.Exists"); + scope.Start(); + try + { + var response = _sapVirtualInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, sapVirtualInstanceName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName} + /// + /// + /// Operation Id + /// SAPVirtualInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Virtual Instances for SAP solutions resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string sapVirtualInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + + using var scope = _sapVirtualInstanceClientDiagnostics.CreateScope("SapVirtualInstanceCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _sapVirtualInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, sapVirtualInstanceName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new SapVirtualInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName} + /// + /// + /// Operation Id + /// SAPVirtualInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Virtual Instances for SAP solutions resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string sapVirtualInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + + using var scope = _sapVirtualInstanceClientDiagnostics.CreateScope("SapVirtualInstanceCollection.GetIfExists"); + scope.Start(); + try + { + var response = _sapVirtualInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, sapVirtualInstanceName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new SapVirtualInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapVirtualInstanceData.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapVirtualInstanceData.Serialization.cs new file mode 100644 index 000000000000..8bceae591aef --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapVirtualInstanceData.Serialization.cs @@ -0,0 +1,194 @@ +// 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.Models; +using Azure.ResourceManager.SapVirtualInstances.Models; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + public partial class SapVirtualInstanceData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapVirtualInstanceData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"u8); + writer.WriteObjectValue(Identity, options); + } + } + + SapVirtualInstanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SapVirtualInstanceData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSapVirtualInstanceData(document.RootElement, options); + } + + internal static SapVirtualInstanceData DeserializeSapVirtualInstanceData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + SapVirtualInstanceProperties properties = default; + SAPVirtualInstanceIdentity identity = default; + IDictionary tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = SapVirtualInstanceProperties.DeserializeSapVirtualInstanceProperties(property.Value, options); + continue; + } + if (property.NameEquals("identity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + identity = SAPVirtualInstanceIdentity.DeserializeSAPVirtualInstanceIdentity(property.Value, options); + continue; + } + if (property.NameEquals("tags"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("location"u8)) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SapVirtualInstanceData( + id, + name, + type, + systemData, + tags ?? new ChangeTrackingDictionary(), + location, + properties, + identity, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(SapVirtualInstanceData)} does not support writing '{options.Format}' format."); + } + } + + SapVirtualInstanceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSapVirtualInstanceData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SapVirtualInstanceData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapVirtualInstanceData.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapVirtualInstanceData.cs new file mode 100644 index 000000000000..23effb8e55dd --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapVirtualInstanceData.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 Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.SapVirtualInstances.Models; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + /// + /// A class representing the SapVirtualInstance data model. + /// Define the Virtual Instance for SAP solutions resource. + /// + public partial class SapVirtualInstanceData : TrackedResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The location. + public SapVirtualInstanceData(AzureLocation location) : base(location) + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The resource-specific properties for this resource. + /// The managed service identities assigned to this resource. + /// Keeps track of any properties unknown to the library. + internal SapVirtualInstanceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, SapVirtualInstanceProperties properties, SAPVirtualInstanceIdentity identity, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + Properties = properties; + Identity = identity; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SapVirtualInstanceData() + { + } + + /// The resource-specific properties for this resource. + public SapVirtualInstanceProperties Properties { get; set; } + /// The managed service identities assigned to this resource. + public SAPVirtualInstanceIdentity Identity { get; set; } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapVirtualInstanceResource.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapVirtualInstanceResource.Serialization.cs new file mode 100644 index 000000000000..bb21a27aa9a0 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapVirtualInstanceResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + public partial class SapVirtualInstanceResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + SapVirtualInstanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + SapVirtualInstanceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapVirtualInstanceResource.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapVirtualInstanceResource.cs new file mode 100644 index 000000000000..7880898f8e6a --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Generated/SapVirtualInstanceResource.cs @@ -0,0 +1,1086 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Resources; +using Azure.ResourceManager.SapVirtualInstances.Models; + +namespace Azure.ResourceManager.SapVirtualInstances +{ + /// + /// A Class representing a SapVirtualInstance along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetSapVirtualInstanceResource method. + /// Otherwise you can get one from its parent resource using the GetSapVirtualInstance method. + /// + public partial class SapVirtualInstanceResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The sapVirtualInstanceName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _sapVirtualInstanceClientDiagnostics; + private readonly SapVirtualInstancesRestOperations _sapVirtualInstanceRestClient; + private readonly SapVirtualInstanceData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Workloads/sapVirtualInstances"; + + /// Initializes a new instance of the class for mocking. + protected SapVirtualInstanceResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal SapVirtualInstanceResource(ArmClient client, SapVirtualInstanceData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal SapVirtualInstanceResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _sapVirtualInstanceClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.SapVirtualInstances", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string sapVirtualInstanceApiVersion); + _sapVirtualInstanceRestClient = new SapVirtualInstancesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, sapVirtualInstanceApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual SapVirtualInstanceData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// Gets a collection of SapCentralServerInstanceResources in the SapVirtualInstance. + /// An object representing collection of SapCentralServerInstanceResources and their operations over a SapCentralServerInstanceResource. + public virtual SapCentralServerInstanceCollection GetSapCentralServerInstances() + { + return GetCachedClient(client => new SapCentralServerInstanceCollection(client, Id)); + } + + /// + /// Gets the SAP Central Services Instance resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName} + /// + /// + /// Operation Id + /// SAPCentralServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetSapCentralServerInstanceAsync(string centralInstanceName, CancellationToken cancellationToken = default) + { + return await GetSapCentralServerInstances().GetAsync(centralInstanceName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the SAP Central Services Instance resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName} + /// + /// + /// Operation Id + /// SAPCentralServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetSapCentralServerInstance(string centralInstanceName, CancellationToken cancellationToken = default) + { + return GetSapCentralServerInstances().Get(centralInstanceName, cancellationToken); + } + + /// Gets a collection of SapDatabaseInstanceResources in the SapVirtualInstance. + /// An object representing collection of SapDatabaseInstanceResources and their operations over a SapDatabaseInstanceResource. + public virtual SapDatabaseInstanceCollection GetSapDatabaseInstances() + { + return GetCachedClient(client => new SapDatabaseInstanceCollection(client, Id)); + } + + /// + /// Gets the SAP Database Instance resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName} + /// + /// + /// Operation Id + /// SAPDatabaseInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Database resource name string modeled as parameter for auto generation to work correctly. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetSapDatabaseInstanceAsync(string databaseInstanceName, CancellationToken cancellationToken = default) + { + return await GetSapDatabaseInstances().GetAsync(databaseInstanceName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the SAP Database Instance resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName} + /// + /// + /// Operation Id + /// SAPDatabaseInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Database resource name string modeled as parameter for auto generation to work correctly. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetSapDatabaseInstance(string databaseInstanceName, CancellationToken cancellationToken = default) + { + return GetSapDatabaseInstances().Get(databaseInstanceName, cancellationToken); + } + + /// Gets a collection of SapApplicationServerInstanceResources in the SapVirtualInstance. + /// An object representing collection of SapApplicationServerInstanceResources and their operations over a SapApplicationServerInstanceResource. + public virtual SapApplicationServerInstanceCollection GetSapApplicationServerInstances() + { + return GetCachedClient(client => new SapApplicationServerInstanceCollection(client, Id)); + } + + /// + /// Gets the SAP Application Server Instance corresponding to the Virtual Instance for SAP solutions resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName} + /// + /// + /// Operation Id + /// SAPApplicationServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of SAP Application Server instance resource. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetSapApplicationServerInstanceAsync(string applicationInstanceName, CancellationToken cancellationToken = default) + { + return await GetSapApplicationServerInstances().GetAsync(applicationInstanceName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the SAP Application Server Instance corresponding to the Virtual Instance for SAP solutions resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName} + /// + /// + /// Operation Id + /// SAPApplicationServerInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of SAP Application Server instance resource. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetSapApplicationServerInstance(string applicationInstanceName, CancellationToken cancellationToken = default) + { + return GetSapApplicationServerInstances().Get(applicationInstanceName, cancellationToken); + } + + /// + /// Gets a Virtual Instance for SAP solutions resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName} + /// + /// + /// Operation Id + /// SAPVirtualInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _sapVirtualInstanceClientDiagnostics.CreateScope("SapVirtualInstanceResource.Get"); + scope.Start(); + try + { + var response = await _sapVirtualInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SapVirtualInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a Virtual Instance for SAP solutions resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName} + /// + /// + /// Operation Id + /// SAPVirtualInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _sapVirtualInstanceClientDiagnostics.CreateScope("SapVirtualInstanceResource.Get"); + scope.Start(); + try + { + var response = _sapVirtualInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SapVirtualInstanceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes a Virtual Instance for SAP solutions resource and its child resources, that is the associated Central Services Instance, Application Server Instances and Database Instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName} + /// + /// + /// Operation Id + /// SAPVirtualInstance_Delete + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _sapVirtualInstanceClientDiagnostics.CreateScope("SapVirtualInstanceResource.Delete"); + scope.Start(); + try + { + var response = await _sapVirtualInstanceRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new SapVirtualInstancesArmOperation(_sapVirtualInstanceClientDiagnostics, Pipeline, _sapVirtualInstanceRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes a Virtual Instance for SAP solutions resource and its child resources, that is the associated Central Services Instance, Application Server Instances and Database Instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName} + /// + /// + /// Operation Id + /// SAPVirtualInstance_Delete + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _sapVirtualInstanceClientDiagnostics.CreateScope("SapVirtualInstanceResource.Delete"); + scope.Start(); + try + { + var response = _sapVirtualInstanceRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new SapVirtualInstancesArmOperation(_sapVirtualInstanceClientDiagnostics, Pipeline, _sapVirtualInstanceRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates a Virtual Instance for SAP solutions resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName} + /// + /// + /// Operation Id + /// SAPVirtualInstance_Update + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// 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. + /// Request body to update a Virtual Instance for SAP solutions resource. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, SapVirtualInstancePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _sapVirtualInstanceClientDiagnostics.CreateScope("SapVirtualInstanceResource.Update"); + scope.Start(); + try + { + var response = await _sapVirtualInstanceRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new SapVirtualInstancesArmOperation(new SapVirtualInstanceOperationSource(Client), _sapVirtualInstanceClientDiagnostics, Pipeline, _sapVirtualInstanceRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates a Virtual Instance for SAP solutions resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName} + /// + /// + /// Operation Id + /// SAPVirtualInstance_Update + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// 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. + /// Request body to update a Virtual Instance for SAP solutions resource. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, SapVirtualInstancePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _sapVirtualInstanceClientDiagnostics.CreateScope("SapVirtualInstanceResource.Update"); + scope.Start(); + try + { + var response = _sapVirtualInstanceRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); + var operation = new SapVirtualInstancesArmOperation(new SapVirtualInstanceOperationSource(Client), _sapVirtualInstanceClientDiagnostics, Pipeline, _sapVirtualInstanceRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Starts the SAP application, that is the Central Services instance and Application server instances. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/start + /// + /// + /// Operation Id + /// SAPVirtualInstances_Start + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The Virtual Instance for SAP solutions resource start request body. + /// The cancellation token to use. + public virtual async Task> StartAsync(WaitUntil waitUntil, StartContent content = null, CancellationToken cancellationToken = default) + { + using var scope = _sapVirtualInstanceClientDiagnostics.CreateScope("SapVirtualInstanceResource.Start"); + scope.Start(); + try + { + var response = await _sapVirtualInstanceRestClient.StartAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new SapVirtualInstancesArmOperation(new OperationStatusResultOperationSource(), _sapVirtualInstanceClientDiagnostics, Pipeline, _sapVirtualInstanceRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Starts the SAP application, that is the Central Services instance and Application server instances. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/start + /// + /// + /// Operation Id + /// SAPVirtualInstances_Start + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The Virtual Instance for SAP solutions resource start request body. + /// The cancellation token to use. + public virtual ArmOperation Start(WaitUntil waitUntil, StartContent content = null, CancellationToken cancellationToken = default) + { + using var scope = _sapVirtualInstanceClientDiagnostics.CreateScope("SapVirtualInstanceResource.Start"); + scope.Start(); + try + { + var response = _sapVirtualInstanceRestClient.Start(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); + var operation = new SapVirtualInstancesArmOperation(new OperationStatusResultOperationSource(), _sapVirtualInstanceClientDiagnostics, Pipeline, _sapVirtualInstanceRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Stops the SAP Application, that is the Application server instances and Central Services instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/stop + /// + /// + /// Operation Id + /// SAPVirtualInstances_Stop + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The Virtual Instance for SAP solutions resource stop request body. + /// The cancellation token to use. + public virtual async Task> StopAsync(WaitUntil waitUntil, StopContent content = null, CancellationToken cancellationToken = default) + { + using var scope = _sapVirtualInstanceClientDiagnostics.CreateScope("SapVirtualInstanceResource.Stop"); + scope.Start(); + try + { + var response = await _sapVirtualInstanceRestClient.StopAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new SapVirtualInstancesArmOperation(new OperationStatusResultOperationSource(), _sapVirtualInstanceClientDiagnostics, Pipeline, _sapVirtualInstanceRestClient.CreateStopRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Stops the SAP Application, that is the Application server instances and Central Services instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/stop + /// + /// + /// Operation Id + /// SAPVirtualInstances_Stop + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The Virtual Instance for SAP solutions resource stop request body. + /// The cancellation token to use. + public virtual ArmOperation Stop(WaitUntil waitUntil, StopContent content = null, CancellationToken cancellationToken = default) + { + using var scope = _sapVirtualInstanceClientDiagnostics.CreateScope("SapVirtualInstanceResource.Stop"); + scope.Start(); + try + { + var response = _sapVirtualInstanceRestClient.Stop(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); + var operation = new SapVirtualInstancesArmOperation(new OperationStatusResultOperationSource(), _sapVirtualInstanceClientDiagnostics, Pipeline, _sapVirtualInstanceRestClient.CreateStopRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName} + /// + /// + /// Operation Id + /// SAPVirtualInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _sapVirtualInstanceClientDiagnostics.CreateScope("SapVirtualInstanceResource.AddTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues[key] = value; + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _sapVirtualInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new SapVirtualInstanceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new SapVirtualInstancePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName} + /// + /// + /// Operation Id + /// SAPVirtualInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _sapVirtualInstanceClientDiagnostics.CreateScope("SapVirtualInstanceResource.AddTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues[key] = value; + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _sapVirtualInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new SapVirtualInstanceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new SapVirtualInstancePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName} + /// + /// + /// Operation Id + /// SAPVirtualInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _sapVirtualInstanceClientDiagnostics.CreateScope("SapVirtualInstanceResource.SetTags"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _sapVirtualInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new SapVirtualInstanceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new SapVirtualInstancePatch(); + patch.Tags.ReplaceWith(tags); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName} + /// + /// + /// Operation Id + /// SAPVirtualInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _sapVirtualInstanceClientDiagnostics.CreateScope("SapVirtualInstanceResource.SetTags"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _sapVirtualInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new SapVirtualInstanceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new SapVirtualInstancePatch(); + patch.Tags.ReplaceWith(tags); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName} + /// + /// + /// Operation Id + /// SAPVirtualInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _sapVirtualInstanceClientDiagnostics.CreateScope("SapVirtualInstanceResource.RemoveTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.Remove(key); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _sapVirtualInstanceRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new SapVirtualInstanceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new SapVirtualInstancePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName} + /// + /// + /// Operation Id + /// SAPVirtualInstance_Get + /// + /// + /// Default Api Version + /// 2024-09-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _sapVirtualInstanceClientDiagnostics.CreateScope("SapVirtualInstanceResource.RemoveTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.Remove(key); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _sapVirtualInstanceRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new SapVirtualInstanceResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new SapVirtualInstancePatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Properties/AssemblyInfo.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..bd4bf19bb2e8 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/src/Properties/AssemblyInfo.cs @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo("Azure.ResourceManager.SapVirtualInstances.Tests, PublicKey = 0024000004800000940000000602000000240000525341310004000001000100d15ddcb29688295338af4b7686603fe614abd555e09efba8fb88ee09e1f7b1ccaeed2e8f823fa9eef3fdd60217fc012ea67d2479751a0b8c087a4185541b851bd8b16f8d91b840e51b1cb0ba6fe647997e57429265e85ef62d565db50a69ae1647d54d7bd855e4db3d8a91510e5bcbd0edfbbecaa20a7bd9ae74593daa7b11b4")] + +// Replace Microsoft.Test with the correct resource provider namepace for your service and uncomment. +// See https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/azure-services-resource-providers +// for the list of possible values. +[assembly: Azure.Core.AzureResourceProviderNamespace("SapVirtualInstances")] diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/tests/Azure.ResourceManager.SapVirtualInstances.Tests.csproj b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/tests/Azure.ResourceManager.SapVirtualInstances.Tests.csproj new file mode 100644 index 000000000000..7fdacf298294 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/tests/Azure.ResourceManager.SapVirtualInstances.Tests.csproj @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/tests/SapVirtualInstancesManagementTestBase.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/tests/SapVirtualInstancesManagementTestBase.cs new file mode 100644 index 000000000000..9197b1df6841 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/tests/SapVirtualInstancesManagementTestBase.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure; +using Azure.Core; +using Azure.Core.TestFramework; +using Azure.ResourceManager; +using Azure.ResourceManager.Resources; +using Azure.ResourceManager.TestFramework; +using NUnit.Framework; +using System.Threading.Tasks; + +namespace Azure.ResourceManager.SapVirtualInstances.Tests +{ + public class SapVirtualInstancesManagementTestBase : ManagementRecordedTestBase + { + protected ArmClient Client { get; private set; } + protected SubscriptionResource DefaultSubscription { get; private set; } + + protected SapVirtualInstancesManagementTestBase(bool isAsync, RecordedTestMode mode) + : base(isAsync, mode) + { + } + + protected SapVirtualInstancesManagementTestBase(bool isAsync) + : base(isAsync) + { + } + + [SetUp] + public async Task CreateCommonClient() + { + Client = GetArmClient(); + DefaultSubscription = await Client.GetDefaultSubscriptionAsync().ConfigureAwait(false); + } + + protected async Task CreateResourceGroup(SubscriptionResource subscription, string rgNamePrefix, AzureLocation location) + { + string rgName = Recording.GenerateAssetName(rgNamePrefix); + ResourceGroupData input = new ResourceGroupData(location); + var lro = await subscription.GetResourceGroups().CreateOrUpdateAsync(WaitUntil.Completed, rgName, input); + return lro.Value; + } + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/tests/SapVirtualInstancesManagementTestEnvironment.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/tests/SapVirtualInstancesManagementTestEnvironment.cs new file mode 100644 index 000000000000..8ffa2df9862e --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/tests/SapVirtualInstancesManagementTestEnvironment.cs @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core.TestFramework; + +namespace Azure.ResourceManager.SapVirtualInstances.Tests +{ + public class SapVirtualInstancesManagementTestEnvironment : TestEnvironment + { + } +} diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/tsp-location.yaml b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/tsp-location.yaml new file mode 100644 index 000000000000..438883561941 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.SapVirtualInstances/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/workloads/Workloads.SAPVirtualInstance.Management +commit: 1a8dcbc31c561409f253e5f7a924ff577b583da7 +repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/workloadssapvirtualinstance/ci.mgmt.yml b/sdk/workloadssapvirtualinstance/ci.mgmt.yml new file mode 100644 index 000000000000..a90c11972d53 --- /dev/null +++ b/sdk/workloadssapvirtualinstance/ci.mgmt.yml @@ -0,0 +1,26 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. + +trigger: none + +pr: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/workloadssapvirtualinstance /ci.mgmt.yml + - sdk/workloadssapvirtualinstance /Azure.ResourceManager.SapVirtualInstances / + + +extends: + template: /eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: workloadssapvirtualinstance + ArtifactName: packages + LimitForPullRequest: true + Artifacts: + - name: Azure.ResourceManager.SapVirtualInstances + safeName: AzureResourceManagerSapVirtualInstances